@edenapp/sdk 0.5.2 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps/prebuilt/com.eden.calculator/CHANGELOG.md +8 -0
- package/dist/apps/prebuilt/com.eden.calculator/dist/assets/{index-B2YDTw7g.js → index-ombNmWuy.js} +1 -1
- package/dist/apps/prebuilt/com.eden.calculator/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.calculator/package.json +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{editor.main-ABqnr99W.js → editor.main-ShXWZzLt.js} +3 -3
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{html-D6jh0yEa.js → html-BllhhjiQ.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{index-DAFnO6GB.js → index-DMisGu94.js} +2 -2
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{javascript-NUFioPTH.js → javascript-DmMyWycA.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{jsonMode-BprisSQ5.js → jsonMode-crhwfqKw.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{typescript-qUrrOs_e.js → typescript-B_1zjGZb.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/assets/{yaml-Xk-V_ilV.js → yaml-y53-55Ta.js} +1 -1
- package/dist/apps/prebuilt/com.eden.editor/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/index-B-bahmO2.js +1 -0
- package/dist/apps/prebuilt/com.eden.eveshell/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.eveshell/package.json +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsc +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/.bin/tsserver +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/CHANGELOG.md +16 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/ProcessMetrics.d.ts +127 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/commands.generated.d.ts +30 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/index.d.ts +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/package.json +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/backend/tsconfig.json +2 -12
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/dist/assets/index-BeQINwbz.js +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsc +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/tsserver +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/.bin/vite +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/CHANGELOG.md +16 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/ProcessMetrics.d.ts +127 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/commands.generated.d.ts +30 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/index.d.ts +1 -0
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/@edenapp/types/package.json +2 -2
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/esbuild +3 -3
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/rollup +4 -4
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/node_modules/vite/node_modules/.bin/yaml +4 -4
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/tsconfig.json +1 -13
- package/dist/apps/prebuilt/com.eden.files/CHANGELOG.md +10 -0
- package/dist/apps/prebuilt/com.eden.files/dist/assets/index-BT-jTYkQ.js +1 -0
- package/dist/apps/prebuilt/com.eden.files/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.files/package.json +5 -3
- package/dist/apps/prebuilt/com.eden.installer/dist/assets/{index-SmzSXaXF.js → index-czaxJQQE.js} +1 -1
- package/dist/apps/prebuilt/com.eden.installer/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.login/CHANGELOG.md +8 -0
- package/dist/apps/prebuilt/com.eden.login/dist/assets/{index-KswMPsHx.js → index-C72VINOP.js} +1 -1
- package/dist/apps/prebuilt/com.eden.login/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.login/package.json +1 -1
- package/dist/apps/prebuilt/com.eden.process-manager/CHANGELOG.md +8 -0
- package/dist/apps/prebuilt/com.eden.process-manager/dist/assets/index-C2Cw_EOR.css +1 -0
- package/dist/apps/prebuilt/com.eden.process-manager/dist/assets/index-x5Xb2Uoa.js +1 -0
- package/dist/apps/prebuilt/com.eden.process-manager/dist/index.html +13 -0
- package/dist/apps/prebuilt/com.eden.process-manager/icon.svg +13 -0
- package/dist/apps/prebuilt/com.eden.process-manager/index.html +12 -0
- package/dist/apps/prebuilt/com.eden.process-manager/manifest.json +31 -0
- package/dist/apps/prebuilt/com.eden.process-manager/package.json +20 -0
- package/dist/apps/prebuilt/com.eden.settings/dist/assets/{index-CHDYDKgf.js → index-CCa_wWrX.js} +1 -1
- package/dist/apps/prebuilt/com.eden.settings/dist/index.html +1 -1
- package/dist/apps/prebuilt/com.eden.users/dist/assets/{index-CmyGIH5F.js → index-CSvwpgyK.js} +1 -1
- package/dist/apps/prebuilt/com.eden.users/dist/index.html +1 -1
- package/dist/edencss/eden.css +1 -1
- package/dist/filesystem/FilesystemHandler.d.ts +15 -0
- package/dist/filesystem/FilesystemHandler.d.ts.map +1 -1
- package/dist/filesystem/FilesystemHandler.js +25 -0
- package/dist/filesystem/FilesystemHandler.js.map +1 -1
- package/dist/filesystem/FilesystemManager.d.ts +9 -0
- package/dist/filesystem/FilesystemManager.d.ts.map +1 -1
- package/dist/filesystem/FilesystemManager.js +33 -0
- package/dist/filesystem/FilesystemManager.js.map +1 -1
- package/dist/generated/runtime.d.ts.map +1 -1
- package/dist/generated/runtime.js +3 -0
- package/dist/generated/runtime.js.map +1 -1
- package/dist/process-manager/ProcessHandler.d.ts +14 -1
- package/dist/process-manager/ProcessHandler.d.ts.map +1 -1
- package/dist/process-manager/ProcessHandler.js +17 -0
- package/dist/process-manager/ProcessHandler.js.map +1 -1
- package/dist/process-manager/ProcessManager.d.ts +11 -1
- package/dist/process-manager/ProcessManager.d.ts.map +1 -1
- package/dist/process-manager/ProcessManager.js +18 -0
- package/dist/process-manager/ProcessManager.js.map +1 -1
- package/dist/process-manager/ProcessMetricsCollector.d.ts +31 -0
- package/dist/process-manager/ProcessMetricsCollector.d.ts.map +1 -0
- package/dist/process-manager/ProcessMetricsCollector.js +217 -0
- package/dist/process-manager/ProcessMetricsCollector.js.map +1 -0
- package/dist/process-manager/ProcessMetricsCollector.test.d.ts +2 -0
- package/dist/process-manager/ProcessMetricsCollector.test.d.ts.map +1 -0
- package/dist/process-manager/ProcessMetricsCollector.test.js +222 -0
- package/dist/process-manager/ProcessMetricsCollector.test.js.map +1 -0
- package/dist/view-manager/viewLifecycle.d.ts.map +1 -1
- package/dist/view-manager/viewLifecycle.js +5 -0
- package/dist/view-manager/viewLifecycle.js.map +1 -1
- package/edencss/README.md +29 -194
- package/edencss/components/avatar.css +1 -1
- package/edencss/components/inputs.css +1 -1
- package/edencss/components/sidebar.css +2 -2
- package/edencss/utilities.css +17 -14
- package/package.json +9 -4
- package/dist/apps/prebuilt/com.eden.eveshell/dist/assets/index-CokBDS24.js +0 -1
- package/dist/apps/prebuilt/com.eden.example.hello/frontend/dist/assets/index-D4bTq3-Q.js +0 -1
- package/dist/apps/prebuilt/com.eden.files/dist/assets/index-CoRuEUrw.js +0 -1
package/dist/apps/prebuilt/com.eden.editor/dist/assets/{yaml-Xk-V_ilV.js → yaml-y53-55Ta.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as l}from"./editor.main-
|
|
1
|
+
import{m as l}from"./editor.main-ShXWZzLt.js";import"./index-DMisGu94.js";var i=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,d=(n,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of u(e))!s.call(n,t)&&t!==r&&i(n,t,{get:()=>e[t],enumerable:!(o=c(e,t))||o.enumerable});return n},m=(n,e,r)=>(d(n,e,"default"),r),a={};m(a,l);var f={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:a.languages.IndentAction.Indent}}]},g={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{f as conf,g as language};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Text Editor</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-DMisGu94.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-eIZ8vGeP.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=t(r);fetch(r.href,i)}})();const Bt=!0,zt=(n,e)=>n===e,Ht=Symbol("solid-track"),qt=Symbol("solid-dev-component"),Pe={equals:zt};let Lt=It;const te=1,Le=2,Jt={},Ke={};var N=null;let Be=null,Wt=null,M=null,J=null,ee=null,Me=0;function he(n,e){const t=M,s=N,r=n.length===0,i=e===void 0?s:e,o=r?{owned:null,cleanups:null,context:null,owner:null}:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=r?()=>n(()=>{throw new Error("Dispose method must be an explicit argument to createRoot function")}):()=>n(()=>Z(()=>be(o)));N=o,M=null;try{return ne(a,!0)}finally{M=t,N=s}}function z(n,e){e=e?Object.assign({},Pe,e):Pe;const t={value:n,observers:null,observerSlots:null,comparator:e.equals||void 0};e.name&&(t.name=e.name),e.internal?t.internal=!0:Zt(t);const s=r=>(typeof r=="function"&&(r=r(t.value)),Et(t,r));return[Rt.bind(t),s]}function Yt(n,e,t){const s=we(n,e,!0,te,t);re(s)}function U(n,e,t){const s=we(n,e,!1,te,t);re(s)}function Oe(n,e,t){Lt=sn;const s=we(n,e,!1,te,t);s.user=!0,ee?ee.push(s):re(s)}function ue(n,e,t){t=t?Object.assign({},Pe,t):Pe;const s=we(n,e,!0,0,t);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,re(s),Rt.bind(s)}function Gt(n){return n&&typeof n=="object"&&"then"in n}function Ot(n,e,t){let s,r,i;typeof e=="function"?(s=n,r=e,i={}):(s=!0,r=n,i=e||{});let o=null,a=Ke,l=!1,u="initialValue"in i,c=typeof s=="function"&&ue(s);const h=new Set,[d,m]=(i.storage||z)(i.initialValue),[w,f]=z(void 0),[p,v]=z(void 0,{equals:!1}),[b,S]=z(u?"ready":"unresolved");function y(L,R,T,V){return o===L&&(o=null,V!==void 0&&(u=!0),(L===a||R===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(V,{value:R})),a=Ke,O(R,T)),R}function O(L,R){ne(()=>{R===void 0&&m(()=>L),S(R!==void 0?"errored":u?"ready":"unresolved"),f(R);for(const T of h.keys())T.decrement();h.clear()},!1)}function A(){const L=en,R=d(),T=w();if(T!==void 0&&!o)throw T;return M&&M.user,R}function x(L=!0){if(L!==!1&&l)return;l=!1;const R=c?c():s;if(R==null||R===!1){y(o,Z(d));return}let T;const V=a!==Ke?a:Z(()=>{try{return r(R,{value:d(),refetching:L})}catch(j){T=j}});if(T!==void 0){y(o,void 0,$e(T),R);return}else if(!Gt(V))return y(o,V,void 0,R),V;return o=V,"v"in V?(V.s===1?y(o,V.v,void 0,R):y(o,void 0,$e(V.v),R),V):(l=!0,queueMicrotask(()=>l=!1),ne(()=>{S(u?"refreshing":"pending"),v()},!1),V.then(j=>y(V,j,void 0,R),j=>y(V,void 0,$e(j),R)))}Object.defineProperties(A,{state:{get:()=>b()},error:{get:()=>w()},loading:{get(){const L=b();return L==="pending"||L==="refreshing"}},latest:{get(){if(!u)return A();const L=w();if(L&&!o)throw L;return d()}}});let P=N;return c?Yt(()=>(P=N,x(!1))):x(!1),[A,{refetch:L=>Xt(P,()=>x(L)),mutate:m}]}function Z(n){if(M===null)return n();const e=M;M=null;try{return n()}finally{M=e}}function nt(n){Oe(()=>Z(n))}function ce(n){return N===null?console.warn("cleanups created outside a `createRoot` or `render` will never be run"):N.cleanups===null?N.cleanups=[n]:N.cleanups.push(n),n}function Xt(n,e){const t=N,s=M;N=n,M=null;try{return ne(e,!0)}catch(r){st(r)}finally{N=t,M=s}}const[Bs,zs]=z(!1);function Qt(n,e){const t=we(()=>Z(()=>(Object.assign(n,{[qt]:!0}),n(e))),void 0,!0,0);return t.props=e,t.observers=null,t.observerSlots=null,t.name=n.name,t.component=n,re(t),t.tValue!==void 0?t.tValue:t.value}function Zt(n){N&&(N.sourceMap?N.sourceMap.push(n):N.sourceMap=[n],n.graph=N)}let en;function Rt(){if(this.sources&&this.state)if(this.state===te)re(this);else{const n=J;J=null,ne(()=>Ee(this),!1),J=n}if(M){const n=this.observers?this.observers.length:0;M.sources?(M.sources.push(this),M.sourceSlots.push(n)):(M.sources=[this],M.sourceSlots=[n]),this.observers?(this.observers.push(M),this.observerSlots.push(M.sources.length-1)):(this.observers=[M],this.observerSlots=[M.sources.length-1])}return this.value}function Et(n,e,t){let s=n.value;return(!n.comparator||!n.comparator(s,e))&&(n.value=e,n.observers&&n.observers.length&&ne(()=>{for(let r=0;r<n.observers.length;r+=1){const i=n.observers[r],o=Be&&Be.running;o&&Be.disposed.has(i),(o?!i.tState:!i.state)&&(i.pure?J.push(i):ee.push(i),i.observers&&Nt(i)),o||(i.state=te)}if(J.length>1e6)throw J=[],Bt?new Error("Potential Infinite Loop Detected."):new Error},!1)),e}function re(n){if(!n.fn)return;be(n);const e=Me;tn(n,n.value,e)}function tn(n,e,t){let s;const r=N,i=M;M=N=n;try{s=n.fn(e)}catch(o){return n.pure&&(n.state=te,n.owned&&n.owned.forEach(be),n.owned=null),n.updatedAt=t+1,st(o)}finally{M=i,N=r}(!n.updatedAt||n.updatedAt<=t)&&(n.updatedAt!=null&&"observers"in n?Et(n,s):n.value=s,n.updatedAt=t)}function we(n,e,t,s=te,r){const i={fn:n,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:N,context:N?N.context:null,pure:t};return N===null?console.warn("computations created outside a `createRoot` or `render` will never be disposed"):N!==Jt&&(N.owned?N.owned.push(i):N.owned=[i]),r&&r.name&&(i.name=r.name),i}function Re(n){if(n.state===0)return;if(n.state===Le)return Ee(n);if(n.suspense&&Z(n.suspense.inFallback))return n.suspense.effects.push(n);const e=[n];for(;(n=n.owner)&&(!n.updatedAt||n.updatedAt<Me);)n.state&&e.push(n);for(let t=e.length-1;t>=0;t--)if(n=e[t],n.state===te)re(n);else if(n.state===Le){const s=J;J=null,ne(()=>Ee(n,e[0]),!1),J=s}}function ne(n,e){if(J)return n();let t=!1;e||(J=[]),ee?t=!0:ee=[],Me++;try{const s=n();return nn(t),s}catch(s){t||(ee=null),J=null,st(s)}}function nn(n){if(J&&(It(J),J=null),n)return;const e=ee;ee=null,e.length&&ne(()=>Lt(e),!1)}function It(n){for(let e=0;e<n.length;e++)Re(n[e])}function sn(n){let e,t=0;for(e=0;e<n.length;e++){const s=n[e];s.user?n[t++]=s:Re(s)}for(e=0;e<t;e++)Re(n[e])}function Ee(n,e){n.state=0;for(let t=0;t<n.sources.length;t+=1){const s=n.sources[t];if(s.sources){const r=s.state;r===te?s!==e&&(!s.updatedAt||s.updatedAt<Me)&&Re(s):r===Le&&Ee(s,e)}}}function Nt(n){for(let e=0;e<n.observers.length;e+=1){const t=n.observers[e];t.state||(t.state=Le,t.pure?J.push(t):ee.push(t),t.observers&&Nt(t))}}function be(n){let e;if(n.sources)for(;n.sources.length;){const t=n.sources.pop(),s=n.sourceSlots.pop(),r=t.observers;if(r&&r.length){const i=r.pop(),o=t.observerSlots.pop();s<r.length&&(i.sourceSlots[o]=s,r[s]=i,t.observerSlots[s]=o)}}if(n.tOwned){for(e=n.tOwned.length-1;e>=0;e--)be(n.tOwned[e]);delete n.tOwned}if(n.owned){for(e=n.owned.length-1;e>=0;e--)be(n.owned[e]);n.owned=null}if(n.cleanups){for(e=n.cleanups.length-1;e>=0;e--)n.cleanups[e]();n.cleanups=null}n.state=0,delete n.sourceMap}function $e(n){return n instanceof Error?n:new Error(typeof n=="string"?n:"Unknown error",{cause:n})}function st(n,e=N){throw $e(n)}const rn=Symbol("fallback");function at(n){for(let e=0;e<n.length;e++)n[e]()}function an(n,e,t={}){let s=[],r=[],i=[],o=0,a=e.length>1?[]:null;return ce(()=>at(i)),()=>{let l=n()||[],u=l.length,c,h;return l[Ht],Z(()=>{let m,w,f,p,v,b,S,y,O;if(u===0)o!==0&&(at(i),i=[],s=[],r=[],o=0,a&&(a=[])),t.fallback&&(s=[rn],r[0]=he(A=>(i[0]=A,t.fallback())),o=1);else if(o===0){for(r=new Array(u),h=0;h<u;h++)s[h]=l[h],r[h]=he(d);o=u}else{for(f=new Array(u),p=new Array(u),a&&(v=new Array(u)),b=0,S=Math.min(o,u);b<S&&s[b]===l[b];b++);for(S=o-1,y=u-1;S>=b&&y>=b&&s[S]===l[y];S--,y--)f[y]=r[S],p[y]=i[S],a&&(v[y]=a[S]);for(m=new Map,w=new Array(y+1),h=y;h>=b;h--)O=l[h],c=m.get(O),w[h]=c===void 0?-1:c,m.set(O,h);for(c=b;c<=S;c++)O=s[c],h=m.get(O),h!==void 0&&h!==-1?(f[h]=r[c],p[h]=i[c],a&&(v[h]=a[c]),h=w[h],m.set(O,h)):i[c]();for(h=b;h<u;h++)h in f?(r[h]=f[h],i[h]=p[h],a&&(a[h]=v[h],a[h](h))):r[h]=he(d);r=r.slice(0,o=u),s=l.slice(0)}return r});function d(m){if(i[h]=m,a){const[w,f]=z(h,{name:"index"});return a[h]=f,e(l[h],w)}return e(l[h])}}}function K(n,e){return Qt(n,e||{})}const on=n=>`Attempting to access a stale value from <${n}> that could possibly be undefined. This may occur because you are reading the accessor returned from the component at a time where it has already been unmounted. We recommend cleaning up any stale timers or async, or reading from the initial condition.`;function Ie(n){const e="fallback"in n&&{fallback:()=>n.fallback};return ue(an(()=>n.each,n.children,e||void 0),void 0,{name:"value"})}function se(n){const e=n.keyed,t=ue(()=>n.when,void 0,{name:"condition value"}),s=e?t:ue(t,void 0,{equals:(r,i)=>!r==!i,name:"condition"});return ue(()=>{const r=s();if(r){const i=n.children;return typeof i=="function"&&i.length>0?Z(()=>i(e?r:()=>{if(!Z(s))throw on("Show");return t()})):i}return n.fallback},void 0,{name:"value"})}globalThis&&(globalThis.Solid$$?console.warn("You appear to have multiple instances of Solid. This can lead to unexpected behavior."):globalThis.Solid$$=!0);const X=n=>ue(()=>n());function ln(n,e,t){let s=t.length,r=e.length,i=s,o=0,a=0,l=e[r-1].nextSibling,u=null;for(;o<r||a<i;){if(e[o]===t[a]){o++,a++;continue}for(;e[r-1]===t[i-1];)r--,i--;if(r===o){const c=i<s?a?t[a-1].nextSibling:t[i-a]:l;for(;a<i;)n.insertBefore(t[a++],c)}else if(i===a)for(;o<r;)(!u||!u.has(e[o]))&&e[o].remove(),o++;else if(e[o]===t[i-1]&&t[a]===e[r-1]){const c=e[--r].nextSibling;n.insertBefore(t[a++],e[o++].nextSibling),n.insertBefore(t[--i],c),e[r]=t[i]}else{if(!u){u=new Map;let h=a;for(;h<i;)u.set(t[h],h++)}const c=u.get(e[o]);if(c!=null)if(a<c&&c<i){let h=o,d=1,m;for(;++h<r&&h<i&&!((m=u.get(e[h]))==null||m!==c+d);)d++;if(d>c-a){const w=e[o];for(;a<c;)n.insertBefore(t[a++],w)}else n.replaceChild(t[a++],e[o++])}else o++;else e[o++].remove()}}}const ot="_$DX_DELEGATE";function un(n,e,t,s={}){if(!e)throw new Error("The `element` passed to `render(..., element)` doesn't exist. Make sure `element` exists in the document.");let r;return he(i=>{r=i,e===document?n():$(e,n(),e.firstChild?null:void 0,t)},s.owner),()=>{r(),e.textContent=""}}function _(n,e,t,s){let r;const i=()=>{const a=document.createElement("template");return a.innerHTML=n,a.content.firstChild},o=()=>(r||(r=i())).cloneNode(!0);return o.cloneNode=o,o}function de(n,e=window.document){const t=e[ot]||(e[ot]=new Set);for(let s=0,r=n.length;s<r;s++){const i=n[s];t.has(i)||(t.add(i),e.addEventListener(i,cn))}}function q(n,e,t){t==null?n.removeAttribute(e):n.setAttribute(e,t)}function Ce(n,e){e==null?n.removeAttribute("class"):n.className=e}function Ne(n,e,t,s){Array.isArray(t)?(n[`$$${e}`]=t[0],n[`$$${e}Data`]=t[1]):n[`$$${e}`]=t}function G(n,e,t){return Z(()=>n(e,t))}function $(n,e,t,s){if(t!==void 0&&!s&&(s=[]),typeof e!="function")return Fe(n,e,s,t);U(r=>Fe(n,e(),r,t),s)}function cn(n){let e=n.target;const t=`$$${n.type}`,s=n.target,r=n.currentTarget,i=l=>Object.defineProperty(n,"target",{configurable:!0,value:l}),o=()=>{const l=e[t];if(l&&!e.disabled){const u=e[`${t}Data`];if(u!==void 0?l.call(e,u,n):l.call(e,n),n.cancelBubble)return}return e.host&&typeof e.host!="string"&&!e.host._$host&&e.contains(n.target)&&i(e.host),!0},a=()=>{for(;o()&&(e=e._$host||e.parentNode||e.host););};if(Object.defineProperty(n,"currentTarget",{configurable:!0,get(){return e||document}}),n.composedPath){const l=n.composedPath();i(l[0]);for(let u=0;u<l.length-2&&(e=l[u],!!o());u++){if(e._$host){e=e._$host,a();break}if(e.parentNode===r)break}}else a();i(s)}function Fe(n,e,t,s,r){for(;typeof t=="function";)t=t();if(e===t)return t;const i=typeof e,o=s!==void 0;if(n=o&&t[0]&&t[0].parentNode||n,i==="string"||i==="number"){if(i==="number"&&(e=e.toString(),e===t))return t;if(o){let a=t[0];a&&a.nodeType===3?a.data!==e&&(a.data=e):a=document.createTextNode(e),t=ae(n,t,s,a)}else t!==""&&typeof t=="string"?t=n.firstChild.data=e:t=n.textContent=e}else if(e==null||i==="boolean")t=ae(n,t,s);else{if(i==="function")return U(()=>{let a=e();for(;typeof a=="function";)a=a();t=Fe(n,a,t,s)}),()=>t;if(Array.isArray(e)){const a=[],l=t&&Array.isArray(t);if(Qe(a,e,t,r))return U(()=>t=Fe(n,a,t,s,!0)),()=>t;if(a.length===0){if(t=ae(n,t,s),o)return t}else l?t.length===0?lt(n,a,s):ln(n,t,a):(t&&ae(n),lt(n,a));t=a}else if(e.nodeType){if(Array.isArray(t)){if(o)return t=ae(n,t,s,e);ae(n,t,null,e)}else t==null||t===""||!n.firstChild?n.appendChild(e):n.replaceChild(e,n.firstChild);t=e}else console.warn("Unrecognized value. Skipped inserting",e)}return t}function Qe(n,e,t,s){let r=!1;for(let i=0,o=e.length;i<o;i++){let a=e[i],l=t&&t[n.length],u;if(!(a==null||a===!0||a===!1))if((u=typeof a)=="object"&&a.nodeType)n.push(a);else if(Array.isArray(a))r=Qe(n,a,l)||r;else if(u==="function")if(s){for(;typeof a=="function";)a=a();r=Qe(n,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||r}else n.push(a),r=!0;else{const c=String(a);l&&l.nodeType===3&&l.data===c?n.push(l):n.push(document.createTextNode(c))}}return r}function lt(n,e,t=null){for(let s=0,r=e.length;s<r;s++)n.insertBefore(e[s],t)}function ae(n,e,t,s){if(t===void 0)return n.textContent="";const r=s||document.createTextNode("");if(e.length){let i=!1;for(let o=e.length-1;o>=0;o--){const a=e[o];if(r!==a){const l=a.parentNode===n;!i&&!o?l?n.replaceChild(r,a):n.insertBefore(r,t):l&&a.remove()}else i=!0}}else n.insertBefore(r,t);return[r]}const dn=(n,e,t={})=>({kind:"text",key:n,label:e,placeholder:t.placeholder,initialValue:t.initialValue,required:t.required,disabled:t.disabled,autofocus:t.autofocus,hint:t.hint}),fn=(n,e,t={})=>({kind:"email",key:n,label:e,placeholder:t.placeholder,initialValue:t.initialValue,required:t.required,disabled:t.disabled,autofocus:t.autofocus,hint:t.hint}),hn=(n,e,t={})=>({kind:"password",key:n,label:e,placeholder:t.placeholder,initialValue:t.initialValue,required:t.required,disabled:t.disabled,autofocus:t.autofocus,hint:t.hint}),gn=(n,e,t={})=>({kind:"textarea",key:n,label:e,placeholder:t.placeholder,initialValue:t.initialValue,required:t.required,disabled:t.disabled,autofocus:t.autofocus,hint:t.hint}),pn=(n,e,t={})=>({kind:"checkbox",key:n,label:e,initialValue:t.initialValue,required:t.required,disabled:t.disabled,autofocus:t.autofocus,hint:t.hint}),ze={text:dn,email:fn,password:hn,textarea:gn,checkbox:pn},Ft=new WeakMap,mn=(n,e)=>{Ft.set(n,e)},bn=n=>Ft.get(n);var yn=_('<button type=button class="eden-btn eden-btn-primary">'),He=_("<button type=button class=eden-btn>"),qe=_("<button type=button>"),wn=_("<div class=eden-form-group><input type=text class=eden-input>"),vn=_("<label class=eden-form-label>"),ve=_("<p class=eden-form-help>"),xn=_('<div class="eden-flex-col eden-gap-md">'),Sn=_("<div class=eden-form-group><label class=eden-checkbox-option><input type=checkbox class=eden-checkbox><span class=eden-checkbox-option-label>"),$n=_("<div class=eden-form-group><label class=eden-form-label></label><textarea class=eden-textarea rows=3>"),Cn=_("<div class=eden-form-group><label class=eden-form-label></label><input class=eden-input>"),kn=_("<div class=eden-text-xs style=color:var(--eden-color-danger)>");const Je=(n,e)=>typeof n=="object"&&n!==null&&Object.hasOwn(n,e),We=n=>n==="danger"?"eden-btn eden-btn-danger":"eden-btn eden-btn-primary",An=n=>n.kind==="checkbox"?n.initialValue??!1:n.initialValue??"",Pn=n=>{const e={};for(const t of n)e[t.key]=An(t);return e},Ln=(n,e)=>n.required?n.kind==="checkbox"?e===!0:typeof e=="string"&&e.trim().length>0:!0,ut=(n,e)=>n.every(t=>Ln(t,e[t.key])),On=n=>{const e=n.find(s=>s.autofocus);return e?e.key:n.find(s=>s.kind!=="checkbox")?.key??null},Rn=()=>{const[n,e]=z(null),t=[];let s=0;const r=()=>{if(n())return;const f=t.shift();f&&e(f)},i=f=>{t.push(f),r()},o=()=>{e(null),queueMicrotask(r)},a=f=>new Promise(p=>{const[v,b]=z(f.initialValue),[S,y]=z(f.initialCanSubmit??!0),O=Je(f,"defaultSubmitResult"),A=Je(f,"cancelResult");i({id:++s,title:f.title,message:f.message,size:f.size??"sm",dismissOnBackdrop:f.dismissOnBackdrop??!0,dismissOnEscape:f.dismissOnEscape??!0,onEnter:f.onEnter??"submit",selectInitialFocusText:f.selectInitialFocusText??!1,value:v,setValue:b,canSubmit:S,setCanSubmit:y,render:f.render,footer:f.footer,hasDefaultSubmitResult:O,defaultSubmitResult:O?f.defaultSubmitResult:void 0,hasCancelResult:A,cancelResult:A?f.cancelResult:void 0,onSubmitAttempt:f.onSubmitAttempt,resolve:p})}),w={active:n,submit:async(...f)=>{const p=n();if(!p||!p.canSubmit())return;const v=f.length>0,b=f[0];let S=v?b:p.hasDefaultSubmitResult?p.defaultSubmitResult:p.value();if(p.onSubmitAttempt)try{const y=await p.onSubmitAttempt(S);if(!y.allowClose)return;Je(y,"result")&&(S=y.result)}catch(y){console.error("Dialog submit handler failed:",y);return}p.resolve(S),o()},cancel:()=>{const f=n();if(!f)return;const p=f.hasCancelResult?f.cancelResult:null;f.resolve(p),o()},custom:a,alert:async f=>{await a({title:f.title,message:f.message,size:f.size,dismissOnBackdrop:f.dismissOnBackdrop,dismissOnEscape:f.dismissOnEscape,onEnter:f.onEnter,initialValue:void 0,cancelResult:void 0,footer:p=>(()=>{var v=yn();v.$$click=()=>p.submit();var b=p.setPrimaryActionRef;return typeof b=="function"?G(b,v):p.setPrimaryActionRef=v,$(v,()=>f.okLabel??"OK"),v})()})},confirm:f=>{const p=f.tone??"default";return a({title:f.title,message:f.message,size:f.size,dismissOnBackdrop:f.dismissOnBackdrop,dismissOnEscape:f.dismissOnEscape,onEnter:f.onEnter,initialValue:void 0,defaultSubmitResult:!0,cancelResult:!1,footer:v=>[(()=>{var b=He();return b.$$click=()=>v.cancel(),$(b,()=>f.cancelLabel??"Cancel"),b})(),(()=>{var b=qe();b.$$click=()=>v.submit(!0);var S=v.setPrimaryActionRef;return typeof S=="function"?G(S,b):v.setPrimaryActionRef=b,$(b,()=>f.confirmLabel??"OK"),U(()=>Ce(b,We(p))),b})()]})},prompt:f=>{const p=f.tone??"default",v=`eden-dialog-prompt-${s+1}`;return a({title:f.title,message:f.message,size:f.size,dismissOnBackdrop:f.dismissOnBackdrop,dismissOnEscape:f.dismissOnEscape,onEnter:f.onEnter,selectInitialFocusText:!0,initialValue:f.initialValue??"",cancelResult:null,render:b=>(()=>{var S=wn(),y=S.firstChild;$(S,(()=>{var A=X(()=>!!f.label);return()=>A()&&(()=>{var x=vn();return q(x,"for",v),$(x,()=>f.label),x})()})(),y),y.$$input=A=>b.setValue(A.currentTarget.value);var O=b.setInitialFocusRef;return typeof O=="function"?G(O,y):b.setInitialFocusRef=y,q(y,"id",v),$(S,(()=>{var A=X(()=>!!f.hint);return()=>A()&&(()=>{var x=ve();return $(x,()=>f.hint),x})()})(),null),U(()=>q(y,"placeholder",f.placeholder)),U(()=>y.value=b.value()),S})(),footer:b=>[(()=>{var S=He();return S.$$click=()=>b.cancel(),$(S,()=>f.cancelLabel??"Cancel"),S})(),(()=>{var S=qe();S.$$click=()=>b.submit();var y=b.setPrimaryActionRef;return typeof y=="function"?G(y,S):b.setPrimaryActionRef=S,$(S,()=>f.confirmLabel??"OK"),U(()=>Ce(S,We(p))),S})()]})},form:f=>{const p=f.tone??"default",v=On(f.fields),b=`eden-dialog-form-${s+1}`,[S,y]=z(null),O=Pn(f.fields);return a({title:f.title,message:f.message,size:f.size,dismissOnBackdrop:f.dismissOnBackdrop,dismissOnEscape:f.dismissOnEscape,onEnter:f.onEnter,initialValue:O,initialCanSubmit:ut(f.fields,O),cancelResult:null,render:A=>(()=>{var x=xn();return $(x,K(Ie,{get each(){return f.fields},children:P=>{const L=()=>A.value()[P.key],R=j=>{const E={...A.value(),[P.key]:j};y(null),A.setValue(()=>E),A.setCanSubmit(ut(f.fields,E))},T=v!=null&&v===P.key,V=`${b}-${P.key}`;return P.kind==="checkbox"?(()=>{var j=Sn(),H=j.firstChild,E=H.firstChild,Y=E.nextSibling;E.addEventListener("change",I=>R(I.currentTarget.checked));var F=T?A.setInitialFocusRef:void 0;return typeof F=="function"&&G(F,E),$(Y,()=>P.label),$(j,(()=>{var I=X(()=>!!P.hint);return()=>I()&&(()=>{var g=ve();return $(g,()=>P.hint),g})()})(),null),U(()=>E.disabled=P.disabled),U(()=>E.checked=L()===!0),j})():P.kind==="textarea"?(()=>{var j=$n(),H=j.firstChild,E=H.nextSibling;q(H,"for",V),$(H,()=>P.label),E.$$input=F=>R(F.currentTarget.value);var Y=T?A.setInitialFocusRef:void 0;return typeof Y=="function"&&G(Y,E),q(E,"id",V),$(j,(()=>{var F=X(()=>!!P.hint);return()=>F()&&(()=>{var I=ve();return $(I,()=>P.hint),I})()})(),null),U(F=>{var I=P.placeholder,g=P.disabled;return I!==F.e&&q(E,"placeholder",F.e=I),g!==F.t&&(E.disabled=F.t=g),F},{e:void 0,t:void 0}),U(()=>E.value=String(L()??"")),j})():(()=>{var j=Cn(),H=j.firstChild,E=H.nextSibling;q(H,"for",V),$(H,()=>P.label),E.$$input=F=>R(F.currentTarget.value);var Y=T?A.setInitialFocusRef:void 0;return typeof Y=="function"&&G(Y,E),q(E,"id",V),$(j,(()=>{var F=X(()=>!!P.hint);return()=>F()&&(()=>{var I=ve();return $(I,()=>P.hint),I})()})(),null),U(F=>{var I=P.kind,g=P.placeholder,C=P.disabled;return I!==F.e&&q(E,"type",F.e=I),g!==F.t&&q(E,"placeholder",F.t=g),C!==F.a&&(E.disabled=F.a=C),F},{e:void 0,t:void 0,a:void 0}),U(()=>E.value=String(L()??"")),j})()}}),null),$(x,(()=>{var P=X(()=>!!S());return()=>P()&&(()=>{var L=kn();return $(L,S),L})()})(),null),x})(),onSubmitAttempt:async A=>{const x=A,P=f.validate?.(x)??null;if(P)return y(P),{allowClose:!1};if(f.onSubmit){const L=await f.onSubmit(x);if(L)return y(L),{allowClose:!1}}return{allowClose:!0,result:x}},footer:A=>[(()=>{var x=He();return x.$$click=()=>A.cancel(),$(x,()=>f.cancelLabel??"Cancel"),x})(),(()=>{var x=qe();x.$$click=()=>A.submit();var P=A.setPrimaryActionRef;return typeof P=="function"?G(P,x):A.setPrimaryActionRef=x,$(x,()=>f.confirmLabel??"OK"),U(L=>{var R=We(p),T=!A.canSubmit();return R!==L.e&&Ce(x,L.e=R),T!==L.t&&(x.disabled=L.t=T),L},{e:void 0,t:void 0}),x})()]})}};return mn(w,w),w};de(["click","input"]);var En=_("<div class=eden-modal-overlay>"),In=_("<div role=dialog aria-modal=true><div class=eden-modal-header><h3 class=eden-modal-title></h3><button type=button class=eden-modal-close>×</button></div><div class=eden-modal-body>"),Nn=_("<div>"),Fn=_("<div class=eden-modal-footer>");const Dn=n=>n==="sm"?"eden-modal-sm":n==="lg"?"eden-modal-lg":"",Tn=n=>{const e=bn(n.dialogs);if(!e)return console.error("DialogHost received an unsupported controller. Pass the value returned by createDialogs()."),null;let t,s,r;const i=o=>({value:o.value,setValue:o.setValue,canSubmit:o.canSubmit,setCanSubmit:o.setCanSubmit,submit:a=>e.submit(a),cancel:e.cancel,setPrimaryActionRef:a=>{t=a},setInitialFocusRef:a=>{s=a}});return Oe(()=>{const o=e.active();if(!o)return;r=void 0,t=void 0,s=void 0;const a=document.activeElement;queueMicrotask(()=>{const l=s??t;l?.focus?.(),o.selectInitialFocusText&&l&&"select"in l&&typeof l.select=="function"&&l.select()}),ce(()=>{a?.focus?.()})}),Oe(()=>{const o=e.active();if(!o)return;const a=u=>{if(u.stopPropagation(),u.key==="Escape"&&o.dismissOnEscape){u.preventDefault(),e.cancel();return}if(u.key==="Enter"&&o.onEnter==="submit"){if(u.target?.tagName==="TEXTAREA")return;u.preventDefault(),e.submit()}},l=u=>{if(!o.dismissOnBackdrop)return;const c=u.target;!c||!r||r.contains(c)||e.cancel()};document.addEventListener("mousedown",l,!0),document.addEventListener("keydown",a,!0),ce(()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("keydown",a,!0),r=void 0})}),X(()=>X(()=>!!e.active())()&&(()=>{var o=En();return $(o,()=>{const a=e.active();if(!a)return null;const l=i(a);return(()=>{var u=In(),c=u.firstChild,h=c.firstChild,d=h.nextSibling,m=c.nextSibling,w=r;return typeof w=="function"?G(w,u):r=u,$(h,()=>a.title),d.$$click=()=>e.cancel(),$(m,(()=>{var f=X(()=>a.message!=null);return()=>f()&&(()=>{var p=Nn();return $(p,()=>a.message),p})()})(),null),$(m,()=>a.render?.(l),null),$(u,(()=>{var f=X(()=>!!a.footer);return()=>f()&&(()=>{var p=Fn();return $(p,()=>a.footer(l)),p})()})(),null),U(()=>Ce(u,`eden-modal ${Dn(a.size)}`)),u})()}),o})())};de(["click"]);const rt=()=>{if(typeof window>"u")throw new Error("contextMenu can only be used in a browser environment.");const n=window.edenAPI;if(!n)throw new Error("edenAPI is not available on window.");return n},Ze=new Map;let ct=!1,ke=null,dt=!1;const Dt=(n,e)=>{ke={x:n,y:e}},ft=n=>{Dt(n.clientX,n.clientY)},ht=n=>{const e=n.touches[0]||n.changedTouches[0];e&&Dt(e.clientX,e.clientY)},Tt=()=>{dt||typeof window>"u"||(dt=!0,window.addEventListener("pointermove",ft,{passive:!0}),window.addEventListener("mousemove",ft,{passive:!0}),window.addEventListener("touchstart",ht,{passive:!0}),window.addEventListener("touchmove",ht,{passive:!0}))},Vn=n=>{if(n){if("clientX"in n&&"clientY"in n)return{left:n.clientX,top:n.clientY};if("touches"in n){const e=n.touches[0]||n.changedTouches[0];if(e)return{left:e.clientX,top:e.clientY}}}},jn=n=>{if(n.type!=="item")return n;const{onSelect:e,...t}=n;return t},Mn=async()=>{if(ct)return;ct=!0,await rt().subscribe("context-menu/closed",e=>{const t=Ze.get(e.requestId);t&&(Ze.delete(e.requestId),t(e))})},it=async n=>{Tt(),await Mn();const e=n.position||Vn(n.event)||(ke?{left:ke.x,top:ke.y}:void 0)||{left:Math.round(window.innerWidth/2),top:Math.round(window.innerHeight/2)},t=rt(),{requestId:s}=await t.shellCommand("context-menu/open",{title:n.title,position:e,items:n.items.map(jn)});return new Promise(r=>{Ze.set(s,i=>{(async()=>{try{if(i.itemId){const a=n.items.find(l=>l.type==="item"&&l.id===i.itemId);a?.onSelect&&await a.onSelect()}else i.reason==="dismiss"&&n.onDismiss&&await n.onDismiss();n.onClose&&await n.onClose()}catch(a){console.error("Context menu handler failed:",a)}finally{r(i)}})()})})},_n=async n=>it({...n}),Un=n=>(Tt(),e=>{"preventDefault"in e&&typeof e.preventDefault=="function"&&e.preventDefault(),"stopPropagation"in e&&typeof e.stopPropagation=="function"&&e.stopPropagation();const t=n(e);it({...t,event:e}).catch(s=>{console.error("Failed to open context menu:",s),t.onClose&&t.onClose()})}),Kn=async n=>{await rt().shellCommand("context-menu/close",{requestId:n})},et={open:it,openAtCursor:_n,createHandler:Un,close:Kn},Vt=n=>({__brand:"title",text:n}),ge=(n,e,t,s)=>({type:"item",id:n,label:e,onSelect:t,...s}),Bn=(n,e,t)=>n?e:t??null,zn=n=>e=>{const t=n(e),s=t.find(i=>i!=null&&typeof i=="object"&&"__brand"in i&&i.__brand==="title"),r=t.filter(i=>i!=null&&typeof i=="object"&&!("__brand"in i));return{title:s?.text,items:r}},jt=n=>{const e=zn(n);return{build:e,show:async(t,s)=>{await et.open({...e(t),position:s})},handler:t=>{const s=typeof t=="function"?t:()=>t;return et.createHandler(()=>e(s()))}}},k=n=>typeof n=="string",fe=()=>{let n,e;const t=new Promise((s,r)=>{n=s,e=r});return t.resolve=n,t.reject=e,t},gt=n=>n==null?"":""+n,Hn=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},qn=/###/g,pt=n=>n&&n.indexOf("###")>-1?n.replace(qn,"."):n,mt=n=>!n||k(n),pe=(n,e,t)=>{const s=k(e)?e.split("."):e;let r=0;for(;r<s.length-1;){if(mt(n))return{};const i=pt(s[r]);!n[i]&&t&&(n[i]=new t),Object.prototype.hasOwnProperty.call(n,i)?n=n[i]:n={},++r}return mt(n)?{}:{obj:n,k:pt(s[r])}},bt=(n,e,t)=>{const{obj:s,k:r}=pe(n,e,Object);if(s!==void 0||e.length===1){s[r]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=pe(n,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=pe(n,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},Jn=(n,e,t,s)=>{const{obj:r,k:i}=pe(n,e,Object);r[i]=r[i]||[],r[i].push(t)},De=(n,e)=>{const{obj:t,k:s}=pe(n,e);if(t)return t[s]},Wn=(n,e,t)=>{const s=De(n,t);return s!==void 0?s:De(e,t)},Mt=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?k(n[s])||n[s]instanceof String||k(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):Mt(n[s],e[s],t):n[s]=e[s]);return n},oe=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Yn={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Gn=n=>k(n)?n.replace(/[&<>"'\/]/g,e=>Yn[e]):n;class Xn{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const Qn=[" ",",","?","!",";"],Zn=new Xn(20),es=(n,e,t)=>{e=e||"",t=t||"";const s=Qn.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(s.length===0)return!0;const r=Zn.getRegExp(`(${s.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!r.test(n);if(!i){const o=n.indexOf(t);o>0&&!r.test(n.substring(0,o))&&(i=!0)}return i},tt=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const s=e.split(t);let r=n;for(let i=0;i<s.length;){if(!r||typeof r!="object")return;let o,a="";for(let l=i;l<s.length;++l)if(l!==i&&(a+=t),a+=s[l],o=r[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<s.length-1)continue;i+=l-i+1;break}r=o}return r},Te=n=>n&&n.replace("_","-"),ts={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class Ve{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||ts,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,r){return r&&!this.debug?null:(k(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Ve(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ve(this.logger,e)}}var Q=new Ve;class _e{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const r=this.observers[s].get(t)||0;this.observers[s].set(t,r+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),r=1;r<t;r++)s[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,l]=o;for(let u=0;u<l;u++)a.apply(a,[e,...s])})}}class yt extends _e{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],s&&(Array.isArray(s)?a.push(...s):k(s)&&i?a.push(...s.split(i)):a.push(s)));const l=De(this.data,a);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=a[0],t=a[1],s=a.slice(2).join(".")),l||!o||!k(s)?l:tt(this.data&&this.data[e]&&this.data[e][t],s,i)}addResource(e,t,s,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,t];s&&(a=a.concat(o?s.split(o):s)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),bt(this.data,a,r),i.silent||this.emit("added",e,t,s,r)}addResources(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in s)(k(s[i])||Array.isArray(s[i]))&&this.addResource(e,t,i,s[i],{silent:!0});r.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,r,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=s,s=t,t=a[1]),this.addNamespaces(t);let l=De(this.data,a)||{};o.skipCopy||(s=JSON.parse(JSON.stringify(s))),r?Mt(l,s,i):l={...l,...s},bt(this.data,a,l),o.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(r=>t[r]&&Object.keys(t[r]).length>0)}toJSON(){return this.data}}var _t={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,r){return n.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,t,s,r))}),e}};const wt={};class je extends _e{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Hn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Q.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const s=this.resolve(e,t);return s&&s.res!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=s&&e.indexOf(s)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!es(e,s,r);if(o&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:k(i)?[i]:i};const u=e.split(s);(s!==r||s===r&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(r)}return{key:e,namespaces:k(i)?[i]:i}}translate(e,t,s){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),l=a[a.length-1],u=t.lng||this.language,c=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const y=t.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${y}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${y}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:o}const h=this.resolve(e,t);let d=h&&h.res;const m=h&&h.usedKey||o,w=h&&h.exactUsedKey||o,f=Object.prototype.toString.apply(d),p=["[object Number]","[object Function]","[object RegExp]"],v=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!k(d)&&typeof d!="boolean"&&typeof d!="number";if(b&&d&&S&&p.indexOf(f)<0&&!(k(v)&&Array.isArray(d))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,d,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(h.res=y,h.usedParams=this.getUsedParamsDetails(t),h):y}if(i){const y=Array.isArray(d),O=y?[]:{},A=y?w:m;for(const x in d)if(Object.prototype.hasOwnProperty.call(d,x)){const P=`${A}${i}${x}`;O[x]=this.translate(P,{...t,joinArrays:!1,ns:a}),O[x]===P&&(O[x]=d[x])}d=O}}else if(b&&k(v)&&Array.isArray(d))d=d.join(v),d&&(d=this.extendTranslation(d,e,t,s));else{let y=!1,O=!1;const A=t.count!==void 0&&!k(t.count),x=je.hasDefaultValue(t),P=A?this.pluralResolver.getSuffix(u,t.count,t):"",L=t.ordinal&&A?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",R=A&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),T=R&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${P}`]||t[`defaultValue${L}`]||t.defaultValue;!this.isValidLookup(d)&&x&&(y=!0,d=T),this.isValidLookup(d)||(O=!0,d=o);const j=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:d,H=x&&T!==d&&this.options.updateMissing;if(O||y||H){if(this.logger.log(H?"updateKey":"missingKey",u,l,o,H?T:d),i){const I=this.resolve(o,{...t,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let E=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let I=0;I<Y.length;I++)E.push(Y[I]);else this.options.saveMissingTo==="all"?E=this.languageUtils.toResolveHierarchy(t.lng||this.language):E.push(t.lng||this.language);const F=(I,g,C)=>{const D=x&&C!==d?C:j;this.options.missingKeyHandler?this.options.missingKeyHandler(I,l,g,D,H,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(I,l,g,D,H,t),this.emit("missingKey",I,l,g,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?E.forEach(I=>{const g=this.pluralResolver.getSuffixes(I,t);R&&t[`defaultValue${this.options.pluralSeparator}zero`]&&g.indexOf(`${this.options.pluralSeparator}zero`)<0&&g.push(`${this.options.pluralSeparator}zero`),g.forEach(C=>{F([I],o+C,t[`defaultValue${C}`]||T)})}):F(E,o,T))}d=this.extendTranslation(d,e,t,h,s),O&&d===o&&this.options.appendNamespaceToMissingKey&&(d=`${l}:${o}`),(O||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${o}`:o,y?d:void 0):d=this.options.parseMissingKeyHandler(d))}return r?(h.res=d,h.usedParams=this.getUsedParamsDetails(t),h):d}extendTranslation(e,t,s,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const u=k(e)&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const d=e.match(this.interpolator.nestingRegexp);c=d&&d.length}let h=s.replace&&!k(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),e=this.interpolator.interpolate(e,h,s.lng||this.language||r.usedLng,s),u){const d=e.match(this.interpolator.nestingRegexp),m=d&&d.length;c<m&&(s.nest=!1)}!s.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(s.lng=this.language||r.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var d=arguments.length,m=new Array(d),w=0;w<d;w++)m[w]=arguments[w];return i&&i[0]===m[0]&&!s.context?(o.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`),null):o.translate(...m,t)},s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,l=k(a)?[a]:a;return e!=null&&l&&l.length&&s.applyPostProcessor!==!1&&(e=_t.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,r,i,o,a;return k(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),c=u.key;r=c;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const d=t.count!==void 0&&!k(t.count),m=d&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),w=t.context!==void 0&&(k(t.context)||typeof t.context=="number")&&t.context!=="",f=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);h.forEach(p=>{this.isValidLookup(s)||(a=p,!wt[`${f[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(wt[`${f[0]}-${p}`]=!0,this.logger.warn(`key "${r}" for languages "${f.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach(v=>{if(this.isValidLookup(s))return;o=v;const b=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(b,c,v,p,t);else{let y;d&&(y=this.pluralResolver.getSuffix(v,t.count,t));const O=`${this.options.pluralSeparator}zero`,A=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(b.push(c+y),t.ordinal&&y.indexOf(A)===0&&b.push(c+y.replace(A,this.options.pluralSeparator)),m&&b.push(c+O)),w){const x=`${c}${this.options.contextSeparator}${t.context}`;b.push(x),d&&(b.push(x+y),t.ordinal&&y.indexOf(A)===0&&b.push(x+y.replace(A,this.options.pluralSeparator)),m&&b.push(x+O))}}let S;for(;S=b.pop();)this.isValidLookup(s)||(i=S,s=this.getResource(v,p,S,t))}))})}),{res:s,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,r):this.resourceStore.getResource(e,t,s,r)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!k(e.replace);let r=s?e.replace:e;if(s&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!s){r={...r};for(const i of t)delete r[i]}return r}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}const Ye=n=>n.charAt(0).toUpperCase()+n.slice(1);class vt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Q.create("languageUtils")}getScriptPartFromCode(e){if(e=Te(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Te(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(k(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let r=Intl.getCanonicalLocales(e)[0];if(r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r)return r}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let s=e.split("-");return this.options.lowerCaseLng?s=s.map(r=>r.toLowerCase()):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ye(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=Ye(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=Ye(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const r=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(r))&&(t=r)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const r=this.getLanguagePartFromCode(s);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(i=>{if(i===r)return i;if(!(i.indexOf("-")<0&&r.indexOf("-")<0)&&(i.indexOf("-")>0&&r.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===r||i.indexOf(r)===0&&r.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),k(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],i=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return k(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):k(e)&&i(this.formatLanguageCode(e)),s.forEach(o=>{r.indexOf(o)<0&&i(this.formatLanguageCode(o))}),r}}let ns=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ss={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const rs=["v1","v2","v3"],is=["v4"],xt={zero:0,one:1,two:2,few:3,many:4,other:5},as=()=>{const n={};return ns.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:ss[e.fc]}})}),n};class os{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Q.create("pluralResolver"),(!this.options.compatibilityJSON||is.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=as(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const s=Te(e==="dev"?"en":e),r=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:s,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(s,{type:r})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,t)}return this.pluralRulesCache[i]=o,o}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,s).map(r=>`${t}${r}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((r,i)=>xt[r]-xt[i]).map(r=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${r}`):s.numbers.map(r=>this.getSuffix(e,r,t)):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,s);return r?this.shouldUseIntlApi()?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[s];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const i=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}shouldUseIntlApi(){return!rs.includes(this.options.compatibilityJSON)}}const St=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=Wn(n,e,t);return!i&&r&&k(t)&&(i=tt(n,t,s),i===void 0&&(i=tt(e,t,s))),i},Ge=n=>n.replace(/\$/g,"$$$$");class ls{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Q.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(t=>t),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:l,formatSeparator:u,unescapeSuffix:c,unescapePrefix:h,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:w,nestingSuffixEscaped:f,nestingOptionsSeparator:p,maxReplaces:v,alwaysFormat:b}=e.interpolation;this.escape=t!==void 0?t:Gn,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=i?oe(i):o||"{{",this.suffix=a?oe(a):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=c?"":h||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=d?oe(d):m||oe("$t("),this.nestingSuffix=w?oe(w):f||oe(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=v||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t&&t.source===s?(t.lastIndex=0,t):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,s,r){let i,o,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const v=St(t,l,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(v,void 0,s,{...r,...t,interpolationkey:m}):v}const w=m.split(this.formatSeparator),f=w.shift().trim(),p=w.join(this.formatSeparator).trim();return this.format(St(t,l,f,this.options.keySeparator,this.options.ignoreJSONStructure),p,s,{...r,...t,interpolationkey:f})};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>Ge(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?Ge(this.escape(m)):Ge(m)}].forEach(m=>{for(a=0;i=m.regex.exec(e);){const w=i[1].trim();if(o=u(w),o===void 0)if(typeof c=="function"){const p=c(e,i,r);o=k(p)?p:""}else if(r&&Object.prototype.hasOwnProperty.call(r,w))o="";else if(h){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`),o="";else!k(o)&&!this.useRawValueToEscape&&(o=gt(o));const f=m.safeValue(o);if(e=e.replace(i[0],f),h?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,o;const a=(l,u)=>{const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const h=l.split(new RegExp(`${c}[ ]*{`));let d=`{${h[1]}`;l=h[0],d=this.interpolate(d,o);const m=d.match(/'/g),w=d.match(/"/g);(m&&m.length%2===0&&!w||w.length%2!==0)&&(d=d.replace(/'/g,'"'));try{o=JSON.parse(d),u&&(o={...u,...o})}catch(f){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,f),`${l}${c}${d}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];o={...s},o=o.replace&&!k(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const c=r[1].split(this.formatSeparator).map(h=>h.trim());r[1]=c.shift(),l=c,u=!0}if(i=t(a.call(this,r[1].trim(),o),o),i&&r[0]===e&&!k(i))return i;k(i)||(i=gt(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),i=""),u&&(i=l.reduce((c,h)=>this.format(c,h,s.lng,{...s,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}}const us=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const r=s[1].substring(0,s[1].length-1);e==="currency"&&r.indexOf(":")<0?t.currency||(t.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?t.range||(t.range=r.trim()):r.split(";").forEach(o=>{if(o){const[a,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),c=a.trim();t[c]||(t[c]=u),u==="false"&&(t[c]=!1),u==="true"&&(t[c]=!0),isNaN(u)||(t[c]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},le=n=>{const e={};return(t,s,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const o=s+JSON.stringify(i);let a=e[o];return a||(a=n(Te(s),r),e[o]=a),a(t)}};class cs{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Q.create("formatter"),this.options=e,this.formats={number:le((t,s)=>{const r=new Intl.NumberFormat(t,{...s});return i=>r.format(i)}),currency:le((t,s)=>{const r=new Intl.NumberFormat(t,{...s,style:"currency"});return i=>r.format(i)}),datetime:le((t,s)=>{const r=new Intl.DateTimeFormat(t,{...s});return i=>r.format(i)}),relativetime:le((t,s)=>{const r=new Intl.RelativeTimeFormat(t,{...s});return i=>r.format(i,s.range||"day")}),list:le((t,s)=>{const r=new Intl.ListFormat(t,{...s});return i=>r.format(i)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=le(t)}format(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,l)=>{const{formatName:u,formatOptions:c}=us(l);if(this.formats[u]){let h=a;try{const d=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},m=d.locale||d.lng||r.locale||r.lng||s;h=this.formats[u](a,m,{...c,...r,...d})}catch(d){this.logger.warn(d)}return h}else this.logger.warn(`there was no format function for ${u}`);return a},e)}}const ds=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class fs extends _e{constructor(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=r,this.logger=Q.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(s,r.backend,r)}queueLoad(e,t,s,r){const i={},o={},a={},l={};return e.forEach(u=>{let c=!0;t.forEach(h=>{const d=`${u}|${h}`;!s.reload&&this.store.hasResourceBundle(u,h)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?o[d]===void 0&&(o[d]=!0):(this.state[d]=1,c=!1,o[d]===void 0&&(o[d]=!0),i[d]===void 0&&(i[d]=!0),l[h]===void 0&&(l[h]=!0)))}),c||(a[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),!t&&s&&this.store.addResourceBundle(i,o,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const a={};this.queue.forEach(l=>{Jn(l.loaded,[i],o),ds(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{a[u]||(a[u]={});const c=l.loaded[u];c.length&&c.forEach(h=>{a[u][h]===void 0&&(a[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:r,wait:i,callback:o});return}this.readingCalls++;const a=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&c&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,r+1,i*2,o)},i);return}o(u,c)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(c=>a(null,c)).catch(a):a(null,u)}catch(u){a(u)}return}return l(e,t,a)}prepareLoading(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();k(e)&&(e=this.languageUtils.toResolveHierarchy(e)),k(t)&&(t=[t]);const i=this.queueLoad(e,t,s,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),r=s[0],i=s[1];this.read(r,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,o,a)})}saveMissing(e,t,s,r,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend&&this.backend.create){const l={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,t,s,r,l):c=u(e,t,s,r),c&&typeof c.then=="function"?c.then(h=>a(null,h)).catch(a):a(null,c)}catch(c){a(c)}else u(e,t,s,r,a,l)}!e||!e[0]||this.store.addResource(e[0],t,s,r)}}}const $t=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),k(n[1])&&(e.defaultValue=n[1]),k(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ct=n=>(k(n.ns)&&(n.ns=[n.ns]),k(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),k(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),xe=()=>{},hs=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class ye extends _e{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ct(e),this.services={},this.logger=Q,this.modules={external:[]},hs(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(k(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=$t();this.options={...r,...this.options,...Ct(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Q.init(i(this.modules.logger),this.options):Q.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=cs);const h=new vt(this.options);this.store=new yt(this.options.resources,this.options);const d=this.services;d.logger=Q,d.resourceStore=this.store,d.languageUtils=h,d.pluralResolver=new os(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(d.formatter=i(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new ls(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new fs(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var w=arguments.length,f=new Array(w>1?w-1:0),p=1;p<w;p++)f[p-1]=arguments[p];e.emit(m,...f)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new je(this.services,this.options),this.translator.on("*",function(m){for(var w=arguments.length,f=new Array(w>1?w-1:0),p=1;p<w;p++)f[p-1]=arguments[p];e.emit(m,...f)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,s||(s=xe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=fe(),u=()=>{const c=(h,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(d),s(h,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xe;const r=k(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const i=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(i,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(a)})}else s(null)}reloadResources(e,t,s){const r=fe();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=xe),this.services.backendConnector.reload(e,t,i=>{r.resolve(),s(i)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&_t.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const r=fe();this.emit("languageChanging",e);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},o=(l,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return s.t(...arguments)}),t&&t(l,function(){return s.t(...arguments)})},a=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=k(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{o(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),r}getFixedT(e,t,s){var r=this;const i=function(o,a){let l;if(typeof a!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),h=2;h<u;h++)c[h-2]=arguments[h];l=r.options.overloadTranslationOptionHandler([o,a].concat(c))}else l={...a};l.lng=l.lng||i.lng,l.lngs=l.lngs||i.lngs,l.ns=l.ns||i.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||i.keyPrefix);const d=r.options.keySeparator||".";let m;return l.keyPrefix&&Array.isArray(o)?m=o.map(w=>`${l.keyPrefix}${d}${w}`):m=l.keyPrefix?`${l.keyPrefix}${d}${o}`:o,r.t(m,l)};return k(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=s,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const o=(a,l)=>{const u=this.services.backendConnector.state[`${a}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(s,e)&&(!r||o(i,e)))}loadNamespaces(e,t){const s=fe();return this.options.ns?(k(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{s.resolve(),t&&t(r)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=fe();k(e)&&(e=[e]);const r=this.options.preload||[],i=e.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=r.concat(i),this.loadResources(o=>{s.resolve(),t&&t(o)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services&&this.services.languageUtils||new vt($t());return t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ye(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xe;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},i=new ye(r);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},s&&(i.store=new yt(this.store.data,r),i.services.resourceStore=i.store),i.translator=new je(i.services,r),i.translator.on("*",function(a){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];i.emit(a,...u)}),i.init(r,t),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const W=ye.createInstance();W.createInstance=ye.createInstance;W.createInstance;W.dir;W.init;W.loadResources;W.reloadResources;W.use;W.changeLanguage;W.getFixedT;W.t;W.exists;W.setDefaultNamespace;W.hasLoadedNamespace;W.loadNamespaces;W.loadLanguages;async function gs(n={}){const e=W.createInstance(),t=n.resources||{};return await e.init({lng:"en",fallbackLng:n.fallbackLng||"en",debug:n.debug||!1,resources:t,interpolation:{escapeValue:!1,prefix:"{",suffix:"}"},partialBundledLanguages:!0}),e}async function ps(n,e){try{const t=window.edenAPI;if(!t)return;const s=await t.shellCommand("i18n/get-common",{locale:e});s?.translations&&n.addResourceBundle(e,"translation",s.translations,!0,!0)}catch(t){console.error("Failed to load common translations",t)}}function Xe(n,e="en"){return n?typeof n=="string"?n:n[e]||n.en||Object.values(n)[0]||"":""}function ms(n={}){return he(()=>{const[e,t]=z("en"),[s]=Ot(async()=>await gs(n)),r=((a,l)=>{const u=s();return u?u.t(a,{lng:e(),...l}):a}),i=async a=>{const l=s();l&&(await ps(l,a),await l.changeLanguage(a)),t(a)};return{t:r,locale:e,setLocale:t,initLocale:async()=>{try{const a=window.edenAPI;if(!a){console.warn("Eden API not found, using default locale");return}const l=c=>{i(c.locale)};ce(()=>{a.unsubscribe("i18n/locale-changed",l)});const u=await a.shellCommand("i18n/get-locale",{});u?.locale&&await i(u.locale),await a.subscribe("i18n/locale-changed",l)}catch(a){console.error("Failed to load system locale",a)}}}})}const bs={shell:{allApps:"All Apps",searchApps:"Search apps...",noAppsFound:"No apps found",openApp:"Open",stopApp:"Stop App",addToDock:"Add to Dock",removeFromDock:"Remove from Dock",signIn:"Sign in",switchUser:"Switch User",logout:"Log out",currentUser:"Current",changePassword:"Change password",currentPassword:"Current password",newPassword:"New password",confirmPassword:"Confirm new password",savePassword:"Save password",passwordMismatch:"Passwords do not match",passwordUpdateFailed:"Failed to update password"}},ys={shell:{allApps:"Aplikacje",searchApps:"Szukaj aplikacji...",noAppsFound:"Nie znaleziono aplikacji",openApp:"Otwórz",stopApp:"Zatrzymaj Aplikację",addToDock:"Dodaj do Docka",removeFromDock:"Usuń z Docka",signIn:"Zaloguj",switchUser:"Przełącz użytkownika",logout:"Wyloguj",currentUser:"Aktualny",changePassword:"Zmień hasło",currentPassword:"Aktualne hasło",newPassword:"Nowe hasło",confirmPassword:"Potwierdź nowe hasło",savePassword:"Zapisz hasło",passwordMismatch:"Hasła nie są takie same",passwordUpdateFailed:"Nie udało się zmienić hasła"}},ws={en:{translation:bs},pl:{translation:ys}},{t:B,locale:me,setLocale:Hs,initLocale:vs}=ms({resources:ws}),xs=n=>jt(e=>{const t=n.isPinned(e.id);return[Vt(e.name),Bn(e.isRunning,ge("stop",B("shell.stopApp"),()=>n.stop(e.id),{icon:"stop-circle"}),ge("open",B("shell.openApp"),()=>n.open(e.id),{icon:"play"})),ge("dock",B(t?"shell.removeFromDock":"shell.addToDock"),()=>(t?n.removeFromDock:n.addToDock)(e.id),{icon:t?"bookmark":"plus"})]}),Ss=n=>jt(e=>[Vt(e?.name??B("shell.signIn")),e&&ge("changePassword",B("shell.changePassword"),n.changePassword,{icon:"key"}),e&&ge("logout",B("shell.logout"),n.logout,{icon:"log-out",danger:!0})]),$s="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='32'%20y1='4'%20x2='32'%20y2='60'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234a4a4a'/%3e%3cstop%20offset='1'%20stop-color='%233a3a3a'/%3e%3c/linearGradient%3e%3c/defs%3e%3c!--%20Squircle%20background%20with%20gradient%20--%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='14'%20fill='url(%23bg)'/%3e%3c!--%20Document%20lines%20icon%20centered%20--%3e%3cg%20transform='translate(16,%2016)'%20fill='%23e0e0e0'%3e%3crect%20x='5'%20y='6'%20width='22'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='13'%20width='22'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='20'%20width='15'%20height='3'%20rx='1.5'/%3e%3crect%20x='5'%20y='27'%20width='22'%20height='3'%20rx='1.5'/%3e%3c/g%3e%3c/svg%3e",Se=new Map;async function Cs(n){if(Se.has(n))return Se.get(n);try{const e=await window.edenAPI.shellCommand("package/get-icon",{appId:n});return Se.set(n,e.icon),e.icon}catch(e){console.warn(`Failed to fetch icon for ${n}:`,e),Se.set(n,void 0);return}}var ks=_("<div class=running-indicator>"),As=_("<div class=app-icon><div class=icon-container><img></div><div class=app-name>");function Ae(n){const[e]=Ot(()=>n.icon?null:n.appId,s=>s?Cs(s):Promise.resolve(void 0)),t=()=>n.icon||e()||$s;return(()=>{var s=As(),r=s.firstChild,i=r.firstChild,o=r.nextSibling;return Ne(s,"contextmenu",n.onContextMenu),Ne(s,"click",n.onClick),q(i,"draggable",!1),$(r,K(se,{get when(){return n.isRunning},get children(){return ks()}}),null),$(o,()=>n.appName),U(a=>{var l=n.appName,u=t(),c=n.appName;return l!==a.e&&q(s,"title",a.e=l),u!==a.t&&q(i,"src",a.t=u),c!==a.a&&q(i,"alt",a.a=c),a},{e:void 0,t:void 0,a:void 0}),s})()}de(["click","contextmenu"]);var Ps=_('<div class="eden-text-tertiary eden-text-md"style="grid-column:1 / -1;text-align:center;padding:var(--eden-space-2xl)">'),Ls=_('<div class=eden-modal-overlay style=background:rgba(0,0,0,0.4);backdrop-filter:none><div class="eden-modal eden-modal-lg"style=max-height:70vh;background:var(--eden-color-surface-primary)><div class=eden-modal-header><div class="eden-flex eden-gap-sm"style=flex:1><input type=text class=eden-input></div></div><div class="eden-modal-body eden-scrollbar"><div class=eden-card-grid style=gap:var(--eden-space-lg)>'),Os=_('<div class="all-apps-tile eden-interactive">');function Rs(n){const[e,t]=z("");let s;const r=()=>{const l=e().toLowerCase().trim();return l?n.apps.filter(u=>u.name.toLowerCase().includes(l)||u.id.toLowerCase().includes(l)):n.apps};nt(()=>{s?.focus()});function i(){et.close(),n.onClose()}async function o(l){i();const u=n.apps.filter(c=>c.isRunning).map(c=>c.id);for(const c of u)try{await window.edenAPI.shellCommand("view/set-view-visibility",{appId:c,visible:!0})}catch(h){console.error(`Failed to set visibility for ${c}:`,h)}await n.onAppClick(l)}function a(l){l.key==="Escape"&&i()}return(()=>{var l=Ls(),u=l.firstChild,c=u.firstChild,h=c.firstChild,d=h.firstChild,m=c.nextSibling,w=m.firstChild;l.$$keydown=a,l.$$click=i,u.$$click=p=>p.stopPropagation(),d.$$input=p=>t(p.currentTarget.value);var f=s;return typeof f=="function"?G(f,d):s=d,$(w,K(Ie,{get each(){return r()},children:p=>(()=>{var v=Os();return Ne(v,"contextmenu",n.appMenu.handler(p)),v.$$click=()=>o(p.id),$(v,K(Ae,{get appId(){return p.id},get appName(){return p.name},get isRunning(){return p.isRunning}})),U(()=>v.classList.toggle("running",!!p.isRunning)),v})()}),null),$(w,K(se,{get when(){return r().length===0},get children(){var p=Ps();return $(p,()=>B("shell.noAppsFound")),p}}),null),U(()=>q(d,"placeholder",B("shell.searchApps"))),U(()=>d.value=e()),l})()}de(["click","keydown","input","contextmenu"]);const Es=async n=>{try{return await window.edenAPI.shellCommand("user/change-password",n)}catch(e){return console.error("Failed to change password:",e),{success:!1,error:B("shell.passwordUpdateFailed")}}},Is=async n=>await n.dialogs.form({title:B("shell.changePassword"),confirmLabel:B("shell.savePassword"),cancelLabel:B("common.cancel"),fields:[ze.password("currentPassword",B("shell.currentPassword"),{required:!0,autofocus:!0}),ze.password("newPassword",B("shell.newPassword"),{required:!0}),ze.password("confirmPassword",B("shell.confirmPassword"),{required:!0})],validate:t=>t.newPassword!==t.confirmPassword?B("shell.passwordMismatch"):null,onSubmit:async t=>{const s=await Es({currentPassword:t.currentPassword,newPassword:t.newPassword});return s.success?null:s.error||B("shell.passwordUpdateFailed")}})!==null,Ns="data:image/svg+xml,%3csvg%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='32'%20y1='4'%20x2='32'%20y2='60'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234a4a4a'/%3e%3cstop%20offset='1'%20stop-color='%233a3a3a'/%3e%3c/linearGradient%3e%3c/defs%3e%3c!--%20Squircle%20background%20with%20gradient%20--%3e%3crect%20x='4'%20y='4'%20width='56'%20height='56'%20rx='14'%20fill='url(%23bg)'/%3e%3c!--%20Grid%20of%204%20squares%20icon%20centered%20--%3e%3cg%20transform='translate(16,%2016)'%20fill='%23e0e0e0'%3e%3crect%20x='2'%20y='2'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='18'%20y='2'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='2'%20y='18'%20width='12'%20height='12'%20rx='2'/%3e%3crect%20x='18'%20y='18'%20width='12'%20height='12'%20rx='2'/%3e%3c/g%3e%3c/svg%3e";var Fs=_("<div class=clock><div class=time></div><div class=date>");function Ds(){const[n,e]=z(new Date),t=setInterval(()=>{e(new Date)},1e3);ce(()=>clearInterval(t));const s=()=>n().toLocaleTimeString(me(),{hour:"2-digit",minute:"2-digit"}),r=()=>n().toLocaleDateString(me(),{weekday:"short",month:"short",day:"numeric"});return(()=>{var i=Fs(),o=i.firstChild,a=o.nextSibling;return $(o,s),$(a,r),i})()}var Ts=_('<button type=button class=user-badge><div class="eden-avatar eden-avatar-md"></div><span class=user-badge-name>');const Vs=n=>n.trim().split(/\s+/).map(s=>s[0]).join("").slice(0,2).toUpperCase();function js(n){return(()=>{var e=Ts(),t=e.firstChild,s=t.nextSibling;return Ne(e,"click",n.onClick),$(t,(()=>{var r=X(()=>!!n.user);return()=>r()?Vs(n.user.name):"?"})()),$(s,K(se,{get when(){return n.user},get fallback(){return B("shell.signIn")},get children(){return n.user?.name}})),e})()}de(["click"]);var kt=_("<div class=separator>"),Ms=_('<div class=dock><div class=dock-left><div class=dock-user></div></div><div class=dock-center><div class="app-icons magnify"></div></div><div class=dock-right>');function _s(n){let e,t;const[s,r]=z(!0);nt(()=>{setTimeout(()=>{r(!1)},300)});function i(a){if(!e)return;const l=a.clientX,u=70,c=1.25;e.classList.add("magnify-active"),e.querySelectorAll(".app-icon").forEach(d=>{const m=d.querySelector(".icon-container");if(!m)return;const w=d.getBoundingClientRect(),f=w.left+w.width/2,p=Math.abs(l-f),v=Math.exp(-(p*p)/(2*u*u)),b=1+(c-1)*v;d.style.setProperty("--influence",v.toFixed(3));const S=-8*v;d.style.transform=`translateY(${S.toFixed(1)}px)`,d.style.zIndex=`${Math.round(b*100)}`,m.style.transform=`scale(${b.toFixed(3)})`})}function o(){if(!e)return;e.classList.remove("magnify-active"),e.querySelectorAll(".app-icon").forEach(l=>{const u=l.querySelector(".icon-container");u&&(u.style.transform=""),l.style.transform="",l.style.zIndex=""})}return(()=>{var a=Ms(),l=a.firstChild,u=l.firstChild,c=l.nextSibling,h=c.firstChild,d=c.nextSibling,m=t;typeof m=="function"?G(m,a):t=a,$(u,K(js,{get user(){return n.currentUser},get onClick(){return n.userMenu.handler(()=>n.currentUser)}})),h.addEventListener("mouseleave",o),h.$$mousemove=i;var w=e;return typeof w=="function"?G(w,h):e=h,$(h,K(Ie,{get each(){return n.runningApps},children:f=>K(Ae,{get appId(){return f.id},get appName(){return f.name},get isRunning(){return f.isRunning},onClick:()=>n.onAppClick(f.id),get onContextMenu(){return n.appMenu.handler(f)}})}),null),$(h,K(se,{get when(){return X(()=>n.runningApps.length>0)()&&n.pinnedApps.length>0},get children(){return kt()}}),null),$(h,K(Ie,{get each(){return n.pinnedApps},children:f=>K(Ae,{get appId(){return f.id},get appName(){return f.name},get isRunning(){return f.isRunning},onClick:()=>n.onAppClick(f.id),get onContextMenu(){return n.appMenu.handler(f)}})}),null),$(h,K(se,{get when(){return n.runningApps.length>0||n.pinnedApps.length>0},get children(){return kt()}}),null),$(h,K(Ae,{appId:"apps-view",get appName(){return B("shell.allApps")},icon:Ns,get onClick(){return n.onShowAllApps}}),null),$(d,K(Ds,{})),U(()=>a.classList.toggle("dock-initial",!!s())),a})()}de(["mousemove"]);var Us=_("<div class=shell-overlay>");const At=72,Pt="pinned-dock-apps";function Ks(){const n=Rn(),[e,t]=z([]),[s,r]=z([]),[i,o]=z([]),[a,l]=z(!1),[u,c]=z(!1),[h,d]=z(null),m=()=>a()||u();let w=null;const f=async()=>{try{const g=await window.edenAPI.shellCommand("db/get",{key:Pt});if(g.value){const C=JSON.parse(g.value);Array.isArray(C)&&o(C)}}catch(g){console.error("Failed to load pinned dock apps:",g)}},p=async g=>{try{await window.edenAPI.shellCommand("db/set",{key:Pt,value:JSON.stringify(g)})}catch(C){console.error("Failed to save pinned dock apps:",C)}},v=async g=>{const C=i();if(!C.includes(g)){const D=[...C,g];o(D),await p(D)}},b=async g=>{const D=i().filter(ie=>ie!==g);o(D),await p(D)},S=g=>i().includes(g),y=()=>e().filter(g=>!i().includes(g.manifest.id)).map(g=>({id:g.manifest.id,name:Xe(g.manifest.name,me()),isRunning:!0})),O=()=>{const g=new Set(e().map(D=>D.manifest.id)),C=s();return i().map(D=>{const ie=C.find(Ue=>Ue.id===D);return ie?{id:D,name:Xe(ie.name,me()),isRunning:g.has(D)}:null}).filter(D=>D!==null)},A=()=>{const g=new Set(e().map(C=>C.manifest.id));return s().map(C=>({id:C.id,name:Xe(C.name,me()),isRunning:g.has(C.id)}))},x=async()=>{try{const g=await window.edenAPI.shellCommand("package/list",{});Array.isArray(g)&&r(g);const C=await window.edenAPI.shellCommand("process/list",{});Array.isArray(C)&&t(C)}catch(g){console.error("Failed to load system info:",g)}},P=async()=>{try{const g=await window.edenAPI.shellCommand("user/get-current",{});d(g.user??null)}catch(g){console.error("Failed to load current user:",g)}},L=(g,C)=>g==="fullscreen"?{x:0,y:0,width:C.width,height:C.height}:{x:0,y:C.height-At,width:C.width,height:At},R=async g=>{try{await window.edenAPI.shellCommand("view/update-bounds",{bounds:g})}catch(C){console.error("Failed to update overlay bounds:",C)}},T=async g=>{try{const C=await window.edenAPI.shellCommand("view/window-size",{}),D=L(g,C);await R(D)}catch(C){console.error("Failed to resize overlay:",C)}},V=async g=>{if(e().some(D=>D.manifest.id===g))try{await window.edenAPI.shellCommand("view/focus-view",{appId:g})}catch(D){console.error("Failed to focus app:",D)}else try{await window.edenAPI.shellCommand("process/launch",{appId:g}),setTimeout(()=>{x()},500)}catch(D){console.error("Failed to launch app:",D)}},j=()=>{const g=!a();l(g),g&&x()};Oe(()=>{const g=m()?"fullscreen":"dock";g!==w&&(w=g,T(g))});const E=xs({open:V,stop:async g=>{try{await window.edenAPI.shellCommand("process/stop",{appId:g}),setTimeout(()=>{x()},300)}catch(C){console.error("Failed to stop app:",C)}},addToDock:v,removeFromDock:b,isPinned:S}),I=Ss({changePassword:async()=>{c(!0);try{await Is({dialogs:n})}finally{c(!1)}},logout:async()=>{try{await window.edenAPI.shellCommand("user/logout",{})}catch(g){console.error("Failed to log out:",g)}}});return nt(()=>{const g=()=>x(),C=D=>{const{windowSize:ie}=D,Ue=m()?"fullscreen":"dock",Kt=L(Ue,ie);R(Kt)};ce(()=>{window.edenAPI.unsubscribe("process/launched",g),window.edenAPI.unsubscribe("process/stopped",g),window.edenAPI.unsubscribe("view/global-bounds-changed",C)}),(async()=>{await vs(),x(),f(),P();try{await window.edenAPI.subscribe("process/launched",g),await window.edenAPI.subscribe("process/stopped",g),await window.edenAPI.subscribe("view/global-bounds-changed",C)}catch(D){console.error("Failed to subscribe to events:",D)}})()}),(()=>{var g=Us();return $(g,K(se,{get when(){return a()},get children(){return K(Rs,{get apps(){return A()},onClose:j,onAppClick:V,appMenu:E})}}),null),$(g,K(se,{get when(){return!m()},get children(){return K(_s,{get runningApps(){return y()},get pinnedApps(){return O()},get currentUser(){return h()},onAppClick:V,onShowAllApps:j,userMenu:I,appMenu:E})}}),null),$(g,K(Tn,{dialogs:n}),null),U(()=>q(g,"data-mode",m()?"fullscreen":"dock")),g})()}const Ut=document.getElementById("root");if(!Ut)throw new Error("Root element not found");un(()=>K(Ks,{}),Ut);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Eden</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-B-bahmO2.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="./assets/index-BpW2uLSC.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/
|
|
13
|
+
export NODE_PATH="/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/
|
|
15
|
+
export NODE_PATH="/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/
|
|
13
|
+
export NODE_PATH="/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/
|
|
15
|
+
export NODE_PATH="/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
|
package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @edenapp/types
|
|
2
2
|
|
|
3
|
+
## 0.6.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- error while publishing
|
|
8
|
+
|
|
9
|
+
## 0.6.1
|
|
10
|
+
|
|
11
|
+
## 0.6.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- add fs/mv fs/cp
|
|
16
|
+
unify dialogs api through solid-kit
|
|
17
|
+
add process manager app
|
|
18
|
+
|
|
3
19
|
## 0.5.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CPU usage sample for a tracked Eden process.
|
|
3
|
+
*/
|
|
4
|
+
export interface EdenProcessCpuUsage {
|
|
5
|
+
/** CPU usage percentage since the previous sample. */
|
|
6
|
+
percentCPUUsage: number;
|
|
7
|
+
|
|
8
|
+
/** Total CPU time in seconds since process startup, when available. */
|
|
9
|
+
cumulativeCPUUsage?: number;
|
|
10
|
+
|
|
11
|
+
/** Average idle wakeups per second since the previous sample. */
|
|
12
|
+
idleWakeupsPerSecond: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Memory usage sample for a tracked Eden process.
|
|
17
|
+
*
|
|
18
|
+
* All values are reported in kilobytes.
|
|
19
|
+
*/
|
|
20
|
+
export interface EdenProcessMemoryUsage {
|
|
21
|
+
/** Memory currently pinned to physical RAM. */
|
|
22
|
+
workingSetSize: number;
|
|
23
|
+
|
|
24
|
+
/** Peak working set size. */
|
|
25
|
+
peakWorkingSetSize: number;
|
|
26
|
+
|
|
27
|
+
/** Memory private to the process, when available. */
|
|
28
|
+
privateBytes?: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* A single Electron process attributed to an Eden app or to shared/system work.
|
|
33
|
+
*/
|
|
34
|
+
export interface EdenProcessMetric {
|
|
35
|
+
/** OS process id. */
|
|
36
|
+
pid: number;
|
|
37
|
+
|
|
38
|
+
/** Creation time in milliseconds since the Unix epoch. */
|
|
39
|
+
creationTime: number;
|
|
40
|
+
|
|
41
|
+
/** Eden-level grouping used by the task manager. */
|
|
42
|
+
category: "renderer" | "backend" | "shared";
|
|
43
|
+
|
|
44
|
+
/** Electron/Chromium process type, e.g. "Tab", "Utility", "GPU". */
|
|
45
|
+
processType: string;
|
|
46
|
+
|
|
47
|
+
/** Electron utility service name, when available. */
|
|
48
|
+
serviceName?: string;
|
|
49
|
+
|
|
50
|
+
/** Human-readable process name, when available. */
|
|
51
|
+
name?: string;
|
|
52
|
+
|
|
53
|
+
/** Eden app id if this process belongs to an app. */
|
|
54
|
+
appId?: string;
|
|
55
|
+
|
|
56
|
+
/** Eden view id for renderer processes. */
|
|
57
|
+
viewId?: number;
|
|
58
|
+
|
|
59
|
+
/** CPU usage snapshot. */
|
|
60
|
+
cpu: EdenProcessCpuUsage;
|
|
61
|
+
|
|
62
|
+
/** Memory usage snapshot. */
|
|
63
|
+
memory: EdenProcessMemoryUsage;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Aggregated resource usage for a running Eden app instance.
|
|
68
|
+
*/
|
|
69
|
+
export interface AppProcessMetrics {
|
|
70
|
+
/** Running app instance metadata. */
|
|
71
|
+
instance: import("./index").AppInstance;
|
|
72
|
+
|
|
73
|
+
/** Sum of CPU usage across app-owned processes. */
|
|
74
|
+
totalCPUPercent: number;
|
|
75
|
+
|
|
76
|
+
/** Sum of working set memory across app-owned processes, in KB. */
|
|
77
|
+
totalMemoryWorkingSetSize: number;
|
|
78
|
+
|
|
79
|
+
/** Sum of peak working set memory across app-owned processes, in KB. */
|
|
80
|
+
totalMemoryPeakWorkingSetSize: number;
|
|
81
|
+
|
|
82
|
+
/** Renderer process metrics, when the app has a frontend. */
|
|
83
|
+
renderer?: EdenProcessMetric;
|
|
84
|
+
|
|
85
|
+
/** Backend utility process metrics, when the app has a backend. */
|
|
86
|
+
backend?: EdenProcessMetric;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Aggregate totals for a process metrics snapshot.
|
|
91
|
+
*/
|
|
92
|
+
export interface ProcessMetricsTotals {
|
|
93
|
+
/** CPU used by tracked Eden app processes. */
|
|
94
|
+
appCPUPercent: number;
|
|
95
|
+
|
|
96
|
+
/** CPU used by unattributed Electron processes. */
|
|
97
|
+
sharedCPUPercent: number;
|
|
98
|
+
|
|
99
|
+
/** Total CPU usage across all Electron app metrics. */
|
|
100
|
+
overallCPUPercent: number;
|
|
101
|
+
|
|
102
|
+
/** Working set memory used by tracked Eden app processes, in KB. */
|
|
103
|
+
appMemoryWorkingSetSize: number;
|
|
104
|
+
|
|
105
|
+
/** Working set memory used by unattributed Electron processes, in KB. */
|
|
106
|
+
sharedMemoryWorkingSetSize: number;
|
|
107
|
+
|
|
108
|
+
/** Total working set memory across all Electron app metrics, in KB. */
|
|
109
|
+
overallMemoryWorkingSetSize: number;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Full snapshot used by the Eden task manager/profiler.
|
|
114
|
+
*/
|
|
115
|
+
export interface ProcessMetricsSnapshot {
|
|
116
|
+
/** ISO timestamp describing when the sample was created. */
|
|
117
|
+
sampledAt: string;
|
|
118
|
+
|
|
119
|
+
/** Per-app resource usage. */
|
|
120
|
+
apps: AppProcessMetrics[];
|
|
121
|
+
|
|
122
|
+
/** Electron processes that cannot be safely attributed to a single Eden app. */
|
|
123
|
+
sharedProcesses: EdenProcessMetric[];
|
|
124
|
+
|
|
125
|
+
/** Aggregate totals for the sample. */
|
|
126
|
+
totals: ProcessMetricsTotals;
|
|
127
|
+
}
|
|
@@ -357,6 +357,21 @@ export interface FsCommands {
|
|
|
357
357
|
args: { path: string };
|
|
358
358
|
response: void;
|
|
359
359
|
};
|
|
360
|
+
/**
|
|
361
|
+
* Copy a file or directory.
|
|
362
|
+
* Directories are copied recursively.
|
|
363
|
+
*/
|
|
364
|
+
"fs/cp": {
|
|
365
|
+
args: { from: string; to: string };
|
|
366
|
+
response: void;
|
|
367
|
+
};
|
|
368
|
+
/**
|
|
369
|
+
* Move or rename a file or directory.
|
|
370
|
+
*/
|
|
371
|
+
"fs/mv": {
|
|
372
|
+
args: { from: string; to: string };
|
|
373
|
+
response: void;
|
|
374
|
+
};
|
|
360
375
|
}
|
|
361
376
|
|
|
362
377
|
/**
|
|
@@ -523,6 +538,21 @@ export interface ProcessCommands {
|
|
|
523
538
|
args: { showHidden?: boolean };
|
|
524
539
|
response: import("./index").AppInstance[];
|
|
525
540
|
};
|
|
541
|
+
/**
|
|
542
|
+
* Return CPU and memory metrics for running Eden apps.
|
|
543
|
+
* Requires "process/read" permission.
|
|
544
|
+
* @param showHidden - If true, includes overlay apps and backend-only apps
|
|
545
|
+
* @param pollingTimeoutMs - How long main should keep the shared sampler alive
|
|
546
|
+
* @param waitForAccurateCpu - If false, returns the current sample immediately,
|
|
547
|
+
* even before Electron has a full CPU interval
|
|
548
|
+
*/
|
|
549
|
+
"process/metrics": {
|
|
550
|
+
args: {
|
|
551
|
+
showHidden?: boolean;
|
|
552
|
+
pollingTimeoutMs?: number;
|
|
553
|
+
waitForAccurateCpu?: boolean };
|
|
554
|
+
response: import("./index").ProcessMetricsSnapshot;
|
|
555
|
+
};
|
|
526
556
|
}
|
|
527
557
|
|
|
528
558
|
/**
|
package/dist/apps/prebuilt/com.eden.example.hello/backend/node_modules/@edenapp/types/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edenapp/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "TypeScript type definitions for the Eden platform",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"author": "Dariusz Majnert",
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
19
|
"url": "https://github.com/b0czek/eden.git",
|
|
20
|
-
"directory": "
|
|
20
|
+
"directory": "packages/types"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../../../../../tsconfig.backend.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"lib": ["ES2020"],
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"forceConsistentCasingInFileNames": true,
|
|
11
|
-
"strict": true,
|
|
12
|
-
"skipLibCheck": true,
|
|
13
4
|
"outDir": "./dist",
|
|
14
|
-
"rootDir": "src"
|
|
15
|
-
"types": ["node", "@edenapp/types/worker"]
|
|
5
|
+
"rootDir": "src"
|
|
16
6
|
},
|
|
17
7
|
"include": ["src/**/*"],
|
|
18
8
|
"exclude": ["node_modules", "dist"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const t of document.querySelectorAll('link[rel="modulepreload"]'))l(t);new MutationObserver(t=>{for(const s of t)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&l(r)}).observe(document,{childList:!0,subtree:!0});function n(t){const s={};return t.integrity&&(s.integrity=t.integrity),t.referrerPolicy&&(s.referrerPolicy=t.referrerPolicy),t.crossOrigin==="use-credentials"?s.credentials="include":t.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(t){if(t.ep)return;t.ep=!0;const s=n(t);fetch(t.href,s)}})();class m{statusDiv;constructor(){this.statusDiv=document.getElementById("status"),this.setupEventListeners(),this.setupMessageListeners(),this.log("App initialized")}getAppAPI(){return window.getAppAPI()}setupEventListeners(){document.getElementById("ping-btn")?.addEventListener("click",()=>{this.pingBackend()}),document.getElementById("status-btn")?.addEventListener("click",()=>{this.getBackendStatus()}),document.getElementById("hello-btn")?.addEventListener("click",()=>{this.sayHello()})}setupMessageListeners(){const e=this.getAppAPI();e.on("backend-ready",n=>{this.log(`✓ ${n.message}`)}),e.on("heartbeat",n=>{console.log("Heartbeat from backend:",n)})}async pingBackend(){this.log("Sending ping to backend...");try{const e=await this.getAppAPI().request("ping",{});this.log(`Pong received! Message count: ${e.messageCount}`)}catch(e){this.log(`Error: ${e.message}`)}}async getBackendStatus(){this.log("Requesting backend status...");try{const e=await this.getAppAPI().request("get-status",{});this.log(`Status: ${e.status}`),this.log(`Uptime: ${e.uptime.toFixed(2)}s`),this.log(`Messages: ${e.messageCount}`)}catch(e){this.log(`Error: ${e.message}`)}}async sayHello(){const e=await this.showInputDialog("Say Hello","What would you like to say?","Hello from frontend!");if(e){this.log(`Sending: "${e}"`);try{const n=await this.getAppAPI().request("hello",{message:e});this.log(`Backend says: ${n.message}`)}catch(n){this.log(`Error: ${n.message}`)}}}showInputDialog(e,n="Enter value...",l=""){return new Promise(t=>{const s=document.getElementById("input-dialog"),r=document.getElementById("input-dialog-title"),o=document.getElementById("input-dialog-input"),d=document.getElementById("input-dialog-close"),u=document.getElementById("input-dialog-cancel"),g=document.getElementById("input-dialog-confirm");if(!s||!r||!o||!d||!u||!g){t(null);return}r.textContent=e,o.placeholder=n,o.value=l,s.style.display="flex",setTimeout(()=>o.focus(),100);const p=i=>{s.style.display="none",o.value="",t(i)},h=()=>{const i=o.value.trim();p(i||null)},a=()=>{p(null)};g.onclick=h,u.onclick=a,d.onclick=a;const c=i=>{i.key==="Enter"?(h(),o.removeEventListener("keydown",c)):i.key==="Escape"&&(a(),o.removeEventListener("keydown",c))};o.addEventListener("keydown",c),s.onclick=i=>{i.target===s&&a()}})}log(e){const n=document.createElement("p");if(n.textContent=`[${new Date().toLocaleTimeString()}] ${e}`,this.statusDiv)for(this.statusDiv.appendChild(n),this.statusDiv.scrollTop=this.statusDiv.scrollHeight;this.statusDiv.children.length>20;)this.statusDiv.removeChild(this.statusDiv.firstChild)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>new m):new m;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
7
|
<title>Hello World - Eden App</title>
|
|
8
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
+
<script type="module" crossorigin src="./assets/index-BeQINwbz.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="./assets/index-D2WAwW3g.css">
|
|
10
10
|
</head>
|
|
11
11
|
|
|
@@ -10,9 +10,9 @@ case `uname` in
|
|
|
10
10
|
esac
|
|
11
11
|
|
|
12
12
|
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/home/
|
|
13
|
+
export NODE_PATH="/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/node_modules"
|
|
14
14
|
else
|
|
15
|
-
export NODE_PATH="/home/
|
|
15
|
+
export NODE_PATH="/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/bin/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules/typescript/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/typescript@5.6.3/node_modules:/home/runner/work/eden/eden/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
16
|
fi
|
|
17
17
|
if [ -x "$basedir/node" ]; then
|
|
18
18
|
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
|