@verbaly/studio 0.64.0 → 0.66.0
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.
- package/README.md +4 -0
- package/dist/cli.js +21 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.js +21 -7
- package/dist/index.js.map +1 -1
- package/dist/ui/assets/index-D9b-Fbtu.js +3 -0
- package/dist/ui/index.html +1 -1
- package/package.json +6 -6
- package/dist/ui/assets/index-DojQOxSy.js +0 -3
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible,d=()=>{};function f(e){for(var t=0;t<e.length;t++)e[t]()}function p(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var m=1024,h=2048,g=4096,_=8192,v=16384,y=32768,b=1<<25,x=65536,S=1<<19,ee=1<<20,C=1<<25,w=1<<21,te=1<<22,T=1<<23,ne=Symbol(`$state`),re=Symbol(`component`),ie=Symbol(``),ae=Symbol(`attributes`),oe=Symbol(`class`),se=Symbol(`style`),ce=Symbol(`text`),le=Symbol(`form reset`),E=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ue=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`),de={},D=Symbol(`uninitialized`),fe=`http://www.w3.org/1999/xhtml`;function pe(){console.warn(`https://svelte.dev/e/derived_inert`)}function me(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function he(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function ge(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var O=!1;function _e(e){O=e}var k;function A(e){if(e===null)throw me(),de;return k=e}function ve(){return A(Qt(k))}function j(e){if(O){if(Qt(k)!==null)throw me(),de;k=e}}function ye(e=1){if(O){for(var t=e,n=k;t--;)n=Qt(n);k=n}}function be(e=!0){for(var t=0,n=k;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=Qt(n);e&&n.remove(),n=i}}function xe(e){if(!e||e.nodeType!==8)throw me(),de;return e.data}function Se(e){return e===this.v}function Ce(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function we(e){return!Ce(e,this.v)}function Te(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function Ee(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function De(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Oe(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function ke(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Ae(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function je(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Me(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ne(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Pe(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Fe(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var M=null;function Ie(e){M=e}function Le(e,t=!1,n){M={p:M,i:!1,c:null,e:null,s:e,x:null,r:U,l:null}}function Re(e){var t=M,n=t.e;if(n!==null){t.e=null;for(var r of n)pn(r)}return e!==void 0&&(t.x=e),t.i=!0,M=t.p,ze(e)}function ze(e={}){return i(e,re,{value:!0}),e}function Be(){return!0}var Ve=[];function He(){var e=Ve;Ve=[],f(e)}function Ue(e){if(Ve.length===0&&!_t){var t=Ve;queueMicrotask(()=>{t===Ve&&He()})}Ve.push(e)}function We(){for(;Ve.length>0;)He()}var Ge=~(h|g|m);function N(e,t){e.f=e.f&Ge|t}function Ke(e){e.f&512||e.deps===null?N(e,m):N(e,g)}function qe(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),N(e,m)}function Je(e,t){if(t){let t=document.body;e.autofocus=!0,Ue(()=>{document.activeElement===t&&e.focus()})}}function Ye(e){O&&Zt(e)!==null&&en(e)}var Xe=!1;function Ze(){Xe||(Xe=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[le]?.()})},{capture:!0}))}function Qe(e){var t=H,n=U;In(null),Ln(null);try{return e()}finally{In(t),Ln(n)}}function $e(e,t,n,r=n){e.addEventListener(t,()=>Qe(n));let i=e[le];e[le]=i?()=>{i(),r(!0)}:()=>r(!0),Ze()}function et(e,t,n,r){let i=Be()?it:st;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=U,c=tt(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){on(e,s)}nt()}}var d=rt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>ot(e))).then(u).catch(e=>on(e,s)).finally(d)}l?l.then(()=>{c(),f(),nt()}):f()}function tt(){var e=U,t=H,n=M,r=F;return function(i=!0){Ln(e),In(t),Ie(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function nt(e=!0){Ln(null),In(null),Ie(null),e&&F?.deactivate()}function rt(){var e=U,t=e.b,n=F,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function it(e){var t=2|h;return U!==null&&(U.f|=S),{ctx:M,deps:null,effects:null,equals:Se,f:t,fn:e,reactions:null,rv:0,v:D,wv:0,parent:U,ac:null}}var at=Symbol(`obsolete`);function ot(e,t,n){let r=U;r===null&&Ee();var i=void 0,a=Pt(D),o=!H,s=new Set;return gn(()=>{var t=U,n=p();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==E&&n.reject(e)}).finally(nt)}catch(e){n.reject(e),nt()}var c=F;if(o){if(t.f&32768)var l=rt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(at);else for(let e of s.values())e.reject(at);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==at&&(c.activate(),t?(a.f|=T,Rt(a,t)):(a.f&8388608&&(a.f^=T),Rt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),dn(()=>{for(let e of s)e.reject(at)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function P(e){let t=it(e);return zn(t),t}function st(e){let t=it(e);return t.equals=we,t}function ct(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Cn(t[n])}}function lt(e){var t,n=U,r=e.parent;if(!Nn&&r!==null&&e.v!==D&&r.f&24576)return pe(),e.v;Ln(r);try{ct(e),t=Zn(e)}finally{Ln(n)}return t}function ut(e){var t=lt(e);if(!e.equals(t)&&(e.wv=Jn(),(!F?.is_fork||e.deps===null)&&(F===null?e.v=t:(F.capture(e,t,!0),mt?.capture(e,t,!0)),e.deps===null))){N(e,m);return}Nn||(ht===null?Ke(e):(un()||F?.is_fork)&&ht.set(e,t))}function dt(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac!==null&&Qe(()=>{t.ac.abort(E),t.ac=null}),t.fn!==null&&(t.teardown=d),er(t,0),xn(t))}function ft(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&tr(t)}var pt=null,F=null,mt=null,ht=null,gt=null,_t=!1,vt=!1,yt=null,bt=null,xt=0,St=1,Ct=class e{id=St++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){pt===null?pt=this:(pt.#n=this,this.#t=pt),pt=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)N(r,h),t(r);for(r of n.m)N(r,g),t(r)}this.#p.add(e)}#g(){var e=[];for(let i of this.#c)if(!(i.f&16384||!(i.f&6144))){for(var t=i,n=!1;t.parent!==null;){t=t.parent;var r=t.f;if(r&96){if(!(r&1024)){n=!0;break}t.f^=m}}n||e.push(t)}return this.#c=[],e}#_(){this.#e=!0;for(let e of this.#u)this.#d.delete(e),N(e,h),this.schedule(e);for(let e of this.#d)N(e,g),this.schedule(e);this.apply();for(var t=yt=[],n=[],r=bt=[];this.#c.length>0;){xt++>1e3&&(this.#S(),Tt());for(let e of this.#g())try{this.#v(e,t,n)}catch(t){throw At(e),this.#h()||this.discard(),t}}if(F=null,r.length>0){var i=e.ensure();for(let e of r)i.schedule(e)}if(yt=null,bt=null,this.#h()){this.#x(n),this.#x(t);for(let[e,t]of this.#f)kt(e,t);r.length>0&&F.#_();return}let a=this.#y();if(a){this.#x(n),this.#x(t),a.#b(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),mt=this,Dt(n),Dt(t),mt=null,this.#s?.resolve();var o=F;if(this.#a===0&&(this.#c.length===0||o!==null)&&this.#S(),this.#c.length>0){if(o!==null){for(let e of this.#c)o.#c.push(e);this.#c=[]}else o=this}o!==null&&(Mt.clear(),o.#_())}#v(e,t,n){e.f^=m;for(var r=e.first;r!==null;){var i=r.f,a=!!(i&96);if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=m:i&4?t.push(r):Yn(r)&&(i&16&&this.#d.add(r),tr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#y(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#b(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null&&!(e.f&2&&!(e.f&6144)))for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),N(i,h),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),F=this,this.#_()}#x(e){for(var t=0;t<e.length;t+=1)qe(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==D&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),ht?.set(e,t)),this.is_fork||(e.v=t)}activate(){F=this}deactivate(){F=null,ht=null}flush(){try{vt=!0,F=this,this.#_()}finally{xt=0,gt=null,yt=null,bt=null,vt=!1,F=null,ht=null,Mt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(at);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Ue(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=p()).promise}static ensure(){if(F===null){let t=F=new e;!vt&&!_t&&Ue(()=>{t.#e||t.flush()})}return F}apply(){ht=null}schedule(e){if(gt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}this.#c.push(e)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?pt=e:t.#t=e,this.linked=!1}}};function wt(e){var t=_t;_t=!0;try{var n;for(e&&(F!==null&&!F.is_fork&&F.flush(),n=e());;){if(We(),F===null)return n;F.flush()}}finally{_t=t}}function Tt(){try{je()}catch(e){on(e,gt)}}var Et=null;function Dt(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Yn(r)&&(Et=new Set,tr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Tn(r),Et?.size>0)){Mt.clear();for(let e of Et){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)Et.has(n)&&(Et.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||tr(n)}}Et.clear()}}Et=null}}function Ot(e){F.schedule(e)}function kt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),N(e,m);for(var n=e.first;n!==null;)kt(n,t),n=n.next}}function At(e){N(e,m);for(var t=e.first;t!==null;)At(t),t=t.next}var jt=new Set,Mt=new Map,Nt=!1;function Pt(e,t){return{f:0,v:e,reactions:null,equals:Se,rv:0,wv:0}}function I(e,t){let n=Pt(e,t);return zn(n),n}function Ft(e,t=!1,n=!0){let r=Pt(e);return t||(r.equals=we),r}function L(e,t,n=!1){return H!==null&&(!Fn||H.f&131072)&&Be()&&H.f&4325394&&(Rn===null||!Rn.has(e))&&Pe(),Rt(e,n?Ht(t):t,bt)}var It=null,Lt=0;function Rt(e,t,n=null){if(!e.equals(t)){Nn?Mt.set(e,t):Mt.has(e)||Mt.set(e,e.v);var r=Ct.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&<(t),ht===null&&Ke(t)}e.wv=Jn(),It=null,Lt=0,Vt(e,h,n),It=null,Be()&&U!==null&&U.f&1024&&!(U.f&96)&&(Hn===null?Un([e]):Hn.push(e)),!r.is_fork&&jt.size>0&&!Nt&&zt()}return t}function zt(){Nt=!1;for(let e of jt){e.f&1024&&N(e,g);let t;try{t=Yn(e)}catch{t=!0}t&&tr(e)}jt.clear()}function Bt(e){L(e,e.v+1)}function Vt(e,t,n){var r=e.reactions;if(r!==null){var i=Be(),a=r.length;if(Lt+=a,Lt>1e5&&It===null&&(It=new Set),It!==null){if(It.has(e))return;It.add(e)}for(var o=0;o<a;o++){var s=r[o],c=s.f;if(i||s!==U){var l=(c&h)===0;if(l&&N(s,t),c&131072)jt.add(s);else if(c&2){var u=s;ht?.delete(u),Vt(u,g,n)}else if(l){var d=s;c&16&&Et!==null&&Et.add(d),n===null?Ot(d):n.push(d)}}}}}function Ht(t){if(typeof t!=`object`||!t||ne in t||re in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=I(0),u=null,d=Kn,f=e=>{if(Kn===d)return e();var t=H,n=Kn;In(null),qn(d);var r=e();return In(t),qn(n),r};return i&&r.set(`length`,I(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&Me();var i=r.get(t);return i===void 0?f(()=>{var e=I(n.value,u);return r.set(t,e),e}):L(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>I(D,u));r.set(t,e),Bt(o)}}else L(n,D),Bt(o);return!0},get(e,n,i){if(n===ne)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>I(Ht(s?e[n]:D),u)),r.set(n,o)),o!==void 0){var c=W(o);return c===D?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){this.has?.(e,t);var n=Reflect.getOwnPropertyDescriptor(e,t),i=r.get(t);if(i!==void 0){var a=W(i);if(a===D)return;if(n&&`value`in n)n.value=a;else return{enumerable:!0,configurable:!0,value:a,writable:!0}}return n},has(e,t){if(t===ne)return!0;var n=r.get(t),i=n!==void 0&&n.v!==D||Reflect.has(e,t);return(n!==void 0||U!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>I(i?Ht(e[t]):D,u)),r.set(t,n)),W(n)===D)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>I(D,u)),r.set(d+``,p)):L(p,D)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>I(void 0,u)),L(c,Ht(n)),r.set(t,c));else{l=c.v!==D;var m=f(()=>Ht(n));L(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&L(g,_+1)}Bt(o)}return!0},ownKeys(e){W(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==D});for(var[n,i]of r)i.v!==D&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ne()}})}function Ut(e){try{if(typeof e==`object`&&e&&ne in e)return e[ne]}catch{}return e}function Wt(e,t){return Object.is(Ut(e),Ut(t))}var Gt,Kt,qt,Jt;function Yt(){if(Gt===void 0){Gt=window,Kt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;qt=a(t,`firstChild`).get,Jt=a(t,`nextSibling`).get,u(e)&&(e[oe]=void 0,e[ae]=null,e[se]=void 0,e.__e=void 0),u(n)&&(n[ce]=void 0)}}function Xt(e=``){return document.createTextNode(e)}function Zt(e){return qt.call(e)}function Qt(e){return Jt.call(e)}function R(e,t){if(!O)return Zt(e);var n=Zt(k);if(n===null)n=k.appendChild(Xt());else if(t&&n.nodeType!==3){var r=Xt();return n?.before(r),A(r),r}return t&&rn(n),A(n),n}function $t(e,t=!1){if(!O){var n=Zt(e);return n instanceof Comment&&n.data===``?Qt(n):n}if(t){if(k?.nodeType!==3){var r=Xt();return k?.before(r),A(r),r}rn(k)}return k}function z(e,t=!1){if(!O)return Zt(e);var n=R(e,t);return j(e),n}function B(e,t=1,n=!1){let r=O?k:e;for(var i;t--;)i=r,r=Qt(r);if(!O)return r;if(n){if(r?.nodeType!==3){var a=Xt();return r===null?i?.after(a):r.before(a),A(a),a}rn(r)}return A(r),r}function en(e){e.textContent=``}function tn(){return!1}function nn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function rn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function an(e){var t=U;if(t===null)return H.f|=T,e;if(!(t.f&32768)&&!(t.f&4))throw e;on(e,t)}function on(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128&&!(t.f&33570816)){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}function sn(e){U===null&&(H===null&&Ae(e),ke()),Nn&&Oe(e)}function cn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ln(e,t){var n=U;n!==null&&n.f&8192&&(e|=_);var r={ctx:M,deps:null,nodes:null,f:e|h|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};F?.register_created_effect(r);var i=r;if(e&4)yt===null?Ct.ensure().schedule(r):yt.push(r);else if(t!==null){try{tr(r)}catch(e){throw Cn(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=x))}if(i!==null&&(i.parent=n,n!==null&&cn(i,n),H!==null&&H.f&2&&!(e&64))){var a=H;(a.effects??=[]).push(i)}return r}function un(){return H!==null&&!Fn}function dn(e){let t=ln(8,null);return N(t,m),t.teardown=e,t}function fn(e){sn(`$effect`);var t=U.f;if(!H&&t&32&&M!==null&&!M.i){var n=M;(n.e??=[]).push(e)}else return pn(e)}function pn(e){return ln(4|ee,e)}function mn(e){Ct.ensure();let t=ln(64|S,e);return(e={})=>new Promise(n=>{e.outro?En(t,()=>{Cn(t),n(void 0)}):(Cn(t),n(void 0))})}function hn(e){return ln(4,e)}function gn(e){return ln(te|S,e)}function _n(e,t=0){return ln(8|t,e)}function V(e,t=[],n=[],r=[]){et(r,t,n,t=>{ln(8,()=>{e(...t.map(W))})})}function vn(e,t=0){return ln(16|t,e)}function yn(e){return ln(32|S,e)}function bn(e){var t=e.teardown;if(t!==null){let n=Nn,r=H;Pn(!0),In(null);try{t.call(null)}catch(t){on(t,e.parent)}finally{Pn(n),In(r)}}}function xn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&Qe(()=>{e.abort(E)});var r=n.next;n.f&64?n.parent=null:Cn(n,t),n=r}}function Sn(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||Cn(t),t=n}}function Cn(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(wn(e.nodes.start,e.nodes.end),n=!0),e.f|=b,xn(e,t&&!n),er(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();bn(e),e.f^=b,e.f|=v;var i=e.parent;i!==null&&i.first!==null&&Tn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function wn(e,t){for(;e!==null;){var n=e===t?null:Qt(e);e.remove(),e=n}}function Tn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function En(e,t,n=!0){var r=[];e.f|=256,Dn(e,r,!0);var i=()=>{n&&Cn(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Dn(e,t,n){if(!(e.f&8192)){e.f^=_;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=!!(i.f&65536)||!!(i.f&32)&&!!(e.f&16);Dn(i,t,o?n:!1)}i=a}}}function On(e){e.f&=-257,kn(e,!0)}function kn(e,t){if(!(e.f&256)&&e.f&8192){e.f^=_,e.f&1024||(N(e,h),Ct.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=!!(n.f&65536)||!!(n.f&32);kn(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function An(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:Qt(n);t.append(n),n=i}}var jn=null,Mn=!1,Nn=!1;function Pn(e){Nn=e}var H=null,Fn=!1;function In(e){H=e}var U=null;function Ln(e){U=e}var Rn=null;function zn(e){H!==null&&(H.f&2097152||H.f&2)&&(Rn??=new Set).add(e)}var Bn=null,Vn=0,Hn=null;function Un(e){Hn=e}var Wn=1,Gn=0,Kn=Gn;function qn(e){Kn=e}function Jn(){return++Wn}function Yn(e){var t=e.f;if(t&2048)return!0;if(t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Yn(a)&&ut(a),a.wv>e.wv)return!0}t&512&&ht===null&&N(e,m)}return!1}function Xn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Rn!==null&&Rn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Xn(a,t,!1):t===a&&(n?N(a,h):a.f&1024&&N(a,g),Ot(a))}}function Zn(e){var t=Bn,n=Vn,r=Hn,i=H,a=Rn,o=M,s=Fn,c=Kn,l=e.f;Bn=null,Vn=0,Hn=null,H=l&96?null:e,Rn=null,Ie(e.ctx),Fn=!1,Kn=++Gn,e.ac!==null&&(Qe(()=>{e.ac.abort(E)}),e.ac=null);try{e.f|=w;var u=e.fn,d=u();e.f|=y;var f=Qn(e);if(Be()&&Hn!==null&&!Fn&&f!==null&&!(e.f&6146))for(var p=0;p<Hn.length;p++)Xn(Hn[p],e);if(i!==null&&i!==e){if(Gn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Gn;if(t!==null)for(let e of t)e.rv=Gn;Hn!==null&&(r===null?r=Hn:r.push(...Hn))}return e.f&8388608&&(e.f^=T),d}catch(t){return Qn(e),an(t)}finally{e.f^=w,Bn=t,Vn=n,Hn=r,H=i,Rn=a,Ie(o),Fn=s,Kn=c}}function Qn(e){var t=e.deps,n=F?.is_fork;if(Bn!==null){var r;if(n||er(e,Vn),t!==null&&Vn>0)for(t.length=Vn+Bn.length,r=0;r<Bn.length;r++)t[Vn+r]=Bn[r];else e.deps=t=Bn;if(un()&&e.f&512)for(r=Vn;r<t.length;r++)(t[r].reactions??=[]).push(e)}else!n&&t!==null&&Vn<t.length&&(er(e,Vn),t.length=Vn);return t}function $n(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(Bn===null||!n.call(Bn,r))){var s=r;s.f&512&&(s.f^=512),s.v!==D&&Ke(s),s.ac!==null&&Qe(()=>{s.ac.abort(E),s.ac=null,N(s,h)}),dt(s),er(s,0)}}function er(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)$n(e,n[r])}function tr(e){var t=e.f;if(!(t&16384)){N(e,m);var n=U,r=Mn;U=e,Mn=!(t&96);try{t&16777232?Sn(e):xn(e),bn(e);var i=Zn(e);e.teardown=typeof i==`function`?i:null,e.wv=Wn}finally{Mn=r,U=n}}}async function nr(){await Promise.resolve(),wt()}function W(e){var t=!!(e.f&2);if(jn?.add(e),H!==null&&!Fn&&!(U!==null&&U.f&16384)&&(Rn===null||!Rn.has(e))){var r=H.deps;if(H.f&2097152)e.rv<Gn&&(e.rv=Gn,Bn===null&&r!==null&&r[Vn]===e?Vn++:Bn===null?Bn=[e]:Bn.push(e));else{H.deps??=[],n.call(H.deps,e)||H.deps.push(e);var i=e.reactions;i===null?e.reactions=[H]:n.call(i,H)||i.push(H)}}if(Nn&&Mt.has(e))return Mt.get(e);if(t){var a=e;if(Nn){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||ir(a))&&(o=lt(a)),Mt.set(a,o),o}var s=!(a.f&512)&&!Fn&&H!==null&&(Mn||!!(H.f&512)),c=(a.f&y)===0;Yn(a)&&(s&&(a.f|=512),ut(a)),s&&!c&&(ft(a),rr(a))}if(ht?.has(e))return ht.get(e);if(e.f&8388608)throw e.v;return e.v}function rr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(ft(t),rr(t))}function ir(e){if(e.v===D)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Mt.has(t)||t.f&2&&ir(t))return!0;return!1}function ar(e){var t=Fn;try{return Fn=!0,e()}finally{Fn=t}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var or=[`touchstart`,`touchmove`];function sr(e){return or.includes(e)}var cr=Symbol(`events`),lr=new Set,ur=new Set;function dr(e,t,n,r={}){function i(e){if(r.capture||gr.call(t,e),!e.cancelBubble)return Qe(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?(i.__removed=!1,Ue(()=>{i.__removed||t.addEventListener(e,i,r)})):t.addEventListener(e,i,r),i}function fr(e,t,n,r,i){var a={capture:r,passive:i},o=dr(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&dn(()=>{o.__removed=!0,t.removeEventListener(e,o,a)})}function G(e,t,n){(t[cr]??={})[e]=n}function pr(e){for(var t=0;t<e.length;t++)lr.add(e[t]);for(var n of ur)n(e)}var mr=null,hr=!1;function gr(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;mr=e,hr||(hr=!0,setTimeout(()=>{hr=!1,mr=null}));var s=0,c=mr===e&&e[cr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[cr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=H,f=U;In(null),Ln(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[cr]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[cr]=t,delete e.currentTarget,In(d),Ln(f)}}}var _r=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function vr(e){return _r?.createHTML(e)??e}function yr(e){var t=nn(`template`);return t.innerHTML=vr(e.replaceAll(`<!>`,`<!---->`)),t.content}function br(e,t){var n=U;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function K(e,t){var n=!!(t&1),r=!!(t&2),i,a=!e.startsWith(`<!>`);return()=>{if(O)return br(k,null),k;i===void 0&&(i=yr(a?e:`<!>`+e),n||(i=Zt(i)));var t=r||Kt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Zt(t),s=t.lastChild;br(o,s)}else br(t,t);return t}}function xr(e,t,n=`svg`){var r=!e.startsWith(`<!>`),i=!!(t&1),a=`<${n}>${r?e:`<!>`+e}</${n}>`,o;return()=>{if(O)return br(k,null),k;if(!o){var e=Zt(yr(a));if(i)for(o=document.createDocumentFragment();Zt(e);)o.appendChild(Zt(e));else o=Zt(e)}var t=o.cloneNode(!0);if(i){var n=Zt(t),r=t.lastChild;br(n,r)}else br(t,t);return t}}function Sr(e,t){return xr(e,t,`svg`)}function Cr(e=``){if(!O){var t=Xt(e+``);return br(t,t),t}var n=k;return n.nodeType===3?rn(n):(n.before(n=Xt()),A(n)),br(n,n),n}function wr(){if(O)return br(k,null),k;var e=document.createDocumentFragment(),t=document.createComment(``),n=Xt();return e.append(t,n),br(t,n),e}function q(e,t){if(O){var n=U;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=k),ve();return}e!==null&&e.before(t)}function Tr(e){let t=0,n=Pt(0),r;return()=>{un()&&(W(n),_n(()=>(t===0&&(r=ar(()=>e(()=>Bt(n)))),t+=1,()=>{Ue(()=>{--t,t===0&&(r?.(),r=void 0,Bt(n))})})))}}var Er=x|S;function Dr(e,t,n,r){new Or(e,t,n,r)}var Or=class{parent;is_pending=!1;transform_error;#e;#t=O?k:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Tr(()=>(this.#m=Pt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=U;t.b=this,t.f|=128,n(e)},this.parent=U.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=vn(()=>{if(O){let e=this.#t;ve();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#y():this.#g()}else this.#b()},Er),O&&(this.#e=k)}#g(){try{this.#a=yn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed,{reset:n,invoke_onerror:r}=this.#v(e);Ue(r),t&&(this.#s=yn(()=>{t(this.#e,()=>e,()=>n)}))}#v(e){var t=!1,n=!1;let r=()=>{if(t){ge();return}t=!0,n&&Fe(),this.#s!==null&&En(this.#s,()=>{this.#s=null}),this.#S(()=>{this.#b()})};return{reset:r,invoke_onerror:()=>{try{n=!0,this.#n.onerror?.(e,r),n=!1}catch(e){on(e,this.#i&&this.#i.parent)}}}}#y(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=yn(()=>e(this.#e)),Ue(()=>{var e=this.#c=document.createDocumentFragment(),t=Xt(),n=!1;if(e.append(t),this.#a=this.#S(()=>{try{return yn(()=>this.#r(t))}catch(e){try{this.error(e),n=!0}catch(e){on(e,this.#i.parent)}return null}}),this.#a===null){this.#c=null,n&&this.#x(F);return}this.#u===0&&(this.#e.before(e),this.#c=null,En(this.#o,()=>{this.#o=null}),this.#x(F))}))}#b(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=yn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();An(this.#a,e);let t=this.#n.pending;this.#o=yn(()=>t(this.#e))}else this.#x(F)}catch(e){this.error(e)}}#x(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){qe(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#S(e){var t=U,n=H,r=M;Ln(this.#i),In(this.#i),Ie(this.#i.ctx);try{return Ct.ensure(),e()}finally{Ln(t),In(n),Ie(r)}}#C(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#C(e,t);return}this.#u+=e,this.#u===0&&(this.#x(t),this.#o&&En(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#C(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ue(()=>{this.#d=!1,this.#m&&Rt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),W(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;F?.is_fork?(this.#a&&F.skip_effect(this.#a),this.#o&&F.skip_effect(this.#o),this.#s&&F.skip_effect(this.#s),F.oncommit(()=>{this.#w(e)})):this.#w(e)}#w(e){this.#a&&=(Cn(this.#a),null),this.#o&&=(Cn(this.#o),null),this.#s&&=(Cn(this.#s),null),O&&(A(this.#t),ye(),A(be()));let t=this.#n.failed,n=e=>{let{reset:n,invoke_onerror:r}=this.#v(e);r(),t&&(this.#s=this.#S(()=>{try{return yn(()=>{var r=U;r.b=this,r.f|=128,t(this.#e,()=>e,()=>n)})}catch(e){return on(e,this.#i.parent),null}}))};Ue(()=>{var t;try{t=this.transform_error(e)}catch(e){on(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(n,e=>on(e,this.#i&&this.#i.parent)):n(t)})}};function J(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[ce]??=e.nodeValue)&&(e[ce]=n,e.nodeValue=`${n}`)}function kr(e,t){return jr(e,t)}var Ar=new Map;function jr(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){Yt();var l=void 0,u=mn(()=>{var s=n??t.appendChild(Xt());Dr(s,{pending:()=>{}},t=>{Le({});var n=M;if(o&&(n.c=o),a&&(i.$$events=a),O&&br(t,null),l=e(t,i)||ze(),O&&(U.nodes.end=k,k===null||k.nodeType!==8||k.data!==`]`))throw me(),de;Re()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=sr(r);for(let e of[t,document]){var a=Ar.get(e);a===void 0&&(a=new Map,Ar.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,gr,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(lr)),ur.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=Ar.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,gr),r.delete(e),r.size===0&&Ar.delete(n)):r.set(e,i)}ur.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return Mr.set(l,u),l}var Mr=new WeakMap,Nr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)On(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(On(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(Cn(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();An(r,t),t.append(Xt()),this.#n.set(e,{effect:r,fragment:t})}else Cn(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),En(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(Cn(n.effect),this.#n.delete(e))};ensure(e,t){var n=F,r=tn();if(t&&!this.#t.has(e)&&!this.#n.has(e)){if(r){var i=document.createDocumentFragment(),a=Xt();i.append(a),this.#n.set(e,{effect:yn(()=>t(a)),fragment:i})}else this.#t.set(e,yn(()=>t(this.anchor)))}if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else O&&(this.anchor=k),this.#a(n)}};function Y(e,t,n=!1){var r;O&&(r=k,ve());var i=new Nr(e),a=n?x:0;function o(e,t){if(O){var n=xe(r);if(e!==parseInt(n.substring(1))){var a=be();A(a),i.anchor=a,_e(!1),i.ensure(e,t),_e(!0);return}}i.ensure(e,t)}vn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Pr(e,t){return t}function Fr(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];En(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Ir(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=i.length===0&&n!==null&&e.pending.size===0;if(l){var u=n,d=u.parentNode;en(d),d.append(u),e.items.clear()}Ir(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function Ir(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=C,An(a,document.createDocumentFragment())):Cn(t[i],n)}}var Lr;function X(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=O?A(Zt(u)):u.appendChild(Xt())}O&&ve();var d=null,f=st(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,zr(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=C,Vr(d,null,c)):On(d):En(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:vn(()=>{p=W(f);var e=p.length;let t=!1;O&&xe(c)===`[!`!=(e===0)&&(c=be(),A(c),_e(!1),t=!0);for(var r=new Set,u=F,v=tn(),y=0;y<e;y+=1){O&&k.nodeType===8&&k.data===`]`&&(c=k,t=!0,_e(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&Rt(S.v,b),S.i&&Rt(S.i,y),v&&u.unskip_effect(S.e)):(S=Br(l,h?c:Lr??=Xt(),b,x,y,o,n,i),h||(S.e.f|=C),l.set(x,S)),r.add(x)}if(e===0&&s&&!d&&(h?d=yn(()=>s(c)):(d=yn(()=>s(Lr??=Xt())),d.f|=C)),e>r.size&&De(``,``,``),O&&e>0&&A(be()),!h){if(m.set(u,r),v){for(let[e,t]of l)r.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u)}t&&_e(!0),W(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,O&&(c=k)}function Rr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function zr(e,t,n,i,a){var o=!!(i&8),s=t.length,c=e.items,l=Rr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(On(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432){if(_.f^=C,_===l)Vr(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Hr(e,d,_),Hr(e,_,y),Vr(_,y,n),d=_,p=[],m=[],l=Rr(d.next);continue}}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)Vr(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Hr(e,S.prev,ee.next),Hr(e,d,S),Hr(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),Vr(_,l,n),Hr(e,_.prev,_.next),Hr(e,_,d===null?e.effect.first:d.next),Hr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Rr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Rr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Ir(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var w=[];if(u!==void 0)for(_ of u)_.f&8192||w.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&w.push(l),l=Rr(l.next);var te=w.length;if(te>0){var T=i&4&&s===0?n:null;if(o){for(v=0;v<te;v+=1)w[v].nodes?.a?.measure();for(v=0;v<te;v+=1)w[v].nodes?.a?.fix()}Fr(e,w,T)}}o&&Ue(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Br(e,t,n,r,i,a,o,s){var c=o&1?o&16?Pt(n):Ft(n,!1,!1):null,l=o&2?Pt(i):null;return{v:c,i:l,e:yn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function Vr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=Qt(r);if(a.before(r),r===i)return;r=o}}function Hr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Ur(e,t,...n){var r=new Nr(e);vn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},x)}var Wr=[...`
|
|
2
|
-
\r\f\xA0\v`];function Gr(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Wr.includes(r[o-1]))&&(s===r.length||Wr.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function Kr(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function qr(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function Jr(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\/\*.*?\*\//g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(qr)),i&&c.push(...Object.keys(i).map(qr));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=qr(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=Kr(r)),i&&(n+=Kr(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function Yr(e,t,n,r,i,a){var o=e[oe];if(O||o!==n||o===void 0){var s=Gr(n,r,a);(!O||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[oe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Xr(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function Zr(e,t,n,r){var i=e[se];if(O||i!==t){var a=Jr(t,r);(!O||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[se]=t}else r&&(Array.isArray(r)?(Xr(e,n?.[0],r[0]),Xr(e,n?.[1],r[1],`important`)):Xr(e,n,r));return r}function Qr(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function $r(t,n){var r=t.__defaultValue,i=t.multiple,a=i?r??[]:null;if(!i||e(a)){var o=t.selectedIndex,s=n&&i?new Set(t.selectedOptions):null;for(var c of t.options){var l=ni(c);Qr(c,i?a.includes(l):Wt(l,r))}if(n){if(s!==null)for(c of t.options){var u=s.has(c);c.selected!==u&&(c.selected=u)}else t.selectedIndex!==o&&(t.selectedIndex=o)}}}function ei(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return he();for(var i of t.options)i.selected=n.includes(ni(i));return}for(i of t.options)if(Wt(ni(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(t.selectedIndex=-1)}function ti(e){var t=new MutationObserver(t=>{t.every(ri)||(`__defaultValue`in e&&$r(e,!1),`__value`in e&&ei(e,e.__value))});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),dn(()=>{t.disconnect()})}function ni(e){return`__value`in e?e.__value:e.value}function ri(e){if(e.target.closest(`selectedcontent`)!==null)return!0;if(e.type===`childList`){var t=[...e.addedNodes,...e.removedNodes];return t.length>0&&t.every(e=>e.nodeName===`SELECTEDCONTENT`)}return!1}var ii=Symbol(`is custom element`),ai=Symbol(`is html`),oi=ue?`link`:`LINK`;function si(e){if(O){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Z(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Z(e,`checked`,null),e.checked=r}}};e[le]=n,Ue(n),Ze()}}function ci(e,t){var n=li(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Z(e,t,n,r){var i=li(e);O&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===oi)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ie]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&di(e).has(t)?e[t]=n:e.setAttribute(t,n))}function li(e){return e[ae]??={[ii]:e.nodeName.includes(`-`),[ai]:e.namespaceURI===fe}}var ui=new Map;function di(e){var t=e.getAttribute(`is`)||e.nodeName,n=ui.get(t);if(n)return n;ui.set(t,n=new Set);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.add(s);i=l(i)}return n}function fi(e,t,n=t){var r=new WeakSet;$e(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=pi(e)?mi(a):a,n(a),F!==null&&r.add(F),await nr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(O&&e.defaultValue!==e.value||ar(t)==null&&e.value)&&(n(pi(e)?mi(e.value):e.value),F!==null&&r.add(F)),_n(()=>{var n=t();if(e===document.activeElement){var i=F;if(r.has(i))return}pi(e)&&n===mi(e.value)||(e.type!==`date`||n||e.value)&&n!==e.value&&(e.value=n??``)})}function pi(e){var t=e.type;return t===`number`||t===`range`}function mi(e){return e===``?null:+e}function hi(e,t){return e===t||e?.[ne]===t}function gi(e=ze(),t,n,r){var i=M.r,a=U;return hn(()=>{var o,s;return _n(()=>{o=s,s=r?.()||[],ar(()=>{hi(n(...s),e)||(t(e,...s),o&&hi(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&hi(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function _i(e){M===null&&Te(`onMount`),fn(()=>{let t=ar(e);if(typeof t==`function`)return t})}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var vi=Sr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3.4 8.4 3 3 6.2-6.8"></path></svg>`),yi=Sr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M8 4v5"></path><path d="M8 12h.01"></path></svg>`),bi=Sr(`<svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><path d="M4 4l8 8M12 4l-8 8"></path></svg>`),xi=K(`<span class="fix svelte-1grjtup"> </span>`),Si=K(`<li class="svelte-1grjtup"><span class="mark svelte-1grjtup" aria-hidden="true"><!></span> <span class="body svelte-1grjtup"><b class="svelte-1grjtup"> </b> <span class="msg svelte-1grjtup"> </span> <!></span> <span class="sr svelte-1grjtup"> </span></li>`),Ci=K(`<section class="health svelte-1grjtup" aria-label="Health"><header class="svelte-1grjtup"><h2 class="svelte-1grjtup"> </h2> <p class="svelte-1grjtup">This is the same check <code>npx verbaly doctor</code> runs, read out loud. It looks at your
|
|
3
|
-
settings, your catalogs and the way your build is wired, and it never changes anything.</p> <button class="close svelte-1grjtup">Back to the messages</button></header> <ul class="svelte-1grjtup"></ul></section>`);function wi(e,t){Le(t,!0);let n={config:`Your settings`,cli:`The verbaly command`,catalogs:`Your catalogs`,routing:`Where the language lives in your urls`,plugin:`The piece that wires your build`,types:`The generated types`,sources:`Reading your code`,orphans:`Keys nothing in your code uses`,bundle:`What the browser downloads`,translations:`The translations themselves`},r=P(()=>t.entries.filter(e=>e.level!==`ok`).length);var i=Ci(),a=R(i),o=R(a),s=z(o,!0),c=B(o,4);j(a);var l=B(a,2);X(l,21,()=>t.entries,Pr,(e,t)=>{var r=Si(),i=R(r),a=R(i),o=e=>{q(e,vi())},s=e=>{q(e,yi())},c=e=>{q(e,bi())};Y(a,e=>{W(t).level===`ok`?e(o):W(t).level===`warn`?e(s,1):e(c,-1)}),j(i);var l=B(i,2),u=R(l),d=z(u,!0),f=B(u,2),p=z(f,!0),m=B(f,2),h=e=>{var n=xi(),r=z(n,!0);V(()=>J(r,W(t).fix)),q(e,n)};Y(m,e=>{W(t).fix&&e(h)}),j(l);var g=z(B(l,2),!0);j(r),V(()=>{Z(r,`data-level`,W(t).level),J(d,n[W(t).check]??W(t).check),J(p,W(t).message),J(g,W(t).level)}),q(e,r)}),j(l),j(i),V(()=>J(s,t.ok?`Nothing is broken`:`${W(r)} of ${t.entries.length} need you`)),G(`click`,c,function(...e){t.onClose?.apply(this,e)}),q(e,i),Re()}pr([`click`]);var Ti=new Set;function Ei(e){Ti.has(e)||(Ti.add(e),console.warn(`[verbaly] ${e}`))}var Di=200,Oi=new Map;function ki(e,t,n){let r=e.get(t);return r||(e.size>=Di&&e.delete(e.keys().next().value),r=n(),e.set(t,r)),r}function Ai(e){return ki(Oi,e,()=>new Intl.DisplayNames(e,{type:`language`}))}function ji(e,t=e){try{return Ai(t).of(e)??e}catch{return e}}var Mi=/\{\s*[a-zA-Z0-9_]+\s*,\s*(?:plural|selectordinal|select|number|date|time)\b/;function Ni(e){return Mi.test(e)}function Pi(e){let t=0,n=()=>e.charAt(t),r=()=>{for(;t<e.length&&/\s/.test(n());)t++},i=()=>{let r=``;for(;t<e.length&&/[a-zA-Z0-9_]/.test(n());)r+=e[t++];return r};function a(r){let i=[],a=``,c=()=>{a&&i.push({kind:`text`,value:a}),a=``};for(;t<e.length;){let e=n();if(e===`}`)break;e===`{`?(c(),i.push(s())):e===`#`&&r?(c(),i.push({kind:`hash`}),t++):e===`'`?a+=o():(a+=e,t++)}return c(),i}function o(){if(t++,n()===`'`)return t++,`'`;let r=n();if(r!==`{`&&r!==`}`&&r!==`#`)return`'`;let i=``;for(;t<e.length;){if(n()===`'`){if(e.charAt(t+1)===`'`){i+=`'`,t+=2;continue}return t++,i}i+=e[t++]}return i}function s(){t++,r();let o=i();if(r(),n()===`}`)return t++,{kind:`param`,name:o};n()===`,`&&t++,r();let s=i(),u={kind:`param`,name:o};if(s===`number`||s===`date`||s===`time`){r();let i=``;if(n()===`,`){for(t++,r();t<e.length&&n()!==`}`&&n()!==`,`;)i+=e[t++];i=i.trim()}return s===`number`?u.format=i===`integer`||i===`percent`||i===`currency`?i:`number`:(u.format=s,i&&(u.arg=i)),l(),u}if(s===`plural`||s===`selectordinal`||s===`select`){s===`selectordinal`&&(u.ordinal=!0);let i=[];if(r(),n()===`,`&&t++,r(),s!==`select`&&e.startsWith(`offset:`,t)){for(t+=7,r();t<e.length&&/[0-9]/.test(n());)t++;r()}for(;t<e.length&&n()!==`}`;){let e=c();if(r(),n()!==`{`)break;t++;let o=a(s!==`select`);n()===`}`&&t++,i.push([e,o]),r()}return n()===`}`&&t++,u.variants=i,u}return l(),u}function c(){if(n()===`=`){let r=`=`;for(t++;t<e.length&&/[0-9]/.test(n());)r+=e[t++];return r}let r=``;for(;t<e.length&&!/[\s{]/.test(n());)r+=e[t++];return r}function l(){for(;t<e.length&&n()!==`}`;)t++;n()===`}`&&t++}return a(!1)}var Fi=new Map,Ii=5e3;function Li(e,t){let n=Fi.get(e);if(!n){if(Ni(e)){if(!t)return Ri(e);n=t(e)}else n=zi(e,!1);Fi.size>=Ii&&Fi.delete(Fi.keys().next().value),Fi.set(e,n)}return n}function Ri(e){return Ei(`a message uses ICU syntax but no ICU parser is loaded: pass icu to createVerbaly (the compiler wires it when a catalog needs it, so this means it arrived after the build)`),[{kind:`text`,value:e}]}function zi(e,t){let n=[],r=``,i=0,a=()=>{r&&n.push({kind:`text`,value:r}),r=``};for(;i<e.length;){let o=e[i];if(o===`{`){if(e[i+1]===`{`){r+=`{`,i+=2;continue}let t=Bi(e,i);if(t<0){r+=e.slice(i);break}a(),n.push(Vi(e.slice(i+1,t))),i=t+1}else o===`}`&&e[i+1]===`}`?(r+=`}`,i+=2):t&&o===`#`?e[i+1]===`#`?(r+=`#`,i+=2):(a(),n.push({kind:`hash`}),i+=1):(r+=o,i+=1)}return a(),n}function Bi(e,t){let n=0,r=t;for(;r<e.length;){let t=e[r];if(t===`{`){if(e[r+1]===`{`){r+=2;continue}n+=1}else if(t===`}`){if(e[r+1]===`}`){r+=2;continue}if(--n,n===0)return r}r+=1}return-1}function Vi(e){let t=Hi(e),n=(t[0]??``).trim();if(!n)return{kind:`text`,value:`{${e}}`};let r=n.indexOf(`:`),i=(r<0?n:n.slice(0,r)).trim();if(!i)return{kind:`text`,value:`{${e}}`};let a={kind:`param`,name:i};if(r>=0){let e=n.slice(r+1).trim(),t=e.indexOf(`/`);a.format=(t<0?e:e.slice(0,t)).trim(),t>=0&&(a.arg=e.slice(t+1).trim())}if(t.length>1){a.variants=[];for(let e of t.slice(1)){let t=e.indexOf(`:`);if(t<0)continue;let n=e.slice(0,t).trim(),r=e.slice(t+1).trim();n&&a.variants.push([n,zi(r,!0)])}}return a}function Hi(e){let t=[],n=``,r=0,i=0;for(;i<e.length;){let a=e[i];if(a===`{`){if(e[i+1]===`{`){n+=`{{`,i+=2;continue}r+=1,n+=a}else if(a===`}`){if(e[i+1]===`}`){n+=`}}`,i+=2;continue}--r,n+=a}else if(a===`|`&&r===0){if(e[i+1]===`|`){n+=`|`,i+=2;continue}t.push(n),n=``}else n+=a;i+=1}return t.push(n),t}var Ui=/<(\/?)([a-zA-Z][\w-]*)(\/?)>/g,Wi=/&(?:(lt|gt|amp)|#(\d+)|#[xX]([0-9a-fA-F]+));/g,Gi={lt:`<`,gt:`>`,amp:`&`},Ki=e=>e.replace(Wi,(e,t,n,r)=>{if(t)return Gi[t];let i=n?parseInt(n,10):parseInt(r,16);return i<=1114111?String.fromCodePoint(i):e});function qi(e){Ui.lastIndex=0;let t=[],n=[],r=()=>n.length?n[n.length-1].children:t,i=e=>{e&&r().push(Ki(e))},a=0,o;for(;(o=Ui.exec(e))!==null;){let[t,s,c,l]=o;if(i(e.slice(a,o.index)),a=o.index+t.length,l)r().push({name:c,children:[]});else if(s){if(n.length&&n[n.length-1].name===c){let e=n.pop();r().push(e)}else i(t)}else n.push({name:c,children:[]})}for(i(e.slice(a));n.length;){let e=n.pop();r().push(...e.children)}return t}var Ji={done:{short:`ready`,long:`ready`},draft:{short:`unread`,long:`written by a machine, nobody has read it`},missing:{short:`missing`,long:`missing, so your visitor sees the source language`},broken:{short:`breaks`,long:`breaks your site`}},Yi={all:`everything`,missing:`missing`,draft:`unread`,broken:`breaks your site`,look:`worth a look`,clean:`nothing odd`},Xi={divergent:`the source says this two ways`,collision:`came back as two translations`,echo:`still identical to the source`,digits:`the numbers moved`,url:`a link changed`,code:`a code span changed`},Q={open:`More for this message`,close:`Close`,edit:`Edit here`,copyKey:`Copy the key`,copySource:`Copy the source text`,commit:`The commit that changed it`,origins:`Where it is used`,reading:`reading your history`,nogit:`no git here`,uncommitted:`not committed yet`,older:`not in recent commits`,scanOff:`include: [] is off`,noFiles:`no file in your code uses it`,more:e=>`and ${e} more`,copiedKey:`The key is on your clipboard.`,copiedSource:`The source text is on your clipboard.`,copiedSha:`The commit is on your clipboard.`,noClipboard:`Your browser would not let the panel write to the clipboard.`,nothingToEdit:`Tick a language in the rail and this message has a line to edit.`},Zi={cap:`Group`,all:`every group`,none:`Your keys have no groups yet.`,hint:`A key like nav.home belongs to nav.`},Qi=`Undo`,$i={find:`Find new text`,findWhy:`Reads your code and adds what your catalogs do not have yet.`,translate:`Translate what is missing`,translateWhy:`Calls your provider, so it costs money and takes minutes.`,cancel:`Not now`,working:`Reading your code`,running:`Translating`,nothingNew:`Nothing new: your catalogs already have every message your code uses.`,nothingMissing:`Nothing missing in the languages you ticked.`,pickFirst:`Tick a language to translate it.`,onlyLocale:`This project has one language, so there is nothing to translate into.`,scanOff:`Source scanning is off in your config, so there is nothing to read.`},ea={noCatalogs:`No messages yet. Studio reads the catalogs in your project, and there are none here.`,oneLocale:`One language is all you have, so there is nothing to compare it against yet.`,oneLocaleFix:`Add another one to your config and it shows up in the rail.`,pickOne:`Tick a language in the rail to see its translations.`,noMatch:`Nothing matches. Every message here is in the state you asked for.`};function ta(e){return`${e} ${e===1?`message`:`messages`}`}var na={broken:{one:`translation breaks your site`,many:`translations break your site`},missing:{one:`message is missing`,many:`messages are missing`},draft:{one:`translation nobody has read`,many:`translations nobody has read`},undefined:{one:`key your code calls has no message`,many:`keys your code calls have no message`}},ra={broken:`It lost a parameter or a tag, so the sentence would ship incomplete.`,missing:`Your visitor sees the source language until one is written.`,draft:`A machine wrote it and nobody has looked. It is already on your site.`,undefined:`Nothing defines it, so the build fails and the raw key would reach your page.`},ia={here:`Overview`,clear:`Nothing is waiting for you.`,clearWhy:`Every language is complete and the build passes.`,project:`Project`,healthy:`Healthy`,problems:`Needs a look`,checks:`checks`,history:`Last changes to your catalogs`,noHistory:`No git history for your catalog directory.`,countMessages:`Messages`,countLocales:`Languages`,open:`Open`},aa={label:`Search your messages`,scope:`Searches your text in every language, never the key.`,none:`Nothing has that text, in any language.`,oneHit:`1 message`,hits:e=>`${e} messages`,moveKeys:`move`,openKeys:`open`,closeKeys:`close`,close:`Close`,placeholder:`Search the text, not the key`},$={mark:`Look`,live:`They are already on your site.`,written:e=>`A machine wrote ${e===1?`one of them`:`${e} of them`} and nobody has read ${e===1?`it`:`them`} yet.`,sound:`Nothing is broken: the check your build runs passes on this language.`,broken:e=>`${e} ${e===1?`breaks`:`break`} your site, so ${e===1?`it is`:`they are`} first.`,flagged:e=>`${e} ${e===1?`is`:`are`} worth reading before the rest, so ${e===1?`it is`:`they are`} at the top.`,clean:`Nothing in them looks off to me.`,approve:e=>`Mark all of ${e} as read`,approveSub:e=>`${e} unread, and it undoes`,nothingUnread:`Every one of them has been read.`,chipAll:`Everything`,chipLook:`Look`,chipClean:`Nothing odd`,rest:e=>`${e} more with nothing odd. They are below and you do not need to read them.`,order:`Sorted by what is worth reading first`},oa=K(`<span> </span>`),sa=K(`<li><button><span> </span> <!></button></li>`),ca=K(`<button class="read svelte-l3e5c7"> <span class="n svelte-l3e5c7"> </span></button>`),la=K(`<li><label><input type="checkbox" class="svelte-l3e5c7"/> <span class="meta svelte-l3e5c7"><span class="name svelte-l3e5c7"> <code class="svelte-l3e5c7"> </code></span> <span class="state svelte-l3e5c7"><b class="svelte-l3e5c7"> </b><!></span></span></label> <!></li>`),ua=K(`<p class="undo svelte-l3e5c7"><span> </span> <button class="svelte-l3e5c7"> </button></p>`),da=K(`<option> </option>`),fa=K(`<h2 class="cap svelte-l3e5c7"> </h2> <select class="groups svelte-l3e5c7"><option> </option><!></select>`,1),pa=K(`<li><button type="button"><span> </span> <span class="count svelte-l3e5c7"> </span></button></li>`),ma=K(`<nav class="rail svelte-l3e5c7" aria-label="Languages and filters"><ul class="views svelte-l3e5c7"></ul> <!> <h2 class="cap svelte-l3e5c7">Languages</h2> <ul class="langs svelte-l3e5c7"></ul> <!> <!> <h2 class="cap svelte-l3e5c7">Show</h2> <ul class="filters svelte-l3e5c7"></ul></nav>`);function ha(e,t){Le(t,!0);let n=[{id:`overview`,label:`Overview`},{id:`messages`,label:`Messages`},{id:`health`,label:`Health`}],r=[`all`,`look`,`clean`,`missing`,`draft`,`broken`];function i(e){if(e.source)return[`the one you write`];let t=[];return e.broken&&t.push(`${e.broken} ${e.broken===1?`breaks`:`break`} your site`),e.missing&&t.push(`${e.missing} missing`),e.draft&&t.push(`${e.draft} nobody has read`),t.length?t:[`all read`]}function a(e){let t=i(e);return{lead:t[0],rest:t.slice(1).join(` · `)}}function o(e){return e.source?`done`:e.broken?`broken`:e.missing?`missing`:e.draft?`draft`:`done`}var s=ma(),c=R(s);X(c,21,()=>n,e=>e.id,(e,n)=>{var r=sa(),i=R(r);let a;var o=R(i),s=z(o,!0),c=B(o,2),l=e=>{var n=oa();let r;var i=z(n,!0);V(()=>{r=Yr(n,1,`bad svelte-l3e5c7`,null,r,{clean:!t.checks.bad}),J(i,t.checks.bad||`ok`)}),q(e,n)};Y(c,e=>{W(n).id===`health`&&t.checks&&e(l)}),j(i),j(r),V(()=>{a=Yr(i,1,`nav svelte-l3e5c7`,null,a,{on:t.view===W(n).id}),Z(i,`aria-current`,t.view===W(n).id?`page`:void 0),J(s,W(n).label)}),G(`click`,i,()=>t.onView(W(n).id)),q(e,r)}),j(c);var l=B(c,2);Ur(l,()=>t.actions);var u=B(l,4);X(u,21,()=>t.health,e=>e.locale,(e,n,r,i)=>{let s=P(()=>a(W(n)));var c=la(),l=R(c);let u;var d=R(l);si(d);var f=B(d,2),p=R(f),m=R(p),h=z(B(m),!0);j(p);var g=B(p,2),_=R(g),v=z(_,!0),y=B(_),b=e=>{var t=Cr();V(()=>J(t,` · ${W(s).rest??``}`)),q(e,t)};Y(y,e=>{W(s).rest&&e(b)}),j(g),j(f),j(l);var x=B(l,2),S=e=>{var r=ca(),i=R(r),a=z(B(i),!0);j(r),V(()=>{J(i,`Mark as read `),J(a,W(n).draft)}),G(`click`,r,()=>t.onRead(W(n).locale)),q(e,r)};Y(x,e=>{!W(n).source&&W(n).draft>0&&e(S)}),j(c),V((e,t,r)=>{u=Yr(l,1,`lang svelte-l3e5c7`,null,u,{source:W(n).source}),ci(d,e),d.disabled=W(n).source,J(m,`${t??``} `),J(h,W(n).locale),Z(g,`data-state`,r),J(v,W(s).lead)},[()=>t.shown.includes(W(n).locale),()=>ji(W(n).locale),()=>o(W(n))]),G(`change`,d,()=>t.onToggle(W(n).locale)),q(e,c)}),j(u);var d=B(u,2),f=e=>{var n=ua(),r=R(n),i=z(r),a=B(r,2),o=z(a,!0);j(n),V(()=>{J(i,`${t.pending.keys.length??``} in ${t.pending.locale??``} marked as read`),J(o,Qi)}),G(`click`,a,function(...e){t.onUndo?.apply(this,e)}),q(e,n)};Y(d,e=>{t.pending&&e(f)});var p=B(d,2),m=e=>{var n=fa(),r=$t(n),i=z(r,!0),a=B(r,2),o=R(a),s=z(o,!0);o.value=o.__value=``,X(B(o),17,()=>t.groups,e=>e.name,(e,t)=>{var n=da(),r=z(n),i={};V(()=>{J(r,`${W(t).name??``} (${W(t).total??``})${W(t).broken+W(t).missing+W(t).draft>0?` · ${W(t).broken+W(t).missing+W(t).draft} to do`:``}`),i!==(i=W(t).name)&&(n.value=(n.__value=i)??``)}),q(e,n)}),j(a);var c;ti(a),V(()=>{J(i,Zi.cap),Z(a,`aria-label`,Zi.cap),J(s,Zi.all),c!==(c=t.group??``)&&(a.value=(a.__value=c)??``,ei(a,c))}),G(`change`,a,e=>t.onGroup(e.currentTarget.value||null)),q(e,n)};Y(p,e=>{t.groups.length&&e(m)});var h=B(p,4);X(h,20,()=>r,e=>e,(e,n)=>{var r=pa(),i=R(r);let a;var o=R(i),s=z(o,!0),c=z(B(o,2),!0);j(i),j(r),V(()=>{a=Yr(i,1,`svelte-l3e5c7`,null,a,{on:t.state===n}),J(s,Yi[n]),J(c,t.counts[n]??0)}),G(`click`,i,()=>t.onState(n)),q(e,r)}),j(h),j(s),q(e,s),Re()}pr([`click`,`change`]);var ga=Sr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true"><path d="M5 11h12" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path></svg>`),_a=Sr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true" fill="none"><path d="M6 12.5 11 7l5 5.5" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"></path><path d="M11 8v7" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"></path></svg>`),va=Sr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true" fill="none"><path d="M4.5 12.5c1.6-2.2 3.2-2.2 4.8 0s3.2 2.2 4.8 0 3.2-2.2 4.8 0" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"></path></svg>`),ya=Sr(`<svg viewBox="0 0 22 22" width="15" height="15" aria-hidden="true"><path d="M11 6v6.4" stroke="currentColor" stroke-width="2" stroke-linecap="round"></path><circle cx="11" cy="16" r="1.2" fill="currentColor"></circle></svg>`),ba=K(`<!> <span class="sr svelte-1fu82r1"> </span>`,1);function xa(e,t){let n={done:`translated`,draft:`written by a machine`,missing:`not translated, shows in your source language`,broken:`breaks your site`};var r=ba(),i=$t(r),a=e=>{q(e,ga())},o=e=>{q(e,_a())},s=e=>{q(e,va())},c=e=>{q(e,ya())};Y(i,e=>{t.state===`done`?e(a):t.state===`missing`?e(o,1):t.state===`draft`?e(s,2):e(c,-1)});var l=z(B(i,2),!0);V(()=>J(l,n[t.state])),q(e,r)}function Sa(e,t=``,n={}){for(let[r,i]of Object.entries(e)){let e=t?`${t}.${r}`:r;typeof i==`string`?n[e]=i:i&&typeof i==`object`&&!Array.isArray(i)&&Sa(i,e,n)}return n}function Ca(e){let t={};for(let n of e.locales)t[n]=Sa(e.catalogs[n]??{});let n=new Map;for(let t of e.check.broken)t.severity===`error`&&n.set(`${t.locale}\u0000${t.key}`,t.issue);let r=new Map;for(let[t,n]of Object.entries(e.drafts))r.set(t,new Set(n));let i=t[e.sourceLocale]??{},a=e.locales.filter(t=>t!==e.sourceLocale),o=Object.keys(i).map(o=>({key:o,source:i[o]??``,origins:e.origins[o]??[],cells:a.map(i=>{let a=t[i]?.[o]??``,s=n.get(`${i}\u0000${o}`);return{locale:i,text:a,state:s?`broken`:a?r.get(i)?.has(o)?`draft`:`done`:`missing`,issue:s,reasons:e.triage?.[i]?.[o]??[]}})}));return{root:e.root,scanning:e.scanning,sourceLocale:e.sourceLocale,locales:e.locales,rows:o,undefined:e.check.unknown??[],problems:e.problems}}function wa(e){return e.locales.map(t=>{let n=e.rows.length;if(t===e.sourceLocale)return{locale:t,source:!0,total:n,done:n,draft:0,missing:0,broken:0};let r={done:0,draft:0,missing:0,broken:0};for(let n of e.rows){let e=n.cells.find(e=>e.locale===t);e&&r[e.state]++}return{locale:t,source:!1,total:n,...r}})}function Ta(e,t){Object.assign(e,Ca(t))}function Ea(e,t,n){return e.rows.length?e.locales.length<2?`oneLocale`:t.length?n.length?null:`noMatch`:`pickOne`:`noCatalogs`}function Da(e,t){return e?t.length?null:`noFiles`:`scanOff`}function Oa(e){let t=e.indexOf(`.`);return t>0?e.slice(0,t):null}function ka(e,t){let n=new Set(t),r=new Map;for(let t of e){let e=Oa(t.key);if(e===null)continue;let i=r.get(e)??{name:e,total:0,broken:0,missing:0,draft:0};i.total+=1;for(let e of t.cells)n.has(e.locale)&&e.state!==`done`&&(i[e.state]+=1);r.set(e,i)}return[...r.values()].sort((e,t)=>e.name<t.name?-1:1)}function Aa(e,t){let n=t.text.trim().toLowerCase(),r=new Set(t.locales);return e.filter(e=>{let i=e.cells.filter(e=>r.has(e.locale));return t.state===`look`&&!i.some(e=>e.reasons.length)||t.state===`clean`&&i.some(e=>e.reasons.length)||t.state!==`all`&&t.state!==`look`&&t.state!==`clean`&&!i.some(e=>e.state===t.state)||t.group&&Oa(e.key)!==t.group?!1:!n||e.source.toLowerCase().includes(n)?!0:i.some(e=>e.text.toLowerCase().includes(n))})}var ja=[`broken`,`missing`,`draft`,`done`];function Ma(e){for(let t of ja)if(e.cells.some(e=>e.state===t))return t;return`done`}function Na(e,t,n=40){let r=t.trim().toLowerCase();if(!r)return[];let i=[];for(let t of e.rows){let a=[];t.source.toLowerCase().includes(r)&&a.push(e.sourceLocale);for(let e of t.cells)e.text.toLowerCase().includes(r)&&a.push(e.locale);if(!a.length)continue;let o=a[0],s=o===e.sourceLocale?t.source:t.cells.find(e=>e.locale===o)?.text??``;if(i.push({key:t.key,group:Oa(t.key),source:t.source,locales:a,text:s,state:Ma(t)}),i.length===n)break}return i}function Pa(e,t){let n=t.trim(),r=e.toLowerCase().indexOf(n.toLowerCase());return r<0?[e,``,``]:[e.slice(0,r),e.slice(r,r+n.length),e.slice(r+n.length)]}function Fa(e,t){let n=[],r=[];for(let i of e)(i.cells.find(e=>e.locale===t)?.reasons.length?n:r).push(i);return{rows:[...n,...r],flagged:n.length}}function Ia(e,t){let n=e.cells.find(e=>e.locale===t);return n?.reasons.length?n.reasons.map(e=>e.text).join(`. `):null}var La=K(`<li> </li>`),Ra=K(`<ul class="files svelte-1dg5efm"></ul>`),za=K(`<div class="menu svelte-1dg5efm" role="menu" tabindex="-1"><button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="m9 7-5 5 5 5"></path><path d="m15 7 5 5-5 5"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8Z"></path><path d="M14 3v5h5"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M20 15a2 2 0 0 1-2 2H8l-4 3V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2Z"></path></svg> </button> <div class="msep svelte-1dg5efm"></div> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><circle cx="12" cy="12" r="8"></circle><path d="M12 7.5V12l3 1.8"></path></svg> <i class="svelte-1dg5efm"> </i></button> <button class="mi svelte-1dg5efm" role="menuitem"><svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1dg5efm"><path d="M14 5h5v5"></path><path d="m19 5-8 8"></path><path d="M18 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h4"></path></svg> <i class="svelte-1dg5efm"> </i></button> <!></div>`);function Ba(e,t){Le(t,!0);let n=I(void 0),r=I(Ht({top:-9999,left:-9999})),i=I(null),a=I(!1),o=P(()=>Da(t.scanning,t.row.origins)),s=P(()=>W(i)===null?Q.reading:W(i).commit?W(i).commit.sha:Q[W(i).reason??`nogit`]);function c(){let e=t.anchor.getBoundingClientRect(),i=W(n)?.offsetHeight??0,a=e.bottom+6,o=a+i>window.innerHeight?Math.max(8,e.top-i-6):a,s=Math.min(Math.max(8,e.right-308),window.innerWidth-308-8);L(r,{top:o,left:s},!0)}function l(e){let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.cssText=`position:fixed;top:-1000px;opacity:0`,document.body.append(t),t.select();let n=!1;try{n=document.execCommand(`copy`)}catch{n=!1}return t.remove(),n}async function u(e,n){let r=!1;try{await navigator.clipboard.writeText(e),r=!0}catch{r=l(e)}t.onNote(r?n:Q.noClipboard),t.onClose(),t.anchor.focus()}function d(){return[...W(n)?.querySelectorAll(`[role="menuitem"]`)??[]]}function f(e){if(e.key===`Escape`||e.key===`Tab`){t.onClose(),t.anchor.focus();return}let n=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0;if(!n)return;e.preventDefault();let r=d();r[(r.indexOf(document.activeElement)+n+r.length)%r.length]?.focus()}async function p(){L(a,!W(a)),await nr(),c()}_i(()=>{let e=!0;c(),d()[0]?.focus(),t.onCommit(t.row.key).then(n=>{e&&L(i,n??{key:t.row.key,commit:null,reason:`nogit`},!0)});let n=()=>t.onClose();return window.addEventListener(`scroll`,n,!0),window.addEventListener(`resize`,n),()=>{e=!1,window.removeEventListener(`scroll`,n,!0),window.removeEventListener(`resize`,n)}});function m(e){let r=e.target;!W(n)?.contains(r)&&!t.anchor.contains(r)&&t.onClose()}var h=za();fr(`pointerdown`,Gt,m);var g=R(h),_=B(R(g)),v=z(B(_),!0);j(g);var y=B(g,2),b=B(R(y)),x=z(B(b),!0);j(y);var S=B(y,2),ee=B(R(S));j(S);var C=B(S,4),w=B(R(C)),te=z(B(w),!0);j(C);var T=B(C,2),ne=B(R(T)),re=z(B(ne),!0);j(T);var ie=B(T,2),ae=e=>{var n=Ra();X(n,20,()=>t.row.origins,e=>e,(e,t)=>{var n=La(),r=z(n,!0);V(()=>J(r,t)),q(e,n)}),j(n),q(e,n)};Y(ie,e=>{W(a)&&W(o)===null&&e(ae)}),j(h),gi(h,e=>L(n,e),()=>W(n)),V(e=>{Z(h,`aria-label`,Q.open),Zr(h,`top:${W(r).top??``}px;left:${W(r).left??``}px`),Z(g,`aria-disabled`,t.locale===null),J(_,` ${Q.edit??``}`),J(v,t.locale??``),J(b,` ${Q.copyKey??``}`),J(x,t.row.key),J(ee,` ${Q.copySource??``}`),Z(C,`aria-disabled`,!W(i)?.commit),Z(C,`title`,e),J(w,` ${Q.commit??``}`),J(te,W(s)),Z(T,`aria-disabled`,W(o)!==null),Z(T,`aria-expanded`,W(o)===null?W(a):void 0),J(ne,` ${Q.origins??``}`),J(re,W(o)?Q[W(o)]:t.row.origins.length>1?`${t.row.origins[0]} +${t.row.origins.length-1}`:t.row.origins[0])},[()=>W(i)?.commit?`${W(i).commit.subject} · ${W(i).commit.author} · ${W(i).commit.date.slice(0,10)}`:void 0]),G(`keydown`,h,f),G(`click`,g,()=>t.locale===null?t.onNote(Q.nothingToEdit):t.onEdit()),G(`click`,y,()=>u(t.row.key,Q.copiedKey)),G(`click`,S,()=>u(t.row.source,Q.copiedSource)),G(`click`,C,()=>W(i)?.commit&&u(W(i).commit.sha,Q.copiedSha)),G(`click`,T,()=>W(o)===null&&p()),q(e,h),Re()}pr([`keydown`,`click`]);function Va(e,t){for(let n of e)if(n.kind===`param`&&n.name){t.has(n.name)||t.set(n.name,new Set);for(let[e,r]of n.variants??[])t.get(n.name).add(e),Va(r,t)}}function Ha(e){let t=new Map;try{Va(Li(e,Pi),t)}catch{}return t}function Ua(e,t){for(let n of e)typeof n!=`string`&&(t.push(n.name),Ua(n.children,t))}function Wa(e){let t=[];try{Ua(qi(e),t)}catch{return t}return t}function Ga(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return t}var Ka=e=>e.length===1?e[0]:`${e.slice(0,-1).join(`, `)} and ${e.at(-1)}`;function qa(e,t){let n=Ha(e),r=Ha(t),i=[...new Set([...n.keys(),...r.keys()])].sort().map(e=>({name:e,inSource:n.has(e),inTarget:r.has(e)})),a=[],o=i.filter(e=>e.inSource&&!e.inTarget).map(e=>`{${e.name}}`),s=i.filter(e=>!e.inSource&&e.inTarget).map(e=>`{${e.name}}`);o.length&&a.push(`${Ka(o)} is missing, so its value never reaches the text`),s.length&&a.push(`${Ka(s)} is not in the source, so it renders as literal text`);for(let[e,t]of r)t.size&&!t.has(`other`)&&a.push(`the block for {${e}} has no "other" case, so some counts render empty`);let c=Ga(Wa(e)),l=Ga(Wa(t));for(let[e,t]of c)(l.get(e)??0)<t&&a.push(`<${e}> is missing from the translation`);for(let[e,t]of l)(c.get(e)??0)<t&&a.push(`<${e}> is not in the source message`);return{params:i,problems:a}}var Ja=K(`<span class="ojo svelte-2clsr"> </span>`),Ya=K(`<span class="rmark svelte-2clsr"><!></span>`),Xa=K(`<span class="tile svelte-2clsr"><!></span>`),Za=K(`<span> </span>`),Qa=K(`<span class="vmsg svelte-2clsr"> </span>`),$a=K(`<span class="tl edit svelte-2clsr"><span class="disc svelte-2clsr"> </span> <textarea class="tf svelte-2clsr" rows="2"></textarea></span> <span class="editbar svelte-2clsr"><!> <!> <!> <button class="btn sm svelte-2clsr"> </button> <button class="btn sm quiet svelte-2clsr">Cancel</button> <span class="keys svelte-2clsr">Enter saves · Esc closes</span></span>`,1),eo=K(`<button class="tv svelte-2clsr"> </button>`),to=K(`<button class="tv none svelte-2clsr"> </button>`),no=K(`<span class="sig svelte-2clsr"> </span>`),ro=K(`<span class="tl svelte-2clsr"><span class="disc svelte-2clsr"> </span> <!> <!></span>`),io=K(`<span class="why svelte-2clsr"> </span>`),ao=K(`<article><!> <span class="row-t svelte-2clsr"><span class="src svelte-2clsr"> </span> <!></span> <!> <span><button class="ga svelte-2clsr" aria-haspopup="menu"><svg viewBox="0 0 24 24" width="16" height="16" fill="currentColor" aria-hidden="true"><circle cx="5.5" cy="12" r="1.4"></circle><circle cx="12" cy="12" r="1.4"></circle><circle cx="18.5" cy="12" r="1.4"></circle></svg></button></span></article> <!>`,1);function oo(e,t){Le(t,!0);let n=I(void 0),r=P(()=>t.why!==void 0),i=P(()=>t.row.cells.filter(e=>t.shown.includes(e.locale))),a=P(()=>[`broken`,`missing`,`draft`,`done`].find(e=>W(i).some(t=>t.state===e))??`done`),o=I(``),s=I(!1),c=I(null),l=P(()=>qa(t.row.source,W(o))),u=e=>`${e.locale} ${t.row.key}`;function d(e){L(o,e.text,!0),L(c,null),t.onEdit(u(e))}async function f(e){W(s)||(L(s,!0),L(c,await t.onSave(e.locale,t.row.key,W(o)),!0),L(s,!1),W(c)||t.onEdit(null))}function p(e,n){e.key===`Escape`&&t.onEdit(null),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),f(n))}var m=ao(),h=$t(m);let g;var _=R(h),v=e=>{var n=Ya(),r=R(n),i=e=>{var t=Ja(),n=z(t,!0);V(()=>J(n,$.mark)),q(e,t)};Y(r,e=>{t.why&&e(i)}),j(n),q(e,n)},y=e=>{var t=Xa();xa(R(t),{get state(){return W(a)}}),j(t),V(()=>Z(t,`data-state`,W(a))),q(e,t)};Y(_,e=>{W(r)?e(v):e(y,-1)});var b=B(_,2),x=R(b),S=z(x,!0);X(B(x,2),17,()=>W(i),e=>e.locale,(e,n)=>{var i=wr(),a=$t(i),m=e=>{var r=$a(),i=$t(r),a=R(i),u=z(a,!0),d=B(a,2);Ye(d),Je(d,!0),j(i);var m=B(i,2),h=R(m);X(h,17,()=>W(l).params,e=>e.name,(e,t)=>{var n=Za();let r;var i=z(n);V(()=>{r=Yr(n,1,`pm svelte-2clsr`,null,r,{gone:W(t).inSource&&!W(t).inTarget}),J(i,`${W(t).inSource&&!W(t).inTarget?`+`:``}{${W(t).name??``}}`)}),q(e,n)});var g=B(h,2);X(g,16,()=>W(l).problems,e=>e,(e,t)=>{var n=Qa(),r=z(n,!0);V(()=>J(r,t)),q(e,n)});var _=B(g,2),v=e=>{var t=Qa(),n=z(t,!0);V(()=>J(n,W(c))),q(e,t)};Y(_,e=>{W(c)&&!W(l).problems.length&&e(v)});var y=B(_,2),b=z(y,!0),x=B(y,2);ye(2),j(m),V(()=>{Z(a,`data-state`,W(n).state),J(u,W(n).locale),Z(d,`aria-label`,`Translation for ${W(n).locale??``}`),y.disabled=W(s),J(b,W(s)?`Saving`:`Save`)}),G(`keydown`,d,e=>p(e,W(n))),fi(d,()=>W(o),e=>L(o,e)),G(`click`,y,()=>f(W(n))),G(`click`,x,()=>t.onEdit(null)),q(e,r)},h=P(()=>t.editing===u(W(n))),g=e=>{var t=ro(),i=R(t),a=z(i,!0),o=B(i,2),s=e=>{var t=eo(),r=z(t,!0);V(()=>{Z(t,`title`,W(n).text),J(r,W(n).text)}),G(`click`,t,()=>d(W(n))),q(e,t)},c=e=>{var t=to(),r=z(t,!0);V(()=>J(r,Ji.missing.long)),G(`click`,t,()=>d(W(n))),q(e,t)};Y(o,e=>{W(n).text?e(s):e(c,-1)});var l=B(o,2),u=e=>{var t=wr();X($t(t),17,()=>W(n).reasons,e=>e.signal,(e,t)=>{var n=no(),r=z(n,!0);V(()=>{Z(n,`title`,W(t).text),J(r,Xi[W(t).signal]??W(t).signal)}),q(e,n)}),q(e,t)};Y(l,e=>{W(r)||e(u)}),j(t),V(()=>{Z(i,`data-state`,W(n).state),J(a,W(n).locale)}),q(e,t)};Y(a,e=>{W(h)?e(m):e(g,-1)}),q(e,i)}),j(b);var ee=B(b,2),C=e=>{var n=io(),r=z(n,!0);V(()=>J(r,t.why??``)),q(e,n)};Y(ee,e=>{W(r)&&e(C)});var w=B(ee,2);let te;var T=R(w);gi(T,e=>L(n,e),()=>W(n)),j(w),j(h);var ne=B(h,2),re=e=>{{let r=P(()=>W(i)[0]?.locale??null);Ba(e,{get row(){return t.row},get locale(){return W(r)},get scanning(){return t.scanning},get anchor(){return W(n)},get onNote(){return t.onNote},get onCommit(){return t.onCommit},onEdit:()=>{t.onMenu(!1),W(i)[0]&&d(W(i)[0])},onClose:()=>t.onMenu(!1)})}};Y(ne,e=>{t.menu&&W(n)&&e(re)}),V(e=>{g=Yr(h,1,`row svelte-2clsr`,null,g,{open:e,flagged:W(r)&&!!t.why}),Z(h,`data-worst`,W(a)),Z(h,`data-key`,t.row.key),J(S,t.row.source),te=Yr(w,1,`row-go svelte-2clsr`,null,te,{held:t.menu}),Z(T,`aria-expanded`,t.menu),Z(T,`aria-label`,Q.open)},[()=>W(i).some(e=>t.editing===u(e))]),G(`click`,T,()=>t.onMenu(!t.menu)),q(e,m),Re()}pr([`keydown`,`click`]);var so=K(`<button> <b class="svelte-1u5fzi5"> </b></button>`),co=K(`<header class="langbar svelte-1u5fzi5"><div class="text svelte-1u5fzi5"><h2 class="svelte-1u5fzi5"> </h2> <p class="live svelte-1u5fzi5"><span class="disc svelte-1u5fzi5"> </span> <b class="svelte-1u5fzi5"> </b></p> <p class="why svelte-1u5fzi5"> </p></div> <div class="go svelte-1u5fzi5"><button class="btn svelte-1u5fzi5"> </button> <span class="sub svelte-1u5fzi5"> </span></div></header> <div class="chips svelte-1u5fzi5"></div>`,1);function lo(e,t){Le(t,!0);let n=P(()=>ji(t.locale)),r=P(()=>[t.unread>0?$.written(t.unread):$.nothingUnread,t.broken>0?$.broken(t.broken):$.sound,t.flagged>0?$.flagged(t.flagged):$.clean].join(` `)),i=P(()=>[{id:`all`,label:$.chipAll,n:t.total},{id:`look`,label:$.chipLook,n:t.flagged},{id:`clean`,label:$.chipClean,n:t.total-t.flagged}]);var a=co(),o=$t(a),s=R(o),c=R(s),l=z(c,!0),u=B(c,2),d=R(u),f=z(d,!0),p=B(d),m=z(B(p),!0);j(u);var h=z(B(u,2),!0);j(s);var g=B(s,2),_=R(g),v=z(_,!0),y=z(B(_,2),!0);j(g),j(o);var b=B(o,2);X(b,21,()=>W(i),e=>e.id,(e,n)=>{var r=so();let i;var a=R(r),o=z(B(a),!0);j(r),V(()=>{i=Yr(r,1,`pill svelte-1u5fzi5`,null,i,{on:t.chip===W(n).id,look:W(n).id===`look`}),Z(r,`aria-pressed`,t.chip===W(n).id),J(a,`${W(n).label??``} `),J(o,W(n).n)}),G(`click`,r,()=>t.onChip(W(n).id)),q(e,r)}),j(b),V((e,i,a)=>{J(l,W(n)),J(f,t.locale),J(p,`${e??``}. `),J(m,$.live),J(h,W(r)),_.disabled=t.unread===0,J(v,i),J(y,a)},[()=>ta(t.total),()=>$.approve(W(n)),()=>t.unread>0?$.approveSub(t.unread):$.nothingUnread]),G(`click`,_,function(...e){t.onApprove?.apply(this,e)}),q(e,a),Re()}pr([`click`]);var uo=K(`<div class="bill svelte-a18sfu"><p class="lede svelte-a18sfu"> </p> <p class="why svelte-a18sfu"> </p> <div class="pair svelte-a18sfu"><button class="go svelte-a18sfu"> </button> <button class="plain svelte-a18sfu"> </button></div></div>`),fo=K(`<div class="bill svelte-a18sfu"><p class="lede svelte-a18sfu"> </p> <div class="track svelte-a18sfu"><span class="fill svelte-a18sfu"></span></div> <p class="why svelte-a18sfu"> </p></div>`),po=K(`<button class="act svelte-a18sfu"><span class="name svelte-a18sfu"> </span> <span class="why svelte-a18sfu"> </span></button> <button class="act svelte-a18sfu"><span class="name svelte-a18sfu"> </span> <span class="why svelte-a18sfu"> </span></button>`,1),mo=K(`<p> </p>`),ho=K(`<section class="acts svelte-a18sfu" aria-label="Commands"><h2 class="cap svelte-a18sfu">Commands</h2> <!> <!></section>`);function go(e,t){Le(t,!0);let n=I(Ht({at:`idle`})),r=P(()=>W(n).at===`finding`||W(n).at===`planning`||W(n).at===`running`);function i(e,t=!1){L(n,{at:`said`,text:e,bad:t},!0)}async function a(){L(n,{at:`finding`},!0);let e=await t.api.extract();if(e.error||!e.value)return i(e.error??`no answer`,!0);let{found:r}=e.value;if(!r)return i($i.nothingNew);let a=`${ta(r)} your code uses and your catalogs did not have`;await t.onDone(a),i(a)}async function o(){L(n,{at:`planning`},!0);let e=await t.api.plan(t.shown);if(e.error||!e.value)return i(e.error??`no answer`,!0);if(!e.value.total)return i($i.nothingMissing);L(n,{at:`plan`,plan:e.value},!0)}async function s(e){let r=await t.api.job(e);if(r.error||!r.value)return i(r.error??`no answer`,!0);let a=r.value;if(a.state===`running`){L(n,{at:`running`,job:a},!0);return}let o=`${ta(a.done)} translated, unread until you read them`;await t.onDone(o),i(a.state===`failed`?a.message??`the run failed`:o,a.state===`failed`)}async function c(){let e=await t.api.translate(t.shown);if(e.error||!e.value)return i(e.error??`no answer`,!0);L(n,{at:`running`,job:e.value},!0)}_i(()=>{t.api.job().then(e=>{e.value&&W(n).at===`idle`&&L(n,{at:`running`,job:e.value},!0)})}),fn(()=>{if(W(n).at!==`running`)return;let e=W(n).job.id,t=setInterval(()=>void s(e),1e3);return()=>clearInterval(t)});let l=P(()=>t.targets?t.shown.length?$i.translateWhy:$i.pickFirst:$i.onlyLocale),u=P(()=>W(n).at===`running`&&W(n).job.total?W(n).job.done/W(n).job.total:0);var d=ho(),f=B(R(d),2),p=e=>{var t=uo(),r=R(t),i=z(r),a=B(r,2),o=z(a,!0),s=B(a,2),l=R(s),u=z(l,!0),d=B(l,2),f=z(d,!0);j(s),j(t),V((e,t)=>{J(i,`${e??``} in ${t??``}`),J(o,$i.translateWhy),J(u,$i.translate),J(f,$i.cancel)},[()=>ta(W(n).plan.total),()=>Object.keys(W(n).plan.pending).join(`, `)]),G(`click`,l,c),G(`click`,d,()=>L(n,{at:`idle`},!0)),q(e,t)},m=e=>{var t=fo(),r=R(t),i=z(r),a=B(r,2),o=z(a),s=z(B(a,2));j(t),V(e=>{J(i,`${$i.running??``} ${W(n).job.locale??``??``}`),Zr(o,`width: ${e??``}%`),J(s,`${W(n).job.done??``} of ${W(n).job.total??``}`)},[()=>Math.round(W(u)*100)]),q(e,t)},h=e=>{var i=po(),s=$t(i),c=R(s),u=z(c,!0),d=z(B(c,2),!0);j(s);var f=B(s,2),p=R(f),m=z(p,!0),h=z(B(p,2),!0);j(f),V(()=>{s.disabled=W(r)||!t.scanning,J(u,W(n).at===`finding`?$i.working:$i.find),J(d,t.scanning?$i.findWhy:$i.scanOff),f.disabled=W(r)||!t.shown.length,J(m,$i.translate),J(h,W(l))}),G(`click`,s,a),G(`click`,f,o),q(e,i)};Y(f,e=>{W(n).at===`plan`?e(p):W(n).at===`running`?e(m,1):e(h,-1)});var g=B(f,2),_=e=>{var t=mo();let r;var i=z(t,!0);V(()=>{r=Yr(t,1,`said svelte-a18sfu`,null,r,{bad:W(n).bad}),J(i,W(n).text)}),q(e,t)};Y(g,e=>{W(n).at===`said`&&e(_)}),j(d),q(e,d),Re()}pr([`click`]);var _o=K(`<h2 class="svelte-1qmtve8"> </h2>`),vo=K(`<h2 class="svelte-1qmtve8"> </h2> <p class="svelte-1qmtve8"> </p>`,1),yo=K(`<code class="keys svelte-1qmtve8"> </code>`),bo=K(`<button class="svelte-1qmtve8"> </button>`),xo=K(`<div class="job svelte-1qmtve8"><span class="tile svelte-1qmtve8"><!></span> <span class="what svelte-1qmtve8"><b class="svelte-1qmtve8"> </b> <span class="svelte-1qmtve8"> </span> <!></span> <!></div>`),So=K(`<p class="empty svelte-1qmtve8">…</p>`),Co=K(`<p class="empty svelte-1qmtve8"> </p>`),wo=K(`<p class="commit svelte-1qmtve8"><code class="svelte-1qmtve8"> </code> <span class="svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><span class="svelte-1qmtve8"> </span></span></p>`),To=K(`<main class="overview svelte-1qmtve8"><header class="svelte-1qmtve8"><span class="chip svelte-1qmtve8"> </span> <!></header> <div class="cols svelte-1qmtve8"><section class="jobs svelte-1qmtve8" aria-label="What needs you"></section> <aside class="side svelte-1qmtve8"><div class="card svelte-1qmtve8"><button class="ring svelte-1qmtve8"><b class="svelte-1qmtve8"> </b> <strong class="svelte-1qmtve8"> </strong> <span class="svelte-1qmtve8"> </span></button> <p class="kv svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><strong class="svelte-1qmtve8"> </strong></p> <p class="kv svelte-1qmtve8"><b class="svelte-1qmtve8"> </b><strong class="svelte-1qmtve8"> </strong></p></div> <div class="card svelte-1qmtve8"><p class="head svelte-1qmtve8"> </p> <!></div></aside></div></main>`);function Eo(e,t){Le(t,!0);let n=P(()=>t.health.filter(e=>!e.source)),r=P(()=>{let e=e=>W(n).reduce((t,n)=>t+e(n),0);return[{id:`broken`,n:e(e=>e.broken)},{id:`missing`,n:e(e=>e.missing)},{id:`draft`,n:e(e=>e.draft)},{id:`undefined`,n:t.undefinedKeys.length}].filter(e=>e.n>0)}),i=P(()=>W(r).reduce((e,t)=>e+t.n,0)),a=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});function o(e){let t=Math.round((Date.parse(e)-Date.now())/864e5);return t>-1?a.format(0,`day`):t>-31?a.format(t,`day`):a.format(Math.round(t/30),`month`)}var s=To(),c=R(s),l=R(c),u=z(l,!0),d=B(l,2),f=e=>{var t=_o(),n=z(t);V(()=>J(n,`${W(i)??``} ${W(i)===1?`thing is`:`things are`} waiting for you.`)),q(e,t)},p=e=>{var t=vo(),n=$t(t),r=z(n,!0),i=z(B(n,2),!0);V(()=>{J(r,ia.clear),J(i,ia.clearWhy)}),q(e,t)};Y(d,e=>{W(i)>0?e(f):e(p,-1)}),j(c);var m=B(c,2),h=R(m);X(h,21,()=>W(r),e=>e.id,(e,n)=>{var r=xo(),i=R(r),a=R(i);{let e=P(()=>W(n).id===`undefined`?`broken`:W(n).id);xa(a,{get state(){return W(e)}})}j(i);var o=B(i,2),s=R(o),c=z(s),l=B(s,2),u=z(l,!0),d=B(l,2),f=e=>{var n=yo(),r=z(n,!0);V(e=>J(r,e),[()=>t.undefinedKeys.slice(0,3).map(e=>e.key).join(` · `)]),q(e,n)};Y(d,e=>{W(n).id===`undefined`&&e(f)}),j(o);var p=B(o,2),m=e=>{var r=bo(),i=z(r,!0);V(()=>J(i,ia.open)),G(`click`,r,()=>t.onFilter(W(n).id)),q(e,r)};Y(p,e=>{W(n).id!==`undefined`&&e(m)}),j(r),V(()=>{Z(i,`data-state`,W(n).id===`undefined`?`broken`:W(n).id),J(c,`${W(n).n??``} ${(W(n).n===1?na[W(n).id].one:na[W(n).id].many)??``}`),J(u,ra[W(n).id])}),q(e,r)}),j(h);var g=B(h,2),_=R(g),v=R(_),y=R(v),b=z(y,!0),x=B(y,2),S=z(x,!0),ee=z(B(x,2),!0);j(v);var C=B(v,2),w=R(C),te=z(w,!0),T=z(B(w),!0);j(C);var ne=B(C,2),re=R(ne),ie=z(re,!0),ae=z(B(re),!0);j(ne),j(_);var oe=B(_,2),se=R(oe),ce=z(se,!0),le=B(se,2),E=e=>{q(e,So())},ue=e=>{var t=Co(),n=z(t,!0);V(()=>J(n,ia.noHistory)),q(e,t)},de=e=>{var n=wr();X($t(n),17,()=>t.commits,e=>e.sha,(e,t)=>{var n=wo(),r=R(n),i=z(r,!0),a=B(r,2),s=R(a),c=z(s,!0),l=z(B(s));j(a),j(n),V(e=>{J(i,W(t).sha),J(c,W(t).subject),J(l,`${W(t).author??``} · ${e??``}`)},[()=>o(W(t).date)]),q(e,n)}),q(e,n)};Y(le,e=>{t.commits===null?e(E):t.commits.length===0?e(ue,1):e(de,-1)}),j(oe),j(g),j(m),j(s),V(()=>{J(u,ia.here),v.disabled=!t.checks,J(b,ia.project),J(S,t.checks&&t.checks.ok===t.checks.total?ia.healthy:ia.problems),J(ee,t.checks?`${t.checks.ok} of ${t.checks.total} ${ia.checks}`:`…`),J(te,ia.countMessages),J(T,t.total),J(ie,ia.countLocales),J(ae,t.locales.length),J(ce,ia.history)}),G(`click`,v,function(...e){t.onHealth?.apply(this,e)}),q(e,s),Re()}pr([`click`]);var Do=K(`<p class="none svelte-1xn1b0j"> </p>`),Oo=K(`<span class="group svelte-1xn1b0j"> </span>`),ko=K(`<span class="src svelte-1xn1b0j"> </span>`),Ao=K(`<b class="disc svelte-1xn1b0j"> </b>`),jo=K(`<li><button><span class="tile svelte-1xn1b0j"><!></span> <span class="what svelte-1xn1b0j"><span class="found svelte-1xn1b0j"> <mark class="svelte-1xn1b0j"> </mark> </span> <!> <!></span> <span class="where svelte-1xn1b0j"></span></button></li>`),Mo=K(`<ul class="svelte-1xn1b0j"></ul>`),No=K(`<div class="sheet svelte-1xn1b0j" role="dialog"><p class="head svelte-1xn1b0j"><span> </span> <b class="svelte-1xn1b0j"> </b></p> <!> <p class="keys svelte-1xn1b0j"><kbd class="svelte-1xn1b0j">↑</kbd><kbd class="svelte-1xn1b0j">↓</kbd> <kbd class="svelte-1xn1b0j">enter</kbd> <kbd class="svelte-1xn1b0j">esc</kbd> <button class="close svelte-1xn1b0j"> </button></p></div>`);function Po(e,t){Le(t,!0);let n=I(0);fn(()=>{t.query,L(n,0)});function r(e){t.hits.length&&L(n,(W(n)+e+t.hits.length)%t.hits.length)}function i(){let e=t.hits[W(n)];e&&t.onPick(e.key)}var a={move:r,choose:i},o=No(),s=R(o),c=R(s),l=z(c,!0),u=z(B(c,2),!0);j(s);var d=B(s,2),f=e=>{var t=Do(),n=z(t,!0);V(()=>J(n,aa.none)),q(e,t)},p=e=>{var r=Mo();X(r,23,()=>t.hits,e=>e.key,(e,r,i)=>{let a=P(()=>Pa(W(r).text,t.query));var o=jo(),s=R(o);let c;var l=R(s);xa(R(l),{get state(){return W(r).state}}),j(l);var u=B(l,2),d=R(u),f=R(d,!0),p=B(f),m=z(p,!0),h=B(p,1,!0);j(d);var g=B(d,2),_=e=>{var t=Oo(),n=z(t,!0);V(()=>J(n,W(r).group)),q(e,t)};Y(g,e=>{W(r).group&&e(_)});var v=B(g,2),y=e=>{var t=ko(),n=z(t,!0);V(()=>J(n,W(r).source)),q(e,t)},b=P(()=>!W(r).locales.includes(t.sourceLocale));Y(v,e=>{W(b)&&e(y)}),j(u);var x=B(u,2);X(x,20,()=>W(r).locales,e=>e,(e,t)=>{var n=Ao(),r=z(n,!0);V(()=>J(r,t)),q(e,n)}),j(x),j(s),j(o),V(()=>{c=Yr(s,1,`hit svelte-1xn1b0j`,null,c,{on:W(i)===W(n)}),Z(l,`data-state`,W(r).state),J(f,W(a)[0]),J(m,W(a)[1]),J(h,W(a)[2])}),G(`click`,s,()=>t.onPick(W(r).key)),q(e,o)}),j(r),q(e,r)};Y(d,e=>{t.hits.length===0?e(f):e(p,-1)});var m=B(d,2),h=B(R(m),2),g=B(h,2),_=B(g,2),v=B(_),y=z(v,!0);return j(m),j(o),V(e=>{Z(o,`aria-label`,aa.label),J(l,aa.scope),J(u,e),J(h,`${aa.moveKeys??``} `),J(g,`${aa.openKeys??``} `),J(_,`${aa.closeKeys??``} `),J(y,aa.close)},[()=>t.hits.length===1?aa.oneHit:aa.hits(t.hits.length)]),G(`click`,v,function(...e){t.onClose?.apply(this,e)}),q(e,o),Re(a)}pr([`click`]);var Fo=K(`<li><code> </code> </li>`),Io=K(`<ul class="problems svelte-1xn7ig5"></ul>`),Lo=K(`<p class="note svelte-1xn7ig5"> </p>`),Ro=K(`<!> <!>`,1),zo=K(`<div class="lens svelte-1xn7ig5"><!> <main class="table svelte-1xn7ig5"><!></main></div>`),Bo=K(`Saved in <code> </code>`,1),Vo=K(`<p class="snack svelte-1xn7ig5" role="status"><svg viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="svelte-1xn7ig5"><path d="m3.4 8.4 3 3 6.2-6.8"></path></svg> <!> <button class="svelte-1xn7ig5">Dismiss</button></p>`),Ho=K(`<div class="shell svelte-1xn7ig5"><header class="bar svelte-1xn7ig5"><span class="brand svelte-1xn7ig5">verbaly <b class="svelte-1xn7ig5">studio</b></span> <input class="search svelte-1xn7ig5" type="search"/> <span class="root svelte-1xn7ig5"> </span></header> <!> <!> <div class="body svelte-1xn7ig5"><!> <!></div> <!></div>`);function Uo(e,t){Le(t,!0);let n=I(null),r=I(null),i=I(null),a=I(`overview`),o=I(null),s=I(null),c=I(null),l=new Map;async function u(e){let n=l.get(e);if(n)return n;let i=await t.api.commit(e);return i.error||!i.value?(L(r,{text:i.error??`[verbaly] the server sent no answer`,file:``},!0),null):(l.set(e,i.value),i.value)}function d(e){e===`health`?f():L(a,e,!0)}async function f(){L(a,`health`);let e=await t.api.health();if(e.error){L(r,{text:e.error,file:``},!0);return}e.value&&L(o,e.value,!0)}fn(()=>{t.api.health().then(e=>{e.value&&L(o,e.value,!0)}),t.api.history().then(e=>{L(s,e.value?.commits??[],!0)})});function p(e){L(y,W(x),!0),L(_,e,!0),L(a,`messages`)}async function m(e){let a=await t.api.state();if(a.error||!a.value){L(r,{text:a.error??`[verbaly] the server sent no state`,file:``},!0);return}L(n,null),L(i,null),L(c,null),l.clear(),Ta(t.panel,a.value),L(r,{text:e,file:``},!0);let s=await t.api.health();s.value&&L(o,s.value,!0)}async function h(e,n,a){let o=await t.api.setRead(e,n,a);if(o.error){L(r,{text:o.error,file:``},!0);return}let s=new Set(o.value?.keys??[]);for(let n of t.panel.rows){if(!s.has(n.key))continue;let t=n.cells.find(t=>t.locale===e);t?.text&&(t.state=a?`draft`:`done`)}L(i,a?null:{locale:e,keys:o.value?.keys??[]},!0)}async function g(e,n,i){let a=await t.api.save(e,n,i);if(a.error)return a.error;let o=t.panel.rows.find(e=>e.key===n)?.cells.find(t=>t.locale===e);return o&&(o.text=i,o.state=i?`done`:`missing`,o.issue=void 0),L(r,{text:i,file:`${e}.json`},!0),null}let _=I(`all`),v=I(``),y=I(null),b=I(null),x=P(()=>t.panel.locales.filter(e=>e!==t.panel.sourceLocale)),S=P(()=>W(y)??W(x).slice(0,1)),ee=P(()=>wa(t.panel)),C=P(()=>W(S).length===1?W(S)[0]:null),w=P(()=>W(C)?W(ee).find(e=>e.locale===W(C)):void 0),te=P(()=>W(C)?t.panel.rows.filter(e=>Ia(e,W(C))!==null).length:0),T=P(()=>W(_)===`look`?`look`:W(_)===`clean`?`clean`:W(_)===`all`?`all`:null),ne=P(()=>Na(t.panel,W(v))),re=I(void 0),ie=I(void 0),ae=I(null),oe=P(()=>ka(t.panel.rows,W(S))),se=P(()=>{let e=Aa(t.panel.rows,{text:``,state:W(_),locales:W(S),group:W(b)});return W(C)?Fa(e,W(C)).rows:e}),ce=P(()=>Ea(t.panel,W(S),W(se))),le=P(()=>{let e={all:0,look:0,clean:0,missing:0,draft:0,broken:0};for(let n of[`all`,`look`,`clean`,`missing`,`draft`,`broken`])e[n]=Aa(t.panel.rows,{text:``,state:n,locales:W(S),group:W(b)}).length;return e}),E=I(60);fn(()=>{W(_),W(S),W(b),L(E,60)});function ue(e){L(v,``),L(_,`all`),L(b,null),L(y,W(x),!0),L(a,`messages`),L(ae,e,!0)}fn(()=>{if(!W(ae))return;let e=W(ae),t=W(se).findIndex(t=>t.key===e);if(t<0){L(ae,null);return}if(t+1>W(E)){L(E,t+1);return}L(ae,null),nr().then(()=>{document.querySelector(`[data-key="${CSS.escape(e)}"]`)?.scrollIntoView({block:`center`})})});function de(e){if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`){e.preventDefault(),W(ie)?.focus(),W(ie)?.select();return}W(v)&&(e.key===`Escape`?(L(v,``),W(ie)?.blur()):e.key===`ArrowDown`?(e.preventDefault(),W(re)?.move(1)):e.key===`ArrowUp`?(e.preventDefault(),W(re)?.move(-1)):e.key===`Enter`&&(e.preventDefault(),W(re)?.choose()))}function D(e){let t=e.currentTarget;t.scrollTop+t.clientHeight>t.scrollHeight-600&&W(E)<W(se).length&&L(E,W(E)+60)}function fe(e){L(y,W(S).includes(e)?W(S).filter(t=>t!==e):[...W(S),e],!0)}var pe=Ho();fr(`keydown`,Gt,de);var me=R(pe),he=B(R(me),2);si(he),gi(he,e=>L(ie,e),()=>W(ie));var ge=B(he,2),O=z(ge,!0);j(me);var _e=B(me,2),k=e=>{var n=Io();X(n,21,()=>t.panel.problems,e=>e.scope+e.message,(e,t)=>{var n=Fo(),r=R(n),i=z(r,!0),a=B(r);j(n),V(()=>{J(i,W(t).scope),J(a,` ${W(t).message??``}`)}),q(e,n)}),j(n),q(e,n)};Y(_e,e=>{t.panel.problems.length&&e(k)});var A=B(_e,2),ve=e=>{gi(Po(e,{get query(){return W(v)},get hits(){return W(ne)},get sourceLocale(){return t.panel.sourceLocale},onPick:ue,onClose:()=>L(v,``)}),e=>L(re,e,!0),()=>W(re))};Y(A,e=>{W(v)&&e(ve)});var ye=B(A,2),be=R(ye);{let e=e=>{go(e,{get api(){return t.api},get scanning(){return t.panel.scanning},get targets(){return W(x).length},get shown(){return W(S)},onDone:m})},n=P(()=>W(o)?{bad:W(o).entries.filter(e=>e.level!==`ok`).length}:null);ha(be,{get health(){return W(ee)},get shown(){return W(S)},get state(){return W(_)},get counts(){return W(le)},get pending(){return W(i)},get checks(){return W(n)},onToggle:fe,onState:e=>L(_,e,!0),onRead:e=>h(e,void 0,!1),onUndo:()=>W(i)&&h(W(i).locale,W(i).keys,!0),get view(){return W(a)},onView:d,get groups(){return W(oe)},get group(){return W(b)},onGroup:e=>L(b,e,!0),actions:e,$$slots:{actions:!0}})}var xe=B(be,2),Se=e=>{{let n=P(()=>W(o)?{ok:W(o).entries.filter(e=>e.level===`ok`).length,total:W(o).entries.length}:null);Eo(e,{get health(){return W(ee)},get undefinedKeys(){return t.panel.undefined},get locales(){return t.panel.locales},get total(){return t.panel.rows.length},get checks(){return W(n)},get commits(){return W(s)},onFilter:p,onHealth:f})}},Ce=e=>{{let t=P(()=>W(o)?.entries??[]),n=P(()=>W(o)?.ok??!0);wi(e,{get entries(){return W(t)},get ok(){return W(n)},onClose:()=>L(a,`overview`)})}},we=e=>{var i=zo(),a=R(i),o=e=>{lo(e,{get locale(){return W(C)},get total(){return t.panel.rows.length},get unread(){return W(w).draft},get broken(){return W(w).broken},get flagged(){return W(te)},get chip(){return W(T)},onChip:e=>L(_,e,!0),onApprove:()=>h(W(C),void 0,!1)})};Y(a,e=>{W(C)&&W(w)&&!W(ce)&&e(o)});var s=B(a,2),l=R(s),d=e=>{var t=Lo(),n=z(t);V(()=>J(n,`${ea[W(ce)]??``}${W(ce)===`oneLocale`?` ${ea.oneLocaleFix}`:``}`)),q(e,t)},f=e=>{var i=Ro(),a=$t(i);X(a,17,()=>W(se).slice(0,W(E)),e=>e.key,(e,i)=>{{let a=P(()=>W(C)?Ia(W(i),W(C)):void 0),o=P(()=>W(c)===W(i).key);oo(e,{get row(){return W(i)},get shown(){return W(S)},get editing(){return W(n)},onEdit:e=>L(n,e,!0),onSave:g,get why(){return W(a)},get scanning(){return t.panel.scanning},get menu(){return W(o)},onMenu:e=>L(c,e?W(i).key:null,!0),onNote:e=>L(r,{text:e,file:``},!0),onCommit:u})}});var o=B(a,2),s=e=>{var t=Lo(),n=z(t,!0);V(e=>J(n,e),[()=>W(C)?$.rest(W(se).length-W(E)):`${W(se).length-W(E)} more below`]),q(e,t)};Y(o,e=>{W(E)<W(se).length&&e(s)}),q(e,i)};Y(l,e=>{W(ce)?e(d):e(f,-1)}),j(s),j(i),fr(`scroll`,s,D),q(e,i)};Y(xe,e=>{W(a)===`overview`?e(Se):W(a)===`health`?e(Ce,1):e(we,-1)}),j(ye);var Te=B(ye,2),Ee=e=>{var t=Vo(),n=B(R(t),2),i=e=>{var t=Bo(),n=z(B($t(t)),!0);V(()=>J(n,W(r).file)),q(e,t)},a=e=>{var t=Cr();V(()=>J(t,W(r).text)),q(e,t)};Y(n,e=>{W(r).file?e(i):e(a,-1)});var o=B(n,2);j(t),G(`click`,o,()=>L(r,null)),q(e,t)};Y(Te,e=>{W(r)&&e(Ee)}),j(pe),V(()=>{Z(he,`placeholder`,aa.placeholder),Z(he,`aria-label`,aa.placeholder),Z(ge,`title`,t.panel.root),J(O,t.panel.root)}),fi(he,()=>W(v),e=>L(v,e)),q(e,pe),Re()}pr([`click`]);async function Wo(e,t,n){let r=t.includes(`?`)?`&`:`?`,i;try{i=await fetch(`${t}${r}t=${encodeURIComponent(e)}`,{...n,headers:n?.body===void 0?void 0:{"content-type":`application/json`},body:n?.body===void 0?void 0:JSON.stringify(n.body)})}catch{return{error:`[verbaly] the studio server is not answering, is it still running?`}}let a=await i.json().catch(()=>({}));return i.ok?{value:a}:{error:a.error??`[verbaly] the server answered ${i.status}`}}function Go(e){return{state:()=>Wo(e,`/api/state`),health:()=>Wo(e,`/api/health`),history:()=>Wo(e,`/api/history`),commit:t=>Wo(e,`/api/commit/${encodeURIComponent(t)}`),save:(t,n,r)=>Wo(e,`/api/message/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,{method:`PUT`,body:{text:r}}),setRead:(t,n,r)=>Wo(e,`/api/approve`,{method:`POST`,body:{locale:t,keys:n,undo:r}}),extract:()=>Wo(e,`/api/extract`,{method:`POST`}),plan:t=>{let n=t.map(e=>`locale=${encodeURIComponent(e)}`).join(`&`);return Wo(e,`/api/translate${n?`?${n}`:``}`)},translate:t=>Wo(e,`/api/translate`,{method:`POST`,body:{locales:t}}),job:t=>Wo(e,t?`/api/job/${encodeURIComponent(t)}`:`/api/job`)}}function Ko(e){return Ht(Ca(e))}var qo=new URLSearchParams(location.search).get(`t`)??``;async function Jo(){let e=document.getElementById(`app`),t=Go(qo),n=await t.state();if(n.error||!n.value){e.textContent=n.error??`[verbaly] the server sent no state`;return}kr(Uo,{target:e,props:{panel:Ko(n.value),api:t}})}Jo();
|