jishushell 0.4.10 → 0.4.24
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/Dockerfile.hermes-slim +193 -0
- package/INSTALL-NOTICE +10 -12
- package/apps/hermes-container.yaml +35 -0
- package/apps/ollama-binary.yaml +200 -0
- package/apps/ollama-cpu-container.yaml +37 -0
- package/apps/ollama-with-hollama-binary.yaml +195 -0
- package/apps/openclaw-binary.yaml +69 -0
- package/apps/openclaw-container.yaml +37 -0
- package/apps/openclaw-with-ollama-container.yaml +42 -0
- package/apps/openclaw-with-searxng-container.yaml +136 -0
- package/apps/openwebui-container.yaml +53 -0
- package/apps/playwright-container.yaml +120 -0
- package/apps/searxng-container.yaml +115 -0
- package/dist/auth.d.ts +1 -0
- package/dist/auth.js +15 -14
- package/dist/auth.js.map +1 -1
- package/dist/cli/app.d.ts +4 -0
- package/dist/cli/app.js +814 -0
- package/dist/cli/app.js.map +1 -0
- package/dist/cli/backup.d.ts +3 -0
- package/dist/cli/backup.js +434 -0
- package/dist/cli/backup.js.map +1 -0
- package/dist/{doctor.d.ts → cli/doctor.d.ts} +7 -1
- package/dist/{doctor.js → cli/doctor.js} +377 -22
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/helpers.d.ts +4 -0
- package/dist/cli/helpers.js +32 -0
- package/dist/cli/helpers.js.map +1 -0
- package/dist/cli/job.d.ts +4 -0
- package/dist/cli/job.js +198 -0
- package/dist/cli/job.js.map +1 -0
- package/dist/cli/llm.d.ts +25 -0
- package/dist/cli/llm.js +599 -0
- package/dist/cli/llm.js.map +1 -0
- package/dist/cli/managed-list.d.ts +30 -0
- package/dist/cli/managed-list.js +129 -0
- package/dist/cli/managed-list.js.map +1 -0
- package/dist/cli/panel.d.ts +26 -0
- package/dist/cli/panel.js +804 -0
- package/dist/cli/panel.js.map +1 -0
- package/dist/cli/version.d.ts +1 -0
- package/dist/cli/version.js +12 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/cli.js +48 -776
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +69 -0
- package/dist/config.js +268 -7
- package/dist/config.js.map +1 -1
- package/dist/control.d.ts +17 -41
- package/dist/control.js +61 -1323
- package/dist/control.js.map +1 -1
- package/dist/install.d.ts +16 -0
- package/dist/install.js +75 -26
- package/dist/install.js.map +1 -1
- package/dist/routes/agent-apps.d.ts +15 -0
- package/dist/routes/agent-apps.js +78 -0
- package/dist/routes/agent-apps.js.map +1 -0
- package/dist/routes/apps.d.ts +3 -0
- package/dist/routes/apps.js +278 -0
- package/dist/routes/apps.js.map +1 -0
- package/dist/routes/backup.js +3 -3
- package/dist/routes/backup.js.map +1 -1
- package/dist/routes/instances.d.ts +6 -0
- package/dist/routes/instances.js +863 -874
- package/dist/routes/instances.js.map +1 -1
- package/dist/routes/llm.d.ts +15 -0
- package/dist/routes/llm.js +247 -0
- package/dist/routes/llm.js.map +1 -0
- package/dist/routes/runtime.d.ts +15 -0
- package/dist/routes/runtime.js +69 -0
- package/dist/routes/runtime.js.map +1 -0
- package/dist/routes/setup.js +131 -9
- package/dist/routes/setup.js.map +1 -1
- package/dist/routes/system.js +56 -9
- package/dist/routes/system.js.map +1 -1
- package/dist/server.js +107 -7
- package/dist/server.js.map +1 -1
- package/dist/services/agent-apps/catalog.d.ts +30 -0
- package/dist/services/agent-apps/catalog.js +60 -0
- package/dist/services/agent-apps/catalog.js.map +1 -0
- package/dist/services/agent-apps/index.d.ts +36 -0
- package/dist/services/agent-apps/index.js +171 -0
- package/dist/services/agent-apps/index.js.map +1 -0
- package/dist/services/agent-apps/installers/adapter-probes.d.ts +49 -0
- package/dist/services/agent-apps/installers/adapter-probes.js +223 -0
- package/dist/services/agent-apps/installers/adapter-probes.js.map +1 -0
- package/dist/services/agent-apps/installers/adapter.d.ts +30 -0
- package/dist/services/agent-apps/installers/adapter.js +171 -0
- package/dist/services/agent-apps/installers/adapter.js.map +1 -0
- package/dist/services/agent-apps/installers/registry-probe.d.ts +38 -0
- package/dist/services/agent-apps/installers/registry-probe.js +183 -0
- package/dist/services/agent-apps/installers/registry-probe.js.map +1 -0
- package/dist/services/agent-apps/installers/shell-script.d.ts +47 -0
- package/dist/services/agent-apps/installers/shell-script.js +471 -0
- package/dist/services/agent-apps/installers/shell-script.js.map +1 -0
- package/dist/services/agent-apps/types.d.ts +125 -0
- package/dist/services/agent-apps/types.js +17 -0
- package/dist/services/agent-apps/types.js.map +1 -0
- package/dist/services/app/app-compiler.d.ts +15 -0
- package/dist/services/app/app-compiler.js +172 -0
- package/dist/services/app/app-compiler.js.map +1 -0
- package/dist/services/app/app-manager.d.ts +142 -0
- package/dist/services/app/app-manager.js +1988 -0
- package/dist/services/app/app-manager.js.map +1 -0
- package/dist/services/app/custom-manager.d.ts +27 -0
- package/dist/services/app/custom-manager.js +285 -0
- package/dist/services/app/custom-manager.js.map +1 -0
- package/dist/services/app/hermes-agent-manager.d.ts +20 -0
- package/dist/services/app/hermes-agent-manager.js +289 -0
- package/dist/services/app/hermes-agent-manager.js.map +1 -0
- package/dist/services/app/id-normalizer.d.ts +27 -0
- package/dist/services/app/id-normalizer.js +77 -0
- package/dist/services/app/id-normalizer.js.map +1 -0
- package/dist/services/app/ollama-manager.d.ts +18 -0
- package/dist/services/app/ollama-manager.js +207 -0
- package/dist/services/app/ollama-manager.js.map +1 -0
- package/dist/services/app/openclaw-manager.d.ts +63 -0
- package/dist/services/app/openclaw-manager.js +1178 -0
- package/dist/services/app/openclaw-manager.js.map +1 -0
- package/dist/services/app/paths.d.ts +47 -0
- package/dist/services/app/paths.js +68 -0
- package/dist/services/app/paths.js.map +1 -0
- package/dist/services/app/registry.d.ts +17 -0
- package/dist/services/app/registry.js +31 -0
- package/dist/services/app/registry.js.map +1 -0
- package/dist/services/app/remote-spec.d.ts +14 -0
- package/dist/services/app/remote-spec.js +58 -0
- package/dist/services/app/remote-spec.js.map +1 -0
- package/dist/services/app/terminal-session-manager.d.ts +27 -0
- package/dist/services/app/terminal-session-manager.js +157 -0
- package/dist/services/app/terminal-session-manager.js.map +1 -0
- package/dist/services/app/types.d.ts +72 -0
- package/dist/services/app/types.js +16 -0
- package/dist/services/app/types.js.map +1 -0
- package/dist/services/backup-manager.js +60 -22
- package/dist/services/backup-manager.js.map +1 -1
- package/dist/services/instance-manager.d.ts +125 -34
- package/dist/services/instance-manager.js +679 -1043
- package/dist/services/instance-manager.js.map +1 -1
- package/dist/services/llm-proxy/adapters.js +5 -1
- package/dist/services/llm-proxy/adapters.js.map +1 -1
- package/dist/services/llm-proxy/circuit-breaker.js +10 -2
- package/dist/services/llm-proxy/circuit-breaker.js.map +1 -1
- package/dist/services/llm-proxy/index.d.ts +43 -0
- package/dist/services/llm-proxy/index.js +120 -5
- package/dist/services/llm-proxy/index.js.map +1 -1
- package/dist/services/llm-proxy/ssrf.js +1 -1
- package/dist/services/llm-proxy/ssrf.js.map +1 -1
- package/dist/services/nomad-manager.d.ts +260 -3
- package/dist/services/nomad-manager.js +2921 -341
- package/dist/services/nomad-manager.js.map +1 -1
- package/dist/services/panel-manager.d.ts +50 -0
- package/dist/services/panel-manager.js +443 -0
- package/dist/services/panel-manager.js.map +1 -0
- package/dist/services/plugin-installer.js +28 -2
- package/dist/services/plugin-installer.js.map +1 -1
- package/dist/services/process-manager.js +42 -7
- package/dist/services/process-manager.js.map +1 -1
- package/dist/services/runtime/adapters/custom.d.ts +20 -0
- package/dist/services/runtime/adapters/custom.js +90 -0
- package/dist/services/runtime/adapters/custom.js.map +1 -0
- package/dist/services/runtime/adapters/hermes.d.ts +174 -0
- package/dist/services/runtime/adapters/hermes.js +1316 -0
- package/dist/services/runtime/adapters/hermes.js.map +1 -0
- package/dist/services/runtime/adapters/openclaw-routes.d.ts +17 -0
- package/dist/services/runtime/adapters/openclaw-routes.js +946 -0
- package/dist/services/runtime/adapters/openclaw-routes.js.map +1 -0
- package/dist/services/runtime/adapters/openclaw.d.ts +188 -0
- package/dist/services/runtime/adapters/openclaw.js +2195 -0
- package/dist/services/runtime/adapters/openclaw.js.map +1 -0
- package/dist/services/runtime/errors.d.ts +28 -0
- package/dist/services/runtime/errors.js +31 -0
- package/dist/services/runtime/errors.js.map +1 -0
- package/dist/services/runtime/index.d.ts +34 -0
- package/dist/services/runtime/index.js +51 -0
- package/dist/services/runtime/index.js.map +1 -0
- package/dist/services/runtime/instance.d.ts +24 -0
- package/dist/services/runtime/instance.js +143 -0
- package/dist/services/runtime/instance.js.map +1 -0
- package/dist/services/runtime/migrations.d.ts +15 -0
- package/dist/services/runtime/migrations.js +25 -0
- package/dist/services/runtime/migrations.js.map +1 -0
- package/dist/services/runtime/registry.d.ts +13 -0
- package/dist/services/runtime/registry.js +32 -0
- package/dist/services/runtime/registry.js.map +1 -0
- package/dist/services/runtime/types.d.ts +545 -0
- package/dist/services/runtime/types.js +14 -0
- package/dist/services/runtime/types.js.map +1 -0
- package/dist/services/setup-manager.d.ts +70 -29
- package/dist/services/setup-manager.js +591 -625
- package/dist/services/setup-manager.js.map +1 -1
- package/dist/services/task-registry.d.ts +44 -0
- package/dist/services/task-registry.js +74 -0
- package/dist/services/task-registry.js.map +1 -0
- package/dist/services/telemetry/heartbeat.d.ts +6 -6
- package/dist/services/telemetry/heartbeat.js +29 -30
- package/dist/services/telemetry/heartbeat.js.map +1 -1
- package/dist/services/update-manager.d.ts +47 -0
- package/dist/services/update-manager.js +305 -0
- package/dist/services/update-manager.js.map +1 -0
- package/dist/types.d.ts +222 -0
- package/dist/utils/docker-host.d.ts +15 -0
- package/dist/utils/docker-host.js +64 -0
- package/dist/utils/docker-host.js.map +1 -0
- package/install/jishu-install.sh +303 -37
- package/install/post-install.sh +64 -5
- package/package.json +19 -5
- package/public/assets/Dashboard-B-JoOjBQ.js +1 -0
- package/public/assets/HermesChatPanel-mFSureyc.js +1 -0
- package/public/assets/HermesConfigForm-DvR05LK1.js +4 -0
- package/public/assets/InitPassword-CVA8wQA6.js +1 -0
- package/public/assets/InstanceDetail-DcZW2QGO.js +91 -0
- package/public/assets/{Login-CUoEZOWR.js → Login-BWsZH2mu.js} +1 -1
- package/public/assets/NewInstance-BCIrAd86.js +1 -0
- package/public/assets/Settings-xkDcduFz.js +1 -0
- package/public/assets/Setup-Cfuwj4gV.js +1 -0
- package/public/assets/WeixinLoginPanel-CnjR8xMu.js +9 -0
- package/public/assets/index-CPhVFEsx.css +1 -0
- package/public/assets/index-DQsM6Joa.js +19 -0
- package/public/assets/input-paste-CrNVAyOy.js +1 -0
- package/public/assets/{providers-lBSOjUWy.js → providers-V-vwrExZ.js} +1 -1
- package/public/assets/registry-B4UFJdpA.js +2 -0
- package/public/assets/{usePolling-CK0DfI4h.js → usePolling-Do5Erqm_.js} +1 -1
- package/public/assets/vendor-i18n-ucpM0OR0.js +9 -0
- package/public/assets/{vendor-react-B1-3Yrt-.js → vendor-react-Bk1hRGiY.js} +1 -1
- package/public/favicon.png +0 -0
- package/public/index.html +9 -4
- package/public/logos/hermes.png +0 -0
- package/public/logos/ollama.png +0 -0
- package/public/logos/openclaw.svg +60 -0
- package/scripts/build-hermes-image.sh +21 -0
- package/scripts/build-local.sh +54 -0
- package/scripts/check-adapter-isolation.ts +293 -0
- package/scripts/fixtures/instances/hermes-sample/instance.json +37 -0
- package/scripts/fixtures/instances/legacy-openclaw-sample/instance.json +7 -0
- package/scripts/smoke/hermes-bootstrap.sh +195 -0
- package/templates/hermes-entrypoint.sh +154 -0
- package/dist/doctor.js.map +0 -1
- package/install/jishu-install-china.sh +0 -3092
- package/public/assets/Dashboard-DhsrzJ4F.js +0 -1
- package/public/assets/InitPassword-BjubiVdd.js +0 -1
- package/public/assets/InstanceDetail-DMcywsof.js +0 -17
- package/public/assets/NewInstance-Bk0G4EiJ.js +0 -1
- package/public/assets/Settings-D5tHL_h5.js +0 -1
- package/public/assets/Setup-4t6E3Rut.js +0 -1
- package/public/assets/index-BJ47MWpF.css +0 -1
- package/public/assets/index-DbX85irc.js +0 -16
- package/public/assets/vendor-i18n-CfW0RvgE.js +0 -9
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{g as Xe,r as P}from"./vendor-react-Bk1hRGiY.js";var fe={};const S=i=>typeof i=="string",Q=()=>{let i,e;const t=new Promise((s,n)=>{i=s,e=n});return t.resolve=i,t.reject=e,t},be=i=>i==null?"":""+i,Qe=(i,e,t)=>{i.forEach(s=>{e[s]&&(t[s]=e[s])})},qe=/###/g,Oe=i=>i&&i.indexOf("###")>-1?i.replace(qe,"."):i,Le=i=>!i||S(i),q=(i,e,t)=>{const s=S(e)?e.split("."):e;let n=0;for(;n<s.length-1;){if(Le(i))return{};const r=Oe(s[n]);!i[r]&&t&&(i[r]=new t),Object.prototype.hasOwnProperty.call(i,r)?i=i[r]:i={},++n}return Le(i)?{}:{obj:i,k:Oe(s[n])}},Ne=(i,e,t)=>{const{obj:s,k:n}=q(i,e,Object);if(s!==void 0||e.length===1){s[n]=t;return}let r=e[e.length-1],a=e.slice(0,e.length-1),o=q(i,a,Object);for(;o.obj===void 0&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),o=q(i,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},et=(i,e,t,s)=>{const{obj:n,k:r}=q(i,e,Object);n[r]=n[r]||[],n[r].push(t)},oe=(i,e)=>{const{obj:t,k:s}=q(i,e);if(t&&Object.prototype.hasOwnProperty.call(t,s))return t[s]},tt=(i,e,t)=>{const s=oe(i,t);return s!==void 0?s:oe(e,t)},Ve=(i,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in i?S(i[s])||i[s]instanceof String||S(e[s])||e[s]instanceof String?t&&(i[s]=e[s]):Ve(i[s],e[s],t):i[s]=e[s]);return i},J=i=>i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var st={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const nt=i=>S(i)?i.replace(/[&<>"'\/]/g,e=>st[e]):i;class it{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 rt=[" ",",","?","!",";"],at=new it(20),ot=(i,e,t)=>{e=e||"",t=t||"";const s=rt.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const n=at.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!n.test(i);if(!r){const a=i.indexOf(t);a>0&&!n.test(i.substring(0,a))&&(r=!0)}return r},me=(i,e,t=".")=>{if(!i)return;if(i[e])return Object.prototype.hasOwnProperty.call(i,e)?i[e]:void 0;const s=e.split(t);let n=i;for(let r=0;r<s.length;){if(!n||typeof n!="object")return;let a,o="";for(let l=r;l<s.length;++l)if(l!==r&&(o+=t),o+=s[l],a=n[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<s.length-1)continue;r+=l-r+1;break}n=a}return n},te=i=>i==null?void 0:i.replace(/_/g,"-"),lt={type:"logger",log(i){this.output("log",i)},warn(i){this.output("warn",i)},error(i){this.output("error",i)},output(i,e){var t,s;(s=(t=console==null?void 0:console[i])==null?void 0:t.apply)==null||s.call(t,console,e)}};class le{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||lt,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,n){return n&&!this.debug?null:(S(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new le(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new le(this.logger,e)}}var H=new le;class ue{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const n=this.observers[s].get(t)||0;this.observers[s].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n.apply(n,[e,...t])})}}class we extends ue{constructor(e,t={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,n={}){var c,f;const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,a=n.ignoreJSONStructure!==void 0?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):S(s)&&r?o.push(...s.split(r)):o.push(s)));const l=oe(this.data,o);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),l||!a||!S(s)?l:me((f=(c=this.data)==null?void 0:c[e])==null?void 0:f[t],s,r)}addResource(e,t,s,n,r={silent:!1}){const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),n=t,t=o[1]),this.addNamespaces(t),Ne(this.data,o,n),r.silent||this.emit("added",e,t,s,n)}addResources(e,t,s,n={silent:!1}){for(const r in s)(S(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});n.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,n,r,a={silent:!1,skipCopy:!1}){let o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),n=s,s=t,t=o[1]),this.addNamespaces(t);let l=oe(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),n?Ve(l,s,r):l={...l,...s},Ne(this.data,o,l),a.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.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(n=>t[n]&&Object.keys(t[n]).length>0)}toJSON(){return this.data}}var De={processors:{},addPostProcessor(i){this.processors[i.name]=i},handle(i,e,t,s,n){return i.forEach(r=>{var a;e=((a=this.processors[r])==null?void 0:a.process(e,t,s,n))??e}),e}};const _e=Symbol("i18next/PATH_KEY");function ct(){const i=[],e=Object.create(null);let t;return e.get=(s,n)=>{var r;return(r=t==null?void 0:t.revoke)==null||r.call(t),n===_e?i:(i.push(n),t=Proxy.revocable(s,e),t.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Y(i,e){const{[_e]:t}=i(ct()),s=(e==null?void 0:e.keySeparator)??".",n=(e==null?void 0:e.nsSeparator)??":";if(t.length>1&&n){const r=e==null?void 0:e.ns,a=Array.isArray(r)?r:null;if(a&&a.length>1&&a.slice(1).includes(t[0]))return`${t[0]}${n}${t.slice(1).join(s)}`}return t.join(s)}const Ce={},he=i=>!S(i)&&typeof i!="boolean"&&typeof i!="number";class ce extends ue{constructor(e,t={}){super(),Qe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=H.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){const s={...t};if(e==null)return!1;const n=this.resolve(e,s);if((n==null?void 0:n.res)===void 0)return!1;const r=he(n.res);return!(s.returnObjects===!1&&r)}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const n=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!ot(e,s,n);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:S(r)?[r]:r};const c=e.split(s);(s!==n||s===n&&this.options.ns.indexOf(c[0])>-1)&&(r=c.shift()),e=c.join(n)}return{key:e,namespaces:S(r)?[r]:r}}translate(e,t,s){let n=typeof t=="object"?{...t}:t;if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";typeof e=="function"&&(e=Y(e,{...this.options,...n})),Array.isArray(e)||(e=[String(e)]),e=e.map(m=>typeof m=="function"?Y(m,{...this.options,...n}):String(m));const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],n),c=l[l.length-1];let f=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;f===void 0&&(f=":");const u=n.lng||this.language,p=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((u==null?void 0:u.toLowerCase())==="cimode")return p?r?{res:`${c}${f}${o}`,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${f}${o}`:r?{res:o,usedKey:o,exactUsedKey:o,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:o;const d=this.resolve(e,n);let h=d==null?void 0:d.res;const v=(d==null?void 0:d.usedKey)||o,x=(d==null?void 0:d.exactUsedKey)||o,C=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,$=!this.i18nFormat||this.i18nFormat.handleAsObject,O=n.count!==void 0&&!S(n.count),E=ce.hasDefaultValue(n),A=O?this.pluralResolver.getSuffix(u,n.count,n):"",L=n.ordinal&&O?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",g=O&&!n.ordinal&&n.count===0,k=g&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${A}`]||n[`defaultValue${L}`]||n.defaultValue;let w=h;$&&!h&&E&&(w=k);const K=he(w),R=Object.prototype.toString.apply(w);if($&&w&&K&&C.indexOf(R)<0&&!(S(y)&&Array.isArray(w))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const m=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,w,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(d.res=m,d.usedParams=this.getUsedParamsDetails(n),d):m}if(a){const m=Array.isArray(w),b=m?[]:{},N=m?x:v;for(const j in w)if(Object.prototype.hasOwnProperty.call(w,j)){const F=`${N}${a}${j}`;E&&!h?b[j]=this.translate(F,{...n,defaultValue:he(k)?k[j]:void 0,joinArrays:!1,ns:l}):b[j]=this.translate(F,{...n,joinArrays:!1,ns:l}),b[j]===F&&(b[j]=w[j])}h=b}}else if($&&S(y)&&Array.isArray(h))h=h.join(y),h&&(h=this.extendTranslation(h,e,n,s));else{let m=!1,b=!1;!this.isValidLookup(h)&&E&&(m=!0,h=k),this.isValidLookup(h)||(b=!0,h=o);const j=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&b?void 0:h,F=E&&k!==h&&this.options.updateMissing;if(b||m||F){if(this.logger.log(F?"updateKey":"missingKey",u,c,o,F?k:h),a){const I=this.resolve(o,{...n,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 _=[];const M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&M&&M[0])for(let I=0;I<M.length;I++)_.push(M[I]);else this.options.saveMissingTo==="all"?_=this.languageUtils.toResolveHierarchy(n.lng||this.language):_.push(n.lng||this.language);const T=(I,U,B)=>{var X;const G=E&&B!==h?B:j;this.options.missingKeyHandler?this.options.missingKeyHandler(I,c,U,G,F,n):(X=this.backendConnector)!=null&&X.saveMissing&&this.backendConnector.saveMissing(I,c,U,G,F,n),this.emit("missingKey",I,c,U,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?_.forEach(I=>{const U=this.pluralResolver.getSuffixes(I,n);g&&n[`defaultValue${this.options.pluralSeparator}zero`]&&U.indexOf(`${this.options.pluralSeparator}zero`)<0&&U.push(`${this.options.pluralSeparator}zero`),U.forEach(B=>{T([I],o+B,n[`defaultValue${B}`]||k)})}):T(_,o,k))}h=this.extendTranslation(h,e,n,d,s),b&&h===o&&this.options.appendNamespaceToMissingKey&&(h=`${c}${f}${o}`),(b||m)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${f}${o}`:o,m?h:void 0,n))}return r?(d.res=h,d.usedParams=this.getUsedParamsDetails(n),d):h}extendTranslation(e,t,s,n,r){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const f=S(e)&&(((c=s==null?void 0:s.interpolation)==null?void 0:c.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(f){const d=e.match(this.interpolator.nestingRegexp);u=d&&d.length}let p=s.replace&&!S(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,s.lng||this.language||n.usedLng,s),f){const d=e.match(this.interpolator.nestingRegexp),h=d&&d.length;u<h&&(s.nest=!1)}!s.lng&&n&&n.res&&(s.lng=this.language||n.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...d)=>(r==null?void 0:r[0])===d[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${d[0]} in key: ${t[0]}`),null):this.translate(...d,t),s)),s.interpolation&&this.interpolator.reset()}const a=s.postProcess||this.options.postProcess,o=S(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&s.applyPostProcessor!==!1&&(e=De.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,t={}){let s,n,r,a,o;return S(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?Y(l,{...this.options,...t}):l)),e.forEach(l=>{if(this.isValidLookup(s))return;const c=this.extractFromKey(l,t),f=c.key;n=f;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));const p=t.count!==void 0&&!S(t.count),d=p&&!t.ordinal&&t.count===0,h=t.context!==void 0&&(S(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(x=>{var C,y;this.isValidLookup(s)||(o=x,!Ce[`${v[0]}-${x}`]&&((C=this.utils)!=null&&C.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(o))&&(Ce[`${v[0]}-${x}`]=!0,this.logger.warn(`key "${n}" for languages "${v.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),v.forEach($=>{var A;if(this.isValidLookup(s))return;a=$;const O=[f];if((A=this.i18nFormat)!=null&&A.addLookupKeys)this.i18nFormat.addLookupKeys(O,f,$,x,t);else{let L;p&&(L=this.pluralResolver.getSuffix($,t.count,t));const g=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(t.ordinal&&L.indexOf(k)===0&&O.push(f+L.replace(k,this.options.pluralSeparator)),O.push(f+L),d&&O.push(f+g)),h){const w=`${f}${this.options.contextSeparator||"_"}${t.context}`;O.push(w),p&&(t.ordinal&&L.indexOf(k)===0&&O.push(w+L.replace(k,this.options.pluralSeparator)),O.push(w+L),d&&O.push(w+g))}}let E;for(;E=O.pop();)this.isValidLookup(s)||(r=E,s=this.getResource($,x,E,t))}))})}),{res:s,usedKey:n,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s,n={}){var r;return(r=this.i18nFormat)!=null&&r.getResource?this.i18nFormat.getResource(e,t,s,n):this.resourceStore.getResource(e,t,s,n)}getUsedParamsDetails(e={}){const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!S(e.replace);let n=s?e.replace:e;if(s&&typeof e.count<"u"&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!s){n={...n};for(const r of t)delete n[r]}return n}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}}class $e{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=H.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(S(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}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 n=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const n=this.getScriptPartFromCode(s);if(this.isSupportedCode(n))return t=n;const r=this.getLanguagePartFromCode(s);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(a=>{if(a===r)return a;if(!(a.indexOf("-")<0&&r.indexOf("-")<0)&&(a.indexOf("-")>0&&r.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===r||a.indexOf(r)===0&&r.length>1))return a})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),S(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===!1?[]:t)||this.options.fallbackLng||[],e),n=[],r=a=>{a&&(this.isSupportedCode(a)?n.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return S(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):S(e)&&r(this.formatLanguageCode(e)),s.forEach(a=>{n.indexOf(a)<0&&r(this.formatLanguageCode(a))}),n}}const Ee={zero:0,one:1,two:2,few:3,many:4,other:5},Re={select:i=>i===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class ut{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=H.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=te(e==="dev"?"en":e),n=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:n});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(s,{type:n})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Re;if(!e.match(/-|_/))return Re;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[r]=a,a}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(n=>`${t}${n}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((n,r)=>Ee[n]-Ee[r]).map(n=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${n}`):[]}getSuffix(e,t,s={}){const n=this.getRule(e,s);return n?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}}const Pe=(i,e,t,s=".",n=!0)=>{let r=tt(i,e,t);return!r&&n&&S(t)&&(r=me(i,t,s),r===void 0&&(r=me(e,t,s))),r},de=i=>i.replace(/\$/g,"$$$$");class ke{constructor(e={}){var t;this.logger=H.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(s=>s),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:n,prefix:r,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:f,unescapePrefix:u,nestingPrefix:p,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:v,nestingOptionsSeparator:x,maxReplaces:C,alwaysFormat:y}=e.interpolation;this.escape=t!==void 0?t:nt,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=n!==void 0?n:!1,this.prefix=r?J(r):a||"{{",this.suffix=o?J(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=f?"":u||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=p?J(p):d||J("$t("),this.nestingSuffix=h?J(h):v||J(")"),this.nestingOptionsSeparator=x||",",this.maxReplaces=C||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>(t==null?void 0: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,n){var d;let r,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(h.indexOf(this.formatSeparator)<0){const y=Pe(t,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,s,{...n,...t,interpolationkey:h}):y}const v=h.split(this.formatSeparator),x=v.shift().trim(),C=v.join(this.formatSeparator).trim();return this.format(Pe(t,l,x,this.options.keySeparator,this.options.ignoreJSONStructure),C,s,{...n,...t,interpolationkey:x})};this.resetRegExp();const f=(n==null?void 0:n.missingInterpolationHandler)||this.options.missingInterpolationHandler,u=((d=n==null?void 0:n.interpolation)==null?void 0:d.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>de(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?de(this.escape(h)):de(h)}].forEach(h=>{for(o=0;r=h.regex.exec(e);){const v=r[1].trim();if(a=c(v),a===void 0)if(typeof f=="function"){const C=f(e,r,n);a=S(C)?C:""}else if(n&&Object.prototype.hasOwnProperty.call(n,v))a="";else if(u){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),a="";else!S(a)&&!this.useRawValueToEscape&&(a=be(a));const x=h.safeValue(a);if(e=e.replace(r[0],x),u?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=r[0].length):h.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,s={}){let n,r,a;const o=(l,c)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const u=l.split(new RegExp(`${J(f)}[ ]*{`));let p=`{${u[1]}`;l=u[0],p=this.interpolate(p,a);const d=p.match(/'/g),h=p.match(/"/g);(((d==null?void 0:d.length)??0)%2===0&&!h||((h==null?void 0:h.length)??0)%2!==0)&&(p=p.replace(/'/g,'"'));try{a=JSON.parse(p),c&&(a={...c,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${f}${p}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;n=this.nestingRegexp.exec(e);){let l=[];a={...s},a=a.replace&&!S(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const c=/{.*}/.test(n[1])?n[1].lastIndexOf("}")+1:n[1].indexOf(this.formatSeparator);if(c!==-1&&(l=n[1].slice(c).split(this.formatSeparator).map(f=>f.trim()).filter(Boolean),n[1]=n[1].slice(0,c)),r=t(o.call(this,n[1].trim(),a),a),r&&n[0]===e&&!S(r))return r;S(r)||(r=be(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),l.length&&(r=l.reduce((f,u)=>this.format(f,u,s.lng,{...s,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const ft=i=>{let e=i.toLowerCase().trim();const t={};if(i.indexOf("(")>-1){const s=i.split("(");e=s[0].toLowerCase().trim();const n=s[1].substring(0,s[1].length-1);e==="currency"&&n.indexOf(":")<0?t.currency||(t.currency=n.trim()):e==="relativetime"&&n.indexOf(":")<0?t.range||(t.range=n.trim()):n.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=c),c==="false"&&(t[f]=!1),c==="true"&&(t[f]=!0),isNaN(c)||(t[f]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},je=i=>{const e={};return(t,s,n)=>{let r=n;n&&n.interpolationkey&&n.formatParams&&n.formatParams[n.interpolationkey]&&n[n.interpolationkey]&&(r={...r,[n.interpolationkey]:void 0});const a=s+JSON.stringify(r);let o=e[a];return o||(o=i(te(s),n),e[a]=o),o(t)}},ht=i=>(e,t,s)=>i(te(t),s)(e);class dt{constructor(e={}){this.logger=H.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?je:ht;this.formats={number:s((n,r)=>{const a=new Intl.NumberFormat(n,{...r});return o=>a.format(o)}),currency:s((n,r)=>{const a=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>a.format(o)}),datetime:s((n,r)=>{const a=new Intl.DateTimeFormat(n,{...r});return o=>a.format(o)}),relativetime:s((n,r)=>{const a=new Intl.RelativeTimeFormat(n,{...r});return o=>a.format(o,r.range||"day")}),list:s((n,r)=>{const a=new Intl.ListFormat(n,{...r});return o=>a.format(o)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=je(t)}format(e,t,s,n={}){const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(o=>o.indexOf(")")>-1)){const o=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,l)=>{var u;const{formatName:c,formatOptions:f}=ft(l);if(this.formats[c]){let p=o;try{const d=((u=n==null?void 0:n.formatParams)==null?void 0:u[n.interpolationkey])||{},h=d.locale||d.lng||n.locale||n.lng||s;p=this.formats[c](o,h,{...f,...n,...d})}catch(d){this.logger.warn(d)}return p}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const pt=(i,e)=>{i.pending[e]!==void 0&&(delete i.pending[e],i.pendingCount--)};class gt extends ue{constructor(e,t,s,n={}){var r,a;super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=n,this.logger=H.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],(a=(r=this.backend)==null?void 0:r.init)==null||a.call(r,s,n.backend,n)}queueLoad(e,t,s,n){const r={},a={},o={},l={};return e.forEach(c=>{let f=!0;t.forEach(u=>{const p=`${c}|${u}`;!s.reload&&this.store.hasResourceBundle(c,u)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?a[p]===void 0&&(a[p]=!0):(this.state[p]=1,f=!1,a[p]===void 0&&(a[p]=!0),r[p]===void 0&&(r[p]=!0),l[u]===void 0&&(l[u]=!0)))}),f||(o[c]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const n=e.split("|"),r=n[0],a=n[1];t&&this.emit("failedLoading",r,a,t),!t&&s&&this.store.addResourceBundle(r,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(l=>{et(l.loaded,[r],a),pt(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const f=l.loaded[c];f.length&&f.forEach(u=>{o[c][u]===void 0&&(o[c][u]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s,n=0,r=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:n,wait:r,callback:a});return}this.readingCalls++;const o=(c,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const u=this.waitingReads.shift();this.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(c&&f&&n<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,n+1,r*2,a)},r);return}a(c,f)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const c=l(e,t);c&&typeof c.then=="function"?c.then(f=>o(null,f)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,t,o)}prepareLoading(e,t,s={},n){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),n&&n();S(e)&&(e=this.languageUtils.toResolveHierarchy(e)),S(t)&&(t=[t]);const r=this.queueLoad(e,t,s,n);if(!r.toLoad.length)return r.pending.length||n(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),n=s[0],r=s[1];this.read(n,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${n} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${n}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,n,r,a={},o=()=>{}){var l,c,f,u,p;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((u=(f=this.services)==null?void 0:f.utils)!=null&&u.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((p=this.backend)!=null&&p.create){const d={...a,isUpdate:r},h=this.backend.create.bind(this.backend);if(h.length<6)try{let v;h.length===5?v=h(e,t,s,n,d):v=h(e,t,s,n),v&&typeof v.then=="function"?v.then(x=>o(null,x)).catch(o):o(null,v)}catch(v){o(v)}else h(e,t,s,n,o,d)}!e||!e[0]||this.store.addResource(e[0],t,s,n)}}}const pe=()=>({debug:!1,initAsync:!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:i=>{let e={};if(typeof i[1]=="object"&&(e=i[1]),S(i[1])&&(e.defaultValue=i[1]),S(i[2])&&(e.tDescription=i[2]),typeof i[2]=="object"||typeof i[3]=="object"){const t=i[3]||i[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:i=>i,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Te=i=>{var e,t;return S(i.ns)&&(i.ns=[i.ns]),S(i.fallbackLng)&&(i.fallbackLng=[i.fallbackLng]),S(i.fallbackNS)&&(i.fallbackNS=[i.fallbackNS]),((t=(e=i.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(i.supportedLngs=i.supportedLngs.concat(["cimode"])),typeof i.initImmediate=="boolean"&&(i.initAsync=i.initImmediate),i},ne=()=>{},mt=i=>{Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach(t=>{typeof i[t]=="function"&&(i[t]=i[t].bind(i))})},Ke="__i18next_supportNoticeShown",yt=()=>!!(typeof globalThis<"u"&&globalThis[Ke]||typeof process<"u"&&fe&&fe.I18NEXT_NO_SUPPORT_NOTICE||typeof process<"u"&&fe),xt=()=>{typeof globalThis<"u"&&(globalThis[Ke]=!0)},vt=i=>{var e,t,s,n,r,a,o,l,c,f,u,p,d;return!!(((s=(t=(e=i==null?void 0:i.modules)==null?void 0:e.backend)==null?void 0:t.name)==null?void 0:s.indexOf("Locize"))>0||((o=(a=(r=(n=i==null?void 0:i.modules)==null?void 0:n.backend)==null?void 0:r.constructor)==null?void 0:a.name)==null?void 0:o.indexOf("Locize"))>0||(c=(l=i==null?void 0:i.options)==null?void 0:l.backend)!=null&&c.backends&&i.options.backend.backends.some(h=>{var v,x,C;return((v=h==null?void 0:h.name)==null?void 0:v.indexOf("Locize"))>0||((C=(x=h==null?void 0:h.constructor)==null?void 0:x.name)==null?void 0:C.indexOf("Locize"))>0})||(u=(f=i==null?void 0:i.options)==null?void 0:f.backend)!=null&&u.projectId||(d=(p=i==null?void 0:i.options)==null?void 0:p.backend)!=null&&d.backendOptions&&i.options.backend.backendOptions.some(h=>h==null?void 0:h.projectId))};class ee extends ue{constructor(e={},t){if(super(),this.options=Te(e),this.services={},this.logger=H,this.modules={external:[]},mt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e=="function"&&(t=e,e={}),e.defaultNS==null&&e.ns&&(S(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=pe();this.options={...s,...this.options,...Te(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!vt(this)&&!yt()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),xt());const n=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?H.init(n(this.modules.logger),this.options):H.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=dt;const f=new $e(this.options);this.store=new we(this.options.resources,this.options);const u=this.services;u.logger=H,u.resourceStore=this.store,u.languageUtils=f,u.pluralResolver=new ut(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(u.formatter=n(c),u.formatter.init&&u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new ke(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new gt(n(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.languageDetector&&(u.languageDetector=n(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=n(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ce(this.services,this.options),this.translator.on("*",(d,...h)=>{this.emit(d,...h)}),this.modules.external.forEach(d=>{d.init&&d.init(this)})}if(this.format=this.options.interpolation.format,t||(t=ne),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]=(...f)=>this.store[c](...f)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...f)=>(this.store[c](...f),this)});const o=Q(),l=()=>{const c=(f,u)=>{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),o.resolve(u),t(f,u)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,t=ne){var r,a;let s=t;const n=S(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if((n==null?void 0:n.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};n?l(n):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>l(f)),(a=(r=this.options.preload)==null?void 0:r.forEach)==null||a.call(r,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(c)})}else s(null)}reloadResources(e,t,s){const n=Q();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=ne),this.services.backendConnector.reload(e,t,r=>{n.resolve(),s(r)}),n}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"&&De.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}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;const s=Q();this.emit("languageChanging",e);const n=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},r=(o,l)=>{l?this.isLanguageChangingTo===e&&(n(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,s.resolve((...c)=>this.t(...c)),t&&t(o,(...c)=>this.t(...c))},a=o=>{var f,u;!e&&!o&&this.services.languageDetector&&(o=[]);const l=S(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(S(o)?[o]:o);c&&(this.language||n(c),this.translator.language||this.translator.changeLanguage(c),(u=(f=this.services.languageDetector)==null?void 0:f.cacheUserLanguage)==null||u.call(f,c)),this.loadResources(c,p=>{r(p,c)})};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),s}getFixedT(e,t,s){const n=(r,a,...o)=>{let l;typeof a!="object"?l=this.options.overloadTranslationOptionHandler([r,a].concat(o)):l={...a},l.lng=l.lng||n.lng,l.lngs=l.lngs||n.lngs,l.ns=l.ns||n.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||n.keyPrefix);const c={...this.options,...l};typeof l.keyPrefix=="function"&&(l.keyPrefix=Y(l.keyPrefix,c));const f=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(r)?u=r.map(p=>(typeof p=="function"&&(p=Y(p,c)),`${l.keyPrefix}${f}${p}`)):(typeof r=="function"&&(r=Y(r,c)),u=l.keyPrefix?`${l.keyPrefix}${f}${r}`:r),this.t(u,l)};return S(e)?n.lng=e:n.lngs=e,n.ns=t,n.keyPrefix=s,n}t(...e){var t;return(t=this.translator)==null?void 0:t.translate(...e)}exists(...e){var t;return(t=this.translator)==null?void 0:t.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){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],n=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!n||a(r,e)))}loadNamespaces(e,t){const s=Q();return this.options.ns?(S(e)&&(e=[e]),e.forEach(n=>{this.options.ns.indexOf(n)<0&&this.options.ns.push(n)}),this.loadResources(n=>{s.resolve(),t&&t(n)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=Q();S(e)&&(e=[e]);const n=this.options.preload||[],r=e.filter(a=>n.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return r.length?(this.options.preload=n.concat(r),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(t&&t(),Promise.resolve())}dir(e){var n,r;if(e||(e=this.resolvedLanguage||(((n=this.languages)==null?void 0:n.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}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=((r=this.services)==null?void 0:r.languageUtils)||new $e(pe());return e.toLowerCase().indexOf("-latn")>1?"ltr":t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){const s=new ee(e,t);return s.createInstance=ee.createInstance,s}cloneInstance(e={},t=ne){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},r=new ee(n);if((e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((f,u)=>(f[u]={...l[c][u]},f),l[c]),l),{});r.store=new we(o,n),r.services.resourceStore=r.store}if(e.interpolation){const l={...pe().interpolation,...this.options.interpolation,...e.interpolation},c={...n,interpolation:l};r.services.interpolator=new ke(c)}return r.translator=new ce(r.services,n),r.translator.on("*",(o,...l)=>{r.emit(o,...l)}),r.init(n,t),r.translator.options=n,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const D=ee.createInstance();D.createInstance;D.dir;D.init;D.loadResources;D.reloadResources;D.use;D.changeLanguage;D.getFixedT;D.t;D.exists;D.setDefaultNamespace;D.hasLoadedNamespace;D.loadNamespaces;D.loadLanguages;var St={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const bt=Xe(St);var Ot=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Fe(i){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=i.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(bt[t[1]]||i.charAt(i.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var s=i.indexOf("-->");return{type:"comment",comment:s!==-1?i.slice(4,s):""}}for(var n=new RegExp(Ot),r=null;(r=n.exec(i))!==null;)if(r[0].trim())if(r[1]){var a=r[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),e.attrs[o[0]]=o[1],n.lastIndex--}else r[2]&&(e.attrs[r[2]]=r[3].trim().substring(1,r[3].length-1));return e}var Lt=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,Nt=/^\s*$/,wt=Object.create(null);function Ue(i,e){switch(e.type){case"text":return i+e.content;case"tag":return i+="<"+e.name+(e.attrs?function(t){var s=[];for(var n in t)s.push(n+'="'+t[n]+'"');return s.length?" "+s.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?i:i+e.children.reduce(Ue,"")+"</"+e.name+">";case"comment":return i+"<!--"+e.comment+"-->"}}var Ct={parse:function(i,e){e||(e={}),e.components||(e.components=wt);var t,s=[],n=[],r=-1,a=!1;if(i.indexOf("<")!==0){var o=i.indexOf("<");s.push({type:"text",content:o===-1?i:i.substring(0,o)})}return i.replace(Lt,function(l,c){if(a){if(l!=="</"+t.name+">")return;a=!1}var f,u=l.charAt(1)!=="/",p=l.startsWith("<!--"),d=c+l.length,h=i.charAt(d);if(p){var v=Fe(l);return r<0?(s.push(v),s):((f=n[r]).children.push(v),s)}if(u&&(r++,(t=Fe(l)).type==="tag"&&e.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!h||h==="<"||t.children.push({type:"text",content:i.slice(d,i.indexOf("<",d))}),r===0&&s.push(t),(f=n[r-1])&&f.children.push(t),n[r]=t),(!u||t.voidElement)&&(r>-1&&(t.voidElement||t.name===l.slice(2,-1))&&(r--,t=r===-1?s:n[r]),!a&&h!=="<"&&h)){f=r===-1?s:n[r].children;var x=i.indexOf("<",d),C=i.slice(d,x===-1?void 0:x);Nt.test(C)&&(C=" "),(x>-1&&r+f.length>=0||C!==" ")&&f.push({type:"text",content:C})}}),s},stringify:function(i){return i.reduce(function(e,t){return e+Ue("",t)},"")}};const ie=(i,e,t,s)=>{var r,a,o,l;const n=[t,{code:e,...s||{}}];if((a=(r=i==null?void 0:i.services)==null?void 0:r.logger)!=null&&a.forward)return i.services.logger.forward(n,"warn","react-i18next::",!0);V(n[0])&&(n[0]=`react-i18next:: ${n[0]}`),(l=(o=i==null?void 0:i.services)==null?void 0:o.logger)!=null&&l.warn?i.services.logger.warn(...n):console!=null&&console.warn&&console.warn(...n)},Ie={},se=(i,e,t,s)=>{V(t)&&Ie[t]||(V(t)&&(Ie[t]=new Date),ie(i,e,t,s))},He=(i,e)=>()=>{if(i.isInitialized)e();else{const t=()=>{setTimeout(()=>{i.off("initialized",t)},0),e()};i.on("initialized",t)}},ye=(i,e,t)=>{i.loadNamespaces(e,He(i,t))},Ae=(i,e,t,s)=>{if(V(t)&&(t=[t]),i.options.preload&&i.options.preload.indexOf(e)>-1)return ye(i,t,s);t.forEach(n=>{i.options.ns.indexOf(n)<0&&i.options.ns.push(n)}),i.loadLanguages(e,He(i,s))},$t=(i,e,t={})=>!e.languages||!e.languages.length?(se(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(i,{lng:t.lng,precheck:(s,n)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!n(s.isLanguageChangingTo,i))return!1}}),V=i=>typeof i=="string",z=i=>typeof i=="object"&&i!==null,Et=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Rt={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Pt=i=>Rt[i],Me=i=>i.replace(Et,Pt);let xe={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Me,transDefaultProps:void 0};const kt=(i={})=>{xe={...xe,...i}},ve=()=>xe;let ze;const jt=i=>{ze=i},Se=()=>ze,re=(i,e)=>{var s;if(!i)return!1;const t=((s=i.props)==null?void 0:s.children)??i.children;return e?t.length>0:!!t},ae=i=>{var t,s;if(!i)return[];const e=((t=i.props)==null?void 0:t.children)??i.children;return(s=i.props)!=null&&s.i18nIsDynamicList?W(e):e},Tt=i=>Array.isArray(i)&&i.every(P.isValidElement),W=i=>Array.isArray(i)?i:[i],Ft=(i,e)=>{const t={...e};return t.props={...e.props,...i.props},t},It=i=>{const e={};if(!i)return e;const t=s=>{W(s).forEach(r=>{V(r)||(re(r)?t(ae(r)):z(r)&&!P.isValidElement(r)&&Object.assign(e,r))})};return t(i),e},Be=(i,e,t,s)=>{if(!i)return"";let n="";const r=W(i),a=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return r.forEach((o,l)=>{if(V(o)){n+=`${o}`;return}if(P.isValidElement(o)){const{props:c,type:f}=o,u=Object.keys(c).length,p=a.indexOf(f)>-1,d=c.children;if(!d&&p&&!u){n+=`<${f}/>`;return}if(!d&&(!p||u)||c.i18nIsDynamicList){n+=`<${l}></${l}>`;return}if(p&&u===1&&V(d)){n+=`<${f}>${d}</${f}>`;return}const h=Be(d,e,t,s);n+=`<${l}>${h}</${l}>`;return}if(o===null){ie(t,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:s});return}if(z(o)){const{format:c,...f}=o,u=Object.keys(f);if(u.length===1){const p=c?`${u[0]}, ${c}`:u[0];n+=`{{${p}}}`;return}ie(t,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:s,child:o});return}ie(t,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:s,child:o})}),n},At=(i,e=[],t={})=>{if(!i)return i;const s=Object.keys(t),n=[...e,...s];let r="",a=0;for(;a<i.length;)if(i[a]==="<"){let o=!1;const l=i.slice(a).match(/^<\/(\d+|[a-zA-Z][a-zA-Z0-9_-]*)>/);if(l){const c=l[1];(/^\d+$/.test(c)||n.includes(c))&&(o=!0,r+=l[0],a+=l[0].length)}if(!o){const c=i.slice(a).match(/^<(\d+|[a-zA-Z][a-zA-Z0-9_-]*)(\s+[\w-]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]+))?)*\s*(\/)?>/);if(c){const f=c[1];(/^\d+$/.test(f)||n.includes(f))&&(o=!0,r+=c[0],a+=c[0].length)}}o||(r+="<",a+=1)}else r+=i[a],a+=1;return r},Vt=(i,e,t,s,n,r,a)=>{if(t==="")return[];const o=n.transKeepBasicHtmlNodesFor||[],l=t&&new RegExp(o.map(y=>`<${y}`).join("|")).test(t);if(!i&&!e&&!l&&!a)return[t];const c=e??{},f=y=>{W(y).forEach(O=>{V(O)||(re(O)?f(ae(O)):z(O)&&!P.isValidElement(O)&&Object.assign(c,O))})};f(i);const u=At(t,o,c),p=Ct.parse(`<0>${u}</0>`),d={...c,...r},h=(y,$,O)=>{var L;const E=ae(y),A=x(E,$.children,O);return Tt(E)&&A.length===0||(L=y.props)!=null&&L.i18nIsDynamicList?E:A},v=(y,$,O,E,A)=>{y.dummy?(y.children=$,O.push(P.cloneElement(y,{key:E},A?void 0:$))):O.push(...P.Children.map([y],L=>{const g="data-i18n-is-dynamic-list",k={key:E,[g]:void 0};return L&&L.props&&Object.keys(L.props).forEach(w=>{w==="ref"||w==="children"||w==="i18nIsDynamicList"||w===g||(k[w]=L.props[w])}),P.cloneElement(L,k,A?null:$)}))},x=(y,$,O)=>{const E=W(y);return W($).reduce((L,g,k)=>{var K,R;const w=((R=(K=g.children)==null?void 0:K[0])==null?void 0:R.content)&&s.services.interpolator.interpolate(g.children[0].content,d,s.language);if(g.type==="tag"){let m=E[parseInt(g.name,10)];!m&&e&&(m=e[g.name]),O.length===1&&!m&&(m=O[0][g.name]),m||(m={});const b={...g.attrs};a&&Object.keys(b).forEach(T=>{const I=b[T];V(I)&&(b[T]=Me(I))});const N=Object.keys(b).length!==0?Ft({props:b},m):m,j=P.isValidElement(N),F=j&&re(g,!0)&&!g.voidElement,_=l&&z(N)&&N.dummy&&!j,M=z(e)&&Object.hasOwnProperty.call(e,g.name);if(V(N)){const T=s.services.interpolator.interpolate(N,d,s.language);L.push(T)}else if(re(N)||F){const T=h(N,g,O);v(N,T,L,k)}else if(_){const T=x(E,g.children,O);v(N,T,L,k)}else if(Number.isNaN(parseFloat(g.name)))if(M){const T=h(N,g,O);v(N,T,L,k,g.voidElement)}else if(n.transSupportBasicHtmlNodes&&o.indexOf(g.name)>-1)if(g.voidElement)L.push(P.createElement(g.name,{key:`${g.name}-${k}`}));else{const T=x(E,g.children,O);L.push(P.createElement(g.name,{key:`${g.name}-${k}`},T))}else if(g.voidElement)L.push(`<${g.name} />`);else{const T=x(E,g.children,O);L.push(`<${g.name}>${T}</${g.name}>`)}else if(z(N)&&!j){const T=g.children[0]?w:null;T&&L.push(T)}else v(N,w,L,k,g.children.length!==1||!w)}else if(g.type==="text"){const m=n.transWrapTextNodes,b=typeof n.unescape=="function"?n.unescape:ve().unescape,N=a?b(s.services.interpolator.interpolate(g.content,d,s.language)):s.services.interpolator.interpolate(g.content,d,s.language);m?L.push(P.createElement(m,{key:`${g.name}-${k}`},N)):L.push(N)}return L},[])},C=x([{dummy:!0,children:i||[]}],p,W(i||[]));return ae(C[0])},Je=(i,e,t)=>{const s=i.key||e,n=P.cloneElement(i,{key:s});if(!n.props||!n.props.children||t.indexOf(`${e}/>`)<0&&t.indexOf(`${e} />`)<0)return n;function r(){return P.createElement(P.Fragment,null,n)}return P.createElement(r,{key:s})},Dt=(i,e)=>i.map((t,s)=>Je(t,s,e)),_t=(i,e)=>{const t={};return Object.keys(i).forEach(s=>{Object.assign(t,{[s]:Je(i[s],s,e)})}),t},Kt=(i,e,t,s)=>i?Array.isArray(i)?Dt(i,e):z(i)?_t(i,e):(se(t,"TRANS_INVALID_COMPONENTS",'<Trans /> "components" prop expects an object or array',{i18nKey:s}),null):null,Ut=i=>!z(i)||Array.isArray(i)?!1:Object.keys(i).reduce((e,t)=>e&&Number.isNaN(Number.parseFloat(t)),!0);function Ht({children:i,count:e,parent:t,i18nKey:s,context:n,tOptions:r={},values:a,defaults:o,components:l,ns:c,i18n:f,t:u,shouldUnescape:p,...d}){var T,I,U,B,G,X;const h=f||Se();if(!h)return se(h,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using i18nextReactModule",{i18nKey:s}),i;const v=u||h.t.bind(h)||(Ge=>Ge),x={...ve(),...(T=h.options)==null?void 0:T.react};let C=c||v.ns||((I=h.options)==null?void 0:I.defaultNS);C=V(C)?[C]:C||["translation"];const{transDefaultProps:y}=x,$=y!=null&&y.tOptions?{...y.tOptions,...r}:r,O=p??(y==null?void 0:y.shouldUnescape),E=y!=null&&y.values?{...y.values,...a}:a,A=y!=null&&y.components?{...y.components,...l}:l,L=Be(i,x,h,s),g=o||($==null?void 0:$.defaultValue)||L||x.transEmptyNodeValue||(typeof s=="function"?Y(s):s),{hashTransKey:k}=x,w=s||(k?k(L||g):L||g);(B=(U=h.options)==null?void 0:U.interpolation)!=null&&B.defaultVariables?a=E&&Object.keys(E).length>0?{...E,...h.options.interpolation.defaultVariables}:{...h.options.interpolation.defaultVariables}:a=E;const K=It(i);K&&typeof K.count=="number"&&e===void 0&&(e=K.count);const R=a||e!==void 0&&!((X=(G=h.options)==null?void 0:G.interpolation)!=null&&X.alwaysFormat)||!i?$.interpolation:{interpolation:{...$.interpolation,prefix:"#$?",suffix:"?$#"}},m={...$,context:n||$.context,count:e,...a,...R,defaultValue:g,ns:C};let b=w?v(w,m):g;b===w&&g&&(b=g);const N=Kt(A,b,h,s);let j=N||i,F=null;Ut(N)&&(F=N,j=i);const _=Vt(j,F,b,h,x,m,O),M=t??x.defaultTransParent;return M?P.createElement(M,d,_):_}const is={type:"3rdParty",init(i){kt(i.options.react),jt(i)}},We=P.createContext();class Mt{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function rs({children:i,count:e,parent:t,i18nKey:s,context:n,tOptions:r={},values:a,defaults:o,components:l,ns:c,i18n:f,t:u,shouldUnescape:p,...d}){var y;const{i18n:h,defaultNS:v}=P.useContext(We)||{},x=f||h||Se(),C=u||(x==null?void 0:x.t.bind(x));return Ht({children:i,count:e,parent:t,i18nKey:s,context:n,tOptions:r,values:a,defaults:o,components:l,ns:c||(C==null?void 0:C.ns)||v||((y=x==null?void 0:x.options)==null?void 0:y.defaultNS),i18n:x,t:u,shouldUnescape:p,...d})}var Ye={exports:{}},Ze={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* use-sync-external-store-shim.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Z=P;function zt(i,e){return i===e&&(i!==0||1/i===1/e)||i!==i&&e!==e}var Bt=typeof Object.is=="function"?Object.is:zt,Jt=Z.useState,Wt=Z.useEffect,Yt=Z.useLayoutEffect,Zt=Z.useDebugValue;function Gt(i,e){var t=e(),s=Jt({inst:{value:t,getSnapshot:e}}),n=s[0].inst,r=s[1];return Yt(function(){n.value=t,n.getSnapshot=e,ge(n)&&r({inst:n})},[i,t,e]),Wt(function(){return ge(n)&&r({inst:n}),i(function(){ge(n)&&r({inst:n})})},[i]),Zt(t),t}function ge(i){var e=i.getSnapshot;i=i.value;try{var t=e();return!Bt(i,t)}catch{return!0}}function Xt(i,e){return e()}var Qt=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xt:Gt;Ze.useSyncExternalStore=Z.useSyncExternalStore!==void 0?Z.useSyncExternalStore:Qt;Ye.exports=Ze;var qt=Ye.exports;const es=(i,e)=>{if(V(e))return e;if(z(e)&&V(e.defaultValue))return e.defaultValue;if(typeof i=="function")return"";if(Array.isArray(i)){const t=i[i.length-1];return typeof t=="function"?"":t}return i},ts={t:es,ready:!1},ss=()=>()=>{},as=(i,e={})=>{var k,w,K;const{i18n:t}=e,{i18n:s,defaultNS:n}=P.useContext(We)||{},r=t||s||Se();r&&!r.reportNamespaces&&(r.reportNamespaces=new Mt),r||se(r,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const a=P.useMemo(()=>{var R;return{...ve(),...(R=r==null?void 0:r.options)==null?void 0:R.react,...e}},[r,e]),{useSuspense:o,keyPrefix:l}=a,c=i||n||((k=r==null?void 0:r.options)==null?void 0:k.defaultNS),f=V(c)?[c]:c||["translation"],u=P.useMemo(()=>f,f);(K=(w=r==null?void 0:r.reportNamespaces)==null?void 0:w.addUsedNamespaces)==null||K.call(w,u);const p=P.useRef(0),d=P.useCallback(R=>{if(!r)return ss;const{bindI18n:m,bindI18nStore:b}=a,N=()=>{p.current+=1,R()};return m&&r.on(m,N),b&&r.store.on(b,N),()=>{m&&m.split(" ").forEach(j=>r.off(j,N)),b&&b.split(" ").forEach(j=>r.store.off(j,N))}},[r,a]),h=P.useRef(),v=P.useCallback(()=>{if(!r)return ts;const R=!!(r.isInitialized||r.initializedStoreOnce)&&u.every(_=>$t(_,r,a)),m=e.lng||r.language,b=p.current,N=h.current;if(N&&N.ready===R&&N.lng===m&&N.keyPrefix===l&&N.revision===b)return N;const F={t:r.getFixedT(m,a.nsMode==="fallback"?u:u[0],l),ready:R,lng:m,keyPrefix:l,revision:b};return h.current=F,F},[r,u,l,a,e.lng]),[x,C]=P.useState(0),{t:y,ready:$}=qt.useSyncExternalStore(d,v,v);P.useEffect(()=>{if(r&&!$&&!o){const R=()=>C(m=>m+1);e.lng?Ae(r,e.lng,u,R):ye(r,u,R)}},[r,e.lng,u,$,o,x]);const O=r||{},E=P.useRef(null),A=P.useRef(),L=R=>{const m=Object.getOwnPropertyDescriptors(R);m.__original&&delete m.__original;const b=Object.create(Object.getPrototypeOf(R),m);if(!Object.prototype.hasOwnProperty.call(b,"__original"))try{Object.defineProperty(b,"__original",{value:R,writable:!1,enumerable:!1,configurable:!1})}catch{}return b},g=P.useMemo(()=>{const R=O,m=R==null?void 0:R.language;let b=R;R&&(E.current&&E.current.__original===R?A.current!==m?(b=L(R),E.current=b,A.current=m):b=E.current:(b=L(R),E.current=b,A.current=m));const N=!$&&!o?(...F)=>(se(r,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),y(...F)):y,j=[N,b,$];return j.t=N,j.i18n=b,j.ready=$,j},[y,O,$,O.resolvedLanguage,O.language,O.languages]);if(r&&o&&!$)throw new Promise(R=>{const m=()=>R();e.lng?Ae(r,e.lng,u,m):ye(r,u,m)});return g};export{rs as T,is as a,D as i,as as u};
|
|
@@ -56,4 +56,4 @@ Error generating stack: `+u.message+`
|
|
|
56
56
|
* LICENSE.md file in the root directory of this source tree.
|
|
57
57
|
*
|
|
58
58
|
* @license MIT
|
|
59
|
-
*/function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function bp(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,u;for(u=0;u<r.length;u++)l=r[u],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function eh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function th(e,t){return e.button===0&&(!t||t==="_self")&&!eh(e)}function Ju(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function nh(e,t){let n=Ju(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(u=>{n.append(l,u)})}),n}const rh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lh="6";try{window.__reactRouterVersion=lh}catch{}const uh="startTransition",ha=tf[uh];function ph(e){let{basename:t,children:n,future:r,window:l}=e,u=E.useRef();u.current==null&&(u.current=op({window:l,v5Compat:!0}));let i=u.current,[o,a]=E.useState({action:i.action,location:i.location}),{v7_startTransition:s}=r||{},h=E.useCallback(p=>{s&&ha?ha(()=>a(p)):a(p)},[a,s]);return E.useLayoutEffect(()=>i.listen(h),[i,h]),E.useEffect(()=>Zp(r),[r]),E.createElement(qp,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:i,future:r})}const ih=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hh=E.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:u,replace:i,state:o,target:a,to:s,preventScrollReset:h,viewTransition:p}=t,m=bp(t,rh),{basename:y}=E.useContext(wt),g,w=!1;if(typeof s=="string"&&oh.test(s)&&(g=s,ih))try{let d=new URL(window.location.href),v=s.startsWith("//")?new URL(d.protocol+s):new URL(s),k=Yi(v.pathname,y);v.origin===d.origin&&k!=null?s=k+v.search+v.hash:w=!0}catch{}let C=Fp(s,{relative:l}),f=ah(s,{replace:i,state:o,target:a,preventScrollReset:h,relative:l,viewTransition:p});function c(d){r&&r(d),d.defaultPrevented||f(d)}return E.createElement("a",Zu({},m,{href:g||C,onClick:w||u?r:c,ref:n,target:a}))});var ma;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ma||(ma={}));var va;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(va||(va={}));function ah(e,t){let{target:n,replace:r,state:l,preventScrollReset:u,relative:i,viewTransition:o}=t===void 0?{}:t,a=Ji(),s=hn(),h=Oc(e,{relative:i});return E.useCallback(p=>{if(th(p,n)){p.preventDefault();let m=r!==void 0?r:sl(s)===sl(h);a(e,{replace:m,state:l,preventScrollReset:u,relative:i,viewTransition:o})}},[s,a,h,r,l,n,e,u,i,o])}function mh(e){let t=E.useRef(Ju(e)),n=E.useRef(!1),r=hn(),l=E.useMemo(()=>nh(r.search,n.current?null:t.current),[r.search]),u=Ji(),i=E.useCallback((o,a)=>{const s=Ju(typeof o=="function"?o(l):o);n.current=!0,u("?"+s,a)},[u,l]);return[l,i]}export{ph as B,hh as L,fh as N,dh as R,sh as a,hn as b,Jp as c,ch as d,ef as e,mh as f,E as r,Ji as u};
|
|
59
|
+
*/function Zu(){return Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zu.apply(this,arguments)}function bp(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,u;for(u=0;u<r.length;u++)l=r[u],!(t.indexOf(l)>=0)&&(n[l]=e[l]);return n}function eh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function th(e,t){return e.button===0&&(!t||t==="_self")&&!eh(e)}function Ju(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function nh(e,t){let n=Ju(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(u=>{n.append(l,u)})}),n}const rh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],lh="6";try{window.__reactRouterVersion=lh}catch{}const uh="startTransition",ha=tf[uh];function ph(e){let{basename:t,children:n,future:r,window:l}=e,u=E.useRef();u.current==null&&(u.current=op({window:l,v5Compat:!0}));let i=u.current,[o,a]=E.useState({action:i.action,location:i.location}),{v7_startTransition:s}=r||{},h=E.useCallback(p=>{s&&ha?ha(()=>a(p)):a(p)},[a,s]);return E.useLayoutEffect(()=>i.listen(h),[i,h]),E.useEffect(()=>Zp(r),[r]),E.createElement(qp,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:i,future:r})}const ih=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hh=E.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:u,replace:i,state:o,target:a,to:s,preventScrollReset:h,viewTransition:p}=t,m=bp(t,rh),{basename:y}=E.useContext(wt),g,w=!1;if(typeof s=="string"&&oh.test(s)&&(g=s,ih))try{let d=new URL(window.location.href),v=s.startsWith("//")?new URL(d.protocol+s):new URL(s),k=Yi(v.pathname,y);v.origin===d.origin&&k!=null?s=k+v.search+v.hash:w=!0}catch{}let C=Fp(s,{relative:l}),f=ah(s,{replace:i,state:o,target:a,preventScrollReset:h,relative:l,viewTransition:p});function c(d){r&&r(d),d.defaultPrevented||f(d)}return E.createElement("a",Zu({},m,{href:g||C,onClick:w||u?r:c,ref:n,target:a}))});var ma;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ma||(ma={}));var va;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(va||(va={}));function ah(e,t){let{target:n,replace:r,state:l,preventScrollReset:u,relative:i,viewTransition:o}=t===void 0?{}:t,a=Ji(),s=hn(),h=Oc(e,{relative:i});return E.useCallback(p=>{if(th(p,n)){p.preventDefault();let m=r!==void 0?r:sl(s)===sl(h);a(e,{replace:m,state:l,preventScrollReset:u,relative:i,viewTransition:o})}},[s,a,h,r,l,n,e,u,i,o])}function mh(e){let t=E.useRef(Ju(e)),n=E.useRef(!1),r=hn(),l=E.useMemo(()=>nh(r.search,n.current?null:t.current),[r.search]),u=Ji(),i=E.useCallback((o,a)=>{const s=Ju(typeof o=="function"?o(l):o);n.current=!0,u("?"+s,a)},[u,l]);return[l,i]}export{ph as B,hh as L,fh as N,dh as R,sh as a,hn as b,Jp as c,ch as d,ef as e,mh as f,jc as g,E as r,Ji as u};
|
|
Binary file
|
package/public/index.html
CHANGED
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<!-- Without an explicit favicon, requests to /favicon.ico hit the SPA
|
|
7
|
+
fallback (returns index.html), and Chrome then picks the largest
|
|
8
|
+
already-loaded image as the tab icon — typically /logos/hermes.png
|
|
9
|
+
from the instance cards, making the panel look like Hermes. -->
|
|
10
|
+
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
6
11
|
<title>JishuShell</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-react-
|
|
9
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-i18n-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-DQsM6Joa.js"></script>
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-react-Bk1hRGiY.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-i18n-ucpM0OR0.js">
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CPhVFEsx.css">
|
|
11
16
|
</head>
|
|
12
17
|
<body class="bg-white min-h-screen">
|
|
13
18
|
<div id="root"></div>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 16 16" role="img" aria-label="Pixel lobster">
|
|
2
|
+
<rect width="16" height="16" fill="none"/>
|
|
3
|
+
<!-- outline -->
|
|
4
|
+
<g fill="#3a0a0d">
|
|
5
|
+
<rect x="1" y="5" width="1" height="3"/>
|
|
6
|
+
<rect x="2" y="4" width="1" height="1"/>
|
|
7
|
+
<rect x="2" y="8" width="1" height="1"/>
|
|
8
|
+
<rect x="3" y="3" width="1" height="1"/>
|
|
9
|
+
<rect x="3" y="9" width="1" height="1"/>
|
|
10
|
+
<rect x="4" y="2" width="1" height="1"/>
|
|
11
|
+
<rect x="4" y="10" width="1" height="1"/>
|
|
12
|
+
<rect x="5" y="2" width="6" height="1"/>
|
|
13
|
+
<rect x="11" y="2" width="1" height="1"/>
|
|
14
|
+
<rect x="12" y="3" width="1" height="1"/>
|
|
15
|
+
<rect x="12" y="9" width="1" height="1"/>
|
|
16
|
+
<rect x="13" y="4" width="1" height="1"/>
|
|
17
|
+
<rect x="13" y="8" width="1" height="1"/>
|
|
18
|
+
<rect x="14" y="5" width="1" height="3"/>
|
|
19
|
+
<rect x="5" y="11" width="6" height="1"/>
|
|
20
|
+
<rect x="4" y="12" width="1" height="1"/>
|
|
21
|
+
<rect x="11" y="12" width="1" height="1"/>
|
|
22
|
+
<rect x="3" y="13" width="1" height="1"/>
|
|
23
|
+
<rect x="12" y="13" width="1" height="1"/>
|
|
24
|
+
<rect x="5" y="14" width="6" height="1"/>
|
|
25
|
+
</g>
|
|
26
|
+
|
|
27
|
+
<!-- body -->
|
|
28
|
+
<g fill="#ff4f40">
|
|
29
|
+
<rect x="5" y="3" width="6" height="1"/>
|
|
30
|
+
<rect x="4" y="4" width="8" height="1"/>
|
|
31
|
+
<rect x="3" y="5" width="10" height="1"/>
|
|
32
|
+
<rect x="3" y="6" width="10" height="1"/>
|
|
33
|
+
<rect x="3" y="7" width="10" height="1"/>
|
|
34
|
+
<rect x="4" y="8" width="8" height="1"/>
|
|
35
|
+
<rect x="5" y="9" width="6" height="1"/>
|
|
36
|
+
<rect x="5" y="12" width="6" height="1"/>
|
|
37
|
+
<rect x="6" y="13" width="4" height="1"/>
|
|
38
|
+
</g>
|
|
39
|
+
|
|
40
|
+
<!-- claws -->
|
|
41
|
+
<g fill="#ff775f">
|
|
42
|
+
<rect x="1" y="6" width="2" height="1"/>
|
|
43
|
+
<rect x="2" y="5" width="1" height="1"/>
|
|
44
|
+
<rect x="2" y="7" width="1" height="1"/>
|
|
45
|
+
<rect x="13" y="6" width="2" height="1"/>
|
|
46
|
+
<rect x="13" y="5" width="1" height="1"/>
|
|
47
|
+
<rect x="13" y="7" width="1" height="1"/>
|
|
48
|
+
</g>
|
|
49
|
+
|
|
50
|
+
<!-- eyes -->
|
|
51
|
+
<g fill="#081016">
|
|
52
|
+
<rect x="6" y="5" width="1" height="1"/>
|
|
53
|
+
<rect x="9" y="5" width="1" height="1"/>
|
|
54
|
+
</g>
|
|
55
|
+
<g fill="#f5fbff">
|
|
56
|
+
<rect x="6" y="4" width="1" height="1"/>
|
|
57
|
+
<rect x="9" y="4" width="1" height="1"/>
|
|
58
|
+
</g>
|
|
59
|
+
</svg>
|
|
60
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
5
|
+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
6
|
+
|
|
7
|
+
IMAGE_NAME="${HERMES_IMAGE:-ghcr.io/x-aijishu/hermes-runtime}"
|
|
8
|
+
IMAGE_TAG="${HERMES_TAG:-local}"
|
|
9
|
+
HERMES_REF="${HERMES_REF:-main}"
|
|
10
|
+
|
|
11
|
+
echo "Building ${IMAGE_NAME}:${IMAGE_TAG} from Hermes ref ${HERMES_REF} ..."
|
|
12
|
+
docker build \
|
|
13
|
+
--network=host \
|
|
14
|
+
--build-arg "HERMES_REF=${HERMES_REF}" \
|
|
15
|
+
-f "${PROJECT_ROOT}/Dockerfile.hermes-slim" \
|
|
16
|
+
-t "${IMAGE_NAME}:${IMAGE_TAG}" \
|
|
17
|
+
"${PROJECT_ROOT}"
|
|
18
|
+
|
|
19
|
+
echo
|
|
20
|
+
echo "Done: ${IMAGE_NAME}:${IMAGE_TAG}"
|
|
21
|
+
docker image inspect "${IMAGE_NAME}:${IMAGE_TAG}" --format '{{.Id}}'
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# scripts/build-local.sh — Build Docker images locally for development/testing.
|
|
3
|
+
# Usage:
|
|
4
|
+
# ./scripts/build-local.sh openclaw # Build OpenClaw runtime image
|
|
5
|
+
# ./scripts/build-local.sh hermes # Build Hermes Agent + Open WebUI image
|
|
6
|
+
# ./scripts/build-local.sh all # Build all images
|
|
7
|
+
# PLATFORM=linux/arm64 ./scripts/build-local.sh openclaw # Build for specific platform
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
cd "$(dirname "$0")/.."
|
|
10
|
+
|
|
11
|
+
PLATFORM="${PLATFORM:-linux/$(dpkg --print-architecture 2>/dev/null || uname -m)}"
|
|
12
|
+
|
|
13
|
+
build_openclaw() {
|
|
14
|
+
local version="${OPENCLAW_VERSION:-latest}"
|
|
15
|
+
echo "==> Building OpenClaw runtime image (version=${version}, platform=${PLATFORM})"
|
|
16
|
+
docker build \
|
|
17
|
+
-f Dockerfile.openclaw-slim \
|
|
18
|
+
--build-arg "OPENCLAW_VERSION=${version}" \
|
|
19
|
+
--platform "${PLATFORM}" \
|
|
20
|
+
-t "jishushell-openclaw:${version}" \
|
|
21
|
+
-t "jishushell-openclaw:latest" \
|
|
22
|
+
.
|
|
23
|
+
echo "==> Done: jishushell-openclaw:${version}"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
build_hermes() {
|
|
27
|
+
local hermes_ver="${HERMES_VERSION:-latest}"
|
|
28
|
+
local webui_ver="${OPEN_WEBUI_VERSION:-latest}"
|
|
29
|
+
echo "==> Building Hermes Agent + Open WebUI image (hermes=${hermes_ver}, webui=${webui_ver}, platform=${PLATFORM})"
|
|
30
|
+
docker build \
|
|
31
|
+
-f Dockerfile.hermes-agent \
|
|
32
|
+
--build-arg "HERMES_VERSION=${hermes_ver}" \
|
|
33
|
+
--build-arg "OPEN_WEBUI_VERSION=${webui_ver}" \
|
|
34
|
+
--platform "${PLATFORM}" \
|
|
35
|
+
-t "jishushell-hermes:${hermes_ver}" \
|
|
36
|
+
-t "jishushell-hermes:latest" \
|
|
37
|
+
.
|
|
38
|
+
echo "==> Done: jishushell-hermes:${hermes_ver}"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
case "${1:-all}" in
|
|
42
|
+
openclaw) build_openclaw ;;
|
|
43
|
+
hermes) build_hermes ;;
|
|
44
|
+
all) build_openclaw; build_hermes ;;
|
|
45
|
+
*)
|
|
46
|
+
echo "Usage: $0 {openclaw|hermes|all}"
|
|
47
|
+
echo "Environment variables:"
|
|
48
|
+
echo " PLATFORM Target platform (default: auto-detect)"
|
|
49
|
+
echo " OPENCLAW_VERSION OpenClaw version (default: latest)"
|
|
50
|
+
echo " HERMES_VERSION Hermes Agent version (default: latest)"
|
|
51
|
+
echo " OPEN_WEBUI_VERSION Open WebUI version (default: latest)"
|
|
52
|
+
exit 1
|
|
53
|
+
;;
|
|
54
|
+
esac
|