glotfile 0.7.0 → 0.7.2

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.
@@ -0,0 +1,2124 @@
1
+ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function n(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var r={},i=[],a=()=>{},o=()=>!1,s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith(`onUpdate:`),l=Object.assign,u=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,f=(e,t)=>d.call(e,t),p=Array.isArray,m=e=>w(e)===`[object Map]`,h=e=>w(e)===`[object Set]`,g=e=>w(e)===`[object Date]`,_=e=>w(e)===`[object RegExp]`,v=e=>typeof e==`function`,y=e=>typeof e==`string`,b=e=>typeof e==`symbol`,x=e=>typeof e==`object`&&!!e,S=e=>(x(e)||v(e))&&v(e.then)&&v(e.catch),C=Object.prototype.toString,w=e=>C.call(e),T=e=>w(e).slice(8,-1),ee=e=>w(e)===`[object Object]`,E=e=>y(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,te=n(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ne=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},re=/-\w/g,D=ne(e=>e.replace(re,e=>e.slice(1).toUpperCase())),ie=/\B([A-Z])/g,ae=ne(e=>e.replace(ie,`-$1`).toLowerCase()),oe=ne(e=>e.charAt(0).toUpperCase()+e.slice(1)),se=ne(e=>e?`on${oe(e)}`:``),O=(e,t)=>!Object.is(e,t),ce=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},le=(e,t,n,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},ue=e=>{let t=parseFloat(e);return isNaN(t)?e:t},de=e=>{let t=y(e)?Number(e):NaN;return isNaN(t)?e:t},fe,pe=()=>fe||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{},me=n(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`);function he(e){if(p(e)){let t={};for(let n=0;n<e.length;n++){let r=e[n],i=y(r)?ye(r):he(r);if(i)for(let e in i)t[e]=i[e]}return t}else if(y(e)||x(e))return e}var ge=/;(?![^(]*\))/g,_e=/:([^]+)/,ve=/\/\*[^]*?\*\//g;function ye(e){let t={};return e.replace(ve,``).split(ge).forEach(e=>{if(e){let n=e.split(_e);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function k(e){let t=``;if(y(e))t=e;else if(p(e))for(let n=0;n<e.length;n++){let r=k(e[n]);r&&(t+=r+` `)}else if(x(e))for(let n in e)e[n]&&(t+=n+` `);return t.trim()}function be(e){if(!e)return null;let{class:t,style:n}=e;return t&&!y(t)&&(e.class=k(t)),n&&(e.style=he(n)),e}var xe=`itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`,Se=n(xe);xe+``;function Ce(e){return!!e||e===``}function we(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Te(e[r],t[r]);return n}function Te(e,t){if(e===t)return!0;let n=g(e),r=g(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=b(e),r=b(t),n||r)return e===t;if(n=p(e),r=p(t),n||r)return n&&r?we(e,t):!1;if(n=x(e),r=x(t),n||r){if(!n||!r||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){let r=e.hasOwnProperty(n),i=t.hasOwnProperty(n);if(r&&!i||!r&&i||!Te(e[n],t[n]))return!1}}return String(e)===String(t)}function Ee(e,t){return e.findIndex(e=>Te(e,t))}var De=e=>!!(e&&e.__v_isRef===!0),A=e=>y(e)?e:e==null?``:p(e)||x(e)&&(e.toString===C||!v(e.toString))?De(e)?A(e.value):JSON.stringify(e,Oe,2):String(e),Oe=(e,t)=>De(t)?Oe(e,t.value):m(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ke(t,r)+` =>`]=n,e),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ke(e))}:b(t)?ke(t):x(t)&&!p(t)&&!ee(t)?String(t):t,ke=(e,t=``)=>b(e)?`Symbol(${e.description??t})`:e;function Ae(e){return e==null?`initial`:typeof e==`string`?e===``?` `:e:String(e)}var je,Me=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&je&&(je.active?(this.parent=je,this.index=(je.scopes||=[]).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].pause();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,t;if(this.scopes)for(e=0,t=this.scopes.length;e<t;e++)this.scopes[e].resume();for(e=0,t=this.effects.length;e<t;e++)this.effects[e].resume()}}run(e){if(this._active){let t=je;try{return je=this,e()}finally{je=t}}}on(){++this._on===1&&(this.prevScope=je,je=this)}off(){if(this._on>0&&--this._on===0){if(je===this)je=this.prevScope;else{let e=je;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(this.effects.length=0,t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.cleanups.length=0,this.scopes){for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){let e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.parent=void 0}}};function Ne(e){return new Me(e)}function Pe(){return je}function Fe(e,t=!1){je&&je.cleanups.push(e)}var Ie,Le=new WeakSet,Re=class{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,je&&(je.active?je.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Le.has(this)&&(Le.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||He(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,rt(this),Ge(this);let e=Ie,t=$e;Ie=this,$e=!0;try{return this.fn()}finally{Ke(this),Ie=e,$e=t,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ye(e);this.deps=this.depsTail=void 0,rt(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Le.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){qe(this)&&this.run()}get dirty(){return qe(this)}},ze=0,Be,Ve;function He(e,t=!1){if(e.flags|=8,t){e.next=Ve,Ve=e;return}e.next=Be,Be=e}function Ue(){ze++}function We(){if(--ze>0)return;if(Ve){let e=Ve;for(Ve=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Be;){let t=Be;for(Be=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ge(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ke(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Ye(r),Xe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function qe(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Je(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Je(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===it)||(e.globalVersion=it,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!qe(e))))return;e.flags|=2;let t=e.dep,n=Ie,r=$e;Ie=e,$e=!0;try{Ge(e);let n=e.fn(e._value);(t.version===0||O(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{Ie=n,$e=r,Ke(e),e.flags&=-3}}function Ye(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ye(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Xe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Ze(e,t){e.effect instanceof Re&&(e=e.effect.fn);let n=new Re(e);t&&l(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function Qe(e){e.effect.stop()}var $e=!0,et=[];function tt(){et.push($e),$e=!1}function nt(){let e=et.pop();$e=e===void 0?!0:e}function rt(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=Ie;Ie=void 0;try{t()}finally{Ie=e}}}var it=0,at=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},ot=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Ie||!$e||Ie===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==Ie)t=this.activeLink=new at(Ie,this),Ie.deps?(t.prevDep=Ie.depsTail,Ie.depsTail.nextDep=t,Ie.depsTail=t):Ie.deps=Ie.depsTail=t,st(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=Ie.depsTail,t.nextDep=void 0,Ie.depsTail.nextDep=t,Ie.depsTail=t,Ie.deps===t&&(Ie.deps=e)}return t}trigger(e){this.version++,it++,this.notify(e)}notify(e){Ue();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{We()}}};function st(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)st(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var ct=new WeakMap,lt=Symbol(``),ut=Symbol(``),dt=Symbol(``);function ft(e,t,n){if($e&&Ie){let t=ct.get(e);t||ct.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new ot),r.map=t,r.key=n),r.track()}}function pt(e,t,n,r,i,a){let o=ct.get(e);if(!o){it++;return}let s=e=>{e&&e.trigger()};if(Ue(),t===`clear`)o.forEach(s);else{let i=p(e),a=i&&E(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===dt||!b(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(dt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(lt)),m(e)&&s(o.get(ut)));break;case`delete`:i||(s(o.get(lt)),m(e)&&s(o.get(ut)));break;case`set`:m(e)&&s(o.get(lt));break}}We()}function mt(e,t){let n=ct.get(e);return n&&n.get(t)}function ht(e){let t=on(e);return t===e?t:(ft(t,`iterate`,dt),rn(e)?t:t.map(cn))}function gt(e){return ft(e=on(e),`iterate`,dt),e}function _t(e,t){return nn(e)?ln(tn(e)?cn(t):t):cn(t)}var vt={__proto__:null,[Symbol.iterator](){return yt(this,Symbol.iterator,e=>_t(this,e))},concat(...e){return ht(this).concat(...e.map(e=>p(e)?ht(e):e))},entries(){return yt(this,`entries`,e=>(e[1]=_t(this,e[1]),e))},every(e,t){return xt(this,`every`,e,t,void 0,arguments)},filter(e,t){return xt(this,`filter`,e,t,e=>e.map(e=>_t(this,e)),arguments)},find(e,t){return xt(this,`find`,e,t,e=>_t(this,e),arguments)},findIndex(e,t){return xt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return xt(this,`findLast`,e,t,e=>_t(this,e),arguments)},findLastIndex(e,t){return xt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return xt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Ct(this,`includes`,e)},indexOf(...e){return Ct(this,`indexOf`,e)},join(e){return ht(this).join(e)},lastIndexOf(...e){return Ct(this,`lastIndexOf`,e)},map(e,t){return xt(this,`map`,e,t,void 0,arguments)},pop(){return wt(this,`pop`)},push(...e){return wt(this,`push`,e)},reduce(e,...t){return St(this,`reduce`,e,t)},reduceRight(e,...t){return St(this,`reduceRight`,e,t)},shift(){return wt(this,`shift`)},some(e,t){return xt(this,`some`,e,t,void 0,arguments)},splice(...e){return wt(this,`splice`,e)},toReversed(){return ht(this).toReversed()},toSorted(e){return ht(this).toSorted(e)},toSpliced(...e){return ht(this).toSpliced(...e)},unshift(...e){return wt(this,`unshift`,e)},values(){return yt(this,`values`,e=>_t(this,e))}};function yt(e,t,n){let r=gt(e),i=r[t]();return r!==e&&!rn(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var bt=Array.prototype;function xt(e,t,n,r,i,a){let o=gt(e),s=o!==e&&!rn(e),c=o[t];if(c!==bt[t]){let t=c.apply(e,a);return s?cn(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,_t(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function St(e,t,n,r){let i=gt(e),a=i!==e&&!rn(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=_t(e,t)),n.call(this,t,_t(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?_t(e,c):c}function Ct(e,t,n){let r=on(e);ft(r,`iterate`,dt);let i=r[t](...n);return(i===-1||i===!1)&&an(n[0])?(n[0]=on(n[0]),r[t](...n)):i}function wt(e,t,n=[]){tt(),Ue();let r=on(e)[t].apply(e,n);return We(),nt(),r}var Tt=n(`__proto__,__v_isRef,__isVue`),Et=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(b));function Dt(e){b(e)||(e=String(e));let t=on(this);return ft(t,`has`,e),t.hasOwnProperty(e)}var Ot=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Jt:qt:i?Kt:Gt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=p(e);if(!r){let e;if(a&&(e=vt[t]))return e;if(t===`hasOwnProperty`)return Dt}let o=Reflect.get(e,t,un(e)?e:n);if((b(t)?Et.has(t):Tt(t))||(r||ft(e,`get`,t),i))return o;if(un(o)){let e=a&&E(t)?o:o.value;return r&&x(e)?Qt(e):e}return x(o)?r?Qt(o):Xt(o):o}},kt=class extends Ot{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=p(e)&&E(t);if(!this._isShallow){let e=nn(i);if(!rn(n)&&!nn(n)&&(i=on(i),n=on(n)),!a&&un(i)&&!un(n))return e||(i.value=n),!0}let o=a?Number(t)<e.length:f(e,t),s=Reflect.set(e,t,n,un(e)?e:r);return e===on(r)&&(o?O(n,i)&&pt(e,`set`,t,n,i):pt(e,`add`,t,n)),s}deleteProperty(e,t){let n=f(e,t),r=e[t],i=Reflect.deleteProperty(e,t);return i&&n&&pt(e,`delete`,t,void 0,r),i}has(e,t){let n=Reflect.has(e,t);return(!b(t)||!Et.has(t))&&ft(e,`has`,t),n}ownKeys(e){return ft(e,`iterate`,p(e)?`length`:lt),Reflect.ownKeys(e)}},At=class extends Ot{constructor(e=!1){super(!0,e)}set(e,t){return!0}deleteProperty(e,t){return!0}},jt=new kt,Mt=new At,Nt=new kt(!0),Pt=new At(!0),Ft=e=>e,It=e=>Reflect.getPrototypeOf(e);function Lt(e,t,n){return function(...r){let i=this.__v_raw,a=on(i),o=m(a),s=e===`entries`||e===Symbol.iterator&&o,c=e===`keys`&&o,u=i[e](...r),d=n?Ft:t?ln:cn;return!t&&ft(a,`iterate`,c?ut:lt),l(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Rt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function zt(e,t){let n={get(n){let r=this.__v_raw,i=on(r),a=on(n);e||(O(n,a)&&ft(i,`get`,n),ft(i,`get`,a));let{has:o}=It(i),s=t?Ft:e?ln:cn;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&ft(on(t),`iterate`,lt),t.size},has(t){let n=this.__v_raw,r=on(n),i=on(t);return e||(O(t,i)&&ft(r,`has`,t),ft(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=on(a),s=t?Ft:e?ln:cn;return!e&&ft(o,`iterate`,lt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return l(n,e?{add:Rt(`add`),set:Rt(`set`),delete:Rt(`delete`),clear:Rt(`clear`)}:{add(e){let n=on(this),r=It(n),i=on(e),a=!t&&!rn(e)&&!nn(e)?i:e;return r.has.call(n,a)||O(e,a)&&r.has.call(n,e)||O(i,a)&&r.has.call(n,i)||(n.add(a),pt(n,`add`,a,a)),this},set(e,n){!t&&!rn(n)&&!nn(n)&&(n=on(n));let r=on(this),{has:i,get:a}=It(r),o=i.call(r,e);o||=(e=on(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?O(n,s)&&pt(r,`set`,e,n,s):pt(r,`add`,e,n),this},delete(e){let t=on(this),{has:n,get:r}=It(t),i=n.call(t,e);i||=(e=on(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&pt(t,`delete`,e,void 0,a),o},clear(){let e=on(this),t=e.size!==0,n=e.clear();return t&&pt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Lt(r,e,t)}),n}function Bt(e,t){let n=zt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(f(n,r)&&r in t?n:t,r,i)}var Vt={get:Bt(!1,!1)},Ht={get:Bt(!1,!0)},Ut={get:Bt(!0,!1)},Wt={get:Bt(!0,!0)},Gt=new WeakMap,Kt=new WeakMap,qt=new WeakMap,Jt=new WeakMap;function Yt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function Xt(e){return nn(e)?e:en(e,!1,jt,Vt,Gt)}function Zt(e){return en(e,!1,Nt,Ht,Kt)}function Qt(e){return en(e,!0,Mt,Ut,qt)}function $t(e){return en(e,!0,Pt,Wt,Jt)}function en(e,t,n,r,i){if(!x(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=Yt(T(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function tn(e){return nn(e)?tn(e.__v_raw):!!(e&&e.__v_isReactive)}function nn(e){return!!(e&&e.__v_isReadonly)}function rn(e){return!!(e&&e.__v_isShallow)}function an(e){return e?!!e.__v_raw:!1}function on(e){let t=e&&e.__v_raw;return t?on(t):e}function sn(e){return!f(e,`__v_skip`)&&Object.isExtensible(e)&&le(e,`__v_skip`,!0),e}var cn=e=>x(e)?Xt(e):e,ln=e=>x(e)?Qt(e):e;function un(e){return e?e.__v_isRef===!0:!1}function j(e){return fn(e,!1)}function dn(e){return fn(e,!0)}function fn(e,t){return un(e)?e:new pn(e,t)}var pn=class{constructor(e,t){this.dep=new ot,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:on(e),this._value=t?e:cn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||rn(e)||nn(e);e=n?e:on(e),O(e,t)&&(this._rawValue=e,this._value=n?e:cn(e),this.dep.trigger())}};function mn(e){e.dep&&e.dep.trigger()}function M(e){return un(e)?e.value:e}function hn(e){return v(e)?e():M(e)}var gn={get:(e,t,n)=>t===`__v_raw`?e:M(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return un(i)&&!un(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function _n(e){return tn(e)?e:new Proxy(e,gn)}var vn=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new ot,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function yn(e){return new vn(e)}function bn(e){let t=p(e)?Array(e.length):{};for(let n in e)t[n]=wn(e,n);return t}var xn=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=b(t)?t:String(t),this._raw=on(e);let r=!0,i=e;if(!p(e)||b(this._key)||!E(this._key))do r=!an(i)||rn(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=M(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&un(this._raw[this._key])){let t=this._object[this._key];if(un(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return mt(this._raw,this._key)}},Sn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function Cn(e,t,n){return un(e)?e:v(e)?new Sn(e):x(e)&&arguments.length>1?wn(e,t,n):j(e)}function wn(e,t,n){return new xn(e,t,n)}var Tn=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new ot(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=it-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Ie!==this)return He(this,!0),!0}get value(){let e=this.dep.track();return Je(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function En(e,t,n=!1){let r,i;return v(e)?r=e:(r=e.get,i=e.set),new Tn(r,i,n)}var Dn={GET:`get`,HAS:`has`,ITERATE:`iterate`},On={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},kn={},An=new WeakMap,jn=void 0;function Mn(){return jn}function Nn(e,t=!1,n=jn){if(n){let t=An.get(n);t||An.set(n,t=[]),t.push(e)}}function Pn(e,t,n=r){let{immediate:i,deep:o,once:s,scheduler:c,augmentJob:l,call:d}=n,f=e=>o?e:rn(e)||o===!1||o===0?Fn(e,1):Fn(e),m,h,g,_,y=!1,b=!1;if(un(e)?(h=()=>e.value,y=rn(e)):tn(e)?(h=()=>f(e),y=!0):p(e)?(b=!0,y=e.some(e=>tn(e)||rn(e)),h=()=>e.map(e=>{if(un(e))return e.value;if(tn(e))return f(e);if(v(e))return d?d(e,2):e()})):h=v(e)?t?d?()=>d(e,2):e:()=>{if(g){tt();try{g()}finally{nt()}}let t=jn;jn=m;try{return d?d(e,3,[_]):e(_)}finally{jn=t}}:a,t&&o){let e=h,t=o===!0?1/0:o;h=()=>Fn(e(),t)}let x=Pe(),S=()=>{m.stop(),x&&x.active&&u(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(kn):kn,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e))if(t){let e=m.run();if(o||y||(b?e.some((e,t)=>O(e,C[t])):O(e,C))){g&&g();let n=jn;jn=m;try{let n=[e,C===kn?void 0:b&&C[0]===kn?[]:C,_];C=e,d?d(t,3,n):t(...n)}finally{jn=n}}}else m.run()};return l&&l(w),m=new Re(h),m.scheduler=c?()=>c(w,!1):w,_=e=>Nn(e,!1,m),g=m.onStop=()=>{let e=An.get(m);if(e){if(d)d(e,4);else for(let t of e)t();An.delete(m)}},t?i?w(!0):C=m.run():c?c(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function Fn(e,t=1/0,n){if(t<=0||!x(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,un(e))Fn(e.value,t,n);else if(p(e))for(let r=0;r<e.length;r++)Fn(e[r],t,n);else if(h(e)||m(e))e.forEach(e=>{Fn(e,t,n)});else if(ee(e)){for(let r in e)Fn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Fn(e[r],t,n)}return e}var In=[];function Ln(e){In.push(e)}function Rn(){In.pop()}function zn(e,t){}var Bn={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},Vn={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`};function Hn(e,t,n,r){try{return r?e(...r):e()}catch(e){Wn(e,t,n)}}function Un(e,t,n,r){if(v(e)){let i=Hn(e,t,n,r);return i&&S(i)&&i.catch(e=>{Wn(e,t,n)}),i}if(p(e)){let i=[];for(let a=0;a<e.length;a++)i.push(Un(e[a],t,n,r));return i}}function Wn(e,t,n,i=!0){let a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||r;if(t){let r=t.parent,i=t.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;r;){let t=r.ec;if(t){for(let n=0;n<t.length;n++)if(t[n](e,i,a)===!1)return}r=r.parent}if(o){tt(),Hn(o,null,10,[e,i,a]),nt();return}}Gn(e,n,a,i,s)}function Gn(e,t,n,r=!0,i=!1){if(i)throw e;console.error(e)}var Kn=[],qn=-1,Jn=[],Yn=null,Xn=0,Zn=Promise.resolve(),Qn=null;function $n(e){let t=Qn||Zn;return e?t.then(this?e.bind(this):e):t}function er(e){let t=qn+1,n=Kn.length;for(;t<n;){let r=t+n>>>1,i=Kn[r],a=or(i);a<e||a===e&&i.flags&2?t=r+1:n=r}return t}function tr(e){if(!(e.flags&1)){let t=or(e),n=Kn[Kn.length-1];!n||!(e.flags&2)&&t>=or(n)?Kn.push(e):Kn.splice(er(t),0,e),e.flags|=1,nr()}}function nr(){Qn||=Zn.then(sr)}function rr(e){p(e)?Jn.push(...e):Yn&&e.id===-1?Yn.splice(Xn+1,0,e):e.flags&1||(Jn.push(e),e.flags|=1),nr()}function ir(e,t,n=qn+1){for(;n<Kn.length;n++){let t=Kn[n];if(t&&t.flags&2){if(e&&t.id!==e.uid)continue;Kn.splice(n,1),n--,t.flags&4&&(t.flags&=-2),t(),t.flags&4||(t.flags&=-2)}}}function ar(e){if(Jn.length){let e=[...new Set(Jn)].sort((e,t)=>or(e)-or(t));if(Jn.length=0,Yn){Yn.push(...e);return}for(Yn=e,Xn=0;Xn<Yn.length;Xn++){let e=Yn[Xn];e.flags&4&&(e.flags&=-2),e.flags&8||e(),e.flags&=-2}Yn=null,Xn=0}}var or=e=>e.id==null?e.flags&2?-1:1/0:e.id;function sr(e){try{for(qn=0;qn<Kn.length;qn++){let e=Kn[qn];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Hn(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;qn<Kn.length;qn++){let e=Kn[qn];e&&(e.flags&=-2)}qn=-1,Kn.length=0,ar(e),Qn=null,(Kn.length||Jn.length)&&sr(e)}}var cr,lr=[];function ur(e,t){cr=e,cr?(cr.enabled=!0,lr.forEach(({event:e,args:t})=>cr.emit(e,...t)),lr=[]):typeof window<`u`&&window.HTMLElement&&!(window.navigator?.userAgent)?.includes(`jsdom`)?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(e=>{ur(e,t)}),setTimeout(()=>{cr||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,lr=[])},3e3)):lr=[]}var dr=null,fr=null;function pr(e){let t=dr;return dr=e,fr=e&&e.type.__scopeId||null,t}function mr(e){fr=e}function hr(){fr=null}var gr=e=>N;function N(e,t=dr,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&cs(-1);let i=pr(t),a;try{a=e(...n)}finally{pr(i),r._d&&cs(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function _r(e,t){if(dr===null)return e;let n=Ws(dr),i=e.dirs||=[];for(let e=0;e<t.length;e++){let[a,o,s,c=r]=t[e];a&&(v(a)&&(a={mounted:a,updated:a}),a.deep&&Fn(o),i.push({dir:a,instance:n,value:o,oldValue:void 0,arg:s,modifiers:c}))}return e}function vr(e,t,n,r){let i=e.dirs,a=t&&t.dirs;for(let o=0;o<i.length;o++){let s=i[o];a&&(s.oldValue=a[o].value);let c=s.dir[r];c&&(tt(),Un(c,n,8,[e.el,s,e,t]),nt())}}function yr(e,t){if(Es){let n=Es.provides,r=Es.parent&&Es.parent.provides;r===n&&(n=Es.provides=Object.create(r)),n[e]=t}}function br(e,t,n=!1){let r=Ds();if(r||Xa){let i=Xa?Xa._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&v(t)?t.call(r&&r.proxy):t}}function xr(){return!!(Ds()||Xa)}var Sr=Symbol.for(`v-scx`),Cr=()=>br(Sr);function wr(e,t){return Or(e,null,t)}function Tr(e,t){return Or(e,null,{flush:`post`})}function Er(e,t){return Or(e,null,{flush:`sync`})}function Dr(e,t,n){return Or(e,t,n)}function Or(e,t,n=r){let{immediate:i,deep:o,flush:s,once:c}=n,u=l({},n),d=t&&i||!t&&s!==`post`,f;if(Ns){if(s===`sync`){let e=Cr();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=a,e.resume=a,e.pause=a,e}}let p=Es;u.call=(e,t,n)=>Un(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{Ao(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():tr(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=Pn(e,t,u);return Ns&&(f?f.push(h):d&&h()),h}function kr(e,t,n){let r=this.proxy,i=y(e)?e.includes(`.`)?Ar(r,e):()=>r[e]:e.bind(r,r),a;v(t)?a=t:(a=t.handler,n=t);let o=As(this),s=Or(i,a.bind(r),n);return o(),s}function Ar(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;e<n.length&&t;e++)t=t[n[e]];return t}}var jr=new WeakMap,Mr=Symbol(`_vte`),Nr=e=>e.__isTeleport,Pr=e=>e&&(e.disabled||e.disabled===``),Fr=e=>e&&(e.defer||e.defer===``),Ir=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Lr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,Rr=(e,t)=>{let n=e&&e.to;return y(n)?t?t(n):null:n},zr={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Pr(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Pr(e.props),r=e.target=Rr(e.props,m),a=Wr(r,e,h,p);r&&(o!==`svg`&&Ir(r)?o=`svg`:o!==`mathml`&&Lr(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),Ur(e,!1)))},S=e=>{let t=()=>{jr.get(e)===t&&(jr.delete(e),Pr(e.props)&&(b(e,_(e.el)||n,e.anchor),Ur(e,!0)),x(e))};jr.set(e,t),Ao(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Fr(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),Ur(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=jr.get(e);if(u){u.flags|=8,jr.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Pr(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Ir(p)?o=`svg`:(o===`mathml`||Lr(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Lo(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Br(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=Rr(t.props,m);e&&Br(t,e,null,l,0)}else g&&Br(t,p,h,l,1);Ur(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=a||!Pr(f),m=jr.get(e);if(m&&(m.flags|=8,jr.delete(e)),d&&(i(l),i(u)),a&&i(c),!m&&o&16)for(let e=0;e<s.length;e++){let i=s[e];r(i,t,n,p,!!i.dynamicChildren)}},move:Br,hydrate:Vr};function Br(e,t,n,{o:{insert:r},m:i},a=2){a===0&&r(e.targetAnchor,t,n);let{el:o,anchor:s,shapeFlag:c,children:l,props:u}=e,d=a===2;if(d&&r(o,t,n),!jr.has(e)&&(!d||Pr(u))&&c&16)for(let e=0;e<l.length;e++)i(l[e],t,n,2);d&&r(s,t,n)}function Vr(e,t,n,r,i,a,{o:{nextSibling:o,parentNode:s,querySelector:c,insert:l,createText:u}},d){function f(e,n){let r=n;for(;r;){if(r&&r.nodeType===8){if(r.data===`teleport start anchor`)t.targetStart=r;else if(r.data===`teleport anchor`){t.targetAnchor=r,e._lpa=t.targetAnchor&&o(t.targetAnchor);break}}r=o(r)}}function p(e,t){t.anchor=d(o(e),t,s(e),n,r,i,a)}let m=t.target=Rr(t.props,c),h=Pr(t.props);if(m){let c=m._lpa||m.firstChild;t.shapeFlag&16&&(h?(p(e,t),f(m,c),t.targetAnchor||Wr(m,t,u,l,s(e)===m?e:null)):(t.anchor=o(e),f(m,c),t.targetAnchor||Wr(m,t,u,l),d(c&&o(c),t,m,n,r,i,a))),Ur(t,h)}else h&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=o(e));return t.anchor&&o(t.anchor)}var Hr=zr;function Ur(e,t){let n=e.ctx;if(n&&n.ut){let r,i;for(t?(r=e.el,i=e.anchor):(r=e.targetStart,i=e.targetAnchor);r&&r!==i;)r.nodeType===1&&r.setAttribute(`data-v-owner`,n.uid),r=r.nextSibling;n.ut()}}function Wr(e,t,n,r,i=null){let a=t.targetStart=n(``),o=t.targetAnchor=n(``);return a[Mr]=o,e&&(r(a,e,i),r(o,e,i)),o}var Gr=Symbol(`_leaveCb`),Kr=Symbol(`_enterCb`);function qr(){let e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ki(()=>{e.isMounted=!0}),Yi(()=>{e.isUnmounting=!0}),e}var Jr=[Function,Array],Yr={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Jr,onEnter:Jr,onAfterEnter:Jr,onEnterCancelled:Jr,onBeforeLeave:Jr,onLeave:Jr,onAfterLeave:Jr,onLeaveCancelled:Jr,onBeforeAppear:Jr,onAppear:Jr,onAfterAppear:Jr,onAppearCancelled:Jr},Xr=e=>{let t=e.subTree;return t.component?Xr(t.component):t},Zr={name:`BaseTransition`,props:Yr,setup(e,{slots:t}){let n=Ds(),r=qr();return()=>{let i=t.default&&ai(t.default(),!0),a=i&&i.length?Qr(i):n.subTree?W():void 0;if(!a)return;let o=on(e),{mode:s}=o;if(r.isLeaving)return ni(a);let c=ri(a);if(!c)return ni(a);let l=ti(c,o,r,n,e=>l=e);c.type!==ns&&ii(c,l);let u=n.subTree&&ri(n.subTree);if(u&&u.type!==ns&&!ds(u,c)&&Xr(n).type!==ns){let e=ti(u,o,r,n);if(ii(u,e),s===`out-in`&&c.type!==ns)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},ni(a);s===`in-out`&&c.type!==ns?e.delayLeave=(e,t,n)=>{let i=ei(r,u);i[String(u.key)]=u,e[Gr]=()=>{t(),e[Gr]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function Qr(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==ns){t=n;break}}return t}var $r=Zr;function ei(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function ti(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=ei(n,e),C=(e,t)=>{e&&Un(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),p(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted)if(a)r=_||c;else return;t[Gr]&&t[Gr](!0);let i=S[x];i&&ds(e,i)&&i.el[Gr]&&i.el[Gr](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=d;if(!n.isMounted)if(a)r=v||l,i=y||u,o=b||d;else return;let s=!1;t[Kr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[Kr]=void 0)};let c=t[Kr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[Kr]&&t[Kr](!0),n.isUnmounting)return r();C(f,[t]);let a=!1;t[Gr]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[Gr]=void 0,S[i]===e&&delete S[i])};let o=t[Gr].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=ti(e,t,n,r,i);return i&&i(a),a}};return T}function ni(e){if(Pi(e))return e=_s(e),e.children=null,e}function ri(e){if(!Pi(e))return Nr(e.type)&&e.children?Qr(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&v(n.default))return n.default()}}function ii(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ii(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ai(e,t=!1,n){let r=[],i=0;for(let a=0;a<e.length;a++){let o=e[a],s=n==null?o.key:String(n)+String(o.key==null?a:o.key);o.type===L?(o.patchFlag&128&&i++,r=r.concat(ai(o.children,t,s))):(t||o.type!==ns)&&r.push(s==null?o:_s(o,{key:s}))}if(i>1)for(let e=0;e<r.length;e++)r[e].patchFlag=-2;return r}function P(e,t){return v(e)?l({name:e.name},t,{setup:e}):e}function oi(){let e=Ds();return e?(e.appContext.config.idPrefix||`v`)+`-`+e.ids[0]+ e.ids[1]++:``}function si(e){e.ids=[e.ids[0]+ e.ids[2]+++`-`,0,0]}function ci(e){let t=Ds(),n=dn(null);if(t){let i=t.refs===r?t.refs={}:t.refs;Object.defineProperty(i,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}return n}function li(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var ui=new WeakMap;function di(e,t,n,i,a=!1){if(p(e)){e.forEach((e,r)=>di(e,t&&(p(t)?t[r]:t),n,i,a));return}if(ji(i)&&!a){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&di(e,t,n,i.component.subTree);return}let s=i.shapeFlag&4?Ws(i.component):i.el,c=a?null:s,{i:l,r:d}=e,m=t&&t.r,h=l.refs===r?l.refs={}:l.refs,g=l.setupState,_=on(g),b=g===r?o:e=>li(h,e)?!1:f(_,e),x=(e,t)=>!(t&&li(h,t));if(m!=null&&m!==d){if(fi(t),y(m))h[m]=null,b(m)&&(g[m]=null);else if(un(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(v(d))Hn(d,l,12,[c,h]);else{let t=y(d),r=un(d);if(t||r){let i=()=>{if(e.f){let n=t?b(d)?g[d]:h[d]:x(d)||!e.k?d.value:h[e.k];if(a)p(n)&&u(n,s);else if(p(n))n.includes(s)||n.push(s);else if(t)h[d]=[s],b(d)&&(g[d]=h[d]);else{let t=[s];x(d,e.k)&&(d.value=t),e.k&&(h[e.k]=t)}}else t?(h[d]=c,b(d)&&(g[d]=c)):r&&(x(d,e.k)&&(d.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),ui.delete(e)};t.id=-1,ui.set(e,t),Ao(t,n)}else fi(e),i()}}}function fi(e){let t=ui.get(e);t&&(t.flags|=8,ui.delete(e))}var pi=!1,mi=()=>{pi||=(console.error(`Hydration completed but contains mismatches.`),!0)},hi=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,gi=e=>e.namespaceURI.includes(`MathML`),_i=e=>{if(e.nodeType===1){if(hi(e))return`svg`;if(gi(e))return`mathml`}},vi=e=>e.nodeType===8;function yi(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:o,remove:c,insert:l,createComment:u}}=e,d=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),ar(),t._vnode=e;return}f(t.firstChild,e,null,null,null),ar(),t._vnode=e},f=(n,r,s,c,u,d=!1)=>{d||=!!r.dynamicChildren;let b=vi(n)&&n.data===`[`,x=()=>g(n,r,s,c,u,b),{type:S,ref:C,shapeFlag:w,patchFlag:T}=r,ee=n.nodeType;r.el=n,T===-2&&(d=!1,r.dynamicChildren=null);let E=null;switch(S){case ts:ee===3?(n.data!==r.children&&(mi(),n.data=r.children),E=a(n)):r.children===``?(l(r.el=i(``),o(n),n),E=n):E=x();break;case ns:y(n)?(E=a(n),v(r.el=n.content.firstChild,n,s)):E=ee!==8||b?x():a(n);break;case rs:if(b&&(n=a(n),ee=n.nodeType),ee===1||ee===3){E=n;let e=!r.children.length;for(let t=0;t<r.staticCount;t++)e&&(r.children+=E.nodeType===1?E.outerHTML:E.data),t===r.staticCount-1&&(r.anchor=E),E=a(E);return b?a(E):E}else x();break;case L:E=b?h(n,r,s,c,u,d):x();break;default:if(w&1)E=(ee!==1||r.type.toLowerCase()!==n.tagName.toLowerCase())&&!y(n)?x():p(n,r,s,c,u,d);else if(w&6){r.slotScopeIds=u;let e=o(n);if(E=b?_(n):vi(n)&&n.data===`teleport start`?_(n,n.data,`teleport end`):a(n),t(r,e,null,s,c,_i(e),d),ji(r)&&!r.type.__asyncResolved){let t;b?(t=H(L),t.anchor=E?E.previousSibling:e.lastChild):t=n.nodeType===3?U(``):H(`div`),t.el=n,r.component.subTree=t}}else w&64?E=ee===8?r.type.hydrate(n,r,s,c,u,d,e,m):x():w&128&&(E=r.type.hydrate(n,r,s,c,_i(o(n)),u,d,e,f))}return C!=null&&di(C,null,c,r),E},p=(e,t,n,i,a,o)=>{o||=!!t.dynamicChildren;let{type:l,props:u,patchFlag:d,shapeFlag:f,dirs:p,transition:h}=t,g=l===`input`||l===`option`;if(g||d!==-1){p&&vr(t,null,n,`created`);let l=!1;if(y(e)){l=Io(null,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;if(l){let e=r.getAttribute(`class`);e&&(r.$cls=e),h.beforeEnter(r)}v(r,e,n),t.el=e=r}if(f&16&&!(u&&(u.innerHTML||u.textContent))){let r=m(e.firstChild,t,e,n,i,a,o);for(r&&!Si(e,1)&&mi();r;){let e=r;r=r.nextSibling,c(e)}}else if(f&8){let n=t.children;n[0]===`
2
+ `&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,`
3
+ `)&&(Si(e,0)||mi(),e.textContent=t.children)}if(u){if(g||!o||d&48){let t=e.tagName.includes(`-`);for(let i in u)(g&&(i.endsWith(`value`)||i===`indeterminate`)||s(i)&&!te(i)||i[0]===`.`||t&&!te(i))&&r(e,i,null,u[i],void 0,n)}else if(u.onClick)r(e,`onClick`,null,u.onClick,void 0,n);else if(d&4&&tn(u.style))for(let e in u.style)u.style[e]}let _;(_=u&&u.onVnodeBeforeMount)&&Ss(_,n,t),p&&vr(t,null,n,`beforeMount`),((_=u&&u.onVnodeMounted)||p||l)&&Qo(()=>{_&&Ss(_,n,t),l&&h.enter(e),p&&vr(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t<p;t++){let h=u?d[t]:d[t]=ys(d[t]),g=h.type===ts;e?(g&&!u&&t+1<p&&ys(d[t+1]).type===ts&&(l(i(e.data.slice(h.children.length)),r,a(e)),e.data=h.children),e=f(e,h,o,s,c,u)):g&&!h.children?l(h.el=i(``),r):(m||(m=!0,Si(r,1)||mi()),n(null,h,r,null,o,s,_i(r),c))}return e},h=(e,t,n,r,i,s)=>{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=o(e),f=m(a(e),t,d,n,r,i,s);return f&&vi(f)&&f.data===`]`?a(t.anchor=f):(mi(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,s,l)=>{if(Si(e.parentElement,1)||mi(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)c(n);else break}}let u=a(e),d=o(e);return c(e),n(null,t,d,u,r,i,_i(d),s),r&&(r.vnode.el=t.el,uo(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&vi(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var bi=`data-allow-mismatch`,xi={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function Si(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(bi);)e=e.parentElement;let n=e&&e.getAttribute(bi);if(n==null)return!1;if(n===``)return!0;{let e=n.split(`,`);return t===0&&e.includes(`children`)?!0:e.includes(xi[t])}}var Ci=pe().requestIdleCallback||(e=>setTimeout(e,1)),wi=pe().cancelIdleCallback||(e=>clearTimeout(e)),Ti=(e=1e4)=>t=>{let n=Ci(t,{timeout:e});return()=>wi(n)};function Ei(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t<a||r>0&&r<a)&&(n>0&&n<o||i>0&&i<o)}var Di=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Ei(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Oi=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},ki=(e=[])=>(t,n)=>{y(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Ai(e,t){if(vi(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(vi(r))if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++;r=r.nextSibling}}else t(e)}var ji=e=>!!e.type.__asyncLoader;function Mi(e){v(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return P({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=!1;(t.bu||=[]).push(()=>r=!0);let i=()=>{r||n()},o=a?()=>{let n=a(i,t=>Ai(e,t));n&&(t.bum||=[]).push(n)}:i;u?o():p().then(()=>!t.isUnmounted&&o())},get __asyncResolved(){return u},setup(){let e=Es;if(si(e),u)return()=>Ni(u,e);let t=t=>{l=null,Wn(t,e,13,!r)};if(s&&e.suspense||Ns)return p().then(t=>()=>Ni(t,e)).catch(e=>(t(e),()=>r?H(r,{error:e}):null));let a=j(!1),c=j(),d=j(!!i);return i&&setTimeout(()=>{d.value=!1},i),o!=null&&setTimeout(()=>{if(!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o),p().then(()=>{a.value=!0,e.parent&&Pi(e.parent.vnode)&&e.parent.update()}).catch(e=>{t(e),c.value=e}),()=>{if(a.value&&u)return Ni(u,e);if(c.value&&r)return H(r,{error:c.value});if(n&&!d.value)return Ni(n,e)}}})}function Ni(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=H(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var Pi=e=>e.type.__isKeepAlive,Fi={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=Ds(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),Ao(()=>{a.isDeactivated=!1,a.a&&ce(a.a);let t=e.props&&e.props.onVnodeMounted;t&&Ss(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;Bo(t.m),Bo(t.a),l(e,f,null,1,s),Ao(()=>{t.da&&ce(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&Ss(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){Vi(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=Gs(ji(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!ds(t,o))?p(t):o&&Vi(o),i.delete(e),a.delete(e)}Dr(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>Ii(e,t)),t&&m(e=>!Ii(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(Ho(n.subTree.type)?Ao(()=>{i.set(g,Hi(n.subTree))},n.subTree.suspense):i.set(g,Hi(n.subTree)))};return Ki(_),Ji(_),Yi(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=Hi(t);if(e.type===i.type&&e.key===i.key){Vi(i);let e=i.component.da;e&&Ao(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!us(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=Hi(r);if(s.type===ns)return o=null,s;let c=s.type,l=Gs(ji(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!Ii(u,l))||d&&l&&Ii(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=_s(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&ii(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,Ho(r.type)?r:s}}};function Ii(e,t){return p(e)?e.some(e=>Ii(e,t)):y(e)?e.split(`,`).includes(t):_(e)?(e.lastIndex=0,e.test(t)):!1}function Li(e,t){zi(e,`a`,t)}function Ri(e,t){zi(e,`da`,t)}function zi(e,t,n=Es){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(Ui(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Pi(e.parent.vnode)&&Bi(r,t,n,e),e=e.parent}}function Bi(e,t,n,r){let i=Ui(t,e,r,!0);Xi(()=>{u(r[t],i)},n)}function Vi(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Hi(e){return e.shapeFlag&128?e.ssContent:e}function Ui(e,t,n=Es,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{tt();let i=As(n),a=Un(t,n,e,r);return i(),nt(),a};return r?i.unshift(a):i.push(a),a}}var Wi=e=>(t,n=Es)=>{(!Ns||e===`sp`)&&Ui(e,(...e)=>t(...e),n)},Gi=Wi(`bm`),Ki=Wi(`m`),qi=Wi(`bu`),Ji=Wi(`u`),Yi=Wi(`bum`),Xi=Wi(`um`),Zi=Wi(`sp`),Qi=Wi(`rtg`),$i=Wi(`rtc`);function ea(e,t=Es){Ui(`ec`,e,t)}var ta=`components`,na=`directives`;function ra(e,t){return sa(ta,e,!0,t)||e}var ia=Symbol.for(`v-ndc`);function aa(e){return y(e)?sa(ta,e,!1)||e:e||ia}function oa(e){return sa(na,e)}function sa(e,t,n=!0,r=!1){let i=dr||Es;if(i){let n=i.type;if(e===ta){let e=Gs(n,!1);if(e&&(e===t||e===D(t)||e===oe(D(t))))return n}let a=ca(i[e]||n[e],t)||ca(i.appContext[e],t);return!a&&r?n:a}}function ca(e,t){return e&&(e[t]||e[D(t)]||e[oe(D(t))])}function F(e,t,n,r){let i,a=n&&n[r],o=p(e);if(o||y(e)){let n=o&&tn(e),r=!1,s=!1;n&&(r=!rn(e),s=nn(e),e=gt(e)),i=Array(e.length);for(let n=0,o=e.length;n<o;n++)i[n]=t(r?s?ln(cn(e[n])):cn(e[n]):e[n],n,void 0,a&&a[n])}else if(typeof e==`number`){i=Array(e);for(let n=0;n<e;n++)i[n]=t(n+1,n,void 0,a&&a[n])}else if(x(e))if(e[Symbol.iterator])i=Array.from(e,(e,n)=>t(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r<o;r++){let o=n[r];i[r]=t(e[o],o,r,a&&a[r])}}else i=[];return n&&(n[r]=i),i}function la(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(p(r))for(let t=0;t<r.length;t++)e[r[t].name]=r[t].fn;else r&&(e[r.name]=r.key?(...e)=>{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function I(e,t,n={},r,i){if(dr.ce||dr.parent&&ji(dr.parent)&&dr.parent.ce){let e=Object.keys(n).length>0;return t!=="default"&&(n.name=t),R(),B(L,null,[H(`slot`,n,r&&r())],e?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),R();let o=a&&ua(a(n)),s=n.key||o&&o.key,c=B(L,{key:(s&&!b(s)?s:`_${t}`)+(!o&&r?`_fb`:``)},o||(r?r():[]),o&&e._===1?64:-2);return!i&&c.scopeId&&(c.slotScopeIds=[c.scopeId+`-s`]),a&&a._c&&(a._d=!0),c}function ua(e){return e.some(e=>us(e)?!(e.type===ns||e.type===L&&!ua(e.children)):!0)?e:null}function da(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:se(r)]=e[r];return n}var fa=e=>e?Ms(e)?Ws(e):fa(e.parent):null,pa=l(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>fa(e.parent),$root:e=>fa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>La(e),$forceUpdate:e=>e.f||=()=>{tr(e.update)},$nextTick:e=>e.n||=$n.bind(e.proxy),$watch:e=>kr.bind(e)}),ma=(e,t)=>e!==r&&!e.__isScriptSetup&&f(e,t),ha={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:n,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return n[t];case 3:return o[t]}else if(ma(i,t))return s[t]=1,i[t];else if(a!==r&&f(a,t))return s[t]=2,a[t];else if(f(o,t))return s[t]=3,o[t];else if(n!==r&&f(n,t))return s[t]=4,n[t];else Ma&&(s[t]=0)}let u=pa[t],d,p;if(u)return t===`$attrs`&&ft(e.attrs,`get`,``),u(e);if((d=c.__cssModules)&&(d=d[t]))return d;if(n!==r&&f(n,t))return s[t]=4,n[t];if(p=l.config.globalProperties,f(p,t))return p[t]},set({_:e},t,n){let{data:i,setupState:a,ctx:o}=e;return ma(a,t)?(a[t]=n,!0):i!==r&&f(i,t)?(i[t]=n,!0):f(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(n[c]||e!==r&&c[0]!==`$`&&f(e,c)||ma(t,c)||f(o,c)||f(i,c)||f(pa,c)||f(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?f(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},ga=l({},ha,{get(e,t){if(t!==Symbol.unscopables)return ha.get(e,t,e)},has(e,t){return t[0]!==`_`&&!me(t)}});function _a(){return null}function va(){return null}function ya(e){}function ba(e){}function xa(){return null}function Sa(){}function Ca(e,t){return null}function wa(){return Ea(`useSlots`).slots}function Ta(){return Ea(`useAttrs`).attrs}function Ea(e){let t=Ds();return t.setupContext||=Us(t)}function Da(e){return p(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Oa(e,t){let n=Da(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?p(r)||v(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function ka(e,t){return!e||!t?e||t:p(e)&&p(t)?e.concat(t):l({},Da(e),Da(t))}function Aa(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function ja(e){let t=Ds(),n=Ns,r=e();js(),n&&ks(!1);let i=()=>{As(t),n&&ks(!0)},a=()=>{Ds()!==t&&t.scope.off(),js(),n&&ks(!1)};return S(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}var Ma=!0;function Na(e){let t=La(e),n=e.proxy,r=e.ctx;Ma=!1,t.beforeCreate&&Fa(t.beforeCreate,e,`bc`);let{data:i,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:f,mounted:m,beforeUpdate:h,updated:g,activated:_,deactivated:y,beforeDestroy:b,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:ee,renderTriggered:E,errorCaptured:te,serverPrefetch:ne,expose:re,inheritAttrs:D,components:ie,directives:ae,filters:oe}=t;if(u&&Pa(u,r,null),s)for(let e in s){let t=s[e];v(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);x(t)&&(e.data=Xt(t))}if(Ma=!0,o)for(let e in o){let t=o[e],i=K({get:v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):a,set:!v(t)&&v(t.set)?t.set.bind(n):a});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e})}if(c)for(let e in c)Ia(c[e],r,n,e);if(l){let e=v(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{yr(t,e[t])})}d&&Fa(d,e,`c`);function se(e,t){p(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(se(Gi,f),se(Ki,m),se(qi,h),se(Ji,g),se(Li,_),se(Ri,y),se(ea,te),se($i,ee),se(Qi,E),se(Yi,S),se(Xi,w),se(Zi,ne),p(re))if(re.length){let t=e.exposed||={};re.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={};T&&e.render===a&&(e.render=T),D!=null&&(e.inheritAttrs=D),ie&&(e.components=ie),ae&&(e.directives=ae),ne&&si(e)}function Pa(e,t,n=a){p(e)&&(e=Ha(e));for(let n in e){let r=e[n],i;i=x(r)?`default`in r?br(r.from||n,r.default,!0):br(r.from||n):br(r),un(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Fa(e,t,n){Un(p(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ia(e,t,n,r){let i=r.includes(`.`)?Ar(n,r):()=>n[r];if(y(e)){let n=t[e];v(n)&&Dr(i,n)}else if(v(e))Dr(i,e.bind(n));else if(x(e))if(p(e))e.forEach(e=>Ia(e,t,n,r));else{let r=v(e.handler)?e.handler.bind(n):t[e.handler];v(r)&&Dr(i,r,e)}}function La(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Ra(c,e,o,!0)),Ra(c,t,o)),x(t)&&a.set(t,c),c}function Ra(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Ra(e,a,n,!0),i&&i.forEach(t=>Ra(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=za[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var za={data:Ba,props:Ga,emits:Ga,methods:Wa,computed:Wa,beforeCreate:Ua,created:Ua,beforeMount:Ua,mounted:Ua,beforeUpdate:Ua,updated:Ua,beforeDestroy:Ua,beforeUnmount:Ua,destroyed:Ua,unmounted:Ua,activated:Ua,deactivated:Ua,errorCaptured:Ua,serverPrefetch:Ua,components:Wa,directives:Wa,watch:Ka,provide:Ba,inject:Va};function Ba(e,t){return t?e?function(){return l(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Va(e,t){return Wa(Ha(e),Ha(t))}function Ha(e){if(p(e)){let t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ua(e,t){return e?[...new Set([].concat(e,t))]:t}function Wa(e,t){return e?l(Object.create(null),e,t):t}function Ga(e,t){return e?p(e)&&p(t)?[...new Set([...e,...t])]:l(Object.create(null),Da(e),Da(t??{})):t}function Ka(e,t){if(!e)return t;if(!t)return e;let n=l(Object.create(null),e);for(let r in t)n[r]=Ua(e[r],t[r]);return n}function qa(){return{app:null,config:{isNativeTag:o,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}var Ja=0;function Ya(e,t){return function(n,r=null){v(n)||(n=l({},n)),r!=null&&!x(r)&&(r=null);let i=qa(),a=new WeakSet,o=[],s=!1,c=i.app={_uid:Ja++,_component:n,_props:r,_container:null,_context:i,_instance:null,version:Zs,get config(){return i.config},set config(e){},use(e,...t){return a.has(e)||(e&&v(e.install)?(a.add(e),e.install(c,...t)):v(e)&&(a.add(e),e(c,...t))),c},mixin(e){return i.mixins.includes(e)||i.mixins.push(e),c},component(e,t){return t?(i.components[e]=t,c):i.components[e]},directive(e,t){return t?(i.directives[e]=t,c):i.directives[e]},mount(a,o,l){if(!s){let u=c._ceVNode||H(n,r);return u.appContext=i,l===!0?l=`svg`:l===!1&&(l=void 0),o&&t?t(u,a):e(u,a,l),s=!0,c._container=a,a.__vue_app__=c,Ws(u.component)}},onUnmount(e){o.push(e)},unmount(){s&&(Un(o,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(e,t){return i.provides[e]=t,c},runWithContext(e){let t=Xa;Xa=c;try{return e()}finally{Xa=t}}};return c}}var Xa=null;function Za(e,t,n=r){let i=Ds(),a=D(t),o=ae(t),s=Qa(e,a),c=yn((s,c)=>{let l,u=r,d;return Er(()=>{let t=e[a];O(l,t)&&(l=t,c())}),{get(){return s(),n.get?n.get(l):l},set(e){let s=n.set?n.set(e):e;if(!O(s,l)&&!(u!==r&&O(e,u)))return;let f=i.vnode.props;f&&(t in f||a in f||o in f)&&(`onUpdate:${t}`in f||`onUpdate:${a}`in f||`onUpdate:${o}`in f)||(l=e,c()),i.emit(`update:${t}`,s),O(e,s)&&O(e,u)&&!O(s,d)&&c(),u=e,d=s}}});return c[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?s||r:c,done:!1}:{done:!0}}}},c}var Qa=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${D(t)}Modifiers`]||e[`${ae(t)}Modifiers`];function $a(e,t,...n){if(e.isUnmounted)return;let i=e.vnode.props||r,a=n,o=t.startsWith(`update:`),s=o&&Qa(i,t.slice(7));s&&(s.trim&&(a=n.map(e=>y(e)?e.trim():e)),s.number&&(a=n.map(ue)));let c,l=i[c=se(t)]||i[c=se(D(t))];!l&&o&&(l=i[c=se(ae(t))]),l&&Un(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Un(u,e,6,a)}}var eo=new WeakMap;function to(e,t,n=!1){let r=n?eo:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!v(e)){let r=e=>{let n=to(e,t,!0);n&&(s=!0,l(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(x(e)&&r.set(e,null),null):(p(a)?a.forEach(e=>o[e]=null):l(o,a),x(e)&&r.set(e,o),o)}function no(e,t){return!e||!s(t)?!1:(t=t.slice(2).replace(/Once$/,``),f(e,t[0].toLowerCase()+t.slice(1))||f(e,ae(t))||f(e,t))}function ro(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:s,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=pr(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ys(u.call(t,e,d,f,m,p,h)),y=s}else{let e=t;v=ys(e.length>1?e(f,{attrs:s,slots:o,emit:l}):e(f,null)),y=t.props?s:ao(s)}}catch(t){is.length=0,Wn(t,e,1),v=H(ns)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(c)&&(y=oo(y,a)),b=_s(b,y,!1,!0))}return n.dirs&&(b=_s(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ii(b,n.transition),v=b,pr(_),v}function io(e,t=!0){let n;for(let t=0;t<e.length;t++){let r=e[t];if(us(r)){if(r.type!==ns||r.children===`v-if`){if(n)return;n=r}}else return}return n}var ao=e=>{let t;for(let n in e)(n===`class`||n===`style`||s(n))&&((t||={})[n]=e[n]);return t},oo=(e,t)=>{let n={};for(let r in e)(!c(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function so(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?co(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let n=e[t];if(lo(o,r,n)&&!no(l,n))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:r===o?!1:r?o?co(r,o,l):!0:!!o;return!1}function co(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){let a=r[i];if(lo(t,e,a)&&!no(n,a))return!0}return!1}function lo(e,t,n){let r=e[n],i=t[n];return n===`style`&&x(r)&&x(i)?!Te(r,i):r!==i}function uo({vnode:e,parent:t,suspense:n},r){for(;t;){let n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=r)}var fo={},po=()=>Object.create(fo),mo=e=>Object.getPrototypeOf(e)===fo;function ho(e,t,n,r=!1){let i={},a=po();e.propsDefaults=Object.create(null),_o(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);n?e.props=r?i:Zt(i):e.type.props?e.props=i:e.props=a,e.attrs=a}function go(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=on(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r<n.length;r++){let o=n[r];if(no(e.emitsOptions,o))continue;let u=t[o];if(c)if(f(a,o))u!==a[o]&&(a[o]=u,l=!0);else{let t=D(o);i[t]=vo(c,s,t,u,e,!1)}else u!==a[o]&&(a[o]=u,l=!0)}}}else{_o(e,t,i,a)&&(l=!0);let r;for(let a in s)(!t||!f(t,a)&&((r=ae(a))===a||!f(t,r)))&&(c?n&&(n[a]!==void 0||n[r]!==void 0)&&(i[a]=vo(c,s,a,void 0,e,!0)):delete i[a]);if(a!==s)for(let e in a)(!t||!f(t,e))&&(delete a[e],l=!0)}l&&pt(e.attrs,`set`,``)}function _o(e,t,n,i){let[a,o]=e.propsOptions,s=!1,c;if(t)for(let r in t){if(te(r))continue;let l=t[r],u;a&&f(a,u=D(r))?!o||!o.includes(u)?n[u]=l:(c||={})[u]=l:no(e.emitsOptions,r)||(!(r in i)||l!==i[r])&&(i[r]=l,s=!0)}if(o){let t=on(n),i=c||r;for(let r=0;r<o.length;r++){let s=o[r];n[s]=vo(a,t,s,i[s],e,!f(i,s))}}return s}function vo(e,t,n,r,i,a){let o=e[n];if(o!=null){let e=f(o,`default`);if(e&&r===void 0){let e=o.default;if(o.type!==Function&&!o.skipFactory&&v(e)){let{propsDefaults:a}=i;if(n in a)r=a[n];else{let o=As(i);r=a[n]=e.call(null,t),o()}}else r=e;i.ce&&i.ce._setProp(n,r)}o[0]&&(a&&!e?r=!1:o[1]&&(r===``||r===ae(n))&&(r=!0))}return r}var yo=new WeakMap;function bo(e,t,n=!1){let a=n?yo:t.propsCache,o=a.get(e);if(o)return o;let s=e.props,c={},u=[],d=!1;if(!v(e)){let r=e=>{d=!0;let[n,r]=bo(e,t,!0);l(c,n),r&&u.push(...r)};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}if(!s&&!d)return x(e)&&a.set(e,i),i;if(p(s))for(let e=0;e<s.length;e++){let t=D(s[e]);xo(t)&&(c[t]=r)}else if(s)for(let e in s){let t=D(e);if(xo(t)){let n=s[e],r=c[t]=p(n)||v(n)?{type:n}:l({},n),i=r.type,a=!1,o=!0;if(p(i))for(let e=0;e<i.length;++e){let t=i[e],n=v(t)&&t.name;if(n===`Boolean`){a=!0;break}else n===`String`&&(o=!1)}else a=v(i)&&i.name===`Boolean`;r[0]=a,r[1]=o,(a||f(r,`default`))&&u.push(t)}}let m=[c,u];return x(e)&&a.set(e,m),m}function xo(e){return e[0]!==`$`&&!te(e)}var So=e=>e===`_`||e===`_ctx`||e===`$stable`,Co=e=>p(e)?e.map(ys):[ys(e)],wo=(e,t,n)=>{if(t._n)return t;let r=N((...e)=>Co(t(...e)),n);return r._c=!1,r},To=(e,t,n)=>{let r=e._ctx;for(let n in e){if(So(n))continue;let i=e[n];if(v(i))t[n]=wo(n,i,r);else if(i!=null){let e=Co(i);t[n]=()=>e}}},Eo=(e,t)=>{let n=Co(t);e.slots.default=()=>n},Do=(e,t,n)=>{for(let r in t)(n||!So(r))&&(e[r]=t[r])},Oo=(e,t,n)=>{let r=e.slots=po();if(e.vnode.shapeFlag&32){let e=t._;e?(Do(r,t,n),n&&le(r,`_`,e,!0)):To(t,r)}else t&&Eo(e,t)},ko=(e,t,n)=>{let{vnode:i,slots:a}=e,o=!0,s=r;if(i.shapeFlag&32){let e=t._;e?n&&e===1?o=!1:Do(a,t,n):(o=!t.$stable,To(t,a)),s=t}else t&&(Eo(e,t),s={default:1});if(o)for(let e in a)!So(e)&&s[e]==null&&delete a[e]},Ao=Qo;function jo(e){return No(e)}function Mo(e){return No(e,yi)}function No(e,t){let n=pe();n.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=a,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!ds(e,t)&&(r=k(e),he(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case ts:y(e,t,n,r);break;case ns:b(e,t,n,r);break;case rs:e??x(t,n,r,o);break;case L:ie(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?ae(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,Se)}u!=null&&i?di(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&di(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),ne(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&E(e.children,d,null,r,i,Po(e,a),s,u),_&&vr(e,null,r,`created`),ee(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!te(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&Ss(f,r,e)}_&&vr(e,null,r,`beforeMount`);let v=Io(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Ao(()=>{try{f&&Ss(f,r,e),v&&g.enter(d),_&&vr(e,null,r,`mounted`)}finally{}},i)},ee=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t<r.length;t++)g(e,r[t]);if(i){let n=i.subTree;if(t===n||Ho(n.type)&&(n.ssContent===t||n.ssFallback===t)){let t=i.vnode;ee(e,t,t.scopeId,t.slotScopeIds,i.parent)}}},E=(e,t,n,r,i,a,o,s,c=0)=>{for(let l=c;l<e.length;l++)v(null,e[l]=s?bs(e[l]):ys(e[l]),t,n,r,i,a,o,s)},ne=(e,t,n,i,a,o,s)=>{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||r,h=t.props||r,g;if(n&&Fo(n,!1),(g=h.onVnodeBeforeUpdate)&&Ss(g,n,t,e),f&&vr(t,e,n,`beforeUpdate`),n&&Fo(n,!0),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?re(e.dynamicChildren,d,l,n,i,Po(t,a),o):s||ue(e,t,l,null,n,i,Po(t,a),o,!1),u>0){if(u&16)D(l,m,h,n,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t<e.length;t++){let r=e[t],i=m[r],o=h[r];(o!==i||r===`value`)&&c(l,r,i,o,a,n)}}u&1&&e.children!==t.children&&p(l,t.children)}else !s&&d==null&&D(l,m,h,n,a);((g=h.onVnodeUpdated)||f)&&Ao(()=>{g&&Ss(g,n,t,e),f&&vr(t,e,n,`updated`)},i)},re=(e,t,n,r,i,a,o)=>{for(let s=0;s<t.length;s++){let c=e[s],l=t[s];v(c,l,c.el&&(c.type===L||!ds(c,l)||c.shapeFlag&198)?m(c.el):n,null,r,i,a,o,!0)}},D=(e,t,n,i,a)=>{if(t!==n){if(t!==r)for(let r in t)!te(r)&&!(r in n)&&c(e,r,t[r],null,a,i);for(let r in n){if(te(r))continue;let o=n[r],s=t[r];o!==s&&r!==`value`&&c(e,r,s,o,a,i)}`value`in n&&c(e,`value`,t.value,n.value,a)}},ie=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),E(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(re(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Lo(e,t,!0)):ue(e,t,n,f,i,a,s,c,l)},ae=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):oe(t,n,r,i,a,o,c):se(e,t,c)},oe=(e,t,n,r,i,a,o)=>{let s=e.component=Ts(e,r,i);if(Pi(e)&&(s.ctx.renderer=Se),Ps(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,O,o),!e.el){let r=s.subTree=H(ns);b(null,r,t,n),e.placeholder=r.el}}else O(s,e,t,n,i,a,o)},se=(e,t,n)=>{let r=t.component=e.component;if(so(e,t,n))if(r.asyncDep&&!r.asyncResolved){le(r,t,n);return}else r.next=t,r.update();else t.el=e.el,r.vnode=t},O=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=zo(e);if(n){t&&(t.el=c.el,le(e,t,o)),n.asyncDep.then(()=>{Ao(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Fo(e,!1),t?(t.el=c.el,le(e,t,o)):t=c,n&&ce(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Ss(d,s,t,c),Fo(e,!0);let f=ro(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),k(p),e,i,a),t.el=f.el,u===null&&uo(e,f.el),r&&Ao(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Ao(()=>Ss(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=ji(t);if(Fo(e,!1),l&&ce(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Ss(o,d,t),Fo(e,!0),s&&we){let t=()=>{e.subTree=ro(e),we(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=ro(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Ao(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Ao(()=>Ss(o,d,e),i)}(t.shapeFlag&256||d&&ji(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Ao(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Re(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>tr(u),Fo(e,!0),l()},le=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,go(e,t.props,r,n),ko(e,t.children,n),tt(),ir(e),nt()},ue=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){fe(l,d,n,r,i,a,o,s,c);return}else if(f&256){de(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&ye(l,i,a),d!==l&&p(n,d)):u&16?m&16?fe(l,d,n,r,i,a,o,s,c):ye(l,i,a,!0):(u&8&&p(n,``),m&16&&E(d,n,r,i,a,o,s,c))},de=(e,t,n,r,a,o,s,c,l)=>{e||=i,t||=i;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;p<f;p++){let r=t[p]=l?bs(t[p]):ys(t[p]);v(e[p],r,n,null,a,o,s,c,l)}u>d?ye(e,a,o,!0,!1,f):E(t,n,r,a,o,s,c,l,f)},fe=(e,t,n,r,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?bs(t[u]):ys(t[u]);if(ds(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?bs(t[p]):ys(t[p]);if(ds(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,i=e<d?t[e].el:r;for(;u<=p;)v(null,t[u]=l?bs(t[u]):ys(t[u]),n,i,a,o,s,c,l),u++}}else if(u>p)for(;u<=f;)he(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?bs(t[u]):ys(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u<b;u++)C[u]=0;for(u=m;u<=f;u++){let r=e[u];if(y>=b){he(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&ds(r,t[_])){i=_;break}i===void 0?he(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?Ro(C):i;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,i=t[e],f=t[e+1],p=e+1<d?f.el||Vo(f):r;C[u]===0?v(null,i,n,p,a,o,s,c,l):x&&(_<0||u!==w[_]?me(i,n,p,2):_--)}}},me=(e,t,n,r,i=null)=>{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){me(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,Se);return}if(c===L){o(a,t,n);for(let e=0;e<u.length;e++)me(u[e],t,n,r);o(e.anchor,t,n);return}if(c===rs){S(e,t,n);return}if(r!==2&&d&1&&l)if(r===0)l.persisted&&!a[Gr]?o(a,t,n):(l.beforeEnter(a),o(a,t,n),Ao(()=>l.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Gr];a._isLeaving&&a[Gr](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}else o(a,t,n)},he=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(tt(),di(s,null,n,e,!0),nt()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!ji(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Ss(_,t,e),u&6)ve(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&vr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,Se,r):l&&!l.hasOnce&&(a!==L||d>0&&d&64)?ye(l,t,n,!1,!0):(a===L&&d&384||!i&&u&16)&&ye(c,t,n),r&&ge(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Ao(()=>{_&&Ss(_,t,e),h&&vr(e,null,t,`unmounted`),v&&(e.el=null)},n)},ge=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===L){_e(n,r);return}if(t===rs){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},_e=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},ve=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Bo(c),Bo(l),r&&ce(r),i.stop(),a&&(a.flags|=8,he(o,e,t,n)),s&&Ao(s,t),Ao(()=>{e.isUnmounted=!0},t)},ye=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o<e.length;o++)he(e[o],t,n,r,i)},k=e=>{if(e.shapeFlag&6)return k(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Mr];return n?h(n):t},be=!1,xe=(e,t,n)=>{let r;e==null?t._vnode&&(he(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,be||=(be=!0,ir(r),ar(),!1)},Se={p:v,um:he,m:me,r:ge,mt:oe,mc:E,pc:ue,pbc:re,n:k,o:e},Ce,we;return t&&([Ce,we]=t(Se)),{render:xe,hydrate:Ce,createApp:Ya(xe,Ce)}}function Po({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Fo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Io(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Lo(e,t,n=!1){let r=e.children,i=t.children;if(p(r)&&p(i))for(let e=0;e<r.length;e++){let t=r[e],a=i[e];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[e]=bs(i[e]),a.el=t.el),!n&&a.patchFlag!==-2&&Lo(t,a)),a.type===ts&&(a.patchFlag===-1&&(a=i[e]=bs(a)),a.el=t.el),a.type===ns&&!a.el&&(a.el=t.el)}}function Ro(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-- >0;)n[a]=o,o=t[o];return n}function zo(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zo(t)}function Bo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Vo(e){if(e.placeholder)return e.placeholder;let t=e.component;return t?Vo(t.subTree):null}var Ho=e=>e.__isSuspense,Uo=0,Wo={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)Ko(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}qo(e,t,n,r,i,o,s,c,l)}},hydrate:Yo,normalize:Xo};function Go(e,t){let n=e.props&&e.props[t];v(n)&&n()}function Ko(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=Jo(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(Go(e,`onPending`),Go(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),$o(f,e.ssFallback)):f.resolve(!1,!0)}function qo(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,ds(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),$o(d,p)))):(d.pendingId=Uo++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),$o(d,p))):m&&ds(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&ds(m,f))c(m,f,n,r,i,d,a,o,s),$o(d,f);else if(Go(t,`onPending`),d.pendingBranch=f,f.shapeFlag&512?d.pendingId=f.component.suspenseId:d.pendingId=Uo++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function Jo(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=es(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?de(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:Uo++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;if(x.isHydrating)x.isHydrating=!1;else if(!e){g=i&&o.transition&&o.transition.mode===`out-in`;let e=!1;g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b&&!e?m(i):a,0),rr(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i),e=!0),p(i,l,x,!0),!g&&d&&r.ssFallback&&Ao(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)}x.isFallbackMountPending=!1,$o(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){y.effects.push(...c),S=!0;break}y=y.parent}!S&&!g&&rr(c),x.effects=[],v&&t&&t.pendingBranch&&_===t.pendingId&&(t.deps--,t.deps===0&&!n&&t.resolve()),Go(r,`onResolve`)},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:a}=x;Go(t,`onFallback`);let o=m(n),l=()=>{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),$o(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{Wn(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;js(),e.asyncResolved=!0;let{vnode:s}=e;Is(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),uo(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function Yo(e,t,n,r,i,a,o,s,c){let l=t.suspense=Jo(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function Xo(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=Zo(r?n.default:n),e.ssFallback=r?Zo(n.fallback):H(ns)}function Zo(e){let t;if(v(e)){let n=ss&&e._c;n&&(e._d=!1,R()),e=e(),n&&(e._d=!0,t=as,os())}return p(e)&&(e=io(e)),e=ys(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function Qo(e,t){t&&t.pendingBranch?p(e)?t.effects.push(...e):t.effects.push(e):rr(e)}function $o(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,uo(r,i))}function es(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var L=Symbol.for(`v-fgt`),ts=Symbol.for(`v-txt`),ns=Symbol.for(`v-cmt`),rs=Symbol.for(`v-stc`),is=[],as=null;function R(e=!1){is.push(as=e?null:[])}function os(){is.pop(),as=is[is.length-1]||null}var ss=1;function cs(e,t=!1){ss+=e,e<0&&as&&t&&(as.hasOnce=!0)}function ls(e){return e.dynamicChildren=ss>0?as||i:null,os(),ss>0&&as&&as.push(e),e}function z(e,t,n,r,i,a){return ls(V(e,t,n,r,i,a,!0))}function B(e,t,n,r,i){return ls(H(e,t,n,r,i,!0))}function us(e){return e?e.__v_isVNode===!0:!1}function ds(e,t){return e.type===t.type&&e.key===t.key}function fs(e){}var ps=({key:e})=>e??null,ms=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:y(e)||un(e)||v(e)?{i:dr,r:e,k:t,f:!!n}:e);function V(e,t=null,n=null,r=0,i=null,a=e===L?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ps(t),ref:t&&ms(t),scopeId:fr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:dr};return s?(xs(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=y(n)?8:16),ss>0&&!o&&as&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&as.push(c),c}var H=hs;function hs(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===ia)&&(e=ns),us(e)){let r=_s(e,t,!0);return n&&xs(r,n),ss>0&&!a&&as&&(r.shapeFlag&6?as[as.indexOf(e)]=r:as.push(r)),r.patchFlag=-2,r}if(Ks(e)&&(e=e.__vccOpts),t){t=gs(t);let{class:e,style:n}=t;e&&!y(e)&&(t.class=k(e)),x(n)&&(an(n)&&!p(n)&&(n=l({},n)),t.style=he(n))}let o=y(e)?1:Ho(e)?128:Nr(e)?64:x(e)?4:v(e)?2:0;return V(e,t,n,r,i,o,a,!0)}function gs(e){return e?an(e)||mo(e)?l({},e):e:null}function _s(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?G(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ps(l),ref:t&&t.ref?n&&a?p(a)?a.concat(ms(t)):[a,ms(t)]:ms(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==L?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_s(e.ssContent),ssFallback:e.ssFallback&&_s(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ii(u,c.clone(u)),u}function U(e=` `,t=0){return H(ts,null,e,t)}function vs(e,t){let n=H(rs,null,e);return n.staticCount=t,n}function W(e=``,t=!1){return t?(R(),B(ns,null,e)):H(ns,null,e)}function ys(e){return e==null||typeof e==`boolean`?H(ns):p(e)?H(L,null,e.slice()):us(e)?bs(e):H(ts,null,String(e))}function bs(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_s(e)}function xs(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(p(t))n=16;else if(typeof t==`object`)if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),xs(e,n()),n._c&&(n._d=!0));return}else{n=32;let r=t._;!r&&!mo(t)?t._ctx=dr:r===3&&dr&&(dr.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else v(t)?(t={default:t,_ctx:dr},n=32):(t=String(t),r&64?(n=16,t=[U(t)]):n=8);e.children=t,e.shapeFlag|=n}function G(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];for(let e in r)if(e===`class`)t.class!==r.class&&(t.class=k([t.class,r.class]));else if(e===`style`)t.style=he([t.style,r.style]);else if(s(e)){let n=t[e],i=r[e];i&&n!==i&&!(p(n)&&n.includes(i))?t[e]=n?[].concat(n,i):i:i==null&&n==null&&!c(e)&&(t[e]=i)}else e!==``&&(t[e]=r[e])}return t}function Ss(e,t,n,r=null){Un(e,t,7,[n,r])}var Cs=qa(),ws=0;function Ts(e,t,n){let i=e.type,a=(t?t.appContext:e.appContext)||Cs,o={uid:ws++,vnode:e,type:i,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Me(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:[``,0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bo(i,a),emitsOptions:to(i,a),emit:null,emitted:null,propsDefaults:r,inheritAttrs:i.inheritAttrs,ctx:r,data:r,props:r,attrs:r,slots:r,refs:r,setupState:r,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=$a.bind(null,o),e.ce&&e.ce(o),o}var Es=null,Ds=()=>Es||dr,Os,ks;{let e=pe(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Os=t(`__VUE_INSTANCE_SETTERS__`,e=>Es=e),ks=t(`__VUE_SSR_SETTERS__`,e=>Ns=e)}var As=e=>{let t=Es;return Os(e),e.scope.on(),()=>{e.scope.off(),Os(t)}},js=()=>{Es&&Es.scope.off(),Os(null)};function Ms(e){return e.vnode.shapeFlag&4}var Ns=!1;function Ps(e,t=!1,n=!1){t&&ks(t);let{props:r,children:i}=e.vnode,a=Ms(e);ho(e,r,a,t),Oo(e,i,n||t);let o=a?Fs(e,t):void 0;return t&&ks(!1),o}function Fs(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ha);let{setup:r}=n;if(r){tt();let n=e.setupContext=r.length>1?Us(e):null,i=As(e),a=Hn(r,e,0,[e.props,n]),o=S(a);if(nt(),i(),(o||e.sp)&&!ji(e)&&si(e),o){if(a.then(js,js),t)return a.then(n=>{Is(e,n,t)}).catch(t=>{Wn(t,e,0)});e.asyncDep=a}else Is(e,a,t)}else Vs(e,t)}function Is(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(e.setupState=_n(t)),Vs(e,n)}var Ls,Rs;function zs(e){Ls=e,Rs=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,ga))}}var Bs=()=>!Ls;function Vs(e,t,n){let r=e.type;if(!e.render){if(!t&&Ls&&!r.render){let t=r.template||La(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=l(l({isCustomElement:n,delimiters:a},i),o);r.render=Ls(t,s)}}e.render=r.render||a,Rs&&Rs(e)}{let t=As(e);tt();try{Na(e)}finally{nt(),t()}}}var Hs={get(e,t){return ft(e,`get`,``),e[t]}};function Us(e){return{attrs:new Proxy(e.attrs,Hs),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ws(e){return e.exposed?e.exposeProxy||=new Proxy(_n(sn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in pa)return pa[n](e)},has(e,t){return t in e||t in pa}}):e.proxy}function Gs(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}function Ks(e){return v(e)&&`__vccOpts`in e}var K=(e,t)=>En(e,t,Ns);function qs(e,t,n){try{cs(-1);let r=arguments.length;return r===2?x(t)&&!p(t)?us(t)?H(e,null,[t]):H(e,t):H(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&us(n)&&(n=[n]),H(e,t,n))}finally{cs(1)}}function Js(){return;function e(t,n,r){let i=t[r];if(p(i)&&i.includes(n)||x(i)&&n in i||t.extends&&e(t.extends,n,r)||t.mixins&&t.mixins.some(t=>e(t,n,r)))return!0}}function Ys(e,t,n,r){let i=n[r];if(i&&Xs(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function Xs(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e<n.length;e++)if(O(n[e],t[e]))return!1;return ss>0&&as&&as.push(e),!0}var Zs=`3.5.35`,Qs=a,$s=Vn,ec=cr,tc=ur,nc={createComponentInstance:Ts,setupComponent:Ps,renderComponentRoot:ro,setCurrentRenderingInstance:pr,isVNode:us,normalizeVNode:ys,getComponentPublicInstance:Ws,ensureValidVNode:ua,pushWarningContext:Ln,popWarningContext:Rn},rc=void 0,ic=typeof window<`u`&&window.trustedTypes;if(ic)try{rc=ic.createPolicy(`vue`,{createHTML:e=>e})}catch{}var ac=rc?e=>rc.createHTML(e):e=>e,oc=`http://www.w3.org/2000/svg`,sc=`http://www.w3.org/1998/Math/MathML`,cc=typeof document<`u`?document:null,lc=cc&&cc.createElement(`template`),uc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?cc.createElementNS(oc,e):t===`mathml`?cc.createElementNS(sc,e):n?cc.createElement(e,{is:n}):cc.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>cc.createTextNode(e),createComment:e=>cc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>cc.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{lc.innerHTML=ac(r===`svg`?`<svg>${e}</svg>`:r===`mathml`?`<math>${e}</math>`:e);let i=lc.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},dc=`transition`,fc=`animation`,pc=Symbol(`_vtc`),mc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hc=l({},Yr,mc),gc=(e=>(e.displayName=`Transition`,e.props=hc,e))((e,{slots:t})=>qs($r,yc(e),t)),_c=(e,t=[])=>{p(e)?e.forEach(e=>e(...t)):e&&e(...t)},vc=e=>e?p(e)?e.some(e=>e.length>1):e.length>1:!1;function yc(e){let t={};for(let n in e)n in mc||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:c=a,appearActiveClass:u=o,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=bc(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,ee=(e,t,n,r)=>{e._enterCancelled=r,Cc(e,t?d:s),Cc(e,t?u:o),n&&n()},E=(e,t)=>{e._isLeaving=!1,Cc(e,f),Cc(e,m),Cc(e,p),t&&t()},te=e=>(t,n)=>{let i=e?w:y,o=()=>ee(t,e,n);_c(i,[t,o]),wc(()=>{Cc(t,e?c:a),Sc(t,e?d:s),vc(i)||Ec(t,r,g,o)})};return l(t,{onBeforeEnter(e){_c(v,[e]),Sc(e,a),Sc(e,o)},onBeforeAppear(e){_c(C,[e]),Sc(e,c),Sc(e,u)},onEnter:te(!1),onAppear:te(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>E(e,t);Sc(e,f),e._enterCancelled?(Sc(e,p),Ac(e)):(Ac(e),Sc(e,p)),wc(()=>{e._isLeaving&&(Cc(e,f),Sc(e,m),vc(x)||Ec(e,r,_,n))}),_c(x,[e,n])},onEnterCancelled(e){ee(e,!1,void 0,!0),_c(b,[e])},onAppearCancelled(e){ee(e,!0,void 0,!0),_c(T,[e])},onLeaveCancelled(e){E(e),_c(S,[e])}})}function bc(e){if(e==null)return null;if(x(e))return[xc(e.enter),xc(e.leave)];{let t=xc(e);return[t,t]}}function xc(e){return de(e)}function Sc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[pc]||(e[pc]=new Set)).add(t)}function Cc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[pc];n&&(n.delete(t),n.size||(e[pc]=void 0))}function wc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Tc=0;function Ec(e,t,n,r){let i=e._endId=++Tc,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=Dc(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u<c&&d()},s+1),e.addEventListener(l,f)}function Dc(e,t){let n=window.getComputedStyle(e),r=e=>(n[e]||``).split(`, `),i=r(`${dc}Delay`),a=r(`${dc}Duration`),o=Oc(i,a),s=r(`${fc}Delay`),c=r(`${fc}Duration`),l=Oc(s,c),u=null,d=0,f=0;t===dc?o>0&&(u=dc,d=o,f=a.length):t===fc?l>0&&(u=fc,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?dc:fc:null,f=u?u===dc?a.length:c.length:0);let p=u===dc&&/\b(?:transform|all)(?:,|$)/.test(r(`${dc}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Oc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((t,n)=>kc(t)+kc(e[n])))}function kc(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Ac(e){return(e?e.ownerDocument:document).body.offsetHeight}function jc(e,t,n){let r=e[pc];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Mc=Symbol(`_vod`),Nc=Symbol(`_vsh`),Pc={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Mc]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):Fc(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Fc(e,!0),r.enter(e)):r.leave(e,()=>{Fc(e,!1)}):Fc(e,t))},beforeUnmount(e,{value:t}){Fc(e,t)}};function Fc(e,t){e.style.display=t?e[Mc]:`none`,e[Nc]=!t}function Ic(){Pc.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var Lc=Symbol(``);function Rc(e){let t=Ds();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>Bc(e,n))},r=()=>{let r=e(t.proxy);t.ce?Bc(t.ce,r):zc(t.subTree,r),n(r)};qi(()=>{rr(r)}),Ki(()=>{Dr(r,a,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),Xi(()=>e.disconnect())})}function zc(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{zc(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Bc(e.el,t);else if(e.type===L)e.children.forEach(e=>zc(e,t));else if(e.type===rs){let{el:n,anchor:r}=e;for(;n&&(Bc(n,t),n!==r);)n=n.nextSibling}}function Bc(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=Ae(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[Lc]=r}}var Vc=/(?:^|;)\s*display\s*:/;function Hc(e,t,n){let r=e.style,i=y(n),a=!1;if(n&&!i){if(t)if(y(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??Wc(r,t,``)}else for(let e in t)n[e]??Wc(r,e,``);for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?Wc(r,i,``):Jc(e,i,!y(t)&&t?t[i]:void 0,o)||Wc(r,i,o)}}else if(i){if(t!==n){let e=r[Lc];e&&(n+=`;`+e),r.cssText=n,a=Vc.test(n)}}else t&&e.removeAttribute(`style`);Mc in e&&(e[Mc]=a?r.display:``,e[Nc]&&(r.display=`none`))}var Uc=/\s*!important$/;function Wc(e,t,n){if(p(n))n.forEach(n=>Wc(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=qc(e,t);Uc.test(n)?e.setProperty(ae(r),n.replace(Uc,``),`important`):e[r]=n}}var Gc=[`Webkit`,`Moz`,`ms`],Kc={};function qc(e,t){let n=Kc[t];if(n)return n;let r=D(t);if(r!==`filter`&&r in e)return Kc[t]=r;r=oe(r);for(let n=0;n<Gc.length;n++){let i=Gc[n]+r;if(i in e)return Kc[t]=i}return t}function Jc(e,t,n,r){return e.tagName===`TEXTAREA`&&(t===`width`||t===`height`)&&y(r)&&n===r}var Yc=`http://www.w3.org/1999/xlink`;function Xc(e,t,n,r,i,a=Se(t)){r&&t.startsWith(`xlink:`)?n==null?e.removeAttributeNS(Yc,t.slice(6,t.length)):e.setAttributeNS(Yc,t,n):n==null||a&&!Ce(n)?e.removeAttribute(t):e.setAttribute(t,a?``:b(n)?String(n):n)}function Zc(e,t,n,r,i){if(t===`innerHTML`||t===`textContent`){n!=null&&(e[t]=t===`innerHTML`?ac(n):n);return}let a=e.tagName;if(t===`value`&&a!==`PROGRESS`&&!a.includes(`-`)){let r=a===`OPTION`?e.getAttribute(`value`)||``:e.value,i=n==null?e.type===`checkbox`?`on`:``:String(n);(r!==i||!(`_value`in e))&&(e.value=i),n??e.removeAttribute(t),e._value=n;return}let o=!1;if(n===``||n==null){let r=typeof e[t];r===`boolean`?n=Ce(n):n==null&&r===`string`?(n=``,o=!0):r===`number`&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(i||t)}function Qc(e,t,n,r){e.addEventListener(t,n,r)}function $c(e,t,n,r){e.removeEventListener(t,n,r)}var el=Symbol(`_vei`);function tl(e,t,n,r,i=null){let a=e[el]||(e[el]={}),o=a[t];if(r&&o)o.value=r;else{let[n,s]=rl(t);r?Qc(e,n,a[t]=sl(r,i),s):o&&($c(e,n,o,s),a[t]=void 0)}}var nl=/(?:Once|Passive|Capture)$/;function rl(e){let t;if(nl.test(e)){t={};let n;for(;n=e.match(nl);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===`:`?e.slice(3):ae(e.slice(2)),t]}var il=0,al=Promise.resolve(),ol=()=>il||=(al.then(()=>il=0),Date.now());function sl(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(p(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;n<i.length&&!e._stopped;n++){let e=i[n];e&&Un(e,t,5,a)}}else Un(r,t,5,[e])};return n.value=e,n.attached=ol(),n}var cl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ll=(e,t,n,r,i,a)=>{let o=i===`svg`;t===`class`?jc(e,r,o):t===`style`?Hc(e,n,r):s(t)?c(t)||tl(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):ul(e,t,r,o))?(Zc(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&Xc(e,t,r,o,a,t!==`value`)):e._isVueCE&&(dl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!y(r)))?Zc(e,D(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),Xc(e,t,r,o))};function ul(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&cl(t)&&v(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return cl(t)&&y(n)?!1:t in e}function dl(e,t){let n=e._def.props;if(!n)return!1;let r=D(t);return Array.isArray(n)?n.some(e=>D(e)===r):Object.keys(n).some(e=>D(e)===r)}var fl={};function pl(e,t,n){let r=P(e,t);ee(r)&&(r=l({},r,t));class i extends gl{constructor(e){super(r,e,n)}}return i.def=r,i}var ml=((e,t)=>pl(e,t,ou)),hl=typeof HTMLElement<`u`?HTMLElement:class{},gl=class e extends hl{constructor(e,t={},n=au){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==au?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(l({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,$n(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e<this.attributes.length;e++)this._setAttr(this.attributes[e].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!p(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=de(this._props[e])),(i||=Object.create(null))[D(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)f(this,e)||Object.defineProperty(this,e,{get:()=>M(t[e])})}_resolveProps(e){let{props:t}=e,n=p(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(D))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):fl,r=D(e);t&&this._numberProps&&this._numberProps[r]&&(n=de(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===fl?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(ae(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(ae(e),t+``):t||this.removeAttribute(ae(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),ru(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=H(this._def,l(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,ee(t[0])?l({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),ae(e)!==e&&t(ae(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t<e.childNodes.length;t++){let n=e.childNodes[t];if(!(n instanceof HTMLStyleElement))return n}return null}_parseSlots(){let e=this._slots={},t;for(;t=this.firstChild;){let n=t.nodeType===1&&t.getAttribute(`slot`)||`default`;(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){let e=this._getSlots(),t=this._instance.type.__scopeId;for(let n=0;n<e.length;n++){let r=e[n],i=r.getAttribute(`name`)||`default`,a=this._slots[i],o=r.parentNode;if(a)for(let e of a){if(t&&e.nodeType===1){let n=t+`-s`,r=document.createTreeWalker(e,1);e.setAttribute(n,``);let i;for(;i=r.nextNode();)i.setAttribute(n,``)}o.insertBefore(e,r)}else for(;r.firstChild;)o.insertBefore(r.firstChild,r);o.removeChild(r)}}_getSlots(){let e=[this];this._teleportTargets&&e.push(...this._teleportTargets);let t=new Set;for(let n of e){let e=n.querySelectorAll(`slot`);for(let n=0;n<e.length;n++)t.add(e[n])}return Array.from(t)}_injectChildStyle(e,t){this._applyStyles(e.styles,e,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_hasShadowRoot(){return this._def.shadowRoot!==!1}_removeChildStyle(e){}};function _l(e){let t=Ds();return t&&t.ce||null}function vl(){let e=_l();return e&&e.shadowRoot}function yl(e=`$style`){{let t=Ds();if(!t)return r;let n=t.type.__cssModules;return n&&n[e]||r}}var bl=new WeakMap,xl=new WeakMap,Sl=Symbol(`_moveCb`),Cl=Symbol(`_enterCb`),wl=(e=>(delete e.props.mode,e))({name:`TransitionGroup`,props:l({},hc,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Ds(),r=qr(),i,a;return Ji(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!kl(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(Tl),i.forEach(El);let r=i.filter(Dl);Ac(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Sc(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Sl]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Sl]=null,Cc(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=on(e),s=yc(o),c=o.tag||L;if(i=[],a)for(let e=0;e<a.length;e++){let t=a[e];t.el&&t.el instanceof Element&&(i.push(t),ii(t,ti(t,s,r,n)),bl.set(t,Ol(t.el)))}a=t.default?ai(t.default()):[];for(let e=0;e<a.length;e++){let t=a[e];t.key!=null&&ii(t,ti(t,s,r,n))}return H(c,null,a)}}});function Tl(e){let t=e.el;t[Sl]&&t[Sl](),t[Cl]&&t[Cl]()}function El(e){xl.set(e,Ol(e.el))}function Dl(e){let t=bl.get(e),n=xl.get(e),r=t.left-n.left,i=t.top-n.top;if(r||i){let t=e.el,n=t.style,a=t.getBoundingClientRect(),o=1,s=1;return t.offsetWidth&&(o=a.width/t.offsetWidth),t.offsetHeight&&(s=a.height/t.offsetHeight),(!Number.isFinite(o)||o===0)&&(o=1),(!Number.isFinite(s)||s===0)&&(s=1),Math.abs(o-1)<.01&&(o=1),Math.abs(s-1)<.01&&(s=1),n.transform=n.webkitTransform=`translate(${r/o}px,${i/s}px)`,n.transitionDuration=`0s`,e}}function Ol(e){let t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function kl(e,t,n){let r=e.cloneNode(),i=e[pc];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=Dc(r);return a.removeChild(r),o}var Al=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return p(t)?e=>ce(t,e):t};function jl(e){e.target.composing=!0}function Ml(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Nl=Symbol(`_assign`);function Pl(e,t,n){return t&&(e=e.trim()),n&&(e=ue(e)),e}var Fl={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[Nl]=Al(i);let a=r||i.props&&i.props.type===`number`;Qc(e,t?`change`:`input`,t=>{t.target.composing||e[Nl](Pl(e.value,n,a))}),(n||a)&&Qc(e,`change`,()=>{e.value=Pl(e.value,n,a)}),t||(Qc(e,`compositionstart`,jl),Qc(e,`compositionend`,Ml),Qc(e,`change`,Ml))},mounted(e,{value:t}){e.value=t??``},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Nl]=Al(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?ue(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},Il={deep:!0,created(e,t,n){e[Nl]=Al(n),Qc(e,`change`,()=>{let t=e._modelValue,n=Vl(e),r=e.checked,i=e[Nl];if(p(t)){let e=Ee(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(h(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(Hl(e,r))})},mounted:Ll,beforeUpdate(e,t,n){e[Nl]=Al(n),Ll(e,t,n)}};function Ll(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(p(t))i=Ee(t,r.props.value)>-1;else if(h(t))i=t.has(r.props.value);else{if(t===n)return;i=Te(t,Hl(e,!0))}e.checked!==i&&(e.checked=i)}var Rl={created(e,{value:t},n){e.checked=Te(t,n.props.value),e[Nl]=Al(n),Qc(e,`change`,()=>{e[Nl](Vl(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[Nl]=Al(r),t!==n&&(e.checked=Te(t,r.props.value))}},zl={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=h(t);Qc(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?ue(Vl(e)):Vl(e));e[Nl](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,$n(()=>{e._assigning=!1})}),e[Nl]=Al(r)},mounted(e,{value:t}){Bl(e,t)},beforeUpdate(e,t,n){e[Nl]=Al(n)},updated(e,{value:t}){e._assigning||Bl(e,t)}};function Bl(e,t){let n=e.multiple,r=p(t);if(!(n&&!r&&!h(t))){for(let i=0,a=e.options.length;i<a;i++){let a=e.options[i],o=Vl(a);if(n)if(r){let e=typeof o;e===`string`||e===`number`?a.selected=t.some(e=>String(e)===String(o)):a.selected=Ee(t,o)>-1}else a.selected=t.has(o);else if(Te(Vl(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Vl(e){return`_value`in e?e._value:e.value}function Hl(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var Ul={created(e,t,n){Gl(e,t,n,null,`created`)},mounted(e,t,n){Gl(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){Gl(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){Gl(e,t,n,r,`updated`)}};function Wl(e,t){switch(e){case`SELECT`:return zl;case`TEXTAREA`:return Fl;default:switch(t){case`checkbox`:return Il;case`radio`:return Rl;default:return Fl}}}function Gl(e,t,n,r,i){let a=Wl(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function Kl(){Fl.getSSRProps=({value:e})=>({value:e}),Rl.getSSRProps=({value:e},t)=>{if(t.props&&Te(t.props.value,e))return{checked:!0}},Il.getSSRProps=({value:e},t)=>{if(p(e)){if(t.props&&Ee(e,t.props.value)>-1)return{checked:!0}}else if(h(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Ul.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=Wl(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var ql=[`ctrl`,`shift`,`alt`,`meta`],Jl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>ql.some(n=>e[`${n}Key`]&&!t.includes(n))},Yl=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e<t.length;e++){let r=Jl[t[e]];if(r&&r(n,t))return}return e(n,...r)}))},Xl={esc:`escape`,space:` `,up:`arrow-up`,left:`arrow-left`,right:`arrow-right`,down:`arrow-down`,delete:`backspace`},Zl=(e,t)=>{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=ae(n.key);if(t.some(e=>e===r||Xl[e]===r))return e(n)}))},Ql=l({patchProp:ll},uc),$l,eu=!1;function tu(){return $l||=jo(Ql)}function nu(){return $l=eu?$l:Mo(Ql),eu=!0,$l}var ru=((...e)=>{tu().render(...e)}),iu=((...e)=>{nu().hydrate(...e)}),au=((...e)=>{let t=tu().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=cu(e);if(!r)return;let i=t._component;!v(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,su(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),ou=((...e)=>{let t=nu().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=cu(e);if(t)return n(t,!0,su(t))},t});function su(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function cu(e){return y(e)?document.querySelector(e):e}var lu=!1,uu=()=>{lu||(lu=!0,Kl(),Ic())},du=t({BaseTransition:()=>$r,BaseTransitionPropsValidators:()=>Yr,Comment:()=>ns,DeprecationTypes:()=>null,EffectScope:()=>Me,ErrorCodes:()=>Bn,ErrorTypeStrings:()=>$s,Fragment:()=>L,KeepAlive:()=>Fi,ReactiveEffect:()=>Re,Static:()=>rs,Suspense:()=>Wo,Teleport:()=>Hr,Text:()=>ts,TrackOpTypes:()=>Dn,Transition:()=>gc,TransitionGroup:()=>wl,TriggerOpTypes:()=>On,VueElement:()=>gl,assertNumber:()=>zn,callWithAsyncErrorHandling:()=>Un,callWithErrorHandling:()=>Hn,camelize:()=>D,capitalize:()=>oe,cloneVNode:()=>_s,compatUtils:()=>null,compile:()=>fu,computed:()=>K,createApp:()=>au,createBlock:()=>B,createCommentVNode:()=>W,createElementBlock:()=>z,createElementVNode:()=>V,createHydrationRenderer:()=>Mo,createPropsRestProxy:()=>Aa,createRenderer:()=>jo,createSSRApp:()=>ou,createSlots:()=>la,createStaticVNode:()=>vs,createTextVNode:()=>U,createVNode:()=>H,customRef:()=>yn,defineAsyncComponent:()=>Mi,defineComponent:()=>P,defineCustomElement:()=>pl,defineEmits:()=>va,defineExpose:()=>ya,defineModel:()=>Sa,defineOptions:()=>ba,defineProps:()=>_a,defineSSRCustomElement:()=>ml,defineSlots:()=>xa,devtools:()=>ec,effect:()=>Ze,effectScope:()=>Ne,getCurrentInstance:()=>Ds,getCurrentScope:()=>Pe,getCurrentWatcher:()=>Mn,getTransitionRawChildren:()=>ai,guardReactiveProps:()=>gs,h:()=>qs,handleError:()=>Wn,hasInjectionContext:()=>xr,hydrate:()=>iu,hydrateOnIdle:()=>Ti,hydrateOnInteraction:()=>ki,hydrateOnMediaQuery:()=>Oi,hydrateOnVisible:()=>Di,initCustomFormatter:()=>Js,initDirectivesForSSR:()=>uu,inject:()=>br,isMemoSame:()=>Xs,isProxy:()=>an,isReactive:()=>tn,isReadonly:()=>nn,isRef:()=>un,isRuntimeOnly:()=>Bs,isShallow:()=>rn,isVNode:()=>us,markRaw:()=>sn,mergeDefaults:()=>Oa,mergeModels:()=>ka,mergeProps:()=>G,nextTick:()=>$n,nodeOps:()=>uc,normalizeClass:()=>k,normalizeProps:()=>be,normalizeStyle:()=>he,onActivated:()=>Li,onBeforeMount:()=>Gi,onBeforeUnmount:()=>Yi,onBeforeUpdate:()=>qi,onDeactivated:()=>Ri,onErrorCaptured:()=>ea,onMounted:()=>Ki,onRenderTracked:()=>$i,onRenderTriggered:()=>Qi,onScopeDispose:()=>Fe,onServerPrefetch:()=>Zi,onUnmounted:()=>Xi,onUpdated:()=>Ji,onWatcherCleanup:()=>Nn,openBlock:()=>R,patchProp:()=>ll,popScopeId:()=>hr,provide:()=>yr,proxyRefs:()=>_n,pushScopeId:()=>mr,queuePostFlushCb:()=>rr,reactive:()=>Xt,readonly:()=>Qt,ref:()=>j,registerRuntimeCompiler:()=>zs,render:()=>ru,renderList:()=>F,renderSlot:()=>I,resolveComponent:()=>ra,resolveDirective:()=>oa,resolveDynamicComponent:()=>aa,resolveFilter:()=>null,resolveTransitionHooks:()=>ti,setBlockTracking:()=>cs,setDevtoolsHook:()=>tc,setTransitionHooks:()=>ii,shallowReactive:()=>Zt,shallowReadonly:()=>$t,shallowRef:()=>dn,ssrContextKey:()=>Sr,ssrUtils:()=>nc,stop:()=>Qe,toDisplayString:()=>A,toHandlerKey:()=>se,toHandlers:()=>da,toRaw:()=>on,toRef:()=>Cn,toRefs:()=>bn,toValue:()=>hn,transformVNodeArgs:()=>fs,triggerRef:()=>mn,unref:()=>M,useAttrs:()=>Ta,useCssModule:()=>yl,useCssVars:()=>Rc,useHost:()=>_l,useId:()=>oi,useModel:()=>Za,useSSRContext:()=>Cr,useShadowRoot:()=>vl,useSlots:()=>wa,useTemplateRef:()=>ci,useTransitionState:()=>qr,vModelCheckbox:()=>Il,vModelDynamic:()=>Ul,vModelRadio:()=>Rl,vModelSelect:()=>zl,vModelText:()=>Fl,vShow:()=>Pc,version:()=>Zs,warn:()=>Qs,watch:()=>Dr,watchEffect:()=>wr,watchPostEffect:()=>Tr,watchSyncEffect:()=>Er,withAsyncContext:()=>ja,withCtx:()=>N,withDefaults:()=>Ca,withDirectives:()=>_r,withKeys:()=>Zl,withMemo:()=>Ys,withModifiers:()=>Yl,withScopeId:()=>gr}),fu=()=>{},pu=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},mu=e=>e===``,hu=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),gu=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),_u=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),vu=e=>{let t=_u(e);return t.charAt(0).toUpperCase()+t.slice(1)},yu={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`},bu=({name:e,iconNode:t,absoluteStrokeWidth:n,"absolute-stroke-width":r,strokeWidth:i,"stroke-width":a,size:o=yu.width,color:s=yu.stroke,...c},{slots:l})=>qs(`svg`,{...yu,...c,width:o,height:o,stroke:s,"stroke-width":mu(n)||mu(r)||n===!0||r===!0?Number(i||a||yu[`stroke-width`])*24/Number(o):i||a||yu[`stroke-width`],class:hu(`lucide`,c.class,...e?[`lucide-${gu(vu(e))}-icon`,`lucide-${gu(e)}`]:[`lucide-icon`]),...!l.default&&!pu(c)&&{"aria-hidden":`true`}},[...t.map(e=>qs(...e)),...l.default?[l.default()]:[]]),q=(e,t)=>(n,{slots:r,attrs:i})=>qs(bu,{...i,...n,iconNode:t,name:e},r),xu=q(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Su=q(`asterisk`,[[`path`,{d:`M12 6v12`,key:`1vza4d`}],[`path`,{d:`M17.196 9 6.804 15`,key:`1ah31z`}],[`path`,{d:`m6.804 9 10.392 6`,key:`1b6pxd`}]]),Cu=q(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),wu=q(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),Tu=q(`book-plus`,[[`path`,{d:`M12 7v6`,key:`lw1j43`}],[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}],[`path`,{d:`M9 10h6`,key:`9gxzsh`}]]),Eu=q(`book-text`,[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}],[`path`,{d:`M8 11h8`,key:`vwpz6n`}],[`path`,{d:`M8 7h6`,key:`1f0q6e`}]]),Du=q(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Ou=q(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ku=q(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Au=q(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ju=q(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),Mu=q(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Nu=q(`circle-dot`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}]]),Pu=q(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Fu=q(`clock-alert`,[[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}],[`path`,{d:`M20 12v5`,key:`12wsvk`}],[`path`,{d:`M20 21h.01`,key:`1p6o6n`}],[`path`,{d:`M21.25 8.2A10 10 0 1 0 16 21.16`,key:`17fp9f`}]]),Iu=q(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),Lu=q(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),Ru=q(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),zu=q(`eraser`,[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]),Bu=q(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Vu=q(`file-braces`,[[`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:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),Hu=q(`file-code`,[[`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:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),Uu=q(`file-down`,[[`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`}]]),Wu=q(`file-text`,[[`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:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Gu=q(`flag`,[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]),Ku=q(`folder-search`,[[`path`,{d:`M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1`,key:`1bw5m7`}],[`path`,{d:`m21 21-1.9-1.9`,key:`1g2n9r`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}]]),qu=q(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Ju=q(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Yu=q(`image-off`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),Xu=q(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Zu=q(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Qu=q(`languages`,[[`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`}]]),$u=q(`list-filter`,[[`path`,{d:`M2 5h20`,key:`1fs1ex`}],[`path`,{d:`M6 12h12`,key:`8npq4p`}],[`path`,{d:`M9 19h6`,key:`456am0`}]]),ed=q(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),td=q(`lock`,[[`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`}]]),nd=q(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),rd=q(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),id=q(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),ad=q(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),od=q(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),sd=q(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),cd=q(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),ld=q(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),ud=q(`ruler`,[[`path`,{d:`M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z`,key:`icamh8`}],[`path`,{d:`m14.5 12.5 2-2`,key:`inckbg`}],[`path`,{d:`m11.5 9.5 2-2`,key:`fmmyf7`}],[`path`,{d:`m8.5 6.5 2-2`,key:`vc6u1g`}],[`path`,{d:`m17.5 15.5 2-2`,key:`wo5hmg`}]]),dd=q(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),fd=q(`scan-search`,[[`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`}]]),pd=q(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),md=q(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),hd=q(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),gd=q(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),_d=q(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),vd=q(`smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),yd=q(`sparkles`,[[`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`}]]),bd=q(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),xd=q(`sticky-note`,[[`path`,{d:`M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z`,key:`1dfntj`}],[`path`,{d:`M15 3v5a1 1 0 0 0 1 1h5`,key:`6s6qgf`}]]),Sd=q(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Cd=q(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),wd=q(`tags`,[[`path`,{d:`M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z`,key:`16rjxf`}],[`path`,{d:`M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193`,key:`178nd4`}],[`circle`,{cx:`10.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`12ikhr`}]]),Td=q(`trash-2`,[[`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`}]]),Ed=q(`triangle-alert`,[[`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`}]]),Dd=q(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),Od=q(`upload`,[[`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`}]]),kd=q(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),Ad=q(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),jd=q(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]);async function J(e){if(!e.ok)throw Error((await e.json().catch(()=>({}))).error??e.statusText);return e.json()}var Md=()=>fetch(`/api/state`).then(e=>J(e)),Nd=(e,t,n)=>fetch(`/api/keys`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({key:e,value:t,...n?{plural:n}:{}})}).then(J),Pd=e=>fetch(`/api/keys/${encodeURIComponent(e)}`,{method:`DELETE`}).then(J),Fd=(e,t)=>fetch(`/api/keys/bulk-clear`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e,locales:t})}).then(J),Id=e=>fetch(`/api/keys/bulk-delete`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e})}).then(J),Ld=(e,t,n)=>fetch(`/api/keys/bulk-state`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e,locales:t,state:n})}).then(J),Rd=(e,t)=>fetch(`/api/keys/bulk-meta`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({keys:e,...t})}).then(J),zd=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(J),Bd=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/values/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({value:n})}).then(J),Vd=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/values/${encodeURIComponent(t)}/state`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({state:n})}).then(J),Hd=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/values/${encodeURIComponent(t)}`,{method:`DELETE`}).then(J),Ud=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/plural/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({forms:n})}).then(J),Wd=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/plural`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({arg:t})}).then(J),Gd=e=>fetch(`/api/keys/${encodeURIComponent(e)}/plural`,{method:`DELETE`}).then(J),Kd=e=>fetch(`/api/translate`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>J(e)),qd=e=>fetch(`/api/translate/estimate`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>J(e)),Jd=()=>fetch(`/api/batch/status`).then(e=>J(e)),Yd=e=>fetch(`/api/batch/translate`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>J(e)),Xd=()=>fetch(`/api/batch/apply`,{method:`POST`}).then(e=>J(e)),Zd=()=>fetch(`/api/batch/cancel`,{method:`POST`}).then(e=>J(e));async function*Qd(e,t,n){let r,i={};t?.length&&(i.keys=t),n?.length&&(i.locales=n);try{r=await fetch(`/api/translate/stream`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(i),signal:e})}catch(e){if(e.name===`AbortError`)return;throw e}if(!r.ok||!r.body)throw Error(r.statusText);let a=r.body.getReader(),o=new TextDecoder,s=``,c=`message`;try{for(;;){let e;try{e=await a.read()}catch(e){if(e.name===`AbortError`)return;throw e}if(e.done)break;s+=o.decode(e.value,{stream:!0});let t=s.split(`
4
+ `);s=t.pop()??``;for(let e of t){if(e.startsWith(`event:`)){c=e.slice(6).trim();continue}e.startsWith(`data:`)&&(yield{...JSON.parse(e.slice(5).trim()),type:c},c=`message`)}}}finally{a.cancel().catch(()=>{})}}async function*$d(e,t){let n;try{n=await fetch(`/api/context/build`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e),signal:t})}catch(e){if(e.name===`AbortError`)return;throw e}if(!n.ok||!n.body)throw Error(n.statusText);let r=n.body.getReader(),i=new TextDecoder,a=``,o=`message`;try{for(;;){let e;try{e=await r.read()}catch(e){if(e.name===`AbortError`)return;throw e}if(e.done)break;a+=i.decode(e.value,{stream:!0});let t=a.split(`
5
+ `);a=t.pop()??``;for(let e of t){if(e.startsWith(`event:`)){o=e.slice(6).trim();continue}if(e.startsWith(`data:`)){let t=JSON.parse(e.slice(5).trim());if(o===`error`)throw Error(t.error??`Unknown error`);yield{...t,type:o},o=`message`}}}}finally{r.cancel().catch(()=>{})}}var ef=()=>fetch(`/api/scan`,{method:`POST`}).then(e=>J(e)),tf=()=>fetch(`/api/scan`).then(e=>J(e)),nf=e=>fetch(`/api/scan/usage?key=${encodeURIComponent(e)}`).then(e=>J(e)),rf=()=>fetch(`/api/scan/used`).then(e=>J(e)),af=e=>fetch(`/api/config`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(J),of=()=>fetch(`/api/ui-prefs`).then(e=>J(e)),sf=e=>fetch(`/api/ui-prefs`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(J),cf=()=>fetch(`/api/local-settings`).then(e=>J(e)),lf=e=>fetch(`/api/local-settings`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(J),uf=()=>fetch(`/api/ai-profiles`).then(e=>J(e)),df=(e,t)=>fetch(`/api/ai-profiles/${encodeURIComponent(e)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}).then(J),ff=e=>fetch(`/api/ai-profiles/${encodeURIComponent(e)}`,{method:`DELETE`}).then(J),pf=e=>fetch(`/api/ai-profiles/active`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({name:e})}).then(J),mf=e=>fetch(`/api/dictionary`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({word:e})}).then(J),hf=()=>fetch(`/api/glossary`).then(e=>J(e)),gf=e=>fetch(`/api/glossary`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(J),_f=e=>fetch(`/api/glossary/${encodeURIComponent(e)}`,{method:`DELETE`}).then(J),vf=(e,t)=>{let n=new FormData;return n.append(`file`,t),fetch(`/api/keys/${encodeURIComponent(e)}/screenshot`,{method:`POST`,body:n}).then(J)},yf=e=>fetch(`/api/keys/${encodeURIComponent(e)}/screenshot`,{method:`DELETE`}).then(J),bf=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/notes`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({text:t})}).then(e=>J(e)),xf=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/notes/${encodeURIComponent(t)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({text:n})}).then(J),Sf=(e,t)=>fetch(`/api/keys/${encodeURIComponent(e)}/notes/${encodeURIComponent(t)}`,{method:`DELETE`}).then(J),Cf=()=>fetch(`/api/log`).then(e=>J(e)),wf=()=>fetch(`/api/export/preview`).then(e=>J(e)),Tf=()=>fetch(`/api/export`,{method:`POST`}).then(e=>J(e)),Ef=()=>fetch(`/api/file`).then(e=>J(e)),Df=()=>fetch(`/api/files`).then(e=>J(e)),Of=e=>fetch(`/api/file`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({path:e})}).then(e=>J(e)),kf=e=>e.length===0?Promise.resolve({issues:[],spellPending:!1}):fetch(`/api/checks?checks=${e.join(`,`)}`).then(e=>J(e)),Af=(e={})=>fetch(`/api/lint${e.includeSuppressed?`?includeSuppressed=1`:``}`).then(e=>J(e)),jf=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/suppressions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({rule:t,locale:n})}).then(J),Mf=(e,t,n)=>fetch(`/api/keys/${encodeURIComponent(e)}/suppressions?rule=${encodeURIComponent(t)}&locale=${encodeURIComponent(n)}`,{method:`DELETE`}).then(J),Nf=(e={})=>fetch(`/api/lint/accept`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>J(e)),Pf=()=>fetch(`/api/import/detect`).then(e=>J(e)),Ff=e=>fetch(`/api/import`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}).then(e=>J(e));function If(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function Lf(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):i}return o.updateDeps=e=>{r=e},o}function Rf(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var zf=(e,t)=>Math.abs(e-t)<1.01,Bf=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},Vf,Hf=()=>{if(Vf!==void 0)return Vf;if(typeof navigator>`u`)return Vf=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return Vf=!0;let e=navigator.maxTouchPoints;return Vf=navigator.platform===`MacIntel`&&e!==void 0&&e>0},Uf=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},Wf=e=>e,Gf=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},Kf=(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(Uf(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(Uf(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},qf={passive:!0},Jf=typeof window>`u`?!0:`onscrollend`in window,Yf=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&Jf,o=0,s=a?null:Bf(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,qf),a&&r.addEventListener(`scrollend`,u,qf),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u)}},Xf=(e,t)=>Yf(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),Zf=(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`]},Qf=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},$f=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>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:Wf,rangeExtractor:Gf,onChange:()=>{},measureElement:Zf,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=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){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>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=e.start+t;n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=Lf(()=>(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=()=>{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,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}if(this.scrollElement=e,this.scrollElement&&`ownerDocument`in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=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)=>{this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!Hf()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,qf),e.addEventListener(`touchend`,n,qf),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(Hf()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},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.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let a=r.get(t.lane);if(a==null||t.end>a.end?r.set(t.lane,t):t.end<a.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=Lf(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,a,o)=>(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}),{key:!1}),this.getMeasurements=Lf(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o},s)=>{let c=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=this.options.gap,a=e*2,o=this._flatMeasurements;if(!o||o.length<a){let e=new Float64Array(a);o&&l>0&&e.set(o.subarray(0,l*2)),o=e,this._flatMeasurements=o}let s;if(l===0)s=t+n;else{let e=l-1;s=o[e*2]+o[e*2+1]+i}for(let t=l;t<e;t++){let e=r(t),n=c.get(e),a=typeof n==`number`?n:this.options.estimateSize(t);o[t*2]=s,o[t*2+1]=a,s+=a+i}let u=If(e,o,r);return this.measurementsCache=u,u}let u=this.measurementsCache.slice(0,l),d=Array(a).fill(void 0);for(let e=0;e<l;e++){let t=u[e];t&&(d[t.lane]=e)}for(let i=l;i<e;i++){let e=r(i),a=this.laneAssignments.get(i),s,l,f=o===`estimate`||c.has(e);if(a!==void 0&&this.options.lanes>1){s=a;let e=d[s],r=e===void 0?void 0:u[e];l=r?r.end+this.options.gap:t+n}else{let e=this.options.lanes===1?u[i-1]:this.getFurthestMeasurement(u,i);l=e?e.end+this.options.gap:t+n,s=e?e.lane:i%this.options.lanes,this.options.lanes>1&&f&&this.laneAssignments.set(i,s)}let p=c.get(e),m=typeof p==`number`?p:this.options.estimateSize(i),h=l+m;u[i]={index:i,start:l,size:m,end:h,key:e,lane:s},d[s]=i}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Lf(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?tp({measurements:e,outerSize:t,scrollOffset:n,lanes:r,flat:r===1&&this._flatMeasurements!=null?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Lf(()=>{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]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{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(!this.scrollState||this.scrollState.behavior!==`smooth`)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),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)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(e<0||e>=this.options.count)return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=t-(this.itemSizeCache.get(i)??n);if(o!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,c=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?r<this.getScrollOffset()+this.scrollAdjustments&&this.scrollDirection!==`backward`:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},o,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):c&&this.applyScrollAdjustment(o),this.notify(!1)}},this.getVirtualItems=Lf(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return Rf(t[ep(0,t.length-1,r?e=>n[e*2]:e=>Rf(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`)if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t];if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),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`}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},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,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;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})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){e!==0&&(Hf()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&zf(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},ep=(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 tp({measurements:e,outerSize:t,scrollOffset:n,lanes:r,flat:i}){let a=e.length-1,o=i?e=>i[e*2]:t=>e[t].start,s=i?e=>i[e*2]+i[e*2+1]:t=>e[t].end;if(e.length<=r)return{startIndex:0,endIndex:a};let c=ep(0,a,o,n),l=c;if(r===1)for(;l<a&&s(l)<n+t;)l++;else if(r>1){let i=Array(r).fill(0);for(;l<a&&i.some(e=>e<n+t);){let t=e[l];i[t.lane]=t.end,l++}let o=Array(r).fill(n+t);for(;c>=0&&o.some(e=>e>=n);){let t=e[c];o[t.lane]=t.start,c--}c=Math.max(0,c-c%r),l=Math.min(a,l+(r-1-l%r))}return{startIndex:c,endIndex:l}}function np(e){let t=new $f(M(e)),n=dn(t),r=t._didMount();return Dr(()=>M(e).getScrollElement(),e=>{e&&t._willUpdate()},{immediate:!0}),Dr(()=>M(e),e=>{t.setOptions({...e,onChange:(t,r)=>{var i;mn(n),(i=e.onChange)==null||i.call(e,t,r)}}),t._willUpdate(),mn(n)},{immediate:!0}),Fe(r),n}function rp(e){return np(K(()=>({observeElementRect:Kf,observeElementOffset:Xf,scrollToFn:Qf,...M(e)})))}function ip(e,t){let n=e.values[t];return n?e.plural?(n.forms?.other??``).trim()===``:(n.value??``).trim()===``:!0}function ap(e,t,n,r){return n===`missing`?r?ip(t,r):e.config.locales.some(n=>n!==e.config.sourceLocale&&ip(t,n)):r?t.values[r]?.state===n:Object.values(t.values).some(e=>e.state===n)}function op(e){try{return new RegExp(e,`i`)}catch{return null}}function sp(e,t,n,r){let i=t.text.trim(),a=i.length>=2&&i.startsWith(`"`)&&i.endsWith(`"`)?i.slice(1,-1).toLowerCase():null,o=a===null&&i.startsWith(`^`)?op(i):null,s=i.toLowerCase();return Object.keys(e.keys).sort().filter(c=>{let l=e.keys[c];if(t.tag&&!(l.tags??[]).includes(t.tag)||t.needsAttention&&(n?.get(c)?.length??0)===0||t.aiContextUnreviewed&&l.contextSource!==`ai`||t.emptySource&&!ip(l,e.config.sourceLocale)||t.noUsages&&r&&r.has(c)||t.skipTranslate&&!l.skipTranslate)return!1;if(t.plurality?.length){let e=l.plural?`plural`:`single`;if(!t.plurality.includes(e))return!1}if(t.states.length&&!t.states.some(n=>ap(e,l,n,t.locale)))return!1;if(t.issues.length){let e=(n?.get(c)??[]).filter(e=>!t.locale||e.locale===t.locale),r=new Set(e.map(e=>e.check));if(!t.issues.some(e=>r.has(e)))return!1}if(i){if(a!==null){if(c.toLowerCase()!==a)return!1}else if(i.startsWith(`^`)){if(!o||!o.test(c))return!1}else if(!(c+` `+(l.context??``)+` `+(l.tags??[]).join(` `)+` `+Object.values(l.values).map(e=>e.value).join(` `)).toLowerCase().includes(s))return!1}return!0})}var cp=[`untranslated`,`placeholder`,`spelling`,`length`,`glossary`],lp=[`untranslated`,`placeholder`,`length`,`glossary`],up=[`missing`,`machine`,`needs-review`,`reviewed`],dp=[`plural`,`single`],fp={untranslated:`Untranslated`,placeholder:`Placeholder mismatch`,spelling:`Spelling`,length:`Too long`,glossary:`Glossary`},pp={missing:`Missing`,machine:`Machine`,reviewed:`Reviewed`,"needs-review":`Needs review`},mp={plural:`Plural`,single:`Single`};function hp(e){let t=new Map;for(let n of e){let e=t.get(n.key);e?e.push(n):t.set(n.key,[n])}return t}var gp=[`key-asc`,`key-desc`,`created`,`updated`],_p=[`multilingual`,`bilingual`],vp={text:``,states:[],issues:[],plurality:[],tag:``,needsAttention:!1,emptySource:!1,aiContextUnreviewed:!1,noUsages:!1,skipTranslate:!1};function yp(e){let t=e.get(`q`)??``,n=e.get(`tag`)??``,r=(e.get(`states`)??``).split(`,`).map(e=>e.trim()).filter(e=>up.includes(e)),i=(e.get(`issues`)??``).split(`,`).map(e=>e.trim()).filter(e=>cp.includes(e)),a=(e.get(`plurality`)??``).split(`,`).map(e=>e.trim()).filter(e=>dp.includes(e)),o=e.get(`sort`)??``,s=gp.includes(o)?o:`key-asc`,c=e.get(`view`)??``,l=_p.includes(c)?c:`multilingual`,u=e.get(`locale`)??``;return{filter:{...vp,text:t,tag:n,states:r,issues:i,plurality:a,needsAttention:e.get(`attention`)===`1`,emptySource:e.get(`emptySource`)===`1`,aiContextUnreviewed:e.get(`aiContext`)===`1`,noUsages:e.get(`noUsages`)===`1`,skipTranslate:e.get(`skipTranslate`)===`1`},sort:s,view:l,locale:u}}function bp(e){let t=new URLSearchParams,{filter:n,sort:r,view:i,locale:a}=e;return n.text&&t.set(`q`,n.text),n.tag&&t.set(`tag`,n.tag),n.states.length&&t.set(`states`,n.states.join(`,`)),n.issues.length&&t.set(`issues`,n.issues.join(`,`)),n.plurality.length&&t.set(`plurality`,n.plurality.join(`,`)),n.needsAttention&&t.set(`attention`,`1`),n.emptySource&&t.set(`emptySource`,`1`),n.aiContextUnreviewed&&t.set(`aiContext`,`1`),n.noUsages&&t.set(`noUsages`,`1`),n.skipTranslate&&t.set(`skipTranslate`,`1`),r!==`key-asc`&&t.set(`sort`,r),i!==`multilingual`&&t.set(`view`,i),i===`bilingual`&&a&&t.set(`locale`,a),t}var xp=[`editor`,`analytics`,`glossary`,`screenshots`,`settings`,`activity`,`docs`];function Sp(){let e=location.hash.replace(/^#\/?/,``),t=e.indexOf(`?`),n=t===-1?e:e.slice(0,t),r=t===-1?``:e.slice(t+1);return{route:xp.includes(n)?n:`editor`,search:r}}var Cp=j(Sp().route);window.addEventListener(`hashchange`,()=>{Cp.value=Sp().route});var wp=null;function Tp(e){wp=e}function Ep(e){wp&&!wp(e)||(location.hash=e)}function Dp(){return Qt(Cp)}function Op(){return new URLSearchParams(Sp().search)}function kp(e){let t=e.toString(),n=`#${Sp().route}${t?`?${t}`:``}`;history.replaceState(null,``,n)}var Ap=j(null);function jp(e){Ap.value=e,Ep(`editor`)}var Mp=j(null);function Np(e){Mp.value=e,jp({text:e})}function Pp(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=Pp(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Fp(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pp(e))&&(r&&(r+=` `),r+=t);return r}var Ip=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Lp=Fp,Rp=(e,t)=>n=>{if(t?.variants==null)return Lp(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=Ip(t)||Ip(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 Lp(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)};function zp(e){return typeof e==`string`?`'${e}'`:new Bp().serialize(e)}var Bp=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}();function Vp(e,t){return e===t||zp(e)===zp(t)}function Hp(e,t,n){let r=e.findIndex(e=>Vp(e,t)),i=e.findIndex(e=>Vp(e,n));if(r===-1||i===-1)return[];let[a,o]=[r,i].sort((e,t)=>e-t);return e.slice(a,o+1)}function Up(e,t=-1/0,n=1/0){return Math.min(n,Math.max(t,e))}function Wp(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n);return[t=>{let n=br(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(yr(r,e),e)]}function Gp(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Kp(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function qp(e){return e==null}function Jp(e,t){let n=dn();return wr(()=>{n.value=e()},{...t,flush:t?.flush??`sync`}),Qt(n)}function Yp(e,t){return Pe()?(Fe(e,t),!0):!1}function Xp(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return Yp(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}function Zp(e){let t=!1,n,r=Ne(!0);return((...i)=>(t||=(n=r.run(()=>e(...i)),!0),n))}var Qp=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var $p=e=>e!==void 0,em=Object.prototype.toString,tm=e=>em.call(e)===`[object Object]`,nm=rm();function rm(){var e,t;return Qp&&!!(!((e=window)==null||(e=e.navigator)==null)&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function im(e){return Array.isArray(e)?e:[e]}function am(e){return e||Ds()}function om(e){if(!Qp)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=Ne(!0),n=r.run(()=>e(...a))),Yp(i),n))}function sm(e){return Xt(un(e)?new Proxy({},{get(t,n,r){return M(Reflect.get(e.value,n,r))},set(t,n,r){return un(e.value[n])&&!un(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}}):e)}function cm(e){return sm(K(e))}function lm(e,...t){let n=t.flat(),r=n[0];return cm(()=>Object.fromEntries(typeof r==`function`?Object.entries(bn(e)).filter(([e,t])=>!r(hn(t),e)):Object.entries(bn(e)).filter(e=>!n.includes(e[0]))))}function um(e,t=1e4){return yn((n,r)=>{let i=hn(e),a,o=()=>setTimeout(()=>{i=hn(e),r()},hn(t));return Yp(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function dm(e,t){am(t)&&Yi(e,t)}function fm(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=dn(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},hn(t))}return r&&(a.value=!0,Qp&&l()),Yp(c),{isPending:$t(a),start:l,stop:c}}function pm(e,t,n){return Dr(e,t,{...n,immediate:!0})}var mm=Qp?window:void 0;Qp&&window.document,Qp&&window.navigator,Qp&&window.location;function hm(e){let t=hn(e);return t?.$el??t}function gm(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=K(()=>{let t=im(hn(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return pm(()=>[n.value?.map(e=>hm(e))??[mm].filter(e=>e!=null),im(hn(n.value?e[1]:e[0])),im(M(n.value?e[2]:e[1])),hn(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=tm(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function _m(){let e=dn(!1),t=Ds();return t&&Ki(()=>{e.value=!0},t),e}function vm(e){let t=_m();return K(()=>(t.value,!!e()))}function ym(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function bm(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=mm,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=ym(t);return gm(i,a,e=>{e.repeat&&hn(s)||c(e)&&n(e)},o)}function xm(e){return JSON.parse(JSON.stringify(e))}function Sm(e,t,n={}){let{window:r=mm,...i}=n,a,o=vm(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=Dr(K(()=>{let t=hn(e);return Array.isArray(t)?t.map(e=>hm(e)):[hm(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return Yp(l),{isSupported:o,stop:l}}function Cm(e,t,n,r={}){var i,a;let{clone:o=!1,passive:s=!1,eventName:c,deep:l=!1,defaultValue:u,shouldEmit:d}=r,f=Ds(),p=n||f?.emit||(f==null||(i=f.$emit)==null?void 0:i.bind(f))||(f==null||(a=f.proxy)==null||(a=a.$emit)==null?void 0:a.bind(f?.proxy)),m=c;t||=`modelValue`,m||=`update:${t.toString()}`;let h=e=>o?typeof o==`function`?o(e):xm(e):e,g=()=>$p(e[t])?h(e[t]):u,_=e=>{d?d(e)&&p(m,e):p(m,e)};if(s){let n=j(g()),r=!1;return Dr(()=>e[t],e=>{r||(r=!0,n.value=h(e),$n(()=>r=!1))}),Dr(n,n=>{!r&&(n!==e[t]||l)&&_(n)},{deep:l}),n}else return K({get(){return g()},set(e){_(e)}})}function wm(e){return e?e.flatMap(e=>e.type===L?wm(e.children):[e]):[]}var Tm=[`INPUT`,`TEXTAREA`];function Em(e,t,n,r={}){if(!t||r.enableIgnoredElement&&Tm.includes(t.nodeName))return null;let{arrowKeyOptions:i=`both`,attributeName:a=`[data-reka-collection-item]`,itemsArray:o=[],loop:s=!0,dir:c=`ltr`,preventScroll:l=!0,focus:u=!1}=r,[d,f,p,m,h,g]=[e.key===`ArrowRight`,e.key===`ArrowLeft`,e.key===`ArrowUp`,e.key===`ArrowDown`,e.key===`Home`,e.key===`End`],_=p||m,v=d||f;if(!h&&!g&&(!_&&!v||i===`vertical`&&v||i===`horizontal`&&_))return null;let y=n?Array.from(n.querySelectorAll(a)):o;if(!y.length)return null;l&&e.preventDefault();let b=null;return v||_?b=Dm(y,t,{goForward:_?m:c===`ltr`?d:f,loop:s}):h?b=y.at(0)||null:g&&(b=y.at(-1)||null),u&&b?.focus(),b}function Dm(e,t,n,r=e.includes(t)?e.length:e.length+1){if(--r===0)return null;let i=e.indexOf(t),a;if(a=i===-1?n.goForward?0:e.length-1:n.goForward?i+1:i-1,!n.loop&&(a<0||a>=e.length))return null;let o=e[(a+e.length)%e.length];return o?o.hasAttribute(`disabled`)&&o.getAttribute(`disabled`)!==`false`?Dm(e,o,n,r):o:null}var[Om,km]=Wp(`ConfigProvider`);function Am(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 jm(e,t,n=`.`,r){if(!Am(t))return jm(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:Am(a)&&Am(i[t])?i[t]=jm(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Mm(e){return(...t)=>t.reduce((t,n)=>jm(t,n,``,e),{})}var Nm=Mm(),Pm=om(()=>{let e=j(new Map),t=j(),n=K(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=Om({scrollBody:j(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,document.body.style.pointerEvents=``,document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,nm&&i?.(),t.value=void 0};return Dr(n,(e,o)=>{if(!Qp)return;if(!e){o&&a();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value==`object`?Nm({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),nm&&(i=gm(document,`touchmove`,e=>Lm(e),{passive:!1})),$n(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function Fm(e){let t=Math.random().toString(36).substring(2,7),n=Pm();n.value.set(t,e??!1);let r=K({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return dm(()=>{n.value.delete(t)}),r}function Im(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!(t instanceof Element)||t.tagName===`BODY`?!1:Im(t)}}function Lm(e){let t=e||window.event,n=t.target;return n instanceof Element&&Im(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function Rm(e){let t=j(!1);function n(){t.value=!0}function r(n){$n(()=>{t.value=!1,e?.(n)})}return{isComposing:t,handleCompositionStart:n,handleCompositionEnd:r}}function zm(e){let t=Om({dir:j(`ltr`)});return K(()=>e?.value||t.dir?.value||`ltr`)}function Bm(e){let t=Ds(),n=t?.type.emits,r={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{r[se(D(t))]=(...n)=>e(t,...n)}),r}function Vm(e){let t=K(()=>M(e)),n=K(()=>new Intl.Collator(`en`,{usage:`search`,...t.value}));return{startsWith:(e,t)=>t.length===0?!0:(e=e.normalize(`NFC`),t=t.normalize(`NFC`),n.value.compare(e.slice(0,t.length),t)===0),endsWith:(e,t)=>t.length===0?!0:(e=e.normalize(`NFC`),t=t.normalize(`NFC`),n.value.compare(e.slice(-t.length),t)===0),contains:(e,t)=>{if(t.length===0)return!0;e=e.normalize(`NFC`),t=t.normalize(`NFC`);let r=0,i=t.length;for(;r+i<=e.length;r++){let a=e.slice(r,r+i);if(n.value.compare(t,a)===0)return!0}return!1}}}var Hm=0;function Um(){wr(e=>{if(!Qp)return;let t=document.querySelectorAll(`[data-reka-focus-guard]`);document.body.insertAdjacentElement(`afterbegin`,t[0]??Wm()),document.body.insertAdjacentElement(`beforeend`,t[1]??Wm()),Hm++,e(()=>{Hm===1&&document.querySelectorAll(`[data-reka-focus-guard]`).forEach(e=>e.remove()),Hm--})})}function Wm(){let e=document.createElement(`span`);return e.setAttribute(`data-reka-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}function Gm(e){return K(()=>hn(e)?!!hm(e)?.closest(`form`):!0)}function Y(){let e=Ds(),t=j(),n=K(()=>r());Ji(()=>{n.value!==r()&&mn(t)});function r(){return t.value&&`$el`in t.value&&[`#text`,`#comment`].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:hm(t)}let i=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(i).length>0)for(let e in i)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>i[e]});Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){if(t.value=n,n&&(Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),!(n instanceof Element)&&!Object.hasOwn(n,`$el`))){let t=n.$.exposed,r=Object.assign({},a);for(let e in t)Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>t[e]});e.exposed=r}}return{forwardRef:o,currentRef:t,currentElement:n}}function Km(e){let t=Ds(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),r=Cn(e);return K(()=>{let e={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{e[D(t)]=i[t]}),Object.keys({...n,...e}).reduce((e,t)=>(r.value[t]!==void 0&&(e[t]=r.value[t]),e),{})})}function qm(e,t){let n=Km(e),r=t?Bm(t):{};return K(()=>({...n.value,...r}))}function Jm(e,t){let n=um(!1,300);Yp(()=>{n.value=!1});let r=j(null),i=Xp();function a(){r.value=null,n.value=!1}function o(e,t){if(!t)return;let i=e.currentTarget,a={x:e.clientX,y:e.clientY},o=Xm(a,Ym(a,i.getBoundingClientRect()),1),s=Zm(t.getBoundingClientRect());r.value=$m([...o,...s]),n.value=!0}return wr(n=>{if(e.value&&t.value){let r=e=>o(e,t.value),i=t=>o(t,e.value);e.value.addEventListener(`pointerleave`,r),t.value.addEventListener(`pointerleave`,i),n(()=>{e.value?.removeEventListener(`pointerleave`,r),t.value?.removeEventListener(`pointerleave`,i)})}}),wr(n=>{if(r.value){let o=n=>{if(!r.value||!(n.target instanceof Element))return;let o=n.target,s={x:n.clientX,y:n.clientY},c=e.value?.contains(o)||t.value?.contains(o),l=!Qm(s,r.value),u=!!o.closest(`[data-grace-area-trigger]`);c?a():(l||u)&&(a(),i.trigger())};e.value?.ownerDocument.addEventListener(`pointermove`,o),n(()=>e.value?.ownerDocument.removeEventListener(`pointermove`,o))}}),{isPointerInTransit:n,onPointerExit:i.on}}function Ym(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Xm(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Zm(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Qm(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function $m(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),eh(t)}function eh(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t.at(-1),n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n.at(-1),t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var th=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},nh=new WeakMap,rh=new WeakMap,ih={},ah=0,oh=function(e){return e&&(e.host||oh(e.parentNode))},sh=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=oh(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},ch=function(e,t,n,r){var i=sh(t,Array.isArray(e)?e:[e]);ih[n]||(ih[n]=new WeakMap);var a=ih[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(nh.get(e)||0)+1,l=(a.get(e)||0)+1;nh.set(e,c),a.set(e,l),o.push(e),c===1&&i&&rh.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),ah++,function(){o.forEach(function(e){var t=nh.get(e)-1,i=a.get(e)-1;nh.set(e,t),a.set(e,i),t||(rh.has(e)||e.removeAttribute(r),rh.delete(e)),i||e.removeAttribute(n)}),ah--,ah||(nh=new WeakMap,nh=new WeakMap,rh=new WeakMap,ih={})}},lh=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||th(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),ch(r,i,n,`aria-hidden`)):function(){return null}};function uh(e){let t;Dr(()=>hm(e),e=>{let n=!1;try{n=!!e?.closest(`[popover]:not(:popover-open)`)}catch{}e&&!n?t=lh(e):t&&t()}),Xi(()=>{t&&t()})}var dh=0;function fh(e,t=`reka`){if(e)return e;let n;return n=`useId`in du?oi?.():Om({useId:void 0}).useId?.()??`${++dh}`,t?`${t}-${n}`:n}function ph(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}function mh(e){let t=j(),n=K(()=>t.value?.width??0),r=K(()=>t.value?.height??0);return Ki(()=>{let n=hm(e);if(n){t.value={width:n.offsetWidth,height:n.offsetHeight};let e=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}});return e.observe(n,{box:`border-box`}),()=>e.unobserve(n)}else t.value=void 0}),{width:n,height:r}}function hh(e,t){let n=j(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}function gh(e){let t=um(``,1e3);return{search:t,handleTypeaheadSearch:(n,r)=>{if(t.value+=n,e)e(n);else{let e=Gp(),n=r.map(e=>({...e,textValue:e.value?.textValue??e.ref.textContent?.trim()??``})),i=n.find(t=>t.ref===e),a=vh(n.map(e=>e.textValue),t.value,i?.textValue),o=n.find(e=>e.textValue===a);return o&&o.ref.focus(),o?.ref}},resetTypeahead:()=>{t.value=``}}}function _h(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function vh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=_h(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function yh(e,t){let n=j({}),r=j(`none`),i=j(e),a=e.value?`mounted`:`unmounted`,o,s=t.value?.ownerDocument.defaultView??mm,{state:c,dispatch:l}=hh(a,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),u=e=>{if(Qp){let n=new CustomEvent(e,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(n)}};Dr(e,async(e,i)=>{let a=i!==e;if(await $n(),a){let a=r.value,o=bh(t.value);e?(l(`MOUNT`),u(`enter`),o===`none`&&u(`after-enter`)):o===`none`||o===`undefined`||n.value?.display===`none`?(l(`UNMOUNT`),u(`leave`),u(`after-leave`)):i&&a!==o?(l(`ANIMATION_OUT`),u(`leave`)):(l(`UNMOUNT`),u(`after-leave`))}},{immediate:!0});let d=e=>{let n=bh(t.value),r=n.includes(CSS.escape(e.animationName)),a=c.value===`mounted`?`enter`:`leave`;if(e.target===t.value&&r&&(u(`after-${a}`),l(`ANIMATION_END`),!i.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,o=s?.setTimeout(()=>{t.value?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}e.target===t.value&&n===`none`&&l(`ANIMATION_END`)},f=e=>{e.target===t.value&&(r.value=bh(t.value))},p=Dr(t,(e,t)=>{e?(n.value=getComputedStyle(e),e.addEventListener(`animationstart`,f),e.addEventListener(`animationcancel`,d),e.addEventListener(`animationend`,d)):(l(`ANIMATION_END`),o!==void 0&&s?.clearTimeout(o),t?.removeEventListener(`animationstart`,f),t?.removeEventListener(`animationcancel`,d),t?.removeEventListener(`animationend`,d))},{immediate:!0}),m=Dr(c,()=>{let e=bh(t.value);r.value=c.value===`mounted`?e:`none`});return Xi(()=>{p(),m()}),{isPresent:K(()=>[`mounted`,`unmountSuspended`].includes(c.value))}}function bh(e){return e&&getComputedStyle(e).animationName||`none`}var xh=P({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){let{present:r,forceMount:i}=bn(e),a=j(),{isPresent:o}=yh(r,a);n({present:o});let s=t.default({present:o.value});s=wm(s||[]);let c=Ds();if(s&&s?.length>1){let e=c?.parent?.type.name?`<${c.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(`
6
+ `)].join(`
7
+ `))}return()=>i.value||r.value||o.value?qs(t.default({present:o.value})[0],{ref:e=>{let t=hm(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}}),Sh=P({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=wm(n.default()),r=e.findIndex(e=>e.type!==ns);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?G(t,i.props):t,o=_s({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),Ch=[`area`,`img`,`input`],wh=P({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&Ch.includes(r)?()=>qs(r,t):r===`template`?()=>qs(Sh,t,{default:n.default}):()=>qs(e.as,t,{default:n.default})}});function Th(){let e=j();return{primitiveElement:e,currentElement:K(()=>[`#text`,`#comment`].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:hm(e))}}var[Eh,Dh]=Wp(`DialogRoot`),Oh=P({inheritAttrs:!1,__name:`DialogRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1,default:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=Cm(n,`open`,t,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=j(),a=j(),{modal:o}=bn(n);return Dh({open:r,modal:o,openModal:()=>{r.value=!0},onOpenChange:e=>{r.value=e},onOpenToggle:()=>{r.value=!r.value},contentId:``,titleId:``,descriptionId:``,triggerElement:i,contentElement:a}),(e,t)=>I(e.$slots,`default`,{open:M(r),close:()=>r.value=!1})}}),kh=P({__name:`DialogClose`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e;Y();let n=Eh();return(e,r)=>(R(),B(M(wh),G(t,{type:e.as===`button`?`button`:void 0,onClick:r[0]||=e=>M(n).onOpenChange(!1)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`type`]))}}),Ah=`dismissableLayer.pointerDownOutside`,jh=`dismissableLayer.focusOutside`;function Mh(e,t){if(!(t instanceof Element))return!1;let n=t.closest(`[data-dismissable-layer]`),r=e.dataset.dismissableLayer===``?e:e.querySelector(`[data-dismissable-layer]`),i=Array.from(e.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(n&&(r===n||i.indexOf(r)<i.indexOf(n)))}function Nh(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=j(!1),a=j(()=>{});return wr(o=>{if(!Qp||!hn(n))return;let s=async n=>{let o=n.target;if(!(!t?.value||!o)){if(Mh(t.value,o)){i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){Kp(Ah,e,t)}n.pointerType===`touch`?(r.removeEventListener(`click`,a.value),a.value=i,r.addEventListener(`click`,a.value,{once:!0})):i()}else r.removeEventListener(`click`,a.value);i.value=!1}},c=window.setTimeout(()=>{r.addEventListener(`pointerdown`,s)},0);o(()=>{window.clearTimeout(c),r.removeEventListener(`pointerdown`,s),r.removeEventListener(`click`,a.value)})}),{onPointerDownCapture:()=>{hn(n)&&(i.value=!0)}}}function Ph(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=j(!1);return wr(a=>{if(!Qp||!hn(n))return;let o=async n=>{if(!t?.value)return;await $n(),await $n();let r=n.target;!t.value||!r||Mh(t.value,r)||n.target&&!i.value&&Kp(jh,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{hn(n)&&(i.value=!0)},onBlurCapture:()=>{hn(n)&&(i.value=!1)}}}var Fh=Xt({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set}),Ih=P({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=Y(),o=K(()=>a.value?.ownerDocument??globalThis.document),s=K(()=>Fh.layersRoot),c=K(()=>a.value?Array.from(s.value).indexOf(a.value):-1),l=K(()=>Fh.layersWithOutsidePointerEventsDisabled.size>0),u=K(()=>{let e=Array.from(s.value),[t]=[...Fh.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return c.value>=n}),d=Nh(async e=>{let t=[...Fh.branches].some(t=>t?.contains(e.target));!u.value||t||(r(`pointerDownOutside`,e),r(`interactOutside`,e),await $n(),e.defaultPrevented||r(`dismiss`))},a),f=Ph(e=>{[...Fh.branches].some(t=>t?.contains(e.target))||(r(`focusOutside`,e),r(`interactOutside`,e),e.defaultPrevented||r(`dismiss`))},a);return bm(`Escape`,e=>{c.value===s.value.size-1&&(r(`escapeKeyDown`,e),e.defaultPrevented||r(`dismiss`))}),wr(e=>{a.value&&(n.disableOutsidePointerEvents&&(Fh.layersWithOutsidePointerEventsDisabled.size===0&&(Fh.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents=`none`),Fh.layersWithOutsidePointerEventsDisabled.add(a.value)),s.value.add(a.value),e(()=>{n.disableOutsidePointerEvents&&Fh.layersWithOutsidePointerEventsDisabled.size===1&&!qp(Fh.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=Fh.originalBodyPointerEvents)}))}),wr(e=>{e(()=>{a.value&&(s.value.delete(a.value),Fh.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(e,t)=>(R(),B(M(wh),{ref:M(i),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:he({pointerEvents:l.value?u.value?`auto`:`none`:void 0}),onFocusCapture:M(f).onFocusCapture,onBlurCapture:M(f).onBlurCapture,onPointerdownCapture:M(d).onPointerDownCapture},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),Lh=Zp(()=>j([]));function Rh(){let e=Lh();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=zh(e.value,t),e.value.unshift(t)},remove(t){e.value=zh(e.value,t),e.value[0]?.resume()}}}function zh(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}var Bh=`focusScope.autoFocusOnMount`,Vh=`focusScope.autoFocusOnUnmount`,Hh={bubbles:!1,cancelable:!0};function Uh(e,{select:t=!1}={}){let n=Gp();for(let r of e)if(Yh(r,{select:t}),Gp()!==n)return!0}function Wh(e){let t=Gh(e);return[Kh(t,e),Kh(t.reverse(),e)]}function Gh(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kh(e,t){for(let n of e)if(!qh(n,{upTo:t}))return n}function qh(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function Jh(e){return e instanceof HTMLInputElement&&`select`in e}function Yh(e,{select:t=!1}={}){if(e&&e.focus){let n=Gp();e.focus({preventScroll:!0}),e!==n&&Jh(e)&&t&&e.select()}}var Xh=P({__name:`FocusScope`,props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`mountAutoFocus`,`unmountAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{currentRef:i,currentElement:a}=Y(),o=j(null),s=Rh(),c=Xt({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});wr(e=>{if(!Qp)return;let t=a.value;if(!n.trapped)return;function r(e){if(c.paused||!t)return;let n=e.target;t.contains(n)?o.value=n:Yh(o.value,{select:!0})}function i(e){if(c.paused||!t)return;let n=e.relatedTarget;n!==null&&(t.contains(n)||Yh(o.value,{select:!0}))}function s(e){let n=o.value;n!==null&&e.some(e=>e.removedNodes.length>0)&&(t.contains(n)||Yh(t))}document.addEventListener(`focusin`,r),document.addEventListener(`focusout`,i);let l=new MutationObserver(s);t&&l.observe(t,{childList:!0,subtree:!0}),e(()=>{document.removeEventListener(`focusin`,r),document.removeEventListener(`focusout`,i),l.disconnect()})}),wr(async e=>{let t=a.value;if(await $n(),!t)return;s.add(c);let n=Gp();if(!t.contains(n)){let e=new CustomEvent(Bh,Hh);t.addEventListener(Bh,e=>r(`mountAutoFocus`,e)),t.dispatchEvent(e),e.defaultPrevented||(Uh(Gh(t),{select:!0}),Gp()===n&&Yh(t))}e(()=>{t.removeEventListener(Bh,e=>r(`mountAutoFocus`,e));let e=new CustomEvent(Vh,Hh),i=e=>{r(`unmountAutoFocus`,e)};t.addEventListener(Vh,i),t.dispatchEvent(e),t.setAttribute(`data-focus-scope-unmounting`,``),setTimeout(()=>{e.defaultPrevented||Yh(n??document.body,{select:!0}),t.removeEventListener(Vh,i),s.remove(c),t.removeAttribute(`data-focus-scope-unmounting`)},0)})});function l(e){if(!n.loop&&!n.trapped||c.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=Gp();if(t&&r){let t=e.currentTarget,[i,a]=Wh(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n.loop&&Yh(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n.loop&&Yh(a,{select:!0})):r===t&&e.preventDefault()}}return(e,t)=>(R(),B(M(wh),{ref_key:`currentRef`,ref:i,tabindex:`-1`,"as-child":e.asChild,as:e.as,onKeydown:l},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}}),Zh=`menu.itemSelect`,Qh=[`Enter`,` `],$h=[`ArrowDown`,`PageUp`,`Home`],eg=[`ArrowUp`,`PageDown`,`End`],tg=[...$h,...eg];[...Qh],[...Qh];function ng(e){return e?`open`:`closed`}function rg(e){let t=Gp();for(let n of e)if(n===t||(n.focus(),Gp()!==t))return}function ig(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function ag(e,t){return t?ig({x:e.clientX,y:e.clientY},t):!1}function og(e){return e.pointerType===`mouse`}var sg=P({__name:`DialogContentImpl`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Eh(),{forwardRef:a,currentElement:o}=Y();return i.titleId||=fh(void 0,`reka-dialog-title`),i.descriptionId||=fh(void 0,`reka-dialog-description`),Ki(()=>{i.contentElement=o,Gp()!==document.body&&(i.triggerElement.value=Gp())}),(e,t)=>(R(),B(M(Xh),{"as-child":``,loop:``,trapped:n.trapFocus,onMountAutoFocus:t[5]||=e=>r(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>r(`closeAutoFocus`,e)},{default:N(()=>[H(M(Ih),G({id:M(i).contentId,ref:M(a),as:e.as,"as-child":e.asChild,"disable-outside-pointer-events":e.disableOutsidePointerEvents,role:`dialog`,"aria-describedby":M(i).descriptionId,"aria-labelledby":M(i).titleId,"data-state":M(ng)(M(i).open.value)},e.$attrs,{onDismiss:t[0]||=e=>M(i).onOpenChange(!1),onEscapeKeyDown:t[1]||=e=>r(`escapeKeyDown`,e),onFocusOutside:t[2]||=e=>r(`focusOutside`,e),onInteractOutside:t[3]||=e=>r(`interactOutside`,e),onPointerDownOutside:t[4]||=e=>r(`pointerDownOutside`,e)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`as`,`as-child`,`disable-outside-pointer-events`,`aria-describedby`,`aria-labelledby`,`data-state`])]),_:3},8,[`trapped`]))}}),cg=P({__name:`DialogContentModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Eh(),a=Bm(r),{forwardRef:o,currentElement:s}=Y();return uh(s),(e,t)=>(R(),B(sg,G({...n,...M(a)},{ref:M(o),"trap-focus":M(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(e.preventDefault(),M(i).triggerElement.value?.focus())},onPointerDownOutside:t[1]||=e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()},onFocusOutside:t[2]||=e=>{e.preventDefault()}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),lg=P({__name:`DialogContentNonModal`,props:{forceMount:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=Bm(t);Y();let i=Eh(),a=j(!1),o=j(!1);return(e,t)=>(R(),B(sg,G({...n,...M(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{e.defaultPrevented||(a.value||M(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=e=>{e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;M(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),ug=P({__name:`DialogContent`,props:{forceMount:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Eh(),a=Bm(r),{forwardRef:o}=Y();return(e,t)=>(R(),B(M(xh),{present:e.forceMount||M(i).open.value},{default:N(()=>[M(i).modal.value?(R(),B(cg,G({key:0,ref:M(o)},{...n,...M(a),...e.$attrs}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)):(R(),B(lg,G({key:1,ref:M(o)},{...n,...M(a),...e.$attrs}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),dg=P({__name:`DialogDescription`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`p`}},setup(e){let t=e;Y();let n=Eh();return(e,r)=>(R(),B(M(wh),G(t,{id:M(n).descriptionId}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`]))}}),fg=P({__name:`DialogOverlayImpl`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Eh();return Fm(!0),Y(),(e,n)=>(R(),B(M(wh),{as:e.as,"as-child":e.asChild,"data-state":M(t).open.value?`open`:`closed`,style:{"pointer-events":`auto`},onPointerdown:n[0]||=Yl(()=>{},[`left`,`self`,`prevent`])},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`]))}}),pg=P({__name:`DialogOverlay`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Eh(),{forwardRef:n}=Y();return(e,r)=>M(t)?.modal.value?(R(),B(M(xh),{key:0,present:e.forceMount||M(t).open.value},{default:N(()=>[H(fg,G(e.$attrs,{ref:M(n),as:e.as,"as-child":e.asChild}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`as`,`as-child`])]),_:3},8,[`present`])):W(`v-if`,!0)}}),mg=P({__name:`Teleport`,props:{to:{type:null,required:!1,default:`body`},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=_m();return(e,n)=>M(t)||e.forceMount?(R(),B(Hr,{key:0,to:e.to,disabled:e.disabled,defer:e.defer},[I(e.$slots,`default`)],8,[`to`,`disabled`,`defer`])):W(`v-if`,!0)}}),hg=P({__name:`DialogPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(mg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),gg=P({__name:`DialogTitle`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`h2`}},setup(e){let t=e,n=Eh();return Y(),(e,r)=>(R(),B(M(wh),G(t,{id:M(n).titleId}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`]))}}),_g=`data-reka-collection-item`;function vg(e={}){let{key:t=``,isProvider:n=!1}=e,r=`${t}CollectionProvider`,i;n?(i={collectionRef:j(),itemMap:j(new Map)},yr(r,i)):i=br(r);let a=(e=!1)=>{let t=i.collectionRef.value;if(!t)return[];let n=Array.from(t.querySelectorAll(`[${_g}]`)),r=Array.from(i.itemMap.value.values()).sort((e,t)=>n.indexOf(e.ref)-n.indexOf(t.ref));return e?r:r.filter(e=>e.ref.dataset.disabled!==``)},o=P({name:`CollectionSlot`,inheritAttrs:!1,setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=Th();return Dr(a,()=>{i.collectionRef.value=a.value}),()=>qs(Sh,{ref:r,...n},t)}}),s=P({name:`CollectionItem`,inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(e,{slots:t,attrs:n}){let{primitiveElement:r,currentElement:a}=Th();return wr(t=>{if(a.value){let n=sn(a.value);i.itemMap.value.set(n,{ref:a.value,value:e.value}),t(()=>i.itemMap.value.delete(n))}}),()=>qs(Sh,{...n,[_g]:``,ref:r},t)}});return{getItems:a,reactiveItems:K(()=>Array.from(i.itemMap.value.values())),itemMapSize:K(()=>i.itemMap.value.size),CollectionSlot:o,CollectionItem:s}}var yg=P({__name:`VisuallyHidden`,props:{feature:{type:String,required:!1,default:`focusable`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(R(),B(M(wh),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature===`focusable`?`true`:void 0,"data-hidden":e.feature===`fully-hidden`?``:void 0,tabindex:e.feature===`fully-hidden`?`-1`:void 0,style:{position:`absolute`,border:0,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,wordWrap:`normal`,top:`-1px`,left:`-1px`}},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}}),bg=P({inheritAttrs:!1,__name:`VisuallyHiddenInputBubble`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=Th();return Dr(K(()=>t.checked??t.value),(e,t)=>{if(!r.value)return;let n=r.value,i=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(i,`value`).set;if(a&&e!==t){let t=new Event(`input`,{bubbles:!0}),r=new Event(`change`,{bubbles:!0});a.call(n,e),n.dispatchEvent(t),n.dispatchEvent(r)}}),(e,r)=>(R(),B(yg,G({ref_key:`primitiveElement`,ref:n},{...t,...e.$attrs},{as:`input`}),null,16))}}),xg=P({inheritAttrs:!1,__name:`VisuallyHiddenInput`,props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:`fully-hidden`}},setup(e){let t=e,n=K(()=>typeof t.value==`object`&&Array.isArray(t.value)&&t.value.length===0&&t.required),r=K(()=>typeof t.value==`string`||typeof t.value==`number`||typeof t.value==`boolean`||t.value===null||t.value===void 0?[{name:t.name,value:t.value}]:typeof t.value==`object`&&Array.isArray(t.value)?t.value.flatMap((e,n)=>typeof e==`object`?Object.entries(e).map(([e,r])=>({name:`${t.name}[${n}][${e}]`,value:r})):{name:`${t.name}[${n}]`,value:e}):t.value!==null&&typeof t.value==`object`&&!Array.isArray(t.value)?Object.entries(t.value).map(([e,n])=>({name:`${t.name}[${e}]`,value:n})):[]);return(e,i)=>(R(),z(L,null,[W(` We render single input if it's required `),n.value?(R(),B(bg,G({key:e.name},{...t,...e.$attrs},{name:e.name,value:e.value}),null,16,[`name`,`value`])):(R(!0),z(L,{key:1},F(r.value,n=>(R(),B(bg,G({key:n.name},{ref_for:!0},{...t,...e.$attrs},{name:n.name,value:n.value}),null,16,[`name`,`value`]))),128))],2112))}});function Sg(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>Cg(e,t,n)):Cg(e,t,n)}function Cg(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:Vp(e,t)}var wg=`rovingFocusGroup.onEntryFocus`,Tg={bubbles:!1,cancelable:!0},Eg={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Dg(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Og(e,t,n){let r=Dg(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Eg[r]}function kg(e,t=!1){let n=Gp();for(let r of e)if(r===n||(r.focus({preventScroll:t}),Gp()!==n))return}function Ag(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var[jg,Mg]=Wp(`ListboxRoot`),Ng=P({__name:`ListboxRoot`,props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:`vertical`},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:`toggle`},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`entryFocus`,`leave`],setup(e,{expose:t,emit:n}){let r=e,i=n,{multiple:a,highlightOnHover:o,orientation:s,disabled:c,selectionBehavior:l,dir:u}=bn(r),{getItems:d}=vg({isProvider:!0}),{handleTypeaheadSearch:f}=gh(),{primitiveElement:p,currentElement:m}=Th(),h=ph(),g=zm(u),_=Gm(m),v=j(),y=j(!1),b=j(!0),x=Cm(r,`modelValue`,i,{defaultValue:r.defaultValue??(a.value?[]:void 0),passive:r.modelValue===void 0,deep:!0});function S(e){if(y.value=!0,r.multiple){let t=Array.isArray(x.value)?[...x.value]:[],n=t.findIndex(t=>Cg(t,e,r.by));r.selectionBehavior===`toggle`?(n===-1?t.push(e):t.splice(n,1),x.value=t):(x.value=[e],v.value=e)}else r.selectionBehavior===`toggle`&&Cg(x.value,e,r.by)?x.value=void 0:x.value=e;setTimeout(()=>{y.value=!1},1)}let C=j(null),w=j(null),T=j(!1),ee=j(!1),E=Xp(),te=Xp(),ne=Xp();function re(){return d().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)}function D(e,t=!0,n){e&&(C.value=e,(n??b.value)&&C.value.focus(),t&&C.value.scrollIntoView({block:`nearest`}),i(`highlight`,d().find(t=>t.ref===e)))}function ie(e){if(T.value)ne.trigger(e);else{let t=d().find(t=>Cg(t.value,e,r.by));t&&(C.value=t.ref,D(t.ref))}}function ae(e){C.value&&C.value.isConnected&&(e.preventDefault(),e.stopPropagation(),ee.value||C.value.click())}function oe(e){if(b.value){if(y.value=!0,T.value)te.trigger(e);else{let t=e.altKey||e.ctrlKey||e.metaKey;if(t&&e.key===`a`&&a.value){let t=d();x.value=[...t.map(e=>e.value)],e.preventDefault();let n=t.at(-1);n&&D(n.ref)}else if(!t){let t=f(e.key,d());t&&D(t)}}setTimeout(()=>{y.value=!1},1)}}function se(){ee.value=!0}function O(){$n(()=>{ee.value=!1})}function ce(){$n(()=>{de(new KeyboardEvent(`keydown`,{key:`PageUp`}))})}function le(e){let t=C.value;t?.isConnected&&(w.value=t),C.value=null,i(`leave`,e)}function ue(e){let t=new CustomEvent(`listbox.entryFocus`,{bubbles:!1,cancelable:!0});if(e.currentTarget?.dispatchEvent(t),i(`entryFocus`,t),!t.defaultPrevented)if(w.value)D(w.value);else{let e=re()?.[0];D(e)}}function de(e){let t=Og(e,s.value,g.value);if(!t)return;let n=re();if(C.value){if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let e=n.indexOf(C.value);n=n.slice(e+1)}fe(e,n[0])}if(n.length){let e=!C.value&&t===`prev`?n.length-1:0;D(n[e])}if(T.value)return te.trigger(e)}function fe(e,t){if(!(T.value||r.selectionBehavior!==`replace`||!a.value||!Array.isArray(x.value))&&!((e.altKey||e.ctrlKey||e.metaKey)&&!e.shiftKey)&&e.shiftKey){let n=d().filter(e=>e.ref.dataset.disabled!==``),r=n.find(e=>e.ref===t)?.value;if(e.key===h.END?r=n.at(-1)?.value:e.key===h.HOME&&(r=n[0]?.value),!r||!v.value)return;x.value=Hp(n.map(e=>e.value),v.value,r)}}async function pe(e,t=!0){if(Qp)if(await $n(),T.value)E.trigger(e);else{let e=re(),n=e.find(e=>e.dataset.state===`checked`),r=t?void 0:!1;n?D(n,t,r):e.length&&D(e[0],t,r)}}let me=!1;return Dr(x,()=>{if(!y.value){let e=me;me=!0,$n(()=>{pe(void 0,e)})}},{immediate:!0,deep:!0}),t({highlightedElement:C,highlightItem:ie,highlightFirstItem:ce,highlightSelected:pe,getItems:d}),Mg({modelValue:x,onValueChange:S,multiple:a,orientation:s,dir:g,disabled:c,highlightOnHover:o,highlightedElement:C,isVirtual:T,virtualFocusHook:E,virtualKeydownHook:te,virtualHighlightHook:ne,by:r.by,firstValue:v,selectionBehavior:l,focusable:b,onLeave:le,onEnter:ue,changeHighlight:D,onKeydownEnter:ae,onKeydownNavigation:de,onKeydownTypeAhead:oe,onCompositionStart:se,onCompositionEnd:O,highlightFirstItem:ce}),(e,t)=>(R(),B(M(wh),{ref_key:`primitiveElement`,ref:p,as:e.as,"as-child":e.asChild,dir:M(g),"data-disabled":M(c)?``:void 0,onPointerleave:le,onFocusout:t[0]||=async e=>{let t=e.relatedTarget||e.target;await $n(),C.value&&M(m)&&!M(m).contains(t)&&le(e)}},{default:N(()=>[I(e.$slots,`default`,{modelValue:M(x)}),M(_)&&e.name?(R(),B(M(xg),{key:0,name:e.name,value:M(x),disabled:M(c),required:e.required},null,8,[`name`,`value`,`disabled`,`required`])):W(`v-if`,!0)]),_:3},8,[`as`,`as-child`,`dir`,`data-disabled`]))}}),Pg=P({__name:`ListboxContent`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{CollectionSlot:t}=vg(),n=jg(),r=um(!1,10);return(e,i)=>(R(),B(M(t),null,{default:N(()=>[H(M(wh),{role:`listbox`,as:e.as,"as-child":e.asChild,tabindex:M(n).focusable.value?M(n).highlightedElement.value?`-1`:`0`:`-1`,"aria-orientation":M(n).orientation.value,"aria-multiselectable":!!M(n).multiple.value,"data-orientation":M(n).orientation.value,onMousedown:i[0]||=Yl(e=>r.value=!0,[`left`]),onFocus:i[1]||=e=>{M(r)||M(n).onEnter(e)},onKeydown:[i[2]||=Zl(e=>{M(n).orientation.value===`vertical`&&(e.key===`ArrowLeft`||e.key===`ArrowRight`)||M(n).orientation.value===`horizontal`&&(e.key===`ArrowUp`||e.key===`ArrowDown`)||(e.preventDefault(),M(n).focusable.value&&M(n).onKeydownNavigation(e))},[`down`,`up`,`left`,`right`,`home`,`end`]),Zl(M(n).onKeydownEnter,[`enter`]),M(n).onKeydownTypeAhead]},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`tabindex`,`aria-orientation`,`aria-multiselectable`,`data-orientation`,`onKeydown`])]),_:3}))}}),Fg=P({__name:`ListboxFilter`,props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=Cm(n,`modelValue`,t,{defaultValue:``,passive:n.modelValue===void 0}),i=jg(),{primitiveElement:a,currentElement:o}=Th(),s=K(()=>n.disabled||i.disabled.value||!1),c=j();Er(()=>c.value=i.highlightedElement.value?.id),Ki(()=>{i.focusable.value=!1,setTimeout(()=>{n.autoFocus&&o.value?.focus()},1)}),Xi(()=>{i.focusable.value=!0});let{isComposing:l,handleCompositionStart:u,handleCompositionEnd:d}=Rm(e=>{r.value=e.target.value,i.onCompositionEnd(),i.highlightFirstItem()});function f(){i.onCompositionStart(),u()}function p(e){l.value||(r.value=e.target.value,i.highlightFirstItem())}function m(e){l.value||(e.preventDefault(),i.onKeydownNavigation(e))}function h(e){l.value||i.onKeydownEnter(e)}return(e,t)=>(R(),B(M(wh),{ref_key:`primitiveElement`,ref:a,as:e.as,"as-child":e.asChild,value:M(r),disabled:s.value?``:void 0,"data-disabled":s.value?``:void 0,"aria-disabled":s.value??void 0,"aria-activedescendant":c.value,type:`text`,onKeydown:[Zl(m,[`down`,`up`,`home`,`end`]),Zl(h,[`enter`])],onInput:p,onCompositionstart:f,onCompositionend:M(d)},{default:N(()=>[I(e.$slots,`default`,{modelValue:M(r)})]),_:3},8,[`as`,`as-child`,`value`,`disabled`,`data-disabled`,`aria-disabled`,`aria-activedescendant`,`onCompositionend`]))}}),Ig=`listbox.select`,[Lg,Rg]=Wp(`ListboxItem`),zg=P({__name:`ListboxItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=fh(void 0,`reka-listbox-item`),{CollectionItem:a}=vg(),{forwardRef:o,currentElement:s}=Y(),c=jg(),l=K(()=>s.value!=null&&s.value===c.highlightedElement.value),u=K(()=>Sg(c.modelValue.value,n.value,c.by)),d=K(()=>c.disabled.value||n.disabled);async function f(e){r(`select`,e),!e?.defaultPrevented&&!d.value&&e&&(c.onValueChange(n.value),c.changeHighlight(s.value))}function p(e){Kp(Ig,f,{originalEvent:e,value:n.value})}return Rg({isSelected:u}),(e,t)=>(R(),B(M(a),{value:e.value},{default:N(()=>[Ys([l.value,u.value,d.value,M(c).focusable.value],()=>H(M(wh),G({id:M(i)},e.$attrs,{ref:M(o),role:`option`,tabindex:M(c).focusable.value?l.value?`0`:`-1`:-1,"aria-selected":u.value,as:e.as,"as-child":e.asChild,disabled:d.value?``:void 0,"data-disabled":d.value?``:void 0,"data-highlighted":l.value?``:void 0,"data-state":u.value?`checked`:`unchecked`,onClick:p,onKeydown:Zl(Yl(p,[`prevent`]),[`space`]),onPointermove:t[0]||=()=>{M(c).highlightedElement.value!==M(s)&&M(c).highlightOnHover.value&&M(c).changeHighlight(M(s),!1,!1)}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`tabindex`,`aria-selected`,`as`,`as-child`,`disabled`,`data-disabled`,`data-highlighted`,`data-state`,`onKeydown`]),t,1)]),_:3},8,[`value`]))}}),Bg=P({__name:`ListboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e;Y();let n=Lg();return(e,r)=>M(n).isSelected.value?(R(),B(M(wh),G({key:0,"aria-hidden":`true`},t),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)):W(`v-if`,!0)}}),[Vg,Hg]=Wp(`PopperRoot`),Ug=P({inheritAttrs:!1,__name:`PopperRoot`,setup(e){let t=j();return Hg({anchor:t,onAnchorChange:e=>t.value=e}),(e,t)=>I(e.$slots,`default`)}}),Wg=P({__name:`PopperAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n,currentElement:r}=Y(),i=Vg();return Tr(()=>{i.onAnchorChange(t.reference??r.value)}),(e,t)=>(R(),B(M(wh),{ref:M(n),as:e.as,"as-child":e.asChild},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as`,`as-child`]))}});function Gg(e){return e!==null}function Kg(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=qg(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}}function qg(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Jg=[`top`,`right`,`bottom`,`left`],Yg=Math.min,Xg=Math.max,Zg=Math.round,Qg=Math.floor,$g=e=>({x:e,y:e}),e_={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function t_(e,t,n){return Xg(e,Yg(t,n))}function n_(e,t){return typeof e==`function`?e(t):e}function r_(e){return e.split(`-`)[0]}function i_(e){return e.split(`-`)[1]}function a_(e){return e===`x`?`y`:`x`}function o_(e){return e===`y`?`height`:`width`}function s_(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function c_(e){return a_(s_(e))}function l_(e,t,n){n===void 0&&(n=!1);let r=i_(e),i=c_(e),a=o_(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=v_(o)),[o,v_(o)]}function u_(e){let t=v_(e);return[d_(e),t,d_(t)]}function d_(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var f_=[`left`,`right`],p_=[`right`,`left`],m_=[`top`,`bottom`],h_=[`bottom`,`top`];function g_(e,t,n){switch(e){case`top`:case`bottom`:return n?t?p_:f_:t?f_:p_;case`left`:case`right`:return t?m_:h_;default:return[]}}function __(e,t,n,r){let i=i_(e),a=g_(r_(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(d_)))),a}function v_(e){let t=r_(e);return e_[t]+e.slice(t.length)}function y_(e){return{top:0,right:0,bottom:0,left:0,...e}}function b_(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:y_(e)}function x_(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function S_(e,t,n){let{reference:r,floating:i}=e,a=s_(t),o=c_(t),s=o_(o),c=r_(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(i_(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function C_(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=n_(t,e),p=b_(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=x_(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=x_(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var w_=50,T_=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:C_},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=S_(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<w_&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=S_(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},E_=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=n_(e,t)||{};if(l==null)return{};let d=b_(u),f={x:n,y:r},p=c_(i),m=o_(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=Yg(d[_],T),E=Yg(d[v],T),te=ee,ne=C-h[m]-E,re=C/2-h[m]/2+w,D=t_(te,re,ne),ie=!c.arrow&&i_(i)!=null&&re!==D&&a.reference[m]/2-(re<te?ee:E)-h[m]/2<0,ae=ie?re<te?re-te:re-ne:0;return{[p]:f[p]+ae,data:{[p]:D,centerOffset:re-D-ae,...ie&&{alignmentOffset:ae}},reset:ie}}}),D_=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=n_(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=r_(r),_=s_(o),v=r_(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[v_(o)]:u_(o)),x=p!==`none`;!d&&x&&b.push(...__(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=l_(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==s_(t))||T.every(e=>s_(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=s_(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function O_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function k_(e){return Jg.some(t=>e[t]>=0)}var A_=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=n_(e,t);switch(i){case`referenceHidden`:{let e=O_(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:k_(e)}}}case`escaped`:{let e=O_(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:k_(e)}}}default:return{}}}}},j_=new Set([`left`,`top`]);async function M_(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=r_(n),s=i_(n),c=s_(n)===`y`,l=j_.has(o)?-1:1,u=a&&c?-1:1,d=n_(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var N_=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await M_(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},P_=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=n_(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=s_(r_(i)),p=a_(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=t_(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=t_(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},F_=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=n_(e,t),u={x:n,y:r},d=s_(i),f=a_(d),p=u[f],m=u[d],h=n_(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=j_.has(r_(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},I_=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=n_(e,t),u=await o.detectOverflow(t,l),d=r_(i),f=i_(i),p=s_(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Yg(h-u[g],v),x=Yg(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Xg(u.left,0),t=Xg(u.right,0),n=Xg(u.top,0),r=Xg(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Xg(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Xg(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function L_(){return typeof window<`u`}function R_(e){return V_(e)?(e.nodeName||``).toLowerCase():`#document`}function z_(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function B_(e){return((V_(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function V_(e){return L_()?e instanceof Node||e instanceof z_(e).Node:!1}function H_(e){return L_()?e instanceof Element||e instanceof z_(e).Element:!1}function U_(e){return L_()?e instanceof HTMLElement||e instanceof z_(e).HTMLElement:!1}function W_(e){return!L_()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof z_(e).ShadowRoot}function G_(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=nv(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function K_(e){return/^(table|td|th)$/.test(R_(e))}function q_(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var J_=/transform|translate|scale|rotate|perspective|filter/,Y_=/paint|layout|strict|content/,X_=e=>!!e&&e!==`none`,Z_;function Q_(e){let t=H_(e)?nv(e):e;return X_(t.transform)||X_(t.translate)||X_(t.scale)||X_(t.rotate)||X_(t.perspective)||!ev()&&(X_(t.backdropFilter)||X_(t.filter))||J_.test(t.willChange||``)||Y_.test(t.contain||``)}function $_(e){let t=iv(e);for(;U_(t)&&!tv(t);){if(Q_(t))return t;if(q_(t))return null;t=iv(t)}return null}function ev(){return Z_??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Z_}function tv(e){return/^(html|body|#document)$/.test(R_(e))}function nv(e){return z_(e).getComputedStyle(e)}function rv(e){return H_(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function iv(e){if(R_(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||W_(e)&&e.host||B_(e);return W_(t)?t.host:t}function av(e){let t=iv(e);return tv(t)?e.ownerDocument?e.ownerDocument.body:e.body:U_(t)&&G_(t)?t:av(t)}function ov(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=av(e),i=r===e.ownerDocument?.body,a=z_(r);if(i){let e=sv(a);return t.concat(a,a.visualViewport||[],G_(r)?r:[],e&&n?ov(e):[])}else return t.concat(r,ov(r,[],n))}function sv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function cv(e){let t=nv(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=U_(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Zg(n)!==a||Zg(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function lv(e){return H_(e)?e:e.contextElement}function uv(e){let t=lv(e);if(!U_(t))return $g(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=cv(t),o=(a?Zg(n.width):n.width)/r,s=(a?Zg(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var dv=$g(0);function fv(e){let t=z_(e);return!ev()||!t.visualViewport?dv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function pv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==z_(e)?!1:t}function mv(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=lv(e),o=$g(1);t&&(r?H_(r)&&(o=uv(r)):o=uv(e));let s=pv(a,n,r)?fv(a):$g(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=z_(a),t=r&&H_(r)?z_(r):r,n=e,i=sv(n);for(;i&&r&&t!==n;){let e=uv(i),t=i.getBoundingClientRect(),r=nv(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=z_(i),i=sv(n)}}return x_({width:u,height:d,x:c,y:l})}function hv(e,t){let n=rv(e).scrollLeft;return t?t.left+n:mv(B_(e)).left+n}function gv(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-hv(e,n),y:n.top+t.scrollTop}}function _v(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=B_(r),s=t?q_(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=$g(1),u=$g(0),d=U_(r);if((d||!d&&!a)&&((R_(r)!==`body`||G_(o))&&(c=rv(r)),d)){let e=mv(r);l=uv(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?gv(o,c):$g(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function vv(e){return Array.from(e.getClientRects())}function yv(e){let t=B_(e),n=rv(e),r=e.ownerDocument.body,i=Xg(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xg(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+hv(e),s=-n.scrollTop;return nv(r).direction===`rtl`&&(o+=Xg(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var bv=25;function xv(e,t){let n=z_(e),r=B_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ev();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=hv(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=bv&&(a-=o)}else l<=bv&&(a+=l);return{width:a,height:o,x:s,y:c}}function Sv(e,t){let n=mv(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=U_(e)?uv(e):$g(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Cv(e,t,n){let r;if(t===`viewport`)r=xv(e,n);else if(t===`document`)r=yv(B_(e));else if(H_(t))r=Sv(t,n);else{let n=fv(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return x_(r)}function wv(e,t){let n=iv(e);return n===t||!H_(n)||tv(n)?!1:nv(n).position===`fixed`||wv(n,t)}function Tv(e,t){let n=t.get(e);if(n)return n;let r=ov(e,[],!1).filter(e=>H_(e)&&R_(e)!==`body`),i=null,a=nv(e).position===`fixed`,o=a?iv(e):e;for(;H_(o)&&!tv(o);){let t=nv(o),n=Q_(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||G_(o)&&!n&&wv(e,o))?r=r.filter(e=>e!==o):i=t,o=iv(o)}return t.set(e,r),r}function Ev(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?q_(t)?[]:Tv(t,this._c):[].concat(n),r],o=Cv(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Cv(t,a[e],i);s=Xg(n.top,s),c=Yg(n.right,c),l=Yg(n.bottom,l),u=Xg(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Dv(e){let{width:t,height:n}=cv(e);return{width:t,height:n}}function Ov(e,t,n){let r=U_(t),i=B_(t),a=n===`fixed`,o=mv(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=$g(0);function l(){c.x=hv(i)}if(r||!r&&!a)if((R_(t)!==`body`||G_(i))&&(s=rv(t)),r){let e=mv(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?gv(i,s):$g(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function kv(e){return nv(e).position===`static`}function Av(e,t){if(!U_(e)||nv(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return B_(e)===n&&(n=n.ownerDocument.body),n}function jv(e,t){let n=z_(e);if(q_(e))return n;if(!U_(e)){let t=iv(e);for(;t&&!tv(t);){if(H_(t)&&!kv(t))return t;t=iv(t)}return n}let r=Av(e,t);for(;r&&K_(r)&&kv(r);)r=Av(r,t);return r&&tv(r)&&kv(r)&&!Q_(r)?n:r||$_(e)||n}var Mv=async function(e){let t=this.getOffsetParent||jv,n=this.getDimensions,r=await n(e.floating);return{reference:Ov(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Nv(e){return nv(e).direction===`rtl`}var Pv={convertOffsetParentRelativeRectToViewportRelativeRect:_v,getDocumentElement:B_,getClippingRect:Ev,getOffsetParent:jv,getElementRects:Mv,getClientRects:vv,getDimensions:Dv,getScale:uv,isElement:H_,isRTL:Nv};function Fv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Iv(e,t){let n=null,r,i=B_(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Qg(d),h=Qg(i.clientWidth-(u+f)),g=Qg(i.clientHeight-(d+p)),_=Qg(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Xg(0,Yg(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Fv(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Lv(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=lv(e),u=i||a?[...l?ov(l):[],...t?ov(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Iv(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?mv(e):null;c&&g();function g(){let t=mv(e);h&&!Fv(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Rv=N_,zv=P_,Bv=D_,Vv=I_,Hv=A_,Uv=E_,Wv=F_,Gv=(e,t,n)=>{let r=new Map,i={platform:Pv,...n},a={...i.platform,_c:r};return T_(e,t,{...i,platform:a})};function Kv(e){return typeof e==`object`&&!!e&&`$el`in e}function qv(e){if(Kv(e)){let t=e.$el;return V_(t)&&R_(t)===`#comment`?null:t}return e}function Jv(e){return typeof e==`function`?e():M(e)}function Yv(e){return{name:`arrow`,options:e,fn(t){let n=qv(Jv(e.element));return n==null?{}:Uv({element:n,padding:e.padding}).fn(t)}}}function Xv(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zv(e,t){let n=Xv(e);return Math.round(t*n)/n}function Qv(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=K(()=>Jv(n.open)??!0),a=K(()=>Jv(n.middleware)),o=K(()=>Jv(n.placement)??`bottom`),s=K(()=>Jv(n.strategy)??`absolute`),c=K(()=>Jv(n.transform)??!0),l=K(()=>qv(e.value)),u=K(()=>qv(t.value)),d=j(0),f=j(0),p=j(s.value),m=j(o.value),h=dn({}),g=j(!1),_=K(()=>{let e={position:p.value,left:`0`,top:`0`};if(!u.value)return e;let t=Zv(u.value,d.value),n=Zv(u.value,f.value);return c.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...Xv(u.value)>=1.5&&{willChange:`transform`}}:{position:p.value,left:t+`px`,top:n+`px`}}),v;function y(){if(l.value==null||u.value==null)return;let e=i.value;Gv(l.value,u.value,{middleware:a.value,placement:o.value,strategy:s.value}).then(t=>{d.value=t.x,f.value=t.y,p.value=t.strategy,m.value=t.placement,h.value=t.middlewareData,g.value=e!==!1})}function b(){typeof v==`function`&&(v(),v=void 0)}function x(){if(b(),r===void 0){y();return}if(l.value!=null&&u.value!=null){v=r(l.value,u.value,y);return}}function S(){i.value||(g.value=!1)}return Dr([a,o,s,i],y,{flush:`sync`}),Dr([l,u],x,{flush:`sync`}),Dr(i,S,{flush:`sync`}),Pe()&&Fe(b),{x:$t(d),y:$t(f),strategy:$t(p),placement:$t(m),middlewareData:$t(h),isPositioned:$t(g),floatingStyles:_,update:y}}var $v={side:`bottom`,sideOffset:0,sideFlip:!0,align:`center`,alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:`partial`,hideWhenDetached:!1,positionStrategy:`fixed`,updatePositionStrategy:`optimized`,prioritizePosition:!1},[ey,ty]=Wp(`PopperContent`),ny=P({inheritAttrs:!1,__name:`PopperContent`,props:Oa({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...$v}),emits:[`placed`],setup(e,{emit:t}){let n=e,r=t,i=Vg(),{forwardRef:a,currentElement:o}=Y(),s=j(),c=j(),{width:l,height:u}=mh(c),d=K(()=>n.side+(n.align===`center`?``:`-${n.align}`)),f=K(()=>typeof n.collisionPadding==`number`?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),p=K(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=K(()=>({padding:f.value,boundary:p.value.filter(Gg),altBoundary:p.value.length>0})),h=K(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),g=Jp(()=>[Rv({mainAxis:n.sideOffset+u.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Bv({...m.value,...h.value}),n.avoidCollisions&&zv({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky===`partial`?Wv():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&Bv({...m.value,...h.value}),Vv({...m.value,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--reka-popper-available-width`,`${n}px`),o.setProperty(`--reka-popper-available-height`,`${r}px`),o.setProperty(`--reka-popper-anchor-width`,`${i}px`),o.setProperty(`--reka-popper-anchor-height`,`${a}px`)}}),c.value&&Yv({element:c.value,padding:n.arrowPadding}),Kg({arrowWidth:l.value,arrowHeight:u.value}),n.hideWhenDetached&&Hv({strategy:`referenceHidden`,...m.value})]),{floatingStyles:_,placement:v,isPositioned:y,middlewareData:b,update:x}=Qv(K(()=>n.reference??i.anchor.value),s,{strategy:n.positionStrategy,placement:d,whileElementsMounted:(...e)=>Lv(...e,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy===`always`}),middleware:g}),S=K(()=>qg(v.value)[0]),C=K(()=>qg(v.value)[1]);Tr(()=>{y.value&&r(`placed`)});let w=K(()=>{let e=b.value.arrow?.centerOffset!==0;return n.hideShiftedArrow&&e}),T=j(``);return wr(()=>{o.value&&(T.value=window.getComputedStyle(o.value).zIndex)}),ty({placedSide:S,onArrowChange:e=>c.value=e,arrowX:K(()=>b.value.arrow?.x??0),arrowY:K(()=>b.value.arrow?.y??0),shouldHideArrow:w}),(e,t)=>(R(),z(`div`,{ref_key:`floatingRef`,ref:s,"data-reka-popper-content-wrapper":``,style:he({...M(_),transform:M(y)?M(_).transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:T.value,"--reka-popper-transform-origin":[M(b).transformOrigin?.x,M(b).transformOrigin?.y].join(` `),...M(b).hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}})},[H(M(wh),G({ref:M(a)},e.$attrs,{"as-child":n.asChild,as:e.as,"data-side":S.value,"data-align":C.value,style:{animation:M(y)?void 0:`none`}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`as-child`,`as`,`data-side`,`data-align`,`style`])],4))}}),[ry,iy]=Wp(`ComboboxRoot`),ay=P({__name:`ComboboxRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`highlight`,`update:open`],setup(e,{expose:t,emit:n}){let r=e,i=n,{primitiveElement:a,currentElement:o}=Th(),{multiple:s,disabled:c,ignoreFilter:l,resetSearchTermOnSelect:u,openOnFocus:d,openOnClick:f,dir:p,resetModelValueOnClear:m,highlightOnHover:h}=bn(r),g=zm(p),_=Cm(r,`modelValue`,i,{defaultValue:r.defaultValue??(s.value?[]:void 0),passive:r.modelValue===void 0,deep:!0}),v=Cm(r,`open`,i,{defaultValue:r.defaultOpen,passive:r.open===void 0});async function y(e){v.value=e,ne.value=``,e?(await $n(),a.value?.highlightSelected(),x.value=!0,C.value?.focus()):(x.value=!1,setTimeout(()=>{!e&&r.resetSearchTermOnBlur&&b.trigger()},1))}let b=Xp(),x=j(!1),S=j(!1),C=j(),w=j(),T=K(()=>a.value?.highlightedElement??void 0),ee=j(new Map),E=j(new Map),{contains:te}=Vm({sensitivity:`base`}),ne=j(``),re=K(e=>{if(!ne.value||r.ignoreFilter||S.value)return{count:ee.value.size,items:e?.items??new Map,groups:e?.groups??new Set(E.value.keys())};let t=0,n=new Map,i=new Set;for(let[e,r]of ee.value){let i=te(r,ne.value);n.set(e,+!!i),i&&t++}for(let[e,t]of E.value)for(let r of t)if(n.get(r)>0){i.add(e);break}return{count:t,items:n,groups:i}}),D=Ds();return Ki(()=>{D?.exposed&&(D.exposed.highlightItem=a.value?.highlightItem,D.exposed.highlightFirstItem=a.value?.highlightFirstItem,D.exposed.highlightSelected=a.value?.highlightSelected)}),t({filtered:re,highlightedElement:T,highlightItem:a.value?.highlightItem,highlightFirstItem:a.value?.highlightFirstItem,highlightSelected:a.value?.highlightSelected}),iy({modelValue:_,multiple:s,disabled:c,open:v,onOpenChange:y,contentId:``,isUserInputted:x,isVirtual:S,inputElement:C,highlightedElement:T,onInputElementChange:e=>C.value=e,triggerElement:w,onTriggerElementChange:e=>w.value=e,parentElement:o,resetSearchTermOnSelect:u,onResetSearchTerm:b.on,allItems:ee,allGroups:E,filterSearch:ne,filterState:re,ignoreFilter:l,openOnFocus:d,openOnClick:f,resetModelValueOnClear:m}),(e,t)=>(R(),B(M(Ug),null,{default:N(()=>[H(M(Ng),G({ref_key:`primitiveElement`,ref:a},e.$attrs,{modelValue:M(_),"onUpdate:modelValue":t[0]||=e=>un(_)?_.value=e:null,style:{pointerEvents:M(v)?`auto`:void 0},as:e.as,"as-child":e.asChild,dir:M(g),multiple:M(s),name:e.name,required:e.required,disabled:M(c),"highlight-on-hover":M(h),by:r.by,onHighlight:t[1]||=e=>i(`highlight`,e)}),{default:N(()=>[I(e.$slots,`default`,{open:M(v),modelValue:M(_)})]),_:3},16,[`modelValue`,`style`,`as`,`as-child`,`dir`,`multiple`,`name`,`required`,`disabled`,`highlight-on-hover`,`by`])]),_:3}))}}),oy=P({__name:`ComboboxAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{forwardRef:t}=Y();return(e,n)=>(R(),B(M(Wg),{"as-child":``,reference:e.reference},{default:N(()=>[H(M(wh),G({ref:M(t),"as-child":e.asChild,as:e.as},e.$attrs),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`as-child`,`as`])]),_:3},8,[`reference`]))}}),[sy,cy]=Wp(`ComboboxContent`),ly=P({__name:`ComboboxContentImpl`,props:{position:{type:String,required:!1,default:`inline`},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=e,r=t,{position:i}=bn(n),a=ry(),o=K(()=>a.ignoreFilter.value?a.allItems.value.size===0:a.filterState.value.count===0),{forwardRef:s,currentElement:c}=Y();Fm(n.bodyLock),Um(),uh(a.parentElement);let l=Km(K(()=>n.position===`popper`?n:{}).value),u={boxSizing:`border-box`,"--reka-combobox-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-combobox-content-available-width":`var(--reka-popper-available-width)`,"--reka-combobox-content-available-height":`var(--reka-popper-available-height)`,"--reka-combobox-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-combobox-trigger-height":`var(--reka-popper-anchor-height)`};cy({position:i});let d=j(!1);return Ki(()=>{a.inputElement.value&&(d.value=c.value.contains(a.inputElement.value),d.value&&a.inputElement.value.focus())}),Xi(()=>{let e=Gp();d.value&&(!e||e===document.body)&&a.triggerElement.value?.focus()}),(e,t)=>(R(),B(M(Pg),{"as-child":``},{default:N(()=>[H(M(Xh),{"as-child":``,onMountAutoFocus:t[5]||=Yl(()=>{},[`prevent`]),onUnmountAutoFocus:t[6]||=Yl(()=>{},[`prevent`])},{default:N(()=>[H(M(Ih),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onDismiss:t[0]||=e=>M(a).onOpenChange(!1),onFocusOutside:t[1]||=e=>{M(a).parentElement.value?.contains(e.target)&&e.preventDefault(),r(`focusOutside`,e)},onInteractOutside:t[2]||=e=>r(`interactOutside`,e),onEscapeKeyDown:t[3]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[4]||=e=>{M(a).parentElement.value?.contains(e.target)&&e.preventDefault(),r(`pointerDownOutside`,e)}},{default:N(()=>[(R(),B(aa(M(i)===`popper`?M(ny):M(wh)),G({...e.$attrs,...M(l)},{id:M(a).contentId,ref:M(s),"data-state":M(a).open.value?`open`:`closed`,"data-empty":o.value?``:void 0,style:{display:n.hideWhenEmpty&&o.value?`none`:`flex`,flexDirection:`column`,outline:`none`,...M(i)===`popper`?u:{}}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`data-empty`,`style`]))]),_:3},8,[`disable-outside-pointer-events`])]),_:3})]),_:3}))}}),uy=P({__name:`ComboboxContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},hideWhenEmpty:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`],setup(e,{emit:t}){let n=qm(e,t),{forwardRef:r}=Y(),i=ry();return i.contentId||=fh(void 0,`reka-combobox-content`),(e,t)=>(R(),B(M(xh),{present:e.forceMount||M(i).open.value},{default:N(()=>[H(ly,G({...M(n),...e.$attrs},{ref:M(r)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)]),_:3},8,[`present`]))}}),dy=P({__name:`ComboboxEmpty`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=ry(),r=K(()=>n.ignoreFilter.value?n.allItems.value.size===0:n.filterState.value.count===0);return(e,n)=>r.value?(R(),B(M(wh),be(G({key:0},t)),{default:N(()=>[I(e.$slots,`default`,{},()=>[n[0]||=U(`No options`)])]),_:3},16)):W(`v-if`,!0)}}),[fy,py]=Wp(`ComboboxGroup`),my=P({__name:`ComboboxInput`,props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=ry(),a=jg(),{primitiveElement:o,currentElement:s}=Th(),c=Cm(n,`modelValue`,r,{passive:n.modelValue===void 0});Ki(()=>{s.value&&i.onInputElementChange(s.value)});let{isComposing:l,handleCompositionStart:u,handleCompositionEnd:d}=Rm(e=>{let t=e.target;t&&p(t.value)});function f(e){l.value||(e.preventDefault(),i.open.value||i.onOpenChange(!0))}function p(e){i.open.value?i.filterSearch.value=e:(i.onOpenChange(!0),$n(()=>{e&&(i.filterSearch.value=e,a.highlightFirstItem())}))}function m(e){l.value||p(e.target.value)}function h(){i.openOnFocus.value&&!i.open.value&&i.onOpenChange(!0)}function g(e){if(!i.open.value)return;let t=e.relatedTarget;if(!t)return;let n=i.parentElement.value?.contains(t),r=document.getElementById(i.contentId)?.contains(t);!n&&!r&&requestAnimationFrame(()=>{if(!i.open.value)return;let e=document.activeElement;!i.parentElement.value?.contains(e)&&!document.getElementById(i.contentId)?.contains(e)&&i.onOpenChange(!1)})}function _(){i.openOnClick.value&&!i.open.value&&i.onOpenChange(!0)}function v(){let e=i.modelValue.value;n.displayValue?c.value=n.displayValue(e):!i.multiple.value&&e&&!Array.isArray(e)?typeof e==`object`?c.value=``:c.value=e.toString():c.value=``,$n(()=>{c.value=c.value})}return i.onResetSearchTerm(()=>{v()}),Dr(i.modelValue,async()=>{!i.isUserInputted.value&&i.resetSearchTermOnSelect.value&&v()},{immediate:!0,deep:!0}),Dr(i.filterState,(e,t)=>{!i.isVirtual.value&&t.count===0&&a.highlightFirstItem()}),(e,t)=>(R(),B(M(Fg),{ref_key:`primitiveElement`,ref:o,modelValue:M(c),"onUpdate:modelValue":t[0]||=e=>un(c)?c.value=e:null,as:e.as,"as-child":e.asChild,"auto-focus":e.autoFocus,disabled:e.disabled,"aria-expanded":M(i).open.value,"aria-controls":M(i).contentId,"aria-autocomplete":`list`,role:`combobox`,autocomplete:`off`,onClick:_,onInput:m,onKeydown:Zl(f,[`down`,`up`]),onFocus:h,onBlur:g,onCompositionstart:M(u),onCompositionend:M(d)},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`modelValue`,`as`,`as-child`,`auto-focus`,`disabled`,`aria-expanded`,`aria-controls`,`onCompositionstart`,`onCompositionend`]))}}),hy=P({__name:`ComboboxItem`,props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=fh(void 0,`reka-combobox-item`),a=ry(),o=fy(null),{primitiveElement:s,currentElement:c}=Th();if(n.value===``)throw Error(`A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.`);let l=K(()=>{if(a.isVirtual.value||a.ignoreFilter.value||!a.filterSearch.value)return!0;{let e=a.filterState.value.items.get(i);return e===void 0?!0:e>0}});return Ki(()=>{a.allItems.value.set(i,n.textValue||c.value.textContent||c.value.innerText);let e=o?.id;e&&(a.allGroups.value.has(e)?a.allGroups.value.get(e)?.add(i):a.allGroups.value.set(e,new Set([i])))}),Xi(()=>{a.allItems.value.delete(i)}),(e,t)=>l.value?(R(),B(M(zg),G({key:0},n,{id:M(i),ref_key:`primitiveElement`,ref:s,disabled:M(a).disabled.value||e.disabled,onSelect:t[0]||=t=>{r(`select`,t),!t.defaultPrevented&&(!M(a).multiple.value&&!e.disabled&&!M(a).disabled.value?(t.preventDefault(),M(a).onOpenChange(!1),M(a).modelValue.value=n.value):M(a).multiple.value&&M(a).inputElement.value?.focus())}}),{default:N(()=>[I(e.$slots,`default`,{},()=>[U(A(e.value),1)])]),_:3},16,[`id`,`disabled`])):W(`v-if`,!0)}}),gy=P({__name:`ComboboxItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e;return(e,n)=>(R(),B(M(Bg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),_y=P({__name:`ComboboxPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(mg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),vy=P({__name:`ComboboxTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:n,currentElement:r}=Y(),i=ry(),a=K(()=>t.disabled||i.disabled.value||!1);return Ki(()=>{r.value&&i.onTriggerElementChange(r.value)}),(e,r)=>(R(),B(M(wh),G(t,{ref:M(n),type:e.as===`button`?`button`:void 0,tabindex:`-1`,"aria-label":`Show popup`,"aria-haspopup":`listbox`,"aria-expanded":M(i).open.value,"aria-controls":M(i).contentId,"data-state":M(i).open.value?`open`:`closed`,disabled:a.value,"data-disabled":a.value?``:void 0,"aria-disabled":a.value??void 0,onClick:r[0]||=e=>M(i).onOpenChange(!M(i).open.value)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`type`,`aria-expanded`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`aria-disabled`]))}});function yy(e){let t=Om({nonce:j()});return K(()=>e?.value||t.nonce?.value)}var by=P({__name:`ComboboxViewport`,props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n}=Y(),{nonce:r}=bn(t),i=yy(r),a=ry();return(e,r)=>(R(),z(L,null,[H(M(wh),G({...e.$attrs,...t},{ref:M(n),"data-reka-combobox-viewport":``,role:`presentation`,style:{position:`relative`,flex:M(a).isVirtual.value?void 0:1,overflow:`auto`}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`style`]),H(M(wh),{as:`style`,nonce:M(i)},{default:N(()=>r[0]||=[U(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-combobox-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-combobox-viewport]::-webkit-scrollbar { display: none; } `)]),_:1,__:[0]},8,[`nonce`])],64))}}),[xy,Sy]=Wp(`RovingFocusGroup`),Cy=P({__name:`RovingFocusGroup`,props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`entryFocus`,`update:currentTabStopId`],setup(e,{expose:t,emit:n}){let r=e,i=n,{loop:a,orientation:o,dir:s}=bn(r),c=zm(s),l=Cm(r,`currentTabStopId`,i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),u=j(!1),d=j(!1),f=j(0),{getItems:p,CollectionSlot:m}=vg({isProvider:!0});function h(e){let t=!d.value;if(e.currentTarget&&e.target===e.currentTarget&&t&&!u.value){let t=new CustomEvent(wg,Tg);if(e.currentTarget.dispatchEvent(t),i(`entryFocus`,t),!t.defaultPrevented){let e=p().map(e=>e.ref).filter(e=>e.dataset.disabled!==``);kg([e.find(e=>e.getAttribute(`data-active`)===``),e.find(e=>e.getAttribute(`data-highlighted`)===``),e.find(e=>e.id===l.value),...e].filter(Boolean),r.preventScrollOnEntryFocus)}}d.value=!1}function g(){setTimeout(()=>{d.value=!1},1)}return t({getItems:p}),Sy({loop:a,dir:c,orientation:o,currentTabStopId:l,onItemFocus:e=>{l.value=e},onItemShiftTab:()=>{u.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(e,t)=>(R(),B(M(m),null,{default:N(()=>[H(M(wh),{tabindex:u.value||f.value===0?-1:0,"data-orientation":M(o),as:e.as,"as-child":e.asChild,dir:M(c),style:{outline:`none`},onMousedown:t[0]||=e=>d.value=!0,onMouseup:g,onFocus:h,onBlur:t[1]||=e=>u.value=!1},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`as`,`as-child`,`dir`])]),_:3}))}}),wy=P({__name:`RovingFocusItem`,props:{tabStopId:{type:String,required:!1},focusable:{type:Boolean,required:!1,default:!0},active:{type:Boolean,required:!1},allowShiftKey:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=xy(),r=fh(),i=K(()=>t.tabStopId||r),a=K(()=>n.currentTabStopId.value===i.value),{getItems:o,CollectionItem:s}=vg();Ki(()=>{t.focusable&&n.onFocusableItemAdd()}),Xi(()=>{t.focusable&&n.onFocusableItemRemove()});function c(e){if(e.key===`Tab`&&e.shiftKey){n.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let r=Og(e,n.orientation.value,n.dir.value);if(r!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||!t.allowShiftKey&&e.shiftKey)return;e.preventDefault();let i=[...o().map(e=>e.ref).filter(e=>e.dataset.disabled!==``)];if(r===`last`)i.reverse();else if(r===`prev`||r===`next`){r===`prev`&&i.reverse();let t=i.indexOf(e.currentTarget);i=n.loop.value?Ag(i,t+1):i.slice(t+1)}$n(()=>kg(i))}}return(e,t)=>(R(),B(M(s),null,{default:N(()=>[H(M(wh),{tabindex:a.value?0:-1,"data-orientation":M(n).orientation.value,"data-active":e.active?``:void 0,"data-disabled":e.focusable?void 0:``,as:e.as,"as-child":e.asChild,onMousedown:t[0]||=t=>{e.focusable?M(n).onItemFocus(i.value):t.preventDefault()},onFocus:t[1]||=e=>M(n).onItemFocus(i.value),onKeydown:c},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`tabindex`,`data-orientation`,`data-active`,`data-disabled`,`as`,`as-child`])]),_:3}))}}),Ty=P({__name:`MenuAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(Wg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}});function Ey(){let e=j(!1);return Ki(()=>{gm(`keydown`,()=>{e.value=!0},{capture:!0,passive:!0}),gm([`pointerdown`,`pointermove`],()=>{e.value=!1},{capture:!0,passive:!0})}),e}var Dy=om(Ey),[Oy,ky]=Wp([`MenuRoot`,`MenuSub`],`MenuContext`),[Ay,jy]=Wp(`MenuRoot`),My=P({__name:`MenuRoot`,props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:i,dir:a}=bn(n),o=zm(a),s=Cm(n,`open`,r),c=j(),l=Dy();return ky({open:s,onOpenChange:e=>{s.value=e},content:c,onContentChange:e=>{c.value=e}}),jy({onClose:()=>{s.value=!1},isUsingKeyboardRef:l,dir:o,modal:i}),(e,t)=>(R(),B(M(Ug),null,{default:N(()=>[I(e.$slots,`default`)]),_:3}))}}),[Ny,Py]=Wp(`MenuContent`),Fy=P({__name:`MenuContentImpl`,props:Oa({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...$v}),emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,i=Oy(),a=Ay(),{trapFocus:o,disableOutsidePointerEvents:s,loop:c}=bn(n);Um(),Fm(s.value);let l=j(``),u=j(0),d=j(0),f=j(null),p=j(`right`),m=j(0),h=j(null),g=j(),{forwardRef:_,currentElement:v}=Y(),{handleTypeaheadSearch:y}=gh(),b=j();function x(e){let t=Em(e,b.value||Gp(),v.value,{loop:c.value,arrowKeyOptions:`vertical`,dir:a?.dir.value,focus:!1,attributeName:`[data-reka-collection-item]:not([data-disabled])`});t&&(b.value=t,t.scrollIntoView({block:`nearest`}))}function S(){b.value&&b.value.click()}let C=j(),w=j();Dr(b,e=>{w.value&&(e===void 0||e!==w.value.trigger.value)&&(w.value.onOpenChange(!1),w.value=void 0)}),Dr(v,e=>{i.onContentChange(e)}),Xi(()=>{window.clearTimeout(u.value)});function T(e){return p.value===f.value?.side&&ag(e,f.value?.area)}async function ee(e){r(`openAutoFocus`,e),!e.defaultPrevented&&(e.preventDefault(),v.value?.focus({preventScroll:!0}))}function E(e){if(e.defaultPrevented)return;let t=e.target,n=t.closest(`[data-reka-menu-content]`)===e.currentTarget,r=[`input`,`textarea`].includes(t.tagName.toLowerCase()),i=e.ctrlKey||e.altKey||e.metaKey,o=e.key.length===1,s=Em(e,Gp(),v.value,{loop:c.value,arrowKeyOptions:`vertical`,dir:a?.dir.value,focus:!0,attributeName:`[data-reka-collection-item]:not([data-disabled])`});if(s)return s?.focus();if(e.code===`Space`)return;let l=g.value?.getItems()??[];if(n&&(e.key===`Tab`&&e.preventDefault(),!i&&o&&!r&&y(e.key,l)),e.target!==v.value||!tg.includes(e.key))return;e.preventDefault();let u=[...l.map(e=>e.ref)];eg.includes(e.key)&&u.reverse(),rg(u)}function te(e){e?.currentTarget?.contains?.(e.target)||(window.clearTimeout(u.value),l.value=``)}function ne(e){if(!og(e))return;let t=e.target,n=m.value!==e.clientX;(e?.currentTarget)?.contains(t)&&n&&(p.value=e.clientX>m.value?`right`:`left`,m.value=e.clientX)}function re(e){og(e)&&C.value&&C.value.focus()}return Py({onItemEnter:e=>!!T(e),onItemLeave:e=>T(e)?!0:([`INPUT`,`TEXTAREA`].includes(Gp()?.tagName||``)||v.value?.focus(),h.value=null,!1),onTriggerLeave:e=>!!T(e),searchRef:l,highlightedElement:b,onKeydownNavigation:x,onKeydownEnter:S,filterElement:C,onFilterElementChange:e=>{C.value=e},activeSubmenuContext:w,pointerGraceTimerRef:d,onPointerGraceIntentChange:e=>{f.value=e}}),(e,t)=>(R(),B(M(Xh),{"as-child":``,trapped:M(o),onMountAutoFocus:ee,onUnmountAutoFocus:t[7]||=e=>r(`closeAutoFocus`,e)},{default:N(()=>[H(M(Ih),{"as-child":``,"disable-outside-pointer-events":M(s),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[3]||=e=>r(`pointerDownOutside`,e),onFocusOutside:t[4]||=e=>r(`focusOutside`,e),onInteractOutside:t[5]||=e=>r(`interactOutside`,e),onDismiss:t[6]||=e=>r(`dismiss`)},{default:N(()=>[H(M(Cy),{ref_key:`rovingFocusGroupRef`,ref:g,"current-tab-stop-id":h.value,"onUpdate:currentTabStopId":t[0]||=e=>h.value=e,"as-child":``,orientation:`vertical`,dir:M(a).dir.value,loop:M(c),onEntryFocus:t[1]||=e=>{r(`entryFocus`,e),M(a).isUsingKeyboardRef.value||e.preventDefault()}},{default:N(()=>[H(M(ny),{ref:M(_),role:`menu`,as:e.as,"as-child":e.asChild,"aria-orientation":`vertical`,"data-reka-menu-content":``,"data-state":M(ng)(M(i).open.value),dir:M(a).dir.value,side:e.side,"side-offset":e.sideOffset,align:e.align,"align-offset":e.alignOffset,"avoid-collisions":e.avoidCollisions,"collision-boundary":e.collisionBoundary,"collision-padding":e.collisionPadding,"arrow-padding":e.arrowPadding,"prioritize-position":e.prioritizePosition,"position-strategy":e.positionStrategy,"update-position-strategy":e.updatePositionStrategy,sticky:e.sticky,"hide-when-detached":e.hideWhenDetached,reference:e.reference,onKeydown:E,onBlur:te,onPointermove:ne,onPointerenter:re},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`data-state`,`dir`,`side`,`side-offset`,`align`,`align-offset`,`avoid-collisions`,`collision-boundary`,`collision-padding`,`arrow-padding`,`prioritize-position`,`position-strategy`,`update-position-strategy`,`sticky`,`hide-when-detached`,`reference`])]),_:3},8,[`current-tab-stop-id`,`dir`,`loop`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),Iy=P({inheritAttrs:!1,__name:`MenuItemImpl`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,n=Ny(),{forwardRef:r,currentElement:i}=Y(),{CollectionItem:a}=vg(),o=j(!1),s=K(()=>o.value||i.value!=null&&n.highlightedElement.value===i.value);async function c(e){if(!(e.defaultPrevented||!og(e))){if(t.disabled)n.onItemLeave(e);else if(!n.onItemEnter(e)){let t=e.currentTarget;n.highlightedElement.value=t,[`INPUT`,`TEXTAREA`].includes(Gp()?.tagName||``)||t.focus({preventScroll:!0})}}}async function l(e){await $n(),!e.defaultPrevented&&og(e)&&n.highlightedElement.value===i.value&&!n.onItemLeave(e)&&n.highlightedElement.value===i.value&&(n.highlightedElement.value=void 0)}return(e,t)=>(R(),B(M(a),{value:{textValue:e.textValue}},{default:N(()=>[H(M(wh),G({ref:M(r),role:`menuitem`,tabindex:`-1`},e.$attrs,{as:e.as,"as-child":e.asChild,"aria-disabled":e.disabled||void 0,"data-disabled":e.disabled?``:void 0,"data-highlighted":s.value?``:void 0,onPointermove:c,onPointerleave:l,onFocus:t[0]||=async t=>{await $n(),!(t.defaultPrevented||e.disabled)&&(o.value=!0,M(n).highlightedElement.value=t.currentTarget)},onBlur:t[1]||=async e=>{await $n(),!e.defaultPrevented&&(o.value=!1)}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`aria-disabled`,`data-disabled`,`data-highlighted`])]),_:3},8,[`value`]))}}),Ly=P({__name:`MenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=Y(),o=Ay(),s=Ny(),c=j(!1);async function l(){let e=a.value;if(!n.disabled&&e){let e=new CustomEvent(Zh,{bubbles:!0,cancelable:!0});r(`select`,e),await $n(),e.defaultPrevented?c.value=!1:o.onClose()}}return(e,t)=>(R(),B(Iy,G(n,{ref:M(i),onClick:l,onPointerdown:t[0]||=()=>{c.value=!0},onPointerup:t[1]||=async e=>{await $n(),!e.defaultPrevented&&(c.value||e.currentTarget?.click())},onKeydown:t[2]||=async t=>{let n=M(s).searchRef.value!==``;e.disabled||n&&t.key===` `||M(Qh).includes(t.key)&&(t.currentTarget?.click(),t.preventDefault())}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),Ry=P({__name:`MenuRootContentModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=qm(n,r),a=Oy(),{forwardRef:o,currentElement:s}=Y();return uh(s),(e,t)=>(R(),B(Fy,G(M(i),{ref:M(o),"trap-focus":M(a).open.value,"disable-outside-pointer-events":M(a).open.value,"disable-outside-scroll":!0,onDismiss:t[0]||=e=>M(a).onOpenChange(!1),onFocusOutside:t[1]||=Yl(e=>r(`focusOutside`,e),[`prevent`])}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`trap-focus`,`disable-outside-pointer-events`]))}}),zy=P({__name:`MenuRootContentNonModal`,props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=qm(e,t),r=Oy();return(e,t)=>(R(),B(Fy,G(M(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:t[0]||=e=>M(r).onOpenChange(!1)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),By=P({__name:`MenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`entryFocus`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=qm(e,t),r=Oy(),i=Ay();return(e,t)=>(R(),B(M(xh),{present:e.forceMount||M(r).open.value},{default:N(()=>[M(i).modal.value?(R(),B(Ry,be(G({key:0},{...e.$attrs,...M(n)})),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)):(R(),B(zy,be(G({key:1},{...e.$attrs,...M(n)})),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),[Vy,Hy]=Wp(`MenuGroup`),Uy=P({__name:`MenuLabel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`}},setup(e){let t=e,n=Vy({id:``});return(e,r)=>(R(),B(M(wh),G(t,{id:M(n).id||void 0}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`]))}}),Wy=P({__name:`MenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(mg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),Gy=P({__name:`MenuSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(wh),G(t,{role:`separator`,"aria-orientation":`horizontal`}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),[Ky,qy]=Wp(`PopoverRoot`),Jy=P({__name:`PopoverRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},modal:{type:Boolean,required:!1,default:!1}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t,{modal:i}=bn(n),a=Cm(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0});return qy({contentId:``,triggerId:``,modal:i,open:a,onOpenChange:e=>{a.value=e},onOpenToggle:()=>{a.value=!a.value},triggerElement:j(),hasCustomAnchor:j(!1)}),(e,t)=>(R(),B(M(Ug),null,{default:N(()=>[I(e.$slots,`default`,{open:M(a),close:()=>a.value=!1})]),_:3}))}}),Yy=P({__name:`PopoverContentImpl`,props:{trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Km(lm(n,`trapFocus`,`disableOutsidePointerEvents`)),{forwardRef:a}=Y(),o=Ky();return Um(),(e,t)=>(R(),B(M(Xh),{"as-child":``,loop:``,trapped:e.trapFocus,onMountAutoFocus:t[5]||=e=>r(`openAutoFocus`,e),onUnmountAutoFocus:t[6]||=e=>r(`closeAutoFocus`,e)},{default:N(()=>[H(M(Ih),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onPointerDownOutside:t[0]||=e=>r(`pointerDownOutside`,e),onInteractOutside:t[1]||=e=>r(`interactOutside`,e),onEscapeKeyDown:t[2]||=e=>r(`escapeKeyDown`,e),onFocusOutside:t[3]||=e=>r(`focusOutside`,e),onDismiss:t[4]||=e=>M(o).onOpenChange(!1)},{default:N(()=>[H(M(ny),G(M(i),{id:M(o).contentId,ref:M(a),"data-state":M(o).open.value?`open`:`closed`,"aria-labelledby":M(o).triggerId,style:{"--reka-popover-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-popover-content-available-width":`var(--reka-popper-available-width)`,"--reka-popover-content-available-height":`var(--reka-popper-available-height)`,"--reka-popover-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-popover-trigger-height":`var(--reka-popper-anchor-height)`},role:`dialog`}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`aria-labelledby`])]),_:3},8,[`disable-outside-pointer-events`])]),_:3},8,[`trapped`]))}}),Xy=P({__name:`PopoverContentModal`,props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Ky(),a=j(!1);Fm(!0);let o=qm(n,r),{forwardRef:s,currentElement:c}=Y();return uh(c),(e,t)=>(R(),B(Yy,G(M(o),{ref:M(s),"trap-focus":M(i).open.value,"disable-outside-pointer-events":``,onCloseAutoFocus:t[0]||=Yl(e=>{r(`closeAutoFocus`,e),a.value||M(i).triggerElement.value?.focus()},[`prevent`]),onPointerDownOutside:t[1]||=e=>{r(`pointerDownOutside`,e);let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.value=t.button===2||n},onFocusOutside:t[2]||=Yl(()=>{},[`prevent`])}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`trap-focus`]))}}),Zy=P({__name:`PopoverContentNonModal`,props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Ky(),a=j(!1),o=j(!1),s=qm(n,r);return(e,t)=>(R(),B(Yy,G(M(s),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:t[0]||=e=>{r(`closeAutoFocus`,e),e.defaultPrevented||(a.value||M(i).triggerElement.value?.focus(),e.preventDefault()),a.value=!1,o.value=!1},onInteractOutside:t[1]||=async e=>{r(`interactOutside`,e),e.defaultPrevented||(a.value=!0,e.detail.originalEvent.type===`pointerdown`&&(o.value=!0));let t=e.target;M(i).triggerElement.value?.contains(t)&&e.preventDefault(),e.detail.originalEvent.type===`focusin`&&o.value&&e.preventDefault()}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),Qy=P({__name:`PopoverContent`,props:{forceMount:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=t,i=Ky(),a=qm(n,r),{forwardRef:o}=Y();return i.contentId||=fh(void 0,`reka-popover-content`),(e,t)=>(R(),B(M(xh),{present:e.forceMount||M(i).open.value},{default:N(()=>[M(i).modal.value?(R(),B(Xy,G({key:0},M(a),{ref:M(o)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)):(R(),B(Zy,G({key:1},M(a),{ref:M(o)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),$y=P({__name:`PopoverPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(mg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),eb=P({__name:`PopoverTrigger`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=Ky(),{forwardRef:r,currentElement:i}=Y();return n.triggerId||=fh(void 0,`reka-popover-trigger`),Ki(()=>{n.triggerElement.value=i.value}),(e,i)=>(R(),B(aa(M(n).hasCustomAnchor.value?M(wh):M(Wg)),{"as-child":``},{default:N(()=>[H(M(wh),{id:M(n).triggerId,ref:M(r),type:e.as===`button`?`button`:void 0,"aria-haspopup":`dialog`,"aria-expanded":M(n).open.value,"aria-controls":M(n).contentId,"data-state":M(n).open.value?`open`:`closed`,as:e.as,"as-child":t.asChild,onClick:M(n).onOpenToggle},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`id`,`type`,`aria-expanded`,`aria-controls`,`data-state`,`as`,`as-child`,`onClick`])]),_:3}))}}),[tb,nb]=Wp(`DropdownMenuRoot`),rb=P({__name:`DropdownMenuRoot`,props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;Y();let i=Cm(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=j(),{modal:o,dir:s}=bn(n),c=zm(s);return nb({open:i,onOpenChange:e=>{i.value=e},onOpenToggle:()=>{i.value=!i.value},triggerId:``,triggerElement:a,contentId:``,modal:o,dir:c}),(e,t)=>(R(),B(M(My),{open:M(i),"onUpdate:open":t[0]||=e=>un(i)?i.value=e:null,dir:M(c),modal:M(o)},{default:N(()=>[I(e.$slots,`default`,{open:M(i)})]),_:3},8,[`open`,`dir`,`modal`]))}}),ib=P({__name:`DropdownMenuContent`,props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=qm(e,t);Y();let r=tb(),i=j(!1);function a(e){e.defaultPrevented||(i.value||setTimeout(()=>{r.triggerElement.value?.focus()},0),i.value=!1,e.preventDefault())}return r.contentId||=fh(void 0,`reka-dropdown-menu-content`),(e,t)=>(R(),B(M(By),G(M(n),{id:M(r).contentId,"aria-labelledby":M(r)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-dropdown-menu-content-available-width":`var(--reka-popper-available-width)`,"--reka-dropdown-menu-content-available-height":`var(--reka-popper-available-height)`,"--reka-dropdown-menu-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-dropdown-menu-trigger-height":`var(--reka-popper-anchor-height)`},onCloseAutoFocus:a,onInteractOutside:t[0]||=e=>{if(e.defaultPrevented)return;let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,a=t.button===2||n;(!M(r).modal.value||a)&&(i.value=!0),M(r).triggerElement.value?.contains(e.target)&&e.preventDefault()}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`aria-labelledby`]))}}),ab=P({__name:`DropdownMenuItem`,props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=Bm(t);return Y(),(e,t)=>(R(),B(M(Ly),be(gs({...n,...M(r)})),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),ob=P({__name:`DropdownMenuLabel`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return Y(),(e,n)=>(R(),B(M(Uy),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),sb=P({__name:`DropdownMenuPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(Wy),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),cb=P({__name:`DropdownMenuSeparator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e;return Y(),(e,n)=>(R(),B(M(Gy),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),lb=P({__name:`DropdownMenuTrigger`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=tb(),{forwardRef:r,currentElement:i}=Y();return Ki(()=>{n.triggerElement=i}),n.triggerId||=fh(void 0,`reka-dropdown-menu-trigger`),(e,i)=>(R(),B(M(Ty),{"as-child":``},{default:N(()=>[H(M(wh),{id:M(n).triggerId,ref:M(r),type:e.as===`button`?`button`:void 0,"as-child":t.asChild,as:e.as,"aria-haspopup":`menu`,"aria-expanded":M(n).open.value,"aria-controls":M(n).open.value?M(n).contentId:void 0,"data-disabled":e.disabled?``:void 0,disabled:e.disabled,"data-state":M(n).open.value?`open`:`closed`,onClick:i[0]||=async t=>{!e.disabled&&t.button===0&&t.ctrlKey===!1&&(M(n)?.onOpenToggle(),await $n(),M(n).open.value&&t.preventDefault())},onKeydown:i[1]||=Zl(t=>{e.disabled||([`Enter`,` `].includes(t.key)&&M(n).onOpenToggle(),t.key===`ArrowDown`&&M(n).onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(t.key)&&t.preventDefault())},[`enter`,`space`,`arrow-down`])},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as-child`,`as`,`aria-expanded`,`aria-controls`,`data-disabled`,`disabled`,`data-state`])]),_:3}))}}),ub=P({__name:`Label`,props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`label`}},setup(e){let t=e;return Y(),(e,n)=>(R(),B(M(wh),G(t,{onMousedown:n[0]||=e=>{!e.defaultPrevented&&e.detail>1&&e.preventDefault()}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),db=[` `,`Enter`,`ArrowUp`,`ArrowDown`],fb=[` `,`Enter`];function pb(e,t,n){return e===void 0?!1:Array.isArray(e)?e.some(e=>mb(e,t,n)):mb(e,t,n)}function mb(e,t,n){return e===void 0||t===void 0?!1:typeof e==`string`?e===t:typeof n==`function`?n(e,t):typeof n==`string`?e?.[n]===t?.[n]:Vp(e,t)}function hb(e){return e==null||e===``||Array.isArray(e)&&e.length===0}var gb={key:0,value:``},[_b,vb]=Wp(`SelectRoot`),yb=P({inheritAttrs:!1,__name:`SelectRoot`,props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},by:{type:[String,Function],required:!1},dir:{type:String,required:!1},multiple:{type:Boolean,required:!1},autocomplete:{type:String,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`,`update:open`],setup(e,{emit:t}){let n=e,r=t,{required:i,disabled:a,multiple:o,dir:s}=bn(n),c=Cm(n,`modelValue`,r,{defaultValue:n.defaultValue??(o.value?[]:void 0),passive:n.modelValue===void 0,deep:!0}),l=Cm(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),u=j(),d=j(),f=j({x:0,y:0}),p=K(()=>o.value&&Array.isArray(c.value)?c.value?.length===0:qp(c.value));vg({isProvider:!0});let m=zm(s),h=Gm(u),g=j(new Set),_=K(()=>Array.from(g.value).map(e=>e.value).join(`;`));function v(e){if(o.value){let t=Array.isArray(c.value)?[...c.value]:[],r=t.findIndex(t=>mb(t,e,n.by));r===-1?t.push(e):t.splice(r,1),c.value=[...t]}else c.value=e}function y(e){return Array.from(g.value).find(t=>pb(e,t.value,n.by))}return vb({triggerElement:u,onTriggerChange:e=>{u.value=e},valueElement:d,onValueElementChange:e=>{d.value=e},contentId:``,modelValue:c,onValueChange:v,by:n.by,open:l,multiple:o,required:i,onOpenChange:e=>{l.value=e},dir:m,triggerPointerDownPosRef:f,disabled:a,isEmptyModelValue:p,optionsSet:g,onOptionAdd:e=>{let t=y(e.value);t&&g.value.delete(t),g.value.add(e)},onOptionRemove:e=>{let t=y(e.value);t&&g.value.delete(t)}}),(e,t)=>(R(),B(M(Ug),null,{default:N(()=>[I(e.$slots,`default`,{modelValue:M(c),open:M(l)}),M(h)&&e.name?(R(),B(bb,{key:_.value,"aria-hidden":`true`,tabindex:`-1`,multiple:M(o),required:M(i),name:e.name,autocomplete:e.autocomplete,disabled:M(a),value:M(c)},{default:N(()=>[M(qp)(M(c))?(R(),z(`option`,gb)):W(`v-if`,!0),(R(!0),z(L,null,F(Array.from(g.value),e=>(R(),z(`option`,G({key:e.value??``},{ref_for:!0},e),null,16))),128))]),_:1},8,[`multiple`,`required`,`name`,`autocomplete`,`disabled`,`value`])):W(`v-if`,!0)]),_:3}))}}),bb=P({__name:`BubbleSelect`,props:{autocomplete:{type:String,required:!1},autofocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},form:{type:String,required:!1},multiple:{type:Boolean,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1},size:{type:Number,required:!1},value:{type:null,required:!1}},setup(e){let t=e,n=j(),r=_b();Dr(()=>t.value,(e,t)=>{let r=window.HTMLSelectElement.prototype,i=Object.getOwnPropertyDescriptor(r,`value`).set;if(e!==t&&i&&n.value){let t=new Event(`change`,{bubbles:!0});i.call(n.value,e),n.value.dispatchEvent(t)}});function i(e){r.onValueChange(e.target.value)}return(e,r)=>(R(),B(M(yg),{"as-child":``},{default:N(()=>[V(`select`,G({ref_key:`selectElement`,ref:n},t,{onInput:i}),[I(e.$slots,`default`)],16)]),_:3}))}}),xb=P({__name:`SelectPopperPosition`,props:{side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:`start`},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1,default:10},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=Km(e);return(e,n)=>(R(),B(M(ny),G(M(t),{style:{boxSizing:`border-box`,"--reka-select-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-select-content-available-width":`var(--reka-popper-available-width)`,"--reka-select-content-available-height":`var(--reka-popper-available-height)`,"--reka-select-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-select-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),Sb={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[Cb,wb]=Wp(`SelectContent`),Tb=P({__name:`SelectContentImpl`,props:{position:{type:String,required:!1,default:`item-aligned`},bodyLock:{type:Boolean,required:!1,default:!0},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1,default:`start`},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1,default:!0}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=t,i=_b();Um(),Fm(n.bodyLock);let{CollectionSlot:a,getItems:o}=vg(),s=j();uh(s);let{search:c,handleTypeaheadSearch:l}=gh(),u=j(),d=j(),f=j(),p=j(!1),m=j(!1),h=j(!1);function g(){d.value&&s.value&&rg([d.value,s.value])}Dr(p,()=>{g()});let{onOpenChange:_,triggerPointerDownPosRef:v}=i;wr(e=>{if(!s.value)return;let t={x:0,y:0},n=e=>{t={x:Math.abs(Math.round(e.pageX)-(v.value?.x??0)),y:Math.abs(Math.round(e.pageY)-(v.value?.y??0))}},r=e=>{e.pointerType!==`touch`&&(t.x<=10&&t.y<=10?e.preventDefault():s.value?.contains(e.target)||_(!1),document.removeEventListener(`pointermove`,n),v.value=null)};v.value!==null&&(document.addEventListener(`pointermove`,n),document.addEventListener(`pointerup`,r,{capture:!0,once:!0})),e(()=>{document.removeEventListener(`pointermove`,n),document.removeEventListener(`pointerup`,r,{capture:!0})})});function y(e){let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&l(e.key,o()),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=[...o().map(e=>e.ref)];if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>rg(t)),e.preventDefault()}}let b=Km(K(()=>n.position===`popper`?n:{}).value);return wb({content:s,viewport:u,onViewportChange:e=>{u.value=e},itemRefCallback:(e,t,n)=>{let r=!m.value&&!n,a=pb(i.modelValue.value,t,i.by);if(i.multiple.value){if(h.value)return;(a||r)&&(d.value=e,a&&(h.value=!0))}else (a||r)&&(d.value=e);r&&(m.value=!0)},selectedItem:d,selectedItemText:f,onItemLeave:()=>{s.value?.focus()},itemTextRefCallback:(e,t,n)=>{let r=!m.value&&!n;(pb(i.modelValue.value,t,i.by)||r)&&(f.value=e)},focusSelectedItem:g,position:n.position,isPositioned:p,searchRef:c}),(e,t)=>(R(),B(M(a),null,{default:N(()=>[H(M(Xh),{"as-child":``,onMountAutoFocus:t[6]||=Yl(()=>{},[`prevent`]),onUnmountAutoFocus:t[7]||=e=>{r(`closeAutoFocus`,e),!e.defaultPrevented&&(M(i).triggerElement.value?.focus({preventScroll:!0}),e.preventDefault())}},{default:N(()=>[H(M(Ih),{"as-child":``,"disable-outside-pointer-events":e.disableOutsidePointerEvents,onFocusOutside:t[2]||=Yl(()=>{},[`prevent`]),onDismiss:t[3]||=e=>M(i).onOpenChange(!1),onEscapeKeyDown:t[4]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[5]||=e=>r(`pointerDownOutside`,e)},{default:N(()=>[(R(),B(aa(e.position===`popper`?xb:Ob),G({...e.$attrs,...M(b)},{id:M(i).contentId,ref:e=>{if(!e)return;let t=M(hm)(e);t?.hasAttribute(`data-reka-popper-content-wrapper`)?s.value=t.firstElementChild:s.value=t},role:`listbox`,"data-state":M(i).open.value?`open`:`closed`,dir:M(i).dir.value,style:{display:`flex`,flexDirection:`column`,outline:`none`},onContextmenu:t[0]||=Yl(()=>{},[`prevent`]),onPlaced:t[1]||=e=>p.value=!0,onKeydown:y}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`,`data-state`,`dir`,`onKeydown`]))]),_:3},8,[`disable-outside-pointer-events`])]),_:3})]),_:3}))}}),[Eb,Db]=Wp(`SelectItemAlignedPosition`),Ob=P({inheritAttrs:!1,__name:`SelectItemAlignedPosition`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`placed`],setup(e,{emit:t}){let n=e,r=t,{getItems:i}=vg(),a=_b(),o=Cb(),s=j(!1),c=j(!0),l=j(),{forwardRef:u,currentElement:d}=Y(),{viewport:f,selectedItem:p,selectedItemText:m,focusSelectedItem:h}=o;function g(){if(a.triggerElement.value&&a.valueElement.value&&l.value&&d.value&&f?.value&&p?.value&&m?.value){let e=a.triggerElement.value.getBoundingClientRect(),t=d.value.getBoundingClientRect(),n=a.valueElement.value.getBoundingClientRect(),o=m.value.getBoundingClientRect();if(a.dir.value!==`rtl`){let r=o.left-t.left,i=n.left-r,a=e.left-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-10,d=Up(i,10,Math.max(10,u-c));l.value.style.minWidth=`${s}px`,l.value.style.left=`${d}px`}else{let r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,s=e.width+a,c=Math.max(s,t.width),u=window.innerWidth-10,d=Up(i,10,Math.max(10,u-c));l.value.style.minWidth=`${s}px`,l.value.style.right=`${d}px`}let c=i().map(e=>e.ref),u=window.innerHeight-20,h=f.value.scrollHeight,g=window.getComputedStyle(d.value),_=Number.parseInt(g.borderTopWidth,10),v=Number.parseInt(g.paddingTop,10),y=Number.parseInt(g.borderBottomWidth,10),b=Number.parseInt(g.paddingBottom,10),x=_+v+h+b+y,S=Math.min(p.value.offsetHeight*5,x),C=window.getComputedStyle(f.value),w=Number.parseInt(C.paddingTop,10),T=Number.parseInt(C.paddingBottom,10),ee=e.top+e.height/2-10,E=u-ee,te=p.value.offsetHeight/2,ne=p.value.offsetTop+te,re=_+v+ne,D=x-re;if(re<=ee){let e=p.value===c.at(-1);l.value.style.bottom=`0px`;let t=d.value.clientHeight-f.value.offsetTop-f.value.offsetHeight,n=re+Math.max(E,te+(e?T:0)+t+y);l.value.style.height=`${n}px`}else{let e=p.value===c[0];l.value.style.top=`0px`;let t=Math.max(ee,_+f.value.offsetTop+(e?w:0)+te)+D;l.value.style.height=`${t}px`,f.value.scrollTop=re-ee+f.value.offsetTop}l.value.style.margin=`10px 0`,l.value.style.minHeight=`${S}px`,l.value.style.maxHeight=`${u}px`,r(`placed`),requestAnimationFrame(()=>s.value=!0)}}let _=j(``);Ki(async()=>{await $n(),g(),d.value&&(_.value=window.getComputedStyle(d.value).zIndex)});function v(e){e&&c.value===!0&&(g(),h?.(),c.value=!1)}return Sm(a.triggerElement,()=>{g()}),Db({contentWrapper:l,shouldExpandOnScrollRef:s,onScrollButtonChange:v}),(e,t)=>(R(),z(`div`,{ref_key:`contentWrapperElement`,ref:l,style:he({display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:_.value})},[H(M(wh),G({ref:M(u),style:{boxSizing:`border-box`,maxHeight:`100%`}},{...e.$attrs,...n}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)],4))}}),kb=P({inheritAttrs:!1,__name:`SelectProvider`,props:{context:{type:Object,required:!0}},setup(e){return vb(e.context),wb(Sb),(e,t)=>I(e.$slots,`default`)}}),Ab={key:1},jb=P({inheritAttrs:!1,__name:`SelectContent`,props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=qm(n,t),i=_b(),a=j();Ki(()=>{a.value=new DocumentFragment});let o=j(),s=K(()=>n.forceMount||i.open.value),c=j(s.value),l;function u(){l&&=(clearTimeout(l),void 0)}return Dr(s,(e,t,n)=>{u(),l=setTimeout(()=>{c.value=s.value,l=void 0}),n(u)}),Xi(u),(e,t)=>s.value||c.value||o.value?.present?(R(),B(M(xh),{key:0,ref_key:`presenceRef`,ref:o,present:s.value},{default:N(()=>[H(Tb,be(gs({...M(r),...e.$attrs})),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)]),_:3},8,[`present`])):a.value?(R(),z(`div`,Ab,[(R(),B(Hr,{to:a.value},[H(kb,{context:M(i)},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`context`])],8,[`to`]))])):W(`v-if`,!0)}}),Mb=P({__name:`SelectIcon`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(R(),B(M(wh),{"aria-hidden":`true`,as:e.as,"as-child":e.asChild},{default:N(()=>[I(e.$slots,`default`,{},()=>[t[0]||=U(`▼`)])]),_:3},8,[`as`,`as-child`]))}}),[Nb,Pb]=Wp(`SelectItem`),Fb=P({__name:`SelectItem`,props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,{disabled:i}=bn(n),a=_b(),o=Cb(),{forwardRef:s,currentElement:c}=Y(),{CollectionItem:l}=vg(),u=K(()=>pb(a.modelValue?.value,n.value,a.by)),d=j(!1),f=j(n.textValue??``),p=fh(void 0,`reka-select-item-text`);async function m(e){e.defaultPrevented||Kp(`select.select`,h,{originalEvent:e,value:n.value})}async function h(e){await $n(),r(`select`,e),!e.defaultPrevented&&(i.value||(a.onValueChange(n.value),a.multiple.value||a.onOpenChange(!1)))}async function g(e){await $n(),!e.defaultPrevented&&(i.value?o.onItemLeave?.():e.currentTarget?.focus({preventScroll:!0}))}async function _(e){await $n(),!e.defaultPrevented&&e.currentTarget===Gp()&&o.onItemLeave?.()}async function v(e){await $n(),!e.defaultPrevented&&(o.searchRef?.value!==``&&e.key===` `||(fb.includes(e.key)&&m(e),e.key===` `&&e.preventDefault()))}if(n.value===``)throw Error(`A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return Ki(()=>{c.value&&o.itemRefCallback(c.value,n.value,n.disabled)}),Pb({value:n.value,disabled:i,textId:p,isSelected:u,onItemTextChange:e=>{f.value=((f.value||e?.textContent)??``).trim()}}),(e,t)=>(R(),B(M(l),{value:{textValue:f.value}},{default:N(()=>[H(M(wh),{ref:M(s),role:`option`,"aria-labelledby":M(p),"data-highlighted":d.value?``:void 0,"aria-selected":u.value,"data-state":u.value?`checked`:`unchecked`,"aria-disabled":M(i)||void 0,"data-disabled":M(i)?``:void 0,tabindex:M(i)?void 0:-1,as:e.as,"as-child":e.asChild,onFocus:t[0]||=e=>d.value=!0,onBlur:t[1]||=e=>d.value=!1,onPointerup:m,onPointerdown:t[2]||=e=>{e.currentTarget.focus({preventScroll:!0})},onTouchend:t[3]||=Yl(()=>{},[`prevent`,`stop`]),onPointermove:g,onPointerleave:_,onKeydown:v},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`aria-labelledby`,`data-highlighted`,`aria-selected`,`data-state`,`aria-disabled`,`data-disabled`,`tabindex`,`as`,`as-child`])]),_:3},8,[`value`]))}}),Ib=P({__name:`SelectItemIndicator`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=Nb();return(e,r)=>M(n).isSelected.value?(R(),B(M(wh),G({key:0,"aria-hidden":`true`},t),{default:N(()=>[I(e.$slots,`default`)]),_:3},16)):W(`v-if`,!0)}}),Lb=P({inheritAttrs:!1,__name:`SelectItemText`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,n=_b(),r=Cb(),i=Nb(),{forwardRef:a,currentElement:o}=Y(),s=K(()=>({value:i.value,disabled:i.disabled.value,textContent:o.value?.textContent??i.value?.toString()??``}));return Ki(()=>{o.value&&(i.onItemTextChange(o.value),r.itemTextRefCallback(o.value,i.value,i.disabled.value),n.onOptionAdd(s.value))}),Xi(()=>{n.onOptionRemove(s.value)}),(e,n)=>(R(),B(M(wh),G({id:M(i).textId,ref:M(a)},{...t,...e.$attrs}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`id`]))}}),Rb=P({__name:`SelectPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(mg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),zb=P({__name:`SelectTrigger`,props:{disabled:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=_b(),{forwardRef:r,currentElement:i}=Y(),a=K(()=>n.disabled?.value||t.disabled);n.contentId||=fh(void 0,`reka-select-content`),Ki(()=>{n.onTriggerChange(i.value)});let{getItems:o}=vg(),{search:s,handleTypeaheadSearch:c,resetTypeahead:l}=gh();function u(){a.value||(n.onOpenChange(!0),l())}function d(e){u(),n.triggerPointerDownPosRef.value={x:Math.round(e.pageX),y:Math.round(e.pageY)}}return(e,t)=>(R(),B(M(Wg),{"as-child":``,reference:e.reference},{default:N(()=>[H(M(wh),{ref:M(r),role:`combobox`,type:e.as===`button`?`button`:void 0,"aria-controls":M(n).contentId,"aria-expanded":M(n).open.value||!1,"aria-required":M(n).required?.value,"aria-autocomplete":`none`,disabled:a.value,dir:M(n)?.dir.value,"data-state":M(n)?.open.value?`open`:`closed`,"data-disabled":a.value?``:void 0,"data-placeholder":M(hb)(M(n).modelValue?.value)?``:void 0,"as-child":e.asChild,as:e.as,onClick:t[0]||=e=>{(e?.currentTarget)?.focus()},onPointerdown:t[1]||=e=>{if(e.pointerType===`touch`)return e.preventDefault();let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(d(e),e.preventDefault())},onPointerup:t[2]||=Yl(e=>{e.pointerType===`touch`&&d(e)},[`prevent`]),onKeydown:t[3]||=e=>{let t=M(s)!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&t&&e.key===` `||(M(c)(e.key,M(o)()),M(db).includes(e.key)&&(u(),e.preventDefault()))}},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`type`,`aria-controls`,`aria-expanded`,`aria-required`,`disabled`,`dir`,`data-state`,`data-disabled`,`data-placeholder`,`as-child`,`as`])]),_:3},8,[`reference`]))}}),Bb=P({__name:`SelectValue`,props:{placeholder:{type:String,required:!1,default:``},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=e,{forwardRef:n,currentElement:r}=Y(),i=_b();Ki(()=>{i.valueElement=r});let a=K(()=>{let e=[],t=Array.from(i.optionsSet.value),n=e=>t.find(t=>pb(e,t.value,i.by));return e=Array.isArray(i.modelValue.value)?i.modelValue.value.map(e=>n(e)?.textContent??``):[n(i.modelValue.value)?.textContent??``],e.filter(Boolean)}),o=K(()=>a.value.length?a.value.join(`, `):t.placeholder);return(e,r)=>(R(),B(M(wh),{ref:M(n),as:e.as,"as-child":e.asChild,style:{pointerEvents:`none`},"data-placeholder":a.value.length?void 0:t.placeholder},{default:N(()=>[I(e.$slots,`default`,{selectedLabel:a.value,modelValue:M(i).modelValue.value},()=>[U(A(o.value),1)])]),_:3},8,[`as`,`as-child`,`data-placeholder`]))}}),Vb=P({__name:`SelectViewport`,props:{nonce:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{nonce:n}=bn(t),r=yy(n),i=Cb(),a=i.position===`item-aligned`?Eb():void 0,{forwardRef:o,currentElement:s}=Y();Ki(()=>{i?.onViewportChange(s.value)});let c=j(0);function l(e){let t=e.currentTarget,{shouldExpandOnScrollRef:n,contentWrapper:r}=a??{};if(n?.value&&r?.value){let e=Math.abs(c.value-t.scrollTop);if(e>0){let n=window.innerHeight-20,i=Number.parseFloat(r.value.style.minHeight),a=Number.parseFloat(r.value.style.height),o=Math.max(i,a);if(o<n){let i=o+e,a=Math.min(n,i),s=i-a;r.value.style.height=`${a}px`,r.value.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,r.value.style.justifyContent=`flex-end`)}}}c.value=t.scrollTop}return(e,n)=>(R(),z(L,null,[H(M(wh),G({ref:M(o),"data-reka-select-viewport":``,role:`presentation`},{...e.$attrs,...t},{style:{position:`relative`,flex:1,overflow:`hidden auto`},onScroll:l}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16),H(M(wh),{as:`style`,nonce:M(r)},{default:N(()=>n[0]||=[U(` /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-reka-select-viewport]::-webkit-scrollbar { display: none; } `)]),_:1,__:[0]},8,[`nonce`])],64))}}),[Hb,Ub]=Wp(`SwitchRoot`),Wb=P({__name:`SwitchRoot`,props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},id:{type:String,required:!1},value:{type:String,required:!1,default:`on`},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:i}=bn(n),a=Cm(n,`modelValue`,r,{defaultValue:n.defaultValue??n.falseValue,passive:n.modelValue===void 0}),o=K(()=>a.value===n.trueValue);function s(){i.value||(a.value=o.value?n.falseValue:n.trueValue)}let{forwardRef:c,currentElement:l}=Y(),u=Gm(l),d=K(()=>n.id&&l.value?document.querySelector(`[for="${n.id}"]`)?.innerText:void 0);return Ub({checked:o,toggleCheck:s,disabled:i}),(e,t)=>(R(),B(M(wh),G(e.$attrs,{id:e.id,ref:M(c),role:`switch`,type:e.as===`button`?`button`:void 0,value:e.value,"aria-label":e.$attrs[`aria-label`]||d.value,"aria-checked":o.value,"aria-required":e.required,"data-state":o.value?`checked`:`unchecked`,"data-disabled":M(i)?``:void 0,"as-child":e.asChild,as:e.as,disabled:M(i),onClick:s,onKeydown:Zl(Yl(s,[`prevent`]),[`enter`])}),{default:N(()=>[I(e.$slots,`default`,{modelValue:M(a),checked:o.value}),M(u)&&e.name?(R(),B(M(xg),{key:0,type:`checkbox`,name:e.name,disabled:M(i),required:e.required,value:e.value,checked:o.value},null,8,[`name`,`disabled`,`required`,`value`,`checked`])):W(`v-if`,!0)]),_:3},16,[`id`,`type`,`value`,`aria-label`,`aria-checked`,`aria-required`,`data-state`,`data-disabled`,`as-child`,`as`,`disabled`,`onKeydown`]))}}),Gb=P({__name:`SwitchThumb`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let t=Hb();return Y(),(e,n)=>(R(),B(M(wh),{"data-state":M(t).checked.value?`checked`:`unchecked`,"data-disabled":M(t).disabled.value?``:void 0,"as-child":e.asChild,as:e.as},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`data-state`,`data-disabled`,`as-child`,`as`]))}}),[Kb,qb]=Wp(`TabsRoot`),Jb=P({__name:`TabsRoot`,props:{defaultValue:{type:null,required:!1},orientation:{type:String,required:!1,default:`horizontal`},dir:{type:String,required:!1},activationMode:{type:String,required:!1,default:`automatic`},modelValue:{type:null,required:!1},unmountOnHide:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{orientation:i,unmountOnHide:a,dir:o}=bn(n),s=zm(o);Y();let c=Cm(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),l=j(),u=dn(new Set);return qb({modelValue:c,changeModelValue:e=>{c.value=e},orientation:i,dir:s,unmountOnHide:a,activationMode:n.activationMode,baseId:fh(void 0,`reka-tabs`),tabsList:l,contentIds:u,registerContent:e=>{u.value=new Set([...u.value,e])},unregisterContent:e=>{let t=new Set(u.value);t.delete(e),u.value=t}}),(e,t)=>(R(),B(M(wh),{dir:M(s),"data-orientation":M(i),"as-child":e.asChild,as:e.as},{default:N(()=>[I(e.$slots,`default`,{modelValue:M(c)})]),_:3},8,[`dir`,`data-orientation`,`as-child`,`as`]))}});function Yb(e,t){return`${e}-trigger-${t}`}function Xb(e,t){return`${e}-content-${t}`}var Zb=P({__name:`TabsList`,props:{loop:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let{loop:t}=bn(e),{forwardRef:n,currentElement:r}=Y(),i=Kb();return i.tabsList=r,(e,r)=>(R(),B(M(Cy),{"as-child":``,orientation:M(i).orientation.value,dir:M(i).dir.value,loop:M(t)},{default:N(()=>[H(M(wh),{ref:M(n),role:`tablist`,"as-child":e.asChild,as:e.as,"aria-orientation":M(i).orientation.value},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`aria-orientation`])]),_:3},8,[`orientation`,`dir`,`loop`]))}}),Qb=P({__name:`TabsTrigger`,props:{value:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,{forwardRef:n}=Y(),r=Kb(),i=K(()=>Yb(r.baseId,t.value)),a=K(()=>r.contentIds.value.has(t.value)?Xb(r.baseId,t.value):void 0),o=K(()=>t.value===r.modelValue.value);return(e,t)=>(R(),B(M(wy),{"as-child":``,focusable:!e.disabled,active:o.value},{default:N(()=>[H(M(wh),{id:i.value,ref:M(n),role:`tab`,type:e.as===`button`?`button`:void 0,as:e.as,"as-child":e.asChild,"aria-selected":o.value?`true`:`false`,"aria-controls":a.value,"data-state":o.value?`active`:`inactive`,disabled:e.disabled,"data-disabled":e.disabled?``:void 0,"data-orientation":M(r).orientation.value,onMousedown:t[0]||=Yl(t=>{!e.disabled&&t.ctrlKey===!1?M(r).changeModelValue(e.value):t.preventDefault()},[`left`]),onKeydown:t[1]||=Zl(t=>M(r).changeModelValue(e.value),[`enter`,`space`]),onFocus:t[2]||=()=>{let t=M(r).activationMode!==`manual`;!o.value&&!e.disabled&&t&&M(r).changeModelValue(e.value)}},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`id`,`type`,`as`,`as-child`,`aria-selected`,`aria-controls`,`data-state`,`disabled`,`data-disabled`,`data-orientation`])]),_:3},8,[`focusable`,`active`]))}}),[$b,ex]=Wp(`TooltipProvider`),tx=P({inheritAttrs:!1,__name:`TooltipProvider`,props:{delayDuration:{type:Number,required:!1,default:700},skipDelayDuration:{type:Number,required:!1,default:300},disableHoverableContent:{type:Boolean,required:!1,default:!1},disableClosingTrigger:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:!1},content:{type:Object,required:!1}},setup(e){let{delayDuration:t,skipDelayDuration:n,disableHoverableContent:r,disableClosingTrigger:i,ignoreNonKeyboardFocus:a,disabled:o,content:s}=bn(e);Y();let c=j(!0),l=j(!1),{start:u,stop:d}=fm(()=>{c.value=!0},n,{immediate:!1});return ex({isOpenDelayed:c,delayDuration:t,onOpen(){d(),c.value=!1},onClose(){u()},isPointerInTransitRef:l,disableHoverableContent:r,disableClosingTrigger:i,disabled:o,ignoreNonKeyboardFocus:a,content:s}),(e,t)=>I(e.$slots,`default`)}}),nx=`tooltip.open`,[rx,ix]=Wp(`TooltipRoot`),ax=P({__name:`TooltipRoot`,props:{defaultOpen:{type:Boolean,required:!1,default:!1},open:{type:Boolean,required:!1,default:void 0},delayDuration:{type:Number,required:!1,default:void 0},disableHoverableContent:{type:Boolean,required:!1,default:void 0},disableClosingTrigger:{type:Boolean,required:!1,default:void 0},disabled:{type:Boolean,required:!1,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,required:!1,default:void 0}},emits:[`update:open`],setup(e,{emit:t}){let n=e,r=t;Y();let i=$b(),a=K(()=>n.disableHoverableContent??i.disableHoverableContent.value),o=K(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),s=K(()=>n.disabled??i.disabled.value),c=K(()=>n.delayDuration??i.delayDuration.value),l=K(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),u=Cm(n,`open`,r,{defaultValue:n.defaultOpen,passive:n.open===void 0});Dr(u,e=>{i.onClose&&(e?(i.onOpen(),document.dispatchEvent(new CustomEvent(nx))):i.onClose())});let d=j(!1),f=j(),p=K(()=>u.value?d.value?`delayed-open`:`instant-open`:`closed`),{start:m,stop:h}=fm(()=>{d.value=!0,u.value=!0},c,{immediate:!1});function g(){h(),d.value=!1,u.value=!0}function _(){h(),u.value=!1}function v(){m()}return ix({contentId:``,open:u,stateAttribute:p,trigger:f,onTriggerChange(e){f.value=e},onTriggerEnter(){i.isOpenDelayed.value?v():g()},onTriggerLeave(){a.value?_():h()},onOpen:g,onClose:_,disableHoverableContent:a,disableClosingTrigger:o,disabled:s,ignoreNonKeyboardFocus:l}),(e,t)=>(R(),B(M(Ug),null,{default:N(()=>[I(e.$slots,`default`,{open:M(u)})]),_:3}))}}),ox=P({__name:`TooltipContentImpl`,props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1,default:void 0},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1,default:void 0},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1,default:void 0},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=t,i=rx(),a=$b(),{forwardRef:o,currentElement:s}=Y(),c=K(()=>n.ariaLabel||s.value?.textContent),l=K(()=>{let{ariaLabel:e,...t}=n;return Nm(t,a.content.value??{},{side:`top`,sideOffset:0,align:`center`,avoidCollisions:!0,collisionBoundary:[],collisionPadding:0,arrowPadding:0,sticky:`partial`,hideWhenDetached:!1})});return Ki(()=>{gm(window,`scroll`,e=>{e.target?.contains(i.trigger.value)&&i.onClose()},{capture:!0}),gm(window,nx,i.onClose)}),(e,t)=>(R(),B(M(Ih),{"as-child":``,"disable-outside-pointer-events":!1,onEscapeKeyDown:t[0]||=e=>r(`escapeKeyDown`,e),onPointerDownOutside:t[1]||=e=>{M(i).disableClosingTrigger.value&&M(i).trigger.value?.contains(e.target)&&e.preventDefault(),r(`pointerDownOutside`,e)},onFocusOutside:t[2]||=Yl(()=>{},[`prevent`]),onDismiss:t[3]||=e=>M(i).onClose()},{default:N(()=>[H(M(ny),G({ref:M(o),"data-state":M(i).stateAttribute.value},{...e.$attrs,...l.value},{style:{"--reka-tooltip-content-transform-origin":`var(--reka-popper-transform-origin)`,"--reka-tooltip-content-available-width":`var(--reka-popper-available-width)`,"--reka-tooltip-content-available-height":`var(--reka-popper-available-height)`,"--reka-tooltip-trigger-width":`var(--reka-popper-anchor-width)`,"--reka-tooltip-trigger-height":`var(--reka-popper-anchor-height)`}}),{default:N(()=>[I(e.$slots,`default`),H(M(yg),{id:M(i).contentId,role:`tooltip`},{default:N(()=>[U(A(c.value),1)]),_:1},8,[`id`])]),_:3},16,[`data-state`])]),_:3}))}}),sx=P({__name:`TooltipContentHoverable`,props:{ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},setup(e){let t=Km(e),{forwardRef:n,currentElement:r}=Y(),{trigger:i,onClose:a}=rx(),o=$b(),{isPointerInTransit:s,onPointerExit:c}=Jm(i,r);return o.isPointerInTransitRef=s,c(()=>{a()}),(e,r)=>(R(),B(ox,G({ref:M(n)},M(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),cx=P({__name:`TooltipContent`,props:{forceMount:{type:Boolean,required:!1},ariaLabel:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=t,i=rx(),a=qm(n,r),{forwardRef:o}=Y();return(e,t)=>(R(),B(M(xh),{present:e.forceMount||M(i).open.value},{default:N(()=>[(R(),B(aa(M(i).disableHoverableContent.value?ox:sx),G({ref:M(o)},M(a)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))]),_:3},8,[`present`]))}}),lx=P({__name:`TooltipPortal`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e;return(e,n)=>(R(),B(M(mg),be(gs(t)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16))}}),ux=P({__name:`TooltipTrigger`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(e){let t=e,n=rx(),r=$b();n.contentId||=fh(void 0,`reka-tooltip-content`);let{forwardRef:i,currentElement:a}=Y(),o=j(!1),s=j(!1),c=K(()=>n.disabled.value?{}:{click:h,focus:p,pointermove:d,pointerleave:f,pointerdown:u,blur:m});Ki(()=>{n.onTriggerChange(a.value)});function l(){setTimeout(()=>{o.value=!1},1)}function u(){n.open&&!n.disableClosingTrigger.value&&n.onClose(),o.value=!0,document.addEventListener(`pointerup`,l,{once:!0})}function d(e){e.pointerType!==`touch`&&!s.value&&!r.isPointerInTransitRef.value&&(n.onTriggerEnter(),s.value=!0)}function f(){n.onTriggerLeave(),s.value=!1}function p(e){o.value||n.ignoreNonKeyboardFocus.value&&!e.target.matches?.(`:focus-visible`)||n.onOpen()}function m(){n.onClose()}function h(){n.disableClosingTrigger.value||n.onClose()}return(e,r)=>(R(),B(M(Wg),{"as-child":``,reference:e.reference},{default:N(()=>[H(M(wh),G({ref:M(i),"aria-describedby":M(n).open.value?M(n).contentId:void 0,"data-state":M(n).stateAttribute.value,as:e.as,"as-child":t.asChild,"data-grace-area-trigger":``},da(c.value)),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`aria-describedby`,`data-state`,`as`,`as-child`])]),_:3},8,[`reference`]))}}),dx=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},fx=(e,t)=>({classGroupId:e,validator:t}),px=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),mx=`-`,hx=[],gx=`arbitrary..`,_x=e=>{let t=bx(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return yx(e);let n=e.split(mx);return vx(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?dx(i,t):t:i||hx}return n[e]||hx}}},vx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=vx(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(mx):e.slice(t).join(mx),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},yx=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?gx+r:void 0})(),bx=e=>{let{theme:t,classGroups:n}=e;return xx(n,t)},xx=(e,t)=>{let n=px();for(let r in e){let i=e[r];Sx(i,n,r,t)}return n},Sx=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Cx(i,t,n,r)}},Cx=(e,t,n,r)=>{if(typeof e==`string`){wx(e,t,n);return}if(typeof e==`function`){Tx(e,t,n,r);return}Ex(e,t,n,r)},wx=(e,t,n)=>{let r=e===``?t:Dx(t,e);r.classGroupId=n},Tx=(e,t,n,r)=>{if(Ox(e)){Sx(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(fx(n,e))},Ex=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Sx(o,Dx(t,a),n,r)}},Dx=(e,t)=>{let n=e,r=t.split(mx),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=px(),n.nextPart.set(t,i)),n=i}return n},Ox=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,kx=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ax=`!`,jx=`:`,Mx=[],Nx=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Px=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===jx){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ax)?(c=s.slice(0,-1),l=!0):s.startsWith(Ax)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Nx(t,l,c,u)};if(t){let e=t+jx,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Nx(Mx,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Fx=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ix=e=>({cache:kx(e.cacheSize),parseClassName:Px(e),sortModifiers:Fx(e),postfixLookupClassGroupIds:Lx(e),..._x(e)}),Lx=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},Rx=/\s+/,zx=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Rx),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ax:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Bx=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Vx(n))&&(i&&(i+=` `),i+=r);return i},Vx=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Vx(e[r]))&&(n&&(n+=` `),n+=t);return n},Hx=(e,...t)=>{let n,r,i,a,o=o=>(n=Ix(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=zx(e,n);return i(e,a),a};return a=o,(...e)=>a(Bx(...e))},Ux=[],Wx=e=>{let t=t=>t[e]||Ux;return t.isThemeGetter=!0,t},Gx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qx=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Jx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Yx=/\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$/,Xx=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zx=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qx=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$x=e=>qx.test(e),eS=e=>!!e&&!Number.isNaN(Number(e)),tS=e=>!!e&&Number.isInteger(Number(e)),nS=e=>e.endsWith(`%`)&&eS(e.slice(0,-1)),rS=e=>Jx.test(e),iS=()=>!0,aS=e=>Yx.test(e)&&!Xx.test(e),oS=()=>!1,sS=e=>Zx.test(e),cS=e=>Qx.test(e),lS=e=>!X(e)&&!Z(e),uS=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),dS=e=>ES(e,AS,oS),X=e=>Gx.test(e),fS=e=>ES(e,jS,aS),pS=e=>ES(e,MS,eS),mS=e=>ES(e,PS,iS),hS=e=>ES(e,NS,oS),gS=e=>ES(e,OS,oS),_S=e=>ES(e,kS,cS),vS=e=>ES(e,FS,sS),Z=e=>Kx.test(e),yS=e=>DS(e,jS),bS=e=>DS(e,NS),xS=e=>DS(e,OS),SS=e=>DS(e,AS),CS=e=>DS(e,kS),wS=e=>DS(e,FS,!0),TS=e=>DS(e,PS,!0),ES=(e,t,n)=>{let r=Gx.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},DS=(e,t,n=!1)=>{let r=Kx.exec(e);return r?r[1]?t(r[1]):n:!1},OS=e=>e===`position`||e===`percentage`,kS=e=>e===`image`||e===`url`,AS=e=>e===`length`||e===`size`||e===`bg-size`,jS=e=>e===`length`,MS=e=>e===`number`,NS=e=>e===`family-name`,PS=e=>e===`number`||e===`weight`,FS=e=>e===`shadow`,IS=Hx(()=>{let e=Wx(`color`),t=Wx(`font`),n=Wx(`text`),r=Wx(`font-weight`),i=Wx(`tracking`),a=Wx(`leading`),o=Wx(`breakpoint`),s=Wx(`container`),c=Wx(`spacing`),l=Wx(`radius`),u=Wx(`shadow`),d=Wx(`inset-shadow`),f=Wx(`text-shadow`),p=Wx(`drop-shadow`),m=Wx(`blur`),h=Wx(`perspective`),g=Wx(`aspect`),_=Wx(`ease`),v=Wx(`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(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],T=()=>[$x,`full`,`auto`,...w()],ee=()=>[tS,`none`,`subgrid`,Z,X],E=()=>[`auto`,{span:[`full`,tS,Z,X]},tS,Z,X],te=()=>[tS,`auto`,Z,X],ne=()=>[`auto`,`min`,`max`,`fr`,Z,X],re=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],D=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...w()],ae=()=>[$x,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],oe=()=>[$x,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],se=()=>[$x,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],O=()=>[e,Z,X],ce=()=>[...b(),xS,gS,{position:[Z,X]}],le=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ue=()=>[`auto`,`cover`,`contain`,SS,dS,{size:[Z,X]}],de=()=>[nS,yS,fS],fe=()=>[``,`none`,`full`,l,Z,X],pe=()=>[``,eS,yS,fS],me=()=>[`solid`,`dashed`,`dotted`,`double`],he=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ge=()=>[eS,nS,xS,gS],_e=()=>[``,`none`,m,Z,X],ve=()=>[`none`,eS,Z,X],ye=()=>[`none`,eS,Z,X],k=()=>[eS,Z,X],be=()=>[$x,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[rS],breakpoint:[rS],color:[iS],container:[rS],"drop-shadow":[rS],ease:[`in`,`out`,`in-out`],font:[lS],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[rS],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[rS],shadow:[rS],spacing:[`px`,eS],text:[rS],"text-shadow":[rS],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,$x,X,Z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Z,X]}],"container-named":[uS],columns:[{columns:[eS,X,Z,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:[tS,`auto`,Z,X]}],basis:[{basis:[$x,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[eS,$x,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,eS,Z,X]}],shrink:[{shrink:[``,eS,Z,X]}],order:[{order:[tS,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...re(),`normal`]}],"justify-items":[{"justify-items":[...D(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...D()]}],"align-content":[{content:[`normal`,...re()]}],"align-items":[{items:[...D(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...D(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":re()}],"place-items":[{"place-items":[...D(),`baseline`]}],"place-self":[{"place-self":[`auto`,...D()]}],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:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:ae()}],"inline-size":[{inline:[`auto`,...oe()]}],"min-inline-size":[{"min-inline":[`auto`,...oe()]}],"max-inline-size":[{"max-inline":[`none`,...oe()]}],"block-size":[{block:[`auto`,...se()]}],"min-block-size":[{"min-block":[`auto`,...se()]}],"max-block-size":[{"max-block":[`none`,...se()]}],w:[{w:[s,`screen`,...ae()]}],"min-w":[{"min-w":[s,`screen`,`none`,...ae()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...ae()]}],h:[{h:[`screen`,`lh`,...ae()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...ae()]}],"max-h":[{"max-h":[`screen`,`lh`,...ae()]}],"font-size":[{text:[`base`,n,yS,fS]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,TS,mS]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,nS,X]}],"font-family":[{font:[bS,hS,t]}],"font-features":[{"font-features":[X]}],"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,Z,X]}],"line-clamp":[{"line-clamp":[eS,`none`,Z,pS]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...me(),`wavy`]}],"text-decoration-thickness":[{decoration:[eS,`from-font`,`auto`,Z,fS]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[eS,`auto`,Z,X]}],"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:[tS,Z,X]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],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`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ce()}],"bg-repeat":[{bg:le()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},tS,Z,X],radial:[``,Z,X],conic:[tS,Z,X]},CS,_S]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:de()}],"gradient-via-pos":[{via:de()}],"gradient-to-pos":[{to:de()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...me(),`hidden`,`none`]}],"divide-style":[{divide:[...me(),`hidden`,`none`]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...me(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[eS,Z,X]}],"outline-w":[{outline:[``,eS,yS,fS]}],"outline-color":[{outline:O()}],shadow:[{shadow:[``,`none`,u,wS,vS]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":[`none`,d,wS,vS]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:pe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[eS,fS]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":[`none`,f,wS,vS]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[eS,Z,X]}],"mix-blend":[{"mix-blend":[...he(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":he()}],"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":[eS]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":[eS]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ce()}],"mask-repeat":[{mask:le()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:_e()}],brightness:[{brightness:[eS,Z,X]}],contrast:[{contrast:[eS,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,wS,vS]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:[``,eS,Z,X]}],"hue-rotate":[{"hue-rotate":[eS,Z,X]}],invert:[{invert:[``,eS,Z,X]}],saturate:[{saturate:[eS,Z,X]}],sepia:[{sepia:[``,eS,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":_e()}],"backdrop-brightness":[{"backdrop-brightness":[eS,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[eS,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,eS,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[eS,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,eS,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[eS,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[eS,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,eS,Z,X]}],"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`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[eS,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[eS,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ve()}],"rotate-x":[{"rotate-x":ve()}],"rotate-y":[{"rotate-y":ve()}],"rotate-z":[{"rotate-z":ve()}],scale:[{scale:ye()}],"scale-x":[{"scale-x":ye()}],"scale-y":[{"scale-y":ye()}],"scale-z":[{"scale-z":ye()}],"scale-3d":[`scale-3d`],skew:[{skew:k()}],"skew-x":[{"skew-x":k()}],"skew-y":[{"skew-y":k()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:be()}],"translate-x":[{"translate-x":be()}],"translate-y":[{"translate-y":be()}],"translate-z":[{"translate-z":be()}],"translate-none":[`translate-none`],zoom:[{zoom:[tS,Z,X]}],accent:[{accent:O()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:O()}],"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`,Z,X]}],"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":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"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`,Z,X]}],fill:[{fill:[`none`,...O()]}],"stroke-w":[{stroke:[eS,yS,fS,pS]}],stroke:[{stroke:[`none`,...O()]}],"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`]}});function LS(...e){return IS(Fp(e))}async function RS(e){if(navigator.clipboard){await navigator.clipboard.writeText(e);return}let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;top:-9999px;left:-9999px;opacity:0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)}var Q=P({__name:`Button`,props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:`button`}},setup(e){let t=e;return(n,r)=>(R(),B(M(wh),{as:e.as,"as-child":e.asChild,class:k(M(LS)(M(zS)({variant:e.variant,size:e.size}),t.class))},{default:N(()=>[I(n.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`]))}}),zS=Rp(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,outline:`border border-input bg-background hover:bg-accent hover:text-accent-foreground`,destructive:`bg-destructive text-white hover:bg-destructive/90`},size:{sm:`h-8 rounded-md px-3 text-xs`,default:`h-9 px-4 py-2`,icon:`size-9`}},defaultVariants:{variant:`default`,size:`default`}}),BS=P({__name:`Input`,props:ka({class:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=Za(e,`modelValue`);return(e,n)=>_r((R(),z(`input`,{"onUpdate:modelValue":n[0]||=e=>t.value=e,class:k(M(LS)(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,e.$props.class))},null,2)),[[Fl,t.value]])}}),VS=P({__name:`SelectTrigger`,props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Km(t);return(e,r)=>(R(),B(M(zb),G(M(n),{class:M(LS)(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,t.class)}),{default:N(()=>[I(e.$slots,`default`),H(M(Mb),{"as-child":``},{default:N(()=>[H(M(ku),{class:`size-4 opacity-50`})]),_:1})]),_:3},16,[`class`]))}}),HS=P({__name:`SelectContent`,props:{forceMount:{type:Boolean},position:{default:`popper`},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:[`closeAutoFocus`,`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=qm(n,t);return(t,i)=>(R(),B(M(Rb),null,{default:N(()=>[H(M(jb),G(M(r),{class:M(LS)(`relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e.position===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,n.class)}),{default:N(()=>[H(M(Vb),{class:k(M(LS)(`p-1`,e.position===`popper`&&`h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)]`))},{default:N(()=>[I(t.$slots,`default`)]),_:3},8,[`class`])]),_:3},16,[`class`])]),_:3}))}}),US={class:`absolute left-2 flex size-3.5 items-center justify-center`},WS=P({__name:`SelectItem`,props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Km(t);return(e,r)=>(R(),B(M(Fb),G(M(n),{class:M(LS)(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t.class)}),{default:N(()=>[V(`span`,US,[H(M(Ib),null,{default:N(()=>[H(M(Ou),{class:`size-4`})]),_:1})]),H(M(Lb),null,{default:N(()=>[I(e.$slots,`default`)]),_:3})]),_:3},16,[`class`]))}}),GS=P({__name:`TabsList`,props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(R(),B(M(Zb),G(t,{class:M(LS)(`inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground`,t.class)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`class`]))}}),KS=P({__name:`TabsTrigger`,props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Km(t);return(e,r)=>(R(),B(M(Qb),G(M(n),{class:M(LS)(`inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow`,t.class)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`class`]))}}),qS=P({__name:`PopoverContent`,props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{default:`center`},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=qm(n,t);return(e,t)=>(R(),B(M($y),null,{default:N(()=>[H(M(Qy),G(M(r),{class:M(LS)(`z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,n.class)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}}),JS=P({__name:`Badge`,props:{variant:{},class:{}},setup(e){return(t,n)=>(R(),z(`span`,{class:k(M(LS)(M(YS)({variant:e.variant}),t.$props.class))},[I(t.$slots,`default`)],2))}}),YS=Rp(`inline-flex items-center gap-1 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground`,secondary:`border-transparent bg-secondary text-secondary-foreground`,outline:`text-foreground`,destructive:`border-transparent bg-destructive text-white`,source:`border-transparent bg-state-source/15 text-state-source`,machine:`border-transparent bg-state-machine/15 text-state-machine`,reviewed:`border-transparent bg-state-reviewed/15 text-state-reviewed`,"needs-review":`border-transparent bg-state-needs-review/15 text-state-needs-review`}},defaultVariants:{variant:`default`}}),XS=P({__name:`Switch`,props:{defaultValue:{},modelValue:{},disabled:{type:Boolean},id:{},value:{},trueValue:{},falseValue:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=qm(n,t);return(e,t)=>(R(),B(M(Wb),G(M(r),{class:M(LS)(`peer inline-flex h-5 w-9 shrink-0 items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input`,n.class)}),{default:N(()=>[H(M(Gb),{class:`pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`})]),_:1},16,[`class`]))}}),ZS={class:`flex flex-col gap-3`},QS=[`aria-checked`,`onClick`],$S=[`aria-checked`],eC=[`aria-checked`,`disabled`],tC={key:0,class:`ml-[30px] text-[11px] text-muted-foreground`},nC=[`aria-checked`],rC={class:`border-t pt-2`},iC=[`aria-checked`,`onClick`],aC={class:`border-t pt-2`},oC=[`aria-checked`],sC={class:`border-t pt-2`},cC=[`aria-checked`,`disabled`,`onClick`],lC={class:`truncate`},uC=P({__name:`FilterMenu`,props:{states:{},issues:{},enabled:{},plurality:{},emptySource:{type:Boolean},aiContextUnreviewed:{type:Boolean},noUsages:{type:Boolean},skipTranslate:{type:Boolean},scanIndexed:{type:Boolean}},emits:[`update:states`,`update:issues`,`update:enabled`,`update:plurality`,`update:emptySource`,`update:aiContextUnreviewed`,`update:noUsages`,`update:skipTranslate`],setup(e,{emit:t}){let n=e,r=t,i=K(()=>new Set(n.enabled));function a(e){r(`update:states`,n.states.includes(e)?n.states.filter(t=>t!==e):[...n.states,e])}function o(e){r(`update:plurality`,n.plurality.includes(e)?n.plurality.filter(t=>t!==e):[...n.plurality,e])}function s(e){i.value.has(e)&&r(`update:issues`,n.issues.includes(e)?n.issues.filter(t=>t!==e):[...n.issues,e])}function c(e,t){t?i.value.has(e)||r(`update:enabled`,[...n.enabled,e]):(r(`update:enabled`,n.enabled.filter(t=>t!==e)),n.issues.includes(e)&&r(`update:issues`,n.issues.filter(t=>t!==e)))}return(t,n)=>(R(),z(`div`,ZS,[V(`div`,null,[n[7]||=V(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Status`,-1),(R(!0),z(L,null,F(M(up),t=>(R(),z(`button`,{key:t,type:`button`,role:`checkbox`,"aria-checked":e.states.includes(t),class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:e=>a(t)},[V(`span`,{class:k([`flex size-4 items-center justify-center rounded border transition-colors`,e.states.includes(t)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.states.includes(t)?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),U(` `+A(M(pp)[t]),1)],8,QS))),128)),V(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.emptySource,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:n[0]||=t=>r(`update:emptySource`,!e.emptySource)},[V(`span`,{class:k([`flex size-4 items-center justify-center rounded border transition-colors`,e.emptySource?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.emptySource?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),n[4]||=U(` Empty source `,-1)],8,$S),V(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.noUsages,disabled:!e.scanIndexed,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm enabled:hover:bg-accent disabled:cursor-not-allowed disabled:opacity-50`,onClick:n[1]||=t=>r(`update:noUsages`,!e.noUsages)},[V(`span`,{class:k([`flex size-4 items-center justify-center rounded border transition-colors`,e.noUsages?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.noUsages?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),n[5]||=U(` Unused `,-1)],8,eC),e.scanIndexed?W(``,!0):(R(),z(`p`,tC,`Run a scan first`)),V(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.skipTranslate,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:n[2]||=t=>r(`update:skipTranslate`,!e.skipTranslate)},[V(`span`,{class:k([`flex size-4 items-center justify-center rounded border transition-colors`,e.skipTranslate?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.skipTranslate?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),n[6]||=U(` Skip-translate `,-1)],8,nC)]),V(`div`,rC,[n[8]||=V(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Type`,-1),(R(!0),z(L,null,F(M(dp),t=>(R(),z(`button`,{key:t,type:`button`,role:`checkbox`,"aria-checked":e.plurality.includes(t),class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:e=>o(t)},[V(`span`,{class:k([`flex size-4 items-center justify-center rounded border transition-colors`,e.plurality.includes(t)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.plurality.includes(t)?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),U(` `+A(M(mp)[t]),1)],8,iC))),128))]),V(`div`,aC,[n[10]||=V(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Context`,-1),V(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.aiContextUnreviewed,class:`flex w-full items-center gap-2 rounded px-1.5 py-1 text-sm hover:bg-accent`,onClick:n[3]||=t=>r(`update:aiContextUnreviewed`,!e.aiContextUnreviewed)},[V(`span`,{class:k([`flex size-4 items-center justify-center rounded border transition-colors`,e.aiContextUnreviewed?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.aiContextUnreviewed?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),H(M(yd),{class:`size-3.5 text-muted-foreground`}),n[9]||=U(` AI context (unreviewed) `,-1)],8,oC)]),V(`div`,sC,[n[11]||=V(`p`,{class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Issues`,-1),n[12]||=V(`p`,{class:`mb-1.5 text-[11px] text-muted-foreground`},`Toggle a check to run it; tick its box to filter by it.`,-1),(R(!0),z(L,null,F(M(cp),t=>(R(),z(`div`,{key:t,class:`flex items-center gap-2 py-0.5`},[V(`button`,{type:`button`,role:`checkbox`,"aria-checked":e.issues.includes(t),class:`flex min-w-0 flex-1 items-center gap-2 rounded px-1.5 py-1 text-sm disabled:opacity-50 enabled:hover:bg-accent`,disabled:!i.value.has(t),onClick:e=>s(t)},[V(`span`,{class:k([`flex size-4 shrink-0 items-center justify-center rounded border transition-colors`,e.issues.includes(t)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[e.issues.includes(t)?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),V(`span`,lC,A(M(fp)[t]),1)],8,cC),H(M(XS),{"model-value":i.value.has(t),"aria-label":`Enable ${M(fp)[t]} check`,"onUpdate:modelValue":e=>c(t,e)},null,8,[`model-value`,`aria-label`,`onUpdate:modelValue`])]))),128))])]))}}),dC={class:`pointer-events-none fixed bottom-4 right-4 z-[200] flex w-80 flex-col gap-2`},fC=[`onClick`],pC=((e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n})(P({__name:`Toaster`,setup(e){let t=vC();return(e,n)=>(R(),B(Hr,{to:`body`},[V(`div`,dC,[H(wl,{name:`toast`},{default:N(()=>[(R(!0),z(L,null,F(M(t).toasts,e=>(R(),z(`button`,{key:e.id,type:`button`,class:k(M(LS)(`pointer-events-auto flex items-center rounded-md border bg-card px-4 py-3 text-left text-sm text-card-foreground shadow-lg`,e.variant===`success`&&`border-state-reviewed/50 text-state-reviewed`,e.variant===`error`&&`border-destructive/50 text-destructive`)),onClick:t=>M(_C)(e.id)},A(e.message),11,fC))),128))]),_:1})])]))}}),[[`__scopeId`,`data-v-e9967100`]]),mC=Xt({toasts:[]}),hC=0;function gC(e,t,n=4e3){let r=hC++;mC.toasts.push({id:r,message:e,variant:t}),window.setTimeout(()=>_C(r),n)}function _C(e){let t=mC.toasts.findIndex(t=>t.id===e);t!==-1&&mC.toasts.splice(t,1)}var $=Object.assign(e=>gC(e,`default`),{success:e=>gC(e,`success`),error:e=>gC(e,`error`),info:e=>gC(e,`default`)});function vC(){return mC}var yC=P({__name:`Label`,props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(R(),B(M(ub),{for:t.for,class:k(M(LS)(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,t.class))},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`for`,`class`]))}}),bC=P({__name:`DialogContent`,props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=qm(n,t);return(e,t)=>(R(),B(M(hg),null,{default:N(()=>[H(M(pg),{class:`fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`}),H(M(ug),G(M(r),{class:M(LS)(`fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-card p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-lg`,n.class)}),{default:N(()=>[I(e.$slots,`default`),H(M(kh),{class:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`},{default:N(()=>[H(M(Ad),{class:`size-4`}),t[0]||=V(`span`,{class:`sr-only`},`Close`,-1)]),_:1})]),_:3},16,[`class`])]),_:3}))}}),xC=P({__name:`DialogHeader`,props:{class:{}},setup(e){return(e,t)=>(R(),z(`div`,{class:k(M(LS)(`flex flex-col gap-1.5 text-center sm:text-left`,e.$props.class))},[I(e.$slots,`default`)],2))}}),SC=P({__name:`DialogFooter`,props:{class:{}},setup(e){return(e,t)=>(R(),z(`div`,{class:k(M(LS)(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e.$props.class))},[I(e.$slots,`default`)],2))}}),CC=P({__name:`DialogTitle`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(R(),B(M(gg),{class:k(M(LS)(`text-lg font-semibold leading-none tracking-tight`,t.class))},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`class`]))}}),wC=P({__name:`DialogDescription`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(R(),B(M(dg),{class:k(M(LS)(`text-sm text-muted-foreground`,t.class))},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`class`]))}}),TC=P({__name:`DropdownMenuContent`,props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`closeAutoFocus`],setup(e,{emit:t}){let n=e,r=qm(n,t);return(e,t)=>(R(),B(M(sb),null,{default:N(()=>[H(M(ib),G(M(r),{class:M(LS)(`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,n.class)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}}),EC=P({__name:`DropdownMenuItem`,props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e,n=Km(t);return(e,r)=>(R(),B(M(ab),G(M(n),{class:M(LS)(`relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4`,t.class)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`class`]))}}),DC=P({__name:`DropdownMenuLabel`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(R(),B(M(ob),{class:k(M(LS)(`px-2 py-1.5 text-sm font-semibold`,t.class))},{default:N(()=>[I(e.$slots,`default`)]),_:3},8,[`class`]))}}),OC=P({__name:`DropdownMenuSeparator`,props:{asChild:{type:Boolean},as:{},class:{}},setup(e){let t=e;return(e,n)=>(R(),B(M(cb),{class:k(M(LS)(`-mx-1 my-1 h-px bg-border`,t.class))},null,8,[`class`]))}}),kC={class:`flex flex-wrap items-center gap-2`},AC={class:`grid gap-2`},jC={class:`flex flex-wrap gap-2`},MC=P({__name:`SelectionBar`,props:{keys:{},locales:{},scopeLabel:{},tagsOnSelection:{}},emits:[`changed`,`clear`,`translate`,`build-context`],setup(e,{emit:t}){let n=e,r=t,i=j(!1),a=j(!1),o=j(!1),s=j(!1),c=j(!1),l=j(``);Dr(s,e=>{e||(l.value=``)});async function u(e,t,n=!1){i.value=!0;try{await e(),$.success(t),r(`changed`),n&&r(`clear`),a.value=!1,o.value=!1,s.value=!1,c.value=!1}catch(e){$.error(e.message||`Bulk action failed`)}finally{i.value=!1}}let d=()=>u(()=>Fd(n.keys,n.locales),`Cleared translations for ${n.keys.length} key${n.keys.length===1?``:`s`}`),f=()=>u(()=>Id(n.keys),`Deleted ${n.keys.length} key${n.keys.length===1?``:`s`}`,!0),p=e=>u(()=>Ld(n.keys,n.locales,e),`Marked ${n.keys.length} key${n.keys.length===1?``:`s`} ${e}`),m=e=>u(()=>Rd(n.keys,{skipTranslate:e}),e?`Marked skip-translate`:`Cleared skip-translate`),h=()=>u(()=>Rd(n.keys,{clearContext:!0}),`Cleared context for ${n.keys.length} key${n.keys.length===1?``:`s`}`),g=()=>{let e=l.value.trim();if(!(!e||i.value))return u(()=>Rd(n.keys,{addTags:[e]}),`Added tag "${e}"`).then(()=>l.value=``)},_=e=>u(()=>Rd(n.keys,{removeTags:[e]}),`Removed tag "${e}"`);return(t,n)=>(R(),z(`div`,kC,[H(M(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-clear-trigger`,disabled:i.value||!e.keys.length,onClick:n[0]||=e=>a.value=!0},{default:N(()=>[H(M(zu),{class:`size-4`}),n[19]||=U(` Clear translations `,-1)]),_:1},8,[`disabled`]),H(M(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-translate`,disabled:i.value||!e.keys.length,onClick:n[1]||=e=>r(`translate`)},{default:N(()=>[H(M(yd),{class:`size-4`}),n[20]||=U(` Translate `,-1)]),_:1},8,[`disabled`]),H(M(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-build-context`,disabled:i.value||!e.keys.length,onClick:n[2]||=e=>r(`build-context`)},{default:N(()=>[H(M(kd),{class:`size-4`}),n[21]||=U(` Build context `,-1)]),_:1},8,[`disabled`]),H(M(rb),null,{default:N(()=>[H(M(lb),{"as-child":``},{default:N(()=>[H(M(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5`,"data-testid":`bulk-set-trigger`,disabled:i.value||!e.keys.length},{default:N(()=>[n[22]||=U(` Set `,-1),H(M(ku),{class:`size-4`})]),_:1},8,[`disabled`])]),_:1}),H(M(TC),{align:`end`,class:`w-52`},{default:N(()=>[H(M(DC),null,{default:N(()=>[U(`Status · `+A(e.scopeLabel),1)]),_:1}),H(M(EC),{"data-testid":`bulk-mark-reviewed`,onSelect:n[3]||=e=>p(`reviewed`)},{default:N(()=>[...n[23]||=[U(`Mark reviewed`,-1)]]),_:1}),H(M(EC),{"data-testid":`bulk-mark-needs-review`,onSelect:n[4]||=e=>p(`needs-review`)},{default:N(()=>[...n[24]||=[U(`Mark needs-review`,-1)]]),_:1}),H(M(OC)),H(M(DC),null,{default:N(()=>[...n[25]||=[U(`Tags · key`,-1)]]),_:1}),H(M(EC),{onSelect:n[5]||=e=>s.value=!0},{default:N(()=>[...n[26]||=[U(`Add tag…`,-1)]]),_:1}),H(M(EC),{disabled:!e.tagsOnSelection.length,onSelect:n[6]||=e=>c.value=!0},{default:N(()=>[...n[27]||=[U(`Remove tag…`,-1)]]),_:1},8,[`disabled`]),H(M(OC)),H(M(DC),null,{default:N(()=>[...n[28]||=[U(`Context · key`,-1)]]),_:1}),H(M(EC),{onSelect:h},{default:N(()=>[...n[29]||=[U(`Clear context`,-1)]]),_:1}),H(M(OC)),H(M(DC),null,{default:N(()=>[...n[30]||=[U(`Translation · key`,-1)]]),_:1}),H(M(EC),{onSelect:n[7]||=e=>m(!0)},{default:N(()=>[...n[31]||=[U(`Skip translate`,-1)]]),_:1}),H(M(EC),{onSelect:n[8]||=e=>m(!1)},{default:N(()=>[...n[32]||=[U(`Don't skip`,-1)]]),_:1})]),_:1})]),_:1}),H(M(Q),{variant:`ghost`,size:`sm`,class:`h-8 gap-1.5 text-destructive hover:bg-destructive/10 hover:text-destructive`,"data-testid":`bulk-delete-trigger`,disabled:i.value||!e.keys.length,onClick:n[9]||=e=>o.value=!0},{default:N(()=>[H(M(Td),{class:`size-4`}),n[33]||=U(` Delete `,-1)]),_:1},8,[`disabled`]),H(M(Oh),{open:a.value,"onUpdate:open":n[11]||=e=>a.value=e},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[34]||=[U(`Clear translations`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[U(` Clear translations for `+A(e.keys.length)+` `+A(e.keys.length===1?`key`:`keys`)+` in `+A(e.scopeLabel)+`? Source strings are kept. This cannot be undone. `,1)]),_:1})]),_:1}),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:i.value,onClick:n[10]||=e=>a.value=!1},{default:N(()=>[...n[35]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{variant:`destructive`,disabled:i.value,"data-testid":`bulk-clear-confirm`,onClick:d},{default:N(()=>[...n[36]||=[U(`Clear translations`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),H(M(Oh),{open:o.value,"onUpdate:open":n[13]||=e=>o.value=e},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[37]||=[U(`Delete keys`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[U(` Delete `+A(e.keys.length)+` `+A(e.keys.length===1?`key`:`keys`)+` and all their translations? This cannot be undone. `,1)]),_:1})]),_:1}),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:i.value,onClick:n[12]||=e=>o.value=!1},{default:N(()=>[...n[38]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{variant:`destructive`,disabled:i.value,"data-testid":`bulk-delete-confirm`,onClick:f},{default:N(()=>[...n[39]||=[U(`Delete`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),H(M(Oh),{open:s.value,"onUpdate:open":n[16]||=e=>s.value=e},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[40]||=[U(`Add tag`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[U(`Add a tag to `+A(e.keys.length)+` `+A(e.keys.length===1?`key`:`keys`)+`.`,1)]),_:1})]),_:1}),V(`div`,AC,[H(M(yC),{for:`bulk-add-tag`},{default:N(()=>[...n[41]||=[U(`Tag`,-1)]]),_:1}),H(M(BS),{id:`bulk-add-tag`,modelValue:l.value,"onUpdate:modelValue":n[14]||=e=>l.value=e,disabled:i.value,onKeydown:Zl(Yl(g,[`prevent`]),[`enter`])},null,8,[`modelValue`,`disabled`,`onKeydown`])]),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:i.value,onClick:n[15]||=e=>s.value=!1},{default:N(()=>[...n[42]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{disabled:i.value||!l.value.trim(),onClick:g},{default:N(()=>[...n[43]||=[U(`Add`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),H(M(Oh),{open:c.value,"onUpdate:open":n[18]||=e=>c.value=e},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[44]||=[U(`Remove tag`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[...n[45]||=[U(`Remove a tag from the selected keys.`,-1)]]),_:1})]),_:1}),V(`div`,jC,[(R(!0),z(L,null,F(e.tagsOnSelection,e=>(R(),B(M(Q),{key:e,variant:`outline`,size:`sm`,disabled:i.value,onClick:t=>_(e)},{default:N(()=>[U(A(e),1)]),_:2},1032,[`disabled`,`onClick`]))),128))]),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:i.value,onClick:n[17]||=e=>c.value=!1},{default:N(()=>[...n[46]||=[U(`Close`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`])]))}});function NC(){let e=j(new Set),t=null;function n(t){return e.value.has(t)}function r(n){e.value.has(n)?e.value.delete(n):e.value.add(n),t=n}function i(n,i){if(t===null)return r(n);let a=i.indexOf(t),o=i.indexOf(n);if(a===-1||o===-1)return r(n);let[s,c]=a<o?[a,o]:[o,a];for(let t=s;t<=c;t++)e.value.add(i[t]);t=n}function a(n){for(let t of n)e.value.add(t);t=n.length?n[n.length-1]:null}function o(){e.value.clear(),t=null}function s(n){let r=new Set(n);for(let t of[...e.value])r.has(t)||e.value.delete(t);t!==null&&!r.has(t)&&(t=null)}return{has:n,toggle:r,toggleRange:i,selectAll:a,clear:o,pruneTo:s,keys:()=>[...e.value],count:K(()=>e.value.size),allSelected:t=>t.length>0&&t.every(t=>e.value.has(t)),someSelected:t=>t.some(t=>e.value.has(t))}}var PC=P({__name:`TooltipContent`,props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:[`escapeKeyDown`,`pointerDownOutside`],setup(e,{emit:t}){let n=e,r=qm(n,t);return(e,t)=>(R(),B(M(lx),null,{default:N(()=>[H(M(cx),G(M(r),{class:M(LS)(`z-50 overflow-hidden rounded-md bg-foreground px-3 py-1.5 text-xs text-background shadow-md data-[state=delayed-open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95`,n.class)}),{default:N(()=>[I(e.$slots,`default`)]),_:3},16,[`class`])]),_:3}))}}),FC=[`zero`,`one`,`two`,`few`,`many`,`other`];function IC(e){let t;try{t=new Intl.PluralRules(e.replace(/_/g,`-`),{type:`cardinal`}).resolvedOptions().pluralCategories}catch{t=[`other`]}let n=new Set(t);return FC.filter(e=>n.has(e))}function LC(e,t,n){if(t===n)return!1;let r=e.values[n];if(e.plural){if(!r?.forms?.other)return!1;let n=e.values[t]?.forms??{};return IC(t).some(e=>(n[e]??``)===``)}return r?.value?!e.values[t]?.value:!1}function RC(e,t,n){return t.filter(t=>LC(e,t,n))}function zC(e,t,n){return t.filter(t=>{if(t===n)return!1;let r=e.values[t];return!r||r.state!==`needs-review`?!1:r.value?r.value.length>0:Object.keys(r.forms??{}).length>0})}var BC=new Intl.DisplayNames([`en`],{type:`language`}),VC=new Map;function HC(e){if(!VC.has(e)){let t;try{t=new Intl.DisplayNames([e],{type:`language`}).of(e)??void 0}catch{t=void 0}VC.set(e,t)}return VC.get(e)}function UC(e){return e.split(`-`).slice(1).some(e=>/^[a-zA-Z]{5,8}$/.test(e)||/^[0-9][a-zA-Z0-9]{3}$/.test(e))}var WC=new Set([`ar`,`he`,`iw`,`fa`,`ur`,`ps`,`sd`,`ug`,`yi`,`dv`,`ckb`,`ks`,`nqo`,`rhg`]);function GC(e){let t=e.split(/[-_]/)[0]?.toLowerCase()??``;return WC.has(t)}function KC(e,t){let n=e.replace(/_/g,`-`),r=n,i=!1;try{r=Intl.getCanonicalLocales(n)[0]??n,UC(r)&&(i=!0)}catch{i=!0}let a=e;t?.name===void 0?i||(a=BC.of(r)??e):a=t.name;let o;return o=t&&t.flag!==void 0?t.flag:i?null:r===`en`?`en`:new Intl.Locale(r).maximize().region??null,{code:e,bcp47:r,name:a,endonym:i?void 0:HC(r),flagRegion:o,isCustom:i,rtl:GC(e)}}var qC=[`aria-label`],JC=`inline-flex items-center gap-1.5 rounded-md border px-2.5 py-1 text-[11.5px] font-medium leading-none whitespace-nowrap min-w-[132px]`,YC=P({__name:`StateBadge`,props:{state:{},editable:{type:Boolean}},emits:[`setState`],setup(e,{emit:t}){let n=e,r=t,i=[`machine`,`reviewed`,`needs-review`],a={source:`Source`,machine:`Machine`,reviewed:`Reviewed`,"needs-review":`Needs review`},o={source:`bg-accent text-muted-foreground border-border-soft`,machine:`bg-machine-soft text-machine border-transparent`,reviewed:`bg-review-soft text-review border-transparent`,"needs-review":`bg-muted text-muted-foreground border-border`},s={source:`bg-muted-foreground`,machine:`bg-machine`,reviewed:`bg-review`,"needs-review":`bg-muted-foreground`};return(t,c)=>!e.editable||e.state===`source`?(R(),z(`span`,{key:0,class:k(M(LS)(JC,o[e.state],`cursor-default`)),"data-testid":`state-badge`},[e.state===`reviewed`?(R(),B(M(Ou),{key:0,class:`size-3 shrink-0`})):(R(),z(`span`,{key:1,class:k(M(LS)(`size-[7px] shrink-0 rounded-full`,s[e.state]))},null,2)),U(` `+A(a[e.state]),1)],2)):(R(),B(M(rb),{key:1},{default:N(()=>[H(M(lb),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:k(M(LS)(JC,o[e.state],`transition hover:brightness-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`)),"aria-label":`${a[e.state]} — change state`,"data-testid":`state-badge`},[e.state===`reviewed`?(R(),B(M(Ou),{key:0,class:`size-3 shrink-0`})):(R(),z(`span`,{key:1,class:k(M(LS)(`size-[7px] shrink-0 rounded-full`,s[e.state]))},null,2)),U(` `+A(a[e.state])+` `,1),H(M(ku),{class:`ml-auto size-3 opacity-50`})],10,qC)]),_:1}),H(M(TC),{align:`end`,class:`min-w-[10rem]`},{default:N(()=>[(R(),z(L,null,F(i,e=>H(M(EC),{key:e,onSelect:t=>r(`setState`,e)},{default:N(()=>[V(`span`,{class:k(M(LS)(`size-[7px] shrink-0 rounded-full`,s[e]))},null,2),U(` `+A(a[e])+` `,1),H(M(Ou),{class:k(M(LS)(`ml-auto size-4`,e===n.state?`opacity-100`:`opacity-0`))},null,8,[`class`])]),_:2},1032,[`onSelect`])),64))]),_:1})]),_:1}))}}),XC=new RegExp([`\\{\\s*[A-Za-z0-9_]+\\s*,\\s*(?:plural|select|selectordinal)\\s*,(?:[^{}]|\\{[^{}]*\\})*\\}`,`\\{\\s*[A-Za-z0-9_.]+\\s*\\}`].join(`|`),`g`);function ZC(e){let t=[];if(!e.includes(`'`))return t;for(let n=0;n<e.length;){if(e[n]===`'`){let r=e[n+1];if(r===`'`){n+=2;continue}if(r===`{`||r===`}`||r===`#`||r===`|`){let r=n;for(n+=2;n<e.length&&e[n]!==`'`;)n++;let i=n<e.length?n+1:n;t.push([r,i]),n=i;continue}}n++}return t}function QC(e){if(!e)return[];let t=ZC(e),n=e=>t.some(([t,n])=>e>=t&&e<n),r=[],i=0;XC.lastIndex=0;let a;for(;(a=XC.exec(e))!==null;){if(a[0].length===0){XC.lastIndex++;continue}n(a.index)||(a.index>i&&r.push({text:e.slice(i,a.index),placeholder:!1}),r.push({text:a[0],placeholder:!0}),i=a.index+a[0].length)}return i<e.length&&r.push({text:e.slice(i),placeholder:!1}),r}var $C=P({__name:`Textarea`,props:ka({class:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=Za(e,`modelValue`);return(e,n)=>_r((R(),z(`textarea`,{"onUpdate:modelValue":n[0]||=e=>t.value=e,class:k(M(LS)(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50`,e.$props.class))},null,2)),[[Fl,t.value]])}}),ew={class:`min-w-0`},tw={key:0,class:`flex flex-col gap-1`},nw={class:`whitespace-pre-wrap break-words`},rw={key:0,class:`rounded bg-ph-bg px-1 font-mono text-[0.85em] font-semibold text-ph-fg`},iw=P({__name:`ValueEditor`,props:{keyName:{},locale:{},sourceLocale:{},value:{},maxLength:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=j(!1),a=j(``),o=j(!1),s=j(null),c=K(()=>n.locale===n.sourceLocale),l=K(()=>QC(n.value)),u=K(()=>n.maxLength!==void 0&&n.value.length>n.maxLength);function d(e){e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,160)}px`)}async function f(){a.value=n.value,i.value=!0,await $n();let e=s.value?.$el;e?.focus(),e?.select(),d(e)}function p(){i.value=!1}async function m(){if(!i.value)return;i.value=!1;let e=a.value;if(e!==n.value){o.value=!0;try{c.value?await zd(n.keyName,{source:e}):await Bd(n.keyName,n.locale,e),r(`changed`)}catch(e){$.error(`Could not save: ${e.message}`),r(`changed`)}finally{o.value=!1}}}return(t,n)=>(R(),z(`div`,ew,[i.value?(R(),z(`div`,tw,[H(M($C),{ref_key:`textareaEl`,ref:s,modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e,rows:`1`,maxlength:e.maxLength,class:`max-w-[560px] resize-none rounded-lg border-2 border-primary text-sm shadow-[0_0_0_3px_var(--ring)]`,onInput:n[1]||=e=>d(e.target),onBlur:m,onKeydown:[Zl(Yl(p,[`prevent`]),[`escape`]),Zl(Yl(m,[`exact`,`prevent`]),[`enter`])]},null,8,[`modelValue`,`maxlength`,`onKeydown`]),n[2]||=V(`span`,{class:`text-[10.5px] text-muted-foreground`},[V(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`↵`),U(` save · `),V(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`esc`),U(` cancel `)],-1)])):e.value?(R(),z(`button`,{key:1,type:`button`,class:k(M(LS)(`group inline-flex max-w-full items-center gap-1.5 rounded-md px-2 py-1 -mx-2 -my-1 text-left text-sm leading-relaxed hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,u.value&&`text-destructive`)),onClick:Yl(f,[`stop`])},[V(`span`,nw,[(R(!0),z(L,null,F(l.value,(e,t)=>(R(),z(L,{key:t},[e.placeholder?(R(),z(`span`,rw,A(e.text),1)):(R(),z(L,{key:1},[U(A(e.text),1)],64))],64))),128))]),H(M(od),{"aria-hidden":`true`,class:`size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-60`})],2)):(R(),z(`button`,{key:2,type:`button`,"data-testid":`empty-marker`,class:`group inline-flex items-center gap-1.5 rounded-md border border-dashed border-input px-2.5 py-1 text-[12.5px] font-medium italic text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:Yl(f,[`stop`])},[n[3]||=U(` Empty `,-1),H(M(od),{class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":`true`})]))]))}}),aw={class:`flex min-w-0 flex-col gap-2`},ow={class:`min-w-0 flex-1`},sw={key:0,class:`flex flex-col gap-1`},cw={class:`font-mono text-[10px] font-semibold uppercase tracking-wide text-primary`},lw=[`onClick`],uw={class:`whitespace-pre-wrap break-words`},dw={key:0,class:`rounded bg-ph-bg px-1 font-mono text-[0.85em] font-semibold text-ph-fg`},fw=[`onClick`],pw=P({__name:`PluralValueEditor`,props:{keyName:{},locale:{},sourceLocale:{},arg:{},forms:{},sourceForms:{},maxLength:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=K(()=>n.locale===n.sourceLocale),a=K(()=>[...Object.keys(n.forms).filter(e=>/^=\d+$/.test(e)).sort((e,t)=>Number(e.slice(1))-Number(t.slice(1))),...IC(n.locale)]),o=j(null),s=j(``),c=j(!1),l=j(null);function u(e){l.value=e}function d(e){return n.forms[e]??``}function f(e){return QC(d(e))}function p(e){return n.maxLength!==void 0&&d(e).length>n.maxLength}function m(e){e&&(e.style.height=`auto`,e.style.height=`${Math.min(e.scrollHeight,160)}px`)}async function h(e){s.value=d(e),o.value=e,await $n();let t=l.value?.$el;t?.focus(),t?.select(),m(t)}function g(){o.value=null}async function _(){let e=o.value;if(!e)return;o.value=null;let t=s.value;if(t!==d(e)){c.value=!0;try{let i={};for(let[e,t]of Object.entries(n.forms))i[e]=t??``;i[e]=t,await Ud(n.keyName,n.locale,i),r(`changed`)}catch(e){$.error(`Could not save: ${e.message}`),r(`changed`)}finally{c.value=!1}}}return(t,n)=>(R(),z(`div`,aw,[(R(!0),z(L,null,F(a.value,t=>(R(),z(`div`,{key:t,"data-testid":`plural-field`,class:`flex items-start gap-2.5`},[V(`span`,{class:k(M(LS)(`mt-0.5 min-w-[46px] shrink-0 rounded border border-border px-1.5 py-1 text-center font-mono text-[9.5px] font-semibold uppercase tracking-wide text-muted-foreground`,!i.value&&!d(t)&&`opacity-55`))},A(t),3),V(`div`,ow,[o.value===t?(R(),z(`div`,sw,[V(`span`,cw,`Plural: `+A(t),1),H(M($C),{ref_for:!0,ref:u,modelValue:s.value,"onUpdate:modelValue":n[0]||=e=>s.value=e,rows:`1`,maxlength:e.maxLength,class:`max-w-[560px] resize-none rounded-lg border-2 border-primary text-sm shadow-[0_0_0_3px_var(--ring)]`,onInput:n[1]||=e=>m(e.target),onBlur:_,onKeydown:[Zl(Yl(g,[`prevent`]),[`escape`]),Zl(Yl(_,[`exact`,`prevent`]),[`enter`])]},null,8,[`modelValue`,`maxlength`,`onKeydown`]),n[2]||=V(`span`,{class:`text-[10.5px] text-muted-foreground`},[V(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`↵`),U(` save · `),V(`kbd`,{class:`rounded border border-border-soft bg-accent px-1 font-mono text-[10px]`},`esc`),U(` cancel `)],-1)])):d(t)?(R(),z(`button`,{key:1,type:`button`,class:k(M(LS)(`group inline-flex max-w-full items-center gap-1.5 rounded-md px-2 py-1 -mx-2 -my-1 text-left text-sm leading-relaxed hover:bg-accent focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,p(t)&&`text-destructive`)),onClick:Yl(e=>h(t),[`stop`])},[V(`span`,uw,[(R(!0),z(L,null,F(f(t),(e,t)=>(R(),z(L,{key:t},[e.placeholder?(R(),z(`span`,dw,A(e.text),1)):(R(),z(L,{key:1},[U(A(e.text),1)],64))],64))),128))]),H(M(od),{class:`size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":`true`})],10,lw)):(R(),z(`button`,{key:2,type:`button`,"data-testid":`empty-marker`,class:`group inline-flex items-center gap-1.5 rounded-md border border-dashed border-input px-2.5 py-1 text-[12.5px] font-medium italic text-muted-foreground transition-colors hover:border-border hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:Yl(e=>h(t),[`stop`])},[n[3]||=U(` Empty `,-1),H(M(od),{class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-60`,"aria-hidden":`true`})],8,fw))])]))),128))]))}}),mw=Object.assign({"./assets/flags/ad.svg":`/assets/ad-B18i8NGa.svg`,"./assets/flags/ae.svg":`/assets/ae-CZRtWSox.svg`,"./assets/flags/af.svg":`/assets/af-C77Rf6cE.svg`,"./assets/flags/ag.svg":`/assets/ag-C8MykuG2.svg`,"./assets/flags/ai.svg":`/assets/ai-Dmedkf4v.svg`,"./assets/flags/al.svg":`/assets/al-10QRkakw.svg`,"./assets/flags/am.svg":`/assets/am-DMt4_dd4.svg`,"./assets/flags/ao.svg":`/assets/ao-tXuRa6vm.svg`,"./assets/flags/aq.svg":`/assets/aq-CF5jO-0h.svg`,"./assets/flags/ar.svg":`/assets/ar-Be8Ju1cG.svg`,"./assets/flags/arab.svg":`/assets/arab-C4CYPgyC.svg`,"./assets/flags/as.svg":`/assets/as-Dekqy8Of.svg`,"./assets/flags/asean.svg":`/assets/asean-WMtZ-US_.svg`,"./assets/flags/at.svg":`/assets/at-DGA_6m5E.svg`,"./assets/flags/au.svg":`/assets/au-DAHDIuPI.svg`,"./assets/flags/aw.svg":`/assets/aw-W0PWLK5p.svg`,"./assets/flags/ax.svg":`/assets/ax-DvLIy84U.svg`,"./assets/flags/az.svg":`/assets/az-Bk-bYNxy.svg`,"./assets/flags/ba.svg":`/assets/ba-WdDiSMvP.svg`,"./assets/flags/bb.svg":`/assets/bb-DJxbaxmT.svg`,"./assets/flags/bd.svg":`/assets/bd-BF9t1-60.svg`,"./assets/flags/be.svg":`/assets/be-CLLkK3PN.svg`,"./assets/flags/bf.svg":`/assets/bf-YclsoDuF.svg`,"./assets/flags/bg.svg":`/assets/bg-GUQenraa.svg`,"./assets/flags/bh.svg":`/assets/bh-BQqEGq6F.svg`,"./assets/flags/bi.svg":`/assets/bi-CRmKY6RQ.svg`,"./assets/flags/bj.svg":`/assets/bj-14PhO9bM.svg`,"./assets/flags/bl.svg":`/assets/bl-4CI2YcwX.svg`,"./assets/flags/bm.svg":`/assets/bm-BeYgB2z9.svg`,"./assets/flags/bn.svg":`/assets/bn-B6T3O78g.svg`,"./assets/flags/bo.svg":`/assets/bo-CcUiMqkJ.svg`,"./assets/flags/bq.svg":`/assets/bq-BYpdxEeT.svg`,"./assets/flags/br.svg":`/assets/br-Cu5YU29T.svg`,"./assets/flags/bs.svg":`/assets/bs-7Gd_oriM.svg`,"./assets/flags/bt.svg":`/assets/bt-BTo4qm10.svg`,"./assets/flags/bv.svg":`/assets/bv-wM9JLv4R.svg`,"./assets/flags/bw.svg":`/assets/bw-n5ZaAnGL.svg`,"./assets/flags/by.svg":`/assets/by-C621sBpd.svg`,"./assets/flags/bz.svg":`/assets/bz-BCKHR4_q.svg`,"./assets/flags/ca.svg":`/assets/ca-PYUrLVUV.svg`,"./assets/flags/cc.svg":`/assets/cc-BNT6Xjzk.svg`,"./assets/flags/cd.svg":`/assets/cd-BGclsrP6.svg`,"./assets/flags/cefta.svg":`/assets/cefta-2dDBYygd.svg`,"./assets/flags/cf.svg":`/assets/cf-DRetLmp-.svg`,"./assets/flags/cg.svg":`/assets/cg-CwIyG6SE.svg`,"./assets/flags/ch.svg":`/assets/ch-sfriZoF1.svg`,"./assets/flags/ci.svg":`/assets/ci-C8Q8IYTn.svg`,"./assets/flags/ck.svg":`/assets/ck-DfXMUOTo.svg`,"./assets/flags/cl.svg":`/assets/cl-BgYYb4qP.svg`,"./assets/flags/cm.svg":`/assets/cm-D4yjdmKT.svg`,"./assets/flags/cn.svg":`/assets/cn-DifnnI3t.svg`,"./assets/flags/co.svg":`/assets/co-DV591zMm.svg`,"./assets/flags/cp.svg":`/assets/cp-K_ay05Q_.svg`,"./assets/flags/cr.svg":`/assets/cr-BlYVN-_Q.svg`,"./assets/flags/cu.svg":`/assets/cu-L6XVZNgo.svg`,"./assets/flags/cv.svg":`/assets/cv-CPsfcOfk.svg`,"./assets/flags/cw.svg":`/assets/cw-BbrnximR.svg`,"./assets/flags/cx.svg":`/assets/cx-DpYD6n6U.svg`,"./assets/flags/cy.svg":`/assets/cy-bZuP8hmf.svg`,"./assets/flags/cz.svg":`/assets/cz-WWBC5Aeb.svg`,"./assets/flags/de.svg":`/assets/de-B-2o-4Z9.svg`,"./assets/flags/dg.svg":`/assets/dg-CJPJrjiZ.svg`,"./assets/flags/dj.svg":`/assets/dj-hp_BwbmO.svg`,"./assets/flags/dk.svg":`/assets/dk-DmS9BCZB.svg`,"./assets/flags/dm.svg":`/assets/dm-Cbhezfe1.svg`,"./assets/flags/do.svg":`/assets/do-B86d445t.svg`,"./assets/flags/dz.svg":`/assets/dz-Dytc1TFu.svg`,"./assets/flags/eac.svg":`/assets/eac-CwGQsyAM.svg`,"./assets/flags/ec.svg":`/assets/ec-CaVOFQ3t.svg`,"./assets/flags/ee.svg":`/assets/ee-DufrxGIR.svg`,"./assets/flags/eg.svg":`/assets/eg-YC70hswZ.svg`,"./assets/flags/eh.svg":`/assets/eh-0awM4TVj.svg`,"./assets/flags/en.svg":`/assets/en-BZRN_IpI.svg`,"./assets/flags/er.svg":`/assets/er-X83uml6t.svg`,"./assets/flags/es-ct.svg":`/assets/es-ct-CVyhLp7O.svg`,"./assets/flags/es-ga.svg":`/assets/es-ga-D9xG2hYr.svg`,"./assets/flags/es-pv.svg":`/assets/es-pv-CO3NM2SE.svg`,"./assets/flags/es.svg":`/assets/es-d5m8M5h8.svg`,"./assets/flags/et.svg":`/assets/et-DwdlzOIx.svg`,"./assets/flags/eu.svg":`/assets/eu-Brdgz8ab.svg`,"./assets/flags/fi.svg":`/assets/fi-DWUIkfjL.svg`,"./assets/flags/fj.svg":`/assets/fj-DEAVMg38.svg`,"./assets/flags/fk.svg":`/assets/fk-nuUF_Ak3.svg`,"./assets/flags/fm.svg":`/assets/fm-B4Z83GL0.svg`,"./assets/flags/fo.svg":`/assets/fo-DFjwyWur.svg`,"./assets/flags/fr.svg":`/assets/fr-DVvUyOqI.svg`,"./assets/flags/ga.svg":`/assets/ga-BklUhLH_.svg`,"./assets/flags/gb-eng.svg":`/assets/gb-eng-C8iDhGHN.svg`,"./assets/flags/gb-nir.svg":`/assets/gb-nir-D4gikpNq.svg`,"./assets/flags/gb-sct.svg":`/assets/gb-sct-fW5q01ek.svg`,"./assets/flags/gb-wls.svg":`/assets/gb-wls-Bxz9hxvX.svg`,"./assets/flags/gb.svg":`/assets/gb-DTXiLQoe.svg`,"./assets/flags/gd.svg":`/assets/gd-CO-whzUe.svg`,"./assets/flags/ge.svg":`/assets/ge-B2RiL-Ih.svg`,"./assets/flags/gf.svg":`/assets/gf-DWl5zcw0.svg`,"./assets/flags/gg.svg":`/assets/gg-jdOQS2nU.svg`,"./assets/flags/gh.svg":`/assets/gh-r3LP_X7q.svg`,"./assets/flags/gi.svg":`/assets/gi-BJKE9SzW.svg`,"./assets/flags/gl.svg":`/assets/gl-CHaBnMib.svg`,"./assets/flags/gm.svg":`/assets/gm-Bu99atwn.svg`,"./assets/flags/gn.svg":`/assets/gn-1dJNy9oQ.svg`,"./assets/flags/gp.svg":`/assets/gp-DNyt_wTA.svg`,"./assets/flags/gq.svg":`/assets/gq-Cag8QTk2.svg`,"./assets/flags/gr.svg":`/assets/gr-C5PU0p9p.svg`,"./assets/flags/gs.svg":`/assets/gs-DiiNa0F5.svg`,"./assets/flags/gt.svg":`/assets/gt-CJo5DI-7.svg`,"./assets/flags/gu.svg":`/assets/gu-Di1JYREk.svg`,"./assets/flags/gw.svg":`/assets/gw-D249VY33.svg`,"./assets/flags/gy.svg":`/assets/gy-CcVYUM2E.svg`,"./assets/flags/hk.svg":`/assets/hk-CUNIaSX0.svg`,"./assets/flags/hm.svg":`/assets/hm-Dh6t_Tj3.svg`,"./assets/flags/hn.svg":`/assets/hn-CRjyS_bm.svg`,"./assets/flags/hr.svg":`/assets/hr-fzLfaANM.svg`,"./assets/flags/ht.svg":`/assets/ht-DIMg4gti.svg`,"./assets/flags/hu.svg":`/assets/hu-7Q5wwIIi.svg`,"./assets/flags/ic.svg":`/assets/ic-CSo4d8tH.svg`,"./assets/flags/id.svg":`/assets/id-DiSP6Fmm.svg`,"./assets/flags/ie.svg":`/assets/ie-ChAXClx3.svg`,"./assets/flags/il.svg":`/assets/il-_56OEGLa.svg`,"./assets/flags/im.svg":`/assets/im--VPIqfkF.svg`,"./assets/flags/in.svg":`/assets/in-Cdwu6Bq7.svg`,"./assets/flags/io.svg":`/assets/io-13HOfeJD.svg`,"./assets/flags/iq.svg":`/assets/iq-Dp8HDzo2.svg`,"./assets/flags/ir.svg":`/assets/ir-cCIgaNf6.svg`,"./assets/flags/is.svg":`/assets/is-CZjefTNV.svg`,"./assets/flags/it.svg":`/assets/it-Br7q0Zh6.svg`,"./assets/flags/je.svg":`/assets/je-DyWbhIiC.svg`,"./assets/flags/jm.svg":`/assets/jm-CItSr3iX.svg`,"./assets/flags/jo.svg":`/assets/jo-BAF1FGbm.svg`,"./assets/flags/jp.svg":`/assets/jp-BIMmfxpO.svg`,"./assets/flags/ke.svg":`/assets/ke-C8foqndp.svg`,"./assets/flags/kg.svg":`/assets/kg-B0FsxZiL.svg`,"./assets/flags/kh.svg":`/assets/kh-BeWfuE30.svg`,"./assets/flags/ki.svg":`/assets/ki-p_fAQGbS.svg`,"./assets/flags/km.svg":`/assets/km-B5tqtGG7.svg`,"./assets/flags/kn.svg":`/assets/kn-DVPxDkNY.svg`,"./assets/flags/kp.svg":`/assets/kp-CrDKzoxe.svg`,"./assets/flags/kr.svg":`/assets/kr-BCXH1Hao.svg`,"./assets/flags/kw.svg":`/assets/kw-fSBzmd30.svg`,"./assets/flags/ky.svg":`/assets/ky-Dpsu1myA.svg`,"./assets/flags/kz.svg":`/assets/kz-CwKXYZ8s.svg`,"./assets/flags/la.svg":`/assets/la-CuJflhIW.svg`,"./assets/flags/lb.svg":`/assets/lb-BSjpYEoo.svg`,"./assets/flags/lc.svg":`/assets/lc-CNvab8Ae.svg`,"./assets/flags/li.svg":`/assets/li-CHdhvNcr.svg`,"./assets/flags/lk.svg":`/assets/lk-DUkgV9Tq.svg`,"./assets/flags/lr.svg":`/assets/lr-B84vu3Ds.svg`,"./assets/flags/ls.svg":`/assets/ls-5Xk3Mxq5.svg`,"./assets/flags/lt.svg":`/assets/lt-DoukV-Sm.svg`,"./assets/flags/lu.svg":`/assets/lu-DOI02Msy.svg`,"./assets/flags/lv.svg":`/assets/lv-C-KfY8Yc.svg`,"./assets/flags/ly.svg":`/assets/ly-BWpTK3ux.svg`,"./assets/flags/ma.svg":`/assets/ma-BTRNTRUj.svg`,"./assets/flags/mc.svg":`/assets/mc-PK078JHl.svg`,"./assets/flags/md.svg":`/assets/md-DRlxvNwm.svg`,"./assets/flags/me.svg":`/assets/me-Cv4Gwqah.svg`,"./assets/flags/mf.svg":`/assets/mf-BaAGWwAq.svg`,"./assets/flags/mg.svg":`/assets/mg-C168LHXW.svg`,"./assets/flags/mh.svg":`/assets/mh-gxuIp6Wk.svg`,"./assets/flags/mk.svg":`/assets/mk-D9SIMr-a.svg`,"./assets/flags/ml.svg":`/assets/ml-DVf6ujpi.svg`,"./assets/flags/mm.svg":`/assets/mm-lwT09MQ0.svg`,"./assets/flags/mn.svg":`/assets/mn-CgXyw0O9.svg`,"./assets/flags/mo.svg":`/assets/mo-BAtCjuYA.svg`,"./assets/flags/mp.svg":`/assets/mp-CrOApEqW.svg`,"./assets/flags/mq.svg":`/assets/mq-BFnJ22KI.svg`,"./assets/flags/mr.svg":`/assets/mr-D6G1wpeZ.svg`,"./assets/flags/ms.svg":`/assets/ms-DxciGbUu.svg`,"./assets/flags/mt.svg":`/assets/mt-YqzKx9xl.svg`,"./assets/flags/mu.svg":`/assets/mu-mcq7cUFl.svg`,"./assets/flags/mv.svg":`/assets/mv-BynAllfM.svg`,"./assets/flags/mw.svg":`/assets/mw-C15nc1xZ.svg`,"./assets/flags/mx.svg":`/assets/mx-Cc8Ccfe8.svg`,"./assets/flags/my.svg":`/assets/my-Co4JeeyE.svg`,"./assets/flags/mz.svg":`/assets/mz-Drlr_USV.svg`,"./assets/flags/na.svg":`/assets/na-D79ffb4Z.svg`,"./assets/flags/nc.svg":`/assets/nc-5j7wEmDR.svg`,"./assets/flags/ne.svg":`/assets/ne-B1jPOYkl.svg`,"./assets/flags/nf.svg":`/assets/nf-Dl00mlk2.svg`,"./assets/flags/ng.svg":`/assets/ng-su4NM9If.svg`,"./assets/flags/ni.svg":`/assets/ni-CcFCSQxm.svg`,"./assets/flags/nl.svg":`/assets/nl-BnOa6UiA.svg`,"./assets/flags/no.svg":`/assets/no-qf2JPO73.svg`,"./assets/flags/np.svg":`/assets/np-CIuq5GKd.svg`,"./assets/flags/nr.svg":`/assets/nr-DERIdzkN.svg`,"./assets/flags/nu.svg":`/assets/nu-BfgWvGcd.svg`,"./assets/flags/nz.svg":`/assets/nz-5vODdBjz.svg`,"./assets/flags/om.svg":`/assets/om-DcqxRdQL.svg`,"./assets/flags/pa.svg":`/assets/pa-BLNN9G2-.svg`,"./assets/flags/pc.svg":`/assets/pc-BJpYiA9b.svg`,"./assets/flags/pe.svg":`/assets/pe-BLqhuu1C.svg`,"./assets/flags/pf.svg":`/assets/pf-C8ahG68q.svg`,"./assets/flags/pg.svg":`/assets/pg-BAYpbp9Z.svg`,"./assets/flags/ph.svg":`/assets/ph-BEzTn62K.svg`,"./assets/flags/pk.svg":`/assets/pk-CWMEc3ad.svg`,"./assets/flags/pl.svg":`/assets/pl-o38JROoc.svg`,"./assets/flags/pm.svg":`/assets/pm-CHiP5UmZ.svg`,"./assets/flags/pn.svg":`/assets/pn-DgxdtieE.svg`,"./assets/flags/pr.svg":`/assets/pr-B4tMV0xm.svg`,"./assets/flags/ps.svg":`/assets/ps-DO8YKYeS.svg`,"./assets/flags/pt.svg":`/assets/pt-DZ2ADgIR.svg`,"./assets/flags/pw.svg":`/assets/pw-CQP52WMX.svg`,"./assets/flags/py.svg":`/assets/py-mNzh0mZC.svg`,"./assets/flags/qa.svg":`/assets/qa-Dkmpc78M.svg`,"./assets/flags/re.svg":`/assets/re-Bk4ipYK1.svg`,"./assets/flags/ro.svg":`/assets/ro-CoSeqKY1.svg`,"./assets/flags/rs.svg":`/assets/rs-BfwKwXtn.svg`,"./assets/flags/ru.svg":`/assets/ru-D-4tNwXt.svg`,"./assets/flags/rw.svg":`/assets/rw-D7nbSYKI.svg`,"./assets/flags/sa.svg":`/assets/sa-Dh79zbT9.svg`,"./assets/flags/sb.svg":`/assets/sb-BDTYjcbk.svg`,"./assets/flags/sc.svg":`/assets/sc-CRNsSLg9.svg`,"./assets/flags/sd.svg":`/assets/sd-ClziNjGr.svg`,"./assets/flags/se.svg":`/assets/se-8C923vhy.svg`,"./assets/flags/sg.svg":`/assets/sg-DGYIMG0G.svg`,"./assets/flags/sh-ac.svg":`/assets/sh-ac-FjwY7RYr.svg`,"./assets/flags/sh-hl.svg":`/assets/sh-hl-CqtQPzWZ.svg`,"./assets/flags/sh-ta.svg":`/assets/sh-ta-CPJublpi.svg`,"./assets/flags/sh.svg":`/assets/sh-DNImvbrE.svg`,"./assets/flags/si.svg":`/assets/si-BMKT-Tec.svg`,"./assets/flags/sj.svg":`/assets/sj-BFFEGknm.svg`,"./assets/flags/sk.svg":`/assets/sk-K9BNIYAO.svg`,"./assets/flags/sl.svg":`/assets/sl-DxLJY5vJ.svg`,"./assets/flags/sm.svg":`/assets/sm-DGBIRFB_.svg`,"./assets/flags/sn.svg":`/assets/sn-S8ipNF1U.svg`,"./assets/flags/so.svg":`/assets/so-DlzA2Fco.svg`,"./assets/flags/sr.svg":`/assets/sr-Co7OKBh3.svg`,"./assets/flags/ss.svg":`/assets/ss-CxVEpdPD.svg`,"./assets/flags/st.svg":`/assets/st-C1Nd1c3V.svg`,"./assets/flags/sv.svg":`/assets/sv-CJIHhYwF.svg`,"./assets/flags/sx.svg":`/assets/sx-nDhIaDNb.svg`,"./assets/flags/sy.svg":`/assets/sy-DwSud114.svg`,"./assets/flags/sz.svg":`/assets/sz-qxMwa2gs.svg`,"./assets/flags/tc.svg":`/assets/tc-dtelpZmc.svg`,"./assets/flags/td.svg":`/assets/td-BsuVhZpT.svg`,"./assets/flags/tf.svg":`/assets/tf-Co33RhQH.svg`,"./assets/flags/tg.svg":`/assets/tg-CP1-sc35.svg`,"./assets/flags/th.svg":`/assets/th-tzq84hgd.svg`,"./assets/flags/tj.svg":`/assets/tj-b-aWfOTb.svg`,"./assets/flags/tk.svg":`/assets/tk-CDucsEss.svg`,"./assets/flags/tl.svg":`/assets/tl-wpo93AGk.svg`,"./assets/flags/tm.svg":`/assets/tm-C_WSgUcv.svg`,"./assets/flags/tn.svg":`/assets/tn-BcKCZULf.svg`,"./assets/flags/to.svg":`/assets/to-D8uVsoxb.svg`,"./assets/flags/tr.svg":`/assets/tr-Cd6FO9Bg.svg`,"./assets/flags/tt.svg":`/assets/tt-CTnr7aY5.svg`,"./assets/flags/tv.svg":`/assets/tv-DDqkVT-n.svg`,"./assets/flags/tw.svg":`/assets/tw-d-Mf-0VT.svg`,"./assets/flags/tz.svg":`/assets/tz-BjLtHeil.svg`,"./assets/flags/ua.svg":`/assets/ua-Bq0XgQqK.svg`,"./assets/flags/ug.svg":`/assets/ug-ByL2ejGl.svg`,"./assets/flags/um.svg":`/assets/um-Bhke9Eic.svg`,"./assets/flags/un.svg":`/assets/un-Bqg4Cbbh.svg`,"./assets/flags/us.svg":`/assets/us-C73uVeEr.svg`,"./assets/flags/uy.svg":`/assets/uy-DD6peej-.svg`,"./assets/flags/uz.svg":`/assets/uz-C2f-Cubn.svg`,"./assets/flags/va.svg":`/assets/va-B9-hqIE-.svg`,"./assets/flags/vc.svg":`/assets/vc-COpmFovN.svg`,"./assets/flags/ve.svg":`/assets/ve-BSqnIB9l.svg`,"./assets/flags/vg.svg":`/assets/vg-C7xY6pic.svg`,"./assets/flags/vi.svg":`/assets/vi-BC_zcciE.svg`,"./assets/flags/vn.svg":`/assets/vn-BEAEijd0.svg`,"./assets/flags/vu.svg":`/assets/vu-D6k0NQlg.svg`,"./assets/flags/wf.svg":`/assets/wf-DrxpOO_G.svg`,"./assets/flags/ws.svg":`/assets/ws-vzJNwdVm.svg`,"./assets/flags/xk.svg":`/assets/xk-Bj15g7cp.svg`,"./assets/flags/xx.svg":`/assets/xx-zm_JmrXl.svg`,"./assets/flags/ye.svg":`/assets/ye-BwST9gXC.svg`,"./assets/flags/yt.svg":`/assets/yt-DIfEG0ex.svg`,"./assets/flags/za.svg":`/assets/za-Jz40JTrv.svg`,"./assets/flags/zm.svg":`/assets/zm-BmsW91ne.svg`,"./assets/flags/zw.svg":`/assets/zw-U0m7oJ5e.svg`}),hw=new Map;for(let[e,t]of Object.entries(mw)){let n=e.match(/\/([^/]+)\.svg$/);n&&hw.set(n[1].toLowerCase(),t)}function gw(e){return hw.get(e.toLowerCase())}var _w=[`src`,`alt`,`width`,`height`],vw=P({__name:`Flag`,props:{code:{},override:{},size:{default:16}},setup(e){let t=e,n=K(()=>KC(t.code,t.override)),r=K(()=>n.value.flagRegion?gw(n.value.flagRegion):void 0),i=K(()=>Math.round(t.size*4/3));return(t,a)=>r.value?(R(),z(`img`,{key:0,src:r.value,alt:n.value.name,width:i.value,height:e.size,class:`inline-block shrink-0 rounded-[2px] object-cover ring-1 ring-black/10`,style:he({width:`${i.value}px`,height:`${e.size}px`})},null,12,_w)):(R(),B(M(Ju),{key:1,class:`inline-block shrink-0 text-muted-foreground`,style:he({width:`${e.size}px`,height:`${e.size}px`}),"aria-hidden":`true`},null,8,[`style`]))}}),yw={class:`inline-flex min-w-0 items-start gap-2`},bw={class:`flex min-w-0 flex-col leading-tight`},xw={class:`flex items-center gap-1.5`},Sw={class:`font-mono text-[11.5px] font-semibold tracking-wide`},Cw={key:0,class:`truncate text-[11px] text-muted-foreground`},ww={class:`inline-flex min-w-0 items-center gap-1.5`},Tw={key:0,class:`truncate`},Ew=P({__name:`LanguageLabel`,props:{code:{},override:{},showName:{type:Boolean,default:!1},showCode:{type:Boolean,default:!0},size:{default:16},codeMinChars:{},layout:{default:`inline`}},setup(e){let t=e,n=K(()=>KC(t.code,t.override));return(t,r)=>e.layout===`stacked`?(R(),B(M(ax),{key:0},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,yw,[H(vw,{code:e.code,override:e.override,size:e.size,class:`mt-0.5 shrink-0`},null,8,[`code`,`override`,`size`]),V(`span`,bw,[V(`span`,xw,[V(`span`,Sw,A(e.code.toUpperCase()),1),n.value.rtl?(R(),B(M(ax),{key:0},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[...r[0]||=[V(`span`,{class:`rounded border border-border px-1 text-[9px] font-bold uppercase tracking-wide text-muted-foreground`},`RTL`,-1)]]),_:1}),H(M(PC),null,{default:N(()=>[...r[1]||=[U(`Right-to-left`,-1)]]),_:1})]),_:1})):W(``,!0)]),e.showName?(R(),z(`span`,Cw,A(n.value.name),1)):W(``,!0)])])]),_:1}),H(M(PC),null,{default:N(()=>[U(A(n.value.name),1)]),_:1})]),_:1})):(R(),B(M(ax),{key:1},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,ww,[H(vw,{code:e.code,override:e.override,size:e.size},null,8,[`code`,`override`,`size`]),e.showName?(R(),z(`span`,Tw,A(n.value.name),1)):W(``,!0),e.showCode?(R(),z(`span`,{key:1,class:`font-mono text-xs`,style:he(e.codeMinChars==null?void 0:{minWidth:`${e.codeMinChars}ch`})},A(e.code.toUpperCase()),5)):W(``,!0)])]),_:1}),H(M(PC),null,{default:N(()=>[U(A(n.value.name),1)]),_:1})]),_:1}))}}),Dw=[`data-state`],Ow={class:`flex flex-wrap items-start gap-2 pt-0.5`},kw={key:0,class:`rounded-md border border-border-soft bg-accent px-1.5 py-0.5 text-[10.5px] font-semibold uppercase tracking-wide text-muted-foreground`},Aw=[`dir`],jw={key:0,"data-testid":`filling-hint`,class:`flex items-center gap-1.5 text-sm italic text-muted-foreground`},Mw={key:0,class:`flex items-center justify-end gap-1.5 pt-0.5`},Nw={type:`button`,class:`flex size-7 items-center justify-center rounded-md bg-destructive-soft text-destructive transition hover:brightness-95 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,"aria-label":`Show issues`},Pw={class:`flex flex-col gap-1`},Fw={key:0,class:`mt-2 border-t pt-2`},Iw={class:`flex flex-wrap gap-1`},Lw=[`onClick`],Rw=[`disabled`],zw=P({__name:`TranslationRow`,props:{keyName:{},locale:{},sourceLocale:{},value:{},maxLength:{},issues:{},labelChars:{},plural:{},sourceForms:{},filling:{type:Boolean}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=K(()=>n.locale===n.sourceLocale),a=K(()=>n.value?.state??(i.value?`source`:`needs-review`)),o=K(()=>n.value?.value??``),s=K(()=>!!n.plural),c=K(()=>n.value?.forms??{}),l=K(()=>GC(n.locale)),u=K(()=>!i.value&&(s.value?Object.keys(c.value).length>0:!!n.value?.value)),d=K(()=>(n.issues?.length??0)>0),f=K(()=>[...new Set((n.issues??[]).filter(e=>e.check===`spelling`).flatMap(e=>e.detail??[]))]);async function p(e){try{await mf(e),$.success(`Added "${e}" to the dictionary`),r(`changed`)}catch(e){$.error(`Could not add word: ${e.message}`)}}let m=j(!1);async function h(){try{await Hd(n.keyName,n.locale),$.success(`Cleared`),r(`changed`)}catch(e){$.error(e.message)}}async function g(e){try{await Vd(n.keyName,n.locale,e),r(`changed`)}catch(e){$.error(`Could not update state: ${e.message}`)}}async function _(){m.value=!0;try{let e=await Kd({onlyMissing:!1,locales:[n.locale],keyGlob:n.keyName,force:!0});e.errors?.length?$.error(e.errors[0]?.error??`Translation failed`):$.success(`Translated ${n.locale.toUpperCase()} (${e.written} written)`),r(`changed`)}catch(e){$.error(`Translate failed: ${e.message}`)}finally{m.value=!1}}return(t,n)=>(R(),z(`div`,{class:k(M(LS)(`grid grid-cols-[172px_minmax(0,1fr)_232px] items-start gap-[18px] border-b border-border-soft py-[11px] pl-4 pr-[18px] last:border-b-0 max-[1080px]:grid-cols-[150px_minmax(0,1fr)_200px] max-[1080px]:gap-3`,i.value&&`bg-foreground/[0.015] dark:bg-foreground/[0.025]`)),"data-state":a.value},[V(`div`,Ow,[H(Ew,{code:e.locale,layout:`stacked`,"show-name":``,size:15},null,8,[`code`]),i.value?(R(),z(`span`,kw,`Source`)):W(``,!0)]),V(`div`,{class:`flex min-w-0 flex-col gap-2`,dir:l.value?`rtl`:`ltr`},[e.filling?(R(),z(`div`,jw,[H(M(ed),{class:`size-3.5 shrink-0 animate-spin`}),n[2]||=U(` filling… `,-1)])):s.value?(R(),B(pw,{key:1,"key-name":e.keyName,locale:e.locale,"source-locale":e.sourceLocale,arg:e.plural.arg,forms:c.value,"source-forms":e.sourceForms,"max-length":e.maxLength,onChanged:n[0]||=e=>r(`changed`)},null,8,[`key-name`,`locale`,`source-locale`,`arg`,`forms`,`source-forms`,`max-length`])):(R(),B(iw,{key:2,"key-name":e.keyName,locale:e.locale,"source-locale":e.sourceLocale,value:o.value,"max-length":e.maxLength,onChanged:n[1]||=e=>r(`changed`)},null,8,[`key-name`,`locale`,`source-locale`,`value`,`max-length`]))],8,Aw),i.value?W(``,!0):(R(),z(`div`,Mw,[d.value?(R(),B(M(Jy),{key:0},{default:N(()=>[H(M(eb),{"as-child":``},{default:N(()=>[V(`button`,Nw,[H(M(Ed),{class:`size-3.5`})])]),_:1}),H(M(qS),{align:`end`,class:`w-fit max-w-xs text-xs`},{default:N(()=>[V(`ul`,Pw,[(R(!0),z(L,null,F(e.issues,(e,t)=>(R(),z(`li`,{key:t,class:`whitespace-pre-line text-foreground/80`},A(e.message),1))),128))]),f.value.length?(R(),z(`div`,Fw,[n[3]||=V(`p`,{class:`mb-1 text-[11px] font-medium text-muted-foreground`},`Add to dictionary`,-1),V(`div`,Iw,[(R(!0),z(L,null,F(f.value,e=>(R(),B(M(ax),{key:e},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`inline-flex items-center gap-0.5 rounded border border-amber-500/40 px-1.5 py-0.5 text-[11px] text-amber-700 transition-colors hover:bg-amber-500/10 dark:text-amber-300`,onClick:t=>p(e)},[H(M(sd),{class:`size-3`}),U(A(e),1)],8,Lw)]),_:2},1024),H(M(PC),null,{default:N(()=>[U(`Add '`+A(e)+`' to the custom dictionary`,1)]),_:2},1024)]),_:2},1024))),128))])])):W(``,!0)]),_:1})]),_:1})):W(``,!0),u.value?(R(),B(M(ax),{key:1},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,"aria-label":`Clear translation`,onClick:Yl(h,[`stop`])},[H(M(zu),{class:`size-4`})])]),_:1}),H(M(PC),null,{default:N(()=>[...n[4]||=[U(`Clear translation`,-1)]]),_:1})]),_:1})):W(``,!0),H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`flex size-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-primary-soft hover:text-primary disabled:opacity-50`,disabled:m.value||e.filling,"aria-label":`AI translate this cell`,onClick:Yl(_,[`stop`])},[m.value||e.filling?(R(),B(M(ed),{key:0,class:`size-4 animate-spin`})):(R(),B(M(Qu),{key:1,class:`size-4`}))],8,Rw)]),_:1}),H(M(PC),null,{default:N(()=>[...n[5]||=[U(`AI translate`,-1)]]),_:1})]),_:1}),H(YC,{state:a.value,editable:!0,onSetState:g},null,8,[`state`])]))],10,Dw))}}),Bw=[`aria-pressed`],Vw={key:0,class:`pointer-events-none absolute inset-0 z-[3] border-2 border-primary`,"aria-hidden":`true`},Hw={key:1,class:`pointer-events-none absolute inset-y-0 left-0 z-[4] w-1 bg-primary`,"aria-hidden":`true`},Uw={class:`sticky top-3`},Ww=[`aria-checked`],Gw={class:`absolute right-0 top-0`},Kw=[`disabled`],qw=[`innerHTML`],Jw={key:0,class:`mt-1.5 flex flex-wrap items-center gap-1.5 pl-6`},Yw={key:0,class:`inline-flex items-center gap-1 rounded-md border border-primary-border bg-primary/[0.09] px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-primary`},Xw={class:`font-medium normal-case text-muted-foreground`},Zw={"data-testid":`issue-badge`,class:`inline-flex items-center gap-1 rounded-md bg-destructive-soft px-1.5 py-0.5 text-[11.5px] font-bold text-destructive`},Qw={key:1,class:`mt-2 flex flex-wrap gap-1.5 pl-6`},$w=[`onClick`],eT=[`data-testid`,`disabled`],tT={key:3,"data-testid":`translating-missing`,class:`ml-6 mt-2.5 inline-flex items-center gap-1 text-[11px] text-primary`},nT=[`disabled`],rT={class:`min-w-0 flex-1 [&>*:nth-child(even)]:bg-zebra`},iT={class:`grid gap-2`},aT={class:`break-all rounded bg-muted px-1 py-0.5 font-mono text-sm`},oT=P({__name:`KeyRow`,props:{keyName:{},entry:{},sourceLocale:{},locales:{},selected:{type:Boolean},checked:{type:Boolean},issues:{}},emits:[`changed`,`select`,`toggle-select`,`renamed`,`filter-tag`],setup(e,{emit:t}){let n=e,r=K(()=>n.keyName.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/\./g,`.<wbr>`)),i=K(()=>{let e=new Map;for(let t of n.issues??[]){let n=e.get(t.locale);n?n.push(t):e.set(t.locale,[t])}return e}),a=t,o=j(!1),s=j(``),c=j(!1),l=j(!1),u=j(!1),d=j(!1),f=K(()=>RC(n.entry,n.locales,n.sourceLocale)),p=K(()=>zC(n.entry,n.locales,n.sourceLocale));async function m(){d.value=!0;try{let e=await Kd({onlyMissing:!1,force:!0,keyGlob:n.keyName,locales:p.value});e.errors?.length?$.error(e.errors[0]?.error??`Translation failed`):$.success(`Re-translated ${e.written} stale value${e.written===1?``:`s`}`),a(`changed`)}catch(e){$.error(`Translate failed: ${e.message}`)}finally{d.value=!1}}async function h(){u.value=!0;try{let e=await Kd({onlyMissing:!0,keyGlob:n.keyName});e.errors?.length?$.error(e.errors[0]?.error??`Translation failed`):$.success(`Translated ${e.written} missing value${e.written===1?``:`s`}`),a(`changed`)}catch(e){$.error(`Translate failed: ${e.message}`)}finally{u.value=!1}}function g(e){a(`toggle-select`,{shift:e.shiftKey})}function _(e){e.target?.closest(`button, input, textarea, select, a, [contenteditable="true"]`)||a(`select`)}async function v(){let e=!n.entry.skipTranslate;l.value=!0;try{await Rd([n.keyName],{skipTranslate:e}),$.success(e?`Excluded from translation`:`Included in translation`),a(`changed`)}catch(e){$.error(`Update failed: ${e.message}`)}finally{l.value=!1}}function y(){s.value=n.keyName,o.value=!0}async function b(){let e=s.value.trim();if(!e||e===n.keyName){o.value=!1;return}l.value=!0;try{await zd(n.keyName,{rename:e}),o.value=!1,$.success(`Renamed to ${e}`),a(`renamed`,e)}catch(e){$.error(`Rename failed: ${e.message}`)}finally{l.value=!1}}async function x(){l.value=!0;try{await Pd(n.keyName),c.value=!1,$.success(`Deleted ${n.keyName}`),a(`changed`)}catch(e){$.error(`Delete failed: ${e.message}`)}finally{l.value=!1}}return(t,n)=>(R(),z(`div`,{class:k(M(LS)(`relative flex border-b-2 border-border bg-card`,e.selected&&`z-[1]`)),role:`button`,"aria-pressed":e.selected,"aria-label":`Select key`,onClick:_},[e.selected?(R(),z(`span`,Vw)):W(``,!0),e.selected?(R(),z(`span`,Hw)):W(``,!0),V(`div`,{class:k(M(LS)(`relative w-[var(--key-col-width,272px)] shrink-0 border-r border-border-soft p-[14px_16px_14px_18px]`,e.selected&&`bg-primary-soft/60`))},[V(`div`,Uw,[V(`button`,{type:`button`,role:`checkbox`,"aria-checked":!!e.checked,"data-testid":`row-select`,class:k([`absolute left-0 top-0.5 flex size-4 items-center justify-center rounded border transition-colors`,e.checked?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`]),"aria-label":`Select key`,onClick:Yl(g,[`stop`])},[e.checked?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],10,Ww),V(`div`,Gw,[H(M(rb),null,{default:N(()=>[H(M(lb),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`flex size-6 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,"aria-label":`Key actions`,disabled:u.value,onClick:n[0]||=Yl(()=>{},[`stop`])},[H(M(Ru),{class:`size-4`})],8,Kw)]),_:1}),H(M(TC),{align:`end`},{default:N(()=>[f.value.length>0?(R(),B(M(EC),{key:0,disabled:u.value,onSelect:h},{default:N(()=>[H(M(yd),{class:`size-4`}),U(` Translate missing (`+A(f.value.length)+`) `,1)]),_:1},8,[`disabled`])):W(``,!0),H(M(EC),{onSelect:y},{default:N(()=>[H(M(od),{class:`size-4`}),n[9]||=U(` Rename `,-1)]),_:1}),H(M(EC),{"data-testid":`toggle-skip`,disabled:l.value,onSelect:v},{default:N(()=>[H(M(Qu),{class:`size-4`}),U(` `+A(e.entry.skipTranslate?`Include in translation`:`Skip translation`),1)]),_:1},8,[`disabled`]),H(M(EC),{class:`text-destructive data-[highlighted]:bg-destructive/10 data-[highlighted]:text-destructive`,onSelect:n[1]||=e=>c.value=!0},{default:N(()=>[H(M(Td),{class:`size-4`}),n[10]||=U(` Delete `,-1)]),_:1})]),_:1})]),_:1})]),V(`div`,{class:`break-words pl-6 pr-7 font-mono text-[13.5px] font-semibold tracking-tight cursor-pointer`,onClick:n[2]||=Yl(e=>g(e),[`stop`])},[V(`span`,{innerHTML:r.value},null,8,qw),e.entry.screenshot?(R(),B(M(Xu),{key:0,class:`ml-1.5 inline size-3.5 align-[-2px] text-muted-foreground`,"aria-label":`Has screenshot`})):W(``,!0)]),e.entry.plural||e.entry.skipTranslate||(e.issues?.length??0)>0?(R(),z(`div`,Jw,[e.entry.plural?(R(),z(`span`,Yw,[n[11]||=U(`PLURAL`,-1),V(`span`,Xw,`· `+A(e.entry.plural.arg),1)])):W(``,!0),e.entry.skipTranslate?(R(),B(M(ax),{key:1},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[...n[12]||=[V(`span`,{"data-testid":`skip-badge`,class:`inline-flex items-center gap-1 rounded-md border border-warning-border bg-warning-bg px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-warning`},`SKIP`,-1)]]),_:1}),H(M(PC),null,{default:N(()=>[...n[13]||=[U(`Excluded from translation`,-1)]]),_:1})]),_:1})):W(``,!0),(e.issues?.length??0)>0?(R(),B(M(ax),{key:2},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,Zw,[H(M(Ed),{class:`size-3`}),U(A(e.issues.length),1)])]),_:1}),H(M(PC),null,{default:N(()=>[U(A(e.issues.length)+` issue`+A(e.issues.length===1?``:`s`),1)]),_:1})]),_:1})):W(``,!0)])):W(``,!0),(e.entry.tags??[]).length?(R(),z(`div`,Qw,[(R(!0),z(L,null,F(e.entry.tags,e=>(R(),B(M(ax),{key:e},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`inline-flex h-[22px] items-center gap-1.5 rounded-full border border-primary-border bg-transparent px-[9px] text-xs font-medium text-foreground transition-colors hover:border-primary hover:bg-primary/[0.07]`,onClick:Yl(t=>a(`filter-tag`,e),[`stop`])},[H(M(Cd),{class:`size-3 text-primary`}),U(A(e),1)],8,$w)]),_:2},1024),H(M(PC),null,{default:N(()=>[U(`Filter by tag: `+A(e),1)]),_:2},1024)]),_:2},1024))),128))])):W(``,!0),f.value.length>0?(R(),B(M(ax),{key:2},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,"data-testid":u.value?`translating-missing`:`translate-missing-btn`,disabled:u.value,class:`ml-6 mt-2.5 inline-flex items-center gap-1.5 rounded-lg border border-primary-border bg-primary-soft px-2.5 py-1.5 text-[11.5px] font-semibold text-primary transition hover:brightness-95 disabled:opacity-80`,onClick:Yl(h,[`stop`])},[u.value?(R(),B(M(ed),{key:0,class:`size-3 animate-spin`})):(R(),B(M(yd),{key:1,class:`size-3`})),U(` `+A(u.value?`Translating…`:`Translate ${f.value.length} missing`),1)],8,eT)]),_:1}),H(M(PC),null,{default:N(()=>[U(`Translate the `+A(f.value.length)+` missing language`+A(f.value.length>1?`s`:``)+` for this key`,1)]),_:1})]),_:1})):u.value?(R(),z(`span`,tT,[H(M(ed),{class:`size-3 animate-spin`}),n[14]||=U(` Translating… `,-1)])):W(``,!0),p.value.length>0?(R(),B(M(ax),{key:4},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,"data-testid":`retranslate-stale-btn`,disabled:d.value,class:`ml-6 mt-2.5 inline-flex items-center gap-1.5 rounded-lg border border-amber-500/40 bg-amber-500/10 px-2.5 py-1.5 text-[11.5px] font-semibold text-amber-700 transition hover:brightness-95 disabled:opacity-80 dark:text-amber-300`,onClick:Yl(m,[`stop`])},[d.value?(R(),B(M(ed),{key:0,class:`size-3 animate-spin`})):(R(),B(M(cd),{key:1,class:`size-3`})),U(` `+A(d.value?`Re-translating…`:`Re-translate ${p.value.length} stale`),1)],8,nT)]),_:1}),H(M(PC),null,{default:N(()=>[U(`Re-translate the `+A(p.value.length)+` stale language`+A(p.value.length>1?`s`:``)+` for this key`,1)]),_:1})]),_:1})):W(``,!0)])],2),V(`div`,rT,[(R(!0),z(L,null,F(e.locales,t=>(R(),B(zw,{key:t,"key-name":e.keyName,locale:t,"source-locale":e.sourceLocale,value:e.entry.values[t],"max-length":e.entry.maxLength,issues:i.value.get(t)??[],plural:e.entry.plural,"source-forms":e.entry.values[e.sourceLocale]?.forms,filling:u.value&&f.value.includes(t)||d.value&&p.value.includes(t),onChanged:n[3]||=e=>a(`changed`)},null,8,[`key-name`,`locale`,`source-locale`,`value`,`max-length`,`issues`,`plural`,`source-forms`,`filling`]))),128))]),H(M(Oh),{open:o.value,"onUpdate:open":n[6]||=e=>o.value=e},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[15]||=[U(`Rename key`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[...n[16]||=[U(`Use dot notation, e.g. `,-1),V(`span`,{class:`font-mono`},`home.title`,-1),U(`.`,-1)]]),_:1})]),_:1}),V(`div`,iT,[H(M(yC),{for:`rename-key`},{default:N(()=>[...n[17]||=[U(`New key`,-1)]]),_:1}),H(M(BS),{id:`rename-key`,modelValue:s.value,"onUpdate:modelValue":n[4]||=e=>s.value=e,class:`font-mono`,onKeydown:Zl(Yl(b,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`])]),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:l.value,onClick:n[5]||=e=>o.value=!1},{default:N(()=>[...n[18]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{disabled:l.value,onClick:b},{default:N(()=>[...n[19]||=[U(`Rename`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]),H(M(Oh),{open:c.value,"onUpdate:open":n[8]||=e=>c.value=e},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[20]||=[U(`Delete key`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[n[21]||=U(` Delete `,-1),V(`code`,aT,A(e.keyName),1),n[22]||=U(` and all its translations? This cannot be undone. `,-1)]),_:1})]),_:1}),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:l.value,onClick:n[7]||=e=>c.value=!1},{default:N(()=>[...n[23]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{variant:`destructive`,disabled:l.value,onClick:x},{default:N(()=>[...n[24]||=[U(`Delete`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`])],10,Bw))}}),sT=[{id:`phpstorm`,label:`PhpStorm`,buildUrl:e=>`phpstorm://open?file=${encodeURIComponent(e.abs)}&line=${e.line}`},{id:`vscode`,label:`VS Code`,buildUrl:e=>`vscode://file${e.abs}:${e.line}:${e.col}`},{id:`zed`,label:`Zed`,buildUrl:e=>`zed://file${e.abs}:${e.line}:${e.col}`}],cT=`vscode`,lT=e=>sT.some(t=>t.id===e),uT=j(cT);function dT(e){lT(e)&&(uT.value=e,lf({editor:e}).catch(()=>{}))}async function fT(){try{let{editor:e}=await cf();lT(e)&&(uT.value=e)}catch{}}function pT(e,t){return(sT.find(e=>e.id===uT.value)??sT[0]).buildUrl(e,t)}function mT(){return{dirs:new Map,files:new Map}}function hT(e){let t=mT();for(let n of e){let e=n.file.split(`/`).filter(Boolean),r=e.pop()??n.file,i=t;for(let t of e){let e=i.dirs.get(t);e||(e=mT(),i.dirs.set(t,e)),i=e}let a=i.files.get(r)??[];a.push({line:n.line,url:n.url}),i.files.set(r,a)}let n=[],r=(e,t)=>{for(let i of[...e.dirs.keys()].sort()){let a=i,o=e.dirs.get(i);for(;o.files.size===0&&o.dirs.size===1;){let e=[...o.dirs.keys()][0];a+=`/`+e,o=o.dirs.get(e)}n.push({kind:`dir`,depth:t,label:a}),r(o,t+1)}for(let r of[...e.files.keys()].sort()){let i=e.files.get(r).slice().sort((e,t)=>e.line-t.line);n.push({kind:`file`,depth:t,name:r,refs:i})}};return r(t,0),n}var gT={class:`flex flex-col gap-2`},_T={class:`flex items-center gap-1.5`},vT={key:0,class:`flex flex-col gap-2`},yT={class:`mt-1 flex gap-2`},bT={class:`flex items-center justify-between`},xT={class:`font-mono text-[10px] text-muted-foreground`},ST={class:`flex gap-1.5`},CT=[`onClick`],wT=[`onClick`],TT={class:`whitespace-pre-wrap break-words text-[12.5px] leading-snug`},ET=P({__name:`NotesEditor`,props:{keyName:{},notes:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=e=>new Date(e).toLocaleString(),a=j(``),o=j(!1);async function s(){let e=a.value.trim();if(e){o.value=!0;try{await bf(n.keyName,e),a.value=``,r(`changed`)}catch(e){$.error(`Could not add note: ${e.message}`)}finally{o.value=!1}}}let c=j(null),l=j(``),u=j(!1);function d(e){c.value=e.id,l.value=e.text}function f(){c.value=null,l.value=``}async function p(e){let t=l.value.trim();if(t){u.value=!0;try{await xf(n.keyName,e,t),f(),r(`changed`)}catch(e){$.error(`Could not save note: ${e.message}`)}finally{u.value=!1}}}async function m(e){try{await Sf(n.keyName,e),r(`changed`)}catch(e){$.error(`Could not delete note: ${e.message}`)}}return(t,n)=>(R(),z(`div`,gT,[V(`div`,_T,[H(M(xd),{class:`size-3.5 text-muted-foreground`}),n[2]||=V(`p`,{class:`text-[13px] font-semibold`},`Notes`,-1)]),n[6]||=V(`p`,{class:`-mt-1 text-[11.5px] text-muted-foreground`},`Internal notes — never sent to the AI or exported.`,-1),e.notes.length?(R(),z(`ul`,vT,[(R(!0),z(L,null,F(e.notes,e=>(R(),z(`li`,{key:e.id,class:`flex flex-col gap-1 rounded-lg border border-border-soft bg-background p-2.5 text-sm`},[c.value===e.id?(R(),z(L,{key:0},[H(M($C),{modelValue:l.value,"onUpdate:modelValue":n[0]||=e=>l.value=e,rows:`2`,onKeydown:Zl(Yl(f,[`prevent`]),[`escape`])},null,8,[`modelValue`,`onKeydown`]),V(`div`,yT,[H(M(Q),{size:`sm`,disabled:u.value||!l.value.trim(),onClick:t=>p(e.id)},{default:N(()=>[...n[3]||=[U(`Save`,-1)]]),_:1},8,[`disabled`,`onClick`]),H(M(Q),{size:`sm`,variant:`ghost`,onClick:f},{default:N(()=>[...n[4]||=[U(`Cancel`,-1)]]),_:1})])],64)):(R(),z(L,{key:1},[V(`div`,bT,[V(`span`,xT,A(i(e.at)),1),V(`span`,ST,[V(`button`,{type:`button`,"aria-label":`Edit note`,class:`text-muted-foreground hover:text-foreground`,onClick:t=>d(e)},[H(M(od),{class:`size-3.5`})],8,CT),V(`button`,{type:`button`,"aria-label":`Delete note`,class:`text-muted-foreground hover:text-destructive`,onClick:t=>m(e.id)},[H(M(Td),{class:`size-3.5`})],8,wT)])]),V(`p`,TT,A(e.text),1)],64))]))),128))])):W(``,!0),H(M($C),{"data-testid":`new-note`,modelValue:a.value,"onUpdate:modelValue":n[1]||=e=>a.value=e,rows:`2`,placeholder:`Add an internal note…`},null,8,[`modelValue`]),H(M(Q),{"data-testid":`add-note`,variant:`outline`,class:`w-full text-muted-foreground`,disabled:o.value||!a.value.trim(),onClick:s},{default:N(()=>[...n[5]||=[U(` Add note `,-1)]]),_:1},8,[`disabled`])]))}}),DT={class:`flex shrink-0 flex-col overflow-y-auto border-l border-border bg-card max-[1080px]:hidden`},OT={key:0,class:`flex flex-1 flex-col items-center justify-center gap-2.5 p-10 text-center text-muted-foreground`},kT={key:1,class:`flex flex-col gap-4 px-5 pb-10 pt-[18px]`},AT={class:`flex flex-col gap-0.5`},jT=[`innerHTML`],MT={class:`flex flex-wrap items-center gap-2`},NT={key:0,class:`rounded-md border border-primary-border bg-primary-soft px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-primary`},PT={key:1,class:`rounded-md border border-border-soft bg-accent px-1.5 py-0.5 font-mono text-[10px] font-bold uppercase tracking-wide text-muted-foreground`},FT=[`disabled`],IT=[`disabled`],LT={key:0,class:`flex flex-col gap-1.5`},RT={class:`flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wide text-destructive`},zT={class:`font-mono text-[11px] font-semibold`},BT={class:`ml-auto rounded border border-destructive px-1.5 py-0.5 text-[10.5px] font-semibold text-destructive`},VT=[`disabled`,`onClick`],HT={key:1,class:`flex flex-col gap-1.5`},UT={class:`flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wide text-muted-foreground`},WT={class:`font-mono text-[11px] font-semibold`},GT={class:`flex flex-col gap-1.5`},KT={class:`flex items-center gap-1.5`},qT={key:0,class:`ml-auto text-[11.5px] text-muted-foreground`},JT={key:0,class:`text-[12px] text-muted-foreground`},YT={key:0,class:`rounded-md border border-border-soft bg-accent px-2 py-1.5 text-[12px] text-muted-foreground`},XT={key:1,class:`flex flex-col gap-0.5 text-[11.5px]`},ZT={class:`min-w-0 truncate font-mono`,style:{direction:`rtl`,"text-align":`left`}},QT=[`href`],$T={key:1,class:`min-w-0 shrink truncate font-mono text-foreground`},eE={class:`flex min-w-0 flex-wrap items-baseline gap-x-1.5 gap-y-0.5`},tE=[`href`],nE={key:1,class:`shrink-0 font-mono text-muted-foreground`},rE={key:2,class:`flex flex-col gap-1`},iE={class:`flex items-center gap-1 text-[11px] font-medium text-muted-foreground`},aE={class:`flex flex-col gap-1`},oE={class:`min-w-0 flex-1 truncate font-mono`,style:{direction:`rtl`,"text-align":`left`}},sE={class:`shrink-0 rounded border border-dashed border-border-soft px-1 font-mono text-[10px]`},cE={class:`shrink-0 font-mono`},lE={key:3,class:`flex flex-col gap-1`},uE={class:`flex items-center gap-1 text-[11px] font-medium text-muted-foreground`},dE={class:`flex flex-col gap-1`},fE={class:`min-w-0 flex-1 truncate font-mono`,style:{direction:`rtl`,"text-align":`left`}},pE={class:`shrink-0 rounded border border-dashed border-border-soft px-1 font-mono text-[10px]`},mE={class:`shrink-0 font-mono`},hE={class:`flex flex-col gap-1.5`},gE={class:`flex items-center gap-1.5`},_E={class:`ml-0.5 flex items-center gap-0.5 rounded border border-primary/30 bg-primary/10 px-1 py-0.5 text-[10px] font-semibold text-primary`},vE=[`disabled`],yE={class:`flex flex-col gap-1.5`},bE={class:`flex items-center gap-1.5`},xE={class:`flex flex-col gap-1.5`},SE={class:`flex items-center gap-1.5`},CE={class:`flex flex-col gap-2`},wE={class:`flex items-center gap-1.5`},TE={key:0,class:`flex flex-col gap-2`},EE=[`src`,`alt`],DE={class:`flex gap-2`},OE=[`disabled`],kE={class:`flex flex-col gap-1.5 text-[11.5px] text-muted-foreground`},AE={class:`flex items-center justify-between gap-3`},jE={class:`font-mono text-[11px] text-foreground`},ME={class:`flex items-center justify-between gap-3`},NE={class:`font-mono text-[11px] text-foreground`},PE=P({__name:`DetailPanel`,props:{keyName:{},entry:{},issues:{},locales:{},sourceLocale:{},usageRevision:{}},emits:[`changed`],setup(e,{emit:t}){let n=e,r=t,i=e=>e?new Date(e).toLocaleString():`—`,a=K(()=>n.keyName?n.keyName.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/\./g,`.<wbr>`):``),o=K(()=>{let e=``;for(let t of Object.values(n.entry?.values??{}))t.updatedAt&&t.updatedAt>e&&(e=t.updatedAt);return e||void 0}),s=K(()=>!!n.entry?.plural),c=j(!1),l;function u(){RS(n.keyName).then(()=>{c.value=!0,clearTimeout(l),l=setTimeout(()=>c.value=!1,1500)}).catch(()=>{})}let d={placeholder:`Placeholder`,spelling:`Spelling`,length:`Length`,glossary:`Glossary`},f=K(()=>(n.issues??[]).filter(e=>e.check!==`untranslated`)),p={spelling:`spelling`,length:`max-length`},m=j(!1);async function h(e){let t=p[e.check];if(!(!t||!n.keyName||m.value)){m.value=!0;try{await jf(n.keyName,t,e.locale),$.success(`Dismissed until the source text changes`),r(`changed`)}catch(e){$.error(e.message)}finally{m.value=!1}}}let g=K(()=>{let e=n.entry,t=n.sourceLocale;return!e||!t?[]:(n.locales??[]).filter(n=>LC(e,n,t))}),_=j(null),v=j(!1),y=j(!1);function b(){_.value?.click()}async function x(e){let t=e.target,i=t.files?.[0];if(t.value=``,!(!i||!n.keyName)){v.value=!0;try{await vf(n.keyName,i),$.success(`Screenshot uploaded`),r(`changed`)}catch(e){$.error(`Upload failed: ${e.message}`)}finally{v.value=!1}}}async function S(){if(n.keyName){y.value=!0;try{await yf(n.keyName),$.success(`Screenshot removed`),r(`changed`)}catch(e){$.error(`Could not remove: ${e.message}`)}finally{y.value=!1}}}let C=Xt({context:``,tags:``,maxLength:void 0}),w=j(!1),T=j(!1);async function ee(){if(n.keyName){T.value=!0;try{let e=0,t=[];for await(let r of $d({keyGlob:n.keyName,all:!0,force:!0}))r.type===`done`&&(e=r.written,t=r.errors);e>0?($.success(`Context suggested and saved — review it below`),r(`changed`)):t.length>0?$.error(t[0].error):$.info(`No usage found — add a code snippet or type context manually`)}catch(e){$.error(`Could not suggest: ${e.message}`)}finally{T.value=!1}}}Dr(()=>[n.keyName,n.entry],()=>{C.context=n.entry?.context??``,C.tags=(n.entry?.tags??[]).join(`, `),C.maxLength=n.entry?.maxLength},{immediate:!0});let E=j(null),te=j(6);async function ne(){let e=n.keyName;if(!e){E.value=null;return}try{E.value=await nf(e)}catch{E.value=null}}Dr(()=>n.keyName,async()=>{E.value=null,te.value=6,await ne()},{immediate:!0}),Dr(()=>n.usageRevision,ne);let re=e=>pT(e,E.value?.project??``),D=K(()=>(E.value?.refs??[]).map(e=>({...e,url:re(e)}))),ie=K(()=>(E.value?.prefixRefs??[]).map(e=>({...e,url:re(e)}))),ae=K(()=>(E.value?.literalRefs??[]).map(e=>({...e,url:pT(e,E.value?.project??``)}))),oe=K(()=>hT(D.value.slice(0,te.value))),se=e=>e.find(e=>e.url)?.url??null,O=j(`count`),ce=j(!1);Dr(()=>[n.keyName,n.entry],()=>{O.value=n.entry?.plural?.arg??`count`},{immediate:!0});async function le(){if(!n.keyName)return;let e=O.value.trim()||`count`;ce.value=!0;try{await Wd(n.keyName,e),$.success(`Converted to plural`),r(`changed`)}catch(e){$.error(`Could not convert: ${e.message}`)}finally{ce.value=!1}}async function ue(){if(n.keyName){ce.value=!0;try{await Gd(n.keyName),$.success(`Converted to a single string`),r(`changed`)}catch(e){$.error(`Could not convert: ${e.message}`)}finally{ce.value=!1}}}async function de(){let e=O.value.trim();if(!(!n.keyName||!e||e===n.entry?.plural?.arg))try{await zd(n.keyName,{pluralArg:e}),$.success(`Renamed count variable`),r(`changed`)}catch(e){$.error(`Could not rename: ${e.message}`)}}async function fe(){if(n.keyName){w.value=!0;try{await zd(n.keyName,{metadata:{context:C.context.trim(),tags:C.tags.split(`,`).map(e=>e.trim()).filter(Boolean),maxLength:C.maxLength?Number(C.maxLength):null}}),$.success(`Metadata saved`),r(`changed`)}catch(e){$.error(`Could not save: ${e.message}`)}finally{w.value=!1}}}return(t,n)=>(R(),z(`aside`,DT,[!e.keyName||!e.entry?(R(),z(`div`,OT,[H(M(Wu),{class:`size-5`}),n[6]||=V(`p`,{class:`max-w-[200px] text-sm leading-relaxed`},`Select a key to view and edit its details.`,-1)])):(R(),z(`div`,kT,[V(`div`,AT,[n[7]||=V(`span`,{class:`text-[10.5px] font-bold uppercase tracking-wide text-muted-foreground`},`Key`,-1),H(M(ax),{"disable-closing-trigger":``},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,{class:`inline-block w-fit break-words cursor-pointer font-mono text-base font-semibold tracking-tight`,innerHTML:a.value,onClick:u},null,8,jT)]),_:1}),H(M(PC),null,{default:N(()=>[U(A(c.value?`Copied`:`Click to copy`),1)]),_:1})]),_:1})]),V(`div`,MT,[s.value?(R(),z(`span`,NT,`PLURAL`)):(R(),z(`span`,PT,`SINGLE`)),s.value?(R(),z(L,{key:2},[n[8]||=V(`span`,{class:`text-[11.5px] text-muted-foreground`},`arg`,-1),H(M(BS),{modelValue:O.value,"onUpdate:modelValue":n[0]||=e=>O.value=e,class:`h-7 w-24 font-mono text-xs`,"aria-label":`Number variable name`,onBlur:de,onKeydown:Zl(Yl(de,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`]),V(`button`,{type:`button`,class:`ml-auto rounded-md px-2 py-1 text-[12px] font-semibold text-primary transition-colors hover:bg-primary-soft disabled:opacity-50`,disabled:ce.value,onClick:ue},`Make single`,8,FT)],64)):(R(),z(`button`,{key:3,type:`button`,class:`ml-auto rounded-md px-2 py-1 text-[12px] font-semibold text-primary transition-colors hover:bg-primary-soft disabled:opacity-50`,disabled:ce.value,onClick:le},`Make plural`,8,IT))]),f.value.length||g.value.length?(R(),z(`div`,{key:0,class:k(M(LS)(`flex flex-col gap-3 rounded-xl border border-border bg-background p-3`,f.value.length&&`border-primary-border`))},[f.value.length?(R(),z(`div`,LT,[V(`div`,RT,[H(M(Ed),{class:`size-3.5`}),U(` `+A(f.value.length)+` issue`+A(f.value.length===1?``:`s`),1)]),(R(!0),z(L,null,F(f.value,(e,t)=>(R(),z(`div`,{key:t,class:`group flex items-center gap-2 text-[12.5px]`},[H(vw,{code:e.locale,size:14},null,8,[`code`]),V(`span`,zT,A(e.locale.toUpperCase()),1),V(`span`,BT,A(d[e.check]??e.check),1),p[e.check]?(R(),B(M(ax),{key:0},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`flex size-[20px] items-center justify-center rounded text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100`,disabled:m.value,"aria-label":`Dismiss until the source changes`,onClick:t=>h(e)},[H(M(Cu),{class:`size-3`})],8,VT)]),_:2},1024),H(M(PC),null,{default:N(()=>[...n[9]||=[U(`Dismiss until the source text changes`,-1)]]),_:1})]),_:2},1024)):W(``,!0)]))),128))])):W(``,!0),g.value.length?(R(),z(`div`,HT,[V(`div`,UT,[n[10]||=V(`span`,{class:`size-[7px] rounded-full bg-muted-foreground`},null,-1),U(` `+A(g.value.length)+` untranslated `,1)]),(R(!0),z(L,null,F(g.value,e=>(R(),z(`div`,{key:e,class:`flex items-center gap-2 text-[12.5px]`},[H(vw,{code:e,size:14},null,8,[`code`]),V(`span`,WT,A(e.toUpperCase()),1),n[11]||=V(`span`,{class:`ml-auto rounded border border-border-soft bg-accent px-1.5 py-0.5 text-[10.5px] font-semibold italic text-muted-foreground`},`Empty`,-1)]))),128))])):W(``,!0)],2)):W(``,!0),V(`div`,GT,[V(`div`,KT,[H(M(Iu),{class:`size-3.5 text-muted-foreground`}),n[12]||=V(`span`,{class:`text-[13px] font-semibold`},`Usage`,-1),E.value?.indexed?(R(),z(`span`,qT,A(E.value.count)+` reference`+A(E.value.count===1?``:`s`),1)):W(``,!0)]),!E.value||!E.value.indexed?(R(),z(`p`,JT,` Run a scan to find where this key is used in your code. `)):(R(),z(L,{key:1},[E.value.count===0&&ie.value.length===0&&ae.value.length===0?(R(),z(`p`,YT,` Not referenced in the last scan — this key may be unused. `)):W(``,!0),D.value.length?(R(),z(`div`,XT,[(R(!0),z(L,null,F(oe.value,(e,t)=>(R(),z(L,{key:t},[e.kind===`dir`?(R(),z(`div`,{key:0,class:`flex items-center gap-1 text-muted-foreground`,style:he({paddingLeft:`${e.depth*12}px`})},[H(M(qu),{class:`size-3 shrink-0`}),H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,ZT,A(e.label),1)]),_:2},1024),H(M(PC),{class:`font-mono`},{default:N(()=>[U(A(e.label),1)]),_:2},1024)]),_:2},1024)],4)):(R(),z(`div`,{key:1,class:`flex items-baseline gap-1.5`,style:he({paddingLeft:`${e.depth*12+16}px`})},[H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[se(e.refs)?(R(),z(`a`,{key:0,href:se(e.refs),class:`min-w-0 shrink truncate rounded px-0.5 font-mono text-foreground hover:bg-accent hover:text-primary`},A(e.name),9,QT)):(R(),z(`span`,$T,A(e.name),1))]),_:2},1024),H(M(PC),{class:`font-mono`},{default:N(()=>[U(A(se(e.refs)?`Open ${e.name}`:e.name),1)]),_:2},1024)]),_:2},1024),V(`span`,eE,[(R(!0),z(L,null,F(e.refs,(t,n)=>(R(),z(L,{key:n},[t.url?(R(),B(M(ax),{key:0},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`a`,{href:t.url,class:`shrink-0 rounded px-0.5 font-mono text-muted-foreground hover:bg-accent hover:text-primary`},`:`+A(t.line),9,tE)]),_:2},1024),H(M(PC),{class:`font-mono`},{default:N(()=>[U(`Open `+A(e.name)+`:`+A(t.line),1)]),_:2},1024)]),_:2},1024)):(R(),z(`span`,nE,`:`+A(t.line),1))],64))),128))])],4))],64))),128)),E.value.count>te.value?(R(),z(`button`,{key:0,type:`button`,class:`mt-0.5 self-start text-[11.5px] text-primary hover:underline`,onClick:n[1]||=e=>te.value=E.value.count},` + `+A(E.value.count-te.value)+` more `,1)):W(``,!0)])):W(``,!0),ie.value.length?(R(),z(`div`,rE,[V(`p`,iE,[H(M(Su),{class:`size-3`}),n[13]||=U(` Possible usage (dynamic keys) `,-1)]),V(`ul`,aE,[(R(!0),z(L,null,F(ie.value,(e,t)=>(R(),z(`li`,{key:t,class:`text-[11.5px]`},[H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[(R(),B(aa(e.url?`a`:`div`),{href:e.url||void 0,class:k([`group flex items-baseline gap-2 text-muted-foreground`,e.url?`hover:text-primary`:``])},{default:N(()=>[V(`span`,oE,A(e.file),1),V(`span`,sE,A(e.prefix)+`*`,1),V(`span`,cE,`:`+A(e.line),1),e.url?(R(),B(M(Bu),{key:0,class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-100`})):W(``,!0)]),_:2},1032,[`href`,`class`]))]),_:2},1024),H(M(PC),{class:`font-mono`},{default:N(()=>[U(A(e.url?`Open ${e.file}:${e.line}`:`${e.file}:${e.line}`),1)]),_:2},1024)]),_:2},1024)]))),128))])])):W(``,!0),ae.value.length?(R(),z(`div`,lE,[V(`p`,uE,[H(M(Su),{class:`size-3`}),n[14]||=U(` Possible usage (string literals) `,-1)]),V(`ul`,dE,[(R(!0),z(L,null,F(ae.value,(e,t)=>(R(),z(`li`,{key:t,class:`text-[11.5px]`},[H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[(R(),B(aa(e.url?`a`:`div`),{href:e.url||void 0,class:k([`group flex items-baseline gap-2 text-muted-foreground`,e.url?`hover:text-primary`:``])},{default:N(()=>[V(`span`,fE,A(e.file),1),V(`span`,pE,`'`+A(e.literal)+`'`,1),V(`span`,mE,`:`+A(e.line),1),e.url?(R(),B(M(Bu),{key:0,class:`size-3 shrink-0 opacity-0 transition-opacity group-hover:opacity-100`})):W(``,!0)]),_:2},1032,[`href`,`class`]))]),_:2},1024),H(M(PC),{class:`font-mono`},{default:N(()=>[U(A(e.url?`Open ${e.file}:${e.line}`:`${e.file}:${e.line}`),1)]),_:2},1024)]),_:2},1024)]))),128))])])):W(``,!0)],64))]),V(`div`,hE,[V(`div`,gE,[H(M(Zu),{class:`size-3.5 text-muted-foreground`}),n[16]||=V(`label`,{for:`detail-context`,class:`text-[13px] font-semibold`},`Context`,-1),e.entry.contextSource===`ai`?(R(),B(M(ax),{key:0},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,_E,[H(M(yd),{class:`size-2.5`}),n[15]||=U(` AI `,-1)])]),_:1}),H(M(PC),null,{default:N(()=>[U(A(e.entry.contextAt?`AI-generated ${i(e.entry.contextAt)}`:`AI-generated`),1)]),_:1})]),_:1})):W(``,!0),H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`ml-auto flex items-center gap-1 rounded px-1.5 py-0.5 text-[11.5px] font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-40`,disabled:T.value,onClick:ee},[H(M(yd),{class:`size-3`}),U(` `+A(T.value?`Suggesting…`:`Suggest`),1)],8,vE)]),_:1}),H(M(PC),null,{default:N(()=>[U(A(T.value?`Suggesting…`:`Suggest context with AI`),1)]),_:1})]),_:1})]),H(M($C),{id:`detail-context`,modelValue:C.context,"onUpdate:modelValue":n[2]||=e=>C.context=e,rows:`5`,class:`min-h-28`,placeholder:`Where/how this string is used…`},null,8,[`modelValue`])]),V(`div`,yE,[V(`div`,bE,[H(M(wd),{class:`size-3.5 text-muted-foreground`}),n[17]||=V(`label`,{for:`detail-tags`,class:`text-[13px] font-semibold`},`Tags`,-1)]),H(M(BS),{id:`detail-tags`,modelValue:C.tags,"onUpdate:modelValue":n[3]||=e=>C.tags=e,placeholder:`comma, separated`},null,8,[`modelValue`])]),V(`div`,xE,[V(`div`,SE,[H(M(ud),{class:`size-3.5 text-muted-foreground`}),n[18]||=V(`label`,{for:`detail-maxlen`,class:`text-[13px] font-semibold`},`Max length`,-1)]),H(M(BS),{id:`detail-maxlen`,modelValue:C.maxLength,"onUpdate:modelValue":n[4]||=e=>C.maxLength=e,modelModifiers:{number:!0},type:`number`,min:`0`,placeholder:`—`,class:`font-mono`},null,8,[`modelValue`])]),H(M(Q),{class:`w-full`,disabled:w.value,onClick:fe},{default:N(()=>[...n[19]||=[U(`Save details`,-1)]]),_:1},8,[`disabled`]),n[25]||=V(`div`,{class:`h-px bg-border-soft`},null,-1),e.keyName?(R(),B(ET,{key:1,"key-name":e.keyName,notes:e.entry.notes??[],onChanged:n[5]||=e=>r(`changed`)},null,8,[`key-name`,`notes`])):W(``,!0),n[26]||=V(`div`,{class:`h-px bg-border-soft`},null,-1),V(`div`,CE,[V(`div`,wE,[H(M(Xu),{class:`size-3.5 text-muted-foreground`}),n[20]||=V(`span`,{class:`text-[13px] font-semibold`},`Screenshot`,-1)]),V(`input`,{ref_key:`fileInput`,ref:_,type:`file`,accept:`image/*`,class:`hidden`,onChange:x},null,544),e.entry.screenshot?(R(),z(`div`,TE,[V(`img`,{src:`/`+e.entry.screenshot,alt:`Screenshot for ${e.keyName}`,class:`max-h-48 w-full rounded-lg border border-border object-contain`},null,8,EE),V(`div`,DE,[H(M(Q),{variant:`outline`,size:`sm`,disabled:v.value,onClick:b},{default:N(()=>[H(M(cd),{class:`size-4`}),n[21]||=U(` Replace `,-1)]),_:1},8,[`disabled`]),H(M(Q),{variant:`outline`,size:`sm`,class:`text-muted-foreground hover:text-destructive`,disabled:y.value,onClick:S},{default:N(()=>[H(M(Td),{class:`size-4`}),n[22]||=U(` Remove `,-1)]),_:1},8,[`disabled`])])])):(R(),z(`button`,{key:1,type:`button`,class:`flex w-full flex-col items-center gap-2 rounded-xl border-[1.5px] border-dashed border-input p-[22px] text-center text-[12.5px] font-medium text-muted-foreground transition-colors hover:border-primary-border hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-60`,disabled:v.value,onClick:b},[H(M(Od),{class:`size-5`}),U(` `+A(v.value?`Uploading…`:`Upload screenshot`),1)],8,OE))]),n[27]||=V(`div`,{class:`h-px bg-border-soft`},null,-1),V(`div`,kE,[V(`div`,AE,[n[23]||=V(`span`,null,`Created`,-1),V(`span`,jE,A(i(e.entry.createdAt)),1)]),V(`div`,ME,[n[24]||=V(`span`,null,`Last updated`,-1),V(`span`,NE,A(i(o.value)),1)])])]))]))}}),FE={class:`grid gap-3`},IE={class:`grid gap-1.5`},LE={class:`grid gap-1.5`},RE={class:`flex items-center justify-between gap-2 rounded-md border p-2.5`},zE={class:`flex flex-col`},BE={key:0,class:`grid gap-1.5`},VE={key:1,class:`text-sm text-destructive`},HE=P({__name:`AddKeyDialog`,props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:ka([`created`],[`update:open`]),setup(e,{emit:t}){let n=Za(e,`open`),r=t,i=j(``),a=j(``),o=j(``),s=j(!1),c=j(!1),l=j(`count`);Dr(n,e=>{e&&(i.value=``,a.value=``,o.value=``,c.value=!1,l.value=`count`)});async function u(){let e=i.value.trim();if(!e){o.value=`Key is required.`;return}if(!a.value.trim()){o.value=`Source value is required.`;return}s.value=!0,o.value=``;try{c.value?await Nd(e,a.value,{arg:l.value.trim()||`count`}):await Nd(e,a.value),$.success(`Added ${e}`),n.value=!1,r(`created`,e)}catch(e){o.value=e.message}finally{s.value=!1}}return(e,t)=>(R(),B(M(Oh),{open:n.value,"onUpdate:open":t[5]||=e=>n.value=e},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...t[6]||=[U(`Add key`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[...t[7]||=[U(`Create a new translation key using dot notation.`,-1)]]),_:1})]),_:1}),V(`div`,FE,[V(`div`,IE,[H(M(yC),{for:`add-key`},{default:N(()=>[...t[8]||=[U(`Key `,-1),V(`span`,{class:`text-destructive`},`*`,-1)]]),_:1}),H(M(BS),{id:`add-key`,modelValue:i.value,"onUpdate:modelValue":t[0]||=e=>i.value=e,class:`font-mono`,placeholder:`home.title`,onKeydown:Zl(Yl(u,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`])]),V(`div`,LE,[H(M(yC),{for:`add-value`},{default:N(()=>[U(A(c.value?`Source value (other form)`:`Source value`)+` `,1),t[9]||=V(`span`,{class:`text-destructive`},`*`,-1)]),_:1}),H(M(BS),{id:`add-value`,modelValue:a.value,"onUpdate:modelValue":t[1]||=e=>a.value=e,placeholder:c.value?`{count} items`:`Welcome home`,onKeydown:Zl(Yl(u,[`prevent`]),[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeydown`])]),V(`div`,RE,[V(`div`,zE,[H(M(yC),{for:`add-plural`,class:`cursor-pointer`},{default:N(()=>[...t[10]||=[U(`Plural`,-1)]]),_:1}),t[11]||=V(`span`,{class:`text-xs text-muted-foreground`},`One form per CLDR category, by locale.`,-1)]),H(M(XS),{id:`add-plural`,modelValue:c.value,"onUpdate:modelValue":t[2]||=e=>c.value=e},null,8,[`modelValue`])]),c.value?(R(),z(`div`,BE,[H(M(yC),{for:`add-plural-arg`},{default:N(()=>[...t[12]||=[U(`Count argument`,-1)]]),_:1}),H(M(BS),{id:`add-plural-arg`,modelValue:l.value,"onUpdate:modelValue":t[3]||=e=>l.value=e,class:`font-mono`,placeholder:`count`,onKeydown:Zl(Yl(u,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`])])):W(``,!0),o.value?(R(),z(`p`,VE,A(o.value),1)):W(``,!0)]),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:s.value,onClick:t[4]||=e=>n.value=!1},{default:N(()=>[...t[13]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{disabled:s.value||!i.value.trim()||!a.value.trim(),onClick:u},{default:N(()=>[...t[14]||=[U(`Add key`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),UE={key:0,class:`flex items-center gap-1.5 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-400`},WE={key:1,class:`text-sm text-destructive`},GE={key:2,class:`flex flex-1 items-center justify-center py-12 text-sm text-muted-foreground`},KE={key:0,class:`flex flex-col gap-1 rounded-md border border-amber-500/30 bg-amber-500/10 p-3 text-sm text-amber-700 dark:text-amber-400`},qE={class:`flex items-center gap-1.5 font-medium`},JE={class:`list-inside list-disc pl-1`},YE={class:`grid min-h-0 flex-1 grid-cols-[16rem_1fr] gap-3 overflow-hidden`},XE={class:`min-h-0 overflow-y-auto rounded-md border`},ZE=[`onClick`],QE={key:0,class:`px-3 py-2 text-xs text-muted-foreground`},$E={key:0,class:`min-h-0 overflow-auto rounded-md border bg-muted/30 p-3 font-mono text-xs leading-relaxed [tab-size:2]`},eD={key:1,class:`flex min-h-0 items-center justify-center rounded-md border text-sm text-muted-foreground`},tD=P({__name:`ExportDialog`,props:ka({exportLocales:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:[`update:open`],setup(e){let t=Za(e,`open`),n=e,r=K(()=>(n.exportLocales?.length??0)>0),i=j(!1),a=j(!1),o=j(``),s=j([]),c=j([]),l=j(null),u=K(()=>s.value.find(e=>e.path===l.value)??null);async function d(){i.value=!0,o.value=``,s.value=[],c.value=[],l.value=null;try{let e=await wf();s.value=[...e.files].sort((e,t)=>e.path.localeCompare(t.path)),c.value=e.warnings,l.value=s.value[0]?.path??null}catch(e){o.value=e.message}finally{i.value=!1}}Dr(t,e=>{e&&d()},{immediate:!0});async function f(){a.value=!0;try{let e=await Tf();$.success(`Wrote ${e.files} file${e.files===1?``:`s`}`),t.value=!1}catch(e){$.error(`Export failed: ${e.message}`)}finally{a.value=!1}}return(e,d)=>(R(),B(M(Oh),{open:t.value,"onUpdate:open":d[1]||=e=>t.value=e},{default:N(()=>[H(M(bC),{class:`flex max-h-[85vh] w-full max-w-5xl flex-col`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...d[2]||=[U(`Export preview`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[...d[3]||=[U(`Review the files that will be written to disk.`,-1)]]),_:1})]),_:1}),r.value?(R(),z(`p`,UE,[H(M(Ed),{class:`size-3.5 shrink-0`}),U(` Export is limited to `+A(n.exportLocales.length)+` language`+A(n.exportLocales.length===1?``:`s`)+` (Settings → Export targets). `,1)])):W(``,!0),o.value?(R(),z(`p`,WE,A(o.value),1)):W(``,!0),i.value?(R(),z(`div`,GE,` Generating preview… `)):o.value?W(``,!0):(R(),z(L,{key:3},[c.value.length?(R(),z(`div`,KE,[V(`p`,qE,[H(M(Ed),{class:`size-4`}),U(` `+A(c.value.length)+` warning`+A(c.value.length===1?``:`s`),1)]),V(`ul`,JE,[(R(!0),z(L,null,F(c.value,(e,t)=>(R(),z(`li`,{key:t},A(e),1))),128))])])):W(``,!0),V(`div`,YE,[V(`ul`,XE,[(R(!0),z(L,null,F(s.value,e=>(R(),z(`li`,{key:e.path},[H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:k(M(LS)(`w-full truncate px-3 py-1.5 text-left font-mono text-xs transition-colors`,e.path===l.value?`bg-accent text-accent-foreground`:`hover:bg-muted/60`)),onClick:t=>l.value=e.path},A(e.path),11,ZE)]),_:2},1024),H(M(PC),{class:`font-mono`},{default:N(()=>[U(A(e.path),1)]),_:2},1024)]),_:2},1024)]))),128)),s.value.length===0?(R(),z(`li`,QE,` No files to write. `)):W(``,!0)]),u.value?(R(),z(`pre`,$E,A(u.value.contents),1)):(R(),z(`div`,eD,` Select a file to preview its contents. `))])],64)),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:a.value,onClick:d[0]||=e=>t.value=!1},{default:N(()=>[...d[4]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{disabled:i.value||a.value||s.value.length===0,onClick:f},{default:N(()=>[H(M(Uu),{class:`size-4`}),U(` `+A(a.value?`Writing…`:`Write ${s.value.length} file${s.value.length===1?``:`s`}`),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),nD={class:`relative h-2 w-full overflow-hidden rounded-full bg-muted`},rD=P({__name:`Progress`,props:{modelValue:{}},setup(e){return(t,n)=>(R(),z(`div`,nD,[V(`div`,{class:`h-full bg-primary transition-all`,style:he({width:`${Math.min(100,Math.max(0,e.modelValue??0))}%`})},null,4)]))}}),iD={key:0,class:`rounded-md border bg-muted/40 px-3 py-2 text-xs text-muted-foreground`},aD={class:`font-medium text-foreground`},oD={key:0,class:`mt-0.5`},sD={key:1,class:`mt-1`},cD={class:`mt-1`},lD={key:1,class:`flex min-h-0 flex-col gap-1.5`},uD={class:`flex justify-between text-xs text-muted-foreground`},dD={key:0},fD={key:0,class:`mt-1 flex max-h-56 min-h-0 flex-col overflow-y-auto rounded-md border text-sm`},pD={key:2,class:`flex flex-col gap-1 rounded-md border border-destructive/30 bg-destructive/10 p-3 text-sm text-destructive`},mD={class:`flex items-center gap-1.5 font-medium`},hD={key:3,class:`flex min-h-0 flex-col gap-1.5`},gD={class:`flex items-center gap-1.5 text-sm font-medium text-amber-700 dark:text-amber-400`},_D={class:`min-h-0 flex-1 overflow-y-auto rounded-md border text-sm`},vD={class:`inline-flex items-center gap-1.5 font-mono text-xs`},yD={class:`text-muted-foreground`},bD=P({__name:`TranslateDialog`,props:ka({state:{},filteredKeys:{},targetLocale:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:ka([`changed`],[`update:open`]),setup(e,{emit:t}){let n=e,r=Za(e,`open`),i=t,a=j(!1),o=j(``),s=j([]),c=j(0),l=j(0),u=null,d=j([]),f=e=>d.value.find(t=>t.locale===e),p=K(()=>d.value.filter(e=>e.status===`active`).length),m={active:0,queued:1,done:2},h=K(()=>[...d.value].sort((e,t)=>m[e.status]-m[t.status])),g=e=>e===`active`?ed:e===`done`?Ou:Pu,_=K(()=>{let e=n.state;return e?n.targetLocale?[n.targetLocale]:e.config.locales.filter(t=>t!==e.config.sourceLocale):[]}),v=K(()=>{let e=n.state;if(!e)return 0;let t=n.filteredKeys?new Set(n.filteredKeys):null,r=0;for(let[n,i]of Object.entries(e.keys))if(!(t&&!t.has(n))&&!i.skipTranslate)for(let t of _.value)LC(i,t,e.config.sourceLocale)&&r++;return r}),y=j(null),b=K(()=>y.value??v.value),x=j(!1),S=j(!1);async function C(){x.value=!1;try{let e=await Jd();x.value=e.supported&&!e.pending}catch{}}async function w(){S.value=!0;try{let e=await Yd({keys:n.filteredKeys?.length?n.filteredKeys:void 0,locales:n.targetLocale?[n.targetLocale]:void 0});$.success(`Batch of ${e.total.toLocaleString()} strings submitted — results apply when processing finishes (usually under an hour).`),r.value=!1}catch(e){o.value=e.message}finally{S.value=!1}}let T=j(null),ee=e=>e>=1e4?`${Math.round(e/1e3)}k`:e.toLocaleString(),E=e=>e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`,te=K(()=>{let e=T.value?.estimatedCost;return e==null?`Batch (50% off)`:`Batch ≈ ${E(e/2)} (50% off)`});async function ne(){T.value=null;try{T.value=await qd({keys:n.filteredKeys?.length?n.filteredKeys:void 0,locales:n.targetLocale?[n.targetLocale]:void 0})}catch{}}Dr(r,e=>{e&&(o.value=``,s.value=[],c.value=0,l.value=0,d.value=[],y.value=null,ne(),C())},{immediate:!0});function re(){u?.abort()}async function D(){u=new AbortController,a.value=!0,o.value=``,s.value=[],c.value=0,d.value=[],y.value=v.value,l.value=y.value;try{let e=u.signal,t=0,a=n.filteredKeys?.length?n.filteredKeys:void 0,o=n.targetLocale?[n.targetLocale]:void 0,p=o?[e,a,o]:a?[e,a]:[e];for await(let e of Qd(...p))if(e.type===`start`)l.value=e.total,d.value=e.locales.map(e=>({locale:e.locale,total:e.total,done:0,status:`queued`}));else if(e.type===`locale-start`){let t=f(e.locale);t&&(t.status=`active`)}else if(e.type===`progress`){c.value=e.done,l.value=e.total;let t=f(e.locale);t&&(t.done=e.localeDone,t.status===`queued`&&(t.status=`active`)),i(`changed`)}else if(e.type===`locale-done`){let t=f(e.locale);t&&(t.status=`done`,t.done=t.total)}else e.type===`done`&&(t=e.written,s.value=e.errors,c.value=l.value,i(`changed`));e.aborted||($.success(`Translated ${t} string${t===1?``:`s`}`),s.value.length===0&&(r.value=!1))}catch(e){e.name!==`AbortError`&&(o.value=e.message)}finally{a.value=!1,u=null}}return(e,t)=>(R(),B(M(Oh),{open:r.value,"onUpdate:open":t[1]||=e=>r.value=e},{default:N(()=>[H(M(bC),{class:`flex max-h-[85vh] max-w-lg flex-col`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...t[2]||=[U(`Translate missing strings`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[b.value===0?(R(),z(L,{key:0},[U(`Nothing missing — all translations are filled.`)],64)):(R(),z(L,{key:1},[U(` Translate `+A(b.value.toLocaleString())+` missing string`+A(b.value===1?``:`s`)+` across `+A(_.value.length)+` language`+A(_.value.length===1?``:`s`)+` with Claude? This sends source strings + context to the AI provider. `,1)],64))]),_:1})]),_:1}),T.value&&T.value.requests>0&&b.value>0&&!a.value&&c.value===0?(R(),z(`div`,iD,[V(`p`,null,[U(` ≈ `+A(T.value.requests.toLocaleString())+` requests · `+A(T.value.batches.toLocaleString())+` batch`+A(T.value.batches===1?``:`es`)+` · ~`+A(ee(T.value.inputTokens))+` in / ~`+A(ee(T.value.outputTokens))+` out tokens`,1),T.value.estimatedCost===null?W(``,!0):(R(),z(L,{key:0},[t[3]||=U(` · `,-1),V(`span`,aD,`≈ `+A(E(T.value.estimatedCost)),1),t[4]||=U(` (±20%)`,-1)],64))]),T.value.pricing?W(``,!0):(R(),z(`p`,oD,` No pricing known for this model — set a price in Settings → AI for a dollar estimate. `)),T.value.perLocale.length>1?(R(),z(`details`,sD,[t[5]||=V(`summary`,{class:`cursor-pointer select-none`},`Per-language breakdown`,-1),V(`ul`,cD,[(R(!0),z(L,null,F(T.value.perLocale,e=>(R(),z(`li`,{key:e.locale,class:`flex justify-between font-mono tabular-nums`},[V(`span`,null,A(e.locale),1),V(`span`,null,A(e.requests.toLocaleString())+` req · ~`+A(ee(e.inputTokens))+` / ~`+A(ee(e.outputTokens)),1)]))),128))])])):W(``,!0)])):W(``,!0),a.value||c.value>0?(R(),z(`div`,lD,[V(`div`,uD,[V(`span`,null,A(c.value.toLocaleString())+` / `+A(l.value.toLocaleString())+` translated`,1),a.value&&d.value.length?(R(),z(`span`,dD,A(p.value)+` of `+A(d.value.length)+` language`+A(d.value.length===1?``:`s`)+` active`,1)):W(``,!0)]),H(M(rD),{"model-value":l.value>0?c.value/l.value*100:0},null,8,[`model-value`]),d.value.length?(R(),z(`ul`,fD,[(R(!0),z(L,null,F(h.value,e=>(R(),z(`li`,{key:e.locale,class:k([`flex items-center gap-2 border-b px-3 py-1.5 last:border-b-0`,e.status===`queued`&&`opacity-55`])},[(R(),B(aa(g(e.status)),{class:k([`size-3.5 shrink-0`,e.status===`active`?`animate-spin text-primary`:e.status===`done`?`text-emerald-600 dark:text-emerald-400`:`text-muted-foreground`])},null,8,[`class`])),H(Ew,{code:e.locale,size:14,"show-name":``},null,8,[`code`]),V(`span`,{class:k([`ml-auto font-mono text-xs tabular-nums`,e.status===`active`?`text-foreground`:`text-muted-foreground`])},A(e.done.toLocaleString())+` / `+A(e.total.toLocaleString()),3)],2))),128))])):W(``,!0)])):W(``,!0),o.value?(R(),z(`div`,pD,[V(`p`,mD,[H(M(Ed),{class:`size-4`}),t[6]||=U(` Translation failed `,-1)]),V(`p`,null,A(o.value),1)])):W(``,!0),s.value.length?(R(),z(`div`,hD,[V(`p`,gD,[H(M(Ed),{class:`size-4`}),U(` `+A(s.value.length)+` string`+A(s.value.length===1?``:`s`)+` could not be translated `,1)]),V(`ul`,_D,[(R(!0),z(L,null,F(s.value,(e,t)=>(R(),z(`li`,{key:`${e.key}-${e.locale}-${t}`,class:`border-b px-3 py-1.5 last:border-b-0`},[V(`span`,vD,[U(A(e.key)+` @ `,1),H(Ew,{code:e.locale,size:12},null,8,[`code`])]),V(`span`,yD,` — `+A(e.error),1)]))),128))])])):W(``,!0),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,onClick:t[0]||=e=>a.value?re():r.value=!1},{default:N(()=>[U(A(a.value?`Cancel`:`Close`),1)]),_:1}),b.value>0&&x.value?(R(),B(M(Q),{key:0,variant:`outline`,disabled:a.value||S.value,onClick:w},{default:N(()=>[U(A(S.value?`Submitting…`:te.value),1)]),_:1},8,[`disabled`])):W(``,!0),b.value>0?(R(),B(M(Q),{key:1,disabled:a.value,onClick:D},{default:N(()=>[H(M(yd),{class:`size-4`}),U(` `+A(a.value?`Translating…`:`Translate`),1)]),_:1},8,[`disabled`])):W(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),xD={key:0,class:`flex flex-col gap-1.5`},SD={class:`flex justify-between text-xs text-muted-foreground`},CD={key:1,class:`flex flex-col gap-1 rounded-md border border-destructive/30 bg-destructive/10 p-3 text-sm text-destructive`},wD={class:`flex items-center gap-1.5 font-medium`},TD={key:2,class:`flex min-h-0 flex-col gap-1.5`},ED={class:`flex items-center gap-1.5 text-sm font-medium text-amber-700 dark:text-amber-400`},DD={class:`min-h-0 flex-1 overflow-y-auto rounded-md border text-sm`},OD={class:`font-mono text-xs`},kD={class:`text-muted-foreground`},AD=P({__name:`ContextDialog`,props:ka({state:{},keys:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:ka([`changed`],[`update:open`]),setup(e,{emit:t}){let n=e,r=Za(e,`open`),i=t,a=j(!1),o=j(null),s=j(``),c=j([]),l=j(0),u=j(0),d=K(()=>{let e=n.state;return e?n.keys.filter(t=>e.keys[t]&&!e.keys[t].context).length:0});Dr(r,e=>{e?(s.value=``,c.value=[],l.value=0,u.value=0):o.value?.abort()});function f(){o.value?.abort()}async function p(){a.value=!0,s.value=``,c.value=[],l.value=0,u.value=0,o.value=new AbortController;let e=!1;try{for await(let t of $d({keys:n.keys},o.value.signal))t.type===`start`?u.value=t.total:t.type===`progress`?(l.value=t.done,u.value=t.total):t.type===`done`&&(e=!0,l.value=u.value,c.value=t.errors,i(`changed`),$.success(`Built context for ${t.written} key${t.written===1?``:`s`}`),t.errors.length===0&&(r.value=!1))}catch(e){s.value=e.message}finally{!e&&o.value?.signal.aborted&&(i(`changed`),$(`Build cancelled after ${l.value} of ${u.value} keys`)),o.value=null,a.value=!1}}return(e,t)=>(R(),B(M(Oh),{open:r.value,"onUpdate:open":t[1]||=e=>r.value=e},{default:N(()=>[H(M(bC),{class:`flex max-h-[85vh] max-w-lg flex-col`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...t[2]||=[U(`Build context`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[d.value===0?(R(),z(L,{key:0},[U(` All selected keys already have context — nothing to build. `)],64)):(R(),z(L,{key:1},[U(` Build AI context notes for `+A(d.value)+` selected key`+A(d.value===1?``:`s`)+` that currently have none? The AI will scan call-site code snippets to write a short translator hint for each key. `,1)],64))]),_:1})]),_:1}),a.value||l.value>0?(R(),z(`div`,xD,[V(`div`,SD,[V(`span`,null,A(l.value.toLocaleString())+` / `+A(u.value.toLocaleString())+` built`,1)]),H(M(rD),{"model-value":u.value>0?l.value/u.value*100:0},null,8,[`model-value`])])):W(``,!0),s.value?(R(),z(`div`,CD,[V(`p`,wD,[H(M(Ed),{class:`size-4`}),t[3]||=U(` Build failed `,-1)]),V(`p`,null,A(s.value),1)])):W(``,!0),c.value.length?(R(),z(`div`,TD,[V(`p`,ED,[H(M(Ed),{class:`size-4`}),U(` `+A(c.value.length)+` key`+A(c.value.length===1?``:`s`)+` could not be processed `,1)]),V(`ul`,DD,[(R(!0),z(L,null,F(c.value,(e,t)=>(R(),z(`li`,{key:`${e.key}-${t}`,class:`border-b px-3 py-1.5 last:border-b-0`},[V(`span`,OD,A(e.key),1),V(`span`,kD,` — `+A(e.error),1)]))),128))])])):W(``,!0),H(M(SC),null,{default:N(()=>[a.value?(R(),B(M(Q),{key:0,variant:`outline`,onClick:f},{default:N(()=>[...t[4]||=[U(`Cancel`,-1)]]),_:1})):(R(),B(M(Q),{key:1,variant:`outline`,onClick:t[0]||=e=>r.value=!1},{default:N(()=>[...t[5]||=[U(`Close`,-1)]]),_:1})),d.value>0?(R(),B(M(Q),{key:2,disabled:a.value,onClick:p},{default:N(()=>[H(M(yd),{class:`size-4`}),U(` `+A(a.value?`Building…`:`Build context`),1)]),_:1},8,[`disabled`])):W(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),jD={key:0,class:`flex items-center gap-3 rounded-md border bg-muted/40 px-3 py-2 text-sm`},MD={class:`flex min-w-0 flex-1 flex-col gap-1`},ND={class:`truncate`},PD=P({__name:`BatchBanner`,emits:[`changed`],setup(e,{expose:t,emit:n}){let r=n,i=j(null),a=j(!1),o;async function s(){try{i.value=(await Jd()).pending}catch{}}Ki(()=>{s(),o=setInterval(()=>void s(),3e4)}),Xi(()=>clearInterval(o)),t({refresh:s});let c=K(()=>{let e=i.value?.counts;return e?e.succeeded+e.errored+e.canceled+e.expired:0}),l=K(()=>{let e=i.value?.counts;return e?c.value+e.processing:0}),u=K(()=>i.value?.status===`ended`);async function d(){a.value=!0;try{let e=await Xd(),t=[e.retried?`${e.retried} retried`:``,e.staleSkipped?`${e.staleSkipped} stale skipped`:``,e.errors.length?`${e.errors.length} error(s)`:``].filter(Boolean).join(`, `);$.success(`Batch applied — wrote ${e.written} translation(s)${t?` (${t})`:``}`),r(`changed`),await s()}catch(e){$.error(e.message)}finally{a.value=!1}}async function f(){if(window.confirm(`Cancel this batch? Finished entries are discarded.`))try{await Zd(),await s()}catch(e){$.error(e.message)}}return(e,t)=>i.value?(R(),z(`div`,jD,[(R(),B(aa(u.value?M(Ou):M(ed)),{class:k([`size-4 shrink-0`,u.value?`text-emerald-600 dark:text-emerald-400`:`animate-spin text-primary`])},null,8,[`class`])),V(`div`,MD,[V(`span`,ND,[U(` Batch translation (`+A(i.value.total.toLocaleString())+` strings) `,1),u.value?(R(),z(L,{key:0},[U(` — finished, ready to apply`)],64)):i.value.counts?(R(),z(L,{key:1},[U(` — `+A(c.value)+` / `+A(l.value)+` entries done`,1)],64)):(R(),z(L,{key:2},[U(` — checking status…`)],64))]),!u.value&&l.value>0?(R(),B(M(rD),{key:0,"model-value":c.value/l.value*100,class:`h-1`},null,8,[`model-value`])):W(``,!0)]),H(M(Q),{size:`sm`,disabled:!u.value||a.value,onClick:d},{default:N(()=>[U(A(a.value?`Applying…`:u.value?`Apply results`:`Waiting…`),1)]),_:1},8,[`disabled`]),H(M(Q),{size:`sm`,variant:`ghost`,disabled:a.value,onClick:f},{default:N(()=>[H(M(Ad),{class:`size-4`})]),_:1},8,[`disabled`])])):W(``,!0)}}),FD={key:1,class:`text-muted-foreground`},ID={class:`flex items-center gap-2 border-b px-3`},LD={class:`absolute left-2 flex size-3.5 items-center justify-center`},RD={class:`flex w-full min-w-0 items-center justify-between gap-2`},zD={class:`shrink-0 font-mono text-xs text-muted-foreground`},BD=P({__name:`LocaleCombobox`,props:ka({locales:{},placeholder:{},class:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=e,n=Za(e,`modelValue`),r=j(!1),i=j(``),a=K(()=>t.locales.map(e=>({code:e,resolved:KC(e)})).sort((e,t)=>e.resolved.name.localeCompare(t.resolved.name,`en`))),o=K(()=>{let e=i.value.trim().toLowerCase();return e?a.value.filter(({code:t,resolved:n})=>t.toLowerCase().includes(e)||n.bcp47.toLowerCase().includes(e)||n.name.toLowerCase().includes(e)||(n.endonym?.toLowerCase().includes(e)??!1)):a.value});function s(e){r.value=e,e&&(i.value=``)}return(a,c)=>(R(),B(M(ay),{modelValue:n.value,"onUpdate:modelValue":c[1]||=e=>n.value=e,open:r.value,"ignore-filter":``,"onUpdate:open":s},{default:N(()=>[H(M(oy),{"as-child":``},{default:N(()=>[H(M(vy),{class:k(M(LS)(`flex h-9 items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50`,t.class))},{default:N(()=>[n.value?(R(),B(Ew,{key:0,code:n.value,"show-name":``,"show-code":!1,size:14},null,8,[`code`])):(R(),z(`span`,FD,A(e.placeholder??`Locale`),1)),H(M(ku),{class:`size-4 shrink-0 opacity-50`})]),_:1},8,[`class`])]),_:1}),H(M(_y),null,{default:N(()=>[H(M(uy),{position:`popper`,align:`start`,"side-offset":4,class:`z-50 max-h-96 w-[260px] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out 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]:translate-y-1 data-[side=top]:-translate-y-1`},{default:N(()=>[V(`div`,ID,[H(M(md),{class:`size-4 shrink-0 opacity-50`}),H(M(my),{modelValue:i.value,"onUpdate:modelValue":c[0]||=e=>i.value=e,"display-value":()=>``,placeholder:`Search locales…`,class:`h-9 w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground`},null,8,[`modelValue`])]),H(M(by),{class:`max-h-72 p-1`},{default:N(()=>[H(M(dy),{class:`py-6 text-center text-sm text-muted-foreground`},{default:N(()=>[...c[2]||=[U(` No locales found `,-1)]]),_:1}),(R(!0),z(L,null,F(o.value,({code:e})=>(R(),B(M(hy),{key:e,value:e,class:`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`},{default:N(()=>[V(`span`,LD,[H(M(gy),null,{default:N(()=>[H(M(Ou),{class:`size-4`})]),_:1})]),V(`span`,RD,[H(Ew,{code:e,"show-name":``,"show-code":!1,size:14},null,8,[`code`]),V(`span`,zD,A(e.toUpperCase()),1)])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})]),_:1})]),_:1},8,[`modelValue`,`open`]))}}),VD={class:`relative w-0 shrink-0`},HD=[`aria-valuenow`,`aria-valuemin`,`aria-valuemax`],UD=P({__name:`ResizeHandle`,props:{side:{},width:{},min:{},max:{}},emits:[`update:width`,`commit`,`reset`],setup(e,{emit:t}){let n=e,r=t,i=j(!1);function a(e){if(e.button!==0)return;let t=e.currentTarget,a=e.clientX,o=n.width,s=n.side===`right`?1:-1;i.value=!0,t.setPointerCapture(e.pointerId),document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`;let c=e=>Math.min(n.max,Math.max(n.min,Math.round(e))),l=e=>{r(`update:width`,c(o+s*(e.clientX-a)))},u=()=>{t.removeEventListener(`pointermove`,l),t.removeEventListener(`pointerup`,u),t.removeEventListener(`pointercancel`,u),document.body.style.cursor=``,document.body.style.userSelect=``,i.value=!1,r(`commit`)};t.addEventListener(`pointermove`,l),t.addEventListener(`pointerup`,u),t.addEventListener(`pointercancel`,u)}return(t,n)=>(R(),z(`div`,VD,[V(`div`,{class:k(M(LS)(`absolute inset-y-0 -left-1 z-10 w-2 cursor-col-resize transition-colors hover:bg-primary/20`,i.value&&`bg-primary/30`)),role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":e.width,"aria-valuemin":e.min,"aria-valuemax":e.max,"aria-label":`Resize panel (double-click to reset)`,onPointerdown:a,onDblclick:n[0]||=e=>r(`reset`)},null,42,HD)]))}});function WD(e,t,n,r){let i=`glotfile-${e}`,a=e=>Math.min(r,Math.max(n,Math.round(e))),o=j((()=>{let e=Number(localStorage.getItem(i));return Number.isFinite(e)&&e>0?a(e):t})()),s=()=>{localStorage.setItem(i,String(o.value)),sf({[e]:o.value}).catch(()=>{})};return{width:o,min:n,max:r,set:e=>{o.value=a(e)},commit:s,reset:()=>{o.value=t,s()},syncValue:e=>{typeof e==`number`&&Number.isFinite(e)&&(o.value=a(e),localStorage.setItem(i,String(o.value)))}}}var GD=WD(`keyColumnWidth`,272,180,560),KD=WD(`detailPanelWidth`,420,320,720);async function qD(e){try{let t=e??await of();GD.syncValue(t.keyColumnWidth),KD.syncValue(t.detailPanelWidth)}catch{}}var JD={class:`flex min-h-0 flex-1 flex-col`},YD={class:`flex shrink-0 flex-wrap items-center gap-2 border-b px-4 py-2`},XD={class:`relative`},ZD={key:0,class:`rounded bg-primary px-1.5 text-xs text-primary-foreground`},QD=[`aria-label`],$D={class:`ml-auto flex items-center gap-2`},eO={class:`mr-1 text-xs text-muted-foreground tabular-nums`},tO={key:2},nO={key:3},rO={key:4},iO={key:0,class:`flex shrink-0 flex-wrap items-center gap-1.5 border-b px-4 py-1.5`},aO=[`aria-label`,`onClick`],oO=[`aria-label`,`onClick`],sO=[`aria-label`,`onClick`],cO={class:`px-4 py-2 empty:hidden`},lO={key:1,class:`sticky top-0 z-20 flex h-11 shrink-0 items-center gap-2 border-b bg-background pl-[18px] pr-4`},uO=[`aria-checked`,`aria-label`],dO={class:`text-sm font-medium tabular-nums`},fO={class:`text-sm text-muted-foreground`},pO={key:1,for:`select-all-checkbox`,class:`cursor-pointer select-none text-sm text-muted-foreground`},mO={class:`relative min-w-0 flex-1 overflow-hidden`},hO={key:0,class:`flex h-full items-center justify-center gap-2 p-8 text-sm text-muted-foreground`},gO={key:1,class:`flex h-full items-center justify-center p-8 text-sm text-muted-foreground`},_O=[`data-index`],vO=`glotfile:enabledChecks`,yO=P({__name:`EditorView`,setup(e){let t=GD.width,n=KD.width,r=dn(null),{filter:i,sort:a,view:o,locale:s}=yp(Op()),c=j(i),l=NC();function u(){try{let e=localStorage.getItem(vO);if(e){let t=JSON.parse(e);return cp.filter(e=>t.includes(e))}}catch{}return[...lp]}let d=j(u()),f=j(new Map),p=j(null),m=j(!1),h=j(0);async function g(){try{let e=await rf();m.value=e.indexed,p.value=e.indexed?new Set(e.used):null}catch{m.value=!1,p.value=null}h.value++}let _=j(!1),v=0;async function y(){if(d.value.length===0){f.value=new Map,_.value=!1;return}try{let e=await kf(d.value);f.value=hp(e.issues),_.value=e.spellPending,e.spellPending&&v<6?(v++,setTimeout(y,800)):v=0}catch{f.value=new Map}}Dr(d,e=>{localStorage.setItem(vO,JSON.stringify(e)),v=0,y()},{deep:!0});let b=j(a),x=j(o),S=j(s),C=null;Dr([b,x,S,()=>({...c.value,text:void 0})],()=>{kp(bp({filter:c.value,sort:b.value,view:x.value,locale:S.value}))},{deep:!0}),Dr(()=>c.value.text,()=>{C&&clearTimeout(C),C=setTimeout(()=>{kp(bp({filter:c.value,sort:b.value,view:x.value,locale:S.value}))},300)});let w=K(()=>c.value.states.length+c.value.issues.length+c.value.plurality.length+ +!!c.value.emptySource+ +!!c.value.aiContextUnreviewed+ +!!c.value.noUsages+ +!!c.value.skipTranslate),T=K(()=>{let e=0;for(let t of f.value.values())e+=t.length;return e});function ee(e){c.value.states=c.value.states.filter(t=>t!==e)}function E(e){c.value.issues=c.value.issues.filter(t=>t!==e)}function te(e){c.value.plurality=c.value.plurality.filter(t=>t!==e)}if(Ap.value){let e=Ap.value;if(c.value={text:``,states:[],issues:[],plurality:[],tag:``,needsAttention:!1,emptySource:!1,aiContextUnreviewed:!1,noUsages:!1,skipTranslate:!1,...e},e.issues?.length){let t=new Set([...d.value,...e.issues]);d.value=cp.filter(e=>t.has(e))}e.locale&&(x.value=`bilingual`,S.value=e.locale),Ap.value=null}let ne=j(null);Mp.value&&=(ne.value=Mp.value,null);let re=j(!1),D=j(!1),ie=j(!1),ae=j(!1),oe=j(!1),se=j(null),O=j(null),ce=j(!0),le=j(!1);async function ue(){r.value=await Md(),y()}let de=setTimeout(()=>{ce.value&&(le.value=!0)},250);ue().finally(()=>{ce.value=!1,le.value=!1,clearTimeout(de)});let fe=K(()=>r.value?.config.sourceLocale??``),pe=K(()=>r.value?.config.locales??[]),me=K(()=>pe.value.filter(e=>e!==fe.value));Dr(me,e=>{!S.value&&e.length>0&&(S.value=e[0])},{immediate:!0});let ge=K(()=>{if(x.value===`bilingual`)return S.value?[fe.value,S.value]:[fe.value];let e=pe.value.filter(e=>e!==fe.value);return[fe.value,...e]}),_e=K(()=>{let e=r.value;if(!e)return[];let t=x.value===`bilingual`&&S.value?S.value:void 0;return sp(e,{...c.value,locale:t},f.value,p.value??void 0)}),ve=K(()=>{let e=r.value,t=_e.value;if(b.value===`key-desc`)return[...t].reverse();if(b.value===`created`){let n=t=>{let n=e?.keys[t]?.createdAt;return n?Date.parse(n):0};return[...t].sort((e,t)=>n(t)-n(e))}if(b.value===`updated`){let n=t=>{let n=Object.values(e?.keys[t]?.values??{}),r=0;for(let e of n){let t=e.updatedAt?Date.parse(e.updatedAt):0;t>r&&(r=t)}return r};return[...t].sort((e,t)=>n(t)-n(e))}return t}),ye=K(()=>x.value===`bilingual`?S.value?[S.value]:[]:me.value),be=K(()=>x.value===`bilingual`?S.value||`—`:`all ${me.value.length} targets`),xe=K(()=>l.keys()),Se=K(()=>l.count.value),Ce=K(()=>l.allSelected(ve.value)),we=K(()=>l.someSelected(ve.value)),Te=K(()=>{let e=r.value;if(!e)return[];let t=new Set;for(let n of l.keys())for(let r of e.keys[n]?.tags??[])t.add(r);return[...t].sort()});function Ee(){l.allSelected(ve.value)?l.clear():l.selectAll(ve.value)}function De(e,t){t?l.toggleRange(e,ve.value):l.toggle(e)}Dr(ve,e=>l.pruneTo(e));let Oe=K(()=>r.value&&ne.value?r.value.keys[ne.value]??null:null),ke=rp(K(()=>({count:ve.value.length,getScrollElement:()=>O.value,estimateSize:()=>56,overscan:8,getItemKey:e=>ve.value[e]??e}))),Ae=K(()=>ke.value.getVirtualItems()),je=K(()=>ke.value.getTotalSize());function Me(e){ne.value=e}let Ne=j(null);function Pe(){let e=Ne.value?.$el;e?.focus?.(),e?.select?.()}function Fe(e){let t=e.target,n=!!(t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable)),r=!!document.querySelector(`[role="listbox"],[role="menu"],[role="dialog"]`);if(e.key===`/`&&!n&&!r&&!e.metaKey&&!e.ctrlKey&&!e.altKey){e.preventDefault(),Pe();return}if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`||n||r)return;let i=ve.value;if(i.length===0)return;e.preventDefault();let a=ne.value?i.indexOf(ne.value):-1,o=Math.max(0,Math.min(i.length-1,e.key===`ArrowDown`?a+1:a-1)),s=i[o];s&&(ne.value=s,ke.value.scrollToIndex(o,{align:`auto`}))}Ki(()=>window.addEventListener(`keydown`,Fe)),Xi(()=>{window.removeEventListener(`keydown`,Fe),C&&clearTimeout(C)}),Ki(async()=>{try{let e=await tf();e.indexed&&!se.value&&!oe.value&&(se.value=`${e.files.toLocaleString()} files · ${e.refs.toLocaleString()} refs`)}catch{}g()});async function Ie(e,t){ne.value===e&&(ne.value=t),await ue()}async function Le(e){await ue(),ne.value=e,c.value.text=`"${e}"`}async function Re(){oe.value=!0,se.value=null;try{let e=await ef();se.value=`${e.files.toLocaleString()} files · ${e.refs.toLocaleString()} refs`,await g()}catch{se.value=`Scan failed`}finally{oe.value=!1}}return(e,i)=>(R(),B(M(tx),{"delay-duration":400},{default:N(()=>[V(`div`,JD,[V(`div`,YD,[V(`div`,XD,[H(M(md),{class:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),H(M(BS),{ref_key:`searchInput`,ref:Ne,modelValue:c.value.text,"onUpdate:modelValue":i[0]||=e=>c.value.text=e,placeholder:`Search keys, values, context…`,class:`h-8 w-64 pl-8 pr-8`,onKeydown:i[1]||=Zl(e=>c.value.text=``,[`esc`])},null,8,[`modelValue`]),c.value.text?(R(),z(`button`,{key:0,type:`button`,class:`absolute right-1.5 top-1/2 grid size-5 -translate-y-1/2 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,"aria-label":`Clear search`,onClick:i[2]||=e=>c.value.text=``},[H(M(Ad),{class:`size-3.5`})])):W(``,!0)]),H(M(Jy),null,{default:N(()=>[H(M(eb),{"as-child":``},{default:N(()=>[H(M(Q),{variant:`outline`,size:`sm`,class:`h-8 gap-1.5`},{default:N(()=>[H(M($u),{class:`size-4 opacity-60`}),i[29]||=U(` Filter `,-1),w.value?(R(),z(`span`,ZD,A(w.value),1)):W(``,!0)]),_:1})]),_:1}),H(M(qS),{align:`start`,class:`w-64`},{default:N(()=>[H(uC,{states:c.value.states,"onUpdate:states":i[3]||=e=>c.value.states=e,issues:c.value.issues,"onUpdate:issues":i[4]||=e=>c.value.issues=e,enabled:d.value,"onUpdate:enabled":i[5]||=e=>d.value=e,plurality:c.value.plurality,"onUpdate:plurality":i[6]||=e=>c.value.plurality=e,"empty-source":c.value.emptySource,"onUpdate:emptySource":i[7]||=e=>c.value.emptySource=e,"ai-context-unreviewed":c.value.aiContextUnreviewed,"onUpdate:aiContextUnreviewed":i[8]||=e=>c.value.aiContextUnreviewed=e,"no-usages":c.value.noUsages,"onUpdate:noUsages":i[9]||=e=>c.value.noUsages=e,"skip-translate":c.value.skipTranslate,"onUpdate:skipTranslate":i[10]||=e=>c.value.skipTranslate=e,"scan-indexed":m.value},null,8,[`states`,`issues`,`enabled`,`plurality`,`empty-source`,`ai-context-unreviewed`,`no-usages`,`skip-translate`,`scan-indexed`])]),_:1})]),_:1}),H(M(Q),{variant:c.value.needsAttention?`default`:`outline`,size:`sm`,class:`h-8 gap-1.5`,role:`switch`,"aria-checked":c.value.needsAttention,onClick:i[11]||=e=>c.value.needsAttention=!c.value.needsAttention},{default:N(()=>[H(M(Ed),{class:k([`size-4`,c.value.needsAttention?``:`opacity-60`])},null,8,[`class`]),i[30]||=U(` Needs attention `,-1),T.value?(R(),z(`span`,{key:0,class:`ml-0.5 rounded-full bg-destructive-soft px-1.5 text-[11px] font-bold text-destructive tabular-nums`,"aria-label":`${T.value} issue${T.value===1?``:`s`}`},A(T.value.toLocaleString()),9,QD)):W(``,!0)]),_:1},8,[`variant`,`aria-checked`]),H(M(yb),{modelValue:b.value,"onUpdate:modelValue":i[12]||=e=>b.value=e},{default:N(()=>[H(M(VS),{class:`h-8 w-[160px]`},{default:N(()=>[H(M(Bb),{placeholder:`Sort`})]),_:1}),H(M(HS),null,{default:N(()=>[H(M(WS),{value:`key-asc`},{default:N(()=>[...i[31]||=[U(`Key A→Z`,-1)]]),_:1}),H(M(WS),{value:`key-desc`},{default:N(()=>[...i[32]||=[U(`Key Z→A`,-1)]]),_:1}),H(M(WS),{value:`created`},{default:N(()=>[...i[33]||=[U(`Recently created`,-1)]]),_:1}),H(M(WS),{value:`updated`},{default:N(()=>[...i[34]||=[U(`Recently updated`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),H(M(Jb),{modelValue:x.value,"onUpdate:modelValue":i[13]||=e=>x.value=e},{default:N(()=>[H(M(GS),{class:`h-8`},{default:N(()=>[H(M(KS),{value:`bilingual`,class:`text-xs`},{default:N(()=>[...i[35]||=[U(`Bilingual`,-1)]]),_:1}),H(M(KS),{value:`multilingual`,class:`text-xs`},{default:N(()=>[...i[36]||=[U(`Multilingual`,-1)]]),_:1})]),_:1})]),_:1},8,[`modelValue`]),x.value===`bilingual`?(R(),B(BD,{key:0,modelValue:S.value,"onUpdate:modelValue":i[14]||=e=>S.value=e,locales:me.value,class:`h-8 w-[170px]`},null,8,[`modelValue`,`locales`])):W(``,!0),V(`div`,$D,[V(`span`,eO,A(ve.value.length.toLocaleString())+` keys`,1),H(M(Q),{size:`sm`,variant:`outline`,onClick:i[15]||=e=>D.value=!0},{default:N(()=>[H(M(Uu),{class:`size-4`}),i[37]||=U(` Export `,-1)]),_:1}),H(M(Q),{size:`sm`,variant:`outline`,disabled:oe.value,onClick:Re},{default:N(()=>[oe.value?(R(),B(M(ed),{key:0,class:`size-4 animate-spin`})):(R(),B(M(fd),{key:1,class:`size-4`})),oe.value?(R(),z(`span`,tO,`Scanning…`)):se.value?(R(),z(`span`,nO,A(se.value),1)):(R(),z(`span`,rO,`Scan`))]),_:1},8,[`disabled`]),H(M(Q),{size:`sm`,onClick:i[16]||=e=>re.value=!0},{default:N(()=>[H(M(sd),{class:`size-4`}),i[38]||=U(` Add key `,-1)]),_:1})])]),c.value.states.length||c.value.issues.length||c.value.plurality.length||c.value.emptySource||c.value.aiContextUnreviewed||c.value.noUsages||c.value.skipTranslate?(R(),z(`div`,iO,[(R(!0),z(L,null,F(c.value.states,e=>(R(),B(M(JS),{key:`s-${e}`,variant:`secondary`,class:`gap-1`},{default:N(()=>[U(A(M(pp)[e])+` `,1),V(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove ${M(pp)[e]} filter`,onClick:t=>ee(e)},[H(M(Ad),{class:`size-3`})],8,aO)]),_:2},1024))),128)),(R(!0),z(L,null,F(c.value.plurality,e=>(R(),B(M(JS),{key:`p-${e}`,variant:`secondary`,class:`gap-1`},{default:N(()=>[U(A(M(mp)[e])+` `,1),V(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove ${M(mp)[e]} filter`,onClick:t=>te(e)},[H(M(Ad),{class:`size-3`})],8,oO)]),_:2},1024))),128)),c.value.emptySource?(R(),B(M(JS),{key:0,variant:`secondary`,class:`gap-1`},{default:N(()=>[i[39]||=U(` Empty source `,-1),V(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove Empty source filter`,onClick:i[17]||=e=>c.value.emptySource=!1},[H(M(Ad),{class:`size-3`})])]),_:1})):W(``,!0),(R(!0),z(L,null,F(c.value.issues,e=>(R(),B(M(JS),{key:`i-${e}`,variant:`outline`,class:`gap-1`},{default:N(()=>[U(A(M(fp)[e])+` `,1),V(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove ${M(fp)[e]} filter`,onClick:t=>E(e)},[H(M(Ad),{class:`size-3`})],8,sO)]),_:2},1024))),128)),c.value.aiContextUnreviewed?(R(),B(M(JS),{key:1,variant:`secondary`,class:`gap-1`},{default:N(()=>[H(M(yd),{class:`size-3`}),i[40]||=U(` AI context (unreviewed) `,-1),V(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove AI context filter`,onClick:i[18]||=e=>c.value.aiContextUnreviewed=!1},[H(M(Ad),{class:`size-3`})])]),_:1})):W(``,!0),c.value.noUsages?(R(),B(M(JS),{key:2,variant:`secondary`,class:`gap-1`},{default:N(()=>[i[41]||=U(` Unused `,-1),V(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove Unused filter`,onClick:i[19]||=e=>c.value.noUsages=!1},[H(M(Ad),{class:`size-3`})])]),_:1})):W(``,!0),c.value.skipTranslate?(R(),B(M(JS),{key:3,variant:`secondary`,class:`gap-1`},{default:N(()=>[i[42]||=U(` Skip-translate `,-1),V(`button`,{type:`button`,class:`hover:text-foreground`,"aria-label":`Remove Skip-translate filter`,onClick:i[20]||=e=>c.value.skipTranslate=!1},[H(M(Ad),{class:`size-3`})])]),_:1})):W(``,!0)])):W(``,!0),V(`div`,cO,[H(PD,{onChanged:ue})]),ve.value.length?(R(),z(`div`,lO,[V(`button`,{id:`select-all-checkbox`,type:`button`,role:`checkbox`,"aria-checked":Ce.value?`true`:we.value?`mixed`:`false`,"data-testid":`select-all`,class:k([`flex size-4 items-center justify-center rounded border transition-colors`,Ce.value||we.value?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`]),"aria-label":Ce.value?`Deselect all`:`Select all`,onClick:Ee},[Ce.value?(R(),B(M(Ou),{key:0,class:`size-3`})):we.value?(R(),B(M(nd),{key:1,class:`size-3`})):W(``,!0)],10,uO),Se.value?(R(),z(L,{key:0},[V(`span`,dO,A(Se.value.toLocaleString())+` selected`,1),V(`span`,fO,`· `+A(be.value),1)],64)):(R(),z(`label`,pO,`Select all`)),Se.value?(R(),B(MC,{key:2,class:`ml-auto`,keys:xe.value,locales:ye.value,"scope-label":be.value,"tags-on-selection":Te.value,onChanged:ue,onClear:i[21]||=e=>M(l).clear(),onTranslate:i[22]||=e=>ie.value=!0,onBuildContext:i[23]||=e=>ae.value=!0},null,8,[`keys`,`locales`,`scope-label`,`tags-on-selection`])):W(``,!0)])):W(``,!0),V(`div`,{class:`flex min-h-0 flex-1 overflow-hidden`,style:he({"--key-col-width":`${M(t)}px`})},[V(`div`,mO,[V(`div`,{ref_key:`parent`,ref:O,class:`h-full overflow-auto`},[le.value?(R(),z(`div`,hO,[H(M(ed),{class:`size-4 animate-spin`}),i[43]||=U(` Loading… `,-1)])):!ce.value&&ve.value.length===0?(R(),z(`div`,gO,` No keys match the current filter. `)):(R(),z(`div`,{key:2,style:he({height:`${je.value}px`,position:`relative`,width:`100%`})},[(R(!0),z(L,null,F(Ae.value,e=>(R(),z(`div`,{key:e.key,ref_for:!0,ref:e=>M(ke).measureElement(e),"data-index":e.index,style:he({position:`absolute`,top:`${e.start}px`,left:`0`,width:`100%`})},[r.value&&ve.value[e.index]?(R(),B(oT,{key:0,"key-name":ve.value[e.index],entry:r.value.keys[ve.value[e.index]],"source-locale":fe.value,locales:ge.value,selected:ne.value===ve.value[e.index],issues:f.value.get(ve.value[e.index])??[],checked:M(l).has(ve.value[e.index]),onSelect:t=>Me(ve.value[e.index]),onChanged:ue,onRenamed:t=>Ie(ve.value[e.index],t),onFilterTag:i[24]||=e=>c.value.text=e,onToggleSelect:t=>De(ve.value[e.index],t.shift)},null,8,[`key-name`,`entry`,`source-locale`,`locales`,`selected`,`issues`,`checked`,`onSelect`,`onRenamed`,`onToggleSelect`])):W(``,!0)],12,_O))),128))],4))],512),ve.value.length?(R(),z(`div`,{key:0,class:`absolute inset-y-0`,style:he({left:`${M(t)}px`})},[H(UD,{side:`right`,class:`h-full`,width:M(t),min:M(GD).min,max:M(GD).max,"onUpdate:width":M(GD).set,onCommit:M(GD).commit,onReset:M(GD).reset},null,8,[`width`,`min`,`max`,`onUpdate:width`,`onCommit`,`onReset`])],4)):W(``,!0)]),H(UD,{side:`left`,class:`max-[1080px]:hidden`,width:M(n),min:M(KD).min,max:M(KD).max,"onUpdate:width":M(KD).set,onCommit:M(KD).commit,onReset:M(KD).reset},null,8,[`width`,`min`,`max`,`onUpdate:width`,`onCommit`,`onReset`]),H(PE,{"key-name":ne.value,entry:Oe.value,issues:ne.value?f.value.get(ne.value)??[]:[],locales:pe.value,"source-locale":fe.value,"usage-revision":h.value,style:he({width:`${M(n)}px`}),onChanged:ue},null,8,[`key-name`,`entry`,`issues`,`locales`,`source-locale`,`usage-revision`,`style`])],4),H(HE,{open:re.value,"onUpdate:open":i[25]||=e=>re.value=e,onCreated:Le},null,8,[`open`]),H(tD,{open:D.value,"onUpdate:open":i[26]||=e=>D.value=e,"export-locales":r.value?.config.exportLocales??[]},null,8,[`open`,`export-locales`]),H(bD,{open:ie.value,"onUpdate:open":i[27]||=e=>ie.value=e,state:r.value,"filtered-keys":xe.value,"target-locale":x.value===`bilingual`?S.value:void 0,onChanged:ue},null,8,[`open`,`state`,`filtered-keys`,`target-locale`]),H(AD,{open:ae.value,"onUpdate:open":i[28]||=e=>ae.value=e,state:r.value,keys:xe.value,onChanged:ue},null,8,[`open`,`state`,`keys`])])]),_:1}))}}),bO={"empty-source":`Empty source`,"empty-translation":`Untranslated`,"placeholder-mismatch":`Placeholder mismatch`,"icu-mismatch":`ICU mismatch`,"glossary-violation":`Glossary`,"max-length":`Too long`,"identical-to-source":`Identical to source`,whitespace:`Whitespace`,spelling:`Spelling`,"output-stale":`Outputs out of date`},xO={"empty-translation":`untranslated`,"placeholder-mismatch":`placeholder`,"glossary-violation":`glossary`,"max-length":`length`,spelling:`spelling`};function SO(e){if(e.ruleId===`empty-translation`)return{text:e.key,states:[`missing`]};if(e.ruleId===`output-stale`)return{};let t=xO[e.ruleId],n=e.locale?{locale:e.locale}:{};return t?{...n,issues:[t]}:{...n,text:e.key}}function CO(e,t){let n=e.values[t];return n?e.plural?(n.forms?.other??``).trim()!==``:(n.value??``).trim()!==``:!1}function wO(e,t){if(!CO(e,t))return`missing`;let n=e.values[t].state;return n===`reviewed`?`reviewed`:n===`needs-review`?`needsReview`:`machine`}function TO(e,t){let n=e.values[t];return n?e.plural?n.forms?.other??``:n.value??``:``}function EO(e){let t=e.trim();return t===``?0:t.split(/\s+/).length}function DO(e,t){return`${e} ${t}${e===1?``:`s`}`}function OO(e,t){let{sourceLocale:n,locales:r}=e.config,i=r.filter(e=>e!==n),a=Object.keys(e.keys).filter(t=>!e.keys[t].skipTranslate),o=t.findings.filter(e=>e.locale===``),s=o.filter(e=>e.severity===`error`).length,c=new Map;for(let e of t.findings){if(e.locale===``)continue;let t=c.get(e.locale);t?t.push(e):c.set(e.locale,[e])}let l=i.map(t=>{let n={reviewed:0,needsReview:0,machine:0,missing:0},r=[];for(let i of a){let a=wO(e.keys[i],t);n[a]++,a===`needsReview`&&r.push(i)}let i=c.get(t)??[],o=[...new Set(i.filter(e=>e.ruleId===`empty-translation`).map(e=>e.key))],s=i.filter(e=>e.severity===`error`&&e.ruleId!==`empty-translation`),l=i.filter(e=>e.severity===`warn`),u=a.length,d=n.reviewed+n.needsReview+n.machine,f;f=o.length>0||s.length>0?`blocked`:r.length>0?`almost`:`ready`;let p=[];o.length&&p.push(`${o.length} missing`),s.length&&p.push(`${s.length} breaking`),r.length&&p.push(`${r.length} stale`);let m=[];return l.length&&m.push(DO(l.length,`warning`)),{locale:t,total:u,translated:d,pct:u?Math.round(d/u*100):0,counts:n,missingKeys:o,staleKeys:r,errors:s,warnings:l,breaking:s.length,warning:l.length,verdict:f,blockers:p,notes:m}}),u=a.length*i.length,d=0,f=0;for(let e of l)d+=e.translated,f+=e.counts.reviewed;let p=a.reduce((t,r)=>t+EO(TO(e.keys[r],n)),0),m={breaking:[],warning:[]};for(let e of t.findings)e.ruleId!==`empty-translation`&&m[e.severity===`error`?`breaking`:`warning`].push(e);return{totals:{keys:Object.keys(e.keys).length,locales:i.length,translatedPct:u?Math.round(d/u*1e3)/10:0,reviewedPct:u?Math.round(f/u*1e3)/10:0,sourceWords:p,openIssues:m.breaking.length+m.warning.length,ready:l.filter(e=>e.verdict===`ready`).length,almost:l.filter(e=>e.verdict===`almost`).length,blocked:l.filter(e=>e.verdict===`blocked`).length,breaking:m.breaking.length,missing:l.reduce((e,t)=>e+t.missingKeys.length,0),stale:l.reduce((e,t)=>e+t.staleKeys.length,0)},project:o,projectErrors:s,locales:l,risk:m,worklist:kO(l,m)}}function kO(e,t){let n=[];for(let e of t.breaking)n.push({id:`b:${e.locale}:${e.key}:${e.ruleId}`,priority:`breaking`,title:`Fix ${bO[e.ruleId].toLowerCase()}`,where:e.locale?`${e.locale.toUpperCase()} · ${e.key}`:e.key,detail:e.message,filter:e.ruleId===`output-stale`?void 0:SO(e),count:1});let r=new Map;for(let t of e)for(let e of t.missingKeys){let n=r.get(e);n?n.push(t.locale):r.set(e,[t.locale])}for(let[e,t]of r)n.push({id:`m:${e}`,priority:`missing`,title:`Translate ${DO(t.length,`missing string`)}`,where:e,detail:`Missing in ${t.map(e=>e.toUpperCase()).join(`, `)}`,filter:{text:e,states:[`missing`]},count:t.length});let i=[];for(let t of e)for(let e of t.staleKeys)i.push({locale:t.locale,key:e});i.length&&n.push({id:`s:all`,priority:`stale`,title:`Refresh ${DO(i.length,`stale translation`)}`,where:`source changed since translated`,detail:i.map(e=>`${e.locale.toUpperCase()} · ${e.key}`).join(` · `),filter:{states:[`needs-review`]},count:i.length});let a=new Map;for(let e of t.warning){let t=a.get(e.ruleId);t?t.push(e):a.set(e.ruleId,[e])}for(let[e,t]of a)n.push({id:`w:${e}`,priority:`warning`,title:`Review ${DO(t.length,`${bO[e].toLowerCase()} warning`)}`,where:[...new Set(t.map(e=>e.locale.toUpperCase()||e.key))].join(`, `),detail:t.map(e=>`${e.locale?e.locale.toUpperCase():`—`} · ${e.key}`).join(` · `),filter:SO(t[0]),count:t.length});return n}var AO={class:`min-h-0 flex-1 overflow-y-auto p-6`},jO={key:0,class:`mt-8 text-center text-sm text-muted-foreground`},MO={key:1,class:`mt-8 text-center text-sm text-muted-foreground`},NO={key:2,class:`mx-auto flex max-w-[1080px] flex-col gap-4`},PO={class:`flex flex-wrap divide-x rounded-xl border bg-card px-2 py-3 shadow-sm`},FO={class:`flex flex-col px-5`},IO={class:`text-lg font-semibold tabular-nums`},LO={class:`flex flex-col px-5`},RO={class:`text-lg font-semibold tabular-nums`},zO={class:`flex flex-col px-5`},BO={class:`text-lg font-semibold tabular-nums`},VO={class:`flex flex-col px-5`},HO={class:`text-lg font-semibold tabular-nums`},UO=[`disabled`],WO={class:`flex flex-col px-5`},GO={class:`text-lg font-semibold tabular-nums`},KO={class:`flex flex-wrap items-start justify-between gap-6`},qO={class:`min-w-0`},JO={class:`mt-1.5 flex items-center gap-2.5 text-2xl font-semibold tracking-tight`},YO={class:`mt-1.5 text-sm text-muted-foreground`},XO={class:`text-emerald-600 dark:text-emerald-400`},ZO={class:`text-amber-600 dark:text-amber-400`},QO={class:`text-red-600 dark:text-red-400`},$O={key:0,class:`mt-2 flex flex-col gap-1`},ek={class:`font-semibold`},tk={class:`font-mono text-muted-foreground`},nk={class:`text-muted-foreground`},rk={class:`flex gap-2`},ik={class:`text-[11px] uppercase tracking-wide text-muted-foreground`},ak={class:`mt-4 flex flex-wrap items-center gap-x-4 gap-y-2 border-t pt-3.5`},ok={class:`flex items-center gap-1 text-xs text-muted-foreground`},sk={class:`flex items-center gap-1 text-xs text-muted-foreground`},ck={class:`flex items-center gap-1 text-xs text-muted-foreground`},lk={class:`flex items-center gap-1 text-xs text-muted-foreground`},uk={class:`rounded-2xl border bg-card p-5 shadow-sm`},dk={key:0,class:`flex items-center gap-3 rounded-xl bg-muted p-4`},fk={key:1,class:`grid grid-cols-[repeat(auto-fill,minmax(218px,1fr))] gap-3`},pk=[`data-test`,`onClick`],mk={class:`flex items-start justify-between gap-2`},hk={class:`flex min-w-0 flex-col`},gk={class:`truncate font-mono text-xs font-semibold uppercase`},_k=[`title`],vk={class:`text-2xl font-semibold tabular-nums leading-none`},yk={class:`flex h-[7px] w-full overflow-hidden rounded-full bg-muted`},bk={class:`flex min-h-[20px] items-center gap-1.5 text-xs text-muted-foreground`},xk={class:`truncate`},Sk={class:`rounded-2xl border bg-card p-5 shadow-sm`},Ck={class:`mb-4`},wk={class:`mt-0.5 text-sm text-muted-foreground`},Tk={key:0,class:`flex items-center gap-3 rounded-xl bg-muted p-4`},Ek={key:1,class:`flex flex-col gap-2`},Dk=[`disabled`,`onClick`],Ok={class:`flex min-w-0 flex-col gap-0.5`},kk={class:`flex items-center gap-2 text-sm font-semibold`},Ak={class:`truncate font-mono text-xs text-muted-foreground`},jk={key:0,class:`grid grid-cols-1 gap-4 lg:grid-cols-2`},Mk={class:`rounded-2xl border bg-card p-5 shadow-sm`},Nk={key:0,class:`flex items-center gap-3 rounded-xl bg-muted p-4`},Pk={key:1,class:`flex flex-col gap-2.5`},Fk=[`disabled`,`onClick`],Ik={class:`flex flex-1 flex-col`},Lk={class:`text-sm font-semibold`},Rk={class:`text-xs text-muted-foreground`},zk={key:0,class:`border-t`},Bk={class:`flex items-center justify-between gap-2 border-b bg-muted/40 px-3.5 py-1.5`},Vk={class:`text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`},Hk=[`disabled`,`title`,`onClick`],Uk=[`onClick`,`onKeydown`],Wk=[`title`],Gk={class:`truncate font-medium`},Kk={class:`font-mono text-muted-foreground`},qk={class:`truncate text-muted-foreground`},Jk={class:`flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100`},Yk=[`disabled`,`title`,`onClick`],Xk=[`disabled`,`onClick`],Zk={key:2,class:`mt-3 overflow-hidden rounded-xl border`},Qk={key:0,class:`border-t`},$k={class:`font-mono font-semibold uppercase`},eA={class:`truncate`},tA={class:`font-mono`},nA={class:`truncate`},rA=[`disabled`,`onClick`],iA={class:`rounded-2xl border bg-card p-5 shadow-sm`},aA=[`onClick`],oA={class:`flex min-w-0 items-center gap-2`},sA={class:`flex min-w-0 flex-col`},cA={class:`whitespace-nowrap font-mono uppercase leading-tight`},lA=[`title`],uA={class:`text-center font-mono tabular-nums`},dA={key:1,class:`rounded-2xl border bg-card p-5 shadow-sm`},fA={class:`flex items-center gap-3 rounded-xl bg-muted p-4`},pA=P({__name:`AnalyticsView`,setup(e){let t=j(null),n=j({findings:[],counts:{error:0,warn:0,suppressed:0},ok:!0}),r=j(!0),i=K(()=>({...n.value,findings:n.value.findings.filter(e=>!e.suppressed)})),a=K(()=>n.value.findings.filter(e=>e.suppressed)),o=K(()=>t.value?OO(t.value,i.value):null),s=K(()=>!!o.value&&(o.value.totals.keys===0||o.value.totals.locales===0)),c=K(()=>!!o.value&&o.value.totals.translatedPct===0);async function l(){let[e,r]=await Promise.all([Md(),Af({includeSuppressed:!0}).catch(()=>null)]);t.value=e,r&&(n.value=r)}Ki(async()=>{try{await l()}catch(e){$.error(e.message)}finally{r.value=!1}});let u=j(!1),d=j(!1);function f(e){return e.ruleId===`spelling`?/"([^"]+)"/.exec(e.message)?.[1]:void 0}async function p(e,t){if(!d.value){d.value=!0;try{await t(),await l(),$.success(e)}catch(e){$.error(e.message)}finally{d.value=!1}}}let m=e=>p(`Dismissed until the source of ${e.key} changes`,()=>jf(e.key,e.ruleId,e.locale)),h=e=>p(`Restored ${bO[e.ruleId].toLowerCase()} on ${e.key}`,()=>Mf(e.key,e.ruleId,e.locale)),g=(e,t)=>p(`Dismissed ${t} warning${t===1?``:`s`}`,()=>Nf({rules:[e]})),_=e=>{let t=f(e);t&&p(`Added "${t}" to the dictionary`,()=>mf(t))};function v(e){let t=new Map;for(let n of o.value.risk[e]){let e=t.get(n.ruleId);e?e.push(n):t.set(n.ruleId,[n])}return[...t.entries()].map(([e,t])=>({ruleId:e,findings:t}))}let y={ready:{label:`Ready`,icon:Mu,text:`text-emerald-600 dark:text-emerald-400`,border:`border-l-emerald-500`,bar:`bg-emerald-500`,soft:`bg-emerald-500/10`},almost:{label:`Almost`,icon:Fu,text:`text-amber-600 dark:text-amber-400`,border:`border-l-amber-500`,bar:`bg-amber-500`,soft:`bg-amber-500/10`},blocked:{label:`Blocked`,icon:ad,text:`text-red-600 dark:text-red-400`,border:`border-l-red-500`,bar:`bg-red-500`,soft:`bg-red-500/10`},none:{label:`Not started`,icon:_d,text:`text-muted-foreground`,border:`border-l-border`,bar:`bg-muted-foreground/40`,soft:`bg-muted`}},b={breaking:{label:`Breaking`,icon:ad,text:`text-red-600 dark:text-red-400`,border:`border-l-red-500`,soft:`bg-red-500/10`},missing:{label:`Missing`,icon:Pu,text:`text-muted-foreground`,border:`border-l-muted-foreground/40`,soft:`bg-muted`},stale:{label:`Stale`,icon:Fu,text:`text-amber-600 dark:text-amber-400`,border:`border-l-amber-500`,soft:`bg-amber-500/10`},warning:{label:`Warning`,icon:Ed,text:`text-amber-600 dark:text-amber-400`,border:`border-l-amber-500`,soft:`bg-amber-500/10`}},x=[{key:`breaking`,label:`Breaking`,blurb:"Lint errors — `glotfile check` fails on these. Ship-blocking.",text:`text-red-600 dark:text-red-400`,bar:`bg-red-500`},{key:`warning`,label:`Warning`,blurb:`Lint warnings — worth a look, won't block a release.`,text:`text-amber-600 dark:text-amber-400`,bar:`bg-amber-500`}],S=K(()=>{let e=o.value;return c.value?`none`:e.projectErrors>0?`blocked`:e.totals.ready===e.totals.locales&&e.totals.locales>0?`ready`:`blocked`}),C=K(()=>S.value===`none`?`Nothing to ship yet`:S.value===`ready`?`Ready to ship`:`Not ready to ship`);function w(e){return e.verdict===`ready`?e.notes.length?e.notes.join(` · `):`Clean — clears the gate`:e.blockers.join(` · `)}function T(e){return e.missingKeys.length?{locale:e.locale,states:[`missing`]}:e.errors.length?{locale:e.locale,...SO(e.errors[0])}:e.staleKeys.length?{locale:e.locale,states:[`needs-review`]}:{locale:e.locale}}function ee(e){return KC(e).name}function E(e,t){return(t?e/t*100:0)+`%`}function te(e){let t=[...new Set(o.value.risk[e].flatMap(e=>SO(e).issues??[]))];return t.length?{issues:t}:{needsAttention:!0}}return(e,t)=>(R(),z(`div`,AO,[r.value?(R(),z(`div`,jO,`Loading analytics…`)):s.value?(R(),z(`div`,MO,` No keys yet — add keys in the Editor to see analytics. `)):o.value?(R(),z(`div`,NO,[V(`section`,PO,[V(`div`,FO,[V(`span`,IO,A(o.value.totals.keys),1),t[2]||=V(`span`,{class:`text-xs text-muted-foreground`},`keys`,-1)]),V(`div`,LO,[V(`span`,RO,A(o.value.totals.locales),1),t[3]||=V(`span`,{class:`text-xs text-muted-foreground`},`locales`,-1)]),V(`div`,zO,[V(`span`,BO,A(o.value.totals.translatedPct)+`%`,1),t[4]||=V(`span`,{class:`text-xs text-muted-foreground`},`translated`,-1)]),V(`div`,VO,[V(`span`,HO,A(o.value.totals.reviewedPct)+`%`,1),t[5]||=V(`span`,{class:`text-xs text-muted-foreground`},`reviewed`,-1)]),V(`button`,{type:`button`,class:`group flex flex-col px-5 text-left`,"data-test":`open-issues`,disabled:!o.value.totals.openIssues,onClick:t[0]||=e=>M(jp)({needsAttention:!0})},[V(`span`,{class:k([`text-lg font-semibold tabular-nums`,o.value.totals.breaking?`text-red-600 dark:text-red-400`:``])},A(o.value.totals.openIssues),3),t[6]||=V(`span`,{class:`text-xs text-muted-foreground group-hover:text-foreground`},`open issues`,-1)],8,UO),V(`div`,WO,[V(`span`,GO,A(o.value.totals.sourceWords),1),t[7]||=V(`span`,{class:`text-xs text-muted-foreground`},`source words`,-1)])]),V(`section`,{class:k([`rounded-2xl border border-l-4 bg-card p-6 shadow-sm`,y[S.value].border])},[V(`div`,KO,[V(`div`,qO,[t[12]||=V(`div`,{class:`font-mono text-[11px] uppercase tracking-wider text-muted-foreground`},`Can I ship?`,-1),V(`h1`,JO,[(R(),B(aa(y[S.value].icon),{class:k([`size-6`,y[S.value].text])},null,8,[`class`])),U(` `+A(C.value),1)]),V(`p`,YO,[c.value?(R(),z(L,{key:0},[U(`Add translations to get started — run a sync to let the AI fill them in.`)],64)):(R(),z(L,{key:1},[V(`strong`,XO,A(o.value.totals.ready),1),U(` of `+A(o.value.totals.locales)+` locales ready`,1),o.value.totals.almost?(R(),z(L,{key:0},[t[8]||=U(` · `,-1),V(`strong`,ZO,A(o.value.totals.almost),1),t[9]||=U(` need a refresh`,-1)],64)):W(``,!0),o.value.totals.blocked?(R(),z(L,{key:1},[t[10]||=U(` · `,-1),V(`strong`,QO,A(o.value.totals.blocked),1),t[11]||=U(` blocked`,-1)],64)):W(``,!0)],64))]),o.value.project.length?(R(),z(`ul`,$O,[(R(!0),z(L,null,F(o.value.project,e=>(R(),z(`li`,{key:`${e.ruleId}:${e.key}`,class:k([`flex items-center gap-1.5 text-xs`,e.severity===`error`?`text-red-600 dark:text-red-400`:`text-amber-600 dark:text-amber-400`])},[e.severity===`error`?(R(),B(M(ad),{key:0,class:`size-3 shrink-0`})):(R(),B(M(Ed),{key:1,class:`size-3 shrink-0`})),V(`span`,ek,A(M(bO)[e.ruleId]),1),V(`span`,tk,A(e.key),1),V(`span`,nk,A(e.message),1)],2))),128))])):W(``,!0)]),V(`div`,rk,[(R(!0),z(L,null,F([{n:o.value.totals.ready,label:`ready`,cls:`text-emerald-600 dark:text-emerald-400`},{n:o.value.totals.almost,label:`almost`,cls:`text-amber-600 dark:text-amber-400`},{n:o.value.totals.blocked,label:`blocked`,cls:`text-red-600 dark:text-red-400`}],e=>(R(),z(`div`,{key:e.label,class:`flex min-w-[66px] flex-col items-center rounded-xl border px-4 py-2`},[V(`span`,{class:k([`text-2xl font-semibold tabular-nums`,e.n?e.cls:`text-muted-foreground/50`])},A(e.n),3),V(`span`,ik,A(e.label),1)]))),128))])]),V(`div`,ak,[t[17]||=V(`span`,{class:`font-mono text-[10px] uppercase tracking-wider text-muted-foreground`},`Release gate`,-1),V(`span`,ok,[H(M(Ou),{class:`size-3 text-emerald-500`}),t[13]||=U(` 100% translated`,-1)]),V(`span`,sk,[H(M(Ou),{class:`size-3 text-emerald-500`}),t[14]||=U(` 0 lint errors`,-1)]),V(`span`,ck,[H(M(Ou),{class:`size-3 text-emerald-500`}),t[15]||=U(` outputs exported`,-1)]),V(`span`,lk,[H(M(Ou),{class:`size-3 text-emerald-500`}),t[16]||=U(` nothing stale`,-1)]),t[18]||=V(`span`,{class:`ml-auto text-[11px] italic text-muted-foreground`},[U(`same rules as `),V(`code`,{class:`font-mono not-italic`},`glotfile check`),U(` · skip via `),V(`code`,{class:`font-mono not-italic`},`config.lint.rules`)],-1)])],2),V(`section`,uk,[t[21]||=V(`header`,{class:`mb-4`},[V(`h2`,{class:`text-base font-semibold`},`Release readiness`),V(`p`,{class:`mt-0.5 text-sm text-muted-foreground`},`Per-locale status against the release gate. Click any locale to drill in.`)],-1),c.value?(R(),z(`div`,dk,[H(M(Gu),{class:`size-5 text-muted-foreground`}),t[19]||=V(`div`,{class:`flex flex-col`},[V(`b`,{class:`text-sm`},`No locale is ready yet.`),V(`span`,{class:`text-sm text-muted-foreground`},`Translate your strings, then locales appear here as they clear the gate.`)],-1)])):(R(),z(`div`,fk,[(R(!0),z(L,null,F(o.value.locales,e=>(R(),z(`button`,{key:e.locale,type:`button`,"data-test":`rcard-${e.locale}`,class:k([`flex flex-col gap-2 rounded-xl border border-l-[3px] p-3.5 text-left transition hover:-translate-y-0.5 hover:bg-muted/50`,y[e.verdict].border]),onClick:t=>M(jp)(T(e))},[V(`div`,mk,[V(`span`,hk,[V(`span`,gk,A(e.locale),1),V(`span`,{class:`truncate text-[11px] text-muted-foreground`,title:ee(e.locale)},A(ee(e.locale)),9,_k)]),V(`span`,{class:k([`flex items-center gap-1 text-[11px] font-semibold`,y[e.verdict].text])},[(R(),B(aa(y[e.verdict].icon),{class:`size-3`})),U(A(y[e.verdict].label),1)],2)]),V(`div`,vk,[U(A(e.pct),1),t[20]||=V(`span`,{class:`ml-0.5 text-xs text-muted-foreground`},`%`,-1)]),V(`div`,yk,[V(`span`,{class:`h-full bg-emerald-500`,style:he({width:E(e.counts.reviewed,e.total)})},null,4),V(`span`,{class:`h-full bg-amber-500`,style:he({width:E(e.counts.needsReview,e.total)})},null,4),V(`span`,{class:`h-full bg-sky-500`,style:he({width:E(e.counts.machine,e.total)})},null,4)]),V(`div`,bk,[e.verdict===`ready`?W(``,!0):(R(),B(aa(y[e.verdict].icon),{key:0,class:k([`size-3 shrink-0`,y[e.verdict].text])},null,8,[`class`])),V(`span`,xk,A(w(e)),1)])],10,pk))),128))]))]),V(`section`,Sk,[V(`header`,Ck,[t[22]||=V(`h2`,{class:`text-base font-semibold`},`Needs attention`,-1),V(`p`,wk,A(c.value?`Your prioritized worklist will fill in as the AI translates.`:`Prioritized — fix the top item first. Each opens the matching strings.`),1)]),o.value.worklist.length?(R(),z(`ol`,Ek,[(R(!0),z(L,null,F(o.value.worklist,(e,t)=>(R(),z(`li`,{key:e.id},[V(`button`,{type:`button`,class:k([`grid w-full grid-cols-[30px_1fr_auto_16px] items-center gap-3 rounded-xl border border-l-[3px] px-3.5 py-3 text-left transition enabled:hover:bg-muted/50`,[b[e.priority].border,t===0?b[e.priority].soft:``]]),disabled:!e.filter,onClick:t=>e.filter&&M(jp)(e.filter)},[V(`span`,{class:k([`flex size-[30px] items-center justify-center rounded-lg`,[b[e.priority].soft,b[e.priority].text]])},[(R(),B(aa(b[e.priority].icon),{class:`size-4`}))],2),V(`span`,Ok,[V(`span`,kk,[U(A(e.title)+` `,1),t===0?(R(),z(`span`,{key:0,class:k([`rounded-full px-2 py-0.5 font-mono text-[9.5px] font-semibold uppercase tracking-wide text-white`,b[e.priority].text.includes(`red`)?`bg-red-500`:b[e.priority].text.includes(`amber`)?`bg-amber-500`:`bg-muted-foreground`])},`Start here`,2)):W(``,!0)]),V(`span`,Ak,A(e.where),1)]),V(`span`,{class:k([`rounded-full px-2.5 py-1 text-[11px] font-semibold`,[b[e.priority].soft,b[e.priority].text]])},A(b[e.priority].label),3),H(M(Au),{class:`size-4 text-muted-foreground`})],10,Dk)]))),128))])):(R(),z(`div`,Tk,[H(M(Mu),{class:`size-5 text-emerald-500`}),t[23]||=V(`div`,{class:`flex flex-col`},[V(`b`,{class:`text-sm`},`Nothing needs attention.`),V(`span`,{class:`text-sm text-muted-foreground`},`Every translated string clears its checks and is up to date.`)],-1)]))]),c.value?(R(),z(`section`,dA,[t[32]||=V(`h2`,{class:`mb-4 text-base font-semibold`},`Quality`,-1),V(`div`,fA,[H(M(Nu),{class:`size-5 text-muted-foreground`}),t[31]||=V(`div`,{class:`flex flex-col`},[V(`b`,{class:`text-sm`},`No checks run yet.`),V(`span`,{class:`text-sm text-muted-foreground`},`Quality checks appear once strings are translated.`)],-1)])])):(R(),z(`div`,jk,[V(`section`,Mk,[t[29]||=V(`header`,{class:`mb-4`},[V(`h2`,{class:`text-base font-semibold`},`Quality`),V(`p`,{class:`mt-0.5 text-sm text-muted-foreground`},`Grouped by risk — a broken placeholder is not a typo.`)],-1),o.value.totals.openIssues?(R(),z(`div`,Pk,[(R(),z(L,null,F(x,e=>V(`div`,{key:e.key,class:`overflow-hidden rounded-xl border`},[V(`button`,{type:`button`,class:`flex w-full items-center gap-3 px-3.5 py-3 text-left enabled:hover:bg-muted/50`,disabled:!o.value.risk[e.key].length,onClick:t=>M(jp)(te(e.key))},[V(`span`,{class:k([`w-1 self-stretch rounded-full`,e.bar])},null,2),V(`span`,{class:k([`min-w-[22px] text-xl font-semibold tabular-nums`,e.text])},A(o.value.risk[e.key].length),3),V(`span`,Ik,[V(`span`,Lk,A(e.label),1),V(`span`,Rk,A(e.blurb),1)]),o.value.risk[e.key].length?(R(),B(M(Au),{key:0,class:`size-4 text-muted-foreground`})):W(``,!0)],8,Fk),o.value.risk[e.key].length?(R(),z(`div`,zk,[(R(!0),z(L,null,F(v(e.key),n=>(R(),z(L,{key:n.ruleId},[V(`div`,Bk,[V(`span`,Vk,A(M(bO)[n.ruleId])+` · `+A(n.findings.length),1),e.key===`warning`?(R(),z(`button`,{key:0,type:`button`,class:`flex items-center gap-1 rounded px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,title:`Hide all ${n.findings.length} until each key's source changes`,onClick:e=>g(n.ruleId,n.findings.length)},[H(M(Cu),{class:`size-3`}),t[25]||=U(` Dismiss all `,-1)],8,Hk)):W(``,!0)]),(R(!0),z(L,null,F(n.findings,(e,n)=>(R(),z(`div`,{key:n,role:`button`,tabindex:`0`,class:`group grid w-full cursor-pointer grid-cols-[42px_minmax(90px,1fr)_1.4fr_auto] items-center gap-2.5 border-b px-3.5 py-2.5 text-left text-xs last:border-b-0 hover:bg-muted/50`,onClick:t=>M(jp)(M(SO)(e)),onKeydown:Zl(t=>M(jp)(M(SO)(e)),[`enter`])},[V(`span`,{class:`font-mono font-semibold uppercase text-muted-foreground`,title:e.locale?ee(e.locale):`project-wide`},A(e.locale||`—`),9,Wk),V(`span`,Gk,[V(`span`,Kk,A(e.key),1)]),V(`span`,qk,A(e.message),1),V(`span`,Jk,[f(e)?(R(),z(`button`,{key:0,type:`button`,class:`flex items-center gap-1 rounded border bg-background px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,title:`Never flag "${f(e)}" again`,onClick:Yl(t=>_(e),[`stop`])},[H(M(Tu),{class:`size-3`}),t[26]||=U(` Add word `,-1)],8,Yk)):W(``,!0),e.severity===`warn`?(R(),z(`button`,{key:1,type:`button`,class:`flex items-center gap-1 rounded border bg-background px-1.5 py-0.5 text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,title:`Hide until this key's source changes`,onClick:Yl(t=>m(e),[`stop`])},[H(M(Cu),{class:`size-3`}),t[27]||=U(` Dismiss `,-1)],8,Xk)):W(``,!0)])],40,Uk))),128))],64))),128))])):W(``,!0)])),64))])):(R(),z(`div`,Nk,[H(M(Mu),{class:`size-5 text-emerald-500`}),t[24]||=V(`div`,{class:`flex flex-col`},[V(`b`,{class:`text-sm`},`No issues found.`),V(`span`,{class:`text-sm text-muted-foreground`},`All translated strings pass their checks.`)],-1)])),a.value.length?(R(),z(`div`,Zk,[V(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3.5 py-2.5 text-left text-xs text-muted-foreground hover:bg-muted/50`,onClick:t[1]||=e=>u.value=!u.value},[(R(),B(aa(u.value?M(ku):M(Au)),{class:`size-3.5`})),H(M(Cu),{class:`size-3.5`}),U(` Suppressed (`+A(a.value.length)+`) — hidden until each key's source changes `,1)]),u.value?(R(),z(`div`,Qk,[(R(!0),z(L,null,F(a.value,(e,n)=>(R(),z(`div`,{key:n,class:`grid w-full grid-cols-[42px_minmax(90px,1fr)_1.4fr_auto] items-center gap-2.5 border-b px-3.5 py-2.5 text-left text-xs text-muted-foreground last:border-b-0`},[V(`span`,$k,A(e.locale||`—`),1),V(`span`,eA,[U(A(M(bO)[e.ruleId])+` · `,1),V(`span`,tA,A(e.key),1)]),V(`span`,nA,A(e.message),1),V(`button`,{type:`button`,class:`flex items-center gap-1 rounded border bg-background px-1.5 py-0.5 text-[11px] transition-colors hover:bg-accent hover:text-foreground`,disabled:d.value,onClick:t=>h(e)},[H(M(ld),{class:`size-3`}),t[28]||=U(` Restore `,-1)],8,rA)]))),128))])):W(``,!0)])):W(``,!0)]),V(`section`,iA,[t[30]||=vs(`<header class="mb-4"><h2 class="text-base font-semibold">By locale</h2><p class="mt-0.5 text-sm text-muted-foreground">Full breakdown.</p></header><div class="grid grid-cols-[minmax(96px,1.4fr)_52px_64px_50px_72px_72px_16px] gap-2 border-b pb-2 font-mono text-[11px] uppercase tracking-wide text-muted-foreground"><span>Locale</span><span class="text-center">Done</span><span class="text-center">Missing</span><span class="text-center">Stale</span><span class="text-center">Breaking</span><span class="text-center">Warnings</span><span></span></div>`,2),(R(!0),z(L,null,F(o.value.locales,e=>(R(),z(`button`,{key:e.locale,type:`button`,class:`grid w-full grid-cols-[minmax(96px,1.4fr)_52px_64px_50px_72px_72px_16px] items-center gap-2 border-b py-2.5 text-left text-sm last:border-b-0 hover:bg-muted/50`,onClick:t=>M(jp)(T(e))},[V(`span`,oA,[V(`span`,{class:k([`size-2 shrink-0 rounded-full`,y[e.verdict].bar])},null,2),V(`span`,sA,[V(`span`,cA,A(e.locale),1),V(`span`,{class:`truncate text-xs leading-tight text-muted-foreground`,title:ee(e.locale)},A(ee(e.locale)),9,lA)])]),V(`span`,uA,A(e.pct)+`%`,1),V(`span`,{class:k([`text-center font-mono tabular-nums`,e.missingKeys.length?``:`text-muted-foreground`])},A(e.missingKeys.length||`—`),3),V(`span`,{class:k([`text-center font-mono tabular-nums`,e.staleKeys.length?`text-amber-600 dark:text-amber-400`:`text-muted-foreground`])},A(e.staleKeys.length||`—`),3),V(`span`,{class:k([`text-center font-mono tabular-nums`,e.breaking?`text-red-600 dark:text-red-400`:`text-muted-foreground`])},A(e.breaking||`—`),3),V(`span`,{class:k([`text-center font-mono tabular-nums`,e.warning?`text-amber-600 dark:text-amber-400`:`text-muted-foreground`])},A(e.warning||`—`),3),H(M(Au),{class:`size-3.5 text-muted-foreground`})],8,aA))),128))])]))])):W(``,!0)]))}});function mA(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>e.term.toLowerCase().includes(n)||(e.notes??``).toLowerCase().includes(n)?!0:Object.entries(e.translations??{}).some(([e,t])=>e.toLowerCase().includes(n)||t.toLowerCase().includes(n)))}var hA={class:`grid gap-4`},gA={class:`grid gap-1.5`},_A={key:0,class:`text-xs text-muted-foreground`},vA={class:`flex items-center justify-between`},yA={class:`flex items-center justify-between`},bA={class:`grid gap-1.5`},xA={key:0,class:`grid gap-2 border-t pt-3`},SA={key:1,class:`text-sm text-destructive`},CA=P({__name:`GlossaryEntryDialog`,props:ka({entry:{},targetLocales:{}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:ka([`saved`],[`update:open`]),setup(e,{emit:t}){let n=e,r=Za(e,`open`),i=t,a=Xt({term:``,doNotTranslate:!1,caseSensitive:!1,notes:``,translations:{}}),o=j(!1),s=j(``),c=j(!1);Dr(r,e=>{if(!e)return;let t=n.entry;c.value=t!==null,a.term=t?.term??``,a.doNotTranslate=t?.doNotTranslate??!1,a.caseSensitive=t?.caseSensitive??!1,a.notes=t?.notes??``,a.translations={};for(let e of n.targetLocales)a.translations[e]=t?.translations?.[e]??``;s.value=``},{immediate:!0});async function l(){let e=a.term.trim();if(!e){s.value=`Term is required.`;return}let t={};for(let[e,n]of Object.entries(a.translations)){let r=n.trim();r&&(t[e]=r)}let n={term:e};a.doNotTranslate&&(n.doNotTranslate=!0),a.caseSensitive&&(n.caseSensitive=!0),a.notes.trim()&&(n.notes=a.notes.trim()),Object.keys(t).length>0&&(n.translations=t),o.value=!0,s.value=``;try{await gf(n),$.success(c.value?`Updated ${e}`:`Added ${e}`),r.value=!1,i(`saved`)}catch(e){s.value=e.message}finally{o.value=!1}}return(t,n)=>(R(),B(M(Oh),{open:r.value,"onUpdate:open":n[5]||=e=>r.value=e},{default:N(()=>[H(M(bC),{class:`max-h-[85vh] max-w-lg overflow-y-auto`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[U(A(c.value?`Edit term`:`Add term`),1)]),_:1}),H(M(wC),null,{default:N(()=>[...n[6]||=[U(` Guide AI translations with do-not-translate terms and forced translations. `,-1)]]),_:1})]),_:1}),V(`div`,hA,[V(`div`,gA,[H(M(yC),{for:`glossary-term`},{default:N(()=>[...n[7]||=[U(`Term`,-1)]]),_:1}),H(M(BS),{id:`glossary-term`,modelValue:a.term,"onUpdate:modelValue":n[0]||=e=>a.term=e,class:`font-mono`,placeholder:`Sign in`,disabled:c.value,onKeydown:Zl(Yl(l,[`prevent`]),[`enter`])},null,8,[`modelValue`,`disabled`,`onKeydown`]),c.value?(R(),z(`p`,_A,` The term is the entry's identity and can't be changed. `)):W(``,!0)]),V(`div`,vA,[V(`div`,null,[H(M(yC),{for:`glossary-dnt`},{default:N(()=>[...n[8]||=[U(`Do not translate`,-1)]]),_:1}),n[9]||=V(`p`,{class:`text-xs text-muted-foreground`},`Keep this term verbatim in every language.`,-1)]),H(M(XS),{id:`glossary-dnt`,modelValue:a.doNotTranslate,"onUpdate:modelValue":n[1]||=e=>a.doNotTranslate=e},null,8,[`modelValue`])]),V(`div`,yA,[V(`div`,null,[H(M(yC),{for:`glossary-cs`},{default:N(()=>[...n[10]||=[U(`Case sensitive`,-1)]]),_:1}),n[11]||=V(`p`,{class:`text-xs text-muted-foreground`},`Only match the exact casing.`,-1)]),H(M(XS),{id:`glossary-cs`,modelValue:a.caseSensitive,"onUpdate:modelValue":n[2]||=e=>a.caseSensitive=e},null,8,[`modelValue`])]),V(`div`,bA,[H(M(yC),{for:`glossary-notes`},{default:N(()=>[...n[12]||=[U(`Notes`,-1)]]),_:1}),H(M($C),{id:`glossary-notes`,modelValue:a.notes,"onUpdate:modelValue":n[3]||=e=>a.notes=e,rows:`5`,class:`min-h-24 resize-y`,placeholder:`Optional guidance for translators.`},null,8,[`modelValue`])]),e.targetLocales.length>0?(R(),z(`div`,xA,[n[13]||=V(`p`,{class:`text-sm font-medium`},`Forced translations`,-1),(R(!0),z(L,null,F(e.targetLocales,e=>(R(),z(`div`,{key:e,class:`grid gap-1.5`},[H(M(yC),{for:`glossary-tr-${e}`,class:`text-xs text-muted-foreground`},{default:N(()=>[H(Ew,{code:e,"show-name":``,"show-code":!1,size:12},null,8,[`code`])]),_:2},1032,[`for`]),H(M(BS),{id:`glossary-tr-${e}`,modelValue:a.translations[e],"onUpdate:modelValue":t=>a.translations[e]=t,placeholder:`Forced translation for ${e}`},null,8,[`id`,`modelValue`,`onUpdate:modelValue`,`placeholder`])]))),128))])):W(``,!0),s.value?(R(),z(`p`,SA,A(s.value),1)):W(``,!0)]),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:o.value,onClick:n[4]||=e=>r.value=!1},{default:N(()=>[...n[14]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{disabled:o.value,onClick:l},{default:N(()=>[U(A(c.value?`Save`:`Add term`),1)]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`]))}}),wA={class:`min-h-0 flex-1 overflow-y-auto`},TA={key:0,class:`flex h-full items-center justify-center p-8 text-sm text-muted-foreground`},EA={key:1,class:`mx-auto flex max-w-3xl flex-col gap-4 p-6`},DA={class:`flex items-center justify-between`},OA={class:`relative`},kA={key:0,class:`rounded-lg border border-dashed p-10 text-center text-sm text-muted-foreground`},AA={key:1,class:`rounded-lg border border-dashed p-10 text-center text-sm text-muted-foreground`},jA={key:2,class:`flex flex-col gap-2`},MA={class:`min-w-0 flex-1`},NA={class:`flex flex-wrap items-center gap-2`},PA={class:`font-mono text-sm font-medium`},FA={key:0,class:`mt-1 text-sm text-muted-foreground`},IA={key:1,class:`mt-2 flex flex-wrap gap-1.5`},LA={class:`flex shrink-0 items-center gap-1`},RA={class:`font-mono`},zA=P({__name:`GlossaryView`,setup(e){let t=j([]),n=j(``),r=j([]),i=j(!1),a=j(!1),o=j(null),s=j(null),c=j(!1),l=j(``),u=K(()=>mA(t.value,l.value)),d=K(()=>r.value.filter(e=>e!==n.value));async function f(){let[e,a]=await Promise.all([hf(),Md()]);t.value=e,n.value=a.config.sourceLocale,r.value=a.config.locales,i.value=!0}f();function p(){o.value=null,a.value=!0}function m(e){o.value=e,a.value=!0}function h(e){return Object.entries(e.translations??{}).map(([e,t])=>`${e}: ${t}`)}async function g(){let e=s.value;if(e){c.value=!0;try{await _f(e.term),$.success(`Deleted ${e.term}`),s.value=null,await f()}catch(e){$.error(`Delete failed: ${e.message}`)}finally{c.value=!1}}}return(e,n)=>(R(),z(`div`,wA,[i.value?(R(),z(`div`,EA,[V(`div`,DA,[n[7]||=V(`div`,null,[V(`h2`,{class:`text-base font-semibold`},`Glossary`),V(`p`,{class:`text-sm text-muted-foreground`},`Do-not-translate terms and forced translations.`)],-1),H(M(Q),{onClick:p},{default:N(()=>[H(M(sd),{class:`size-4`}),n[6]||=U(` Add term `,-1)]),_:1})]),V(`div`,OA,[H(M(md),{class:`pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground`}),H(M(BS),{modelValue:l.value,"onUpdate:modelValue":n[0]||=e=>l.value=e,placeholder:`Search terms, notes, translations…`,class:`h-8 w-full pl-8 pr-8`,onKeydown:n[1]||=Zl(e=>l.value=``,[`esc`])},null,8,[`modelValue`]),l.value?(R(),z(`button`,{key:0,class:`absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,"aria-label":`Clear search`,onClick:n[2]||=e=>l.value=``},[H(M(Ad),{class:`size-4`})])):W(``,!0)]),t.value.length===0?(R(),z(`div`,kA,` No glossary terms yet — add do-not-translate terms and forced translations to guide AI. `)):u.value.length===0?(R(),z(`div`,AA,` No terms match your search. `)):(R(),z(`ul`,jA,[(R(!0),z(L,null,F(u.value,e=>(R(),z(`li`,{key:e.term,class:`flex items-start gap-3 rounded-lg border bg-card p-3 text-card-foreground shadow-sm`},[V(`div`,MA,[V(`div`,NA,[V(`span`,PA,A(e.term),1),e.doNotTranslate?(R(),B(M(JS),{key:0,variant:`secondary`},{default:N(()=>[...n[8]||=[U(`Do-not-translate`,-1)]]),_:1})):W(``,!0),e.caseSensitive?(R(),B(M(JS),{key:1,variant:`outline`},{default:N(()=>[...n[9]||=[U(`Case-sensitive`,-1)]]),_:1})):W(``,!0)]),e.notes?(R(),z(`p`,FA,A(e.notes),1)):W(``,!0),h(e).length?(R(),z(`div`,IA,[(R(!0),z(L,null,F(h(e),e=>(R(),z(`span`,{key:e,class:`inline-flex items-center rounded-md border bg-background px-2 py-0.5 font-mono text-xs`},A(e),1))),128))])):W(``,!0)]),V(`div`,LA,[H(M(Q),{variant:`ghost`,size:`icon`,"aria-label":`Edit ${e.term}`,onClick:t=>m(e)},{default:N(()=>[H(M(od),{class:`size-4`})]),_:1},8,[`aria-label`,`onClick`]),H(M(Q),{variant:`ghost`,size:`icon`,class:`text-muted-foreground hover:text-destructive`,"aria-label":`Delete ${e.term}`,onClick:t=>s.value=e},{default:N(()=>[H(M(Td),{class:`size-4`})]),_:1},8,[`aria-label`,`onClick`])])]))),128))]))])):(R(),z(`div`,TA,` Loading glossary… `)),H(CA,{open:a.value,"onUpdate:open":n[3]||=e=>a.value=e,entry:o.value,"target-locales":d.value,onSaved:f},null,8,[`open`,`entry`,`target-locales`]),H(M(Oh),{open:s.value!==null,"onUpdate:open":n[5]||=e=>{e||(s.value=null)}},{default:N(()=>[H(M(bC),{class:`max-w-md`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[10]||=[U(`Delete term`,-1)]]),_:1}),H(M(wC),null,{default:N(()=>[n[11]||=U(` Delete `,-1),V(`span`,RA,A(s.value?.term),1),n[12]||=U(` from the glossary? This cannot be undone. `,-1)]),_:1})]),_:1}),H(M(SC),null,{default:N(()=>[H(M(Q),{variant:`outline`,disabled:c.value,onClick:n[4]||=e=>s.value=null},{default:N(()=>[...n[13]||=[U(`Cancel`,-1)]]),_:1},8,[`disabled`]),H(M(Q),{variant:`destructive`,disabled:c.value,onClick:g},{default:N(()=>[...n[14]||=[U(`Delete`,-1)]]),_:1},8,[`disabled`])]),_:1})]),_:1})]),_:1},8,[`open`])]))}}),BA=[{id:`empty-source`,label:`Empty source`,description:`The source text itself is empty.`,default:`error`},{id:`empty-translation`,label:`Untranslated`,description:`A target translation is missing or blank.`,default:`error`},{id:`placeholder-mismatch`,label:`Placeholder mismatch`,description:`Placeholders differ between source and translation.`,default:`error`},{id:`icu-mismatch`,label:`ICU mismatch`,description:`ICU plural/select structure differs from the source.`,default:`error`},{id:`glossary-violation`,label:`Glossary`,description:`A glossary term is missing or translated incorrectly.`,default:`error`},{id:`max-length`,label:`Too long`,description:`The translation exceeds the key's maximum length.`,default:`warn`},{id:`identical-to-source`,label:`Identical to source`,description:`The translation is exactly the source text.`,default:`warn`},{id:`whitespace`,label:`Whitespace`,description:`Leading/trailing whitespace differs from the source.`,default:`warn`},{id:`spelling`,label:`Spelling`,description:`A word isn't in the locale's dictionary, the glossary, or your custom dictionary.`,default:`warn`}],VA=Object.fromEntries(BA.map(e=>[e.id,e.default]));function HA(e,t){if(typeof e==`string`&&e.trim()===``)return t;let n=typeof e==`number`?e:Number(e);return Number.isFinite(n)?n:t}function UA(e){return{sourceLocale:e.sourceLocale,locales:[...e.locales],outputs:e.outputs.map(e=>({adapter:e.adapter,path:e.path,emptyAs:e.emptyAs,style:e.style===`flat`?`flat`:`nested`,indent:e.indent??null,finalNewline:e.finalNewline??null,includeLocale:e.includeLocale??!0,skipSourceLocale:e.skipSourceLocale??!1,localeAliases:e.localeAliases?structuredClone(e.localeAliases):{},localeCase:e.localeCase,localeMap:e.localeMap?structuredClone(e.localeMap):{}})),indent:e.format.indent,sortKeys:e.format.sortKeys,finalNewline:e.format.finalNewline,autoExport:e.autoExport??!0,exportLocales:[...e.exportLocales??[]],customWords:[...e.spelling?.customWords??[]],lintRules:{...VA,...e.lint?.rules},lintIgnore:[...e.lint?.ignore??[]],scanAccessors:[...e.scan?.accessors??[]],scanPatterns:[...e.scan?.patterns??[]],scanInclude:[...e.scan?.include??[]],scanExclude:[...e.scan?.exclude??[]],scanKeep:[...e.scan?.keep??[]]}}function WA(e,t){let n=e.outputs.map(e=>{let t={adapter:e.adapter.trim(),path:e.path.trim()};if(e.style===`flat`&&(t.style=`flat`),e.emptyAs&&(t.emptyAs=e.emptyAs),e.indent!=null&&(t.indent=e.indent),e.finalNewline!=null&&(t.finalNewline=e.finalNewline),e.includeLocale||(t.includeLocale=!1),e.skipSourceLocale&&(t.skipSourceLocale=!0),e.localeAliases&&Object.keys(e.localeAliases).length&&(t.localeAliases=Object.fromEntries(Object.entries(e.localeAliases).filter(([,e])=>e.length>0)),Object.keys(t.localeAliases).length===0&&delete t.localeAliases),e.localeCase&&(t.localeCase=e.localeCase),e.localeMap){let n=Object.fromEntries(Object.entries(e.localeMap).filter(([,e])=>e.trim()!==``));Object.keys(n).length&&(t.localeMap=n)}return t}).filter(e=>e.adapter||e.path),r={};e.scanAccessors.length&&(r.accessors=[...e.scanAccessors]),e.scanPatterns.length&&(r.patterns=[...e.scanPatterns]),e.scanInclude.length&&(r.include=[...e.scanInclude]),e.scanExclude.length&&(r.exclude=[...e.scanExclude]),e.scanKeep.length&&(r.keep=[...e.scanKeep]);let i={sourceLocale:e.sourceLocale,locales:[...e.locales],outputs:n,format:{indent:HA(e.indent,2),sortKeys:e.sortKeys,finalNewline:e.finalNewline},autoExport:e.autoExport,...e.exportLocales.length?{exportLocales:[...e.exportLocales]}:{},spelling:{customWords:[...e.customWords]},...Object.keys(r).length?{scan:r}:{}},a=Object.fromEntries(Object.entries(e.lintRules).filter(([e,t])=>VA[e]!==void 0&&t!==VA[e])),o={};return Object.keys(a).length&&(o.rules=a),e.lintIgnore.length&&(o.ignore=[...e.lintIgnore]),t?.lint?.spelling!==void 0&&(o.spelling=t.lint.spelling),Object.keys(o).length&&(i.lint=o),t?.storage!==void 0&&(i.storage=t.storage),i}var GA=j(0),KA={class:`flex items-center gap-2 p-2`},qA=[`aria-label`],JA={class:`!flex items-center gap-2`},YA={class:`truncate font-medium`},XA={class:`flex items-center gap-2`},ZA={key:0,class:`grid gap-5 border-t border-border p-4`},QA={key:0,class:`grid gap-1.5`},$A={class:`mt-1 inline-flex w-fit rounded-md border border-input p-0.5`},ej=[`onClick`],tj={key:1,class:`grid gap-1.5`},nj={class:`mt-1 inline-flex w-fit rounded-md border border-input p-0.5`},rj=[`onClick`],ij={key:2,class:`grid gap-1.5`},aj={class:`flex items-center gap-2`},oj={key:0,class:`text-xs text-muted-foreground`},sj={class:`flex items-center gap-2`},cj={key:3,class:`grid gap-1.5`},lj={class:`flex items-center gap-2`},uj={key:0,class:`text-xs text-muted-foreground`},dj={class:`flex items-center gap-2`},fj={class:`text-xs text-muted-foreground`},pj={key:4,class:`grid gap-1.5`},mj={class:`flex items-center gap-2`},hj={class:`text-xs text-muted-foreground`},gj={class:`grid gap-1.5`},_j={class:`flex w-full items-center justify-between gap-4`},vj={class:`font-mono text-xs text-muted-foreground`},yj={class:`grid gap-1.5`},bj={class:`mt-1 grid gap-2`},xj={key:0,class:`text-xs text-muted-foreground`},Sj={class:`w-24 shrink-0 font-mono text-xs font-semibold`},Cj={key:1},wj={class:`!flex items-center gap-1.5`},Tj={class:`border-t border-border pt-4`},Ej={class:`mt-2 grid gap-2`},Dj={key:0,class:`text-xs text-muted-foreground`},Oj={class:`flex h-8 shrink-0 items-center gap-1.5`},kj={class:`font-mono text-xs font-semibold`},Aj={class:`flex flex-1 flex-wrap items-center gap-1.5`},jj=[`onClick`],Mj={key:1},Nj={class:`!flex items-center gap-1.5`},Pj=P({__name:`OutputEditor`,props:{output:{},formatIndent:{},formatFinalNewline:{type:Boolean},locales:{},adapters:{}},emits:[`update:output`,`remove`],setup(e,{emit:t}){let n=e,r=t,i=j(!1),a=j({}),o={"laravel-php":[`emptyAs`,`indent`,`finalNewline`],"vue-i18n-json":[`emptyAs`,`style`,`indent`,`finalNewline`],"flutter-arb":[`emptyAs`,`indent`,`finalNewline`,`includeLocale`],"angular-xliff":[`emptyAs`],"rails-yaml":[`emptyAs`,`indent`,`finalNewline`],"apple-strings":[`emptyAs`]};function s(e){return o[e]??[`emptyAs`,`indent`,`finalNewline`]}function c(e){return s(n.output.adapter).includes(e)}let l=[{value:`source`,label:`Fill source`},{value:`empty`,label:`Leave empty`},{value:`omit`,label:`Omit`}],u=[{value:`lower-hyphen`,label:`lower-hyphen`,example:`en-us`},{value:`lower-underscore`,label:`lower-underscore`,example:`en_us`},{value:`bcp47-hyphen`,label:`bcp47-hyphen`,example:`en-US`},{value:`bcp47-underscore`,label:`bcp47-underscore`,example:`en_US`}];function d(e){return e===`flutter-arb`?`Default (Flutter: en_US)`:e===`angular-xliff`?`Default (Angular: en-US)`:e===`rails-yaml`?`Default (Rails: en-US)`:e===`apple-strings`?`Default (Apple: en-US)`:`Default (en-us)`}let f=K(()=>n.output.localeCase??`default`);function p(e){v({localeCase:e==="default"?void 0:e})}let m={"laravel-php":`Laravel PHP`,"vue-i18n-json":`Vue i18n JSON`,"flutter-arb":`Flutter ARB`,"angular-xliff":`Angular XLIFF`,"rails-yaml":`Rails YAML`,"apple-strings":`Apple .strings`};function h(e){return m[e]??e}let g={"laravel-php":Hu,"vue-i18n-json":Vu,"flutter-arb":vd,"angular-xliff":Hu,"rails-yaml":Hu,"apple-strings":vd};function _(e){return g[e]??Wu}function v(e){r(`update:output`,{...n.output,...e})}function y(e){return e===`flutter-arb`?`omit`:`source`}function b(e){v({adapter:e,emptyAs:y(e),style:e===`vue-i18n-json`?`nested`:n.output.style,includeLocale:!0})}let x=K(()=>n.output.emptyAs??y(n.output.adapter)),S=K(()=>n.output.finalNewline??n.formatFinalNewline),C=K(()=>n.output.indent!=null),w=K(()=>n.output.finalNewline!=null),T=K(()=>n.output.localeAliases??{}),ee=K(()=>Object.keys(T.value)),E=K(()=>n.locales.filter(e=>!ee.value.includes(e)));function te(e){v({localeAliases:e})}function ne(e){te({...T.value,[e]:[]})}function re(e){let t={...T.value};delete t[e],te(t)}function D(e){let t=(a.value[e]??``).trim();if(!t)return;let n=T.value[e]??[];n.includes(t)||(te({...T.value,[e]:[...n,t]}),a.value={...a.value,[e]:``})}function ie(e,t){te({...T.value,[e]:(T.value[e]??[]).filter(e=>e!==t)})}let ae=K(()=>n.output.localeMap??{}),oe=K(()=>Object.keys(ae.value)),se=K(()=>n.locales.filter(e=>!oe.value.includes(e)));function O(e){v({localeMap:e})}function ce(e){O({...ae.value,[e]:e})}function le(e){let t={...ae.value};delete t[e],O(t)}function ue(e,t){O({...ae.value,[e]:t})}return(t,n)=>(R(),z(`div`,{class:k([`rounded-lg border`,i.value?`border-input`:`border-border`])},[V(`div`,KA,[H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground`,"aria-label":i.value?`Collapse`:`Expand options`,onClick:n[0]||=e=>i.value=!i.value},[H(M(Au),{class:k([`size-4 transition-transform`,i.value?`rotate-90`:``])},null,8,[`class`])],8,qA)]),_:1}),H(M(PC),null,{default:N(()=>[U(A(i.value?`Collapse`:`Expand options`),1)]),_:1})]),_:1}),H(M(yb),{"model-value":e.output.adapter,"onUpdate:modelValue":b},{default:N(()=>[H(M(VS),{class:`w-44 shrink-0`},{default:N(()=>[V(`span`,JA,[(R(),B(aa(_(e.output.adapter)),{class:`size-3.5 shrink-0 text-primary`})),V(`span`,YA,A(h(e.output.adapter)),1)])]),_:1}),H(M(HS),null,{default:N(()=>[(R(!0),z(L,null,F(e.adapters,e=>(R(),B(M(WS),{key:e,value:e},{default:N(()=>[V(`span`,XA,[(R(),B(aa(_(e)),{class:`size-3.5 text-primary`})),U(` `+A(h(e)),1)])]),_:2},1032,[`value`]))),128)),e.output.adapter&&!e.adapters.includes(e.output.adapter)?(R(),B(M(WS),{key:0,value:e.output.adapter},{default:N(()=>[U(A(e.output.adapter),1)]),_:1},8,[`value`])):W(``,!0)]),_:1})]),_:1},8,[`model-value`]),H(M(BS),{"model-value":e.output.path,class:`flex-1 font-mono text-sm`,placeholder:`lib/l10n/app_{locale}.arb`,spellcheck:`false`,"aria-label":`Output path`,"onUpdate:modelValue":n[1]||=e=>v({path:String(e)})},null,8,[`model-value`]),H(M(Q),{variant:`ghost`,size:`icon`,class:`shrink-0 text-muted-foreground hover:text-destructive`,"aria-label":`Remove output`,onClick:n[2]||=e=>r(`remove`)},{default:N(()=>[H(M(Td),{class:`size-4`})]),_:1})]),i.value?(R(),z(`div`,ZA,[c(`emptyAs`)?(R(),z(`div`,QA,[H(M(yC),null,{default:N(()=>[...n[8]||=[U(`Empty keys`,-1)]]),_:1}),n[9]||=V(`p`,{class:`text-xs text-muted-foreground`},`What to write when a translation is missing.`,-1),V(`div`,$A,[(R(),z(L,null,F(l,e=>V(`button`,{key:e.value,type:`button`,class:k([`rounded-[5px] px-2.5 py-1 text-xs font-medium transition-colors`,x.value===e.value?`bg-primary text-primary-foreground`:`text-muted-foreground hover:text-foreground`]),onClick:t=>v({emptyAs:e.value})},A(e.label),11,ej)),64))])])):W(``,!0),c(`style`)?(R(),z(`div`,tj,[H(M(yC),null,{default:N(()=>[...n[10]||=[U(`Nesting`,-1)]]),_:1}),n[11]||=V(`p`,{class:`text-xs text-muted-foreground`},`Expand dotted keys into nested objects.`,-1),V(`div`,nj,[(R(),z(L,null,F([`nested`,`flat`],t=>V(`button`,{key:t,type:`button`,class:k([`rounded-[5px] px-2.5 py-1 text-xs font-medium capitalize transition-colors`,(e.output.style??`nested`)===t?`bg-primary text-primary-foreground`:`text-muted-foreground hover:text-foreground`]),onClick:e=>v({style:t})},A(t),11,rj)),64))])])):W(``,!0),c(`indent`)?(R(),z(`div`,ij,[V(`div`,aj,[H(M(yC),null,{default:N(()=>[...n[12]||=[U(`Indent`,-1)]]),_:1}),C.value?(R(),z(`button`,{key:1,type:`button`,class:`text-xs text-primary hover:underline`,onClick:n[3]||=e=>v({indent:null})},`Reset`)):(R(),z(`span`,oj,`Inherited · `+A(e.formatIndent),1))]),V(`div`,sj,[H(M(BS),{type:`number`,min:`0`,max:`8`,class:k([`w-20`,C.value?`border-primary`:``]),"model-value":e.output.indent??``,placeholder:String(e.formatIndent),"onUpdate:modelValue":n[4]||=e=>v({indent:e===``?null:Math.max(0,parseInt(String(e),10)||0)})},null,8,[`class`,`model-value`,`placeholder`]),n[13]||=V(`span`,{class:`text-xs text-muted-foreground`},`spaces`,-1)])])):W(``,!0),c(`finalNewline`)?(R(),z(`div`,cj,[V(`div`,lj,[H(M(yC),null,{default:N(()=>[...n[14]||=[U(`Final newline`,-1)]]),_:1}),w.value?(R(),z(`button`,{key:1,type:`button`,class:`text-xs text-primary hover:underline`,onClick:n[5]||=e=>v({finalNewline:null})},`Reset`)):(R(),z(`span`,uj,`Inherited · `+A(e.formatFinalNewline?`on`:`off`),1))]),V(`div`,dj,[H(M(XS),{"model-value":S.value,"onUpdate:modelValue":n[6]||=e=>v({finalNewline:e})},null,8,[`model-value`]),V(`span`,fj,A(S.value?`Enabled`:`Disabled`),1)])])):W(``,!0),c(`includeLocale`)?(R(),z(`div`,pj,[H(M(yC),{class:`flex items-center gap-1.5`},{default:N(()=>[...n[15]||=[U(`Include `,-1),V(`code`,{class:`font-mono text-xs`},`@@locale`,-1)]]),_:1}),n[16]||=V(`p`,{class:`text-xs text-muted-foreground`},`Write the locale marker into each file. Standard for Flutter.`,-1),V(`div`,mj,[H(M(XS),{"model-value":e.output.includeLocale??!0,"onUpdate:modelValue":n[7]||=e=>v({includeLocale:e})},null,8,[`model-value`]),V(`span`,hj,A(e.output.includeLocale??!0?`Enabled`:`Disabled`),1)])])):W(``,!0),V(`div`,gj,[H(M(yC),null,{default:N(()=>[...n[17]||=[U(`Locale code format`,-1)]]),_:1}),n[18]||=V(`p`,{class:`text-xs text-muted-foreground`},[U(`How the `),V(`code`,{class:`font-mono text-xs`},`{locale}`),U(` token is rendered in file names (and the in-file marker for ARB).`)],-1),H(M(yb),{"model-value":f.value,"onUpdate:modelValue":p},{default:N(()=>[H(M(VS),{class:`w-72`,"aria-label":`Locale code format`},{default:N(()=>[H(M(Bb))]),_:1}),H(M(HS),null,{default:N(()=>[H(M(WS),{value:`default`},{default:N(()=>[U(A(d(e.output.adapter)),1)]),_:1}),(R(),z(L,null,F(u,e=>H(M(WS),{key:e.value,value:e.value},{default:N(()=>[V(`span`,_j,[V(`span`,null,A(e.label),1),V(`span`,vj,A(e.example),1)])]),_:2},1032,[`value`])),64))]),_:1})]),_:1},8,[`model-value`])]),V(`div`,yj,[H(M(yC),null,{default:N(()=>[...n[19]||=[U(`Locale overrides`,-1)]]),_:1}),n[21]||=V(`p`,{class:`text-xs text-muted-foreground`},`Force a specific export code for one locale — wins over the format above.`,-1),V(`div`,bj,[oe.value.length===0?(R(),z(`p`,xj,`No overrides.`)):W(``,!0),(R(!0),z(L,null,F(oe.value,e=>(R(),z(`div`,{key:e,class:`flex items-center gap-2`},[V(`span`,Sj,A(e),1),H(M(xu),{class:`size-3 shrink-0 text-muted-foreground`}),H(M(BS),{class:`h-8 flex-1 font-mono text-xs`,"aria-label":`Export code for `+e,placeholder:`export code`,"model-value":ae.value[e]??``,"onUpdate:modelValue":t=>ue(e,String(t))},null,8,[`aria-label`,`model-value`,`onUpdate:modelValue`]),H(M(Q),{variant:`ghost`,size:`icon`,class:`size-8 shrink-0 text-muted-foreground hover:text-destructive`,"aria-label":`Remove override `+e,onClick:t=>le(e)},{default:N(()=>[H(M(Td),{class:`size-3.5`})]),_:1},8,[`aria-label`,`onClick`])]))),128)),se.value.length>0?(R(),z(`div`,Cj,[H(M(yb),{"model-value":``,"onUpdate:modelValue":ce},{default:N(()=>[H(M(VS),{class:`w-56 text-muted-foreground`,"aria-label":`Add locale override`},{default:N(()=>[V(`span`,wj,[H(M(sd),{class:`size-3.5`}),n[20]||=U(` Add override…`,-1)])]),_:1}),H(M(HS),null,{default:N(()=>[(R(!0),z(L,null,F(se.value,e=>(R(),B(M(WS),{key:e,value:e},{default:N(()=>[U(A(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})])):W(``,!0)])]),V(`div`,Tj,[n[25]||=V(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Advanced · Locale aliases`,-1),n[26]||=V(`p`,{class:`mt-1.5 text-xs text-muted-foreground`},[U(` Write one catalog locale to additional file codes — e.g. `),V(`span`,{class:`font-mono`},`zh-Hans`),U(` also as `),V(`span`,{class:`font-mono`},`zh, zh_CN`),U(`. `)],-1),V(`div`,Ej,[ee.value.length===0?(R(),z(`p`,Dj,`No aliases. The locale's own code is used as the file name.`)):W(``,!0),(R(!0),z(L,null,F(ee.value,e=>(R(),z(`div`,{key:e,class:`flex items-start gap-2`},[V(`div`,Oj,[V(`span`,kj,A(e),1),H(M(xu),{class:`size-3 text-muted-foreground`})]),V(`div`,Aj,[(R(!0),z(L,null,F(T.value[e]??[],t=>(R(),z(`span`,{key:t,class:`inline-flex items-center gap-1 rounded-md border border-border bg-muted px-1.5 py-0.5 font-mono text-xs`},[U(A(t)+` `,1),H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`text-muted-foreground hover:text-destructive`,"aria-label":`Remove`,onClick:n=>ie(e,t)},[H(M(Ad),{class:`size-3`})],8,jj)]),_:2},1024),H(M(PC),null,{default:N(()=>[...n[22]||=[U(`Remove`,-1)]]),_:1})]),_:2},1024)]))),128)),H(M(BS),{class:`h-8 w-28 font-mono text-xs`,placeholder:`add code…`,"model-value":a.value[e]??``,"onUpdate:modelValue":t=>a.value={...a.value,[e]:String(t)},onKeydown:Zl(Yl(t=>D(e),[`prevent`]),[`enter`])},null,8,[`model-value`,`onUpdate:modelValue`,`onKeydown`])]),H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[H(M(Q),{variant:`ghost`,size:`icon`,class:`size-8 shrink-0 text-muted-foreground hover:text-destructive`,"aria-label":`Remove alias`,onClick:t=>re(e)},{default:N(()=>[H(M(Td),{class:`size-3.5`})]),_:1},8,[`onClick`])]),_:2},1024),H(M(PC),null,{default:N(()=>[...n[23]||=[U(`Remove alias`,-1)]]),_:1})]),_:2},1024)]))),128)),E.value.length>0?(R(),z(`div`,Mj,[H(M(yb),{"model-value":``,"onUpdate:modelValue":ne},{default:N(()=>[H(M(VS),{class:`w-56 text-muted-foreground`},{default:N(()=>[V(`span`,Nj,[H(M(sd),{class:`size-3.5`}),n[24]||=U(` Add locale alias…`,-1)])]),_:1}),H(M(HS),null,{default:N(()=>[(R(!0),z(L,null,F(E.value,e=>(R(),B(M(WS),{key:e,value:e},{default:N(()=>[U(A(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1})])):W(``,!0)])])])):W(``,!0)],2))}}),Fj={class:`grid gap-1.5`},Ij={class:`flex flex-wrap gap-2`},Lj=[`aria-label`,`onClick`],Rj={key:0,class:`text-sm text-muted-foreground`},zj={class:`flex max-w-sm gap-2`},Bj={key:0,class:`flex items-center gap-1.5 text-xs text-destructive`},Vj=P({__name:`ScanListField`,props:{label:{},items:{},placeholder:{},mono:{type:Boolean},addLabel:{},validate:{type:Function}},emits:[`update:items`],setup(e,{emit:t}){let n=e,r=t,i=j(``),a=j(``);function o(){let e=i.value.trim();if(!e)return;if(n.items.includes(e)){a.value=`"${e}" is already listed`;return}let t=n.validate?.(e)??null;if(t){a.value=t;return}a.value=``,r(`update:items`,[...n.items,e]),i.value=``}function s(e){r(`update:items`,n.items.filter(t=>t!==e))}return(t,n)=>(R(),z(`div`,Fj,[H(M(yC),null,{default:N(()=>[U(A(e.label),1)]),_:1}),I(t.$slots,`help`),V(`div`,Ij,[(R(!0),z(L,null,F(e.items,t=>(R(),z(`span`,{key:t,class:k([`inline-flex items-center gap-1.5 rounded-lg border bg-accent px-2.5 py-1.5 text-sm`,e.mono&&`font-mono`])},[U(A(t)+` `,1),V(`button`,{type:`button`,class:`flex size-[18px] items-center justify-center rounded text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,"aria-label":`Remove ${t}`,onClick:e=>s(t)},[H(M(Ad),{class:`size-3`})],8,Lj)],2))),128)),e.items.length===0?(R(),z(`p`,Rj,`None — auto-detect.`)):W(``,!0)]),V(`div`,zj,[H(M(BS),{modelValue:i.value,"onUpdate:modelValue":n[0]||=e=>i.value=e,class:k(e.mono?`font-mono`:void 0),placeholder:e.placeholder,onKeydown:Zl(Yl(o,[`prevent`]),[`enter`]),onInput:n[1]||=e=>a.value=``},null,8,[`modelValue`,`class`,`placeholder`,`onKeydown`]),H(M(Q),{variant:`outline`,onClick:o},{default:N(()=>[H(M(sd),{class:`size-4`}),U(` `+A(e.addLabel??`Add`),1)]),_:1})]),a.value?(R(),z(`p`,Bj,[H(M(Ed),{class:`size-3.5`}),U(` `+A(a.value),1)])):W(``,!0)]))}}),Hj={key:0,class:`flex flex-1 items-center justify-center text-sm text-muted-foreground`},Uj={key:1,class:`flex min-h-0 flex-1 overflow-hidden`},Wj={class:`flex w-60 shrink-0 flex-col gap-1 overflow-y-auto border-r bg-muted p-3`},Gj=[`onClick`],Kj={class:`min-w-0 flex-1`},qj={class:`block text-[13px] font-[570] leading-tight`},Jj={class:`mt-0.5 block truncate text-[11px] opacity-70`},Yj={key:0,class:`size-2 shrink-0 rounded-full bg-primary ring-2 ring-primary/25`},Xj={key:1,class:`shrink-0 rounded border border-emerald-500/30 bg-emerald-500/10 px-1.5 py-0.5 font-mono text-[9px] font-semibold uppercase tracking-wide text-emerald-600 dark:text-emerald-400`},Zj=[`onClick`],Qj={class:`min-w-0 flex-1`},$j={class:`block text-[13px] font-[570] leading-tight`},eM={class:`mt-0.5 block truncate text-[11px] opacity-70`},tM={class:`relative flex min-w-0 flex-1 flex-col`},nM={class:`flex-1 overflow-y-auto px-8 pb-28 pt-7`},rM={class:`max-w-[680px]`},iM={class:`mb-6`},aM={class:`flex items-center gap-2.5 text-[21px] font-bold tracking-tight`},oM={key:0,class:`size-2 rounded-full bg-primary ring-2 ring-primary/25`},sM={key:0,class:`mt-1.5 text-sm text-muted-foreground`},cM={key:1,class:`mt-1.5 text-sm text-muted-foreground`},lM={key:2,class:`mt-1.5 text-sm text-muted-foreground`},uM={key:3,class:`mt-1.5 text-sm text-muted-foreground`},dM={key:4,class:`mt-1.5 text-sm text-muted-foreground`},fM={key:5,class:`mt-1.5 text-sm text-muted-foreground`},pM={key:6,class:`mt-1.5 text-sm text-muted-foreground`},mM={key:7,class:`mt-2 flex items-center gap-1.5 text-sm text-muted-foreground`},hM={key:0,class:`flex flex-col gap-5`},gM={class:`grid max-w-sm gap-1.5`},_M={key:0},vM={class:`grid gap-1.5`},yM={class:`ml-1.5 font-normal text-muted-foreground`},bM={class:`flex flex-wrap gap-2`},xM={key:0,class:`font-mono text-[10px] italic text-muted-foreground`},SM=[`aria-label`,`onClick`],CM={class:`mt-1 flex items-center gap-1.5 text-xs text-destructive`},wM={class:`grid max-w-sm gap-1.5`},TM={class:`flex gap-2`},EM={key:0,class:`flex items-center gap-1.5 text-xs text-muted-foreground`},DM={key:1,class:`flex flex-col gap-6`},OM={class:`flex items-center justify-between gap-4 rounded-lg border p-3.5`},kM={class:`flex items-start gap-2.5`},AM={class:`grid size-8 shrink-0 place-items-center rounded-md border border-primary/25 bg-primary/10 text-primary`},jM={class:`rounded-lg border p-3.5`},MM={class:`flex items-center justify-between gap-4`},NM={class:`flex items-start gap-2.5`},PM={class:`grid size-8 shrink-0 place-items-center rounded-md border border-amber-500/30 bg-amber-500/10 text-amber-600 dark:text-amber-400`},FM={key:0,class:`mt-3 border-t pt-3`},IM={class:`flex flex-wrap gap-2`},LM=[`aria-checked`,`onClick`],RM={class:`mt-2 flex items-center gap-1.5 text-xs text-amber-600 dark:text-amber-400`},zM={class:`mt-2 divide-y rounded-lg border`},BM={class:`flex items-center justify-between gap-4 p-3.5`},VM={class:`flex items-center gap-2`},HM={class:`flex items-center justify-between gap-4 p-3.5`},UM={class:`flex items-center gap-2 text-sm font-medium`},WM={class:`inline-flex items-center gap-1 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground`},GM={class:`inline-flex shrink-0 items-center gap-1 rounded-md border border-primary/25 bg-primary/10 px-2 py-1 text-xs font-medium text-primary`},KM={class:`flex items-center justify-between gap-4 p-3.5`},qM={class:`mt-2 flex flex-col gap-2.5`},JM={key:0,class:`text-sm text-muted-foreground`},YM={key:2,class:`flex flex-col gap-4`},XM={class:`flex items-center gap-2 rounded-lg border p-3`},ZM={key:1,class:`flex-1 text-sm text-muted-foreground`},QM={class:`grid max-w-sm gap-4`},$M={class:`grid gap-1.5`},eN={class:`flex items-center gap-2`},tN={key:0,class:`flex items-center gap-1 text-xs leading-none text-emerald-600 dark:text-emerald-400`},nN={class:`text-xs text-muted-foreground`},rN={class:`grid gap-1.5`},iN={key:0,class:`text-xs text-muted-foreground`},aN=[`onClick`],oN={key:0},sN={key:0,class:`grid gap-1.5`},cN={key:1,class:`grid gap-1.5`},lN={key:0,class:`text-xs text-muted-foreground`},uN={key:1,class:`text-xs text-muted-foreground`},dN={class:`grid gap-1.5`},fN={class:`grid gap-1.5`},pN={class:`grid gap-1.5`},mN={class:`grid gap-1.5`},hN={class:`grid gap-1.5`},gN={class:`grid gap-1.5`},_N={key:2,class:`flex items-center gap-3`},vN={class:`grid gap-0.5`},yN={key:3,class:`grid gap-1.5`},bN={key:3,class:`flex flex-col gap-6`},xN={key:4,class:`flex flex-col gap-6`},SN={class:`mt-2 divide-y rounded-lg border`},CN={class:`min-w-0`},wN={class:`flex items-center gap-2 text-sm font-medium`},TN={class:`rounded border bg-muted px-1 py-0.5 font-mono text-[10px] text-muted-foreground`},EN={class:`mt-0.5 text-xs text-muted-foreground`},DN={key:5,class:`flex flex-col gap-4`},ON={class:`flex flex-wrap gap-2`},kN=[`aria-label`,`onClick`],AN={key:0,class:`text-sm text-muted-foreground`},jN={class:`grid max-w-sm gap-1.5`},MN={class:`flex gap-2`},NN={key:6,class:`flex flex-col gap-4`},PN={class:`grid max-w-sm gap-1.5`},FN={class:`flex items-center gap-2`},IN={key:0,class:`flex items-center gap-1 text-xs leading-none text-emerald-600 dark:text-emerald-400`},LN={class:`flex items-center gap-1.5 text-sm text-muted-foreground`},RN={class:`inline-grid h-5 min-w-[20px] shrink-0 place-items-center rounded-full bg-primary px-1.5 text-[11px] font-bold tabular-nums text-primary-foreground`},zN={class:`font-semibold`},BN={class:`relative`},VN={key:0,class:`absolute bottom-full left-1/2 z-50 mb-2.5 w-64 -translate-x-1/2 rounded-xl border bg-card p-3.5 shadow-lg`},HN={class:`mt-1 text-xs leading-relaxed text-muted-foreground`},UN={class:`mt-3 flex justify-end gap-2`},WN={role:`dialog`,"aria-modal":`true`,"aria-labelledby":`leave-warning-title`,class:`w-full max-w-md rounded-2xl border bg-card p-5 shadow-xl`},GN={id:`leave-warning-title`,class:`flex items-center gap-2 text-[15px] font-semibold`},KN={class:`mt-1.5 text-[13px] leading-relaxed text-muted-foreground`},qN={class:`font-medium text-foreground`},JN={class:`block`},YN={class:`mt-4 flex items-center gap-2`},XN={key:0,class:`fixed left-1/2 top-4 z-[80] flex -translate-x-1/2 items-center gap-2 rounded-[11px] bg-foreground px-4 py-2.5 text-[12.5px] font-medium text-background shadow-lg`},ZN=P({__name:`SettingsView`,setup(e){let t=[`languages`,`outputs`,`ai`,`scan`,`quality`,`dictionary`,`editor`],n=[`flutter-arb`,`laravel-php`,`vue-i18n-json`,`angular-xliff`,`rails-yaml`,`apple-strings`],r=[{value:`anthropic`,label:`Anthropic`},{value:`bedrock`,label:`AWS Bedrock`},{value:`claude-code`,label:`Claude Code`},{value:`ollama`,label:`Ollama`},{value:`openai`,label:`OpenAI`},{value:`openrouter`,label:`OpenRouter`}],i={anthropic:[`claude-opus-4-8`,`claude-sonnet-4-6`,`claude-haiku-4-5-20251001`],openai:[`gpt-4o-mini`,`gpt-4o`,`gpt-4.1`],bedrock:[`amazon.nova-pro-v1:0`,`anthropic.claude-3-5-sonnet-20241022-v2:0`,`meta.llama3-1-70b-instruct-v1:0`],openrouter:[`anthropic/claude-3.5-haiku`,`openai/gpt-4o-mini`,`google/gemini-2.0-flash-001`],ollama:[`translategemma:4b`,`translategemma:12b`,`qwen3.5:9b`],"claude-code":[`claude-opus-4-8`,`claude-sonnet-4-6`,`claude-haiku-4-5-20251001`]},a={anthropic:`Set ANTHROPIC_API_KEY in your environment (or a .env file).`,openai:`Set OPENAI_API_KEY in your environment (or a .env file).`,bedrock:`Uses your AWS credentials (env vars, AWS_PROFILE, or an instance/SSO role).`,openrouter:`Set OPENROUTER_API_KEY in your environment (or a .env file).`,ollama:`Runs locally — no API key needed. Set OLLAMA_API_KEY only for a secured/remote server.`,"claude-code":`Uses your local Claude Code session — no separate API key needed. Requires the claude CLI to be installed.`},o=j(null),s=j(null),c=Xt({sourceLocale:``,locales:[],outputs:[],indent:2,sortKeys:!0,finalNewline:!0,autoExport:!0,exportLocales:[],customWords:[],lintRules:{},lintIgnore:[],scanAccessors:[],scanPatterns:[],scanInclude:[],scanExclude:[],scanKeep:[]}),l=j(!1),u=j(!1),d=j(p()),f=j(!1);function p(){let e=Op().get(`section`)??``;return t.includes(e)?e:`languages`}function m(e){d.value=e,location.hash=`settings?section=${e}`}function h(){d.value=p()}let g=j(null),_=j(!1),v=null;function y(e){c.sourceLocale=e.sourceLocale,c.locales=[...e.locales],c.outputs=e.outputs.map(e=>({...e})),c.indent=e.indent,c.sortKeys=e.sortKeys,c.finalNewline=e.finalNewline,c.autoExport=e.autoExport,c.exportLocales=[...e.exportLocales],c.customWords=[...e.customWords],c.lintRules={...e.lintRules},c.lintIgnore=[...e.lintIgnore],c.scanAccessors=[...e.scanAccessors],c.scanPatterns=[...e.scanPatterns],c.scanInclude=[...e.scanInclude],c.scanExclude=[...e.scanExclude],c.scanKeep=[...e.scanKeep]}function b(){o.value={sourceLocale:c.sourceLocale,locales:[...c.locales],outputs:c.outputs.map(e=>({...e})),indent:c.indent,sortKeys:c.sortKeys,finalNewline:c.finalNewline,autoExport:c.autoExport,exportLocales:[...c.exportLocales],customWords:[...c.customWords],lintRules:{...c.lintRules},lintIgnore:[...c.lintIgnore],scanAccessors:[...c.scanAccessors],scanPatterns:[...c.scanPatterns],scanInclude:[...c.scanInclude],scanExclude:[...c.scanExclude],scanKeep:[...c.scanKeep]}}async function x(){let e=await Md();s.value=e.config,y(UA(e.config)),b(),await re(),l.value=!0}x();let S=j({}),C=j(null),w=j(``),T=Xt({provider:`anthropic`,model:``,endpoint:``,region:``,batchSize:25,concurrency:``,contextBatchSize:``,contextConcurrency:``,vision:!1,promptStyle:``,inputPricePerMTok:``,outputPricePerMTok:``}),ee=j(!1),E=null,te=null,ne=``;async function re(){let[e,t]=await Promise.all([cf(),uf()]);S.value=t.profiles,C.value=t.activeProfile,w.value=t.activeProfile??``,D(C.value?t.profiles[C.value]??e.ai:e.ai),ne=JSON.stringify(ie())}function D(e){T.provider=e.provider,T.model=e.model,T.endpoint=e.endpoint??``,T.region=e.region??``,T.batchSize=e.batchSize,T.concurrency=e.concurrency??``,T.contextBatchSize=e.contextBatchSize??``,T.contextConcurrency=e.contextConcurrency??``,T.vision=e.vision??!1,T.promptStyle=e.promptStyle??``,T.inputPricePerMTok=e.inputPricePerMTok??``,T.outputPricePerMTok=e.outputPricePerMTok??``,ne=JSON.stringify(ie())}function ie(){let e=String(T.endpoint).trim(),t=String(T.region).trim(),n=Number(T.batchSize),r=Number(T.concurrency),i=Number(T.contextBatchSize),a=Number(T.contextConcurrency),o=Number(T.inputPricePerMTok),s=Number(T.outputPricePerMTok);return{provider:T.provider.trim(),model:T.model.trim(),endpoint:e===``?null:e,region:t===``?null:t,batchSize:Number.isFinite(n)&&n>0?n:25,concurrency:Number.isFinite(r)&&r>0?r:void 0,contextBatchSize:Number.isFinite(i)&&i>0?i:void 0,contextConcurrency:Number.isFinite(a)&&a>0?a:void 0,vision:T.vision||void 0,promptStyle:T.promptStyle||void 0,inputPricePerMTok:T.inputPricePerMTok!==``&&Number.isFinite(o)&&o>=0?o:void 0,outputPricePerMTok:T.outputPricePerMTok!==``&&Number.isFinite(s)&&s>=0?s:void 0}}Dr(T,()=>{JSON.stringify(ie())!==ne&&(te&&clearTimeout(te),te=setTimeout(async()=>{let e=ie();try{C.value?(await df(C.value,e),S.value={...S.value,[C.value]:e}):await lf({ai:e}),ne=JSON.stringify(e),ee.value=!0,E&&clearTimeout(E),E=setTimeout(()=>{ee.value=!1},1700)}catch(e){$.error(e.message)}},500))},{deep:!0});let ae=[`languages`,`outputs`,`scan`,`quality`,`dictionary`],oe=[`ai`,`editor`];function se(e){if(!o.value)return!0;let t=c,n=o.value;return e===`languages`?JSON.stringify(t.locales)===JSON.stringify(n.locales)&&t.sourceLocale===n.sourceLocale:e===`outputs`?JSON.stringify(t.outputs)===JSON.stringify(n.outputs)&&String(t.indent)===String(n.indent)&&t.finalNewline===n.finalNewline&&t.autoExport===n.autoExport&&JSON.stringify(t.exportLocales)===JSON.stringify(n.exportLocales):e===`scan`?JSON.stringify(t.scanAccessors)===JSON.stringify(n.scanAccessors)&&JSON.stringify(t.scanPatterns)===JSON.stringify(n.scanPatterns)&&JSON.stringify(t.scanInclude)===JSON.stringify(n.scanInclude)&&JSON.stringify(t.scanExclude)===JSON.stringify(n.scanExclude)&&JSON.stringify(t.scanKeep)===JSON.stringify(n.scanKeep):e===`quality`?JSON.stringify(t.lintRules)===JSON.stringify(n.lintRules)&&JSON.stringify(t.lintIgnore)===JSON.stringify(n.lintIgnore):e===`dictionary`?JSON.stringify(t.customWords)===JSON.stringify(n.customWords):!0}let O=K(()=>ae.filter(e=>!se(e))),ce=K(()=>O.value.length),le=K(()=>O.value.map(e=>me[e].title));Dr(ce,e=>{GA.value=e},{immediate:!0}),Xi(()=>{GA.value=0});let ue=K(()=>sT.find(e=>e.id===uT.value)?.label??`VS Code`),de=j(!1),fe=null;function pe(e){dT(e),de.value=!0,fe&&clearTimeout(fe),fe=setTimeout(()=>{de.value=!1},1700)}let me={languages:{title:`Languages`},outputs:{title:`Export targets`},ai:{title:`AI`},scan:{title:`Scan`},quality:{title:`Quality checks`},dictionary:{title:`Custom dictionary`},editor:{title:`Editor`}},he=[{id:`languages`,title:`Languages`},{id:`outputs`,title:`Export targets`},{id:`scan`,title:`Scan`},{id:`quality`,title:`Quality checks`},{id:`dictionary`,title:`Custom dictionary`}];function ge(e){if(e===`languages`)return`${c.locales.length} language${c.locales.length===1?``:`s`}`;if(e===`outputs`)return`${c.outputs.length} target${c.outputs.length===1?``:`s`}${c.autoExport?` · auto`:``}${c.exportLocales.length?` · limited`:``}`;if(e===`ai`)return C.value?`${C.value} · ${T.model}`:`${T.provider} · ${T.model}`;if(e===`scan`){let e=c.scanAccessors.length,t=c.scanPatterns.length,n=c.scanKeep.length,r=[e&&`${e} accessor${e===1?``:`s`}`,t&&`${t} pattern${t===1?``:`s`}`,n&&`${n} kept`].filter(Boolean);return r.length?r.join(` · `):`Auto-detect`}if(e===`quality`){let e=Object.entries(c.lintRules).filter(([,e])=>e===`off`).length,t=Object.entries(c.lintRules).filter(([e,t])=>VA[e]!==void 0&&t!==VA[e]).length;return!t&&!c.lintIgnore.length?`Defaults`:[t&&`${t} adjusted${e?` (${e} off)`:``}`,c.lintIgnore.length&&`${c.lintIgnore.length} ignored`].filter(Boolean).join(` · `)}return e===`dictionary`?c.customWords.length?`${c.customWords.length} word${c.customWords.length===1?``:`s`}`:`No custom words`:``}async function _e(){if(ce.value!==0){u.value=!0;try{await af(WA(c,s.value??void 0)),b(),_.value=!0,v&&clearTimeout(v),v=setTimeout(()=>{_.value=!1},1700)}catch(e){$.error(e.message)}finally{u.value=!1}}}function ve(){o.value&&y(o.value),f.value=!1}function ye(e){return e===`settings`||ce.value===0?!0:(g.value=e,!1)}function be(e){g.value=null,Ep(e)}function xe(){g.value=null}function Se(){let e=g.value;ve(),e&&be(e)}async function Ce(){let e=g.value;await _e(),e&&ce.value===0&&be(e)}function we(e){ce.value>0&&(e.preventDefault(),e.returnValue=``)}function Te(e){if(e.key===`Escape`&&g.value){e.preventDefault(),xe();return}(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),_e())}Ki(()=>{window.addEventListener(`keydown`,Te),window.addEventListener(`beforeunload`,we),window.addEventListener(`hashchange`,h),Tp(ye)}),Xi(()=>{window.removeEventListener(`keydown`,Te),window.removeEventListener(`beforeunload`,we),window.removeEventListener(`hashchange`,h),Tp(null)});let Ee=j(``);function De(){let e=Ee.value.trim().toLowerCase();if(e){if(c.locales.some(t=>t.toLowerCase()===e)){$.error(`${e} is already in the list`);return}c.locales.push(e),Ee.value=``}}function Oe(e){e!==c.sourceLocale&&(c.locales=c.locales.filter(t=>t!==e))}function ke(){c.outputs.push({adapter:`flutter-arb`,path:``,emptyAs:`omit`,style:`nested`,indent:null,finalNewline:null,includeLocale:!0,localeAliases:{}})}function Ae(e){c.outputs.splice(e,1)}let je=K(()=>c.exportLocales.length>0);function Me(e){c.exportLocales=e?[...c.locales]:[]}function Ne(e){c.exportLocales=c.exportLocales.includes(e)?c.exportLocales.filter(t=>t!==e):[...c.exportLocales,e]}let Pe=K(()=>T.provider===`bedrock`),Fe=K(()=>T.provider===`ollama`),Ie=K(()=>a[T.provider]??``),Le=K(()=>i[T.provider]??[]),Re=K(()=>Le.value[0]??``);async function ze(e){C.value=e,w.value=e??``,await pf(e),D(e?S.value[e]??ie():(await cf()).ai)}async function Be(){let e=`Profile ${Object.keys(S.value).length+1}`,t=ie();await df(e,t),S.value={...S.value,[e]:t},await ze(e)}async function Ve(e,t){let n=t.trim();if(!n||n===e){w.value=e;return}if(n in S.value){$.error(`A profile with that name already exists`),w.value=e;return}let r=S.value[e];await df(n,r),await ff(e);let i={...S.value};delete i[e],i[n]=r,S.value=i,await ze(n)}async function He(){if(!C.value)return;let e=C.value;await ff(e);let t={...S.value};delete t[e],S.value=t,await ze(null)}let Ue=j(``);function We(){let e=Ue.value.trim();if(e){if(c.customWords.includes(e)){$.error(`${e} is already in the dictionary`);return}c.customWords=[...c.customWords,e].sort(),Ue.value=``}}function Ge(e){c.customWords=c.customWords.filter(t=>t!==e)}function Ke(e){try{return new RegExp(e),null}catch(e){return`Invalid regex: ${e.message}`}}return(e,t)=>(R(),z(L,null,[l.value?(R(),z(`div`,Uj,[V(`nav`,Wj,[t[30]||=V(`p`,{class:`px-2.5 pb-2 pt-1 text-[10.5px] font-bold uppercase tracking-widest text-muted-foreground`},` Settings `,-1),(R(),z(L,null,F(he,e=>V(`button`,{key:e.id,type:`button`,class:k([`flex w-full items-center gap-2.5 rounded-[10px] border px-2.5 py-2.5 text-left transition-colors`,d.value===e.id?`border-border bg-card text-foreground shadow-sm`:`border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-foreground`]),onClick:t=>m(e.id)},[V(`span`,{class:k([`flex size-[30px] shrink-0 items-center justify-center rounded-lg border`,d.value===e.id?`border-primary/30 bg-primary/10 text-primary`:`border-border/60 bg-background text-muted-foreground`])},[e.id===`languages`?(R(),B(M(Ju),{key:0,class:`size-4`})):e.id===`outputs`?(R(),B(M(Wu),{key:1,class:`size-4`})):e.id===`ai`?(R(),B(M(Lu),{key:2,class:`size-4`})):e.id===`scan`?(R(),B(M(fd),{key:3,class:`size-4`})):e.id===`quality`?(R(),B(M(gd),{key:4,class:`size-4`})):(R(),B(M(wu),{key:5,class:`size-4`}))],2),V(`span`,Kj,[V(`span`,qj,A(e.title),1),V(`span`,Jj,A(ge(e.id)),1)]),!e.autosave&&O.value.includes(e.id)?(R(),z(`span`,Yj)):W(``,!0),e.autosave?(R(),z(`span`,Xj,`Auto`)):W(``,!0)],10,Gj)),64)),t[31]||=V(`p`,{class:`mt-4 border-t px-2.5 pb-2 pt-3 text-[10.5px] font-bold uppercase tracking-widest text-muted-foreground`},` Local (not committed) `,-1),(R(),z(L,null,F(oe,e=>V(`button`,{key:e,type:`button`,class:k([`flex w-full items-center gap-2.5 rounded-[10px] border px-2.5 py-2.5 text-left transition-colors`,d.value===e?`border-border bg-card text-foreground shadow-sm`:`border-transparent bg-transparent text-muted-foreground hover:bg-accent hover:text-foreground`]),onClick:t=>m(e)},[V(`span`,{class:k([`flex size-[30px] shrink-0 items-center justify-center rounded-lg border`,d.value===e?`border-primary/30 bg-primary/10 text-primary`:`border-border/60 bg-background text-muted-foreground`])},[e===`ai`?(R(),B(M(Lu),{key:0,class:`size-4`})):(R(),B(M(Iu),{key:1,class:`size-4`}))],2),V(`span`,Qj,[V(`span`,$j,A(me[e].title),1),V(`span`,eM,A(e===`editor`?ue.value:ge(e)),1)])],10,Zj)),64))]),V(`div`,tM,[V(`div`,nM,[V(`div`,rM,[V(`div`,iM,[V(`h2`,aM,[U(A(me[d.value].title)+` `,1),O.value.includes(d.value)?(R(),z(`span`,oM)):W(``,!0)]),d.value===`languages`?(R(),z(`p`,sM,` The source language is translated into every other language. `)):d.value===`outputs`?(R(),z(`p`,cM,[...t[32]||=[U(` Where compiled translation files are written. Use `,-1),V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`{locale}`,-1),U(` and `,-1),V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`{namespace}`,-1),U(` placeholders in the path. `,-1)]])):d.value===`ai`?(R(),z(`p`,lM,[...t[33]||=[U(` The provider and model used for machine translation. Stored locally in `,-1),V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`.glotfile/`,-1),U(`, not shared with your team. `,-1)]])):d.value===`scan`?(R(),z(`p`,uM,` How the usage scanner finds where keys are referenced in code. Auto-detection handles most projects — these settings are for the cases it can't infer. `)):d.value===`quality`?(R(),z(`p`,dM,[...t[34]||=[U(` Which checks run and how severe they are — in the editor, the Analytics release gate, and `,-1),V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`glotfile lint`,-1),U(` alike. Errors block a release; warnings don't. `,-1)]])):d.value===`dictionary`?(R(),z(`p`,fM,` Words the spell checker should never flag. Added here or from a cell's warning. `)):d.value===`editor`?(R(),z(`p`,pM,[...t[35]||=[U(` Which editor opens when you click a key's code usage. Stored locally in `,-1),V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`.glotfile/`,-1),U(`, not shared with your team. `,-1)]])):W(``,!0),oe.includes(d.value)?(R(),z(`p`,mM,[H(M(jd),{class:`size-3.5`}),t[36]||=U(` Changes here save automatically. `,-1)])):W(``,!0)]),d.value===`languages`?(R(),z(`div`,hM,[V(`div`,gM,[H(M(yC),{for:`source-locale`},{default:N(()=>[...t[37]||=[U(`Source language`,-1)]]),_:1}),H(M(yb),{modelValue:c.sourceLocale,"onUpdate:modelValue":t[0]||=e=>c.sourceLocale=e},{default:N(()=>[H(M(VS),{id:`source-locale`},{default:N(()=>[c.sourceLocale?(R(),z(`span`,_M,[H(Ew,{code:c.sourceLocale,"show-name":``,size:14},null,8,[`code`])])):(R(),B(M(Bb),{key:1,placeholder:`Select source`}))]),_:1}),H(M(HS),null,{default:N(()=>[(R(!0),z(L,null,F(c.locales,e=>(R(),B(M(WS),{key:e,value:e},{default:N(()=>[H(Ew,{code:e,"show-name":``,size:14},null,8,[`code`])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`modelValue`])]),V(`div`,vM,[H(M(yC),null,{default:N(()=>[t[38]||=U(` Languages `,-1),V(`span`,yM,A(c.locales.length),1)]),_:1}),V(`div`,bM,[(R(!0),z(L,null,F(c.locales,e=>(R(),z(`span`,{key:e,class:k([`inline-flex items-center gap-1.5 rounded-[9px] border px-2.5 py-1.5 text-sm transition-colors`,e===c.sourceLocale?`border-border/60 bg-accent`:`border-border bg-background`])},[H(Ew,{code:e,"show-name":``,size:14},null,8,[`code`]),e===c.sourceLocale?(R(),z(`span`,xM,`source`)):(R(),z(`button`,{key:1,type:`button`,class:`ml-0.5 flex size-[18px] items-center justify-center rounded text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,"aria-label":`Remove ${e}`,onClick:t=>Oe(e)},[H(M(Ad),{class:`size-3`})],8,SM))],2))),128))]),V(`p`,CM,[H(M(Ed),{class:`size-3.5`}),t[39]||=U(` Removing a language deletes its translations. `,-1)])]),V(`div`,wM,[H(M(yC),{for:`add-locale`},{default:N(()=>[...t[40]||=[U(`Add language`,-1)]]),_:1}),V(`div`,TM,[H(M(BS),{id:`add-locale`,modelValue:Ee.value,"onUpdate:modelValue":t[1]||=e=>Ee.value=e,class:`font-mono`,placeholder:`es`,onKeydown:Zl(Yl(De,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`]),H(M(Q),{variant:`outline`,onClick:De},{default:N(()=>[H(M(sd),{class:`size-4`}),t[41]||=U(` Add`,-1)]),_:1})]),Ee.value.trim()?(R(),z(`p`,EM,[t[42]||=U(` Preview: `,-1),H(Ew,{code:Ee.value.trim(),"show-name":``,size:14},null,8,[`code`])])):W(``,!0)])])):d.value===`outputs`?(R(),z(`div`,DM,[V(`div`,OM,[V(`div`,kM,[V(`span`,AM,[H(M(jd),{class:`size-4`})]),t[43]||=V(`div`,null,[V(`div`,{class:`text-sm font-medium`},`Auto-export on save`),V(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Write locale files to your project automatically as you edit, so your running app picks them up immediately.`)],-1)]),H(M(XS),{modelValue:c.autoExport,"onUpdate:modelValue":t[2]||=e=>c.autoExport=e},null,8,[`modelValue`])]),V(`div`,jM,[V(`div`,MM,[V(`div`,NM,[V(`span`,PM,[H(M(Qu),{class:`size-4`})]),t[44]||=V(`div`,null,[V(`div`,{class:`text-sm font-medium`},`Limit export languages`),V(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Only the selected languages are written to disk, including auto-export. Off exports all languages.`)],-1)]),H(M(XS),{"model-value":je.value,"onUpdate:modelValue":Me},null,8,[`model-value`])]),je.value?(R(),z(`div`,FM,[V(`div`,IM,[(R(!0),z(L,null,F(c.locales,e=>(R(),z(`button`,{key:e,type:`button`,role:`checkbox`,"aria-checked":c.exportLocales.includes(e),class:k([`inline-flex items-center gap-1.5 rounded-[9px] border px-2.5 py-1.5 text-sm transition-colors`,c.exportLocales.includes(e)?`border-primary/40 bg-primary/10`:`border-border bg-background text-muted-foreground hover:bg-accent`]),onClick:t=>Ne(e)},[V(`span`,{class:k([`flex size-4 items-center justify-center rounded border transition-colors`,c.exportLocales.includes(e)?`border-primary bg-primary text-primary-foreground`:`border-muted-foreground hover:border-primary hover:bg-primary/10`])},[c.exportLocales.includes(e)?(R(),B(M(Ou),{key:0,class:`size-3`})):W(``,!0)],2),H(Ew,{code:e,"show-name":``,size:14},null,8,[`code`])],10,LM))),128))]),V(`p`,RM,[H(M(Ed),{class:`size-3.5`}),U(` Export limited to `+A(c.exportLocales.length)+` of `+A(c.locales.length)+` languages. `,1)])])):W(``,!0)]),V(`div`,null,[t[52]||=V(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Format defaults`,-1),t[53]||=V(`p`,{class:`mt-1 text-xs text-muted-foreground`},`Export targets inherit these. Indent and Final newline can be overridden per target.`,-1),V(`div`,zM,[V(`div`,BM,[t[46]||=V(`div`,null,[V(`div`,{class:`text-sm font-medium`},`Indent`),V(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Spaces per nesting level.`)],-1),V(`div`,VM,[H(M(BS),{modelValue:c.indent,"onUpdate:modelValue":t[3]||=e=>c.indent=e,modelModifiers:{number:!0},type:`number`,min:`0`,max:`8`,class:`w-20`},null,8,[`modelValue`]),t[45]||=V(`span`,{class:`text-xs text-muted-foreground`},`spaces`,-1)])]),V(`div`,HM,[V(`div`,null,[V(`div`,UM,[t[48]||=U(` Sort keys `,-1),V(`span`,WM,[H(M(td),{class:`size-2.5`}),t[47]||=U(` Locked`,-1)])]),t[49]||=V(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Keys are always written alphabetically so output is deterministic and diffs stay clean.`,-1)]),V(`span`,GM,[H(M(Ou),{class:`size-3`}),t[50]||=U(` Always alphabetical`,-1)])]),V(`div`,KM,[t[51]||=V(`div`,null,[V(`div`,{class:`text-sm font-medium`},`Final newline`),V(`div`,{class:`mt-0.5 text-xs text-muted-foreground`},`Append a trailing newline at the end of every file.`)],-1),H(M(XS),{modelValue:c.finalNewline,"onUpdate:modelValue":t[4]||=e=>c.finalNewline=e},null,8,[`modelValue`])])])]),V(`div`,null,[t[55]||=V(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Export targets`,-1),V(`div`,qM,[(R(!0),z(L,null,F(c.outputs,(e,t)=>(R(),B(Pj,{key:t,output:e,"format-indent":Number(c.indent)||0,"format-final-newline":c.finalNewline,locales:c.locales,adapters:n,"onUpdate:output":e=>c.outputs.splice(t,1,e),onRemove:e=>Ae(t)},null,8,[`output`,`format-indent`,`format-final-newline`,`locales`,`onUpdate:output`,`onRemove`]))),128)),c.outputs.length===0?(R(),z(`p`,JM,`No export targets configured.`)):W(``,!0),V(`div`,null,[H(M(Q),{variant:`ghost`,size:`sm`,class:`mt-1 pl-2`,onClick:ke},{default:N(()=>[H(M(sd),{class:`size-4`}),t[54]||=U(` Add export target `,-1)]),_:1})])])])])):d.value===`ai`?(R(),z(`div`,YM,[V(`div`,XM,[H(M(yb),{"model-value":C.value??`__none__`,"onUpdate:modelValue":t[5]||=e=>ze(e===`__none__`?null:e)},{default:N(()=>[H(M(VS),{class:`w-44`},{default:N(()=>[H(M(Bb),{placeholder:`No profile`})]),_:1}),H(M(HS),null,{default:N(()=>[H(M(WS),{value:`__none__`},{default:N(()=>[...t[56]||=[U(`No profile`,-1)]]),_:1}),(R(!0),z(L,null,F(Object.keys(S.value),e=>(R(),B(M(WS),{key:e,value:e},{default:N(()=>[U(A(e),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`model-value`]),C.value?(R(),B(M(BS),{key:0,modelValue:w.value,"onUpdate:modelValue":t[6]||=e=>w.value=e,class:`flex-1 font-medium`,placeholder:`Profile name`,onBlur:t[7]||=e=>Ve(C.value,w.value),onKeydown:t[8]||=Zl(Yl(e=>Ve(C.value,w.value),[`prevent`]),[`enter`])},null,8,[`modelValue`])):(R(),z(`span`,ZM,`Using default settings`)),H(M(Q),{variant:`outline`,size:`sm`,class:`shrink-0`,onClick:Be},{default:N(()=>[H(M(sd),{class:`size-4`}),t[57]||=U(` New `,-1)]),_:1}),H(M(Q),{variant:`ghost`,size:`sm`,class:`shrink-0 text-destructive hover:bg-destructive/10 hover:text-destructive`,disabled:!C.value,onClick:He},{default:N(()=>[H(M(Ad),{class:`size-4`})]),_:1},8,[`disabled`])]),V(`div`,QM,[V(`div`,$M,[V(`div`,eN,[H(M(yC),{for:`ai-provider`},{default:N(()=>[...t[58]||=[U(`Provider`,-1)]]),_:1}),H(gc,{"enter-active-class":`transition duration-150 ease-out`,"enter-from-class":`opacity-0 translate-y-0.5`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition duration-300 ease-in`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0`},{default:N(()=>[ee.value?(R(),z(`span`,tN,[H(M(Ou),{class:`size-3`}),t[59]||=U(` Saved `,-1)])):W(``,!0)]),_:1})]),H(M(yb),{modelValue:T.provider,"onUpdate:modelValue":t[9]||=e=>T.provider=e},{default:N(()=>[H(M(VS),{id:`ai-provider`},{default:N(()=>[H(M(Bb),{placeholder:`Select provider`})]),_:1}),H(M(HS),null,{default:N(()=>[(R(),z(L,null,F(r,e=>H(M(WS),{key:e.value,value:e.value},{default:N(()=>[U(A(e.label),1)]),_:2},1032,[`value`])),64))]),_:1})]),_:1},8,[`modelValue`]),V(`p`,nN,A(Ie.value),1)]),V(`div`,rN,[H(M(yC),{for:`ai-model`},{default:N(()=>[...t[60]||=[U(`Model`,-1)]]),_:1}),H(M(BS),{id:`ai-model`,modelValue:T.model,"onUpdate:modelValue":t[10]||=e=>T.model=e,class:`font-mono`,placeholder:Re.value},null,8,[`modelValue`,`placeholder`]),Le.value.length?(R(),z(`p`,iN,[t[61]||=U(` Examples: `,-1),(R(!0),z(L,null,F(Le.value,(e,t)=>(R(),z(L,{key:e},[V(`button`,{type:`button`,class:`font-mono underline-offset-2 hover:text-foreground hover:underline`,onClick:t=>T.model=e},A(e),9,aN),t<Le.value.length-1?(R(),z(`span`,oN,` · `)):W(``,!0)],64))),128))])):W(``,!0)]),Pe.value?(R(),z(`div`,sN,[H(M(yC),{for:`ai-region`},{default:N(()=>[...t[62]||=[U(`Region`,-1)]]),_:1}),H(M(BS),{id:`ai-region`,modelValue:T.region,"onUpdate:modelValue":t[11]||=e=>T.region=e,class:`font-mono`,placeholder:`us-east-1`},null,8,[`modelValue`]),t[63]||=V(`p`,{class:`text-xs text-muted-foreground`},[U(`AWS region for Bedrock. Falls back to `),V(`code`,{class:`font-mono`},`AWS_REGION`),U(` if empty.`)],-1)])):(R(),z(`div`,cN,[H(M(yC),{for:`ai-endpoint`},{default:N(()=>[...t[64]||=[U(`Endpoint`,-1)]]),_:1}),H(M(BS),{id:`ai-endpoint`,modelValue:T.endpoint,"onUpdate:modelValue":t[12]||=e=>T.endpoint=e,class:`font-mono`,placeholder:Fe.value?`http://localhost:11434/v1`:`Default (leave empty)`},null,8,[`modelValue`,`placeholder`]),Fe.value?(R(),z(`p`,lN,[...t[65]||=[U(`Defaults to the local Ollama server. Override only for a remote instance — include the `,-1),V(`code`,{class:`font-mono`},`/v1`,-1),U(` suffix.`,-1)]])):(R(),z(`p`,uN,`Optional — for an in-region or self-hosted / OpenAI-compatible gateway.`))])),t[83]||=V(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Translation`,-1),V(`div`,dN,[H(M(yC),{for:`ai-batch`},{default:N(()=>[...t[66]||=[U(`Batch size`,-1)]]),_:1}),H(M(BS),{id:`ai-batch`,modelValue:T.batchSize,"onUpdate:modelValue":t[13]||=e=>T.batchSize=e,modelModifiers:{number:!0},type:`number`,min:`1`,class:`w-28`},null,8,[`modelValue`]),t[67]||=V(`p`,{class:`text-xs text-muted-foreground`},`Strings sent per request.`,-1)]),V(`div`,fN,[H(M(yC),{for:`ai-concurrency`},{default:N(()=>[...t[68]||=[U(`Parallel locales`,-1)]]),_:1}),H(M(BS),{id:`ai-concurrency`,modelValue:T.concurrency,"onUpdate:modelValue":t[14]||=e=>T.concurrency=e,modelModifiers:{number:!0},type:`number`,min:`1`,placeholder:`3`,class:`w-28`},null,8,[`modelValue`]),t[69]||=V(`p`,{class:`text-xs text-muted-foreground`},`How many locales to translate at once.`,-1)]),V(`div`,pN,[H(M(yC),{for:`ai-price-in`},{default:N(()=>[...t[70]||=[U(`Input price ($ / 1M tokens)`,-1)]]),_:1}),H(M(BS),{id:`ai-price-in`,modelValue:T.inputPricePerMTok,"onUpdate:modelValue":t[15]||=e=>T.inputPricePerMTok=e,modelModifiers:{number:!0},type:`number`,min:`0`,step:`0.01`,placeholder:`Auto for Claude models`,class:`w-44`},null,8,[`modelValue`])]),V(`div`,mN,[H(M(yC),{for:`ai-price-out`},{default:N(()=>[...t[71]||=[U(`Output price ($ / 1M tokens)`,-1)]]),_:1}),H(M(BS),{id:`ai-price-out`,modelValue:T.outputPricePerMTok,"onUpdate:modelValue":t[16]||=e=>T.outputPricePerMTok=e,modelModifiers:{number:!0},type:`number`,min:`0`,step:`0.01`,placeholder:`Auto for Claude models`,class:`w-44`},null,8,[`modelValue`]),t[72]||=V(`p`,{class:`text-xs text-muted-foreground`},`Used for the pre-translate cost estimate. Set both to override the built-in Claude prices or to price other models.`,-1)]),t[84]||=V(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Context build`,-1),V(`div`,hN,[H(M(yC),{for:`ai-context-batch`},{default:N(()=>[...t[73]||=[U(`Batch size`,-1)]]),_:1}),H(M(BS),{id:`ai-context-batch`,modelValue:T.contextBatchSize,"onUpdate:modelValue":t[17]||=e=>T.contextBatchSize=e,modelModifiers:{number:!0},type:`number`,min:`1`,placeholder:String(T.batchSize||25),class:`w-28`},null,8,[`modelValue`,`placeholder`]),t[74]||=V(`p`,{class:`text-xs text-muted-foreground`},`Keys per request. Defaults to translation batch size.`,-1)]),V(`div`,gN,[H(M(yC),{for:`ai-context-concurrency`},{default:N(()=>[...t[75]||=[U(`Concurrency`,-1)]]),_:1}),H(M(BS),{id:`ai-context-concurrency`,modelValue:T.contextConcurrency,"onUpdate:modelValue":t[18]||=e=>T.contextConcurrency=e,modelModifiers:{number:!0},type:`number`,min:`1`,placeholder:String(T.concurrency||3),class:`w-28`},null,8,[`modelValue`,`placeholder`]),t[76]||=V(`p`,{class:`text-xs text-muted-foreground`},`Parallel context requests. Defaults to parallel locales.`,-1)]),Fe.value?(R(),z(`div`,_N,[H(M(XS),{id:`ai-vision`,modelValue:T.vision,"onUpdate:modelValue":t[19]||=e=>T.vision=e},null,8,[`modelValue`]),V(`div`,vN,[H(M(yC),{for:`ai-vision`},{default:N(()=>[...t[77]||=[U(`Vision`,-1)]]),_:1}),t[78]||=V(`p`,{class:`text-xs text-muted-foreground`},`Enable for models that support image input (e.g. translategemma, llava).`,-1)])])):W(``,!0),Fe.value?(R(),z(`div`,yN,[H(M(yC),{for:`ai-prompt-style`},{default:N(()=>[...t[79]||=[U(`Prompt style`,-1)]]),_:1}),H(M(yb),{"model-value":T.promptStyle||`__default__`,"onUpdate:modelValue":t[20]||=e=>T.promptStyle=e===`__default__`?``:e},{default:N(()=>[H(M(VS),{id:`ai-prompt-style`},{default:N(()=>[H(M(Bb),{placeholder:`Default`})]),_:1}),H(M(HS),null,{default:N(()=>[H(M(WS),{value:`__default__`},{default:N(()=>[...t[80]||=[U(`Default`,-1)]]),_:1}),H(M(WS),{value:`translategemma`},{default:N(()=>[...t[81]||=[U(`TranslateGemma`,-1)]]),_:1})]),_:1})]),_:1},8,[`model-value`]),t[82]||=V(`p`,{class:`text-xs text-muted-foreground`},`TranslateGemma uses a role-based system prompt and plain-text output instead of JSON batching.`,-1)])):W(``,!0)])])):d.value===`scan`?(R(),z(`div`,bN,[H(Vj,{label:`Flutter accessors`,items:c.scanAccessors,mono:``,placeholder:`translations`,"onUpdate:items":t[21]||=e=>c.scanAccessors=e},{help:N(()=>[...t[85]||=[V(`p`,{class:`text-xs text-muted-foreground`},[U(` Accessors assigned from `),V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-[11px]`},`AppLocalizations.of(...)`),U(` are detected automatically. Add a name only if yours isn't found. `)],-1)]]),_:1},8,[`items`]),H(Vj,{label:`Custom patterns`,items:c.scanPatterns,mono:``,placeholder:`LocaleKeys\\.(\\w+)\\.tr\\(\\)`,validate:Ke,"onUpdate:items":t[22]||=e=>c.scanPatterns=e},{help:N(()=>[...t[86]||=[V(`p`,{class:`text-xs text-muted-foreground`},` Regex applied to every scanned file — capture group 1 is the key. `,-1)]]),_:1},8,[`items`]),H(Vj,{label:`Include globs`,items:c.scanInclude,mono:``,placeholder:`lib/**`,"onUpdate:items":t[23]||=e=>c.scanInclude=e},{help:N(()=>[...t[87]||=[V(`p`,{class:`text-xs text-muted-foreground`},`Limit the scan to these globs. Empty scans everything.`,-1)]]),_:1},8,[`items`]),H(Vj,{label:`Exclude globs`,items:c.scanExclude,mono:``,placeholder:`**/*.g.dart`,"onUpdate:items":t[24]||=e=>c.scanExclude=e},{help:N(()=>[...t[88]||=[V(`p`,{class:`text-xs text-muted-foreground`},`Skipped on top of always-excluded dirs (node_modules, build, …).`,-1)]]),_:1},8,[`items`]),H(Vj,{label:`Keep keys`,items:c.scanKeep,mono:``,placeholder:`validation.*`,"onUpdate:items":t[25]||=e=>c.scanKeep=e},{help:N(()=>[...t[89]||=[V(`p`,{class:`text-xs text-muted-foreground`},[U(` Key globs always treated as used — for keys consumed by code the scan can't see (framework internals, vendored packages). They never show as unused and are safe from `),V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-[11px]`},`prune --unused`),U(`. `)],-1)]]),_:1},8,[`items`])])):d.value===`quality`?(R(),z(`div`,xN,[V(`div`,null,[t[91]||=V(`div`,{class:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`},`Rules`,-1),V(`div`,SN,[(R(!0),z(L,null,F(M(BA),e=>(R(),z(`div`,{key:e.id,class:`flex items-center justify-between gap-4 p-3.5`},[V(`div`,CN,[V(`div`,wN,[U(A(e.label)+` `,1),V(`code`,TN,A(e.id),1)]),V(`div`,EN,A(e.description),1)]),H(M(yb),{"model-value":c.lintRules[e.id]??e.default,"onUpdate:modelValue":t=>c.lintRules={...c.lintRules,[e.id]:t}},{default:N(()=>[H(M(VS),{class:k([`w-32 shrink-0`,c.lintRules[e.id]===`off`?`text-muted-foreground`:``])},{default:N(()=>[H(M(Bb))]),_:1},8,[`class`]),H(M(HS),null,{default:N(()=>[H(M(WS),{value:`error`},{default:N(()=>[U(`Error`+A(e.default===`error`?` ·`:``),1)]),_:2},1024),H(M(WS),{value:`warn`},{default:N(()=>[U(`Warning`+A(e.default===`warn`?` ·`:``),1)]),_:2},1024),H(M(WS),{value:`off`},{default:N(()=>[...t[90]||=[U(`Off`,-1)]]),_:1})]),_:2},1024)]),_:2},1032,[`model-value`,`onUpdate:modelValue`])]))),128))]),t[92]||=V(`p`,{class:`mt-2 text-xs text-muted-foreground`},`· marks the built-in default.`,-1)]),H(Vj,{label:`Ignore keys`,items:c.lintIgnore,mono:``,placeholder:`legacy.*`,"onUpdate:items":t[26]||=e=>c.lintIgnore=e},{help:N(()=>[...t[93]||=[V(`p`,{class:`text-xs text-muted-foreground`},` Key globs excluded from every check — for legacy or generated keys you don't maintain. `,-1)]]),_:1},8,[`items`])])):d.value===`dictionary`?(R(),z(`div`,DN,[V(`div`,ON,[(R(!0),z(L,null,F(c.customWords,e=>(R(),z(`span`,{key:e,class:`inline-flex items-center gap-1.5 rounded-lg border bg-accent px-2.5 py-1.5 font-mono text-sm`},[U(A(e)+` `,1),V(`button`,{type:`button`,class:`flex size-[18px] items-center justify-center rounded text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,"aria-label":`Remove ${e}`,onClick:t=>Ge(e)},[H(M(Ad),{class:`size-3`})],8,kN)]))),128)),c.customWords.length===0?(R(),z(`p`,AN,`No custom words yet.`)):W(``,!0)]),V(`div`,jN,[H(M(yC),{for:`add-word`},{default:N(()=>[...t[94]||=[U(`Add word`,-1)]]),_:1}),V(`div`,MN,[H(M(BS),{id:`add-word`,modelValue:Ue.value,"onUpdate:modelValue":t[27]||=e=>Ue.value=e,class:`font-mono`,placeholder:`Glotfile`,onKeydown:Zl(Yl(We,[`prevent`]),[`enter`])},null,8,[`modelValue`,`onKeydown`]),H(M(Q),{variant:`outline`,onClick:We},{default:N(()=>[H(M(sd),{class:`size-4`}),t[95]||=U(` Add`,-1)]),_:1})])])])):d.value===`editor`?(R(),z(`div`,NN,[V(`div`,PN,[V(`div`,FN,[H(M(yC),{for:`editor-select`},{default:N(()=>[...t[96]||=[U(`Editor`,-1)]]),_:1}),H(gc,{"enter-active-class":`transition duration-150 ease-out`,"enter-from-class":`opacity-0 translate-y-0.5`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition duration-300 ease-in`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0`},{default:N(()=>[de.value?(R(),z(`span`,IN,[H(M(Ou),{class:`size-3`}),t[97]||=U(` Saved `,-1)])):W(``,!0)]),_:1})]),H(M(yb),{"model-value":M(uT),"onUpdate:modelValue":pe},{default:N(()=>[H(M(VS),{id:`editor-select`},{default:N(()=>[H(M(Bb),{placeholder:`Select editor`})]),_:1}),H(M(HS),null,{default:N(()=>[(R(!0),z(L,null,F(M(sT),e=>(R(),B(M(WS),{key:e.id,value:e.id},{default:N(()=>[U(A(e.label),1)]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`model-value`])]),V(`p`,LN,[H(M(td),{class:`size-3.5`}),t[98]||=U(` Stored locally in `,-1),t[99]||=V(`code`,{class:`rounded border bg-muted px-1 py-0.5 font-mono text-xs`},`.glotfile/`,-1),t[100]||=U(` — clicking a usage opens the file via its URL scheme. `,-1)])])):W(``,!0)])]),oe.includes(d.value)?W(``,!0):(R(),z(`div`,{key:0,class:k([`absolute bottom-5 left-1/2 flex min-w-[400px] max-w-[calc(100%-3.5rem)] -translate-x-1/2 items-center gap-3 rounded-[14px] border bg-card px-4 py-2.5 shadow-lg transition-[border-color,box-shadow]`,ce.value>0?`border-primary/40 shadow-primary/10`:`border-border`])},[V(`span`,{class:k([`flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-ellipsis whitespace-nowrap text-[13px]`,ce.value>0?`text-foreground`:`text-muted-foreground`])},[ce.value>0?(R(),z(L,{key:0},[V(`span`,RN,A(ce.value),1),U(` Unsaved `+A(ce.value===1?`change`:`changes`)+` in `,1),V(`strong`,zN,A(le.value.join(`, `)),1)],64)):(R(),z(L,{key:1},[H(M(Ou),{class:`size-3.5 shrink-0`}),t[101]||=U(` All changes saved `,-1)],64))],2),V(`div`,BN,[H(M(Q),{variant:`ghost`,size:`sm`,disabled:ce.value===0,onClick:t[28]||=e=>f.value=!f.value},{default:N(()=>[H(M(Dd),{class:`size-4`}),t[102]||=U(` Discard `,-1)]),_:1},8,[`disabled`]),f.value?(R(),z(`div`,VN,[t[105]||=V(`p`,{class:`text-[13px] font-semibold`},`Discard all changes?`,-1),V(`p`,HN,` Reverts every unsaved edit in `+A(le.value.join(`, `))+`. `,1),V(`div`,UN,[H(M(Q),{size:`sm`,variant:`outline`,onClick:t[29]||=e=>f.value=!1},{default:N(()=>[...t[103]||=[U(`Keep editing`,-1)]]),_:1}),H(M(Q),{size:`sm`,variant:`destructive`,onClick:ve},{default:N(()=>[...t[104]||=[U(`Discard`,-1)]]),_:1})])])):W(``,!0)]),H(M(Q),{size:`sm`,disabled:ce.value===0||u.value,onClick:_e},{default:N(()=>[H(M(dd),{class:`size-4`}),t[106]||=U(` Save changes `,-1)]),_:1},8,[`disabled`])],2))])])):(R(),z(`div`,Hj,` Loading settings… `)),H(gc,{"enter-active-class":`transition duration-150 ease-out`,"enter-from-class":`opacity-0`,"enter-to-class":`opacity-100`,"leave-active-class":`transition duration-100 ease-in`,"leave-from-class":`opacity-100`,"leave-to-class":`opacity-0`},{default:N(()=>[g.value?(R(),z(`div`,{key:0,class:`fixed inset-0 z-[70] flex items-center justify-center bg-background/70 p-6 backdrop-blur-sm`,onClick:Yl(xe,[`self`])},[V(`div`,WN,[V(`h3`,GN,[H(M(Ed),{class:`size-4 text-amber-500`}),t[107]||=U(` Unsaved changes `,-1)]),V(`p`,KN,[U(` You have `+A(ce.value)+` unsaved `+A(ce.value===1?`change`:`changes`)+` in `,1),V(`strong`,qN,A(le.value.join(`, `)),1),t[108]||=U(`. `,-1),V(`span`,JN,`Leaving now discards `+A(ce.value===1?`it`:`them`)+`.`,1)]),V(`div`,YN,[H(M(Q),{size:`sm`,variant:`outline`,class:`mr-auto`,onClick:xe},{default:N(()=>[...t[109]||=[U(`Keep editing`,-1)]]),_:1}),H(M(Q),{size:`sm`,variant:`destructive`,onClick:Se},{default:N(()=>[H(M(Dd),{class:`size-4`}),t[110]||=U(` Discard & leave `,-1)]),_:1}),H(M(Q),{size:`sm`,disabled:u.value,onClick:Ce},{default:N(()=>[H(M(dd),{class:`size-4`}),t[111]||=U(` Save & leave `,-1)]),_:1},8,[`disabled`])])])])):W(``,!0)]),_:1}),H(gc,{"enter-active-class":`transition duration-200 ease-out`,"enter-from-class":`opacity-0 -translate-y-1.5`,"enter-to-class":`opacity-100 translate-y-0`,"leave-active-class":`transition duration-150 ease-in`,"leave-from-class":`opacity-100 translate-y-0`,"leave-to-class":`opacity-0 -translate-y-1.5`},{default:N(()=>[_.value?(R(),z(`div`,XN,[H(M(Ou),{class:`size-3.5`}),t[112]||=U(` Settings saved `,-1)])):W(``,!0)]),_:1})],64))}}),QN={class:`min-h-0 flex-1 overflow-y-auto`},$N={key:0,class:`flex h-full items-center justify-center p-8 text-sm text-muted-foreground`},eP={key:1,class:`flex h-full items-center justify-center p-8`},tP={class:`flex max-w-md flex-col items-center gap-3 text-center text-muted-foreground`},nP={key:2,class:`grid grid-cols-[repeat(auto-fill,minmax(180px,1fr))] gap-3 p-6`},rP=[`onClick`],iP={class:`flex aspect-video items-center justify-center overflow-hidden border-b bg-muted/30`},aP=[`src`,`alt`],oP={class:`flex flex-col gap-0.5 p-2.5`},sP={class:`truncate font-mono text-xs font-medium`},cP={class:`truncate text-xs text-muted-foreground`},lP={key:1,class:`truncate text-xs text-muted-foreground`},uP={class:`flex max-h-[70vh] items-center justify-center overflow-auto rounded-md border bg-muted/30 p-2`},dP=[`src`,`alt`],fP={key:0,class:`text-sm text-muted-foreground`},pP=P({__name:`ScreenshotsView`,setup(e){let t=dn(null),n=j(!1),r=j(null);async function i(){t.value=await Md(),n.value=!0}i();let a=K(()=>t.value?.config.sourceLocale??``),o=K(()=>{let e=t.value;return e?Object.entries(e.keys).filter(([,e])=>!!e.screenshot).map(([e,t])=>({key:e,entry:t,screenshot:t.screenshot,source:t.values[a.value]?.value??``})).sort((e,t)=>e.key.localeCompare(t.key)):[]});return(e,t)=>(R(),z(`div`,QN,[n.value?o.value.length===0?(R(),z(`div`,eP,[V(`div`,tP,[H(M(Yu),{class:`size-8 opacity-60`}),t[2]||=V(`p`,{class:`text-sm`},` No screenshots yet — add one from a key's detail panel in the Editor. `,-1)])])):(R(),z(`div`,nP,[(R(!0),z(L,null,F(o.value,e=>(R(),z(`button`,{key:e.key,type:`button`,class:`group flex flex-col overflow-hidden rounded-lg border bg-card text-left shadow-sm transition-colors hover:border-ring focus:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:t=>r.value=e},[V(`div`,iP,[V(`img`,{src:`/`+e.screenshot,alt:`Screenshot for ${e.key}`,class:`h-full w-full object-contain`},null,8,aP)]),V(`div`,oP,[H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,sP,A(e.key),1)]),_:2},1024),H(M(PC),{class:`font-mono`},{default:N(()=>[U(A(e.key),1)]),_:2},1024)]),_:2},1024),e.source?(R(),B(M(ax),{key:0},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,cP,A(e.source),1)]),_:2},1024),H(M(PC),null,{default:N(()=>[U(A(e.source),1)]),_:2},1024)]),_:2},1024)):(R(),z(`span`,lP,`—`))])],8,rP))),128))])):(R(),z(`div`,$N,` Loading screenshots… `)),H(M(Oh),{open:r.value!==null,"onUpdate:open":t[1]||=e=>{e||(r.value=null)}},{default:N(()=>[r.value?(R(),B(M(bC),{key:0,class:`max-w-3xl`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),{class:`break-all font-mono text-sm`},{default:N(()=>[U(A(r.value.key),1)]),_:1}),H(M(wC),null,{default:N(()=>[U(A(r.value.source||`—`),1)]),_:1})]),_:1}),V(`div`,uP,[V(`img`,{src:`/`+r.value.screenshot,alt:`Screenshot for ${r.value.key}`,class:`max-h-[65vh] w-auto object-contain`},null,8,dP)]),r.value.entry.context?(R(),z(`p`,fP,[t[3]||=V(`span`,{class:`font-medium text-foreground`},`Context:`,-1),U(` `+A(r.value.entry.context),1)])):W(``,!0),H(M(SC),null,{default:N(()=>[H(M(Q),{size:`sm`,onClick:t[0]||=e=>M(Np)(r.value.key)},{default:N(()=>[H(M(bd),{class:`size-4`}),t[4]||=U(` Open in editor `,-1)]),_:1})]),_:1})]),_:1})):W(``,!0)]),_:1},8,[`open`])]))}}),mP={class:`min-h-0 flex-1 overflow-y-auto p-4`},hP={key:0,class:`mt-8 text-center text-sm text-muted-foreground`},gP={key:1,class:`mx-auto flex max-w-4xl flex-col gap-4`},_P={key:0,class:`flex flex-wrap gap-1.5`},vP=[`onClick`],yP={class:`flex flex-wrap items-center gap-3 border-b px-4 py-2.5`},bP={class:`text-sm font-medium`},xP={class:`text-sm text-muted-foreground`},SP={class:`border-b`},CP={class:`overflow-x-auto whitespace-pre-wrap break-words bg-muted/40 px-4 py-3 font-mono text-xs leading-relaxed`},wP={class:`divide-y`},TP={class:`flex items-center gap-2`},EP={class:`truncate font-mono text-xs text-muted-foreground`},DP={class:`flex items-start gap-2 text-sm`},OP={class:`min-w-0 flex-1 break-words`},kP={class:`min-w-0 flex-1 break-words`},AP={key:0,class:`text-destructive`},jP={key:1},MP={key:0,class:`text-xs text-muted-foreground`},NP={key:1,class:`flex flex-wrap gap-1`},PP={key:2,class:`flex items-center gap-1.5 text-xs text-muted-foreground`},FP={class:`truncate font-mono`},IP={key:1,class:`flex flex-col gap-1.5 px-4 py-3`},LP={key:0,class:`flex items-center gap-2`},RP={class:`truncate font-mono text-xs text-muted-foreground`},zP={key:1,class:`flex items-start gap-2 text-sm`},BP=P({__name:`ActivityView`,setup(e){let t=j([]),n=j(!0),r=j(`all`);Ki(async()=>{try{t.value=await Cf()}catch(e){$.error(e.message)}finally{n.value=!1}});let i=e=>e.kind===`translate`||e.kind===`context`,a=K(()=>[...new Set(t.value.map(e=>e.kind))]),o=K(()=>r.value===`all`?t.value:t.value.filter(e=>e.kind===r.value)),s=e=>LS(`rounded-full border px-2.5 py-0.5 text-xs transition-colors`,r.value===e?`bg-primary text-primary-foreground`:`text-muted-foreground hover:bg-muted`);function c(e,t){return e.results?.find(e=>e.id===t)}function l(e){return e.doNotTranslate?`${e.term} (do-not-translate)`:e.forced?`${e.term} → ${e.forced}`:e.term}function u(e){return e==null||e===``?`∅`:typeof e==`string`?e:JSON.stringify(e)}let d=e=>typeof e==`object`&&!!e;return(e,f)=>(R(),z(`div`,mP,[!n.value&&t.value.length===0?(R(),z(`p`,hP,` No activity yet — edits, translations, and config changes will show up here. `)):(R(),z(`div`,gP,[a.value.length>1?(R(),z(`div`,_P,[V(`button`,{type:`button`,class:k(s(`all`)),onClick:f[0]||=e=>r.value=`all`},`All`,2),(R(!0),z(L,null,F(a.value,e=>(R(),z(`button`,{key:e,type:`button`,class:k(s(e)),onClick:t=>r.value=e},A(e),11,vP))),128))])):W(``,!0),(R(!0),z(L,null,F(o.value,(e,t)=>(R(),z(`article`,{key:`${e.at}-${t}`,class:`rounded-lg border bg-card`},[V(`header`,yP,[V(`span`,bP,A(new Date(e.at).toLocaleString()),1),H(M(JS),{variant:`outline`,class:`font-mono uppercase`},{default:N(()=>[U(A(e.kind),1)]),_:2},1024),V(`span`,xP,A(e.summary),1),e.model?(R(),B(M(JS),{key:0,variant:`secondary`,class:`ml-auto font-mono`},{default:N(()=>[U(A(e.model),1)]),_:2},1024)):W(``,!0)]),i(e)?(R(),z(L,{key:0},[V(`details`,SP,[f[1]||=V(`summary`,{class:`cursor-pointer select-none px-4 py-2 text-xs font-medium text-muted-foreground hover:text-foreground`},` System prompt `,-1),V(`pre`,CP,A(e.system),1)]),V(`ul`,wP,[(R(!0),z(L,null,F(e.items,t=>(R(),z(`li`,{key:t.id,class:`flex flex-col gap-1.5 px-4 py-3`},[V(`div`,TP,[V(`span`,EP,A(t.key),1),t.targetLocale?(R(),B(M(JS),{key:0,variant:`outline`,class:`shrink-0 font-mono uppercase`},{default:N(()=>[U(A(t.targetLocale),1)]),_:2},1024)):W(``,!0)]),V(`div`,DP,[V(`span`,OP,A(t.source),1),H(M(xu),{class:`mt-0.5 size-4 shrink-0 text-muted-foreground`}),V(`span`,kP,[c(e,t.id)?.error?(R(),z(`span`,AP,A(c(e,t.id)?.error),1)):(R(),z(`span`,jP,A(c(e,t.id)?.translation??c(e,t.id)?.value),1))])]),t.context?(R(),z(`p`,MP,A(t.context),1)):W(``,!0),t.glossary?.length?(R(),z(`div`,NP,[(R(!0),z(L,null,F(t.glossary,e=>(R(),z(`span`,{key:e.term,class:`rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground`},A(l(e)),1))),128))])):W(``,!0),t.screenshot?(R(),z(`div`,PP,[H(M(Xu),{class:`size-3.5 shrink-0`}),V(`span`,FP,A(t.screenshot),1)])):W(``,!0)]))),128))])],64)):e.key||e.before!==void 0||e.after!==void 0?(R(),z(`div`,IP,[e.key?(R(),z(`div`,LP,[V(`span`,RP,A(e.key),1),e.locale?(R(),B(M(JS),{key:0,variant:`outline`,class:`shrink-0 font-mono uppercase`},{default:N(()=>[U(A(e.locale),1)]),_:2},1024)):W(``,!0)])):W(``,!0),e.before!==void 0||e.after!==void 0?(R(),z(`div`,zP,[e.before===void 0?W(``,!0):(R(),z(`span`,{key:0,class:k(M(LS)(`min-w-0 flex-1 break-words text-muted-foreground`,d(e.before)&&`font-mono text-xs`))},A(u(e.before)),3)),e.before!==void 0&&e.after!==void 0?(R(),B(M(xu),{key:1,class:`mt-0.5 size-4 shrink-0 text-muted-foreground`})):W(``,!0),e.after===void 0?W(``,!0):(R(),z(`span`,{key:2,class:k(M(LS)(`min-w-0 flex-1 break-words`,d(e.after)&&`font-mono text-xs`))},A(u(e.after)),3))])):W(``,!0)])):W(``,!0)]))),128))]))]))}}),VP=[{id:`home`,title:`Home`,section:``,html:`<h1>Glotfile</h1>
8
+ <blockquote>
9
+ <p>A <strong>local-first, git-native translation manager</strong>. All of your app&#39;s copy lives in one JSON file you commit to your repo. You edit and AI-translate it through a local web UI, then export to whatever locale formats your apps consume — no SaaS, no hosted database, nothing leaves your machine except the AI calls you choose to make.</p>
10
+ </blockquote>
11
+ <p>This is the home page of the user guide. Everything is linked from here.</p>
12
+ <h2>Start here</h2>
13
+ <ul>
14
+ <li>Installation — requirements and how to run Glotfile</li>
15
+ <li>Quick Start — from zero to translated strings in five minutes</li>
16
+ <li>Translation Workflow — the day-to-day loop, end to end</li>
17
+ </ul>
18
+ <h2>Core concepts</h2>
19
+ <ul>
20
+ <li>The State File — <code>glotfile.json</code>, the single source of truth</li>
21
+ <li>Keys and Locales — how strings and languages are organised</li>
22
+ <li>Review States — <code>source</code> → <code>machine</code> → <code>reviewed</code> / <code>needs-review</code></li>
23
+ <li>Plurals — CLDR plural forms</li>
24
+ <li>Glossary — do-not-translate and forced terms</li>
25
+ <li>Key Context and Metadata — context, notes, tags, length limits, screenshots</li>
26
+ </ul>
27
+ <h2>The web UI</h2>
28
+ <ul>
29
+ <li>Web UI Overview — the panels and how they fit together</li>
30
+ <li>Editor · Analytics · Screenshots · Settings · AI Log</li>
31
+ </ul>
32
+ <h2>The command line</h2>
33
+ <ul>
34
+ <li>CLI Overview — every command at a glance</li>
35
+ <li>serve · translate · export · lint and check · import</li>
36
+ </ul>
37
+ <h2>AI translation</h2>
38
+ <ul>
39
+ <li>How Translation Works — what the translator does for you</li>
40
+ <li>AI Providers — Anthropic, OpenAI, AWS Bedrock, and OpenRouter setup</li>
41
+ </ul>
42
+ <h2>Reference</h2>
43
+ <ul>
44
+ <li>Output Formats — the six export adapters</li>
45
+ <li>Checks and Validation — every rule and what it catches</li>
46
+ <li>Configuration Reference — every field in <code>config</code></li>
47
+ <li>Placeholders and ICU — what&#39;s preserved across formats</li>
48
+ </ul>
49
+ <h2>Guides</h2>
50
+ <ul>
51
+ <li>Translation Workflow — author → translate → review → export</li>
52
+ <li>Continuous Integration — gate merges on translation health</li>
53
+ <li>Keeping Translations Fresh — handling source changes</li>
54
+ </ul>
55
+ <h2>Help</h2>
56
+ <ul>
57
+ <li>Troubleshooting and FAQ</li>
58
+ </ul>
59
+ `,text:`Glotfile A local-first, git-native translation manager . All of your app's copy lives in one JSON file you commit to your repo. You edit and AI-translate it through a local web UI, then export to whatever locale formats your apps consume — no SaaS, no hosted database, nothing leaves your machine except the AI calls you choose to make. This is the home page of the user guide. Everything is linked from here. Start here - Installation — requirements and how to run Glotfile - Quick Start — from zero to translated strings in five minutes - Translation Workflow — the day-to-day loop, end to end Core concepts - The State File — , the single source of truth - Keys and Locales — how strings and languages are organised - Review States — → → / - Plurals — CLDR plural forms - Glossary — do-not-translate and forced terms - Key Context and Metadata — context, notes, tags, length limits, screenshots The web UI - Web UI Overview — the panels and how they fit together - Editor · Analytics · Screenshots · Settings · AI Log The command line - CLI Overview — every command at a glance - serve · translate · export · lint and check · import AI translation - How Translation Works — what the translator does for you - AI Providers — Anthropic, OpenAI, AWS Bedrock, and OpenRouter setup Reference - Output Formats — the six export adapters - Checks and Validation — every rule and what it catches - Configuration Reference — every field in - Placeholders and ICU — what's preserved across formats Guides - Translation Workflow — author → translate → review → export - Continuous Integration — gate merges on translation health - Keeping Translations Fresh — handling source changes Help - Troubleshooting and FAQ`},{id:`getting-started/installation`,title:`Installation`,section:`Getting Started`,html:`<h1>Installation</h1>
60
+ <h2>Requirements</h2>
61
+ <ul>
62
+ <li><strong>Node.js</strong> <code>^20.19.0 || &gt;=22.12.0</code></li>
63
+ </ul>
64
+ <p>That&#39;s the only hard requirement. Everything except AI translation runs fully offline, with no account and no network access.</p>
65
+ <h2>Running Glotfile</h2>
66
+ <p>Glotfile is designed to run with <strong>no install</strong> via <code>npx</code>:</p>
67
+ <pre><code class="language-bash">npx glotfile
68
+ </code></pre>
69
+ <blockquote>
70
+ <p><strong>⚠ Pre-1.0: run from a checkout for now</strong> — Glotfile is pre-1.0 and not yet published to npm. Until it is, run it from a clone of the repo:</p>
71
+ <pre><code class="language-bash">npm install
72
+ npm run build # builds the UI + server into dist/
73
+ node bin/glotfile.js # equivalent to the \`glotfile\` command
74
+ </code></pre>
75
+ </blockquote>
76
+ <p>Once published, <code>npx glotfile &lt;command&gt;</code> and a global install will both work. Throughout these docs, <code>glotfile &lt;command&gt;</code> and <code>node bin/glotfile.js &lt;command&gt;</code> are interchangeable.</p>
77
+ <h2>First run</h2>
78
+ <p>Run Glotfile from the root of the project whose copy you want to manage:</p>
79
+ <pre><code class="language-bash">glotfile # same as: glotfile serve
80
+ </code></pre>
81
+ <p>This starts a local server bound to <code>127.0.0.1</code>, opens your browser, and:</p>
82
+ <ul>
83
+ <li>If a <code>glotfile.json</code> already exists in the current directory, it loads it.</li>
84
+ <li>If not, it starts from sensible defaults and <strong>writes the file as soon as you make your first edit</strong>.</li>
85
+ </ul>
86
+ <blockquote>
87
+ <p><strong>Info:</strong> Already have locale files? — Import an existing project by reading your current <code>.arb</code> / <code>.php</code> / <code>.json</code> files <em>into</em> the catalog with <code>glotfile import</code> — see import.</p>
88
+ </blockquote>
89
+ <h2>Targeting a different file</h2>
90
+ <p>Every command accepts <code>--file</code> (<code>-f</code>) to use a state file other than <code>./glotfile.json</code>:</p>
91
+ <pre><code class="language-bash">glotfile serve --file packages/app/glotfile.json
92
+ </code></pre>
93
+ <h2>Developing Glotfile itself</h2>
94
+ <p>If you&#39;re hacking on Glotfile (not just using it), run the Vite UI with hot-reload alongside the server:</p>
95
+ <pre><code class="language-bash">npm run dev
96
+ </code></pre>
97
+ <h2>Next steps</h2>
98
+ <ul>
99
+ <li>Quick Start — translate your first strings</li>
100
+ <li>The State File — understand what <code>glotfile.json</code> holds</li>
101
+ </ul>
102
+ `,text:`Installation Requirements - Node.js That's the only hard requirement. Everything except AI translation runs fully offline, with no account and no network access. Running Glotfile Glotfile is designed to run with no install via : ⚠ Pre-1.0: run from a checkout for now — Glotfile is pre-1.0 and not yet published to npm. Until it is, run it from a clone of the repo: Once published, and a global install will both work. Throughout these docs, and are interchangeable. First run Run Glotfile from the root of the project whose copy you want to manage: This starts a local server bound to , opens your browser, and: - If a already exists in the current directory, it loads it. - If not, it starts from sensible defaults and writes the file as soon as you make your first edit . Info: Already have locale files? — Import an existing project by reading your current / / files into the catalog with — see import. Targeting a different file Every command accepts ( ) to use a state file other than : Developing Glotfile itself If you're hacking on Glotfile (not just using it), run the Vite UI with hot-reload alongside the server: Next steps - Quick Start — translate your first strings - The State File — understand what holds`},{id:`getting-started/quick-start`,title:`Quick Start`,section:`Getting Started`,html:`<h1>Quick Start</h1>
103
+ <p>This walks you from an empty project to translated, exported strings. It assumes you&#39;ve done Installation.</p>
104
+ <h2>1. Start the UI</h2>
105
+ <p>From your project root:</p>
106
+ <pre><code class="language-bash">glotfile
107
+ </code></pre>
108
+ <p>Your browser opens the Editor. If there&#39;s no <code>glotfile.json</code> yet, Glotfile uses defaults and writes the file on your first edit.</p>
109
+ <h2>2. Add your languages</h2>
110
+ <p>Open Settings and set:</p>
111
+ <ul>
112
+ <li><strong>Source locale</strong> — the language you author in (e.g. <code>en</code>).</li>
113
+ <li><strong>Locales</strong> — every language you want to maintain (e.g. <code>en</code>, <code>fr</code>, <code>de</code>).</li>
114
+ </ul>
115
+ <p>See Keys and Locales for how locales work.</p>
116
+ <h2>3. Add keys and source copy</h2>
117
+ <p>In the Editor, add a key in dot notation and type its source string:</p>
118
+ <table>
119
+ <thead>
120
+ <tr>
121
+ <th>Key</th>
122
+ <th><code>en</code> (source)</th>
123
+ </tr>
124
+ </thead>
125
+ <tbody><tr>
126
+ <td><code>auth.signIn.button</code></td>
127
+ <td><code>Sign in</code></td>
128
+ </tr>
129
+ <tr>
130
+ <td><code>auth.signIn.title</code></td>
131
+ <td><code>Welcome back</code></td>
132
+ </tr>
133
+ </tbody></table>
134
+ <p>The source value is saved with the state <code>source</code>.</p>
135
+ <h2>4. AI-translate the rest</h2>
136
+ <blockquote>
137
+ <p><strong>Info:</strong> One-time setup — AI translation needs an API key in your environment. The default provider is Anthropic — set <code>ANTHROPIC_API_KEY</code> (a local <code>.env</code> file works). See AI Providers for OpenAI and AWS Bedrock.</p>
138
+ </blockquote>
139
+ <p>Fill the empty languages — from the Editor&#39;s translate action, or the CLI:</p>
140
+ <pre><code class="language-bash">glotfile translate
141
+ </code></pre>
142
+ <p>New translations are written as <code>machine</code> state. Glotfile never overwrites a value you&#39;ve marked <code>reviewed</code>. See How Translation Works.</p>
143
+ <h2>5. Review</h2>
144
+ <p>Back in the Editor, filter to <strong>machine</strong> to see unreviewed translations. Promote the good ones to <code>reviewed</code>; flag the rest. See Review States.</p>
145
+ <h2>6. Export to your app&#39;s formats</h2>
146
+ <p>Configure where files go in Settings (or Output Formats), then:</p>
147
+ <pre><code class="language-bash">glotfile export
148
+ </code></pre>
149
+ <p>This writes the locale files for every configured output (Flutter ARB, Laravel PHP, i18next JSON, and more — see Output Formats).</p>
150
+ <h2>7. Commit</h2>
151
+ <p>Commit <code>glotfile.json</code> together with your code. The diff <em>is</em> the review:</p>
152
+ <pre><code class="language-bash">git add glotfile.json lib/l10n/
153
+ git commit -m &quot;Add sign-in copy + translations&quot;
154
+ </code></pre>
155
+ <p>Because the catalog is just a file in your repo, branching, pull-request review, and rollback work exactly the way they already do for code.</p>
156
+ <h2>Where to go next</h2>
157
+ <ul>
158
+ <li>Translation Workflow — the same loop, in depth</li>
159
+ <li>Continuous Integration — keep translations healthy in CI</li>
160
+ <li>The State File — what&#39;s actually in <code>glotfile.json</code></li>
161
+ </ul>
162
+ `,text:`Quick Start This walks you from an empty project to translated, exported strings. It assumes you've done Installation. 1. Start the UI From your project root: Your browser opens the Editor. If there's no yet, Glotfile uses defaults and writes the file on your first edit. 2. Add your languages Open Settings and set: - Source locale — the language you author in (e.g. ). - Locales — every language you want to maintain (e.g. , , ). See Keys and Locales for how locales work. 3. Add keys and source copy In the Editor, add a key in dot notation and type its source string: Key (source) --- --- The source value is saved with the state . 4. AI-translate the rest Info: One-time setup — AI translation needs an API key in your environment. The default provider is Anthropic — set (a local file works). See AI Providers for OpenAI and AWS Bedrock. Fill the empty languages — from the Editor's translate action, or the CLI: New translations are written as state. Glotfile never overwrites a value you've marked . See How Translation Works. 5. Review Back in the Editor, filter to machine to see unreviewed translations. Promote the good ones to ; flag the rest. See Review States. 6. Export to your app's formats Configure where files go in Settings (or Output Formats), then: This writes the locale files for every configured output (Flutter ARB, Laravel PHP, i18next JSON, and more — see Output Formats). 7. Commit Commit together with your code. The diff is the review: Because the catalog is just a file in your repo, branching, pull-request review, and rollback work exactly the way they already do for code. Where to go next - Translation Workflow — the same loop, in depth - Continuous Integration — keep translations healthy in CI - The State File — what's actually in`},{id:`web-ui/ai-log`,title:`AI Log`,section:`Web UI`,html:`<h1>AI Log</h1>
163
+ <p>The AI Log is a record of recent translation runs — what was sent to the provider and what came back. It&#39;s useful for understanding why a translation turned out the way it did, and for auditing what left your machine.</p>
164
+ <h2>What each entry records</h2>
165
+ <p>For every run:</p>
166
+ <ul>
167
+ <li><strong>When</strong> it ran and the <strong>model</strong> used.</li>
168
+ <li>The <strong>system prompt</strong> that framed the request.</li>
169
+ <li>Per string: the <strong>key</strong>, <strong>source</strong>, <strong>target locale</strong>, the <strong>context</strong> and relevant <strong>glossary</strong> hints sent, and whether the key had a <strong>screenshot</strong>.</li>
170
+ <li>The <strong>results</strong> returned (translation or plural forms, or an error).</li>
171
+ </ul>
172
+ <h2>What it deliberately does <em>not</em> record</h2>
173
+ <blockquote>
174
+ <p><strong>⚠ The log is egress-only and credential-free</strong></p>
175
+ <ul>
176
+ <li><strong>No API keys</strong> are ever written to the log (or to <code>glotfile.json</code>).</li>
177
+ <li><strong>No screenshot bytes</strong> — only the fact that a key had one.</li>
178
+ </ul>
179
+ </blockquote>
180
+ <p>In other words: the AI Log shows exactly what crossed the network boundary, and nothing more.</p>
181
+ <h2>Related</h2>
182
+ <ul>
183
+ <li>How Translation Works · AI Providers</li>
184
+ </ul>
185
+ `,text:`AI Log The AI Log is a record of recent translation runs — what was sent to the provider and what came back. It's useful for understanding why a translation turned out the way it did, and for auditing what left your machine. What each entry records For every run: - When it ran and the model used. - The system prompt that framed the request. - Per string: the key , source , target locale , the context and relevant glossary hints sent, and whether the key had a screenshot . - The results returned (translation or plural forms, or an error). What it deliberately does not record ⚠ The log is egress-only and credential-free - No API keys are ever written to the log (or to ). - No screenshot bytes — only the fact that a key had one. In other words: the AI Log shows exactly what crossed the network boundary, and nothing more. Related - How Translation Works · AI Providers`},{id:`web-ui/analytics`,title:`Analytics`,section:`Web UI`,html:`<h1>Analytics</h1>
186
+ <p>The Analytics panel answers one question — <strong>can I ship?</strong> — plus the detail behind the answer: how complete and how reviewed your catalog is per locale, and what&#39;s blocking a release.</p>
187
+ <h2>The release gate</h2>
188
+ <p>The &quot;Ready to ship&quot; verdict is computed from the <strong>same lint report as <code>glotfile check</code></strong>: the lint rules over your catalog plus the output-drift check. If the CLI fails, the panel shows the same blockers, and vice versa — the two can never disagree.</p>
189
+ <p>A locale is <strong>Ready</strong> when it clears the gate:</p>
190
+ <ul>
191
+ <li>100% translated (no <code>empty-translation</code> errors)</li>
192
+ <li>0 lint errors (placeholder mismatches, glossary violations, …)</li>
193
+ <li>Outputs exported (no stale files on disk)</li>
194
+ <li>Nothing stale (no needs-review strings; these mark a locale <strong>Almost</strong> rather than blocked)</li>
195
+ </ul>
196
+ <p>Reviewed state is optional — a fully machine-translated locale can ship.</p>
197
+ <h3>Skipping rules</h3>
198
+ <p>The gate honors <code>config.lint.rules</code> in <code>glotfile.json</code>, exactly like the CLI. Set a rule to <code>&quot;off&quot;</code> to skip it in both places, or change its severity:</p>
199
+ <pre><code class="language-json">{
200
+ &quot;lint&quot;: {
201
+ &quot;rules&quot;: {
202
+ &quot;identical-to-source&quot;: &quot;off&quot;,
203
+ &quot;spelling&quot;: &quot;warn&quot;
204
+ }
205
+ }
206
+ }
207
+ </code></pre>
208
+ <p>Rules at <code>error</code> severity block the release; <code>warn</code> rules surface as warnings only. See <em>Checks and Validation</em> for the full rule list.</p>
209
+ <h2>Totals</h2>
210
+ <p>At the top: total keys, number of locales, overall <strong>translated %</strong> and <strong>reviewed %</strong>, open issues, and the source word count.</p>
211
+ <h2>Per locale</h2>
212
+ <p>For each target locale:</p>
213
+ <ul>
214
+ <li>Verdict against the release gate (<strong>Ready / Almost / Blocked</strong>) with its blockers</li>
215
+ <li><strong>Translated %</strong> and a breakdown of states: reviewed, needs-review, machine, missing</li>
216
+ <li>Breaking and warning counts from the lint report</li>
217
+ </ul>
218
+ <p>Click any locale, issue, or worklist item to drill into the matching strings in the Editor.</p>
219
+ <blockquote>
220
+ <p><strong>Tip:</strong> Reviewed ≠ translated — a locale can be 100% <em>translated</em> (no missing values) but only 40% <em>reviewed</em>. The two percentages together tell you whether you have copy at all, and whether a human has signed off on it.</p>
221
+ </blockquote>
222
+ <h2>Related</h2>
223
+ <ul>
224
+ <li>Review States · Editor · Checks and Validation · Lint and Check (CLI)</li>
225
+ </ul>
226
+ `,text:`Analytics The Analytics panel answers one question — can I ship? — plus the detail behind the answer: how complete and how reviewed your catalog is per locale, and what's blocking a release. The release gate The "Ready to ship" verdict is computed from the same lint report as : the lint rules over your catalog plus the output-drift check. If the CLI fails, the panel shows the same blockers, and vice versa — the two can never disagree. A locale is Ready when it clears the gate: - 100% translated (no errors) - 0 lint errors (placeholder mismatches, glossary violations, …) - Outputs exported (no stale files on disk) - Nothing stale (no needs-review strings; these mark a locale Almost rather than blocked) Reviewed state is optional — a fully machine-translated locale can ship. Skipping rules The gate honors in , exactly like the CLI. Set a rule to to skip it in both places, or change its severity: Rules at severity block the release; rules surface as warnings only. See Checks and Validation for the full rule list. Totals At the top: total keys, number of locales, overall translated % and reviewed % , open issues, and the source word count. Per locale For each target locale: - Verdict against the release gate ( Ready / Almost / Blocked ) with its blockers - Translated % and a breakdown of states: reviewed, needs-review, machine, missing - Breaking and warning counts from the lint report Click any locale, issue, or worklist item to drill into the matching strings in the Editor. Tip: Reviewed ≠ translated — a locale can be 100% translated (no missing values) but only 40% reviewed . The two percentages together tell you whether you have copy at all, and whether a human has signed off on it. Related - Review States · Editor · Checks and Validation · Lint and Check (CLI)`},{id:`web-ui/editor`,title:`Editor`,section:`Web UI`,html:`<h1>Editor</h1>
227
+ <p>The Editor is a table of every key with the source string and each target language side by side. It&#39;s built to stay fast with thousands of keys (only visible rows are rendered).</p>
228
+ <h2>Working with keys</h2>
229
+ <ul>
230
+ <li><strong>Add</strong> a key (dot-notation name + source value).</li>
231
+ <li><strong>Rename</strong> a key inline.</li>
232
+ <li><strong>Delete</strong> a key.</li>
233
+ <li><strong>Edit values inline</strong> — click a cell, type, commit.</li>
234
+ </ul>
235
+ <h2>Editing values</h2>
236
+ <ul>
237
+ <li>Press <strong>Enter</strong> to commit an edit, <strong>Escape</strong> to cancel.</li>
238
+ <li>Use <strong>↑ / ↓</strong> arrow keys to move between rows.</li>
239
+ <li>Plural keys open a dedicated per-category form editor.</li>
240
+ </ul>
241
+ <p>Each value shows a state badge you can toggle as you review (<code>machine</code> → <code>reviewed</code> / <code>needs-review</code>).</p>
242
+ <h2>Filtering and search</h2>
243
+ <p>Free-text search plus state facets let you focus:</p>
244
+ <ul>
245
+ <li><strong>missing</strong> — values with no content</li>
246
+ <li><strong>machine</strong> — AI translations not yet reviewed</li>
247
+ <li><strong>needs-review</strong> — flagged values (e.g. source changed)</li>
248
+ <li><strong>reviewed</strong> — human-approved values</li>
249
+ <li><strong>needs attention</strong> — any key with an open issue</li>
250
+ </ul>
251
+ <p>You can also filter by <strong>tag</strong> and narrow to a single locale.</p>
252
+ <h2>Per-key detail panel</h2>
253
+ <p>Selecting a key opens its detail panel for metadata: <strong>context</strong>, <strong>notes</strong>, <strong>tags</strong>, <strong>max length</strong>, <strong>screenshot</strong>, the <strong>skip-translate</strong> flag, and the plural marker.</p>
254
+ <h2>Translating from the Editor</h2>
255
+ <p>The translate action runs AI translation for the current selection/filter — the same engine as <code>glotfile translate</code>. Results come back as <code>machine</code> and never overwrite <code>reviewed</code> values.</p>
256
+ <h2>Exporting from the Editor</h2>
257
+ <p>The export action opens a <strong>preview</strong> of exactly what <code>glotfile export</code> will write, before any files are touched. See Output Formats.</p>
258
+ <h2>Related</h2>
259
+ <ul>
260
+ <li>Review States · Key Context and Metadata · Analytics · translate</li>
261
+ </ul>
262
+ `,text:`Editor The Editor is a table of every key with the source string and each target language side by side. It's built to stay fast with thousands of keys (only visible rows are rendered). Working with keys - Add a key (dot-notation name + source value). - Rename a key inline. - Delete a key. - Edit values inline — click a cell, type, commit. Editing values - Press Enter to commit an edit, Escape to cancel. - Use ↑ / ↓ arrow keys to move between rows. - Plural keys open a dedicated per-category form editor. Each value shows a state badge you can toggle as you review ( → / ). Filtering and search Free-text search plus state facets let you focus: - missing — values with no content - machine — AI translations not yet reviewed - needs-review — flagged values (e.g. source changed) - reviewed — human-approved values - needs attention — any key with an open issue You can also filter by tag and narrow to a single locale. Per-key detail panel Selecting a key opens its detail panel for metadata: context , notes , tags , max length , screenshot , the skip-translate flag, and the plural marker. Translating from the Editor The translate action runs AI translation for the current selection/filter — the same engine as . Results come back as and never overwrite values. Exporting from the Editor The export action opens a preview of exactly what will write, before any files are touched. See Output Formats. Related - Review States · Key Context and Metadata · Analytics · translate`},{id:`web-ui/screenshots`,title:`Screenshots`,section:`Web UI`,html:`<h1>Screenshots</h1>
263
+ <p>A screenshot attached to a key shows <em>where</em> a string appears in your UI. Vision-capable AI models use it as context, which markedly improves ambiguous strings.</p>
264
+ <h2>Attaching a screenshot</h2>
265
+ <p>Attach an image to a key from its detail panel in the Editor, or manage images across keys in the <strong>Screenshots</strong> panel.</p>
266
+ <h2>How the AI uses them</h2>
267
+ <p>During translation, a key&#39;s screenshot is sent <strong>only to vision-capable models</strong>:</p>
268
+ <ul>
269
+ <li><strong>Supported:</strong> Anthropic, OpenAI (gpt-4o-class), AWS Bedrock (Nova, Claude).</li>
270
+ <li><strong>Not supported:</strong> AWS Bedrock Meta Llama text models — those runs proceed text-only and print a warning noting how many screenshots were skipped.</li>
271
+ </ul>
272
+ <p>So screenshots are always safe to attach: models that can&#39;t see them simply ignore them. See AI Providers for the full support matrix.</p>
273
+ <blockquote>
274
+ <p><strong>Info:</strong> Screenshots never appear in the AI log — the AI Log records what was sent to a provider, but <strong>not</strong> the image bytes themselves — only that a key had a screenshot.</p>
275
+ </blockquote>
276
+ <h2>Related</h2>
277
+ <ul>
278
+ <li>Key Context and Metadata · How Translation Works · AI Providers</li>
279
+ </ul>
280
+ `,text:`Screenshots A screenshot attached to a key shows where a string appears in your UI. Vision-capable AI models use it as context, which markedly improves ambiguous strings. Attaching a screenshot Attach an image to a key from its detail panel in the Editor, or manage images across keys in the Screenshots panel. How the AI uses them During translation, a key's screenshot is sent only to vision-capable models : - Supported: Anthropic, OpenAI (gpt-4o-class), AWS Bedrock (Nova, Claude). - Not supported: AWS Bedrock Meta Llama text models — those runs proceed text-only and print a warning noting how many screenshots were skipped. So screenshots are always safe to attach: models that can't see them simply ignore them. See AI Providers for the full support matrix. Info: Screenshots never appear in the AI log — the AI Log records what was sent to a provider, but not the image bytes themselves — only that a key had a screenshot. Related - Key Context and Metadata · How Translation Works · AI Providers`},{id:`web-ui/settings`,title:`Settings`,section:`Web UI`,html:`<h1>Settings</h1>
281
+ <p>The Settings panel edits the <code>config</code> block of <code>glotfile.json</code>. Every field here is also documented in the Configuration Reference.</p>
282
+ <h2>What you can configure</h2>
283
+ <ul>
284
+ <li><strong>Source locale</strong> — the language you author in.</li>
285
+ <li><strong>Locales</strong> — the languages you maintain (add / remove). See Keys and Locales.</li>
286
+ <li><strong>Outputs</strong> — the export targets: adapter + path template per entry. See Output Formats.</li>
287
+ <li><strong>AI</strong> — provider, model, endpoint, region, and batch size. See AI Providers.</li>
288
+ <li><strong>Formatting</strong> — indent, sort keys, final newline (controls how <code>glotfile.json</code> is written).</li>
289
+ <li><strong>Custom dictionary</strong> — words the spelling check should accept.</li>
290
+ </ul>
291
+ <h2>Save behaviour</h2>
292
+ <p>Most edits across the UI save immediately to <code>glotfile.json</code>. In Settings, some changes are explicit:</p>
293
+ <blockquote>
294
+ <p><strong>⚠ Dictionary changes require an explicit save</strong> — edits to the custom spelling dictionary are staged and only written when you <strong>Save</strong>, so you can add several words without a write (and a git diff) per keystroke.</p>
295
+ </blockquote>
296
+ <h2>Related</h2>
297
+ <ul>
298
+ <li>Configuration Reference · Output Formats · AI Providers · Checks and Validation</li>
299
+ </ul>
300
+ `,text:`Settings The Settings panel edits the block of . Every field here is also documented in the Configuration Reference. What you can configure - Source locale — the language you author in. - Locales — the languages you maintain (add / remove). See Keys and Locales. - Outputs — the export targets: adapter + path template per entry. See Output Formats. - AI — provider, model, endpoint, region, and batch size. See AI Providers. - Formatting — indent, sort keys, final newline (controls how is written). - Custom dictionary — words the spelling check should accept. Save behaviour Most edits across the UI save immediately to . In Settings, some changes are explicit: ⚠ Dictionary changes require an explicit save — edits to the custom spelling dictionary are staged and only written when you Save , so you can add several words without a write (and a git diff) per keystroke. Related - Configuration Reference · Output Formats · AI Providers · Checks and Validation`},{id:`web-ui/web-ui-overview`,title:`Web UI Overview`,section:`Web UI`,html:`<h1>Web UI Overview</h1>
301
+ <p><code>glotfile serve</code> (or just <code>glotfile</code>) opens a single-page app for managing your catalog. It runs locally, bound to <code>127.0.0.1</code>, and writes changes straight back to <code>glotfile.json</code>.</p>
302
+ <h2>The panels</h2>
303
+ <p>A nav rail switches between six panels:</p>
304
+ <table>
305
+ <thead>
306
+ <tr>
307
+ <th>Panel</th>
308
+ <th>What it&#39;s for</th>
309
+ </tr>
310
+ </thead>
311
+ <tbody><tr>
312
+ <td>Editor</td>
313
+ <td>The heart of the app — a searchable, filterable table of every key with the source and each translation side by side.</td>
314
+ </tr>
315
+ <tr>
316
+ <td>Analytics</td>
317
+ <td>Coverage and review progress per locale, namespace, and tag.</td>
318
+ </tr>
319
+ <tr>
320
+ <td>Screenshots</td>
321
+ <td>Attach and review images that give the AI visual context.</td>
322
+ </tr>
323
+ <tr>
324
+ <td><strong>Glossary</strong></td>
325
+ <td>Manage do-not-translate and forced terms — see Glossary.</td>
326
+ </tr>
327
+ <tr>
328
+ <td>Settings</td>
329
+ <td>Edit the <code>config</code> block: locales, outputs, AI provider, formatting, dictionary.</td>
330
+ </tr>
331
+ <tr>
332
+ <td>AI Log</td>
333
+ <td>A record of recent translation runs (egress only).</td>
334
+ </tr>
335
+ </tbody></table>
336
+ <h2>Cross-cutting features</h2>
337
+ <ul>
338
+ <li><strong>Checks</strong> — the UI continuously surfaces issues (missing values, placeholder mismatches, length and glossary violations) so you can fix them as you go.</li>
339
+ <li><strong>Export preview</strong> — before writing files, preview exactly what <code>glotfile export</code> will produce. See Output Formats.</li>
340
+ <li><strong>Save semantics</strong> — most edits save immediately to <code>glotfile.json</code>. A few settings (notably dictionary changes) require an explicit <strong>Save</strong> — see Settings.</li>
341
+ </ul>
342
+ <h2>Privacy</h2>
343
+ <p>Nothing leaves your machine except the AI calls you choose to make. The UI is local; the AI Log never stores your API keys or screenshot bytes.</p>
344
+ <h2>Related</h2>
345
+ <ul>
346
+ <li>CLI Overview — the same operations without the browser</li>
347
+ <li>Quick Start — a guided first run</li>
348
+ </ul>
349
+ `,text:`Web UI Overview (or just ) opens a single-page app for managing your catalog. It runs locally, bound to , and writes changes straight back to . The panels A nav rail switches between six panels: Panel What it's for --- --- Editor The heart of the app — a searchable, filterable table of every key with the source and each translation side by side. Analytics Coverage and review progress per locale, namespace, and tag. Screenshots Attach and review images that give the AI visual context. Glossary Manage do-not-translate and forced terms — see Glossary. Settings Edit the block: locales, outputs, AI provider, formatting, dictionary. AI Log A record of recent translation runs (egress only). Cross-cutting features - Checks — the UI continuously surfaces issues (missing values, placeholder mismatches, length and glossary violations) so you can fix them as you go. - Export preview — before writing files, preview exactly what will produce. See Output Formats. - Save semantics — most edits save immediately to . A few settings (notably dictionary changes) require an explicit Save — see Settings. Privacy Nothing leaves your machine except the AI calls you choose to make. The UI is local; the AI Log never stores your API keys or screenshot bytes. Related - CLI Overview — the same operations without the browser - Quick Start — a guided first run`},{id:`cli/build-context`,title:"`glotfile build-context`",section:`CLI`,html:`<h1><code>glotfile build-context</code></h1>
350
+ <p>AI-generates a short <strong>context</strong> note for each key — what it&#39;s for, where it appears — by reading the code snippets around its usages. Better context produces better translations. Requires a prior <code>glotfile scan</code> so the usage index exists.</p>
351
+ <pre><code class="language-bash">glotfile scan
352
+ glotfile build-context
353
+ </code></pre>
354
+ <p>By default it only fills keys that have <strong>no</strong> context yet. The flags combine to narrow the run.</p>
355
+ <h2>Options</h2>
356
+ <table>
357
+ <thead>
358
+ <tr>
359
+ <th>Option</th>
360
+ <th>Description</th>
361
+ </tr>
362
+ </thead>
363
+ <tbody><tr>
364
+ <td><code>--all</code></td>
365
+ <td>(Re)build context for every key, not just those missing it.</td>
366
+ </tr>
367
+ <tr>
368
+ <td><code>--key &lt;glob&gt;</code></td>
369
+ <td>Only keys matching this glob (e.g. <code>&quot;auth.*&quot;</code>).</td>
370
+ </tr>
371
+ <tr>
372
+ <td><code>--limit &lt;n&gt;</code></td>
373
+ <td>Process at most <code>n</code> keys.</td>
374
+ </tr>
375
+ <tr>
376
+ <td><code>--since &lt;date&gt;</code></td>
377
+ <td>Only keys added or changed since this date.</td>
378
+ </tr>
379
+ <tr>
380
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
381
+ <td>Target a different state file.</td>
382
+ </tr>
383
+ </tbody></table>
384
+ <p>It uses the same AI provider as <code>translate</code> (configured per-machine — see AI Providers). If no usage index is found it stops and tells you to run <code>scan</code> first.</p>
385
+ <h2>Related</h2>
386
+ <ul>
387
+ <li>scan · translate · Key Context and Metadata · AI Providers</li>
388
+ </ul>
389
+ `,text:`AI-generates a short context note for each key — what it's for, where it appears — by reading the code snippets around its usages. Better context produces better translations. Requires a prior so the usage index exists. By default it only fills keys that have no context yet. The flags combine to narrow the run. Options Option Description --- --- (Re)build context for every key, not just those missing it. Only keys matching this glob (e.g. ). Process at most keys. Only keys added or changed since this date. , Target a different state file. It uses the same AI provider as (configured per-machine — see AI Providers). If no usage index is found it stops and tells you to run first. Related - scan · translate · Key Context and Metadata · AI Providers`},{id:`cli/cli-overview`,title:`CLI Overview`,section:`CLI`,html:`<h1>CLI Overview</h1>
390
+ <p>Run <code>glotfile &lt;command&gt;</code> (or <code>node bin/glotfile.js &lt;command&gt;</code> from a checkout — see Installation).</p>
391
+ <table>
392
+ <thead>
393
+ <tr>
394
+ <th>Command</th>
395
+ <th>What it does</th>
396
+ </tr>
397
+ </thead>
398
+ <tbody><tr>
399
+ <td>serve (default)</td>
400
+ <td>Start the local web UI and open the browser.</td>
401
+ </tr>
402
+ <tr>
403
+ <td>translate</td>
404
+ <td>AI-translate strings, writing results back to <code>glotfile.json</code>.</td>
405
+ </tr>
406
+ <tr>
407
+ <td>export</td>
408
+ <td>Write the locale files for every configured output.</td>
409
+ </tr>
410
+ <tr>
411
+ <td>lint</td>
412
+ <td>Report translation problems (states, placeholders, glossary, spelling…).</td>
413
+ </tr>
414
+ <tr>
415
+ <td>check</td>
416
+ <td>CI gate: lint <strong>and</strong> verify exported files are up to date.</td>
417
+ </tr>
418
+ <tr>
419
+ <td>import</td>
420
+ <td>Create <code>glotfile.json</code> from existing locale files.</td>
421
+ </tr>
422
+ <tr>
423
+ <td>build-context</td>
424
+ <td>AI-generate per-key context to improve translation (needs a prior scan).</td>
425
+ </tr>
426
+ <tr>
427
+ <td>scan</td>
428
+ <td>Index code references to keys (writes <code>.glotfile/usage.json</code>).</td>
429
+ </tr>
430
+ <tr>
431
+ <td>prune</td>
432
+ <td>Remove empty-source or unused keys (dry-run unless <code>--write</code>).</td>
433
+ </tr>
434
+ <tr>
435
+ <td>split</td>
436
+ <td>Convert <code>glotfile.json</code> into a reviewable <code>glotfile/</code> directory.</td>
437
+ </tr>
438
+ <tr>
439
+ <td>skill</td>
440
+ <td>Install the Claude Code skill for managing glotfile.</td>
441
+ </tr>
442
+ </tbody></table>
443
+ <p>Running <code>glotfile</code> with no command is the same as <code>glotfile serve</code>. Run <code>glotfile &lt;command&gt; --help</code> for a command&#39;s options.</p>
444
+ <h2>Global option</h2>
445
+ <p>Every command accepts <code>--file</code> (<code>-f</code>) to target a state file other than <code>./glotfile.json</code>:</p>
446
+ <pre><code class="language-bash">glotfile translate --file packages/app/glotfile.json
447
+ glotfile export -f ./i18n/glotfile.json
448
+ </code></pre>
449
+ <h2>Exit codes</h2>
450
+ <ul>
451
+ <li><code>serve</code>, <code>translate</code>, <code>export</code> exit <code>0</code> on success.</li>
452
+ <li><code>lint</code> exits <code>1</code> when there are errors (or warnings over <code>--max-warnings</code>).</li>
453
+ <li><code>check</code> exits <code>1</code> when there are any errors (including out-of-date exports).</li>
454
+ </ul>
455
+ <p>This is what makes <code>lint</code> and <code>check</code> usable as CI gates — see Continuous Integration.</p>
456
+ <h2>Credentials</h2>
457
+ <p>Only translate needs network access or credentials. Glotfile reads them from the environment, including a local <code>.env</code> file in the project directory. See AI Providers.</p>
458
+ <h2>Related</h2>
459
+ <ul>
460
+ <li>Web UI Overview — the same operations in the browser</li>
461
+ <li>Configuration Reference</li>
462
+ </ul>
463
+ `,text:`CLI Overview Run (or from a checkout — see Installation). Command What it does --- --- serve (default) Start the local web UI and open the browser. translate AI-translate strings, writing results back to . export Write the locale files for every configured output. lint Report translation problems (states, placeholders, glossary, spelling…). check CI gate: lint and verify exported files are up to date. import Create from existing locale files. build-context AI-generate per-key context to improve translation (needs a prior scan). scan Index code references to keys (writes ). prune Remove empty-source or unused keys (dry-run unless ). split Convert into a reviewable directory. skill Install the Claude Code skill for managing glotfile. Running with no command is the same as . Run for a command's options. Global option Every command accepts ( ) to target a state file other than : Exit codes - , , exit on success. - exits when there are errors (or warnings over ). - exits when there are any errors (including out-of-date exports). This is what makes and usable as CI gates — see Continuous Integration. Credentials Only translate needs network access or credentials. Glotfile reads them from the environment, including a local file in the project directory. See AI Providers. Related - Web UI Overview — the same operations in the browser - Configuration Reference`},{id:`cli/export`,title:"`glotfile export`",section:`CLI`,html:`<h1><code>glotfile export</code></h1>
464
+ <p>Writes the locale files for every output configured in <code>config.outputs</code>, using the adapters you&#39;ve set up.</p>
465
+ <pre><code class="language-bash">glotfile export
466
+ </code></pre>
467
+ <pre><code>Exported 8 file(s).
468
+ </code></pre>
469
+ <h2>Options</h2>
470
+ <table>
471
+ <thead>
472
+ <tr>
473
+ <th>Option</th>
474
+ <th>Description</th>
475
+ </tr>
476
+ </thead>
477
+ <tbody><tr>
478
+ <td><code>--adapter &lt;name&gt;</code></td>
479
+ <td>Export only the outputs using this adapter.</td>
480
+ </tr>
481
+ <tr>
482
+ <td><code>--watch</code></td>
483
+ <td>Re-export whenever the state file changes (stays running).</td>
484
+ </tr>
485
+ <tr>
486
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
487
+ <td>Target a different state file.</td>
488
+ </tr>
489
+ </tbody></table>
490
+ <pre><code class="language-bash">glotfile export --adapter laravel-php # just the Laravel files
491
+ glotfile export --watch # re-export on every change
492
+ </code></pre>
493
+ <h2>Warnings</h2>
494
+ <p>Where a conversion would be lossy (a construct a target format can&#39;t represent), export prints a <strong>warning</strong> and writes the best safe output rather than corrupting the file:</p>
495
+ <pre><code>warning [icu-unsupported] cart.items @ de: plural select not representable; wrote fallback
496
+ </code></pre>
497
+ <p>See Placeholders and ICU.</p>
498
+ <h2>Zero-diff guarantee</h2>
499
+ <p>Because <code>glotfile.json</code> is written deterministically, re-running <code>export</code> with no real changes produces a <strong>zero-line diff</strong>. That makes it safe to run in CI to confirm your locale files are up to date:</p>
500
+ <pre><code class="language-bash">glotfile export
501
+ git diff --exit-code # non-zero if exports drifted
502
+ </code></pre>
503
+ <blockquote>
504
+ <p><strong>Tip:</strong> Prefer <code>check</code> in CI — <code>glotfile check</code> re-exports in memory and fails if any output file is missing or stale — no <code>git diff</code> dance required. See Continuous Integration.</p>
505
+ </blockquote>
506
+ <h2>Related</h2>
507
+ <ul>
508
+ <li>Output Formats · Placeholders and ICU · lint and check · Continuous Integration</li>
509
+ </ul>
510
+ `,text:`Writes the locale files for every output configured in , using the adapters you've set up. Options Option Description --- --- Export only the outputs using this adapter. Re-export whenever the state file changes (stays running). , Target a different state file. Warnings Where a conversion would be lossy (a construct a target format can't represent), export prints a warning and writes the best safe output rather than corrupting the file: See Placeholders and ICU. Zero-diff guarantee Because is written deterministically, re-running with no real changes produces a zero-line diff . That makes it safe to run in CI to confirm your locale files are up to date: Tip: Prefer in CI — re-exports in memory and fails if any output file is missing or stale — no dance required. See Continuous Integration. Related - Output Formats · Placeholders and ICU · lint and check · Continuous Integration`},{id:`cli/import`,title:"`glotfile import`",section:`CLI`,html:`<h1><code>glotfile import</code></h1>
511
+ <p>The inverse of <code>glotfile export</code>: it reads your <strong>existing</strong> locale files and ingests them <em>into</em> a new <code>glotfile.json</code>, so you can onboard a project that already has translations without re-keying everything by hand.</p>
512
+ <pre><code class="language-bash">glotfile import --format laravel-php --source lang/
513
+ </code></pre>
514
+ <p>Glotfile parses each file with the chosen adapter, flattens the keys, and assembles a catalog. Existing translations land as <code>reviewed</code> (not raw machine output) and the source-locale strings as <code>source</code> — ready for review in the Editor.</p>
515
+ <p>Every export adapter can also be imported: <code>laravel-php</code>, <code>vue-i18n-json</code>, <code>flutter-arb</code>, <code>apple-strings</code>, <code>apple-stringsdict</code>, <code>angular-xliff</code>, <code>gettext-po</code>, <code>i18next-json</code>, and <code>rails-yaml</code>. Run <code>glotfile import</code> with no <code>--format</code> to auto-detect the layout.</p>
516
+ <p>Two auto-detection notes:</p>
517
+ <ul>
518
+ <li><strong>iOS projects with both tables</strong>: a project holding <code>Localizable.strings</code> <em>and</em> <code>Localizable.stringsdict</code> auto-detects as <code>apple-strings</code> (the scalar table). Importing the <code>.stringsdict</code> plurals requires an explicit <code>--format apple-stringsdict</code> — and produces its own catalog, so merging both into one state file is currently a manual step.</li>
519
+ <li><strong>i18next flat files</strong>: only the per-locale-directory layout (<code>public/locales/&lt;lng&gt;/&lt;ns&gt;.json</code>) auto-detects as i18next; flat <code>&lt;lng&gt;.json</code> files are indistinguishable from vue-i18n and need an explicit <code>--format i18next-json</code>.</li>
520
+ </ul>
521
+ <h2>Options</h2>
522
+ <table>
523
+ <thead>
524
+ <tr>
525
+ <th>Option</th>
526
+ <th>Description</th>
527
+ </tr>
528
+ </thead>
529
+ <tbody><tr>
530
+ <td><code>--format &lt;name&gt;</code></td>
531
+ <td>Source layout adapter to read (e.g. <code>laravel-php</code>, <code>flutter-arb</code>). Omit to auto-detect.</td>
532
+ </tr>
533
+ <tr>
534
+ <td><code>--source &lt;dir&gt;</code></td>
535
+ <td>Directory to import from. Defaults to the state file&#39;s directory.</td>
536
+ </tr>
537
+ <tr>
538
+ <td><code>--source-locale &lt;code&gt;</code></td>
539
+ <td>Which locale to treat as the source language.</td>
540
+ </tr>
541
+ <tr>
542
+ <td><code>--locales &lt;list&gt;</code></td>
543
+ <td>Comma-separated locales to import (default: every locale found).</td>
544
+ </tr>
545
+ <tr>
546
+ <td><code>--cldr</code></td>
547
+ <td>Expand CLDR plural forms into glotfile plurals.</td>
548
+ </tr>
549
+ <tr>
550
+ <td><code>--force</code></td>
551
+ <td>Overwrite an existing <code>glotfile.json</code>.</td>
552
+ </tr>
553
+ <tr>
554
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
555
+ <td>Write the catalog to a different state-file path.</td>
556
+ </tr>
557
+ </tbody></table>
558
+ <pre><code class="language-bash">glotfile import --format flutter-arb --source lib/l10n --source-locale en
559
+ glotfile import --format angular-xliff --source src/locale
560
+ </code></pre>
561
+ <h2>Angular XLIFF</h2>
562
+ <p>For <code>angular-xliff</code> the source flow is inverted: <code>ng extract-i18n</code> owns <code>messages.xlf</code> (the source catalog; the locale comes from its <code>source-language</code> attribute), and translations live in <code>messages.&lt;locale&gt;.xlf</code>. Import reads both; the generated output config sets <code>skipSourceLocale</code>, so <code>glotfile export</code> writes only the translation files and never touches <code>messages.xlf</code>. Inline <code>&lt;x/&gt;</code> placeholders become <code>{NAME}</code> tokens with their <code>ctype</code>/<code>equiv-text</code> kept as placeholder metadata, and export reproduces the original elements. Untranslated targets export as the source text marked <code>state=&quot;new&quot;</code>; import ignores <code>state=&quot;new&quot;</code> targets, so an extract → import → translate → export loop never mistakes fallback text for a real translation.</p>
563
+ <h2>Round-trip safety</h2>
564
+ <p>Import records the <code>localeCase</code> and <code>localeMap</code> it inferred from the filenames it found, so a subsequent <code>glotfile export</code> reproduces byte-identical files. Round-trip tests assert <code>import(export(x))</code> fidelity. See Output Formats.</p>
565
+ <h2>Related</h2>
566
+ <ul>
567
+ <li>export · Output Formats · Installation</li>
568
+ </ul>
569
+ `,text:`The inverse of : it reads your existing locale files and ingests them into a new , so you can onboard a project that already has translations without re-keying everything by hand. Glotfile parses each file with the chosen adapter, flattens the keys, and assembles a catalog. Existing translations land as (not raw machine output) and the source-locale strings as — ready for review in the Editor. Every export adapter can also be imported: , , , , , , , , and . Run with no to auto-detect the layout. Two auto-detection notes: - iOS projects with both tables : a project holding and auto-detects as (the scalar table). Importing the plurals requires an explicit — and produces its own catalog, so merging both into one state file is currently a manual step. - i18next flat files : only the per-locale-directory layout ( ) auto-detects as i18next; flat files are indistinguishable from vue-i18n and need an explicit . Options Option Description --- --- Source layout adapter to read (e.g. , ). Omit to auto-detect. Directory to import from. Defaults to the state file's directory. Which locale to treat as the source language. Comma-separated locales to import (default: every locale found). Expand CLDR plural forms into glotfile plurals. Overwrite an existing . , Write the catalog to a different state-file path. Angular XLIFF For the source flow is inverted: owns (the source catalog; the locale comes from its attribute), and translations live in . Import reads both; the generated output config sets , so writes only the translation files and never touches . Inline placeholders become tokens with their / kept as placeholder metadata, and export reproduces the original elements. Untranslated targets export as the source text marked ; import ignores targets, so an extract → import → translate → export loop never mistakes fallback text for a real translation. Round-trip safety Import records the and it inferred from the filenames it found, so a subsequent reproduces byte-identical files. Round-trip tests assert fidelity. See Output Formats. Related - export · Output Formats · Installation`},{id:`cli/lint-and-check`,title:"`glotfile lint` and `glotfile check`",section:`CLI`,html:`<h1><code>glotfile lint</code> and <code>glotfile check</code></h1>
570
+ <p>Two related commands for finding translation problems. Both are designed to run in CI.</p>
571
+ <ul>
572
+ <li><strong><code>lint</code></strong> runs the rule engine against your catalog.</li>
573
+ <li><strong><code>check</code></strong> runs the same rules <strong>and</strong> verifies that your exported locale files are up to date. It&#39;s the all-in-one CI gate.</li>
574
+ </ul>
575
+ <h2><code>glotfile lint</code></h2>
576
+ <pre><code class="language-bash">glotfile lint
577
+ </code></pre>
578
+ <pre><code>auth.signIn.button
579
+ error placeholder-mismatch de placeholders differ from the source
580
+ warn max-length fr length 28 exceeds maxLength 20
581
+
582
+ ✖ 1 error(s), 1 warning(s)
583
+ </code></pre>
584
+ <p>Exits <code>1</code> if there are any <strong>errors</strong>, or if warnings exceed <code>--max-warnings</code>.</p>
585
+ <h3>Options</h3>
586
+ <table>
587
+ <thead>
588
+ <tr>
589
+ <th>Option</th>
590
+ <th>Description</th>
591
+ </tr>
592
+ </thead>
593
+ <tbody><tr>
594
+ <td><code>--format &lt;fmt&gt;</code></td>
595
+ <td>Output format: <code>text</code> (default), <code>json</code>, or <code>sarif</code>.</td>
596
+ </tr>
597
+ <tr>
598
+ <td><code>--rule &lt;list&gt;</code></td>
599
+ <td>Run only these rule ids, comma-separated.</td>
600
+ </tr>
601
+ <tr>
602
+ <td><code>--locale &lt;list&gt;</code></td>
603
+ <td>Restrict to these locales.</td>
604
+ </tr>
605
+ <tr>
606
+ <td><code>--max-warnings &lt;n&gt;</code></td>
607
+ <td>Exit <code>1</code> if warnings exceed <code>n</code> (errors always fail).</td>
608
+ </tr>
609
+ <tr>
610
+ <td><code>--include-suppressed</code></td>
611
+ <td>Also print findings hidden by suppressions, marked <code>(suppressed)</code>.</td>
612
+ </tr>
613
+ <tr>
614
+ <td><code>--accept</code></td>
615
+ <td>Suppress every current <strong>warning</strong> (narrow with <code>--rule</code>/<code>--locale</code>) and write the state file.</td>
616
+ </tr>
617
+ <tr>
618
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
619
+ <td>Target a different state file.</td>
620
+ </tr>
621
+ </tbody></table>
622
+ <pre><code class="language-bash">glotfile lint --rule placeholder-mismatch,icu-mismatch
623
+ glotfile lint --max-warnings 0 # treat all warnings as failures
624
+ glotfile lint --format sarif &gt; glotfile.sarif
625
+ </code></pre>
626
+ <h3>Suppressions and <code>--accept</code></h3>
627
+ <p>A finding dismissed in the UI (or accepted here) is suppressed for that key + locale <strong>until the key&#39;s source text changes</strong>, then it resurfaces automatically. Adopting glotfile on a project with a noisy backlog:</p>
628
+ <pre><code class="language-bash">glotfile lint --accept --rule identical-to-source # accept the current ones
629
+ glotfile lint --include-suppressed # audit what&#39;s hidden
630
+ </code></pre>
631
+ <p><code>--accept</code> never suppresses errors, and suppressions are committed with the state file so the whole team (and CI) agrees.</p>
632
+ <blockquote>
633
+ <p><strong>Info:</strong> SARIF for code scanning — <code>--format sarif</code> emits SARIF 2.1.0 with each finding located at its line in <code>glotfile.json</code>. Upload it to GitHub code scanning to see findings inline on the PR. See Continuous Integration.</p>
634
+ </blockquote>
635
+ <h2><code>glotfile check</code></h2>
636
+ <pre><code class="language-bash">glotfile check
637
+ </code></pre>
638
+ <p><code>check</code> does everything <code>lint</code> does, <strong>plus</strong> re-exports every output in memory and compares it to what&#39;s on disk. A missing or out-of-date file is reported as an <code>output-stale</code> <strong>error</strong>:</p>
639
+ <pre><code>lib/l10n/app_fr.arb
640
+ error output-stale output file is out of date; run \`glotfile export\`
641
+ </code></pre>
642
+ <p>It exits <code>1</code> on any error (a lint error <em>or</em> a stale export), and accepts <code>--format</code> like <code>lint</code>. If <code>glotfile.json</code> itself can&#39;t be parsed, <code>check</code> reports a single <code>load-error</code> and exits <code>1</code>.</p>
643
+ <blockquote>
644
+ <p><strong>Tip:</strong> Use <code>check</code> as your one CI step — it catches both &quot;the catalog has problems&quot; and &quot;someone forgot to run <code>glotfile export</code>&quot; in a single command.</p>
645
+ </blockquote>
646
+ <h2>Configuring rules</h2>
647
+ <p>Rule severities, ignored keys, and dictionaries are set in <code>config.lint</code>. See Checks and Validation and Configuration Reference.</p>
648
+ <h2>Related</h2>
649
+ <ul>
650
+ <li>Checks and Validation · Continuous Integration · export · Configuration Reference</li>
651
+ </ul>
652
+ `,text:`and Two related commands for finding translation problems. Both are designed to run in CI. - runs the rule engine against your catalog. - runs the same rules and verifies that your exported locale files are up to date. It's the all-in-one CI gate. Exits if there are any errors , or if warnings exceed . Options Option Description --- --- Output format: (default), , or . Run only these rule ids, comma-separated. Restrict to these locales. Exit if warnings exceed (errors always fail). Also print findings hidden by suppressions, marked . Suppress every current warning (narrow with / ) and write the state file. , Target a different state file. Suppressions and A finding dismissed in the UI (or accepted here) is suppressed for that key + locale until the key's source text changes , then it resurfaces automatically. Adopting glotfile on a project with a noisy backlog: never suppresses errors, and suppressions are committed with the state file so the whole team (and CI) agrees. Info: SARIF for code scanning — emits SARIF 2.1.0 with each finding located at its line in . Upload it to GitHub code scanning to see findings inline on the PR. See Continuous Integration. does everything does, plus re-exports every output in memory and compares it to what's on disk. A missing or out-of-date file is reported as an error : It exits on any error (a lint error or a stale export), and accepts like . If itself can't be parsed, reports a single and exits . Tip: Use as your one CI step — it catches both "the catalog has problems" and "someone forgot to run " in a single command. Configuring rules Rule severities, ignored keys, and dictionaries are set in . See Checks and Validation and Configuration Reference. Related - Checks and Validation · Continuous Integration · export · Configuration Reference`},{id:`cli/prune`,title:"`glotfile prune`",section:`CLI`,html:`<h1><code>glotfile prune</code></h1>
653
+ <p>Removes keys you no longer need. It&#39;s a <strong>dry-run by default</strong> — it lists what it would remove and changes nothing until you pass <code>--write</code>.</p>
654
+ <pre><code class="language-bash">glotfile prune --unused # list keys with no code reference
655
+ glotfile prune --unused --write # actually remove them
656
+ </code></pre>
657
+ <h2>Options</h2>
658
+ <table>
659
+ <thead>
660
+ <tr>
661
+ <th>Option</th>
662
+ <th>Description</th>
663
+ </tr>
664
+ </thead>
665
+ <tbody><tr>
666
+ <td><code>--empty-source</code></td>
667
+ <td>Select keys whose source value is empty.</td>
668
+ </tr>
669
+ <tr>
670
+ <td><code>--unused</code></td>
671
+ <td>Select keys with no code reference (runs a scan first).</td>
672
+ </tr>
673
+ <tr>
674
+ <td><code>--write</code></td>
675
+ <td>Remove the selected keys. Without it, prune only lists them.</td>
676
+ </tr>
677
+ <tr>
678
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
679
+ <td>Target a different state file.</td>
680
+ </tr>
681
+ </tbody></table>
682
+ <p>Pick exactly one of <code>--empty-source</code> or <code>--unused</code>. The <code>--unused</code> selector runs a fresh scan, so its accuracy depends on your <code>config.scan</code> settings — review the dry-run list before writing.</p>
683
+ <p>Keys matching a <code>config.scan.keep</code> glob are never selected by <code>--unused</code> — use it for keys consumed by code the scan can&#39;t see (framework internals, vendored packages). See Scan.</p>
684
+ <h2>Related</h2>
685
+ <ul>
686
+ <li>scan · Keys and Locales · Configuration Reference</li>
687
+ </ul>
688
+ `,text:`Removes keys you no longer need. It's a dry-run by default — it lists what it would remove and changes nothing until you pass . Options Option Description --- --- Select keys whose source value is empty. Select keys with no code reference (runs a scan first). Remove the selected keys. Without it, prune only lists them. , Target a different state file. Pick exactly one of or . The selector runs a fresh scan, so its accuracy depends on your settings — review the dry-run list before writing. Keys matching a glob are never selected by — use it for keys consumed by code the scan can't see (framework internals, vendored packages). See Scan. Related - scan · Keys and Locales · Configuration Reference`},{id:`cli/scan`,title:"`glotfile scan`",section:`CLI`,html:`<h1><code>glotfile scan</code></h1>
689
+ <p>Scans your codebase for places each translation key is used, and writes the result to <code>.glotfile/usage.json</code> (gitignored). This usage index powers the <strong>unused-keys</strong> pruning, the per-key context builder, and the usage tree in the web UI.</p>
690
+ <pre><code class="language-bash">glotfile scan
691
+ </code></pre>
692
+ <pre><code>Scanned 214 file(s), found 1,038 reference(s).
693
+ </code></pre>
694
+ <h2>What it scans</h2>
695
+ <p>The scan walks the project and matches key references. Tune it with the <code>config.scan</code> block — <code>include</code>/<code>exclude</code> globs, extra Flutter accessor names, and custom capture-group regexes. See Configuration Reference.</p>
696
+ <h2>Dynamically-built keys</h2>
697
+ <p>Keys don&#39;t have to sit inside a <code>t()</code>/<code>__()</code> call to be found. Two extra signals count as (lower-confidence) usage:</p>
698
+ <ul>
699
+ <li><strong>Dynamic prefixes</strong> — <code>__(&#39;errors.&#39; . $code)</code> marks every key under <code>errors.</code> as used.</li>
700
+ <li><strong>String literals</strong> — a key-shaped string anywhere in a scanned file matches the catalog even outside a call site: assigned in a ternary (<code>$key = $a ? &#39;sms/arrival.delivery&#39; : &#39;sms/arrival.message&#39;</code>), stored in an array, interpolated (<code>&quot;emails/export.subjects.{$type}&quot;</code> marks everything under <code>emails/export.subjects.</code>), or sprintf-built (<code>&#39;messages.%s.title&#39;</code> — <code>%s</code>/<code>%d</code> match one key segment). A literal also acts as a prefix at a segment boundary, covering <code>__($head . &#39;.title&#39;)</code> where <code>$head</code> holds the literal.</li>
701
+ </ul>
702
+ <p>These show in the key&#39;s usage panel as &quot;Possible usage&quot;, distinct from direct call-site references.</p>
703
+ <h2>Keys used by code the scan can&#39;t see</h2>
704
+ <p>Dependency directories (<code>vendor</code>, <code>node_modules</code>, …) are never scanned, so a key whose only call site lives in a package — or one consumed by the framework itself, like Laravel&#39;s <code>auth.throttle</code> or <code>validation.*</code> — would be reported as unused. List those keys (globs allowed) in <code>config.scan.keep</code> and they&#39;re always treated as used:</p>
705
+ <pre><code class="language-json">&quot;scan&quot;: { &quot;keep&quot;: [&quot;auth.throttle&quot;, &quot;validation.*&quot;, &quot;passwords.*&quot;, &quot;pagination.*&quot;] }
706
+ </code></pre>
707
+ <h2>Related</h2>
708
+ <ul>
709
+ <li>prune · build-context · Key Context and Metadata · Configuration Reference</li>
710
+ </ul>
711
+ `,text:`Scans your codebase for places each translation key is used, and writes the result to (gitignored). This usage index powers the unused-keys pruning, the per-key context builder, and the usage tree in the web UI. What it scans The scan walks the project and matches key references. Tune it with the block — / globs, extra Flutter accessor names, and custom capture-group regexes. See Configuration Reference. Dynamically-built keys Keys don't have to sit inside a / call to be found. Two extra signals count as (lower-confidence) usage: - Dynamic prefixes — marks every key under as used. - String literals — a key-shaped string anywhere in a scanned file matches the catalog even outside a call site: assigned in a ternary ( ), stored in an array, interpolated ( marks everything under ), or sprintf-built ( — / match one key segment). A literal also acts as a prefix at a segment boundary, covering where holds the literal. These show in the key's usage panel as "Possible usage", distinct from direct call-site references. Keys used by code the scan can't see Dependency directories ( , , …) are never scanned, so a key whose only call site lives in a package — or one consumed by the framework itself, like Laravel's or — would be reported as unused. List those keys (globs allowed) in and they're always treated as used: Related - prune · build-context · Key Context and Metadata · Configuration Reference`},{id:`cli/serve`,title:"`glotfile serve`",section:`CLI`,html:`<h1><code>glotfile serve</code></h1>
712
+ <p>Starts the local web UI and opens your browser. This is the <strong>default command</strong> — <code>glotfile</code> on its own does the same thing.</p>
713
+ <pre><code class="language-bash">glotfile
714
+ glotfile serve
715
+ </code></pre>
716
+ <p>It binds a server to <code>127.0.0.1</code>, prints the URL, and opens it. If there&#39;s no <code>glotfile.json</code> in the current directory, it starts from defaults and writes the file on your first edit.</p>
717
+ <h2>Options</h2>
718
+ <table>
719
+ <thead>
720
+ <tr>
721
+ <th>Option</th>
722
+ <th>Description</th>
723
+ </tr>
724
+ </thead>
725
+ <tbody><tr>
726
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
727
+ <td>Use a state file other than <code>./glotfile.json</code>.</td>
728
+ </tr>
729
+ <tr>
730
+ <td><code>--dev</code></td>
731
+ <td>Developer mode for working on Glotfile itself (used by <code>npm run dev</code>).</td>
732
+ </tr>
733
+ </tbody></table>
734
+ <pre><code class="language-bash">glotfile serve --file packages/app/glotfile.json
735
+ </code></pre>
736
+ <blockquote>
737
+ <p><strong>Note:</strong> Local only — the server binds to <code>127.0.0.1</code> — it is not exposed to your network. Everything stays on your machine except the AI calls you trigger.</p>
738
+ </blockquote>
739
+ <h2>Related</h2>
740
+ <ul>
741
+ <li>Quick Start · Web UI Overview · Installation</li>
742
+ </ul>
743
+ `,text:`Starts the local web UI and opens your browser. This is the default command — on its own does the same thing. It binds a server to , prints the URL, and opens it. If there's no in the current directory, it starts from defaults and writes the file on your first edit. Options Option Description --- --- , Use a state file other than . Developer mode for working on Glotfile itself (used by ). Note: Local only — the server binds to — it is not exposed to your network. Everything stays on your machine except the AI calls you trigger. Related - Quick Start · Web UI Overview · Installation`},{id:`cli/skill`,title:"`glotfile skill`",section:`CLI`,html:`<h1><code>glotfile skill</code></h1>
744
+ <p>Installs the <strong>Claude Code skill</strong> for managing glotfile into <code>./.claude/skills/glotfile/</code>, so Claude Code knows how to drive glotfile in your project — translating, exporting, linting, and editing the catalog.</p>
745
+ <pre><code class="language-bash">glotfile skill
746
+ </code></pre>
747
+ <h2>Options</h2>
748
+ <table>
749
+ <thead>
750
+ <tr>
751
+ <th>Option</th>
752
+ <th>Description</th>
753
+ </tr>
754
+ </thead>
755
+ <tbody><tr>
756
+ <td><code>--print</code></td>
757
+ <td>Write <code>SKILL.md</code> to stdout instead of installing it.</td>
758
+ </tr>
759
+ <tr>
760
+ <td><code>--force</code></td>
761
+ <td>Overwrite an existing installed skill.</td>
762
+ </tr>
763
+ </tbody></table>
764
+ <p>Run it once per project. With the skill installed, you can ask Claude Code to manage translations directly and it will use the glotfile CLI for you.</p>
765
+ <h2>Related</h2>
766
+ <ul>
767
+ <li>CLI Overview · translate</li>
768
+ </ul>
769
+ `,text:`Installs the Claude Code skill for managing glotfile into , so Claude Code knows how to drive glotfile in your project — translating, exporting, linting, and editing the catalog. Options Option Description --- --- Write to stdout instead of installing it. Overwrite an existing installed skill. Run it once per project. With the skill installed, you can ask Claude Code to manage translations directly and it will use the glotfile CLI for you. Related - CLI Overview · translate`},{id:`cli/split`,title:"`glotfile split`",section:`CLI`,html:`<h1><code>glotfile split</code></h1>
770
+ <p>Converts a single <code>glotfile.json</code> into a <code>glotfile/</code> <strong>directory</strong> of smaller files — one per locale plus shared config and key metadata. For large catalogs this keeps <code>git diff</code> fast and reviewable: an AI run on French rewrites only <code>glotfile/locales/fr.json</code>.</p>
771
+ <pre><code class="language-bash">glotfile split
772
+ </code></pre>
773
+ <p>This is a one-time, deliberate operation that produces a clearly-labelled commit and sets <code>config.storage</code> to <code>&quot;split&quot;</code>. After splitting, the CLI, web UI, and every export adapter behave identically — only the on-disk layout changes. Load auto-detects the format, so nothing else needs configuring.</p>
774
+ <p>See The State File for the full directory layout and the trade-offs.</p>
775
+ <h2>Related</h2>
776
+ <ul>
777
+ <li>The State File · Configuration Reference</li>
778
+ </ul>
779
+ `,text:`Converts a single into a directory of smaller files — one per locale plus shared config and key metadata. For large catalogs this keeps fast and reviewable: an AI run on French rewrites only . This is a one-time, deliberate operation that produces a clearly-labelled commit and sets to . After splitting, the CLI, web UI, and every export adapter behave identically — only the on-disk layout changes. Load auto-detects the format, so nothing else needs configuring. See The State File for the full directory layout and the trade-offs. Related - The State File · Configuration Reference`},{id:`cli/translate`,title:"`glotfile translate`",section:`CLI`,html:`<h1><code>glotfile translate</code></h1>
780
+ <p>AI-translates strings and writes the results back to <code>glotfile.json</code> as <code>machine</code> state. It never overwrites a <code>reviewed</code> value.</p>
781
+ <pre><code class="language-bash">glotfile translate
782
+ </code></pre>
783
+ <p>With no flags, only <strong>empty</strong> values are filled — existing translations are left alone. Pass <code>--all</code> to re-translate every string. The flags below <strong>combine</strong> to narrow the run.</p>
784
+ <h2>Options</h2>
785
+ <table>
786
+ <thead>
787
+ <tr>
788
+ <th>Option</th>
789
+ <th>Description</th>
790
+ </tr>
791
+ </thead>
792
+ <tbody><tr>
793
+ <td><code>--all</code></td>
794
+ <td>Re-translate every string, not just empty values (still never overwrites <code>reviewed</code>).</td>
795
+ </tr>
796
+ <tr>
797
+ <td><code>--estimate</code></td>
798
+ <td>Print the batches, token counts and estimated cost without translating.</td>
799
+ </tr>
800
+ <tr>
801
+ <td><code>--locale &lt;list&gt;</code></td>
802
+ <td>Only these target languages, comma-separated (e.g. <code>fr,de</code>). Alias: <code>--locales</code>.</td>
803
+ </tr>
804
+ <tr>
805
+ <td><code>--key &lt;glob&gt;</code></td>
806
+ <td>Only keys matching a glob (e.g. <code>&quot;auth.*&quot;</code>).</td>
807
+ </tr>
808
+ <tr>
809
+ <td><code>--file</code>, <code>-f &lt;path&gt;</code></td>
810
+ <td>Target a different state file.</td>
811
+ </tr>
812
+ </tbody></table>
813
+ <pre><code class="language-bash">glotfile translate # fill the gaps (only empty values)
814
+ glotfile translate --all # redo every non-reviewed value
815
+ glotfile translate --locale fr,de # only French and German
816
+ glotfile translate --key &quot;auth.*&quot; # only the auth namespace
817
+ glotfile translate --all --locale fr --key &quot;checkout.*&quot;
818
+ glotfile translate --estimate # batches, tokens and cost — no API calls
819
+ </code></pre>
820
+ <h2>What it prints</h2>
821
+ <pre><code>Translating 34 string(s)…
822
+ Wrote 34 machine translation(s).
823
+ </code></pre>
824
+ <p>Rejected translations (a dropped placeholder, a busted length limit) are reported and <strong>skipped</strong>, not written:</p>
825
+ <pre><code>skip checkout.total @ de: placeholder {amount} is missing
826
+ </code></pre>
827
+ <p>See How Translation Works for the validation rules and Placeholders and ICU for what&#39;s checked.</p>
828
+ <h2>Credentials</h2>
829
+ <p><code>translate</code> is the only command that needs network access. Configure the provider in Settings (stored per-machine), and put credentials in your environment (a local <code>.env</code> works). See AI Providers.</p>
830
+ <blockquote>
831
+ <p><strong>Info:</strong> Egress is logged — what&#39;s sent to the provider is recorded in the AI Log.</p>
832
+ </blockquote>
833
+ <h2>Related</h2>
834
+ <ul>
835
+ <li>How Translation Works · AI Providers · Review States</li>
836
+ </ul>
837
+ `,text:`AI-translates strings and writes the results back to as state. It never overwrites a value. With no flags, only empty values are filled — existing translations are left alone. Pass to re-translate every string. The flags below combine to narrow the run. Options Option Description --- --- Re-translate every string, not just empty values (still never overwrites ). Print the batches, token counts and estimated cost without translating. Only these target languages, comma-separated (e.g. ). Alias: . Only keys matching a glob (e.g. ). , Target a different state file. What it prints Rejected translations (a dropped placeholder, a busted length limit) are reported and skipped , not written: See How Translation Works for the validation rules and Placeholders and ICU for what's checked. Credentials is the only command that needs network access. Configure the provider in Settings (stored per-machine), and put credentials in your environment (a local works). See AI Providers. Info: Egress is logged — what's sent to the provider is recorded in the AI Log. Related - How Translation Works · AI Providers · Review States`},{id:`concepts/glossary`,title:`Glossary`,section:`Concepts`,html:`<h1>Glossary</h1>
838
+ <p>The <strong>glossary</strong> is a list of terms that get special handling during AI translation and validation. It&#39;s stored at the top level of <code>glotfile.json</code> and edited in the Glossary panel.</p>
839
+ <p>Use it for two things:</p>
840
+ <ol>
841
+ <li><strong>Do-not-translate terms</strong> — brand names, product names, code identifiers that must appear verbatim in every language.</li>
842
+ <li><strong>Forced translations</strong> — a term that must always render a specific way in a given locale.</li>
843
+ </ol>
844
+ <h2>Entry shape</h2>
845
+ <pre><code class="language-json">&quot;glossary&quot;: [
846
+ { &quot;term&quot;: &quot;Glotfile&quot;, &quot;doNotTranslate&quot;: true, &quot;caseSensitive&quot;: true },
847
+ {
848
+ &quot;term&quot;: &quot;dashboard&quot;,
849
+ &quot;translations&quot;: { &quot;fr&quot;: &quot;tableau de bord&quot;, &quot;de&quot;: &quot;Übersicht&quot; },
850
+ &quot;notes&quot;: &quot;Always use the product term, not a literal translation.&quot;
851
+ }
852
+ ]
853
+ </code></pre>
854
+ <table>
855
+ <thead>
856
+ <tr>
857
+ <th>Field</th>
858
+ <th>Meaning</th>
859
+ </tr>
860
+ </thead>
861
+ <tbody><tr>
862
+ <td><code>term</code></td>
863
+ <td>The source-language term to match.</td>
864
+ </tr>
865
+ <tr>
866
+ <td><code>doNotTranslate</code></td>
867
+ <td>Keep the term verbatim in every translation.</td>
868
+ </tr>
869
+ <tr>
870
+ <td><code>caseSensitive</code></td>
871
+ <td>Match the term case-sensitively.</td>
872
+ </tr>
873
+ <tr>
874
+ <td><code>translations</code></td>
875
+ <td>Forced output per locale (<code>{ locale: &quot;translation&quot; }</code>).</td>
876
+ </tr>
877
+ <tr>
878
+ <td><code>notes</code></td>
879
+ <td>Freeform guidance (also passed to the AI).</td>
880
+ </tr>
881
+ </tbody></table>
882
+ <h2>How it&#39;s used</h2>
883
+ <ul>
884
+ <li><strong>During translation:</strong> relevant glossary terms for each string are injected into every AI request, so the model knows what to keep verbatim and what to render a fixed way. See How Translation Works.</li>
885
+ <li><strong>During validation:</strong> the <code>glossary-violation</code> rule flags any translation that drops a do-not-translate term or doesn&#39;t use the forced translation. See Checks and Validation.</li>
886
+ </ul>
887
+ <blockquote>
888
+ <p><strong>Tip:</strong> Only relevant terms are sent — Glotfile matches glossary terms against each source string and includes just the ones that appear — the AI isn&#39;t handed your entire glossary for every key.</p>
889
+ </blockquote>
890
+ <h2>Related</h2>
891
+ <ul>
892
+ <li>How Translation Works · Checks and Validation · Key Context and Metadata</li>
893
+ </ul>
894
+ `,text:`Glossary The glossary is a list of terms that get special handling during AI translation and validation. It's stored at the top level of and edited in the Glossary panel. Use it for two things: 1. Do-not-translate terms — brand names, product names, code identifiers that must appear verbatim in every language. 2. Forced translations — a term that must always render a specific way in a given locale. Entry shape Field Meaning --- --- The source-language term to match. Keep the term verbatim in every translation. Match the term case-sensitively. Forced output per locale ( ). Freeform guidance (also passed to the AI). How it's used - During translation: relevant glossary terms for each string are injected into every AI request, so the model knows what to keep verbatim and what to render a fixed way. See How Translation Works. - During validation: the rule flags any translation that drops a do-not-translate term or doesn't use the forced translation. See Checks and Validation. Tip: Only relevant terms are sent — Glotfile matches glossary terms against each source string and includes just the ones that appear — the AI isn't handed your entire glossary for every key. Related - How Translation Works · Checks and Validation · Key Context and Metadata`},{id:`concepts/key-context-and-metadata`,title:`Key Context and Metadata`,section:`Concepts`,html:`<h1>Key Context and Metadata</h1>
895
+ <p>Beyond its values, each key can carry metadata that improves translation quality and helps reviewers. Edit it in the Editor&#39;s per-key detail panel.</p>
896
+ <table>
897
+ <thead>
898
+ <tr>
899
+ <th>Field</th>
900
+ <th>What it&#39;s for</th>
901
+ </tr>
902
+ </thead>
903
+ <tbody><tr>
904
+ <td><strong>Context</strong></td>
905
+ <td>A note for humans <em>and the AI</em> explaining where/how the string is used. The single highest-leverage field for good machine translation.</td>
906
+ </tr>
907
+ <tr>
908
+ <td><strong>Notes</strong></td>
909
+ <td>Timestamped freeform notes — a running comment thread on the key.</td>
910
+ </tr>
911
+ <tr>
912
+ <td><strong>Tags</strong></td>
913
+ <td>Labels for grouping and filtering (e.g. <code>auth</code>, <code>cta</code>, <code>email</code>). Analytics reports coverage per tag.</td>
914
+ </tr>
915
+ <tr>
916
+ <td><strong>Max length</strong></td>
917
+ <td>A character budget. AI translations that exceed it are rejected, and the <code>max-length</code> check flags any value over the limit.</td>
918
+ </tr>
919
+ <tr>
920
+ <td><strong>Screenshot</strong></td>
921
+ <td>An image showing where the string appears. Sent to vision-capable models for context. See Screenshots.</td>
922
+ </tr>
923
+ <tr>
924
+ <td><strong>Skip translate</strong></td>
925
+ <td>Marks a key to be excluded from translation runs (e.g. a code-like token that should never change).</td>
926
+ </tr>
927
+ </tbody></table>
928
+ <h2>Why context matters most</h2>
929
+ <p>Translators — human or AI — can&#39;t see your UI. A bare string like <code>&quot;Open&quot;</code> could be a verb (open a file) or an adjective (the store is open), and they translate differently. A one-line <strong>context</strong> removes the ambiguity:</p>
930
+ <blockquote>
931
+ <p><strong>Example:</strong> Key <code>store.status.open</code> → context: <em>&quot;Adjective. Shown on a badge when the shop is currently accepting orders.&quot;</em></p>
932
+ </blockquote>
933
+ <p>AI translation sends the context, the relevant Glossary terms, any max length, and the screenshot along with each string.</p>
934
+ <h2>A note on <code>description</code></h2>
935
+ <p>The state file also reserves a <code>description</code> field on keys. It is not yet editable in the UI — prefer <strong>context</strong> (which feeds the AI) and <strong>notes</strong> (for human discussion) today.</p>
936
+ <h2>Related</h2>
937
+ <ul>
938
+ <li>Glossary · Screenshots · How Translation Works · Checks and Validation</li>
939
+ </ul>
940
+ `,text:`Key Context and Metadata Beyond its values, each key can carry metadata that improves translation quality and helps reviewers. Edit it in the Editor's per-key detail panel. Field What it's for --- --- Context A note for humans and the AI explaining where/how the string is used. The single highest-leverage field for good machine translation. Notes Timestamped freeform notes — a running comment thread on the key. Tags Labels for grouping and filtering (e.g. , , ). Analytics reports coverage per tag. Max length A character budget. AI translations that exceed it are rejected, and the check flags any value over the limit. Screenshot An image showing where the string appears. Sent to vision-capable models for context. See Screenshots. Skip translate Marks a key to be excluded from translation runs (e.g. a code-like token that should never change). Why context matters most Translators — human or AI — can't see your UI. A bare string like could be a verb (open a file) or an adjective (the store is open), and they translate differently. A one-line context removes the ambiguity: Example: Key → context: "Adjective. Shown on a badge when the shop is currently accepting orders." AI translation sends the context, the relevant Glossary terms, any max length, and the screenshot along with each string. A note on The state file also reserves a field on keys. It is not yet editable in the UI — prefer context (which feeds the AI) and notes (for human discussion) today. Related - Glossary · Screenshots · How Translation Works · Checks and Validation`},{id:`concepts/keys-and-locales`,title:`Keys and Locales`,section:`Concepts`,html:`<h1>Keys and Locales</h1>
941
+ <h2>Keys</h2>
942
+ <p>A <strong>key</strong> is a stable identifier for one piece of copy, written in <strong>dot notation</strong>:</p>
943
+ <pre><code>auth.signIn.button
944
+ auth.signIn.title
945
+ settings.profile.heading
946
+ </code></pre>
947
+ <p>Keys live in a <strong>flat map</strong> in <code>glotfile.json</code> — the dots are just naming convention, not nesting. The first segment usually acts as a <strong>namespace</strong> (a feature, screen, or file group); some export adapters split files by it (Laravel writes <code>auth.*</code> keys into <code>auth.php</code>).</p>
948
+ <p>Each key holds:</p>
949
+ <ul>
950
+ <li>A <strong>value per locale</strong> (or plural forms).</li>
951
+ <li>A review state per locale.</li>
952
+ <li>Optional metadata — context, notes, tags, a max length, a screenshot, and a skip-translation flag.</li>
953
+ </ul>
954
+ <p>Create, rename, and delete keys in the Editor.</p>
955
+ <h2>Locales</h2>
956
+ <p>A <strong>locale</strong> is a language you maintain, identified by a code like <code>en</code>, <code>fr</code>, <code>de</code>, or <code>pt-BR</code>. Two settings define them (Settings panel or config):</p>
957
+ <ul>
958
+ <li><strong><code>sourceLocale</code></strong> — the one language you author in. Its values have the <code>source</code> state and are the basis for every translation.</li>
959
+ <li><strong><code>locales</code></strong> — the full list of languages you maintain, including the source.</li>
960
+ </ul>
961
+ <blockquote>
962
+ <p><strong>⚠ The source locale must be in the list</strong> — <code>sourceLocale</code> must appear in <code>locales</code>, or the file fails validation.</p>
963
+ </blockquote>
964
+ <h3>Adding and removing</h3>
965
+ <p>Manage locales in Settings. Adding a locale gives every key an empty slot for it (which shows up as <strong>missing</strong> until filled). Languages are shown with their flag and name in the UI.</p>
966
+ <h2>Missing values</h2>
967
+ <p>A locale value is <strong>missing</strong> when it has no content for a key. Missing values are:</p>
968
+ <ul>
969
+ <li>highlighted in the Editor (filter to <strong>missing</strong>),</li>
970
+ <li>counted in Analytics,</li>
971
+ <li>what <code>glotfile translate</code> fills by default (see translate),</li>
972
+ <li>flagged by the <code>empty-translation</code> rule in Checks and Validation.</li>
973
+ </ul>
974
+ <h2>Related</h2>
975
+ <ul>
976
+ <li>Review States · Plurals · Key Context and Metadata · The State File</li>
977
+ </ul>
978
+ `,text:`Keys and Locales Keys A key is a stable identifier for one piece of copy, written in dot notation : Keys live in a flat map in — the dots are just naming convention, not nesting. The first segment usually acts as a namespace (a feature, screen, or file group); some export adapters split files by it (Laravel writes keys into ). Each key holds: - A value per locale (or plural forms). - A review state per locale. - Optional metadata — context, notes, tags, a max length, a screenshot, and a skip-translation flag. Create, rename, and delete keys in the Editor. Locales A locale is a language you maintain, identified by a code like , , , or . Two settings define them (Settings panel or config): - — the one language you author in. Its values have the state and are the basis for every translation. - — the full list of languages you maintain, including the source. ⚠ The source locale must be in the list — must appear in , or the file fails validation. Adding and removing Manage locales in Settings. Adding a locale gives every key an empty slot for it (which shows up as missing until filled). Languages are shown with their flag and name in the UI. Missing values A locale value is missing when it has no content for a key. Missing values are: - highlighted in the Editor (filter to missing ), - counted in Analytics, - what fills by default (see translate), - flagged by the rule in Checks and Validation. Related - Review States · Plurals · Key Context and Metadata · The State File`},{id:`concepts/plurals`,title:`Plurals`,section:`Concepts`,html:`<h1>Plurals</h1>
979
+ <p>Some strings change shape with a count — &quot;1 file&quot; vs &quot;5 files&quot;. Glotfile models these as <strong>plural keys</strong> using the <a href="https://cldr.unicode.org/index/cldr-spec/plural-rules">CLDR plural categories</a>.</p>
980
+ <h2>How a plural key differs</h2>
981
+ <p>A normal key stores one <code>value</code> per locale. A <strong>plural key</strong> instead stores <strong><code>forms</code></strong> — one entry per category — and is marked with a <code>plural</code> field naming the <strong>count argument</strong>:</p>
982
+ <pre><code class="language-json">&quot;cart.items&quot;: {
983
+ &quot;plural&quot;: { &quot;arg&quot;: &quot;count&quot; },
984
+ &quot;values&quot;: {
985
+ &quot;en&quot;: {
986
+ &quot;state&quot;: &quot;source&quot;,
987
+ &quot;forms&quot;: { &quot;one&quot;: &quot;{count} item&quot;, &quot;other&quot;: &quot;{count} items&quot; }
988
+ },
989
+ &quot;pl&quot;: {
990
+ &quot;state&quot;: &quot;reviewed&quot;,
991
+ &quot;forms&quot;: {
992
+ &quot;one&quot;: &quot;{count} przedmiot&quot;,
993
+ &quot;few&quot;: &quot;{count} przedmioty&quot;,
994
+ &quot;many&quot;: &quot;{count} przedmiotów&quot;,
995
+ &quot;other&quot;: &quot;{count} przedmiotu&quot;
996
+ }
997
+ }
998
+ }
999
+ }
1000
+ </code></pre>
1001
+ <h2>Plural categories</h2>
1002
+ <p>The six CLDR categories are:</p>
1003
+ <p><code>zero</code> · <code>one</code> · <code>two</code> · <code>few</code> · <code>many</code> · <code>other</code></p>
1004
+ <blockquote>
1005
+ <p><strong>⚠ <code>other</code> is always required</strong> — every locale&#39;s plural value <strong>must</strong> include the <code>other</code> form — it&#39;s the fallback every language has. Which of the other categories apply depends on the language (English uses <code>one</code>/<code>other</code>; Polish uses <code>one</code>/<code>few</code>/<code>many</code>/<code>other</code>).</p>
1006
+ </blockquote>
1007
+ <h2>Editing plurals</h2>
1008
+ <p>In the Editor, a plural key shows a dedicated form editor with one field per category that the target language actually uses. AI translation fills every required category at once and validates the result.</p>
1009
+ <h2>Across export formats</h2>
1010
+ <p>Plural and ICU <code>select</code>/<code>plural</code> structure is preserved when exporting, and converted to each format&#39;s native plural mechanism where one exists. Where a target format can&#39;t represent a construct, <code>glotfile export</code> warns rather than producing broken output. See Output Formats and Placeholders and ICU.</p>
1011
+ <h2>Related</h2>
1012
+ <ul>
1013
+ <li>Placeholders and ICU · How Translation Works · Keys and Locales</li>
1014
+ </ul>
1015
+ `,text:`Plurals Some strings change shape with a count — "1 file" vs "5 files". Glotfile models these as plural keys using the CLDR plural categories. How a plural key differs A normal key stores one per locale. A plural key instead stores — one entry per category — and is marked with a field naming the count argument : Plural categories The six CLDR categories are: · · · · · ⚠ is always required — every locale's plural value must include the form — it's the fallback every language has. Which of the other categories apply depends on the language (English uses / ; Polish uses / / / ). Editing plurals In the Editor, a plural key shows a dedicated form editor with one field per category that the target language actually uses. AI translation fills every required category at once and validates the result. Across export formats Plural and ICU / structure is preserved when exporting, and converted to each format's native plural mechanism where one exists. Where a target format can't represent a construct, warns rather than producing broken output. See Output Formats and Placeholders and ICU. Related - Placeholders and ICU · How Translation Works · Keys and Locales`},{id:`concepts/review-states`,title:`Review States`,section:`Concepts`,html:`<h1>Review States</h1>
1016
+ <p>Every locale value carries a <strong>state</strong> that tracks where the translation is in its lifecycle. State is per <em>value</em>, not per key — <code>fr</code> can be <code>reviewed</code> while <code>de</code> is still <code>machine</code>.</p>
1017
+ <table>
1018
+ <thead>
1019
+ <tr>
1020
+ <th>State</th>
1021
+ <th>Meaning</th>
1022
+ </tr>
1023
+ </thead>
1024
+ <tbody><tr>
1025
+ <td><code>source</code></td>
1026
+ <td>The value in your source locale. It&#39;s what everything else is translated <em>from</em>.</td>
1027
+ </tr>
1028
+ <tr>
1029
+ <td><code>machine</code></td>
1030
+ <td>Produced by AI translation and <strong>not yet reviewed by a human</strong>.</td>
1031
+ </tr>
1032
+ <tr>
1033
+ <td><code>reviewed</code></td>
1034
+ <td>A human has checked and approved it. <strong>AI translation never overwrites a <code>reviewed</code> value.</strong></td>
1035
+ </tr>
1036
+ <tr>
1037
+ <td><code>needs-review</code></td>
1038
+ <td>Flagged for attention — typically because the source string changed after this translation was made (see Keeping Translations Fresh).</td>
1039
+ </tr>
1040
+ </tbody></table>
1041
+ <h2>The typical flow</h2>
1042
+ <pre><code>source ──translate──▶ machine ──approve──▶ reviewed
1043
+ ▲ │
1044
+ └── source changed ───┘
1045
+ (needs-review)
1046
+ </code></pre>
1047
+ <ol>
1048
+ <li>You author a string in the source locale → <code>source</code>.</li>
1049
+ <li>AI fills the other languages → <code>machine</code>.</li>
1050
+ <li>You review in the Editor and promote good ones → <code>reviewed</code>.</li>
1051
+ <li>If the source later changes, dependent translations are marked <code>needs-review</code> so they don&#39;t silently drift. See Keeping Translations Fresh.</li>
1052
+ </ol>
1053
+ <h2>Why <code>reviewed</code> is protected</h2>
1054
+ <p>Marking a value <code>reviewed</code> is a promise: a human owns this translation. Glotfile honours that promise — neither <code>glotfile translate</code> nor the UI&#39;s translate action will overwrite it. To re-translate a reviewed value, change it back first.</p>
1055
+ <h2>Filtering by state</h2>
1056
+ <p>In the Editor, filter by <strong>missing</strong>, <strong>machine</strong> (unreviewed), <strong>needs-review</strong>, or <strong>reviewed</strong>, plus a <strong>needs-attention</strong> facet for any key with an open issue. Analytics reports translated vs reviewed percentages per locale.</p>
1057
+ <h2>Related</h2>
1058
+ <ul>
1059
+ <li>How Translation Works · Keeping Translations Fresh</li>
1060
+ </ul>
1061
+ `,text:`Review States Every locale value carries a state that tracks where the translation is in its lifecycle. State is per value , not per key — can be while is still . State Meaning --- --- The value in your source locale. It's what everything else is translated from . Produced by AI translation and not yet reviewed by a human . A human has checked and approved it. AI translation never overwrites a value. Flagged for attention — typically because the source string changed after this translation was made (see Keeping Translations Fresh). The typical flow 1. You author a string in the source locale → . 2. AI fills the other languages → . 3. You review in the Editor and promote good ones → . 4. If the source later changes, dependent translations are marked so they don't silently drift. See Keeping Translations Fresh. Why is protected Marking a value is a promise: a human owns this translation. Glotfile honours that promise — neither nor the UI's translate action will overwrite it. To re-translate a reviewed value, change it back first. Filtering by state In the Editor, filter by missing , machine (unreviewed), needs-review , or reviewed , plus a needs-attention facet for any key with an open issue. Analytics reports translated vs reviewed percentages per locale. Related - How Translation Works · Keeping Translations Fresh`},{id:`concepts/the-state-file`,title:"The State File — `glotfile.json`",section:`Concepts`,html:`<h1>The State File — <code>glotfile.json</code></h1>
1062
+ <p>Everything Glotfile does is derived from one file at the root of your project: <strong><code>glotfile.json</code></strong>. It holds your configuration, your glossary, and every key with its translations. You commit it alongside your code, and versioning, review, and rollback all come from git.</p>
1063
+ <blockquote>
1064
+ <p><strong>Tip:</strong> You normally never edit this file by hand — the web UI writes it for you. The structure below is documented so you can read diffs and understand what&#39;s stored — not so you can hand-edit it.</p>
1065
+ </blockquote>
1066
+ <h2>Anatomy</h2>
1067
+ <p>A fresh file looks like this:</p>
1068
+ <pre><code class="language-json">{
1069
+ &quot;$schema&quot;: &quot;https://glotfile.dev/schema/v1.json&quot;,
1070
+ &quot;version&quot;: 1,
1071
+ &quot;config&quot;: {
1072
+ &quot;sourceLocale&quot;: &quot;en&quot;,
1073
+ &quot;locales&quot;: [&quot;en&quot;],
1074
+ &quot;outputs&quot;: [
1075
+ { &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot; },
1076
+ { &quot;adapter&quot;: &quot;laravel-php&quot;, &quot;path&quot;: &quot;lang/{locale}/{namespace}.php&quot; }
1077
+ ],
1078
+ &quot;format&quot;: { &quot;indent&quot;: 2, &quot;sortKeys&quot;: true, &quot;finalNewline&quot;: true },
1079
+ &quot;spelling&quot;: { &quot;customWords&quot;: [] }
1080
+ },
1081
+ &quot;glossary&quot;: [],
1082
+ &quot;keys&quot;: {}
1083
+ }
1084
+ </code></pre>
1085
+ <table>
1086
+ <thead>
1087
+ <tr>
1088
+ <th>Field</th>
1089
+ <th>Purpose</th>
1090
+ </tr>
1091
+ </thead>
1092
+ <tbody><tr>
1093
+ <td><code>version</code></td>
1094
+ <td>State-file schema version (currently <code>1</code>).</td>
1095
+ </tr>
1096
+ <tr>
1097
+ <td><code>config</code></td>
1098
+ <td>All committed configuration — see Configuration Reference. AI provider settings are <strong>not</strong> here; they live in per-machine local settings (see AI Providers).</td>
1099
+ </tr>
1100
+ <tr>
1101
+ <td><code>glossary</code></td>
1102
+ <td>Do-not-translate terms and forced per-locale translations — see Glossary.</td>
1103
+ </tr>
1104
+ <tr>
1105
+ <td><code>keys</code></td>
1106
+ <td>A flat map of dot-notation keys to their values and metadata — see Keys and Locales.</td>
1107
+ </tr>
1108
+ </tbody></table>
1109
+ <h2>A populated key</h2>
1110
+ <pre><code class="language-json">&quot;keys&quot;: {
1111
+ &quot;auth.signIn.button&quot;: {
1112
+ &quot;context&quot;: &quot;Primary call-to-action on the login screen&quot;,
1113
+ &quot;tags&quot;: [&quot;auth&quot;, &quot;cta&quot;],
1114
+ &quot;maxLength&quot;: 20,
1115
+ &quot;values&quot;: {
1116
+ &quot;en&quot;: { &quot;value&quot;: &quot;Sign in&quot;, &quot;state&quot;: &quot;source&quot; },
1117
+ &quot;fr&quot;: { &quot;value&quot;: &quot;Se connecter&quot;, &quot;state&quot;: &quot;reviewed&quot;, &quot;source&quot;: &quot;Sign in&quot; },
1118
+ &quot;de&quot;: { &quot;value&quot;: &quot;Anmelden&quot;, &quot;state&quot;: &quot;machine&quot;, &quot;source&quot;: &quot;Sign in&quot; }
1119
+ }
1120
+ }
1121
+ }
1122
+ </code></pre>
1123
+ <p>Each locale carries a <code>value</code> (or <code>forms</code> for plural keys), a state, and an optional <code>source</code> recording the source string it was translated from (used to detect stale translations).</p>
1124
+ <h2>Deterministic writes</h2>
1125
+ <p>Glotfile writes the file deterministically — <strong>stable key order, fixed indent, one trailing newline</strong> — so git diffs stay small and reviewable. The <code>config.format</code> block controls this:</p>
1126
+ <ul>
1127
+ <li><code>indent</code> — spaces per level (default <code>2</code>)</li>
1128
+ <li><code>sortKeys</code> — sort keys alphabetically (default <code>true</code>)</li>
1129
+ <li><code>finalNewline</code> — end with a single newline (default <code>true</code>)</li>
1130
+ </ul>
1131
+ <blockquote>
1132
+ <p><strong>Info:</strong> Why this matters — because writes are deterministic, re-running <code>glotfile export</code> with no real changes produces a <strong>zero-line diff</strong>. That&#39;s what makes Glotfile safe to run in CI.</p>
1133
+ </blockquote>
1134
+ <h2>On load</h2>
1135
+ <p>When Glotfile reads the file it validates the structure (see Checks and Validation) and normalises values — for example, trimming surrounding whitespace — so legacy data folds to the same shape the UI produces on save. A malformed file fails loudly with a specific message rather than corrupting silently.</p>
1136
+ <h2>Split storage: the <code>glotfile/</code> directory</h2>
1137
+ <p>For large catalogs, a single <code>glotfile.json</code> can reach several megabytes — making <code>git diff</code> slow, overflowing GitHub&#39;s render limit, and producing noisy conflicts when multiple branches add keys. The <strong>split</strong> layout breaks the catalog into a directory of smaller files, one per locale.</p>
1138
+ <p>Run <code>glotfile split</code> once to convert an existing single file:</p>
1139
+ <pre><code>glotfile/
1140
+ config.json # { $schema, version, config, glossary } — everything except keys
1141
+ keys.json # per-key metadata: tags, notes, context, plurals, screenshots
1142
+ locales/
1143
+ en.json # { &quot;&lt;key&gt;&quot;: { value, state, ... } } for every key present in this locale
1144
+ fr.json
1145
+ ...
1146
+ </code></pre>
1147
+ <ul>
1148
+ <li><strong><code>config.json</code></strong> holds the configuration and glossary — the parts that change rarely.</li>
1149
+ <li><strong><code>keys.json</code></strong> holds per-key metadata (tags, notes, context, plural config, screenshots) but <strong>not</strong> translation values. A tag edit touches only this file.</li>
1150
+ <li><strong><code>locales/&lt;locale&gt;.json</code></strong> holds all translation values for one locale. An AI run on French rewrites only <code>fr.json</code>.</li>
1151
+ </ul>
1152
+ <h3>What controls the layout</h3>
1153
+ <p>A <code>config.storage</code> field in the config selects how the catalog is saved:</p>
1154
+ <table>
1155
+ <thead>
1156
+ <tr>
1157
+ <th>Value</th>
1158
+ <th>Behaviour</th>
1159
+ </tr>
1160
+ </thead>
1161
+ <tbody><tr>
1162
+ <td><code>&quot;single&quot;</code> (or absent)</td>
1163
+ <td>Write a single <code>glotfile.json</code> — the default for new projects.</td>
1164
+ </tr>
1165
+ <tr>
1166
+ <td><code>&quot;split&quot;</code></td>
1167
+ <td>Write the <code>glotfile/</code> directory. Set automatically by <code>glotfile split</code>.</td>
1168
+ </tr>
1169
+ </tbody></table>
1170
+ <p><strong>Load auto-detects:</strong> Glotfile checks for <code>glotfile/config.json</code> first (split), then <code>glotfile.json</code> (single), then starts from defaults. You never need to set this by hand — <code>glotfile split</code> sets it for you.</p>
1171
+ <h3>Promotion is an explicit commit</h3>
1172
+ <p>There is no silent auto-promotion at a size threshold. Running <code>glotfile split</code> is a deliberate, one-time operation that produces a clearly-labelled commit. Once split, the CLI, web UI, and all export adapters work identically to the single-file layout — the in-memory state is unchanged.</p>
1173
+ <h2>Related</h2>
1174
+ <ul>
1175
+ <li>Configuration Reference · Keys and Locales · Review States</li>
1176
+ </ul>
1177
+ `,text:`The State File — Everything Glotfile does is derived from one file at the root of your project: . It holds your configuration, your glossary, and every key with its translations. You commit it alongside your code, and versioning, review, and rollback all come from git. Tip: You normally never edit this file by hand — the web UI writes it for you. The structure below is documented so you can read diffs and understand what's stored — not so you can hand-edit it. Anatomy A fresh file looks like this: Field Purpose --- --- State-file schema version (currently ). All committed configuration — see Configuration Reference. AI provider settings are not here; they live in per-machine local settings (see AI Providers). Do-not-translate terms and forced per-locale translations — see Glossary. A flat map of dot-notation keys to their values and metadata — see Keys and Locales. A populated key Each locale carries a (or for plural keys), a state, and an optional recording the source string it was translated from (used to detect stale translations). Deterministic writes Glotfile writes the file deterministically — stable key order, fixed indent, one trailing newline — so git diffs stay small and reviewable. The block controls this: - — spaces per level (default ) - — sort keys alphabetically (default ) - — end with a single newline (default ) Info: Why this matters — because writes are deterministic, re-running with no real changes produces a zero-line diff . That's what makes Glotfile safe to run in CI. On load When Glotfile reads the file it validates the structure (see Checks and Validation) and normalises values — for example, trimming surrounding whitespace — so legacy data folds to the same shape the UI produces on save. A malformed file fails loudly with a specific message rather than corrupting silently. Split storage: the directory For large catalogs, a single can reach several megabytes — making slow, overflowing GitHub's render limit, and producing noisy conflicts when multiple branches add keys. The split layout breaks the catalog into a directory of smaller files, one per locale. Run once to convert an existing single file: - holds the configuration and glossary — the parts that change rarely. - holds per-key metadata (tags, notes, context, plural config, screenshots) but not translation values. A tag edit touches only this file. - holds all translation values for one locale. An AI run on French rewrites only . What controls the layout A field in the config selects how the catalog is saved: Value Behaviour --- --- (or absent) Write a single — the default for new projects. Write the directory. Set automatically by . Load auto-detects: Glotfile checks for first (split), then (single), then starts from defaults. You never need to set this by hand — sets it for you. Promotion is an explicit commit There is no silent auto-promotion at a size threshold. Running is a deliberate, one-time operation that produces a clearly-labelled commit. Once split, the CLI, web UI, and all export adapters work identically to the single-file layout — the in-memory state is unchanged. Related - Configuration Reference · Keys and Locales · Review States`},{id:`ai-translation/ai-providers`,title:`AI Providers`,section:`AI Translation`,html:`<h1>AI Providers</h1>
1178
+ <p>Glotfile translates via <strong>one provider at a time</strong>, chosen by the <code>ai.provider</code> setting. These AI settings are <strong>per-machine</strong> — they live in <code>.glotfile/settings.json</code> (gitignored), not in the committed <code>glotfile.json</code>, so each developer can use their own provider and model. Edit them in Settings and re-run translate. Credentials are read from the environment, including a local <code>.env</code> file in the project directory.</p>
1179
+ <h2>Supported providers</h2>
1180
+ <table>
1181
+ <thead>
1182
+ <tr>
1183
+ <th>Provider</th>
1184
+ <th><code>provider</code></th>
1185
+ <th>Credentials</th>
1186
+ <th>Region / endpoint</th>
1187
+ <th>SDK</th>
1188
+ </tr>
1189
+ </thead>
1190
+ <tbody><tr>
1191
+ <td><strong>Anthropic</strong> (default)</td>
1192
+ <td><code>anthropic</code></td>
1193
+ <td><code>ANTHROPIC_API_KEY</code></td>
1194
+ <td><code>endpoint</code> (base URL)</td>
1195
+ <td>bundled (<code>@anthropic-ai/sdk</code>)</td>
1196
+ </tr>
1197
+ <tr>
1198
+ <td><strong>OpenAI</strong></td>
1199
+ <td><code>openai</code></td>
1200
+ <td><code>OPENAI_API_KEY</code></td>
1201
+ <td><code>endpoint</code> (base URL; also reaches any OpenAI-compatible gateway)</td>
1202
+ <td>optional — <code>npm i openai</code></td>
1203
+ </tr>
1204
+ <tr>
1205
+ <td><strong>AWS Bedrock</strong></td>
1206
+ <td><code>bedrock</code></td>
1207
+ <td>standard AWS chain: <code>AWS_ACCESS_KEY_ID</code> / <code>AWS_SECRET_ACCESS_KEY</code> (/ <code>AWS_SESSION_TOKEN</code>), or <code>AWS_PROFILE</code>, or an SSO / instance role</td>
1208
+ <td><code>region</code> (falls back to <code>AWS_REGION</code>)</td>
1209
+ <td>optional — <code>npm i @aws-sdk/client-bedrock-runtime</code></td>
1210
+ </tr>
1211
+ <tr>
1212
+ <td><strong>OpenRouter</strong></td>
1213
+ <td><code>openrouter</code></td>
1214
+ <td><code>OPENROUTER_API_KEY</code></td>
1215
+ <td><code>endpoint</code> (base URL; defaults to <code>https://openrouter.ai/api/v1</code>)</td>
1216
+ <td>optional — <code>npm i openai</code> (OpenAI-compatible)</td>
1217
+ </tr>
1218
+ <tr>
1219
+ <td><strong>Ollama</strong> (local)</td>
1220
+ <td><code>ollama</code></td>
1221
+ <td>none for local; <code>OLLAMA_API_KEY</code> only for a secured / remote server</td>
1222
+ <td><code>endpoint</code> (base URL; defaults to <code>http://localhost:11434/v1</code>)</td>
1223
+ <td>optional — <code>npm i openai</code> (OpenAI-compatible)</td>
1224
+ </tr>
1225
+ <tr>
1226
+ <td><strong>Claude Code</strong> (local)</td>
1227
+ <td><code>claude-code</code></td>
1228
+ <td>none — uses your local Claude Code session</td>
1229
+ <td>n/a</td>
1230
+ <td>none — spawns the <code>claude</code> CLI</td>
1231
+ </tr>
1232
+ </tbody></table>
1233
+ <blockquote>
1234
+ <p><strong>Info:</strong> Optional SDKs load on demand — the OpenAI SDK (also used by OpenRouter) and the AWS SDK are optional dependencies, loaded only when their provider is selected — so a default install stays small. If the SDK is missing when you translate, Glotfile tells you exactly what to install.</p>
1235
+ </blockquote>
1236
+ <h2>The <code>ai</code> settings</h2>
1237
+ <p>Stored per-machine in <code>.glotfile/settings.json</code> (gitignored). The default:</p>
1238
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;anthropic&quot;, &quot;model&quot;: &quot;claude-sonnet-4-6&quot;, &quot;endpoint&quot;: null, &quot;region&quot;: null, &quot;batchSize&quot;: 25 }
1239
+ </code></pre>
1240
+ <table>
1241
+ <thead>
1242
+ <tr>
1243
+ <th>Field</th>
1244
+ <th>Meaning</th>
1245
+ </tr>
1246
+ </thead>
1247
+ <tbody><tr>
1248
+ <td><code>provider</code></td>
1249
+ <td><code>anthropic</code>, <code>openai</code>, <code>bedrock</code>, <code>openrouter</code>, <code>ollama</code>, or <code>claude-code</code>.</td>
1250
+ </tr>
1251
+ <tr>
1252
+ <td><code>model</code></td>
1253
+ <td>The model id for the chosen provider.</td>
1254
+ </tr>
1255
+ <tr>
1256
+ <td><code>endpoint</code></td>
1257
+ <td>Base URL override (Anthropic / OpenAI / OpenRouter / Ollama). <code>null</code> for the provider default — OpenRouter defaults to <code>https://openrouter.ai/api/v1</code>, Ollama to <code>http://localhost:11434/v1</code>. An overridden Ollama endpoint must include the <code>/v1</code> suffix.</td>
1258
+ </tr>
1259
+ <tr>
1260
+ <td><code>region</code></td>
1261
+ <td>AWS region (Bedrock). Falls back to <code>AWS_REGION</code>.</td>
1262
+ </tr>
1263
+ <tr>
1264
+ <td><code>batchSize</code></td>
1265
+ <td>Strings per request (default <code>25</code>).</td>
1266
+ </tr>
1267
+ </tbody></table>
1268
+ <h2>Examples</h2>
1269
+ <p><strong>OpenAI:</strong></p>
1270
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;openai&quot;, &quot;model&quot;: &quot;gpt-4o-mini&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1271
+ </code></pre>
1272
+ <p><strong>OpenRouter</strong> (OpenAI-compatible; uses namespaced model ids):</p>
1273
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;openrouter&quot;, &quot;model&quot;: &quot;anthropic/claude-3.5-haiku&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1274
+ </code></pre>
1275
+ <p><strong>Ollama</strong> (local, OpenAI-compatible; no key needed — start Ollama and <code>ollama pull</code> the model first):</p>
1276
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;ollama&quot;, &quot;model&quot;: &quot;llama3.2&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1277
+ </code></pre>
1278
+ <p><strong>Claude Code</strong> (uses your local Claude Code session; no API key needed):</p>
1279
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;claude-code&quot;, &quot;model&quot;: &quot;claude-sonnet-4-6&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1280
+ </code></pre>
1281
+ <p><strong>AWS Bedrock — Amazon Nova:</strong></p>
1282
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;bedrock&quot;, &quot;model&quot;: &quot;amazon.nova-pro-v1:0&quot;, &quot;endpoint&quot;: null, &quot;region&quot;: &quot;eu-west-1&quot;, &quot;batchSize&quot;: 25 }
1283
+ </code></pre>
1284
+ <p><strong>AWS Bedrock — Claude or Meta Llama</strong> (same provider, different model id):</p>
1285
+ <pre><code class="language-json">&quot;ai&quot;: { &quot;provider&quot;: &quot;bedrock&quot;, &quot;model&quot;: &quot;anthropic.claude-3-5-sonnet-20241022-v2:0&quot;, &quot;region&quot;: &quot;us-east-1&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1286
+ &quot;ai&quot;: { &quot;provider&quot;: &quot;bedrock&quot;, &quot;model&quot;: &quot;meta.llama3-1-70b-instruct-v1:0&quot;, &quot;region&quot;: &quot;us-east-1&quot;, &quot;endpoint&quot;: null, &quot;batchSize&quot;: 25 }
1287
+ </code></pre>
1288
+ <h2>Vision (screenshots)</h2>
1289
+ <p>Keys with a screenshot are sent to vision-capable models for context:</p>
1290
+ <table>
1291
+ <thead>
1292
+ <tr>
1293
+ <th>Model family</th>
1294
+ <th>Vision</th>
1295
+ </tr>
1296
+ </thead>
1297
+ <tbody><tr>
1298
+ <td>Anthropic</td>
1299
+ <td>✅</td>
1300
+ </tr>
1301
+ <tr>
1302
+ <td>OpenAI (gpt-4o-class)</td>
1303
+ <td>✅</td>
1304
+ </tr>
1305
+ <tr>
1306
+ <td>Bedrock — Amazon Nova / Claude</td>
1307
+ <td>✅</td>
1308
+ </tr>
1309
+ <tr>
1310
+ <td>Bedrock — Meta Llama (text)</td>
1311
+ <td>❌ — runs text-only, warns how many screenshots were skipped</td>
1312
+ </tr>
1313
+ <tr>
1314
+ <td>OpenRouter</td>
1315
+ <td>✅ for vision-capable models (e.g. <code>anthropic/*</code>, <code>openai/gpt-4o*</code>, <code>google/gemini*</code>); a text-only model ignores the image</td>
1316
+ </tr>
1317
+ <tr>
1318
+ <td>Ollama</td>
1319
+ <td>❌ — runs text-only (most local models can&#39;t see images); screenshots are skipped</td>
1320
+ </tr>
1321
+ <tr>
1322
+ <td>Claude Code</td>
1323
+ <td>❌ — runs text-only via the <code>claude</code> CLI subprocess; screenshots are skipped</td>
1324
+ </tr>
1325
+ </tbody></table>
1326
+ <h2>Data residency</h2>
1327
+ <p>AI translation is the only path by which source strings leave your boundary. To keep strings in-region, <strong>pin AWS Bedrock to a region</strong>, or point the Anthropic / OpenAI <code>endpoint</code> at an in-region or self-hosted gateway. For the strongest guarantee, <strong>run Ollama locally</strong> — strings never leave the machine. Note that <strong>OpenRouter routes your strings through its service</strong> to the upstream model provider you select — avoid it where data residency is a hard requirement. <strong>No credentials are ever written to <code>glotfile.json</code> or logged.</strong></p>
1328
+ <h2>Related</h2>
1329
+ <ul>
1330
+ <li>How Translation Works · translate · Settings · AI Log</li>
1331
+ </ul>
1332
+ `,text:`AI Providers Glotfile translates via one provider at a time , chosen by the setting. These AI settings are per-machine — they live in (gitignored), not in the committed , so each developer can use their own provider and model. Edit them in Settings and re-run translate. Credentials are read from the environment, including a local file in the project directory. Supported providers Provider Credentials Region / endpoint SDK --- --- --- --- --- Anthropic (default) (base URL) bundled ( ) OpenAI (base URL; also reaches any OpenAI-compatible gateway) optional — AWS Bedrock standard AWS chain: / (/ ), or , or an SSO / instance role (falls back to ) optional — OpenRouter (base URL; defaults to ) optional — (OpenAI-compatible) Ollama (local) none for local; only for a secured / remote server (base URL; defaults to ) optional — (OpenAI-compatible) Claude Code (local) none — uses your local Claude Code session n/a none — spawns the CLI Info: Optional SDKs load on demand — the OpenAI SDK (also used by OpenRouter) and the AWS SDK are optional dependencies, loaded only when their provider is selected — so a default install stays small. If the SDK is missing when you translate, Glotfile tells you exactly what to install. The settings Stored per-machine in (gitignored). The default: Field Meaning --- --- , , , , , or . The model id for the chosen provider. Base URL override (Anthropic / OpenAI / OpenRouter / Ollama). for the provider default — OpenRouter defaults to , Ollama to . An overridden Ollama endpoint must include the suffix. AWS region (Bedrock). Falls back to . Strings per request (default ). Examples OpenAI: OpenRouter (OpenAI-compatible; uses namespaced model ids): Ollama (local, OpenAI-compatible; no key needed — start Ollama and the model first): Claude Code (uses your local Claude Code session; no API key needed): AWS Bedrock — Amazon Nova: AWS Bedrock — Claude or Meta Llama (same provider, different model id): Vision (screenshots) Keys with a screenshot are sent to vision-capable models for context: Model family Vision --- --- Anthropic ✅ OpenAI (gpt-4o-class) ✅ Bedrock — Amazon Nova / Claude ✅ Bedrock — Meta Llama (text) ❌ — runs text-only, warns how many screenshots were skipped OpenRouter ✅ for vision-capable models (e.g. , , ); a text-only model ignores the image Ollama ❌ — runs text-only (most local models can't see images); screenshots are skipped Claude Code ❌ — runs text-only via the CLI subprocess; screenshots are skipped Data residency AI translation is the only path by which source strings leave your boundary. To keep strings in-region, pin AWS Bedrock to a region , or point the Anthropic / OpenAI at an in-region or self-hosted gateway. For the strongest guarantee, run Ollama locally — strings never leave the machine. Note that OpenRouter routes your strings through its service to the upstream model provider you select — avoid it where data residency is a hard requirement. No credentials are ever written to or logged. Related - How Translation Works · translate · Settings · AI Log`},{id:`ai-translation/how-translation-works`,title:`How Translation Works`,section:`AI Translation`,html:`<h1>How Translation Works</h1>
1333
+ <p>AI translation is the only feature that needs network access or credentials — everything else in Glotfile works offline. You can trigger it from the Editor or with <code>glotfile translate</code>; both use the same engine.</p>
1334
+ <h2>What gets sent</h2>
1335
+ <p>For each string that needs translating, Glotfile sends the provider:</p>
1336
+ <ul>
1337
+ <li>the <strong>source string</strong> (or plural forms),</li>
1338
+ <li>the key&#39;s <strong>context</strong>,</li>
1339
+ <li>the relevant <strong>Glossary</strong> terms (only those that appear in the string),</li>
1340
+ <li>the <strong>target locale</strong>,</li>
1341
+ <li>any <strong>max length</strong>, and</li>
1342
+ <li>for vision-capable models, the key&#39;s <strong>screenshot</strong>.</li>
1343
+ </ul>
1344
+ <p>Strings are sent in batches (the <code>ai.batchSize</code> setting, default 25).</p>
1345
+ <h2>Validation on the way back</h2>
1346
+ <p>A translation is only written if it passes validation:</p>
1347
+ <ul>
1348
+ <li><strong>Placeholders</strong> must match the source — a translation that drops or renames <code>{name}</code>, <code>%s</code>, <code>:id</code>, etc. is <strong>rejected</strong>. See Placeholders and ICU.</li>
1349
+ <li><strong>ICU plural/select</strong> structure must be preserved.</li>
1350
+ <li><strong>Max length</strong>, if set, must not be exceeded.</li>
1351
+ </ul>
1352
+ <p>Rejected translations are reported and skipped, not written:</p>
1353
+ <pre><code>skip checkout.total @ de: placeholder {amount} is missing
1354
+ </code></pre>
1355
+ <h2>What it writes</h2>
1356
+ <ul>
1357
+ <li>Accepted translations are written as <strong><code>machine</code></strong> state.</li>
1358
+ <li>A <strong><code>reviewed</code></strong> value is <strong>never overwritten</strong> — your human edits are safe.</li>
1359
+ <li>The source string each translation was made from is recorded, so later source edits can flag the translation as stale.</li>
1360
+ </ul>
1361
+ <h2>Vision and model fit</h2>
1362
+ <p>Screenshots are sent only to models that can see them. For models that can&#39;t (e.g. Bedrock Meta Llama text models), the run proceeds <strong>text-only</strong> and prints how many screenshots were skipped — so any model still works. See AI Providers for the support matrix.</p>
1363
+ <h2>Privacy</h2>
1364
+ <blockquote>
1365
+ <p><strong>⚠ What leaves your machine</strong> — AI translation is the <strong>only</strong> path by which your source strings leave your boundary. No credentials are ever written to <code>glotfile.json</code> or the AI Log. To keep strings in-region, pin a Bedrock region or point an Anthropic/OpenAI endpoint at an in-region gateway — see AI Providers.</p>
1366
+ </blockquote>
1367
+ <h2>Batch mode</h2>
1368
+ <p>Batch mode submits translation jobs through the <strong>Anthropic Message Batches API</strong> at <strong>50% of normal token cost</strong>. Results are asynchronous — typically ready well under an hour, with a 24-hour upper bound. Batch mode is only available when <code>ai.provider</code> is <code>anthropic</code>.</p>
1369
+ <h3>CLI</h3>
1370
+ <pre><code>glotfile translate --batch # submit and exit immediately
1371
+ glotfile translate --batch --wait # submit, then stay attached and apply when done
1372
+ glotfile batch # check status; auto-applies results if finished
1373
+ glotfile batch apply # apply finished results now
1374
+ glotfile batch cancel # cancel a pending batch
1375
+ </code></pre>
1376
+ <h3>Web UI</h3>
1377
+ <p>When the Anthropic provider is active, the Translate dialog shows a <strong>Batch (50% cost)</strong> button alongside the normal Translate button. After submission, a banner in the editor tracks progress; when the batch finishes, click <strong>Apply results</strong> to write the translations.</p>
1378
+ <h3>Pending handle</h3>
1379
+ <p>The in-flight batch state is stored in <code>.glotfile/batch.json</code> — project-local and machine-specific. Only one pending batch per project is tracked at a time. The <code>.glotfile/</code> directory is self-ignoring (it writes its own <code>.gitignore</code> entry), so <code>batch.json</code> is never committed.</p>
1380
+ <h3>Staleness and error recovery</h3>
1381
+ <p>When results arrive, Glotfile checks each entry against the current state:</p>
1382
+ <ul>
1383
+ <li>Translations for keys whose <strong>source text changed</strong> (or that were <strong>deleted</strong>) since submission are <strong>skipped</strong>.</li>
1384
+ <li>Entries that the API marks as <strong>failed</strong>, or whose content is <strong>malformed</strong>, are automatically re-run through the normal synchronous translate path during apply.</li>
1385
+ </ul>
1386
+ <h2>Related</h2>
1387
+ <ul>
1388
+ <li>AI Providers · Glossary · Placeholders and ICU · AI Log</li>
1389
+ </ul>
1390
+ `,text:`How Translation Works AI translation is the only feature that needs network access or credentials — everything else in Glotfile works offline. You can trigger it from the Editor or with ; both use the same engine. What gets sent For each string that needs translating, Glotfile sends the provider: - the source string (or plural forms), - the key's context , - the relevant Glossary terms (only those that appear in the string), - the target locale , - any max length , and - for vision-capable models, the key's screenshot . Strings are sent in batches (the setting, default 25). Validation on the way back A translation is only written if it passes validation: - Placeholders must match the source — a translation that drops or renames , , , etc. is rejected . See Placeholders and ICU. - ICU plural/select structure must be preserved. - Max length , if set, must not be exceeded. Rejected translations are reported and skipped, not written: What it writes - Accepted translations are written as state. - A value is never overwritten — your human edits are safe. - The source string each translation was made from is recorded, so later source edits can flag the translation as stale. Vision and model fit Screenshots are sent only to models that can see them. For models that can't (e.g. Bedrock Meta Llama text models), the run proceeds text-only and prints how many screenshots were skipped — so any model still works. See AI Providers for the support matrix. Privacy ⚠ What leaves your machine — AI translation is the only path by which your source strings leave your boundary. No credentials are ever written to or the AI Log. To keep strings in-region, pin a Bedrock region or point an Anthropic/OpenAI endpoint at an in-region gateway — see AI Providers. Batch mode Batch mode submits translation jobs through the Anthropic Message Batches API at 50% of normal token cost . Results are asynchronous — typically ready well under an hour, with a 24-hour upper bound. Batch mode is only available when is . CLI Web UI When the Anthropic provider is active, the Translate dialog shows a Batch (50% cost) button alongside the normal Translate button. After submission, a banner in the editor tracks progress; when the batch finishes, click Apply results to write the translations. Pending handle The in-flight batch state is stored in — project-local and machine-specific. Only one pending batch per project is tracked at a time. The directory is self-ignoring (it writes its own entry), so is never committed. Staleness and error recovery When results arrive, Glotfile checks each entry against the current state: - Translations for keys whose source text changed (or that were deleted ) since submission are skipped . - Entries that the API marks as failed , or whose content is malformed , are automatically re-run through the normal synchronous translate path during apply. Related - AI Providers · Glossary · Placeholders and ICU · AI Log`},{id:`reference/checks-and-validation`,title:`Checks and Validation`,section:`Reference`,html:`<h1>Checks and Validation</h1>
1391
+ <p>Glotfile validates your catalog two ways: <strong>live in the UI</strong> as you edit, and via the <strong><code>lint</code> / <code>check</code></strong> commands for CI. Both look for the same kinds of problem.</p>
1392
+ <h2>Lint rules</h2>
1393
+ <p><code>glotfile lint</code> runs these rules. Each has a default severity you can override in <code>config.lint.rules</code>.</p>
1394
+ <table>
1395
+ <thead>
1396
+ <tr>
1397
+ <th>Rule id</th>
1398
+ <th>Default</th>
1399
+ <th>Catches</th>
1400
+ </tr>
1401
+ </thead>
1402
+ <tbody><tr>
1403
+ <td><code>empty-source</code></td>
1404
+ <td><strong>error</strong></td>
1405
+ <td>A key whose source value is empty.</td>
1406
+ </tr>
1407
+ <tr>
1408
+ <td><code>empty-translation</code></td>
1409
+ <td><strong>error</strong></td>
1410
+ <td>A target value that&#39;s missing or whitespace-only.</td>
1411
+ </tr>
1412
+ <tr>
1413
+ <td><code>placeholder-mismatch</code></td>
1414
+ <td><strong>error</strong></td>
1415
+ <td>Translation placeholders differ from the source.</td>
1416
+ </tr>
1417
+ <tr>
1418
+ <td><code>icu-mismatch</code></td>
1419
+ <td><strong>error</strong></td>
1420
+ <td>One side is an ICU plural/select and the other isn&#39;t.</td>
1421
+ </tr>
1422
+ <tr>
1423
+ <td><code>glossary-violation</code></td>
1424
+ <td><strong>error</strong></td>
1425
+ <td>A do-not-translate term is altered, or a forced Glossary translation is missing.</td>
1426
+ </tr>
1427
+ <tr>
1428
+ <td><code>max-length</code></td>
1429
+ <td>warn</td>
1430
+ <td>A value longer than the key&#39;s max length.</td>
1431
+ </tr>
1432
+ <tr>
1433
+ <td><code>identical-to-source</code></td>
1434
+ <td>warn</td>
1435
+ <td>A translation identical to the source string.</td>
1436
+ </tr>
1437
+ <tr>
1438
+ <td><code>whitespace</code></td>
1439
+ <td>warn</td>
1440
+ <td>Leading/trailing whitespace that differs from the source.</td>
1441
+ </tr>
1442
+ <tr>
1443
+ <td><code>spelling</code></td>
1444
+ <td>warn</td>
1445
+ <td>A word the locale&#39;s dictionary doesn&#39;t recognise.</td>
1446
+ </tr>
1447
+ </tbody></table>
1448
+ <p><code>glotfile check</code> adds one more, by re-exporting and comparing to disk:</p>
1449
+ <table>
1450
+ <thead>
1451
+ <tr>
1452
+ <th>Rule id</th>
1453
+ <th>Default</th>
1454
+ <th>Catches</th>
1455
+ </tr>
1456
+ </thead>
1457
+ <tbody><tr>
1458
+ <td><code>output-stale</code></td>
1459
+ <td><strong>error</strong></td>
1460
+ <td>An exported file is missing or out of date — run <code>glotfile export</code>.</td>
1461
+ </tr>
1462
+ </tbody></table>
1463
+ <h2>Configuring rules — <code>config.lint</code></h2>
1464
+ <p>Editable in <strong>Settings → Quality checks</strong>, or by hand:</p>
1465
+ <pre><code class="language-json">&quot;lint&quot;: {
1466
+ &quot;rules&quot;: { &quot;identical-to-source&quot;: &quot;off&quot;, &quot;max-length&quot;: &quot;error&quot; },
1467
+ &quot;ignore&quot;: [&quot;legal.*&quot;, &quot;debug.*&quot;],
1468
+ &quot;spelling&quot;: { &quot;locales&quot;: { &quot;pt-BR&quot;: &quot;pt&quot; } }
1469
+ }
1470
+ </code></pre>
1471
+ <table>
1472
+ <thead>
1473
+ <tr>
1474
+ <th>Field</th>
1475
+ <th>Meaning</th>
1476
+ </tr>
1477
+ </thead>
1478
+ <tbody><tr>
1479
+ <td><code>rules</code></td>
1480
+ <td>Override a rule&#39;s severity: <code>&quot;error&quot;</code>, <code>&quot;warn&quot;</code>, or <code>&quot;off&quot;</code>.</td>
1481
+ </tr>
1482
+ <tr>
1483
+ <td><code>ignore</code></td>
1484
+ <td>Globs of keys to skip entirely.</td>
1485
+ </tr>
1486
+ <tr>
1487
+ <td><code>spelling.locales</code></td>
1488
+ <td>Map a locale to a different dictionary id (e.g. use the <code>pt</code> dictionary for <code>pt-BR</code>).</td>
1489
+ </tr>
1490
+ </tbody></table>
1491
+ <p>Rule configuration applies everywhere at once: the live editor checks, the Analytics release gate, and <code>glotfile lint</code>/<code>check</code>. The <code>spelling</code> rule accepts Glossary terms and the custom dictionary (<code>config.spelling.customWords</code>) automatically.</p>
1492
+ <blockquote>
1493
+ <p><strong>Note:</strong> Spelling needs a dictionary — the <code>spelling</code> rule only runs for locales that have a dictionary available. Locales without one are skipped with a notice.</p>
1494
+ </blockquote>
1495
+ <h2>Dismissing a single finding</h2>
1496
+ <p>Sometimes a warning is just wrong for one string — &quot;Logo&quot; really is &quot;Logo&quot; in French. Dismiss the finding from Analytics (or the key&#39;s detail panel) and it&#39;s suppressed for that key + locale <strong>until the source text changes</strong>, at which point it resurfaces automatically. Suppressions are stored on the key in the state file, so they&#39;re shared with your team and reviewable in diffs.</p>
1497
+ <ul>
1498
+ <li><code>glotfile lint --accept [--rule &lt;list&gt;] [--locale &lt;list&gt;]</code> bulk-suppresses the current warnings — useful when adopting glotfile on an existing project.</li>
1499
+ <li><code>glotfile lint --include-suppressed</code> shows suppressed findings (marked); Analytics has a matching &quot;Suppressed (n)&quot; drawer with per-finding restore.</li>
1500
+ <li>Errors are never bulk-accepted; fix those instead.</li>
1501
+ </ul>
1502
+ <h2>Severities and exit codes</h2>
1503
+ <ul>
1504
+ <li><strong>error</strong> → fails <code>lint</code>/<code>check</code> (exit <code>1</code>).</li>
1505
+ <li><strong>warn</strong> → reported; fails only if over <code>--max-warnings</code>.</li>
1506
+ <li><strong>off</strong> → not run.</li>
1507
+ </ul>
1508
+ <p>See lint and check for <code>--format</code> (text / json / sarif), <code>--rule</code>, <code>--locale</code>, and <code>--max-warnings</code>, and Continuous Integration for wiring it up.</p>
1509
+ <h2>Live UI checks</h2>
1510
+ <p>The Editor continuously surfaces issues — missing values, placeholder mismatches, length and glossary violations, and spelling — so you fix them as you work. The <strong>needs-attention</strong> filter shows every key with an open issue.</p>
1511
+ <h2>Related</h2>
1512
+ <ul>
1513
+ <li>lint and check · Continuous Integration · Placeholders and ICU · Configuration Reference</li>
1514
+ </ul>
1515
+ `,text:`Checks and Validation Glotfile validates your catalog two ways: live in the UI as you edit, and via the / commands for CI. Both look for the same kinds of problem. Lint rules runs these rules. Each has a default severity you can override in . Rule id Default Catches --- --- --- error A key whose source value is empty. error A target value that's missing or whitespace-only. error Translation placeholders differ from the source. error One side is an ICU plural/select and the other isn't. error A do-not-translate term is altered, or a forced Glossary translation is missing. warn A value longer than the key's max length. warn A translation identical to the source string. warn Leading/trailing whitespace that differs from the source. warn A word the locale's dictionary doesn't recognise. adds one more, by re-exporting and comparing to disk: Rule id Default Catches --- --- --- error An exported file is missing or out of date — run . Configuring rules — Editable in Settings → Quality checks , or by hand: Field Meaning --- --- Override a rule's severity: , , or . Globs of keys to skip entirely. Map a locale to a different dictionary id (e.g. use the dictionary for ). Rule configuration applies everywhere at once: the live editor checks, the Analytics release gate, and / . The rule accepts Glossary terms and the custom dictionary ( ) automatically. Note: Spelling needs a dictionary — the rule only runs for locales that have a dictionary available. Locales without one are skipped with a notice. Dismissing a single finding Sometimes a warning is just wrong for one string — "Logo" really is "Logo" in French. Dismiss the finding from Analytics (or the key's detail panel) and it's suppressed for that key + locale until the source text changes , at which point it resurfaces automatically. Suppressions are stored on the key in the state file, so they're shared with your team and reviewable in diffs. - bulk-suppresses the current warnings — useful when adopting glotfile on an existing project. - shows suppressed findings (marked); Analytics has a matching "Suppressed (n)" drawer with per-finding restore. - Errors are never bulk-accepted; fix those instead. Severities and exit codes - error → fails / (exit ). - warn → reported; fails only if over . - off → not run. See lint and check for (text / json / sarif), , , and , and Continuous Integration for wiring it up. Live UI checks The Editor continuously surfaces issues — missing values, placeholder mismatches, length and glossary violations, and spelling — so you fix them as you work. The needs-attention filter shows every key with an open issue. Related - lint and check · Continuous Integration · Placeholders and ICU · Configuration Reference`},{id:`reference/configuration-reference`,title:`Configuration Reference`,section:`Reference`,html:`<h1>Configuration Reference</h1>
1516
+ <p>Every field in the <code>config</code> block of <code>glotfile.json</code> — the configuration you <strong>commit</strong> alongside your code. Edit these in Settings rather than by hand where you can.</p>
1517
+ <blockquote>
1518
+ <p><strong>Info:</strong> AI provider settings are <strong>not</strong> part of this committed config. They&#39;re per-machine and live in <code>.glotfile/settings.json</code> (gitignored) — see AI Providers.</p>
1519
+ </blockquote>
1520
+ <pre><code class="language-json">&quot;config&quot;: {
1521
+ &quot;sourceLocale&quot;: &quot;en&quot;,
1522
+ &quot;locales&quot;: [&quot;en&quot;, &quot;fr&quot;, &quot;de&quot;],
1523
+ &quot;outputs&quot;: [
1524
+ { &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot; }
1525
+ ],
1526
+ &quot;format&quot;: { &quot;indent&quot;: 2, &quot;sortKeys&quot;: true, &quot;finalNewline&quot;: true },
1527
+ &quot;spelling&quot;: { &quot;customWords&quot;: [] },
1528
+ &quot;lint&quot;: { &quot;rules&quot;: {}, &quot;ignore&quot;: [], &quot;spelling&quot;: { &quot;locales&quot;: {} } }
1529
+ }
1530
+ </code></pre>
1531
+ <h2><code>sourceLocale</code> (string, required)</h2>
1532
+ <p>The language you author in. <strong>Must</strong> be one of <code>locales</code>. See Keys and Locales.</p>
1533
+ <h2><code>locales</code> (string[], required)</h2>
1534
+ <p>Every language you maintain, including the source. See Keys and Locales.</p>
1535
+ <h2><code>outputs</code> (array, required)</h2>
1536
+ <p>Export targets. Each entry:</p>
1537
+ <table>
1538
+ <thead>
1539
+ <tr>
1540
+ <th>Field</th>
1541
+ <th>Type</th>
1542
+ <th>Meaning</th>
1543
+ </tr>
1544
+ </thead>
1545
+ <tbody><tr>
1546
+ <td><code>adapter</code></td>
1547
+ <td>string</td>
1548
+ <td>One of the adapters.</td>
1549
+ </tr>
1550
+ <tr>
1551
+ <td><code>path</code></td>
1552
+ <td>string</td>
1553
+ <td>Path template with <code>{locale}</code> / <code>{namespace}</code>.</td>
1554
+ </tr>
1555
+ <tr>
1556
+ <td><code>style</code></td>
1557
+ <td>string?</td>
1558
+ <td>Adapter-specific layout option (e.g. <code>&quot;flat&quot;</code>).</td>
1559
+ </tr>
1560
+ <tr>
1561
+ <td><code>localeCase</code></td>
1562
+ <td><code>&quot;lower-hyphen&quot;</code> | <code>&quot;lower-underscore&quot;</code> | <code>&quot;bcp47-hyphen&quot;</code> | <code>&quot;bcp47-underscore&quot;</code> | null</td>
1563
+ <td>Locale-code rendering style for this output. Default: the adapter&#39;s own convention (<code>bcp47-underscore</code> for ARB; <code>bcp47-hyphen</code> for <code>angular-xliff</code>, <code>rails-yaml</code> and <code>apple-strings</code>; <code>lower-hyphen</code> for all others). Applies to the <code>{locale}</code> path token and any in-file locale token.</td>
1564
+ </tr>
1565
+ <tr>
1566
+ <td><code>localeMap</code></td>
1567
+ <td><code>{ [canonicalCode]: exportToken }</code> | null</td>
1568
+ <td>Per-locale override that wins over <code>localeCase</code>. Keys are canonical (lowercase-hyphen) codes and must be locales in <code>config.locales</code>. E.g. <code>{ &quot;zh-hant&quot;: &quot;zh_HK&quot; }</code>.</td>
1569
+ </tr>
1570
+ </tbody></table>
1571
+ <blockquote>
1572
+ <p><strong>Info:</strong> AI provider settings — <code>provider</code>, <code>model</code>, <code>endpoint</code>, <code>region</code>, <code>batchSize</code> — are <strong>not</strong> in <code>config</code>. They&#39;re per-machine local settings; see AI Providers.</p>
1573
+ </blockquote>
1574
+ <h2><code>format</code> (object, required)</h2>
1575
+ <p>Controls how <code>glotfile.json</code> is written — keeps diffs small. See The State File.</p>
1576
+ <table>
1577
+ <thead>
1578
+ <tr>
1579
+ <th>Field</th>
1580
+ <th>Type</th>
1581
+ <th>Default</th>
1582
+ </tr>
1583
+ </thead>
1584
+ <tbody><tr>
1585
+ <td><code>indent</code></td>
1586
+ <td>number</td>
1587
+ <td><code>2</code></td>
1588
+ </tr>
1589
+ <tr>
1590
+ <td><code>sortKeys</code></td>
1591
+ <td>boolean</td>
1592
+ <td><code>true</code></td>
1593
+ </tr>
1594
+ <tr>
1595
+ <td><code>finalNewline</code></td>
1596
+ <td>boolean</td>
1597
+ <td><code>true</code></td>
1598
+ </tr>
1599
+ </tbody></table>
1600
+ <h2><code>spelling</code> (object, optional)</h2>
1601
+ <table>
1602
+ <thead>
1603
+ <tr>
1604
+ <th>Field</th>
1605
+ <th>Type</th>
1606
+ <th>Meaning</th>
1607
+ </tr>
1608
+ </thead>
1609
+ <tbody><tr>
1610
+ <td><code>customWords</code></td>
1611
+ <td>string[]</td>
1612
+ <td>Words the spelling check always accepts.</td>
1613
+ </tr>
1614
+ </tbody></table>
1615
+ <h2><code>lint</code> (object, optional)</h2>
1616
+ <p>Tune the validation rules (Settings → Quality checks in the UI). The spelling rule accepts Glossary terms and <code>config.spelling.customWords</code> automatically.</p>
1617
+ <table>
1618
+ <thead>
1619
+ <tr>
1620
+ <th>Field</th>
1621
+ <th>Type</th>
1622
+ <th>Meaning</th>
1623
+ </tr>
1624
+ </thead>
1625
+ <tbody><tr>
1626
+ <td><code>rules</code></td>
1627
+ <td><code>{ [ruleId]: &quot;error&quot; | &quot;warn&quot; | &quot;off&quot; }</code></td>
1628
+ <td>Per-rule severity overrides.</td>
1629
+ </tr>
1630
+ <tr>
1631
+ <td><code>ignore</code></td>
1632
+ <td>string[]</td>
1633
+ <td>Key globs to skip.</td>
1634
+ </tr>
1635
+ <tr>
1636
+ <td><code>spelling.locales</code></td>
1637
+ <td><code>{ [locale]: dictId }</code></td>
1638
+ <td>Use a specific dictionary for a locale.</td>
1639
+ </tr>
1640
+ </tbody></table>
1641
+ <h2><code>scan</code> (object, optional)</h2>
1642
+ <p>Tunes the codebase scan that powers usage detection and unused-key pruning. See scan.</p>
1643
+ <table>
1644
+ <thead>
1645
+ <tr>
1646
+ <th>Field</th>
1647
+ <th>Type</th>
1648
+ <th>Meaning</th>
1649
+ </tr>
1650
+ </thead>
1651
+ <tbody><tr>
1652
+ <td><code>include</code></td>
1653
+ <td>string[]</td>
1654
+ <td>Globs of files to scan.</td>
1655
+ </tr>
1656
+ <tr>
1657
+ <td><code>exclude</code></td>
1658
+ <td>string[]</td>
1659
+ <td>Globs to skip.</td>
1660
+ </tr>
1661
+ <tr>
1662
+ <td><code>accessors</code></td>
1663
+ <td>string[]</td>
1664
+ <td>Extra Flutter accessor names the <code>gen_l10n</code> object is bound to (auto-detection covers most projects; this is the escape hatch).</td>
1665
+ </tr>
1666
+ <tr>
1667
+ <td><code>patterns</code></td>
1668
+ <td>string[]</td>
1669
+ <td>Custom usage-scan regexes (capture group 1 = the key) applied to every file.</td>
1670
+ </tr>
1671
+ <tr>
1672
+ <td><code>keep</code></td>
1673
+ <td>string[]</td>
1674
+ <td>Key globs always treated as used (e.g. <code>auth.throttle</code>, <code>validation.*</code>) — for keys consumed by code the scan can&#39;t see, such as framework internals or vendored packages. They never show as unused and survive <code>prune --unused</code>.</td>
1675
+ </tr>
1676
+ </tbody></table>
1677
+ <h2><code>autoExport</code> (boolean, optional)</h2>
1678
+ <p>When <code>true</code> (the default), <code>glotfile serve</code> re-exports the locale files to disk on every change. Set <code>false</code> to write only on an explicit <code>glotfile export</code>.</p>
1679
+ <h2><code>exportLocales</code> (string[], optional)</h2>
1680
+ <p>An allow-list narrowing which locales every export writes. Empty or absent means export all of <code>locales</code>. Persisted so the serve auto-export hook honours it too.</p>
1681
+ <h2><code>storage</code> (<code>&quot;single&quot;</code> | <code>&quot;split&quot;</code>, optional)</h2>
1682
+ <p>On-disk layout. Absent or <code>&quot;single&quot;</code> keeps the monolithic <code>glotfile.json</code>; <code>&quot;split&quot;</code> persists the catalog as a <code>glotfile/</code> directory of per-locale files. Set automatically by <code>glotfile split</code> — see The State File.</p>
1683
+ <blockquote>
1684
+ <p><strong>⚠ Validation on load</strong> — Glotfile validates the whole file when it loads. A bad <code>sourceLocale</code>, an unknown rule id, a plural key missing its <code>other</code> form, or a malformed value fails with a specific message rather than corrupting data.</p>
1685
+ </blockquote>
1686
+ <h2>Related</h2>
1687
+ <ul>
1688
+ <li>The State File · Output Formats · AI Providers · Checks and Validation</li>
1689
+ </ul>
1690
+ `,text:`Configuration Reference Every field in the block of — the configuration you commit alongside your code. Edit these in Settings rather than by hand where you can. Info: AI provider settings are not part of this committed config. They're per-machine and live in (gitignored) — see AI Providers. (string, required) The language you author in. Must be one of . See Keys and Locales. (string[], required) Every language you maintain, including the source. See Keys and Locales. (array, required) Export targets. Each entry: Field Type Meaning --- --- --- string One of the adapters. string Path template with / . string? Adapter-specific layout option (e.g. ). \\ \\ \\ \\ null Locale-code rendering style for this output. Default: the adapter's own convention ( for ARB; for , and ; for all others). Applies to the path token and any in-file locale token. \\ null Per-locale override that wins over . Keys are canonical (lowercase-hyphen) codes and must be locales in . E.g. . Info: AI provider settings — , , , , — are not in . They're per-machine local settings; see AI Providers. (object, required) Controls how is written — keeps diffs small. See The State File. Field Type Default --- --- --- number boolean boolean (object, optional) Field Type Meaning --- --- --- string[] Words the spelling check always accepts. (object, optional) Tune the validation rules (Settings → Quality checks in the UI). The spelling rule accepts Glossary terms and automatically. Field Type Meaning --- --- --- Per-rule severity overrides. string[] Key globs to skip. Use a specific dictionary for a locale. (object, optional) Tunes the codebase scan that powers usage detection and unused-key pruning. See scan. Field Type Meaning --- --- --- string[] Globs of files to scan. string[] Globs to skip. string[] Extra Flutter accessor names the object is bound to (auto-detection covers most projects; this is the escape hatch). string[] Custom usage-scan regexes (capture group 1 = the key) applied to every file. string[] Key globs always treated as used (e.g. , ) — for keys consumed by code the scan can't see, such as framework internals or vendored packages. They never show as unused and survive . (boolean, optional) When (the default), re-exports the locale files to disk on every change. Set to write only on an explicit . (string[], optional) An allow-list narrowing which locales every export writes. Empty or absent means export all of . Persisted so the serve auto-export hook honours it too. ( , optional) On-disk layout. Absent or keeps the monolithic ; persists the catalog as a directory of per-locale files. Set automatically by — see The State File. ⚠ Validation on load — Glotfile validates the whole file when it loads. A bad , an unknown rule id, a plural key missing its form, or a malformed value fails with a specific message rather than corrupting data. Related - The State File · Output Formats · AI Providers · Checks and Validation`},{id:`reference/output-formats`,title:`Output Formats`,section:`Reference`,html:`<h1>Output Formats</h1>
1691
+ <p>Glotfile exports your catalog to the locale formats your apps consume. You configure outputs in <code>config.outputs</code> (via Settings or the file); each entry names an <strong>adapter</strong> and a <strong>path template</strong>. <code>glotfile export</code> writes them all.</p>
1692
+ <pre><code class="language-json">&quot;outputs&quot;: [
1693
+ { &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot; },
1694
+ { &quot;adapter&quot;: &quot;laravel-php&quot;, &quot;path&quot;: &quot;lang/{locale}/{namespace}.php&quot; },
1695
+ { &quot;adapter&quot;: &quot;i18next-json&quot;, &quot;path&quot;: &quot;public/locales/{locale}/translation.json&quot; }
1696
+ ]
1697
+ </code></pre>
1698
+ <h2>Adapters</h2>
1699
+ <table>
1700
+ <thead>
1701
+ <tr>
1702
+ <th>Adapter</th>
1703
+ <th>Target</th>
1704
+ <th>Placeholder style</th>
1705
+ <th>Files written</th>
1706
+ </tr>
1707
+ </thead>
1708
+ <tbody><tr>
1709
+ <td><code>flutter-arb</code></td>
1710
+ <td>Flutter <code>.arb</code></td>
1711
+ <td>ICU</td>
1712
+ <td>one per locale</td>
1713
+ </tr>
1714
+ <tr>
1715
+ <td><code>laravel-php</code></td>
1716
+ <td>Laravel <code>lang/**/*.php</code> arrays</td>
1717
+ <td><code>:named</code></td>
1718
+ <td>one per locale <strong>per namespace</strong></td>
1719
+ </tr>
1720
+ <tr>
1721
+ <td><code>i18next-json</code></td>
1722
+ <td>i18next / generic JSON</td>
1723
+ <td><code>{{named}}</code></td>
1724
+ <td>one per locale</td>
1725
+ </tr>
1726
+ <tr>
1727
+ <td><code>vue-i18n-json</code></td>
1728
+ <td>Vue I18n JSON</td>
1729
+ <td><code>{named}</code></td>
1730
+ <td>one per locale</td>
1731
+ </tr>
1732
+ <tr>
1733
+ <td><code>gettext-po</code></td>
1734
+ <td>gettext <code>.po</code></td>
1735
+ <td>printf (<code>%s</code>)</td>
1736
+ <td>one per locale</td>
1737
+ </tr>
1738
+ <tr>
1739
+ <td><code>apple-strings</code></td>
1740
+ <td>Apple <code>.strings</code></td>
1741
+ <td>printf</td>
1742
+ <td>one per locale</td>
1743
+ </tr>
1744
+ <tr>
1745
+ <td><code>apple-stringsdict</code></td>
1746
+ <td>Apple <code>.stringsdict</code> (plurals)</td>
1747
+ <td>printf</td>
1748
+ <td>one per locale</td>
1749
+ </tr>
1750
+ <tr>
1751
+ <td><code>angular-xliff</code></td>
1752
+ <td>Angular XLIFF 1.2 (<code>@angular/localize</code>)</td>
1753
+ <td><code>&lt;x id=&quot;INTERPOLATION&quot;/&gt;</code></td>
1754
+ <td>one per locale</td>
1755
+ </tr>
1756
+ <tr>
1757
+ <td><code>rails-yaml</code></td>
1758
+ <td>Rails i18n <code>config/locales/*.yml</code></td>
1759
+ <td><code>%{named}</code></td>
1760
+ <td>one per locale</td>
1761
+ </tr>
1762
+ </tbody></table>
1763
+ <h2>Path templates</h2>
1764
+ <p>Two tokens are substituted in <code>path</code>:</p>
1765
+ <ul>
1766
+ <li><strong><code>{locale}</code></strong> — the locale code (<code>en</code>, <code>fr</code>, …). Used by every adapter.</li>
1767
+ <li><strong><code>{namespace}</code></strong> — the <strong>first dot-segment</strong> of the key. Used by adapters that split files by namespace.</li>
1768
+ </ul>
1769
+ <blockquote>
1770
+ <p><strong>Example:</strong> How <code>{namespace}</code> works — with <code>laravel-php</code> and path <code>lang/{locale}/{namespace}.php</code>, the key <code>auth.signIn.button</code> is written as <code>signIn.button</code> inside <code>lang/fr/auth.php</code>. Keys with no dot fall into a <code>messages</code> namespace.</p>
1771
+ </blockquote>
1772
+ <h2>Locale code rendering</h2>
1773
+ <p>By default each adapter renders locale codes in its own convention: <code>flutter-arb</code> uses BCP-47 with underscores (<code>en_US</code>, <code>zh_Hant_TW</code>); <code>angular-xliff</code>, <code>rails-yaml</code> and <code>apple-strings</code> use BCP-47 with hyphens (<code>en-US</code>, <code>pt-BR</code>); every other adapter uses glotfile&#39;s internal lowercase-hyphen form (<code>en-us</code>).</p>
1774
+ <h3><code>localeCase</code></h3>
1775
+ <p>The optional <code>localeCase</code> field on an output entry overrides the adapter default for <strong>all</strong> locales in that output:</p>
1776
+ <table>
1777
+ <thead>
1778
+ <tr>
1779
+ <th>Value</th>
1780
+ <th>Example</th>
1781
+ </tr>
1782
+ </thead>
1783
+ <tbody><tr>
1784
+ <td><code>lower-hyphen</code></td>
1785
+ <td><code>en-us</code>, <code>zh-hant-tw</code></td>
1786
+ </tr>
1787
+ <tr>
1788
+ <td><code>lower-underscore</code></td>
1789
+ <td><code>en_us</code>, <code>zh_hant_tw</code></td>
1790
+ </tr>
1791
+ <tr>
1792
+ <td><code>bcp47-hyphen</code></td>
1793
+ <td><code>en-US</code>, <code>zh-Hant-TW</code></td>
1794
+ </tr>
1795
+ <tr>
1796
+ <td><code>bcp47-underscore</code></td>
1797
+ <td><code>en_US</code>, <code>zh_Hant_TW</code></td>
1798
+ </tr>
1799
+ </tbody></table>
1800
+ <p><code>localeCase</code> applies to the <code>{locale}</code> filename token <strong>and</strong> any in-file locale token (ARB <code>@@locale</code>, gettext <code>Language:</code>, XLIFF <code>target-language</code>).</p>
1801
+ <h3><code>localeMap</code></h3>
1802
+ <p>The optional <code>localeMap</code> field maps individual canonical locale codes to exact export tokens, overriding <code>localeCase</code> for those locales:</p>
1803
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;flutter-arb&quot;, &quot;path&quot;: &quot;lib/l10n/app_{locale}.arb&quot;,
1804
+ &quot;localeMap&quot;: { &quot;zh-hant&quot;: &quot;zh_HK&quot; } }
1805
+ </code></pre>
1806
+ <p>Keys are <strong>canonical</strong> (lowercase-hyphen) codes and must be locales present in <code>config.locales</code>. Use <code>localeMap</code> for semantic remaps that no style can express — for example, Flutter rejects script subtags so <code>zh-hant</code> must ship as <code>zh_HK</code>; Android requires <code>zh-rHK</code>.</p>
1807
+ <blockquote>
1808
+ <p><strong>⚠ Locale collision</strong> — if two locales resolve to the same export token after applying <code>localeCase</code> and <code>localeMap</code>, <code>glotfile export</code> emits a <code>locale-collision</code> warning and writes only the first locale&#39;s file (in config order), skipping the colliding ones rather than silently overwriting.</p>
1809
+ </blockquote>
1810
+ <h3>Round-trip safety</h3>
1811
+ <p><code>glotfile import</code> sets <code>localeCase</code> and <code>localeMap</code> automatically: it inspects the filenames it finds, picks the <code>localeCase</code> that reproduces them, and records only the exceptions in <code>localeMap</code>. A subsequent <code>glotfile export</code> produces byte-identical files.</p>
1812
+ <h2>The <code>style</code> option</h2>
1813
+ <p>Some adapters accept an optional <code>style</code> to tune their output. For example, <code>vue-i18n-json</code> supports a <strong>flat</strong> layout:</p>
1814
+ <pre><code class="language-json">{ &quot;adapter&quot;: &quot;vue-i18n-json&quot;, &quot;path&quot;: &quot;src/locales/{locale}.json&quot;, &quot;style&quot;: &quot;flat&quot; }
1815
+ </code></pre>
1816
+ <p>(Without <code>style</code>, JSON adapters nest keys by their dot segments.)</p>
1817
+ <h2>Lossless where possible, loud where not</h2>
1818
+ <p>Placeholders and ICU <code>plural</code>/<code>select</code> structure are <strong>preserved</strong> and converted to each format&#39;s native mechanism. Where a conversion would be lossy, <code>glotfile export</code> emits a <strong>warning</strong> and writes safe output rather than corrupting the file. See Placeholders and ICU.</p>
1819
+ <h2>Round-tripping (import)</h2>
1820
+ <p><code>glotfile import</code> reads existing files back into the catalog using these same adapters in reverse — inferring <code>localeCase</code>/<code>localeMap</code> from the filenames so a later export reproduces them byte-for-byte. See import.</p>
1821
+ <h2>Related</h2>
1822
+ <ul>
1823
+ <li>export · Placeholders and ICU · Plurals · Configuration Reference</li>
1824
+ </ul>
1825
+ `,text:`Output Formats Glotfile exports your catalog to the locale formats your apps consume. You configure outputs in (via Settings or the file); each entry names an adapter and a path template . writes them all. Adapters Adapter Target Placeholder style Files written --- --- --- --- Flutter ICU one per locale Laravel arrays one per locale per namespace i18next / generic JSON one per locale Vue I18n JSON one per locale gettext printf ( ) one per locale Apple printf one per locale Apple (plurals) printf one per locale Angular XLIFF 1.2 ( ) one per locale Rails i18n one per locale Path templates Two tokens are substituted in : - — the locale code ( , , …). Used by every adapter. - — the first dot-segment of the key. Used by adapters that split files by namespace. Example: How works — with and path , the key is written as inside . Keys with no dot fall into a namespace. Locale code rendering By default each adapter renders locale codes in its own convention: uses BCP-47 with underscores ( , ); , and use BCP-47 with hyphens ( , ); every other adapter uses glotfile's internal lowercase-hyphen form ( ). The optional field on an output entry overrides the adapter default for all locales in that output: Value Example --- --- , , , , applies to the filename token and any in-file locale token (ARB , gettext , XLIFF ). The optional field maps individual canonical locale codes to exact export tokens, overriding for those locales: Keys are canonical (lowercase-hyphen) codes and must be locales present in . Use for semantic remaps that no style can express — for example, Flutter rejects script subtags so must ship as ; Android requires . ⚠ Locale collision — if two locales resolve to the same export token after applying and , emits a warning and writes only the first locale's file (in config order), skipping the colliding ones rather than silently overwriting. Round-trip safety sets and automatically: it inspects the filenames it finds, picks the that reproduces them, and records only the exceptions in . A subsequent produces byte-identical files. The option Some adapters accept an optional to tune their output. For example, supports a flat layout: (Without , JSON adapters nest keys by their dot segments.) Lossless where possible, loud where not Placeholders and ICU / structure are preserved and converted to each format's native mechanism. Where a conversion would be lossy, emits a warning and writes safe output rather than corrupting the file. See Placeholders and ICU. Round-tripping (import) reads existing files back into the catalog using these same adapters in reverse — inferring / from the filenames so a later export reproduces them byte-for-byte. See import. Related - export · Placeholders and ICU · Plurals · Configuration Reference`},{id:`reference/placeholders-and-icu`,title:`Placeholders and ICU`,section:`Reference`,html:`<h1>Placeholders and ICU</h1>
1826
+ <p>Translations must keep the machinery the source string carries: <strong>interpolation placeholders</strong> and <strong>ICU plural/select</strong> structure. Glotfile protects both during translation, validation, and export.</p>
1827
+ <h2>One canonical form, converted on export</h2>
1828
+ <p>Glotfile stores every placeholder in a single <strong>canonical</strong> form — <code>{name}</code> —
1829
+ no matter what style the source file used. Import normalises to it; export
1830
+ converts it to each adapter&#39;s native style. So you edit and validate against one
1831
+ syntax, and each output file still gets the flavour its framework expects.</p>
1832
+ <table>
1833
+ <thead>
1834
+ <tr>
1835
+ <th>Format</th>
1836
+ <th>Native style</th>
1837
+ <th>Example</th>
1838
+ <th>On import → stored</th>
1839
+ <th>On export ← stored</th>
1840
+ </tr>
1841
+ </thead>
1842
+ <tbody><tr>
1843
+ <td>Flutter ARB</td>
1844
+ <td>ICU named</td>
1845
+ <td><code>{name}</code></td>
1846
+ <td><code>{name}</code> (already canonical)</td>
1847
+ <td><code>{name}</code></td>
1848
+ </tr>
1849
+ <tr>
1850
+ <td>Vue I18n</td>
1851
+ <td>single braces</td>
1852
+ <td><code>{name}</code></td>
1853
+ <td><code>{name}</code> (already canonical)</td>
1854
+ <td><code>{name}</code></td>
1855
+ </tr>
1856
+ <tr>
1857
+ <td>Laravel</td>
1858
+ <td>colon</td>
1859
+ <td><code>:name</code></td>
1860
+ <td><code>{name}</code></td>
1861
+ <td><code>:name</code></td>
1862
+ </tr>
1863
+ <tr>
1864
+ <td>Rails YAML</td>
1865
+ <td>percent-brace</td>
1866
+ <td><code>%{name}</code></td>
1867
+ <td><code>{name}</code></td>
1868
+ <td><code>%{name}</code></td>
1869
+ </tr>
1870
+ <tr>
1871
+ <td>i18next</td>
1872
+ <td>double braces</td>
1873
+ <td><code>{{name}}</code></td>
1874
+ <td><code>{name}</code></td>
1875
+ <td><code>{{name}}</code></td>
1876
+ </tr>
1877
+ <tr>
1878
+ <td>Angular XLIFF</td>
1879
+ <td>placeholder element</td>
1880
+ <td><code>&lt;x id=&quot;INTERPOLATION&quot; equiv-text=&quot;{{name}}&quot;/&gt;</code></td>
1881
+ <td><code>{name}</code></td>
1882
+ <td><code>&lt;x id=&quot;INTERPOLATION&quot; equiv-text=&quot;{{name}}&quot;/&gt;</code></td>
1883
+ </tr>
1884
+ </tbody></table>
1885
+ <p>A translation that <strong>drops, renames, or adds</strong> a placeholder relative to the
1886
+ source is:</p>
1887
+ <ul>
1888
+ <li><strong>rejected</strong> by AI translation (not written), and</li>
1889
+ <li>flagged by the <code>placeholder-mismatch</code> rule.</li>
1890
+ </ul>
1891
+ <p>Because everything is canonical internally, the editor and the checks only ever
1892
+ look for <code>{name}</code> — they never mistake an unrelated colon or percent sign (a
1893
+ time like <code>(h:m)</code>, a ratio <code>a:b</code>) for a placeholder.</p>
1894
+ <blockquote>
1895
+ <p><strong>printf formats</strong> (<code>%s</code>, <code>%d</code> in gettext and Apple <code>.stringsdict</code>) are
1896
+ <strong>export-only and lossy</strong> — they sit outside the canonical guarantee. See
1897
+ <em>Lossy conversions</em> below.</p>
1898
+ </blockquote>
1899
+ <h2>Escaping a literal <code>{name}</code></h2>
1900
+ <p>To write text that <em>looks</em> like a placeholder but should be left alone, use
1901
+ <strong>ICU apostrophe quoting</strong>:</p>
1902
+ <table>
1903
+ <thead>
1904
+ <tr>
1905
+ <th>You write</th>
1906
+ <th>You get</th>
1907
+ </tr>
1908
+ </thead>
1909
+ <tbody><tr>
1910
+ <td><code>&#39;{&#39;</code></td>
1911
+ <td>a literal <code>{</code></td>
1912
+ </tr>
1913
+ <tr>
1914
+ <td><code>&#39;{name}&#39;</code></td>
1915
+ <td>the literal text <code>{name}</code> (not a token)</td>
1916
+ </tr>
1917
+ <tr>
1918
+ <td><code>&#39;&#39;</code></td>
1919
+ <td>a literal apostrophe <code>&#39;</code></td>
1920
+ </tr>
1921
+ </tbody></table>
1922
+ <p>Quoted spans are treated as plain text, so <code>&#39;{name}&#39;</code> is never flagged by the
1923
+ checks or altered by AI translation. ARB output (ICU) preserves the quoting on
1924
+ round-trip.</p>
1925
+ <h2>ICU plural and select</h2>
1926
+ <p>ICU constructs like:</p>
1927
+ <pre><code>{count, plural, one {# item} other {# items}}
1928
+ {gender, select, male {he} female {she} other {they}}
1929
+ </code></pre>
1930
+ <p>are preserved structurally. The <code>icu-mismatch</code> rule flags a string where one side (source or translation) is an ICU plural/select and the other isn&#39;t. See also Plurals for the dedicated plural-key model.</p>
1931
+ <h2>Lossy conversions</h2>
1932
+ <p>Not every format can represent every construct. When export hits one it can&#39;t faithfully convert, it <strong>warns and writes safe output</strong> rather than emitting something broken:</p>
1933
+ <pre><code>warning [icu-unsupported] cart.items @ de: not representable in target format; wrote fallback
1934
+ </code></pre>
1935
+ <p>Treat these warnings as a prompt to simplify the string or pick a different adapter for that output.</p>
1936
+ <h2>Related</h2>
1937
+ <ul>
1938
+ <li>Plurals · Output Formats · Checks and Validation · How Translation Works</li>
1939
+ </ul>
1940
+ `,text:`Placeholders and ICU Translations must keep the machinery the source string carries: interpolation placeholders and ICU plural/select structure. Glotfile protects both during translation, validation, and export. One canonical form, converted on export Glotfile stores every placeholder in a single canonical form — — no matter what style the source file used. Import normalises to it; export converts it to each adapter's native style. So you edit and validate against one syntax, and each output file still gets the flavour its framework expects. Format Native style Example On import → stored On export ← stored --- --- --- --- --- Flutter ARB ICU named (already canonical) Vue I18n single braces (already canonical) Laravel colon Rails YAML percent-brace i18next double braces Angular XLIFF placeholder element A translation that drops, renames, or adds a placeholder relative to the source is: - rejected by AI translation (not written), and - flagged by the rule. Because everything is canonical internally, the editor and the checks only ever look for — they never mistake an unrelated colon or percent sign (a time like , a ratio ) for a placeholder. printf formats ( , in gettext and Apple ) are export-only and lossy — they sit outside the canonical guarantee. See Lossy conversions below. Escaping a literal To write text that looks like a placeholder but should be left alone, use ICU apostrophe quoting : You write You get --- --- a literal the literal text (not a token) a literal apostrophe Quoted spans are treated as plain text, so is never flagged by the checks or altered by AI translation. ARB output (ICU) preserves the quoting on round-trip. ICU plural and select ICU constructs like: are preserved structurally. The rule flags a string where one side (source or translation) is an ICU plural/select and the other isn't. See also Plurals for the dedicated plural-key model. Lossy conversions Not every format can represent every construct. When export hits one it can't faithfully convert, it warns and writes safe output rather than emitting something broken: Treat these warnings as a prompt to simplify the string or pick a different adapter for that output. Related - Plurals · Output Formats · Checks and Validation · How Translation Works`},{id:`guides/continuous-integration`,title:`Continuous Integration`,section:`Guides`,html:`<h1>Continuous Integration</h1>
1941
+ <p>Glotfile is built to run in CI so a broken or stale translation state can&#39;t reach <code>main</code>. The key command is <code>glotfile check</code>; <code>glotfile lint</code> gives you finer control.</p>
1942
+ <h2>The one-liner</h2>
1943
+ <p>Add a single step that validates the catalog <strong>and</strong> confirms exports are up to date:</p>
1944
+ <pre><code class="language-bash">glotfile check
1945
+ </code></pre>
1946
+ <p><code>check</code> exits non-zero if there are any errors — a lint error <em>or</em> an <code>output-stale</code> finding (someone changed copy but forgot to run <code>glotfile export</code>). That one command is usually all you need.</p>
1947
+ <blockquote>
1948
+ <p><strong>Tip:</strong> Why <code>check</code> over <code>export</code> + <code>git diff</code> — <code>check</code> re-exports in memory and compares to disk, so you don&#39;t need to write files and diff. It also catches catalog problems (placeholder mismatches, empty translations, glossary violations) that a diff wouldn&#39;t.</p>
1949
+ </blockquote>
1950
+ <h2>What gets gated</h2>
1951
+ <table>
1952
+ <thead>
1953
+ <tr>
1954
+ <th>Failure</th>
1955
+ <th>Caught by</th>
1956
+ <th>Default severity</th>
1957
+ </tr>
1958
+ </thead>
1959
+ <tbody><tr>
1960
+ <td>Empty source / empty translation</td>
1961
+ <td><code>lint</code>, <code>check</code></td>
1962
+ <td>error</td>
1963
+ </tr>
1964
+ <tr>
1965
+ <td>Placeholder or ICU mismatch</td>
1966
+ <td><code>lint</code>, <code>check</code></td>
1967
+ <td>error</td>
1968
+ </tr>
1969
+ <tr>
1970
+ <td>Glossary violation</td>
1971
+ <td><code>lint</code>, <code>check</code></td>
1972
+ <td>error</td>
1973
+ </tr>
1974
+ <tr>
1975
+ <td>Length / identical-to-source / whitespace / spelling</td>
1976
+ <td><code>lint</code>, <code>check</code></td>
1977
+ <td>warn</td>
1978
+ </tr>
1979
+ <tr>
1980
+ <td>Exported file missing or stale</td>
1981
+ <td><code>check</code> only</td>
1982
+ <td>error</td>
1983
+ </tr>
1984
+ </tbody></table>
1985
+ <p>Tune severities in <code>config.lint</code> — see Checks and Validation.</p>
1986
+ <h2>GitHub Actions</h2>
1987
+ <pre><code class="language-yaml">name: i18n
1988
+ on: [pull_request]
1989
+ jobs:
1990
+ glotfile:
1991
+ runs-on: ubuntu-latest
1992
+ steps:
1993
+ - uses: actions/checkout@v4
1994
+ - uses: actions/setup-node@v4
1995
+ with:
1996
+ node-version: 22
1997
+ - run: npx glotfile check
1998
+ </code></pre>
1999
+ <blockquote>
2000
+ <p><strong>Note:</strong> No credentials needed in CI — <code>check</code> and <code>lint</code> are fully offline — only translate needs an API key. Don&#39;t put translation secrets in CI just to validate.</p>
2001
+ </blockquote>
2002
+ <h2>Failing on warnings</h2>
2003
+ <p>By default only errors fail the build. To hold the line on warnings too:</p>
2004
+ <pre><code class="language-bash">glotfile lint --max-warnings 0
2005
+ </code></pre>
2006
+ <p><code>lint</code> exits <code>1</code> when warnings exceed the threshold. Combine with <code>check</code> (run both) if you want stale-export gating <em>and</em> zero warnings.</p>
2007
+ <h2>Code scanning (SARIF)</h2>
2008
+ <p>Emit SARIF and upload it so findings appear inline on the PR, each located at its line in <code>glotfile.json</code>:</p>
2009
+ <pre><code class="language-yaml"> - run: npx glotfile lint --format sarif &gt; glotfile.sarif
2010
+ continue-on-error: true
2011
+ - uses: github/codeql-action/upload-sarif@v3
2012
+ with:
2013
+ sarif_file: glotfile.sarif
2014
+ </code></pre>
2015
+ <p><code>--format json</code> is also available for custom tooling.</p>
2016
+ <h2>Scoping a run</h2>
2017
+ <pre><code class="language-bash">glotfile lint --rule placeholder-mismatch,icu-mismatch # only the critical rules
2018
+ glotfile lint --locale fr,de # only some locales
2019
+ </code></pre>
2020
+ <h2>Related</h2>
2021
+ <ul>
2022
+ <li>lint and check · Checks and Validation · export · Translation Workflow</li>
2023
+ </ul>
2024
+ `,text:`Continuous Integration Glotfile is built to run in CI so a broken or stale translation state can't reach . The key command is ; gives you finer control. The one-liner Add a single step that validates the catalog and confirms exports are up to date: exits non-zero if there are any errors — a lint error or an finding (someone changed copy but forgot to run ). That one command is usually all you need. Tip: Why over + — re-exports in memory and compares to disk, so you don't need to write files and diff. It also catches catalog problems (placeholder mismatches, empty translations, glossary violations) that a diff wouldn't. What gets gated Failure Caught by Default severity --- --- --- Empty source / empty translation , error Placeholder or ICU mismatch , error Glossary violation , error Length / identical-to-source / whitespace / spelling , warn Exported file missing or stale only error Tune severities in — see Checks and Validation. GitHub Actions Note: No credentials needed in CI — and are fully offline — only translate needs an API key. Don't put translation secrets in CI just to validate. Failing on warnings By default only errors fail the build. To hold the line on warnings too: exits when warnings exceed the threshold. Combine with (run both) if you want stale-export gating and zero warnings. Code scanning (SARIF) Emit SARIF and upload it so findings appear inline on the PR, each located at its line in : is also available for custom tooling. Scoping a run Related - lint and check · Checks and Validation · export · Translation Workflow`},{id:`guides/keeping-translations-fresh`,title:`Keeping Translations Fresh`,section:`Guides`,html:`<h1>Keeping Translations Fresh</h1>
2025
+ <p>A translation is only correct relative to the source string it was made from. When you edit a source string, its translations may no longer match — Glotfile tracks this so nothing drifts silently.</p>
2026
+ <h2>How staleness is detected</h2>
2027
+ <p>Each translated value records the <strong>source string it was translated from</strong> (the <code>source</code> field on the value). When you change a source string, any translation whose recorded source no longer matches is flagged <strong><code>needs-review</code></strong>. See Review States.</p>
2028
+ <blockquote>
2029
+ <p><strong>Example:</strong>
2030
+ <code>auth.signIn.button</code> source <code>&quot;Sign in&quot;</code> → <code>fr: &quot;Se connecter&quot;</code> (reviewed, source <code>&quot;Sign in&quot;</code>).
2031
+ You change the source to <code>&quot;Log in&quot;</code>. The French value is now marked <code>needs-review</code> — it was translated from text that no longer exists.</p>
2032
+ </blockquote>
2033
+ <h2>Finding stale translations</h2>
2034
+ <ul>
2035
+ <li>In the Editor, filter to <strong>needs-review</strong>.</li>
2036
+ <li>Analytics counts <code>needs-review</code> per locale.</li>
2037
+ </ul>
2038
+ <h2>Fixing them</h2>
2039
+ <ol>
2040
+ <li>Review the flagged value against the new source.</li>
2041
+ <li>Edit it directly and mark it <code>reviewed</code>, <strong>or</strong></li>
2042
+ <li>Re-translate: a bare <code>glotfile translate</code> only fills <strong>empty</strong> values, so it won&#39;t touch a <code>needs-review</code> value that still has text. To have the AI redo non-empty values, run <code>glotfile translate --all</code> (or clear the stale value first, then <code>glotfile translate</code>). Either way, a value still marked <code>reviewed</code> is protected — unmark it first to have the AI redo it.</li>
2043
+ </ol>
2044
+ <h2>Why not auto-overwrite?</h2>
2045
+ <p>Glotfile flags rather than silently re-translating because a source edit might be cosmetic (a typo fix that doesn&#39;t change meaning) or substantive (a different action entirely). Only you know which — so it surfaces the change and lets you decide.</p>
2046
+ <h2>Related</h2>
2047
+ <ul>
2048
+ <li>Review States · How Translation Works · Translation Workflow</li>
2049
+ </ul>
2050
+ `,text:`Keeping Translations Fresh A translation is only correct relative to the source string it was made from. When you edit a source string, its translations may no longer match — Glotfile tracks this so nothing drifts silently. How staleness is detected Each translated value records the source string it was translated from (the field on the value). When you change a source string, any translation whose recorded source no longer matches is flagged . See Review States. Example: source → (reviewed, source ). You change the source to . The French value is now marked — it was translated from text that no longer exists. Finding stale translations - In the Editor, filter to needs-review . - Analytics counts per locale. Fixing them 1. Review the flagged value against the new source. 2. Edit it directly and mark it , or 3. Re-translate: a bare only fills empty values, so it won't touch a value that still has text. To have the AI redo non-empty values, run (or clear the stale value first, then ). Either way, a value still marked is protected — unmark it first to have the AI redo it. Why not auto-overwrite? Glotfile flags rather than silently re-translating because a source edit might be cosmetic (a typo fix that doesn't change meaning) or substantive (a different action entirely). Only you know which — so it surfaces the change and lets you decide. Related - Review States · How Translation Works · Translation Workflow`},{id:`guides/translation-workflow`,title:`Translation Workflow`,section:`Guides`,html:`<h1>Translation Workflow</h1>
2051
+ <p>The day-to-day loop, end to end. This is the same flow as Quick Start, but with the <em>why</em> behind each step.</p>
2052
+ <h2>The loop</h2>
2053
+ <pre><code>author ──▶ translate ──▶ review ──▶ export ──▶ commit
2054
+ ▲ │
2055
+ └──────────────── next feature ───────────────┘
2056
+ </code></pre>
2057
+ <h3>1. Author source copy as you build</h3>
2058
+ <p>Run <code>glotfile serve</code> and add keys with their source strings in the Editor while you build a feature. Add a one-line context for anything ambiguous — it&#39;s the highest-leverage thing you can do for translation quality. Attach a screenshot for UI-heavy strings.</p>
2059
+ <h3>2. Fill the other languages</h3>
2060
+ <pre><code class="language-bash">glotfile translate
2061
+ </code></pre>
2062
+ <p>This fills only the empty values; pass <code>--all</code> to re-translate everything. Or use the Editor&#39;s translate action. New translations land as <code>machine</code>. See How Translation Works.</p>
2063
+ <h3>3. Review</h3>
2064
+ <p>Filter the Editor to <strong>machine</strong> and check the new translations. Promote good ones to <code>reviewed</code> (which protects them from being overwritten); flag the rest as <code>needs-review</code>. Watch the Analytics panel for reviewed-vs-translated coverage.</p>
2065
+ <h3>4. Export</h3>
2066
+ <pre><code class="language-bash">glotfile export
2067
+ </code></pre>
2068
+ <p>This regenerates your apps&#39; locale files from the catalog. See Output Formats.</p>
2069
+ <h3>5. Commit</h3>
2070
+ <p>Commit <code>glotfile.json</code> together with your code and the regenerated locale files. The diff <em>is</em> the review:</p>
2071
+ <pre><code class="language-bash">git add glotfile.json lib/l10n/
2072
+ git commit -m &quot;Checkout copy + translations&quot;
2073
+ </code></pre>
2074
+ <h2>Why git-native pays off</h2>
2075
+ <p>Because the catalog is just a file in your repo:</p>
2076
+ <ul>
2077
+ <li><strong>Branching</strong> — translations live on the feature branch with the code that needs them.</li>
2078
+ <li><strong>Pull-request review</strong> — reviewers see copy changes as a normal diff.</li>
2079
+ <li><strong>Rollback</strong> — reverting a commit reverts the copy too.</li>
2080
+ <li><strong>No drift</strong> — CI can fail the build if exports are stale or the catalog has problems.</li>
2081
+ </ul>
2082
+ <h2>Related</h2>
2083
+ <ul>
2084
+ <li>Continuous Integration · Keeping Translations Fresh · How Translation Works · Review States</li>
2085
+ </ul>
2086
+ `,text:`Translation Workflow The day-to-day loop, end to end. This is the same flow as Quick Start, but with the why behind each step. The loop 1. Author source copy as you build Run and add keys with their source strings in the Editor while you build a feature. Add a one-line context for anything ambiguous — it's the highest-leverage thing you can do for translation quality. Attach a screenshot for UI-heavy strings. 2. Fill the other languages This fills only the empty values; pass to re-translate everything. Or use the Editor's translate action. New translations land as . See How Translation Works. 3. Review Filter the Editor to machine and check the new translations. Promote good ones to (which protects them from being overwritten); flag the rest as . Watch the Analytics panel for reviewed-vs-translated coverage. 4. Export This regenerates your apps' locale files from the catalog. See Output Formats. 5. Commit Commit together with your code and the regenerated locale files. The diff is the review: Why git-native pays off Because the catalog is just a file in your repo: - Branching — translations live on the feature branch with the code that needs them. - Pull-request review — reviewers see copy changes as a normal diff. - Rollback — reverting a commit reverts the copy too. - No drift — CI can fail the build if exports are stale or the catalog has problems. Related - Continuous Integration · Keeping Translations Fresh · How Translation Works · Review States`},{id:`troubleshooting-and-faq`,title:`Troubleshooting and FAQ`,section:`Help`,html:`<h1>Troubleshooting and FAQ</h1>
2087
+ <h2>Setup</h2>
2088
+ <p><strong><code>glotfile: command not found</code></strong>
2089
+ It&#39;s pre-1.0 and not yet on npm. Run from a checkout: <code>npm install &amp;&amp; npm run build &amp;&amp; node bin/glotfile.js</code>. See Installation.</p>
2090
+ <p><strong>Wrong Node version</strong>
2091
+ Glotfile needs Node <code>^20.19.0 || &gt;=22.12.0</code>. Check with <code>node -v</code>.</p>
2092
+ <h2>Translation</h2>
2093
+ <p><strong>&quot;Install the SDK for this provider&quot;</strong>
2094
+ OpenAI, OpenRouter, and Bedrock need an optional SDK. Install the one for your provider — <code>npm i openai</code> (OpenAI or OpenRouter) or <code>npm i @aws-sdk/client-bedrock-runtime</code> (Bedrock). See AI Providers.</p>
2095
+ <p><strong>No API key / auth errors</strong>
2096
+ Set the provider&#39;s credentials in your environment or a local <code>.env</code>: <code>ANTHROPIC_API_KEY</code>, <code>OPENAI_API_KEY</code>, <code>OPENROUTER_API_KEY</code>, or the AWS chain. See AI Providers.</p>
2097
+ <p><strong>A translation was skipped</strong>
2098
+ The result failed validation — a dropped placeholder, broken ICU, or an over-length value. Glotfile prints the reason and leaves the value untranslated. See Placeholders and ICU and How Translation Works.</p>
2099
+ <p><strong>My reviewed translation didn&#39;t change after <code>translate</code></strong>
2100
+ That&#39;s intentional — <code>reviewed</code> values are protected from being overwritten. Unmark it first to re-translate.</p>
2101
+ <p><strong>Screenshots seem ignored</strong>
2102
+ The selected model may not support vision (e.g. Bedrock Meta Llama text models). The run proceeds text-only and warns how many screenshots were skipped. See Screenshots.</p>
2103
+ <h2>Validation and CI</h2>
2104
+ <p><strong><code>check</code> fails with <code>output-stale</code></strong>
2105
+ Your exported files don&#39;t match the catalog. Run <code>glotfile export</code> and commit the result. See Continuous Integration.</p>
2106
+ <p><strong>Spelling flags real words</strong>
2107
+ Add them to the custom dictionary in Settings (<code>config.spelling.customWords</code>). The same list silences both the editor&#39;s live spell check and the <code>spelling</code> lint rule. Glossary terms are accepted automatically. See Checks and Validation.</p>
2108
+ <p><strong>A rule is too noisy</strong>
2109
+ Override its severity (or turn it off) in <code>config.lint.rules</code>, or <code>ignore</code> certain key globs. See Configuration Reference.</p>
2110
+ <h2>Files and git</h2>
2111
+ <p><strong>Can I edit <code>glotfile.json</code> by hand?</strong>
2112
+ You can, but you rarely need to — the UI writes it for you, deterministically. If you do edit it, keep it valid: it&#39;s validated on load. See The State File.</p>
2113
+ <p><strong>Big diffs on every save</strong>
2114
+ Check <code>config.format</code> (<code>indent</code>, <code>sortKeys</code>, <code>finalNewline</code>). Deterministic formatting keeps diffs minimal. See The State File.</p>
2115
+ <h2>General</h2>
2116
+ <p><strong>Do I already have translations I can import?</strong>
2117
+ Import existing locale files with <code>glotfile import</code> — see import. You can also add keys via the Editor.</p>
2118
+ <p><strong>Does anything leave my machine?</strong>
2119
+ Only the AI calls you trigger. The UI is local-only; no credentials or screenshot bytes are ever logged. See AI Log.</p>
2120
+ <h2>Related</h2>
2121
+ <ul>
2122
+ <li>Home · Installation · AI Providers · Continuous Integration</li>
2123
+ </ul>
2124
+ `,text:`Troubleshooting and FAQ Setup It's pre-1.0 and not yet on npm. Run from a checkout: . See Installation. Wrong Node version Glotfile needs Node . Check with . Translation "Install the SDK for this provider" OpenAI, OpenRouter, and Bedrock need an optional SDK. Install the one for your provider — (OpenAI or OpenRouter) or (Bedrock). See AI Providers. No API key / auth errors Set the provider's credentials in your environment or a local : , , , or the AWS chain. See AI Providers. A translation was skipped The result failed validation — a dropped placeholder, broken ICU, or an over-length value. Glotfile prints the reason and leaves the value untranslated. See Placeholders and ICU and How Translation Works. My reviewed translation didn't change after That's intentional — values are protected from being overwritten. Unmark it first to re-translate. Screenshots seem ignored The selected model may not support vision (e.g. Bedrock Meta Llama text models). The run proceeds text-only and warns how many screenshots were skipped. See Screenshots. Validation and CI fails with Your exported files don't match the catalog. Run and commit the result. See Continuous Integration. Spelling flags real words Add them to the custom dictionary in Settings ( ). The same list silences both the editor's live spell check and the lint rule. Glossary terms are accepted automatically. See Checks and Validation. A rule is too noisy Override its severity (or turn it off) in , or certain key globs. See Configuration Reference. Files and git Can I edit by hand? You can, but you rarely need to — the UI writes it for you, deterministically. If you do edit it, keep it valid: it's validated on load. See The State File. Big diffs on every save Check ( , , ). Deterministic formatting keeps diffs minimal. See The State File. General Do I already have translations I can import? Import existing locale files with — see import. You can also add keys via the Editor. Does anything leave my machine? Only the AI calls you trigger. The UI is local-only; no credentials or screenshot bytes are ever logged. See AI Log. Related - Home · Installation · AI Providers · Continuous Integration`}],HP={class:`flex min-h-0 flex-1 overflow-hidden`},UP={class:`flex w-56 shrink-0 flex-col overflow-hidden border-r bg-muted/30`},WP={class:`relative shrink-0 px-2 py-2`},GP={key:0,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},KP={class:`px-2 py-1 text-xs text-muted-foreground`},qP=[`onClick`],JP={class:`text-sm font-medium`},YP={key:0,class:`text-[10px] uppercase tracking-wider text-muted-foreground`},XP={key:1,class:`mt-0.5 line-clamp-2 text-xs text-muted-foreground`},ZP={class:`bg-primary/20 text-foreground`},QP={key:1,class:`flex flex-col gap-1 overflow-y-auto px-2 pb-3`},$P=[`onClick`],eF={class:`min-w-0 flex-1 overflow-y-auto`},tF=[`innerHTML`],nF=P({__name:`DocsView`,setup(e){let t=[``,`Getting Started`,`Web UI`,`CLI`,`Concepts`,`AI Translation`,`Reference`,`Guides`,`Help`],n=j(VP[0]?.id??``),r=j(``),i=K(()=>{let e=new Map;for(let n of t)e.set(n,[]);for(let t of VP)e.has(t.section)||e.set(t.section,[]),e.get(t.section).push(t);return t.map(t=>({section:t,pages:e.get(t)??[]})).filter(e=>e.pages.length>0)}),a=K(()=>{let e=r.value.trim().toLowerCase();if(!e)return[];let t=[];for(let n of VP){let r=n.text.toLowerCase(),i=n.title.toLowerCase().includes(e),a=r.indexOf(e);if(a===-1&&!i)continue;if(a===-1){t.push({id:n.id,title:n.title,section:n.section,before:``,match:``,after:``});continue}let o=Math.max(0,a-40),s=Math.min(n.text.length,a+e.length+80);t.push({id:n.id,title:n.title,section:n.section,before:(o>0?`…`:``)+n.text.slice(o,a),match:n.text.slice(a,a+e.length),after:n.text.slice(a+e.length,s)+(s<n.text.length?`…`:``)})}return t}),o=K(()=>VP.find(e=>e.id===n.value)??VP[0]);function s(e){n.value=e,r.value=``}return(e,t)=>(R(),z(`div`,HP,[V(`nav`,UP,[V(`div`,WP,[H(M(md),{class:`pointer-events-none absolute left-4 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),_r(V(`input`,{"onUpdate:modelValue":t[0]||=e=>r.value=e,type:`search`,placeholder:`Search docs…`,class:`w-full rounded-md border bg-background py-1 pl-7 pr-7 text-sm outline-none focus:ring-2 focus:ring-ring`},null,512),[[Fl,r.value]]),r.value?(R(),z(`button`,{key:0,type:`button`,class:`absolute right-4 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:t[1]||=e=>r.value=``},[H(M(Ad),{class:`size-3.5`})])):W(``,!0)]),r.value.trim()?(R(),z(`div`,GP,[V(`div`,KP,A(a.value.length)+` result`+A(a.value.length===1?``:`s`),1),(R(!0),z(L,null,F(a.value,e=>(R(),z(`button`,{key:e.id,type:`button`,class:`w-full rounded-md px-2 py-1.5 text-left transition-colors hover:bg-accent hover:text-accent-foreground`,onClick:t=>s(e.id)},[V(`div`,JP,A(e.title),1),e.section?(R(),z(`div`,YP,A(e.section),1)):W(``,!0),e.match?(R(),z(`div`,XP,[U(A(e.before),1),V(`mark`,ZP,A(e.match),1),U(A(e.after),1)])):W(``,!0)],8,qP))),128))])):(R(),z(`div`,QP,[(R(!0),z(L,null,F(i.value,(e,t)=>(R(),z(L,{key:e.section},[e.section?(R(),z(`div`,{key:0,class:k([`px-2 pb-1 text-xs font-semibold uppercase tracking-wider text-muted-foreground`,t>0?`mt-3`:``])},A(e.section),3)):W(``,!0),(R(!0),z(L,null,F(e.pages,e=>(R(),z(`button`,{key:e.id,type:`button`,class:k([`w-full rounded-md px-2 py-1 text-left text-sm transition-colors`,n.value===e.id?`bg-primary text-primary-foreground`:`text-foreground hover:bg-accent hover:text-accent-foreground`]),onClick:t=>n.value=e.id},A(e.title),11,$P))),128))],64))),128))]))]),V(`div`,eF,[V(`div`,{class:`prose prose-sm dark:prose-invert mx-auto max-w-3xl px-8 py-6`,innerHTML:o.value?.html},null,8,tF)])]))}}),rF={en:`English`,fr:`French`,de:`German`,es:`Spanish`,pt:`Portuguese`,it:`Italian`,nl:`Dutch`,ca:`Catalan`,pl:`Polish`,ru:`Russian`,uk:`Ukrainian`,cs:`Czech`,sk:`Slovak`,sv:`Swedish`,da:`Danish`,no:`Norwegian`,nb:`Norwegian Bokmål`,fi:`Finnish`,tr:`Turkish`,el:`Greek`,ro:`Romanian`,hu:`Hungarian`,bg:`Bulgarian`,hr:`Croatian`,sr:`Serbian`,sl:`Slovenian`,ja:`Japanese`,ko:`Korean`,zh:`Chinese`,ar:`Arabic`,he:`Hebrew`,hi:`Hindi`,th:`Thai`,vi:`Vietnamese`,id:`Indonesian`,ms:`Malay`,fa:`Persian`};function iF(e){let[t=``,n]=e.split(/[-_]/),r=t.toLowerCase(),i=n&&/^[A-Za-z]{2}$/.test(n)?n.toUpperCase():void 0,a=rF[r]??e;return{code:e,name:i?`${a} (${i})`:a}}var aF={class:`p-6`},oF={class:`flex items-start gap-3 pr-6`},sF={class:`grid h-10 w-10 shrink-0 place-items-center rounded-lg border border-primary/25 bg-primary/10 font-mono text-[13px] font-semibold leading-none tracking-tight text-primary`},cF={class:`min-w-0`},lF={class:`font-medium text-foreground`},uF={class:`font-mono text-[12px]`},dF={class:`mt-4 flex items-center gap-4 rounded-lg border border-border bg-muted/40 px-3.5 py-2.5`},fF={class:`flex flex-col`},pF={class:`text-[17px] font-semibold leading-none tabular-nums`},mF={class:`flex flex-col`},hF={class:`text-[17px] font-semibold leading-none tabular-nums`},gF={class:`ml-auto flex items-center gap-1.5 whitespace-nowrap text-[11px] text-muted-foreground`},_F={class:`mt-5`},vF={class:`!flex min-w-0 items-center gap-2`},yF={class:`font-mono text-[13px]`},bF={class:`truncate text-[13px] text-muted-foreground`},xF={class:`flex items-center gap-2`},SF={class:`font-mono text-[13px]`},CF={class:`text-[13px] text-muted-foreground`},wF={class:`mt-4`},TF={class:`flex items-center justify-between`},EF={class:`whitespace-nowrap text-[12px] tabular-nums text-muted-foreground`},DF={class:`mt-1.5 flex flex-wrap gap-1.5 rounded-lg border border-border bg-muted/30 p-2.5`},OF=[`disabled`,`onClick`],kF={class:`font-mono`},AF={key:0,class:`ml-0.5 rounded-sm bg-primary/15 px-1 text-[9px] font-semibold uppercase tracking-wide text-primary`},jF={key:0,class:`mt-4`},MF={class:`overflow-hidden rounded-lg border border-border`},NF={class:`ml-auto font-mono text-[11px] text-muted-foreground/70`},PF={key:0,class:`divide-y divide-border border-t border-border gf-content-fade`},FF={class:`shrink-0 font-mono text-foreground`},IF={class:`ml-auto truncate text-right text-muted-foreground`},LF={key:0,class:`px-3 py-1.5 text-[11px] text-muted-foreground/70`},RF={class:`flex items-center gap-2 border-t border-border px-6 py-4`},zF={class:`ml-1 flex cursor-pointer select-none items-center gap-1.5 text-[12px] text-muted-foreground`},BF={class:`ml-auto`},VF={class:`flex flex-col items-center justify-center gap-4 p-6 py-8 text-center`},HF={key:0,class:`mt-1 text-[13px] text-muted-foreground`},UF={class:`p-6`},WF={class:`flex flex-col items-center gap-3 pt-1 text-center`},GF={class:`grid h-12 w-12 place-items-center rounded-full bg-success-bg text-success ring-1 ring-success-border`},KF={class:`font-semibold text-foreground tabular-nums`},qF={class:`font-semibold text-foreground`},JF={key:0,class:`mt-5 overflow-hidden rounded-lg border border-warning-border bg-warning-bg/60`},YF={class:`whitespace-nowrap text-[13px] font-medium text-warning`},XF={key:0,class:`max-h-44 divide-y divide-warning-border/40 overflow-auto border-t border-warning-border/70 gf-content-fade`},ZF={class:`flex items-center border-t border-border px-6 py-4`},QF={class:`ml-auto`},$F={class:`p-6`},eI={class:`flex items-start gap-3 pr-6`},tI={class:`grid h-10 w-10 shrink-0 place-items-center rounded-full bg-destructive-soft text-destructive`},nI={class:`min-w-0`},rI={class:`flex items-center border-t border-border px-6 py-4`},iI={class:`ml-auto`},aI=P({__name:`ImportWizard`,emits:[`dismiss`,`imported`],setup(e,{expose:t,emit:n}){let r=n,i=j(!0),a=j(`confirm`),o=j(null),s=j(``),c=j({}),l=j(!1),u=j(!1),d=j(null),f=j(``),p=j(!0);t({init:m});async function m(){try{let e=await Pf();if(!e.found){r(`dismiss`);return}o.value=e,s.value=e.sourceLocale}catch{r(`dismiss`)}}let h={"laravel-php":{label:`Laravel PHP`,glyph:`</>`,file:`lang/{locale}/*.php`},"vue-i18n-json":{label:`Vue i18n JSON`,glyph:`{ }`,file:`locales/{locale}.json`},"flutter-arb":{label:`Flutter ARB`,glyph:`arb`,file:`lib/l10n/app_{locale}.arb`},"apple-strings":{label:`Apple .strings`,glyph:``,file:`{locale}.lproj/Localizable.strings`}},g=K(()=>h[o.value?.format??``]??{label:o.value?.format??``,glyph:`{}`,file:``});function _(e){return e===s.value||!c.value[e]}function v(e){e!==s.value&&(c.value={...c.value,[e]:!c.value[e]})}let y=K(()=>o.value?o.value.locales.filter(_):[]),b=K(()=>y.value.length),x=K(()=>o.value?Math.max(0,o.value.keyCount-o.value.sampleKeys.length):0);async function S(){if(o.value){a.value=`importing`;try{d.value=await Ff({format:o.value.format,sourceLocale:s.value,locales:y.value,cldr:p.value}),a.value=`done`}catch(e){f.value=e.message,a.value=`error`}}}function C(e){e||a.value!==`importing`&&(a.value===`done`?r(`imported`):r(`dismiss`))}return(e,t)=>(R(),B(M(Oh),{open:i.value,"onUpdate:open":C},{default:N(()=>[H(M(hg),null,{default:N(()=>[H(M(pg),{class:`fixed inset-0 z-50 bg-foreground/40 gf-content-fade`}),H(M(ug),{class:`fixed left-1/2 top-1/2 z-50 w-[28rem] max-w-[calc(100vw-2rem)] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-card text-card-foreground shadow-2xl focus:outline-none gf-content-fade`,onInteractOutside:t[9]||=Yl(()=>{},[`prevent`])},{default:N(()=>[a.value===`confirm`&&o.value?(R(),z(L,{key:0},[V(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[0]||=e=>r(`dismiss`)},[H(M(Ad),{class:`size-4`})]),V(`div`,aF,[V(`div`,oF,[V(`div`,sF,A(g.value.glyph),1),V(`div`,cF,[H(M(gg),{class:`text-base font-semibold leading-tight`},{default:N(()=>[...t[10]||=[U(`Import your translations`,-1)]]),_:1}),H(M(dg),{class:`mt-0.5 text-[13px] text-muted-foreground`},{default:N(()=>[t[11]||=U(` Found a `,-1),V(`span`,lF,A(g.value.label),1),t[12]||=U(` setup in `,-1),V(`span`,uF,A(g.value.file),1),t[13]||=U(`. `,-1)]),_:1})])]),V(`div`,dF,[V(`div`,fF,[V(`span`,pF,A(o.value.keyCount.toLocaleString()),1),t[14]||=V(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`keys detected`,-1)]),t[17]||=V(`div`,{class:`h-7 w-px bg-border`},null,-1),V(`div`,mF,[V(`span`,hF,A(o.value.locales.length),1),t[15]||=V(`span`,{class:`mt-1 whitespace-nowrap text-[11px] text-muted-foreground`},`locales`,-1)]),V(`div`,gF,[H(M(Ku),{class:`size-3.5 opacity-70`}),t[16]||=U(` Detected automatically `,-1)])]),V(`div`,_F,[H(M(yC),{class:`flex items-center gap-1.5 whitespace-nowrap`},{default:N(()=>[...t[18]||=[U(` Source language `,-1),V(`span`,{class:`text-[12px] font-normal text-muted-foreground`},`· the original text`,-1)]]),_:1}),H(M(yb),{modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e},{default:N(()=>[H(M(VS),{class:`mt-1.5`},{default:N(()=>[V(`span`,vF,[H(vw,{code:s.value,size:14},null,8,[`code`]),V(`span`,yF,A(s.value),1),V(`span`,bF,A(M(iF)(s.value).name),1)])]),_:1}),H(M(HS),null,{default:N(()=>[(R(!0),z(L,null,F(o.value.locales,e=>(R(),B(M(WS),{key:e,value:e},{default:N(()=>[V(`span`,xF,[H(vw,{code:e,size:14},null,8,[`code`]),V(`span`,SF,A(e),1),V(`span`,CF,A(M(iF)(e).name),1)])]),_:2},1032,[`value`]))),128))]),_:1})]),_:1},8,[`modelValue`])]),V(`div`,wF,[V(`div`,TF,[H(M(yC),{class:`whitespace-nowrap`},{default:N(()=>[...t[19]||=[U(`Locales to import`,-1)]]),_:1}),V(`span`,EF,A(b.value)+` of `+A(o.value.locales.length),1)]),V(`div`,DF,[(R(!0),z(L,null,F(o.value.locales,e=>(R(),B(M(ax),{key:e},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,disabled:e===s.value,class:k([`group inline-flex h-7 shrink-0 items-center gap-1.5 whitespace-nowrap rounded-md border pl-1.5 pr-2 text-[12px] transition-colors`,e===s.value?`border-primary/40 bg-primary/10 cursor-default`:_(e)?`border-input bg-card text-foreground hover:bg-muted`:`border-dashed border-border bg-transparent text-muted-foreground hover:bg-muted/50`]),onClick:t=>v(e)},[H(vw,{code:e,size:14},null,8,[`code`]),V(`span`,kF,A(e),1),e===s.value?(R(),z(`span`,AF,`src`)):(R(),z(`span`,{key:1,class:k([`grid size-3.5 place-items-center rounded-[3px] border`,_(e)?`border-primary bg-primary text-primary-foreground`:`border-border text-transparent`])},[H(M(Ou),{class:`size-2.5`,"stroke-width":3})],2))],10,OF)]),_:2},1024),H(M(PC),null,{default:N(()=>[U(A(e===s.value?`Source language — always imported`:_(e)?`Click to exclude`:`Click to include`),1)]),_:2},1024)]),_:2},1024))),128))])]),o.value.sampleKeys.length?(R(),z(`div`,jF,[V(`div`,MF,[V(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2 text-[13px] text-muted-foreground transition-colors hover:bg-muted/50`,onClick:t[2]||=e=>l.value=!l.value},[H(M(Au),{class:k([`size-3.5 shrink-0 transition-transform`,l.value?`rotate-90`:``])},null,8,[`class`]),t[20]||=V(`span`,{class:`whitespace-nowrap`},`Preview sample keys`,-1),V(`span`,NF,A(g.value.glyph),1)]),l.value?(R(),z(`div`,PF,[(R(!0),z(L,null,F(o.value.sampleKeys,e=>(R(),z(`div`,{key:e.key,class:`flex items-baseline gap-3 px-3 py-1.5 text-[12px]`},[V(`span`,FF,A(e.key),1),V(`span`,IF,A(e.value),1)]))),128)),x.value>0?(R(),z(`div`,LF,` + `+A(x.value.toLocaleString())+` more keys `,1)):W(``,!0)])):W(``,!0)])])):W(``,!0)]),V(`div`,RF,[H(M(Q),{variant:`ghost`,size:`sm`,onClick:t[3]||=e=>r(`dismiss`)},{default:N(()=>[...t[21]||=[U(`Skip`,-1)]]),_:1}),H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`label`,zF,[_r(V(`input`,{type:`checkbox`,"data-testid":`cldr-toggle`,"onUpdate:modelValue":t[4]||=e=>p.value=e,class:`size-3.5 accent-primary`},null,512),[[Il,p.value]]),t[22]||=U(` Convert plurals to CLDR categories `,-1)])]),_:1}),H(M(PC),{class:`max-w-xs`},{default:N(()=>[...t[23]||=[U(`Rewrite exact =N plural selectors (e.g. =1) into each language's CLDR plural categories, the way Crowdin does.`,-1)]]),_:1})]),_:1}),V(`div`,BF,[H(M(Q),{"data-testid":`import-btn`,disabled:b.value===0,onClick:S},{default:N(()=>[H(M(jd),{class:`size-4`}),U(` Import `+A(b.value)+` `+A(b.value===1?`locale`:`locales`),1)]),_:1},8,[`disabled`])])])],64)):a.value===`importing`?(R(),z(L,{key:1},[H(M(gg),{class:`sr-only`},{default:N(()=>[...t[24]||=[U(`Importing translations`,-1)]]),_:1}),V(`div`,VF,[H(M(ed),{class:`size-10 text-primary gf-spin`}),V(`div`,null,[t[25]||=V(`div`,{class:`text-sm font-semibold`},`Importing translations…`,-1),o.value?(R(),z(`div`,HF,` Reading `+A(o.value.keyCount.toLocaleString())+` keys across `+A(b.value)+` locales `,1)):W(``,!0)])])],64)):a.value===`done`&&d.value?(R(),z(L,{key:2},[V(`div`,UF,[V(`div`,WF,[V(`div`,GF,[H(M(Ou),{class:`size-6`,"stroke-width":2.5})]),V(`div`,null,[H(M(gg),{class:`text-base font-semibold`},{default:N(()=>[...t[26]||=[U(`Import complete`,-1)]]),_:1}),H(M(dg),{class:`mt-1 text-[13px] text-muted-foreground`},{default:N(()=>[V(`span`,KF,A(d.value.keyCount.toLocaleString())+` keys`,1),t[27]||=U(` across `,-1),V(`span`,qF,A(d.value.localeCount)+` locales`,1),t[28]||=U(` imported. `,-1)]),_:1})])]),d.value.warnings.length?(R(),z(`div`,JF,[V(`button`,{type:`button`,class:`flex w-full items-center gap-2 px-3 py-2.5 text-left`,onClick:t[5]||=e=>u.value=!u.value},[H(M(Ed),{class:`size-3.5 shrink-0 text-warning`}),V(`span`,YF,A(d.value.warnings.length)+` `+A(d.value.warnings.length===1?`warning`:`warnings`),1),t[29]||=V(`span`,{class:`whitespace-nowrap text-[12px] text-warning/70`},`· import still succeeded`,-1),H(M(Au),{class:k([`ml-auto size-3.5 shrink-0 text-warning transition-transform`,u.value?`rotate-90`:``])},null,8,[`class`])]),u.value?(R(),z(`ul`,XF,[(R(!0),z(L,null,F(d.value.warnings,(e,t)=>(R(),z(`li`,{key:t,class:`px-3 py-2 text-[12px] text-muted-foreground`},A(e),1))),128))])):W(``,!0)])):W(``,!0)]),V(`div`,ZF,[V(`div`,QF,[H(M(Q),{onClick:t[6]||=e=>r(`imported`)},{default:N(()=>[t[30]||=U(`Open editor `,-1),H(M(xu),{class:`size-4`})]),_:1})])])],64)):a.value===`error`?(R(),z(L,{key:3},[V(`button`,{type:`button`,class:`absolute right-3.5 top-3.5 z-10 grid h-7 w-7 place-items-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`,onClick:t[7]||=e=>r(`dismiss`)},[H(M(Ad),{class:`size-4`})]),V(`div`,$F,[V(`div`,eI,[V(`div`,tI,[H(M(Ed),{class:`size-5`})]),V(`div`,nI,[H(M(gg),{class:`text-base font-semibold`},{default:N(()=>[...t[31]||=[U(`Couldn't import translations`,-1)]]),_:1}),H(M(dg),{class:`mt-1 text-[13px] text-muted-foreground`},{default:N(()=>[U(A(f.value),1)]),_:1})])])]),V(`div`,rI,[V(`div`,iI,[H(M(Q),{variant:`outline`,onClick:t[8]||=e=>r(`dismiss`)},{default:N(()=>[...t[32]||=[U(`Dismiss`,-1)]]),_:1})])])],64)):W(``,!0)]),_:1})]),_:1})]),_:1},8,[`open`]))}}),oI=`glotfile-theme`,sI=[`system`,`light`,`dark`],cI=e=>sI.includes(e);function lI(){let e=localStorage.getItem(oI);return cI(e)?e:`system`}var uI=window.matchMedia(`(prefers-color-scheme: dark)`),dI=j(uI.matches);uI.addEventListener(`change`,e=>{dI.value=e.matches});var fI=j(lI()),pI=K(()=>fI.value===`system`?dI.value:fI.value===`dark`);function mI(){document.documentElement.classList.toggle(`dark`,pI.value)}function hI(){Dr(pI,mI,{immediate:!0,flush:`sync`})}function gI(e){fI.value=e,localStorage.setItem(oI,e),sf({theme:e}).catch(()=>{})}async function _I(){try{let{theme:e}=await of();cI(e)&&e!==fI.value&&(fI.value=e,localStorage.setItem(oI,e))}catch{}}var vI={class:`flex flex-col items-center gap-0.5 rounded-lg bg-black/15 p-0.5`},yI=[`data-mode`,`aria-label`,`aria-pressed`,`onClick`],bI=P({__name:`ThemeToggle`,setup(e){let t=[{value:`light`,label:`Light`,icon:Sd},{value:`system`,label:`System`,icon:rd},{value:`dark`,label:`Dark`,icon:id}];return(e,n)=>(R(),z(`div`,vI,[(R(),z(L,null,F(t,e=>H(M(ax),{key:e.value},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,"data-mode":e.value,"aria-label":e.label,"aria-pressed":M(fI)===e.value,class:k(M(LS)(`flex size-8 items-center justify-center rounded-md transition-colors`,M(fI)===e.value?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>M(gI)(e.value)},[(R(),B(aa(e.icon),{class:`size-4`}))],10,yI)]),_:2},1024),H(M(PC),{side:`right`},{default:N(()=>[U(A(e.label),1)]),_:2},1024)]),_:2},1024)),64))]))}}),xI=P({__name:`Kbd`,props:{class:{}},setup(e){return(e,t)=>(R(),z(`kbd`,{class:k(M(LS)(`inline-flex h-5 min-w-5 items-center justify-center rounded border bg-muted px-1.5 font-mono text-xs font-medium text-muted-foreground`,e.$props.class))},[I(e.$slots,`default`)],2))}}),SI=[{route:`editor`,keys:[`g`,`e`],label:`Editor`},{route:`analytics`,keys:[`g`,`a`],label:`Analytics`},{route:`glossary`,keys:[`g`,`g`],label:`Glossary`},{route:`screenshots`,keys:[`g`,`i`],label:`Screenshots`},{route:`settings`,keys:[`g`,`s`],label:`Settings`},{route:`activity`,keys:[`g`,`l`],label:`Activity`},{route:`docs`,keys:[`g`,`d`],label:`Docs`}];function CI(e,t){if(e.pending===`g`){let e=SI.find(e=>e.keys[1]===t);return{state:{pending:null},action:e?{type:`navigate`,route:e.route}:null}}return t===`g`?{state:{pending:`g`},action:null}:t===`?`?{state:{pending:null},action:{type:`toggleHelp`}}:{state:{pending:null},action:null}}var wI={class:`flex w-14 shrink-0 flex-col items-center gap-1 bg-rail py-3 text-rail-foreground`},TI=[`aria-label`,`onClick`],EI={key:0,class:`flex items-center gap-0.5`},DI={class:`mt-auto flex flex-col items-center gap-1.5`},OI={class:`font-mono text-[10px] text-rail-foreground/50`},kI=P({__name:`NavRail`,setup(e){let t=Dp(),n=[{id:`editor`,label:`Editor`,icon:Qu},{id:`analytics`,label:`Analytics`,icon:Du},{id:`glossary`,label:`Glossary`,icon:Eu},{id:`screenshots`,label:`Screenshots`,icon:Xu},{id:`settings`,label:`Settings`,icon:hd},{id:`activity`,label:`Activity`,icon:pd},{id:`docs`,label:`Docs`,icon:wu}].map(e=>({...e,keys:SI.find(t=>t.route===e.id)?.keys}));return(e,r)=>(R(),B(M(tx),{"delay-duration":300},{default:N(()=>[V(`nav`,wI,[r[0]||=V(`div`,{class:`mb-3 flex size-9 items-center justify-center rounded-md bg-primary font-mono text-base font-semibold text-primary-foreground`},` G `,-1),(R(!0),z(L,null,F(M(n),e=>(R(),B(M(ax),{key:e.id},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,"aria-label":e.label,class:k(M(LS)(`relative flex size-10 items-center justify-center rounded-md transition-colors`,M(t)===e.id?`bg-primary text-primary-foreground`:`text-rail-foreground/70 hover:bg-white/10 hover:text-rail-foreground`)),onClick:t=>M(Ep)(e.id)},[(R(),B(aa(e.icon),{class:`size-5`}))],10,TI)]),_:2},1024),H(M(PC),{side:`right`,class:`flex items-center gap-2`},{default:N(()=>[V(`span`,null,A(e.label),1),e.keys?(R(),z(`span`,EI,[(R(!0),z(L,null,F(e.keys,(e,t)=>(R(),B(xI,{key:t},{default:N(()=>[U(A(e),1)]),_:2},1024))),128))])):W(``,!0)]),_:2},1024)]),_:2},1024))),128)),V(`div`,DI,[H(bI),V(`span`,OI,`v`+A(M(`0.7.2`)),1)])])]),_:1}))}}),AI={class:`flex flex-col gap-1`},jI={class:`flex items-center gap-1`},MI={class:`flex items-center justify-between py-1 text-sm`},NI={class:`flex items-center gap-1`},PI=P({__name:`ShortcutsDialog`,props:{open:{type:Boolean,required:!0},openModifiers:{}},emits:[`update:open`],setup(e){let t=Za(e,`open`);return(e,n)=>(R(),B(M(Oh),{open:t.value,"onUpdate:open":n[0]||=e=>t.value=e},{default:N(()=>[H(M(bC),{class:`max-w-sm`},{default:N(()=>[H(M(xC),null,{default:N(()=>[H(M(CC),null,{default:N(()=>[...n[1]||=[U(`Keyboard shortcuts`,-1)]]),_:1})]),_:1}),V(`ul`,AI,[(R(!0),z(L,null,F(M(SI),e=>(R(),z(`li`,{key:e.route,class:`flex items-center justify-between py-1 text-sm`},[V(`span`,null,A(e.label),1),V(`span`,jI,[(R(!0),z(L,null,F(e.keys,(e,t)=>(R(),B(xI,{key:t},{default:N(()=>[U(A(e),1)]),_:2},1024))),128))])]))),128)),V(`li`,MI,[n[3]||=V(`span`,null,`Search keys`,-1),V(`span`,NI,[H(xI,null,{default:N(()=>[...n[2]||=[U(`/`,-1)]]),_:1})])])])]),_:1})]),_:1},8,[`open`]))}}),FI=j(!1),II=1e3;function LI(){let e={pending:null},t=null;function n(){t!==null&&(clearTimeout(t),t=null)}function r(r){if(r.metaKey||r.ctrlKey||r.altKey||r.repeat)return;let i=r.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.isContentEditable))return;let a=r.key.toLowerCase(),o=!!document.querySelector(`[role="dialog"],[role="menu"],[role="listbox"]`),s=a===`?`&&FI.value;if(o&&!s)return;let c=CI(e,a);e=c.state,n(),e.pending===`g`&&(t=window.setTimeout(()=>{e={pending:null},t=null},II));let{action:l}=c;l&&(l.type===`navigate`?Ep(l.route):FI.value=!FI.value,r.preventDefault())}Ki(()=>window.addEventListener(`keydown`,r)),Xi(()=>{n(),window.removeEventListener(`keydown`,r)})}var RI={class:`flex h-screen bg-background text-foreground`},zI={class:`flex min-w-0 flex-1 flex-col`},BI={class:`flex h-12 shrink-0 items-center justify-between border-b px-4`},VI={class:`flex min-w-0 items-center gap-3`},HI={key:0,class:`flex min-w-0 items-center gap-1.5`},UI={class:`max-w-[12rem] shrink-0 truncate font-mono text-sm font-medium`},WI={class:`truncate`},GI={key:0,class:`text-muted-foreground`},KI={class:`text-sm font-semibold`},qI={class:`font-mono`},JI={class:`flex min-h-0 flex-1 flex-col overflow-hidden`},YI=P({__name:`App`,setup(e){let t=Dp();LI();let n=dn(null),r=j(null),i=j([]),a=K(()=>[...i.value].sort((e,t)=>{let n=e.relDir?`${e.relDir}/${e.name}`:e.name,r=t.relDir?`${t.relDir}/${t.name}`:t.name;return n.localeCompare(r)})),o=j(!1),s=j(null);async function c(){n.value=await Md()}Ki(async()=>{await c();try{[r.value,i.value]=await Promise.all([Ef(),Df()]),document.title=r.value.project?`${r.value.project} — Glotfile`:`Glotfile`}catch(e){$.error(e.message)}n.value&&Object.keys(n.value.keys).length===0&&(o.value=!0)});function l(){location.reload()}async function u(e){if(e!==r.value?.path)try{await Of(e),location.reload()}catch(e){$.error(e.message)}}let d=K(()=>({editor:`Editor`,analytics:`Analytics`,glossary:`Glossary`,screenshots:`Screenshots`,settings:`Settings`,activity:`Activity`,docs:`Docs`})[t.value]),f=K(()=>{if(!n.value)return null;let{sourceLocale:e,locales:t}=n.value.config;return{source:e,targets:t.filter(t=>t!==e)}});return(e,n)=>(R(),B(M(tx),{"delay-duration":300},{default:N(()=>[V(`div`,RI,[H(kI),V(`div`,zI,[V(`header`,BI,[V(`div`,VI,[r.value?(R(),z(`div`,HI,[H(M(ax),null,{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`span`,UI,A(r.value.project),1)]),_:1}),H(M(PC),{side:`bottom`,class:`font-mono`},{default:N(()=>[U(A(r.value.dir),1)]),_:1})]),_:1}),H(M(Au),{class:`size-3.5 shrink-0 text-muted-foreground`}),H(M(rb),null,{default:N(()=>[H(M(lb),{"as-child":``},{default:N(()=>[H(M(Q),{variant:`outline`,size:`sm`,class:`max-w-[16rem] gap-1.5 font-mono`},{default:N(()=>[V(`span`,WI,A(r.value.name),1),H(M(ju),{class:`size-3.5 shrink-0 text-muted-foreground`})]),_:1})]),_:1}),H(M(TC),{align:`start`,class:`w-max`},{default:N(()=>[(R(!0),z(L,null,F(a.value,e=>(R(),B(M(EC),{key:e.path,class:`font-mono`,onSelect:t=>u(e.path)},{default:N(()=>[H(M(Ou),{class:k([`size-4 shrink-0`,e.path===r.value.path?`opacity-100`:`opacity-0`])},null,8,[`class`]),V(`span`,null,[e.relDir?(R(),z(`span`,GI,A(e.relDir)+`/`,1)):W(``,!0),U(A(e.name),1)])]),_:2},1032,[`onSelect`]))),128))]),_:1})]),_:1})])):W(``,!0),V(`h1`,KI,A(d.value),1)]),f.value?(R(),B(M(ax),{key:0},{default:N(()=>[H(M(ux),{"as-child":``},{default:N(()=>[V(`button`,{type:`button`,class:`shrink-0 font-mono text-xs text-muted-foreground transition-colors hover:text-foreground`,onClick:n[0]||=e=>M(Ep)(`settings`)},A(f.value.source)+` → `+A(f.value.targets.length)+` `+A(f.value.targets.length===1?`locale`:`locales`),1)]),_:1}),H(M(PC),{side:`bottom`,class:`max-w-[28rem] leading-relaxed`},{default:N(()=>[V(`div`,qI,A(f.value.targets.join(`, `)||`—`),1),n[4]||=V(`div`,{class:`mt-1 text-background/60`},`Click to manage in Settings`,-1)]),_:1})]),_:1})):W(``,!0)]),V(`main`,JI,[M(t)===`editor`?(R(),B(yO,{key:0})):M(t)===`analytics`?(R(),B(pA,{key:1})):M(t)===`glossary`?(R(),B(zA,{key:2})):M(t)===`screenshots`?(R(),B(pP,{key:3})):M(t)===`settings`?(R(),B(ZN,{key:4})):M(t)===`activity`?(R(),B(BP,{key:5})):M(t)===`docs`?(R(),B(nF,{key:6})):W(``,!0)])]),H(M(pC)),H(PI,{open:M(FI),"onUpdate:open":n[1]||=e=>un(FI)?FI.value=e:null},null,8,[`open`]),o.value?(R(),B(aI,{key:0,ref_key:`wizardRef`,ref:s,onVnodeMounted:n[2]||=e=>s.value?.init(),onDismiss:n[3]||=e=>o.value=!1,onImported:l},null,512)):W(``,!0)])]),_:1}))}});hI(),au(YI).mount(`#app`),_I(),qD(),fT();