@tryghost/sodo-search 1.8.19 → 1.8.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryghost/sodo-search",
3
- "version": "1.8.19",
3
+ "version": "1.8.21",
4
4
  "license": "MIT",
5
5
  "repository": "https://github.com/TryGhost/Ghost",
6
6
  "author": "Ghost Foundation",
@@ -84,16 +84,16 @@
84
84
  "@testing-library/jest-dom": "5.17.0",
85
85
  "@testing-library/react": "12.1.5",
86
86
  "@vitejs/plugin-react": "4.7.0",
87
- "@vitest/coverage-v8": "4.1.2",
87
+ "@vitest/coverage-v8": "4.1.5",
88
88
  "concurrently": "8.2.2",
89
89
  "cross-fetch": "4.1.0",
90
90
  "eslint": "8.57.1",
91
- "jsdom": "28.1.0",
91
+ "jsdom": "29.1.1",
92
92
  "nock": "13.5.6",
93
93
  "tailwindcss": "3.4.18",
94
94
  "vite": "7.3.2",
95
95
  "vite-plugin-svgr": "4.5.0",
96
- "vitest": "4.1.2"
96
+ "vitest": "4.1.5"
97
97
  },
98
98
  "nx": {
99
99
  "tags": [
@@ -101,14 +101,12 @@
101
101
  ]
102
102
  },
103
103
  "scripts": {
104
- "dev": "concurrently \"vite preview -l silent\" \"pnpm build:watch\" \"pnpm tailwind\"",
104
+ "dev": "concurrently --kill-others --names preview,build,tailwind \"vite preview -l silent\" \"pnpm build:watch\" \"pnpm tailwind\"",
105
105
  "build": "vite build && pnpm tailwind:base",
106
106
  "build:watch": "vite build --watch",
107
107
  "tailwind": "pnpm tailwind:base --watch ",
108
108
  "tailwind:base": "tailwindcss -i ./src/index.css -o ./umd/main.css --minify",
109
109
  "test": "vitest run",
110
- "test:ci": "pnpm test --coverage",
111
- "test:unit": "pnpm test:ci",
112
110
  "lint": "eslint src --ext .js --cache",
113
111
  "preship": "pnpm lint",
114
112
  "ship": "node ../../.github/scripts/release-apps.js"
@@ -15,7 +15,7 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
15
15
  .ghost-display {
16
16
  display: none;
17
17
  }
18
- `,l=this.context.stylesUrl;return l?te.jsxs(te.Fragment,{children:[te.jsx("link",{rel:"stylesheet",href:l}),te.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),te.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):te.jsxs(te.Fragment,{children:[te.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),te.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const s=id(),l={...s.frame.common};return te.jsx("div",{style:s.modalContainer,className:"gh-root-frame",children:te.jsxs(rd,{style:l,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[te.jsx("div",{onClick:i=>this.handlePopupClose(i),className:"absolute top-0 bottom-0 left-0 right-0 block backdrop-blur-[2px] animate-fadein z-0 bg-gradient-to-br from-[rgba(0,0,0,0.2)] to-[rgba(0,0,0,0.1)]"}),te.jsx(ld,{})]})})}render(){const{showPopup:s}=this.context;return s?this.renderFrameContainer():null}}var ve;function st(r,s,l){const i=typeof l,u=typeof r;if(i!=="undefined"){if(u!=="undefined"){if(l){if(u==="function"&&i===u)return function(v){return r(l(v))};if(s=r.constructor,s===l.constructor){if(s===Array)return l.concat(r);if(s===Map){var c=new Map(l);for(var d of r)c.set(d[0],d[1]);return c}if(s===Set){d=new Set(l);for(c of r.values())d.add(c);return d}}}return r}return l}return u==="undefined"?s:r}function Xe(){return Object.create(null)}function Rt(r){return typeof r=="string"}function Cr(r){return typeof r=="object"}function jd(r){const s=[];for(const l of r.keys())s.push(l);return s}function kr(r,s){if(Rt(s))r=r[s];else for(let l=0;r&&l<s.length;l++)r=r[s[l]];return r}function Ad(r){let s=0;for(let l=0,i;l<r.length;l++)(i=r[l])&&s<i.length&&(s=i.length);return s}const Od=/[^\p{L}\p{N}]+/u,Td=/(\d{3})/g,Nd=/(\D)(\d{3})/g,Rd=/(\d{3})(\D)/g,Da=/[\u0300-\u036f]/g;function Pr(r={}){if(!this||this.constructor!==Pr)return new Pr(...arguments);if(arguments.length)for(r=0;r<arguments.length;r++)this.assign(arguments[r]);else this.assign(r)}ve=Pr.prototype,ve.assign=function(r){this.normalize=st(r.normalize,!0,this.normalize);let s=r.include,l=s||r.exclude||r.split,i;if(l||l===""){if(typeof l=="object"&&l.constructor!==RegExp){let u="";i=!s,s||(u+="\\p{Z}"),l.letter&&(u+="\\p{L}"),l.number&&(u+="\\p{N}",i=!!s),l.symbol&&(u+="\\p{S}"),l.punctuation&&(u+="\\p{P}"),l.control&&(u+="\\p{C}"),(l=l.char)&&(u+=typeof l=="object"?l.join(""):l);try{this.split=new RegExp("["+(s?"^":"")+u+"]+","u")}catch{this.split=/\s+/}}else this.split=l,i=l===!1||2>"a1a".split(l).length;this.numeric=st(r.numeric,i)}else{try{this.split=st(this.split,Od)}catch{this.split=/\s+/}this.numeric=st(r.numeric,st(this.numeric,!0))}if(this.prepare=st(r.prepare,null,this.prepare),this.finalize=st(r.finalize,null,this.finalize),l=r.filter,this.filter=typeof l=="function"?l:st(l&&new Set(l),null,this.filter),this.dedupe=st(r.dedupe,!0,this.dedupe),this.matcher=st((l=r.matcher)&&new Map(l),null,this.matcher),this.mapper=st((l=r.mapper)&&new Map(l),null,this.mapper),this.stemmer=st((l=r.stemmer)&&new Map(l),null,this.stemmer),this.replacer=st(r.replacer,null,this.replacer),this.minlength=st(r.minlength,1,this.minlength),this.maxlength=st(r.maxlength,1024,this.maxlength),this.rtl=st(r.rtl,!1,this.rtl),(this.cache=l=st(r.cache,!0,this.cache))&&(this.H=null,this.S=typeof l=="number"?l:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const u of this.matcher.keys())this.h+=(this.h?"|":"")+u;if(this.stemmer)for(const u of this.stemmer.keys())this.A+=(this.A?"|":"")+u;return this},ve.addStemmer=function(r,s){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(r,s),this.A+=(this.A?"|":"")+r,this.N=null,this.cache&&En(this),this},ve.addFilter=function(r){return typeof r=="function"?this.filter=r:(this.filter||(this.filter=new Set),this.filter.add(r)),this.cache&&En(this),this},ve.addMapper=function(r,s){return typeof r=="object"?this.addReplacer(r,s):1<r.length?this.addMatcher(r,s):(this.mapper||(this.mapper=new Map),this.mapper.set(r,s),this.cache&&En(this),this)},ve.addMatcher=function(r,s){return typeof r=="object"?this.addReplacer(r,s):2>r.length&&(this.dedupe||this.mapper)?this.addMapper(r,s):(this.matcher||(this.matcher=new Map),this.matcher.set(r,s),this.h+=(this.h?"|":"")+r,this.M=null,this.cache&&En(this),this)},ve.addReplacer=function(r,s){return typeof r=="string"?this.addMatcher(r,s):(this.replacer||(this.replacer=[]),this.replacer.push(r,s),this.cache&&En(this),this)},ve.encode=function(r){if(this.cache&&r.length<=this.K)if(this.H){if(this.B.has(r))return this.B.get(r)}else this.H=setTimeout(En,50,this);this.normalize&&(typeof this.normalize=="function"?r=this.normalize(r):r=Da?r.normalize("NFKD").replace(Da,"").toLowerCase():r.toLowerCase()),this.prepare&&(r=this.prepare(r)),this.numeric&&3<r.length&&(r=r.replace(Nd,"$1 $2").replace(Rd,"$1 $2").replace(Td,"$1 "));const s=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let l=[],i=this.split||this.split===""?r.split(this.split):r;for(let c=0,d,v;c<i.length;c++)if((d=v=i[c])&&!(d.length<this.minlength||d.length>this.maxlength)){if(s)l.push(d);else if(!this.filter||(typeof this.filter=="function"?this.filter(d):!this.filter.has(d))){if(this.cache&&d.length<=this.L)if(this.H){var u=this.G.get(d);if(u||u===""){u&&l.push(u);continue}}else this.H=setTimeout(En,50,this);if(this.stemmer&&2<d.length&&(this.N||(this.N=new RegExp("(?!^)("+this.A+")$")),d=d.replace(this.N,g=>this.stemmer.get(g))),d&&(this.mapper||this.dedupe&&1<d.length)){u="";for(let g=0,C="",$,P;g<d.length;g++)$=d.charAt(g),$===C&&this.dedupe||((P=this.mapper&&this.mapper.get($))||P===""?P===C&&this.dedupe||!(C=P)||(u+=P):u+=C=$);d=u}if(this.matcher&&1<d.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),d=d.replace(this.M,g=>this.matcher.get(g))),d&&this.replacer)for(u=0;d&&u<this.replacer.length;u+=2)d=d.replace(this.replacer[u],this.replacer[u+1]);this.cache&&v.length<=this.L&&(this.G.set(v,d),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),d&&l.push(d)}}return this.finalize&&(l=this.finalize(l)||l),this.cache&&r.length<=this.K&&(this.B.set(r,l),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),l};function En(r){r.H=null,r.B.clear(),r.G.clear()}let Hn,Er;async function _d(r){r=r.data;var s=r.task;const l=r.id;let i=r.args;if(s==="init")Er=r.options||{},(s=r.factory)?(Function("return "+s)()(self),Hn=new self.FlexSearch.Index(Er),delete self.FlexSearch):Hn=new Mt(Er),postMessage({id:l});else{let u;s==="export"&&(i[1]?(i[0]=Er.export,i[2]=0,i[3]=1):i=null),s==="import"?i[0]&&(r=await Er.import.call(Hn,i[0]),Hn.import(i[0],r)):(u=i&&Hn[s].apply(Hn,i))&&u.then&&(u=await u),postMessage(s==="search"?{id:l,msg:u}:{id:l})}}function Bo(r){$r.call(r,"add"),$r.call(r,"append"),$r.call(r,"search"),$r.call(r,"update"),$r.call(r,"remove")}let qo,Ma,ws;function Ld(){qo=ws=0}function $r(r){this[r+"Async"]=function(){const s=arguments;var l=s[s.length-1];let i;if(typeof l=="function"&&(i=l,delete s[s.length-1]),qo?ws||(ws=Date.now()-Ma>=this.priority*this.priority*3):(qo=setTimeout(Ld,0),Ma=Date.now()),ws){const c=this;return new Promise(d=>{setTimeout(function(){d(c[r+"Async"].apply(c,s))},0)})}const u=this[r].apply(this,s);return l=u.then?u:new Promise(c=>c(u)),i&&l.then(i),l}}let Wn=0;function jr(r={}){function s(d){function v(g){g=g.data||g;const C=g.id,$=C&&u.h[C];$&&($(g.msg),delete u.h[C])}if(this.worker=d,this.h=Xe(),this.worker)return i?this.worker.on("message",v):this.worker.onmessage=v,r.config?new Promise(function(g){u.h[++Wn]=function(){g(u),1e9<Wn&&(Wn=0)},u.worker.postMessage({id:Wn,task:"init",factory:l,options:r})}):(this.worker.postMessage({task:"init",factory:l,options:r}),this.priority=r.priority||4,this)}if(!this||this.constructor!==jr)return new jr(r);let l=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;l&&(l=l.toString());const i=typeof window>"u",u=this,c=Fd(l,i,r.worker);return c.then?c.then(function(d){return s.call(u,d)}):s.call(this,c)}en("add"),en("append"),en("search"),en("update"),en("remove"),en("clear"),en("export"),en("import"),Bo(jr.prototype);function en(r){jr.prototype[r]=function(){const s=this,l=[].slice.call(arguments);var i=l[l.length-1];let u;return typeof i=="function"&&(u=i,l.pop()),i=new Promise(function(c){r==="export"&&typeof l[0]=="function"&&(l[0]=null),s.h[++Wn]=c,s.worker.postMessage({task:r,id:Wn,args:l})}),u?(i.then(u),this):i}}function Fd(r,s,l){return s?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>yu).then(function(i){return new i.Worker("undefined/node/node.mjs")}):r?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+_d.toString()],{type:"text/javascript"}))):new window.Worker(typeof l=="string"?l:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:No&&No.tagName.toUpperCase()==="SCRIPT"&&No.src||new URL("sodo-search.min.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}function Vo(r,s=0){let l=[],i=[];s&&(s=25e4/s*5e3|0);for(const u of r.entries())i.push(u),i.length===s&&(l.push(i),i=[]);return i.length&&l.push(i),l}function Ho(r,s){s||(s=new Map);for(let l=0,i;l<r.length;l++)i=r[l],s.set(i[0],i[1]);return s}function za(r,s=0){let l=[],i=[];s&&(s=25e4/s*1e3|0);for(const u of r.entries())i.push([u[0],Vo(u[1])[0]]),i.length===s&&(l.push(i),i=[]);return i.length&&l.push(i),l}function ba(r,s){s||(s=new Map);for(let l=0,i,u;l<r.length;l++)i=r[l],u=s.get(i[0]),s.set(i[0],Ho(i[1],u));return s}function Ua(r){let s=[],l=[];for(const i of r.keys())l.push(i),l.length===25e4&&(s.push(l),l=[]);return l.length&&s.push(l),s}function Ba(r,s){s||(s=new Set);for(let l=0;l<r.length;l++)s.add(r[l]);return s}function Ss(r,s,l,i,u,c,d=0){const v=i&&i.constructor===Array;var g=v?i.shift():i;if(!g)return this.export(r,s,u,c+1);if((g=r((s?s+".":"")+(d+1)+"."+l,JSON.stringify(g)))&&g.then){const C=this;return g.then(function(){return Ss.call(C,r,s,l,v?i:null,u,c,d+1)})}return Ss.call(this,r,s,l,v?i:null,u,c,d+1)}function qa(r,s){let l="";for(const i of r.entries()){r=i[0];const u=i[1];let c="";for(let d=0,v;d<u.length;d++){v=u[d]||[""];let g="";for(let C=0;C<v.length;C++)g+=(g?",":"")+(s==="string"?'"'+v[C]+'"':v[C]);g="["+g+"]",c+=(c?",":"")+g}c='["'+r+'",['+c+"]]",l+=(l?",":"")+c}return l}function Va(r,s,l,i){let u=[];for(let c=0,d;c<r.index.length;c++)if(d=r.index[c],s>=d.length)s-=d.length;else{s=d[i?"splice":"slice"](s,l);const v=s.length;if(v&&(u=u.length?u.concat(s):s,l-=v,i&&(r.length-=v),!l))break;s=0}return u}function $n(r){if(!this||this.constructor!==$n)return new $n(r);this.index=r?[r]:[],this.length=r?r.length:0;const s=this;return new Proxy([],{get(l,i){if(i==="length")return s.length;if(i==="push")return function(u){s.index[s.index.length-1].push(u),s.length++};if(i==="pop")return function(){if(s.length)return s.length--,s.index[s.index.length-1].pop()};if(i==="indexOf")return function(u){let c=0;for(let d=0,v,g;d<s.index.length;d++){if(v=s.index[d],g=v.indexOf(u),0<=g)return c+g;c+=v.length}return-1};if(i==="includes")return function(u){for(let c=0;c<s.index.length;c++)if(s.index[c].includes(u))return!0;return!1};if(i==="slice")return function(u,c){return Va(s,u||0,c||s.length,!1)};if(i==="splice")return function(u,c){return Va(s,u||0,c||s.length,!0)};if(i==="constructor")return Array;if(typeof i!="symbol")return(l=s.index[i/2**31|0])&&l[i]},set(l,i,u){return l=i/2**31|0,(s.index[l]||(s.index[l]=[]))[i]=u,s.length++,!0}})}$n.prototype.clear=function(){this.index.length=0},$n.prototype.destroy=function(){this.proxy=this.index=null},$n.prototype.push=function(){};function Dt(r=8){if(!this||this.constructor!==Dt)return new Dt(r);this.index=Xe(),this.h=[],this.size=0,32<r?(this.B=Wa,this.A=BigInt(r)):(this.B=Ha,this.A=r)}Dt.prototype.get=function(r){const s=this.index[this.B(r)];return s&&s.get(r)},Dt.prototype.set=function(r,s){var l=this.B(r);let i=this.index[l];i?(l=i.size,i.set(r,s),(l-=i.size)&&this.size++):(this.index[l]=i=new Map([[r,s]]),this.h.push(i),this.size++)};function _t(r=8){if(!this||this.constructor!==_t)return new _t(r);this.index=Xe(),this.h=[],this.size=0,32<r?(this.B=Wa,this.A=BigInt(r)):(this.B=Ha,this.A=r)}_t.prototype.add=function(r){var s=this.B(r);let l=this.index[s];l?(s=l.size,l.add(r),(s-=l.size)&&this.size++):(this.index[s]=l=new Set([r]),this.h.push(l),this.size++)},ve=Dt.prototype,ve.has=_t.prototype.has=function(r){const s=this.index[this.B(r)];return s&&s.has(r)},ve.delete=_t.prototype.delete=function(r){const s=this.index[this.B(r)];s&&s.delete(r)&&this.size--},ve.clear=_t.prototype.clear=function(){this.index=Xe(),this.h=[],this.size=0},ve.values=_t.prototype.values=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].values())yield s},ve.keys=_t.prototype.keys=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].keys())yield s},ve.entries=_t.prototype.entries=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].entries())yield s};function Ha(r){let s=2**this.A-1;if(typeof r=="number")return r&s;let l=0,i=this.A+1;for(let u=0;u<r.length;u++)l=(l*i^r.charCodeAt(u))&s;return this.A===32?l+2**31:l}function Wa(r){let s=BigInt(2)**this.A-BigInt(1);var l=typeof r;if(l==="bigint")return r&s;if(l==="number")return BigInt(r)&s;l=BigInt(0);let i=this.A+BigInt(1);for(let u=0;u<r.length;u++)l=(l*i^BigInt(r.charCodeAt(u)))&s;return l}jn.prototype.add=function(r,s,l){if(Cr(r)&&(s=r,r=kr(s,this.key)),s&&(r||r===0)){if(!l&&this.reg.has(r))return this.update(r,s);for(let v=0,g;v<this.field.length;v++){g=this.D[v];var i=this.index.get(this.field[v]);if(typeof g=="function"){var u=g(s);u&&i.add(r,u,!1,!0)}else u=g.I,(!u||u(s))&&(g.constructor===String?g=[""+g]:Rt(g)&&(g=[g]),Ko(s,g,this.J,0,i,r,g[0],l))}if(this.tag)for(i=0;i<this.F.length;i++){var c=this.F[i];u=this.tag.get(this.R[i]);let v=Xe();if(typeof c=="function"){if(c=c(s),!c)continue}else{var d=c.I;if(d&&!d(s))continue;c.constructor===String&&(c=""+c),c=kr(s,c)}if(u&&c){Rt(c)&&(c=[c]);for(let g=0,C,$;g<c.length;g++)if(C=c[g],!v[C]&&(v[C]=1,(d=u.get(C))?$=d:u.set(C,$=[]),!l||!$.includes(r))){if($.length===2**31-1){if(d=new $n($),this.fastupdate)for(let P of this.reg.values())P.includes($)&&(P[P.indexOf($)]=d);u.set(C,$=d)}$.push(r),this.fastupdate&&((d=this.reg.get(r))?d.push($):this.reg.set(r,[$]))}}}if(this.store&&(!l||!this.store.has(r))){let v;if(this.C){v=Xe();for(let g=0,C;g<this.C.length;g++){if(C=this.C[g],(l=C.I)&&!l(s))continue;let $;if(typeof C=="function"){if($=C(s),!$)continue;C=[C.V]}else if(Rt(C)||C.constructor===String){v[C]=s[C];continue}Wo(s,v,C,0,C[0],$)}}this.store.set(r,v||s)}this.worker&&(this.fastupdate||this.reg.add(r))}return this};function Wo(r,s,l,i,u,c){if(r=r[u],i===l.length-1)s[u]=c||r;else if(r)if(r.constructor===Array)for(s=s[u]=Array(r.length),u=0;u<r.length;u++)Wo(r,s,l,i,u);else s=s[u]||(s[u]=Xe()),u=l[++i],Wo(r,s,l,i,u)}function Ko(r,s,l,i,u,c,d,v){if(r=r[d])if(i===s.length-1){if(r.constructor===Array){if(l[i]){for(s=0;s<r.length;s++)u.add(c,r[s],!0,!0);return}r=r.join(" ")}u.add(c,r,v,!0)}else if(r.constructor===Array)for(d=0;d<r.length;d++)Ko(r,s,l,i,u,c,d,v);else d=s[++i],Ko(r,s,l,i,u,c,d,v);else u.db&&u.remove(c)}function Ka(r,s,l,i,u,c,d){const v=r.length;let g=[],C,$;C=Xe();for(let P=0,O,F,b,V;P<s;P++)for(let U=0;U<v;U++)if(b=r[U],P<b.length&&(O=b[P]))for(let J=0;J<O.length;J++){if(F=O[J],($=C[F])?C[F]++:($=0,C[F]=1),V=g[$]||(g[$]=[]),!d){let re=P+(U||!u?0:c||0);V=V[re]||(V[re]=[])}if(V.push(F),d&&l&&$===v-1&&V.length-i===l)return i?V.slice(i):V}if(r=g.length)if(u)g=1<g.length?Ga(g,l,i,d,c):(g=g[0]).length>l||i?g.slice(i,l+i):g;else{if(r<v)return[];if(g=g[r-1],l||i)if(d)(g.length>l||i)&&(g=g.slice(i,l+i));else{u=[];for(let P=0,O;P<g.length;P++)if(O=g[P],O.length>i)i-=O.length;else if((O.length>l||i)&&(O=O.slice(i,l+i),l-=O.length,i&&(i-=O.length)),u.push(O),!l)break;g=1<u.length?[].concat.apply([],u):u[0]}}return g}function Ga(r,s,l,i,u){const c=[],d=Xe();let v;var g=r.length;let C;if(i){for(u=g-1;0<=u;u--)if(C=(i=r[u])&&i.length){for(g=0;g<C;g++)if(v=i[g],!d[v]){if(d[v]=1,l)l--;else if(c.push(v),c.length===s)return c}}}else for(let $=g-1,P,O=0;0<=$;$--){P=r[$];for(let F=0;F<P.length;F++)if(C=(i=P[F])&&i.length){for(let b=0;b<C;b++)if(v=i[b],!d[v])if(d[v]=1,l)l--;else{let V=(F+($<g-1&&u||0))/($+1)|0;if((c[V]||(c[V]=[])).push(v),++O===s)return c}}}return c}function Id(r,s,l){const i=Xe(),u=[];for(let c=0,d;c<s.length;c++){d=s[c];for(let v=0;v<d.length;v++)i[d[v]]=1}if(l)for(let c=0,d;c<r.length;c++)d=r[c],i[d]&&(u.push(d),i[d]=0);else for(let c=0,d,v;c<r.result.length;c++)for(d=r.result[c],s=0;s<d.length;s++)v=d[s],i[v]&&((u[c]||(u[c]=[])).push(v),i[v]=0);return u}function Go(r,s,l,i){if(!r.length)return r;if(r.length===1)return r=r[0],r=l||r.length>s?s?r.slice(l,l+s):r.slice(l):r,i?tn.call(this,r):r;let u=[];for(let c=0,d,v;c<r.length;c++)if((d=r[c])&&(v=d.length)){if(l){if(l>=v){l-=v;continue}l<v&&(d=s?d.slice(l,l+s):d.slice(l),v=d.length,l=0)}if(v>s&&(d=d.slice(0,s),v=s),!u.length&&v>=s)return i?tn.call(this,d):d;if(u.push(d),s-=v,!s)break}return u=1<u.length?[].concat.apply([],u):u[0],i?tn.call(this,u):u}function xs(r,s,l){var i=l[0];if(i.then)return Promise.all(l).then(function($){return r[s].apply(r,$)});if(i[0]&&i[0].index)return r[s].apply(r,i);i=[];let u=[],c=0,d=0,v,g,C;for(let $=0,P;$<l.length;$++)if(P=l[$]){let O;if(P.constructor===We)O=P.result;else if(P.constructor===Array)O=P;else if(c=P.limit||0,d=P.offset||0,C=P.suggest,g=P.resolve,v=P.enrich&&g,P.index)P.resolve=!1,O=P.index.search(P).result,P.resolve=g;else if(P.and)O=r.and(P.and);else if(P.or)O=r.or(P.or);else if(P.xor)O=r.xor(P.xor);else if(P.not)O=r.not(P.not);else continue;if(O.then)u.push(O);else if(O.length)i[$]=O;else if(!C&&(s==="and"||s==="xor")){i=[];break}}return{O:i,P:u,limit:c,offset:d,enrich:v,resolve:g,suggest:C}}We.prototype.or=function(){const{O:r,P:s,limit:l,offset:i,enrich:u,resolve:c}=xs(this,"or",arguments);return Ja.call(this,r,s,l,i,u,c)};function Ja(r,s,l,i,u,c){if(s.length){const d=this;return Promise.all(s).then(function(v){r=[];for(let g=0,C;g<v.length;g++)(C=v[g]).length&&(r[g]=C);return Ja.call(d,r,[],l,i,u,c)})}return r.length&&(this.result.length&&r.push(this.result),2>r.length?this.result=r[0]:(this.result=Ga(r,l,i,!1,this.h),i=0)),c?this.resolve(l,i,u):this}We.prototype.and=function(){let r=this.result.length,s,l,i,u;if(!r){const c=arguments[0];c&&(r=!!c.suggest,u=c.resolve,s=c.limit,l=c.offset,i=c.enrich&&u)}if(r){const{O:c,P:d,limit:v,offset:g,enrich:C,resolve:$,suggest:P}=xs(this,"and",arguments);return Qa.call(this,c,d,v,g,C,$,P)}return u?this.resolve(s,l,i):this};function Qa(r,s,l,i,u,c,d){if(s.length){const v=this;return Promise.all(s).then(function(g){r=[];for(let C=0,$;C<g.length;C++)($=g[C]).length&&(r[C]=$);return Qa.call(v,r,[],l,i,u,c,d)})}if(r.length)if(this.result.length&&r.unshift(this.result),2>r.length)this.result=r[0];else{if(s=Ad(r))return this.result=Ka(r,s,l,i,d,this.h,c),c?u?tn.call(this.index,this.result):this.result:this;this.result=[]}else d||(this.result=r);return c?this.resolve(l,i,u):this}We.prototype.xor=function(){const{O:r,P:s,limit:l,offset:i,enrich:u,resolve:c,suggest:d}=xs(this,"xor",arguments);return Ya.call(this,r,s,l,i,u,c,d)};function Ya(r,s,l,i,u,c,d){if(s.length){const v=this;return Promise.all(s).then(function(g){r=[];for(let C=0,$;C<g.length;C++)($=g[C]).length&&(r[C]=$);return Ya.call(v,r,[],l,i,u,c,d)})}if(r.length)if(this.result.length&&r.unshift(this.result),2>r.length)this.result=r[0];else return this.result=Dd.call(this,r,l,i,c,this.h),c?u?tn.call(this.index,this.result):this.result:this;else d||(this.result=r);return c?this.resolve(l,i,u):this}function Dd(r,s,l,i,u){const c=[],d=Xe();let v=0;for(let g=0,C;g<r.length;g++)if(C=r[g]){v<C.length&&(v=C.length);for(let $=0,P;$<C.length;$++)if(P=C[$])for(let O=0,F;O<P.length;O++)F=P[O],d[F]=d[F]?2:1}for(let g=0,C,$=0;g<v;g++)for(let P=0,O;P<r.length;P++)if((O=r[P])&&(C=O[g])){for(let F=0,b;F<C.length;F++)if(b=C[F],d[b]===1)if(l)l--;else if(i){if(c.push(b),c.length===s)return c}else{const V=g+(P?u:0);if(c[V]||(c[V]=[]),c[V].push(b),++$===s)return c}}return c}We.prototype.not=function(){const{O:r,P:s,limit:l,offset:i,enrich:u,resolve:c,suggest:d}=xs(this,"not",arguments);return Xa.call(this,r,s,l,i,u,c,d)};function Xa(r,s,l,i,u,c,d){if(s.length){const v=this;return Promise.all(s).then(function(g){r=[];for(let C=0,$;C<g.length;C++)($=g[C]).length&&(r[C]=$);return Xa.call(v,r,[],l,i,u,c,d)})}if(r.length&&this.result.length)this.result=Md.call(this,r,l,i,c);else if(c)return this.resolve(l,i,u);return c?u?tn.call(this.index,this.result):this.result:this}function Md(r,s,l,i){const u=[];r=new Set(r.flat().flat());for(let c=0,d,v=0;c<this.result.length;c++)if(d=this.result[c]){for(let g=0,C;g<d.length;g++)if(C=d[g],!r.has(C)){if(l)l--;else if(i){if(u.push(C),u.length===s)return u}else if(u[c]||(u[c]=[]),u[c].push(C),++v===s)return u}}return u}function We(r){if(!this||this.constructor!==We)return new We(r);if(r&&r.index)return r.resolve=!1,this.index=r.index,this.h=r.boost||0,this.result=r.index.search(r).result,this;this.index=null,this.result=r||[],this.h=0}We.prototype.limit=function(r){if(this.result.length){const s=[];for(let l=0,i;l<this.result.length;l++)if(i=this.result[l])if(i.length<=r){if(s[l]=i,r-=i.length,!r)break}else{s[l]=i.slice(0,r);break}this.result=s}return this},We.prototype.offset=function(r){if(this.result.length){const s=[];for(let l=0,i;l<this.result.length;l++)(i=this.result[l])&&(i.length<=r?r-=i.length:(s[l]=i.slice(r),r=0));this.result=s}return this},We.prototype.boost=function(r){return this.h+=r,this},We.prototype.resolve=function(r,s,l){const i=this.result,u=this.index;return this.result=this.index=null,i.length?(typeof r=="object"&&(l=r.enrich,s=r.offset,r=r.limit),Go.call(u,i,r||100,s,l)):i},jn.prototype.search=function(r,s,l,i){l||(!s&&Cr(r)?(l=r,r=""):Cr(s)&&(l=s,s=0));let u=[];var c=[],d;let v,g,C,$=0;var P=!0;let O;if(l){l.constructor===Array&&(l={index:l}),r=l.query||r;var F=l.pluck;v=l.merge,g=F||l.field||(g=l.index)&&(g.index?null:g),C=this.tag&&l.tag;var b=l.suggest;P=l.resolve!==!1,P||F||!(g=g||this.field)||(Rt(g)?F=g:(g.constructor===Array&&g.length===1&&(g=g[0]),F=g.field||g.index)),O=(d=this.store&&l.enrich&&P)&&l.highlight,s=l.limit||s;var V=l.offset||0;if(s||(s=100),C&&(!this.db||!i)){C.constructor!==Array&&(C=[C]);var U=[];for(let ge=0,ne;ge<C.length;ge++)if(ne=C[ge],ne.field&&ne.tag){var J=ne.tag;if(J.constructor===Array)for(var re=0;re<J.length;re++)U.push(ne.field,J[re]);else U.push(ne.field,J)}else{J=Object.keys(ne);for(let me=0,ie,fe;me<J.length;me++)if(ie=J[me],fe=ne[ie],fe.constructor===Array)for(re=0;re<fe.length;re++)U.push(ie,fe[re]);else U.push(ie,fe)}if(C=U,!r){if(P=[],U.length)for(c=0;c<U.length;c+=2){if(this.db){if(F=this.index.get(U[c]),!F)continue;P.push(F=F.db.tag(U[c+1],s,V,d))}else F=zd.call(this,U[c],U[c+1],s,V,d);u.push({field:U[c],tag:U[c+1],result:F})}return P.length?Promise.all(P).then(function(ge){for(let ne=0;ne<ge.length;ne++)u[ne].result=ge[ne];return u}):u}}g&&g.constructor!==Array&&(g=[g])}g||(g=this.field),U=!i&&(this.worker||this.db)&&[];let we;for(let ge=0,ne,me,ie;ge<g.length;ge++){if(me=g[ge],this.db&&this.tag&&!this.D[ge])continue;let fe;if(Rt(me)||(fe=me,me=fe.field,r=fe.query||r,s=fe.limit||s,V=fe.offset||V,b=fe.suggest||b,d=this.store&&(fe.enrich||d)),i)ne=i[ge];else if(J=fe||l,re=this.index.get(me),C&&(this.db&&(J.tag=C,we=re.db.support_tag_search,J.field=g),we||(J.enrich=!1)),U){U[ge]=re.search(r,s,J),J&&d&&(J.enrich=d);continue}else ne=re.search(r,s,J),J&&d&&(J.enrich=d);if(ie=ne&&(P?ne.length:ne.result.length),C&&ie){if(J=[],re=0,this.db&&i){if(!we)for(let Ee=g.length;Ee<i.length;Ee++){let L=i[Ee];if(L&&L.length)re++,J.push(L);else if(!b)return P?u:new We(u)}}else for(let Ee=0,L,z;Ee<C.length;Ee+=2){if(L=this.tag.get(C[Ee]),!L){if(b)continue;return P?u:new We(u)}if(z=(L=L&&L.get(C[Ee+1]))&&L.length)re++,J.push(L);else if(!b)return P?u:new We(u)}if(re){if(ne=Id(ne,J,P),ie=ne.length,!ie&&!b)return P?ne:new We(ne);re--}}if(ie)c[$]=me,u.push(ne),$++;else if(g.length===1)return P?u:new We(u)}if(U){if(this.db&&C&&C.length&&!we)for(d=0;d<C.length;d+=2){if(c=this.index.get(C[d]),!c){if(b)continue;return P?u:new We(u)}U.push(c.db.tag(C[d+1],s,V,!1))}const ge=this;return Promise.all(U).then(function(ne){return ne.length?ge.search(r,s,l,ne):ne})}if(!$)return P?u:new We(u);if(F&&(!d||!this.store))return u[0];for(U=[],V=0;V<c.length;V++){if(b=u[V],d&&b.length&&typeof b[0].doc>"u"&&(this.db?U.push(b=this.index.get(this.field[0]).db.enrich(b)):b=tn.call(this,b)),F)return P?b:new We(b);u[V]={field:c[V],result:b}}if(d&&this.db&&U.length){const ge=this;return Promise.all(U).then(function(ne){for(let me=0;me<ne.length;me++)u[me].result=ne[me];return v?eu(u):O?Za(u,r,ge.index,ge.field,ge.D,O):u})}return v?eu(u):O?Za(u,r,this.index,this.field,this.D,O):u};function Za(r,s,l,i,u,c){let d,v,g;for(let C=0,$,P,O,F;C<r.length;C++){if($=r[C].field,!$)continue;let b=r[C].result;O=l.get($),P=O.encoder,g=O.tokenize,F=u[i.indexOf($)],P!==d&&(d=P,v=d.encode(s));for(let V=0;V<b.length;V++){let U="",J=kr(b[V].doc,F).split(/\s+/);for(let re=0,we,ge;re<J.length;re++){we=J[re],ge=P.encode(we),ge=1<ge.length?ge.join(" "):ge[0];let ne;if(ge&&we)for(let me=0,ie;me<v.length;me++)if(ie=v[me],g==="strict"){if(ge===ie){U+=(U?" ":"")+c.replace("$1",we),ne=!0;break}}else{const fe=ge.indexOf(ie);if(-1<fe){U+=(U?" ":"")+we.substring(0,fe)+c.replace("$1",we.substring(fe,ie.length))+we.substring(fe+ie.length),ne=!0;break}}ne||(U+=(U?" ":"")+J[re])}b[V].highlight=U}}return r}function eu(r){const s=[],l=Xe();for(let i=0,u,c;i<r.length;i++){u=r[i],c=u.result;for(let d=0,v,g,C;d<c.length;d++)g=c[d],typeof g!="object"&&(g={id:g}),v=g.id,(C=l[v])?C.push(u.field):(g.field=l[v]=[u.field],s.push(g))}return s}function zd(r,s,l,i,u){if(r=this.tag.get(r),!r)return[];if((s=(r=r&&r.get(s))&&r.length-i)&&0<s)return(s>l||i)&&(r=r.slice(i,i+l)),u&&(r=tn.call(this,r)),r}function tn(r){if(!this||!this.store)return r;const s=Array(r.length);for(let l=0,i;l<r.length;l++)i=r[l],s[l]={id:i,doc:this.store.get(i)};return s}function jn(r){if(!this||this.constructor!==jn)return new jn(r);const s=r.document||r.doc||r;let l,i;if(this.D=[],this.field=[],this.J=[],this.key=(l=s.key||s.id)&&Cs(l,this.J)||"id",(i=r.keystore||0)&&(this.keystore=i),this.fastupdate=!!r.fastupdate,this.reg=!this.fastupdate||r.worker||r.db?i?new _t(i):new Set:i?new Dt(i):new Map,this.C=(l=s.store||null)&&l&&l!==!0&&[],this.store=l&&(i?new Dt(i):new Map),this.cache=(l=r.cache||null)&&new An(l),r.cache=!1,this.worker=r.worker,this.priority=r.priority||4,this.index=bd.call(this,r,s),this.tag=null,(l=s.tag)&&(typeof l=="string"&&(l=[l]),l.length)){this.tag=new Map,this.F=[],this.R=[];for(let u=0,c,d;u<l.length;u++){if(c=l[u],d=c.field||c,!d)throw Error("The tag field from the document descriptor is undefined.");c.custom?this.F[u]=c.custom:(this.F[u]=Cs(d,this.J),c.filter&&(typeof this.F[u]=="string"&&(this.F[u]=new String(this.F[u])),this.F[u].I=c.filter)),this.R[u]=d,this.tag.set(d,new Map)}}if(this.worker){this.fastupdate=!1,r=[];for(const u of this.index.values())u.then&&r.push(u);if(r.length){const u=this;return Promise.all(r).then(function(c){let d=0;for(const v of u.index.entries()){const g=v[0];v[1].then&&u.index.set(g,c[d++])}return u})}}else r.db&&(this.fastupdate=!1,this.mount(r.db))}ve=jn.prototype,ve.mount=function(r){let s=this.field;if(this.tag)for(let u=0,c;u<this.R.length;u++){c=this.R[u];var l=void 0;this.index.set(c,l=new Mt({},this.reg)),s===this.field&&(s=s.slice(0)),s.push(c),l.tag=this.tag.get(c)}l=[];const i={db:r.db,type:r.type,fastupdate:r.fastupdate};for(let u=0,c,d;u<s.length;u++){i.field=d=s[u],c=this.index.get(d);const v=new r.constructor(r.id,i);v.id=r.id,l[u]=v.mount(c),c.document=!0,u?c.bypass=!0:c.store=this.store}return this.db=!0,Promise.all(l)},ve.commit=async function(r,s){const l=[];for(const i of this.index.values())l.push(i.commit(r,s));await Promise.all(l),this.reg.clear()},ve.destroy=function(){const r=[];for(const s of this.index.values())r.push(s.destroy());return Promise.all(r)};function bd(r,s){const l=new Map;let i=s.index||s.field||s;Rt(i)&&(i=[i]);for(let u=0,c,d;u<i.length;u++){if(c=i[u],Rt(c)||(d=c,c=c.field),d=Cr(d)?Object.assign({},r,d):r,this.worker){const v=new jr(d);l.set(c,v)}this.worker||l.set(c,new Mt(d,this.reg)),d.custom?this.D[u]=d.custom:(this.D[u]=Cs(c,this.J),d.filter&&(typeof this.D[u]=="string"&&(this.D[u]=new String(this.D[u])),this.D[u].I=d.filter)),this.field[u]=c}if(this.C){r=s.store,Rt(r)&&(r=[r]);for(let u=0,c,d;u<r.length;u++)c=r[u],d=c.field||c,c.custom?(this.C[u]=c.custom,c.custom.V=d):(this.C[u]=Cs(d,this.J),c.filter&&(typeof this.C[u]=="string"&&(this.C[u]=new String(this.C[u])),this.C[u].I=c.filter))}return l}function Cs(r,s){const l=r.split(":");let i=0;for(let u=0;u<l.length;u++)r=l[u],r[r.length-1]==="]"&&(r=r.substring(0,r.length-2))&&(s[i]=!0),r&&(l[i++]=r);return i<l.length&&(l.length=i),1<i?l:l[0]}ve.append=function(r,s){return this.add(r,s,!0)},ve.update=function(r,s){return this.remove(r).add(r,s)},ve.remove=function(r){Cr(r)&&(r=kr(r,this.key));for(var s of this.index.values())s.remove(r,!0);if(this.reg.has(r)){if(this.tag&&!this.fastupdate)for(let l of this.tag.values())for(let i of l){s=i[0];const u=i[1],c=u.indexOf(r);-1<c&&(1<u.length?u.splice(c,1):l.delete(s))}this.store&&this.store.delete(r),this.reg.delete(r)}return this.cache&&this.cache.remove(r),this},ve.clear=function(){const r=[];for(const s of this.index.values()){const l=s.clear();l.then&&r.push(l)}if(this.tag)for(const s of this.tag.values())s.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),r.length?Promise.all(r):this},ve.contain=function(r){return this.db?this.index.get(this.field[0]).db.has(r):this.reg.has(r)},ve.cleanup=function(){for(const r of this.index.values())r.cleanup();return this},ve.get=function(r){return this.db?this.index.get(this.field[0]).db.enrich(r).then(function(s){return s[0]&&s[0].doc||null}):this.store.get(r)||null},ve.set=function(r,s){return typeof r=="object"&&(s=r,r=kr(s,this.key)),this.store.set(r,s),this},ve.searchCache=tu,ve.export=function(r,s,l=0,i=0){if(l<this.field.length){const d=this.field[l];if((s=this.index.get(d).export(r,d,l,i=1))&&s.then){const v=this;return s.then(function(){return v.export(r,d,l+1)})}return this.export(r,d,l+1)}let u,c;switch(i){case 0:u="reg",c=Ua(this.reg),s=null;break;case 1:u="tag",c=this.tag&&za(this.tag,this.reg.size),s=null;break;case 2:u="doc",c=this.store&&Vo(this.store),s=null;break;default:return}return Ss.call(this,r,s,u,c,l,i)},ve.import=function(r,s){var l=r.split(".");l[l.length-1]==="json"&&l.pop();const i=2<l.length?l[0]:"";if(l=2<l.length?l[2]:l[1],this.worker&&i)return this.index.get(i).import(r);if(s){if(typeof s=="string"&&(s=JSON.parse(s)),i)return this.index.get(i).import(l,s);switch(l){case"reg":this.fastupdate=!1,this.reg=Ba(s,this.reg);for(let u=0,c;u<this.field.length;u++)c=this.index.get(this.field[u]),c.fastupdate=!1,c.reg=this.reg;if(this.worker){s=[];for(const u of this.index.values())s.push(u.import(r));return Promise.all(s)}break;case"tag":this.tag=ba(s,this.tag);break;case"doc":this.store=Ho(s,this.store)}}},Bo(jn.prototype);function tu(r,s,l){r=(typeof r=="object"?""+r.query:r).toLowerCase(),this.cache||(this.cache=new An);let i=this.cache.get(r);if(!i){if(i=this.search(r,s,l),i.then){const u=this;i.then(function(c){return u.cache.set(r,c),c})}this.cache.set(r,i)}return i}function An(r){this.limit=r&&r!==!0?r:1e3,this.cache=new Map,this.h=""}An.prototype.set=function(r,s){this.cache.set(this.h=r,s),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},An.prototype.get=function(r){const s=this.cache.get(r);return s&&this.h!==r&&(this.cache.delete(r),this.cache.set(this.h=r,s)),s},An.prototype.remove=function(r){for(const s of this.cache){const l=s[0];s[1].includes(r)&&this.cache.delete(l)}},An.prototype.clear=function(){this.cache.clear(),this.h=""};const nu={normalize:!1,numeric:!1,dedupe:!1},ks={},Jo=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),ru=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),su=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ou={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,ß:2,d:3,t:3,l:4,m:5,n:5,r:6};var iu={Exact:nu,Default:ks,Normalize:ks,LatinBalance:{mapper:Jo},LatinAdvanced:{mapper:Jo,matcher:ru,replacer:su},LatinExtra:{mapper:Jo,replacer:su.concat([/(?!^)[aeo]/g,""]),matcher:ru},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(r){for(let l=0;l<r.length;l++){var s=r[l];let i=s.charAt(0),u=ou[i];for(let c=1,d;c<s.length&&(d=s.charAt(c),d==="h"||d==="w"||!(d=ou[d])||d===u||(i+=d,u=d,i.length!==4));c++);r[l]=i}}},CJK:{split:""},LatinExact:nu,LatinDefault:ks,LatinSimple:ks};Mt.prototype.remove=function(r,s){const l=this.reg.size&&(this.fastupdate?this.reg.get(r):this.reg.has(r));if(l){if(this.fastupdate){for(let i=0,u;i<l.length;i++)if(u=l[i])if(2>u.length)u.pop();else{const c=u.indexOf(r);c===l.length-1?u.pop():u.splice(c,1)}}else Ar(this.map,r),this.depth&&Ar(this.ctx,r);s||this.reg.delete(r)}return this.db&&(this.commit_task.push({del:r}),this.T&&cu(this)),this.cache&&this.cache.remove(r),this};function Ar(r,s){let l=0;var i=typeof s>"u";if(r.constructor===Array){for(let u=0,c,d;u<r.length;u++)if((c=r[u])&&c.length)if(i)l++;else if(d=c.indexOf(s),0<=d){1<c.length?(c.splice(d,1),l++):delete r[u];break}else l++}else for(let u of r.entries()){i=u[0];const c=Ar(u[1],s);c?l+=c:r.delete(i)}return l}const Ud={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};Mt.prototype.add=function(r,s,l,i){if(s&&(r||r===0)){if(!i&&!l&&this.reg.has(r))return this.update(r,s);if(s=this.encoder.encode(s),i=s.length){const C=Xe(),$=Xe(),P=this.depth,O=this.resolution;for(let F=0;F<i;F++){let b=s[this.rtl?i-1-F:F];var u=b.length;if(u&&(P||!$[b])){var c=this.score?this.score(s,b,F,null,0):Ps(O,i,F),d="";switch(this.tokenize){case"full":if(2<u){for(let V=0,U;V<u;V++)for(c=u;c>V;c--){d=b.substring(V,c),U=this.rtl?u-1-V:V;var v=this.score?this.score(s,b,F,d,U):Ps(O,i,F,u,U);Or(this,$,d,v,r,l)}break}case"bidirectional":case"reverse":if(1<u){for(v=u-1;0<v;v--){d=b[this.rtl?u-1-v:v]+d;var g=this.score?this.score(s,b,F,d,v):Ps(O,i,F,u,v);Or(this,$,d,g,r,l)}d=""}case"forward":if(1<u){for(v=0;v<u;v++)d+=b[this.rtl?u-1-v:v],Or(this,$,d,c,r,l);break}default:if(Or(this,$,b,c,r,l),P&&1<i&&F<i-1){for(u=Xe(),d=this.U,c=b,v=Math.min(P+1,this.rtl?F+1:i-F),u[c]=1,g=1;g<v;g++)if((b=s[this.rtl?i-1-F-g:F+g])&&!u[b]){u[b]=1;const V=this.score?this.score(s,c,F,b,g-1):Ps(d+(i/2>d?0:1),i,F,v-1,g-1),U=this.bidirectional&&b>c;Or(this,C,U?c:b,V,r,l,U?b:c)}}}}}this.fastupdate||this.reg.add(r)}else s=""}return this.db&&(s||this.commit_task.push({del:r}),this.T&&cu(this)),this};function Or(r,s,l,i,u,c,d){let v=d?r.ctx:r.map,g;if((!s[l]||d&&!(g=s[l])[d])&&(d?(s=g||(s[l]=Xe()),s[d]=1,(g=v.get(d))?v=g:v.set(d,v=new Map)):s[l]=1,(g=v.get(l))?v=g:v.set(l,v=g=[]),v=v[i]||(v[i]=[]),!c||!v.includes(u))){if(v.length===2**31-1){if(s=new $n(v),r.fastupdate)for(let C of r.reg.values())C.includes(v)&&(C[C.indexOf(v)]=s);g[i]=v=s}v.push(u),r.fastupdate&&((i=r.reg.get(u))?i.push(v):r.reg.set(u,[v]))}}function Ps(r,s,l,i,u){return l&&1<r?s+(i||0)<=r?l+(u||0):(r-1)/(s+(i||0))*(l+(u||0))+1|0:0}Mt.prototype.search=function(r,s,l){l||(s||typeof r!="object"?typeof s=="object"&&(l=s,s=0):(l=r,r=""));let i=[],u,c,d,v=0,g,C,$,P,O;l?(r=l.query||r,s=l.limit||s,v=l.offset||0,c=l.context,d=l.suggest,O=(g=l.resolve!==!1)&&l.enrich,$=l.boost,P=l.resolution,C=this.db&&l.tag):g=this.resolve;let F=this.encoder.encode(r);if(u=F.length,s=s||(g?100:0),u===1)return au.call(this,F[0],"",s,v,g,O,C);if(c=this.depth&&c!==!1,u===2&&c&&!d)return au.call(this,F[1],F[0],s,v,g,O,C);let b=Xe(),V=0,U;if(c&&(U=F[0],V=1),P||P===0||(P=U?this.U:this.resolution),this.db){if(this.db.search&&(r=this.db.search(this,F,s,v,d,g,O,C),r!==!1))return r;const J=this;return(async function(){for(let re,we;V<u;V++){if((we=F[V])&&!b[we]){if(b[we]=1,re=await Qo(J,we,U,0,0,!1,!1),re=uu(re,i,d,P)){i=re;break}U&&(d&&re&&i.length||(U=we))}d&&U&&V===u-1&&!i.length&&(P=J.resolution,U="",V=-1,b=Xe())}return lu(i,P,s,v,d,$,g)})()}for(let J,re;V<u;V++){if((re=F[V])&&!b[re]){if(b[re]=1,J=Qo(this,re,U,0,0,!1,!1),J=uu(J,i,d,P)){i=J;break}U&&(d&&J&&i.length||(U=re))}d&&U&&V===u-1&&!i.length&&(P=this.resolution,U="",V=-1,b=Xe())}return lu(i,P,s,v,d,$,g)};function lu(r,s,l,i,u,c,d){let v=r.length,g=r;if(1<v)g=Ka(r,s,l,i,u,c,d);else if(v===1)return d?Go.call(null,r[0],l,i):new We(r[0]);return d?g:new We(g)}function au(r,s,l,i,u,c,d){return r=Qo(this,r,s,l,i,u,c,d),this.db?r.then(function(v){return u?v||[]:new We(v)}):r&&r.length?u?Go.call(this,r,l,i):new We(r):u?[]:new We}function uu(r,s,l,i){let u=[];if(r&&r.length){if(r.length<=i){s.push(r);return}for(let c=0,d;c<i;c++)(d=r[c])&&(u[c]=d);if(u.length){s.push(u);return}}if(!l)return u}function Qo(r,s,l,i,u,c,d,v){let g;return l&&(g=r.bidirectional&&s>l)&&(g=l,l=s,s=g),r.db?r.db.get(s,l,i,u,c,d,v):(r=l?(r=r.ctx.get(l))&&r.get(s):r.map.get(s),r)}function Mt(r,s){if(!this||this.constructor!==Mt)return new Mt(r);if(r){var l=Rt(r)?r:r.preset;l&&(r=Object.assign({},Ud[l],r))}else r={};l=r.context;const i=l===!0?{depth:1}:l||{},u=Rt(r.encoder)?iu[r.encoder]:r.encode||r.encoder||{};this.encoder=u.encode?u:typeof u=="object"?new Pr(u):{encode:u},this.resolution=r.resolution||9,this.tokenize=l=(l=r.tokenize)&&l!=="default"&&l!=="exact"&&l||"strict",this.depth=l==="strict"&&i.depth||0,this.bidirectional=i.bidirectional!==!1,this.fastupdate=!!r.fastupdate,this.score=r.score||null,(l=r.keystore||0)&&(this.keystore=l),this.map=l?new Dt(l):new Map,this.ctx=l?new Dt(l):new Map,this.reg=s||(this.fastupdate?l?new Dt(l):new Map:l?new _t(l):new Set),this.U=i.resolution||3,this.rtl=u.rtl||r.rtl||!1,this.cache=(l=r.cache||null)&&new An(l),this.resolve=r.resolve!==!1,(l=r.db)&&(this.db=this.mount(l)),this.T=r.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=r.priority||4}ve=Mt.prototype,ve.mount=function(r){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),r.mount(this)},ve.commit=function(r,s){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,r,s)},ve.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function cu(r){r.commit_timer||(r.commit_timer=setTimeout(function(){r.commit_timer=null,r.db.commit(r,void 0,void 0)},1))}ve.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db&&(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[{clear:!0}]),this},ve.append=function(r,s){return this.add(r,s,!0)},ve.contain=function(r){return this.db?this.db.has(r):this.reg.has(r)},ve.update=function(r,s){const l=this,i=this.remove(r);return i&&i.then?i.then(()=>l.add(r,s)):this.add(r,s)},ve.cleanup=function(){return this.fastupdate?(Ar(this.map),this.depth&&Ar(this.ctx),this):this},ve.searchCache=tu,ve.export=function(r,s,l=0,i=0){let u,c;switch(i){case 0:u="reg",c=Ua(this.reg);break;case 1:u="cfg",c=null;break;case 2:u="map",c=Vo(this.map,this.reg.size);break;case 3:u="ctx",c=za(this.ctx,this.reg.size);break;default:return}return Ss.call(this,r,s,u,c,l,i)},ve.import=function(r,s){if(s)switch(typeof s=="string"&&(s=JSON.parse(s)),r=r.split("."),r[r.length-1]==="json"&&r.pop(),r.length===3&&r.shift(),r=1<r.length?r[1]:r[0],r){case"reg":this.fastupdate=!1,this.reg=Ba(s,this.reg);break;case"map":this.map=Ho(s,this.map);break;case"ctx":this.ctx=ba(s,this.ctx)}},ve.serialize=function(r=!0){let s="",l="",i="";if(this.reg.size){let c;for(var u of this.reg.keys())c||(c=typeof u),s+=(s?",":"")+(c==="string"?'"'+u+'"':u);s="index.reg=new Set(["+s+"]);",l=qa(this.map,c),l="index.map=new Map(["+l+"]);";for(const d of this.ctx.entries()){u=d[0];let v=qa(d[1],c);v="new Map(["+v+"])",v='["'+u+'",'+v+"]",i+=(i?",":"")+v}i="index.ctx=new Map(["+i+"]);"}return r?"function inject(index){"+s+l+i+"}":s+l+i},Bo(Mt.prototype);const fu=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Es=["map","ctx","tag","reg","cfg"],On=Xe();function hu(r,s={}){if(!this)return new hu(r,s);typeof r=="object"&&(s=r,r=r.name),r||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(r?":"+r.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=s.field?s.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=s.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}ve=hu.prototype,ve.mount=function(r){return r.encoder?(r.db=this,this.open()):r.mount(this)},ve.open=function(){if(this.db)return this.db;let r=this;navigator.storage&&navigator.storage.persist(),On[r.id]||(On[r.id]=[]),On[r.id].push(r.field);const s=fu.open(r.id,1);return s.onupgradeneeded=function(){const l=r.db=this.result;for(let i=0,u;i<Es.length;i++){u=Es[i];for(let c=0,d;c<On[r.id].length;c++)d=On[r.id][c],l.objectStoreNames.contains(u+(u!=="reg"&&d?":"+d:""))||l.createObjectStore(u+(u!=="reg"&&d?":"+d:""))}},r.db=nn(s,function(l){r.db=l,r.db.onversionchange=function(){r.close()}})},ve.close=function(){this.db&&this.db.close(),this.db=null},ve.destroy=function(){const r=fu.deleteDatabase(this.id);return nn(r)},ve.clear=function(){const r=[];for(let l=0,i;l<Es.length;l++){i=Es[l];for(let u=0,c;u<On[this.id].length;u++)c=On[this.id][u],r.push(i+(i!=="reg"&&c?":"+c:""))}const s=this.db.transaction(r,"readwrite");for(let l=0;l<r.length;l++)s.objectStore(r[l]).clear();return nn(s)},ve.get=function(r,s,l=0,i=0,u=!0,c=!1){r=this.db.transaction((s?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((s?"ctx":"map")+(this.field?":"+this.field:"")).get(s?s+":"+r:r);const d=this;return nn(r).then(function(v){let g=[];if(!v||!v.length)return g;if(u){if(!l&&!i&&v.length===1)return v[0];for(let C=0,$;C<v.length;C++)if(($=v[C])&&$.length){if(i>=$.length){i-=$.length;continue}const P=l?i+Math.min($.length-i,l):$.length;for(let O=i;O<P;O++)g.push($[O]);if(i=0,g.length===l)break}return c?d.enrich(g):g}return v})},ve.tag=function(r,s=0,l=0,i=!1){r=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(r);const u=this;return nn(r).then(function(c){return!c||!c.length||l>=c.length?[]:!s&&!l?c:(c=c.slice(l,l+s),i?u.enrich(c):c)})},ve.enrich=function(r){typeof r!="object"&&(r=[r]);const s=this.db.transaction("reg","readonly").objectStore("reg"),l=[];for(let i=0;i<r.length;i++)l[i]=nn(s.get(r[i]));return Promise.all(l).then(function(i){for(let u=0;u<i.length;u++)i[u]={id:r[u],doc:i[u]?JSON.parse(i[u]):null};return i})},ve.has=function(r){return r=this.db.transaction("reg","readonly").objectStore("reg").getKey(r),nn(r).then(function(s){return!!s})},ve.search=null,ve.info=function(){},ve.transaction=function(r,s,l){r+=r!=="reg"&&this.field?":"+this.field:"";let i=this.h[r+":"+s];if(i)return l.call(this,i);let u=this.db.transaction(r,s);this.h[r+":"+s]=i=u.objectStore(r);const c=l.call(this,i);return this.h[r+":"+s]=null,nn(u).finally(function(){return u=i=null,c})},ve.commit=async function(r,s,l){if(s)await this.clear(),r.commit_task=[];else{let i=r.commit_task;r.commit_task=[];for(let u=0,c;u<i.length;u++)if(c=i[u],c.clear){await this.clear(),s=!0;break}else i[u]=c.del;s||(l||(i=i.concat(jd(r.reg))),i.length&&await this.remove(i))}r.reg.size&&(await this.transaction("map","readwrite",function(i){for(const u of r.map){const c=u[0],d=u[1];d.length&&(s?i.put(d,c):i.get(c).onsuccess=function(){let v=this.result;var g;if(v&&v.length){const C=Math.max(v.length,d.length);for(let $=0,P,O;$<C;$++)if((O=d[$])&&O.length){if((P=v[$])&&P.length)for(g=0;g<O.length;g++)P.push(O[g]);else v[$]=O;g=1}}else v=d,g=1;g&&i.put(v,c)})}}),await this.transaction("ctx","readwrite",function(i){for(const u of r.ctx){const c=u[0],d=u[1];for(const v of d){const g=v[0],C=v[1];C.length&&(s?i.put(C,c+":"+g):i.get(c+":"+g).onsuccess=function(){let $=this.result;var P;if($&&$.length){const O=Math.max($.length,C.length);for(let F=0,b,V;F<O;F++)if((V=C[F])&&V.length){if((b=$[F])&&b.length)for(P=0;P<V.length;P++)b.push(V[P]);else $[F]=V;P=1}}else $=C,P=1;P&&i.put($,c+":"+g)})}}}),r.store?await this.transaction("reg","readwrite",function(i){for(const u of r.store){const c=u[0],d=u[1];i.put(typeof d=="object"?JSON.stringify(d):1,c)}}):r.bypass||await this.transaction("reg","readwrite",function(i){for(const u of r.reg.keys())i.put(1,u)}),r.tag&&await this.transaction("tag","readwrite",function(i){for(const u of r.tag){const c=u[0],d=u[1];d.length&&(i.get(c).onsuccess=function(){let v=this.result;v=v&&v.length?v.concat(d):d,i.put(v,c)})}}),r.map.clear(),r.ctx.clear(),r.tag&&r.tag.clear(),r.store&&r.store.clear(),r.document||r.reg.clear())};function Yo(r,s,l){const i=r.value;let u,c=0;for(let d=0,v;d<i.length;d++){if(v=l?i:i[d]){for(let g=0,C,$;g<s.length;g++)if($=s[g],C=v.indexOf($),0<=C)if(u=1,1<v.length)v.splice(C,1);else{i[d]=[];break}c+=v.length}if(l)break}c?u&&r.update(i):r.delete(),r.continue()}ve.remove=function(r){return typeof r!="object"&&(r=[r]),Promise.all([this.transaction("map","readwrite",function(s){s.openCursor().onsuccess=function(){const l=this.result;l&&Yo(l,r)}}),this.transaction("ctx","readwrite",function(s){s.openCursor().onsuccess=function(){const l=this.result;l&&Yo(l,r)}}),this.transaction("tag","readwrite",function(s){s.openCursor().onsuccess=function(){const l=this.result;l&&Yo(l,r,!0)}}),this.transaction("reg","readwrite",function(s){for(let l=0;l<r.length;l++)s.delete(r[l])})])};function nn(r,s){return new Promise((l,i)=>{r.onsuccess=r.oncomplete=function(){s&&s(this.result),s=null,l(this.result)},r.onerror=r.onblocked=i,r=null})}const $s={Encoder:Pr,Document:jn},Bd=iu,qd={finalize:r=>{let s=[];for(const l of r)s.push(...Hd(l));return s}};function Vd(r){return r>=19968&&r<=40959||r>=12352&&r<=12543||r>=44032&&r<=55203||r>=13312&&r<=19903||r>=131072&&r<=173791||r>=173824&&r<=191471||r>=196608&&r<=205743||r>=191472&&r<=192095||r>=63744&&r<=64255||r>=194560&&r<=195103}function Hd(r){const s=[];let l="";for(const i of r){const u=i.codePointAt(0);Vd(u)?(l&&(s.push(l),l=""),s.push(i)):l+=i}return l&&s.push(l),s}const Xo=new $s.Encoder(Bd.Default,qd);class Wd{constructor({adminUrl:s,apiKey:l,dir:i}){const u=i==="rtl",c=i==="rtl"?"reverse":"forward";this.apiUrl=s,this.apiKey=l,this.postsIndex=new $s.Document({tokenize:c,rtl:u,document:{id:"id",index:["title","excerpt"],store:!0},encoder:Xo}),this.authorsIndex=new $s.Document({tokenize:c,rtl:u,document:{id:"id",index:["name"],store:!0},encoder:Xo}),this.tagsIndex=new $s.Document({tokenize:c,rtl:u,document:{id:"id",index:["name"],store:!0},encoder:Xo}),this.init=this.init.bind(this),this.search=this.search.bind(this)}async#t(){const s=await this.#n();s.length>0&&this.#r(s)}async#n(){try{const s=`${this.apiUrl}/ghost/api/content/search-index/posts/?key=${this.apiKey}`;return(await(await fetch(s)).json()).posts}catch(s){return console.error("Error fetching posts:",s),[]}}#r(s){s.forEach(l=>{this.postsIndex.add(l)})}async#s(){const s=await this.#o();s.length>0&&this.#i(s)}async#o(){try{const s=`${this.apiUrl}/ghost/api/content/search-index/authors/?key=${this.apiKey}`;return(await(await fetch(s)).json()).authors}catch(s){return console.error("Error fetching authors:",s),[]}}#i(s){s.forEach(l=>{this.authorsIndex.add(l)})}async#l(){const s=await this.#a();s.length>0&&this.#u(s)}async#a(){try{const s=`${this.apiUrl}/ghost/api/content/search-index/tags/?key=${this.apiKey}`;return(await(await fetch(s)).json()).tags}catch(s){return console.error("Error fetching tags:",s),[]}}#u(s){s.forEach(l=>{this.tagsIndex.add(l)})}async init(){await this.#t(),await this.#s(),await this.#l()}#e(s){const l=[],i={};return s.forEach(u=>{u.result.forEach(c=>{i[c.id]||(l.push(c.doc),i[c.id]=!0)})}),l}search(s){const l=this.postsIndex.search(s,{enrich:!0}),i=this.authorsIndex.search(s,{enrich:!0}),u=this.tagsIndex.search(s,{enrich:!0});return{posts:this.#e(l),authors:this.#e(i),tags:this.#e(u)}}}var Tn={exports:{}};const Kd={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Gd={Authors:"الكتّاب",Cancel:"إلغاء","No matches found":"لا يوجد نتائج مطابقة",Posts:"منشورات","Search posts, tags and authors":"قم بالبحث عن المنشورات، الوسوم و الكتّاب","Show more results":"اظهر المزيد من النتائج",Tags:"الوسوم"},Jd={Authors:"Автори",Cancel:"Отказ","No matches found":"Няма съвпадения",Posts:"Публикации","Search posts, tags and authors":"Търсене в публикации, етикети и автори","Show more results":"Покажи още резултати",Tags:"Етикети"},Qd={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Yd={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Xd={Authors:"Autors",Cancel:"Cancel·la","No matches found":"No s'ha trobat cap resultat",Posts:"Articles","Search posts, tags and authors":"Cerca articles, etiquetes i autors","Show more results":"Mostra més resultats",Tags:"Etiquetes"},Zd={Authors:"Autoři",Cancel:"Zrušit","No matches found":"Nenalezeno",Posts:"Články","Search posts, tags and authors":"Prohledat články, štítky a autory","Show more results":"Zobrazit více výsledků",Tags:"Štítky"},ep={Authors:"Forfattere",Cancel:"Annuller","No matches found":"Ingen resultater fundet",Posts:"Indlæg","Search posts, tags and authors":"Søg i indlæg, tags og forfattere","Show more results":"Vis flere resultater",Tags:"Tags"},tp={Authors:"Autor*innen",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Posts","Search posts, tags and authors":"Posts, Tags und Autor*innen durchsuchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},np={Authors:"Autoren",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Beiträge","Search posts, tags and authors":"Nach Posts, Tags und Autoren suchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},rp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},sp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},op={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},ip={Authors:"Autores",Cancel:"Cancelar","No matches found":"No se encontraron resultados",Posts:"Publicaciones","Search posts, tags and authors":"Buscar publicaciones, etiquetas y autores","Show more results":"Mostrar más resultados",Tags:"Etiquetas"},lp={Authors:"Autorid",Cancel:"Tühista","No matches found":"Vasteid ei leitud",Posts:"Postitused","Search posts, tags and authors":"Otsi postitusi, silte ja autoreid","Show more results":"Näita rohkem tulemusi",Tags:"Sildid"},ap={Authors:"Autoreak",Cancel:"Utzi","No matches found":"Ez da bat datorren ezer topatu",Posts:"Artikuluak","Search posts, tags and authors":"Bilatu artikuluak, etiketak eta autoreak","Show more results":"Erakutsi emaitza gehiago",Tags:"Etiketak"},up={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},cp={Authors:"Kirjoittajat",Cancel:"Peruuta","No matches found":"Ei hakutuloksia",Posts:"Kirjoitukset","Search posts, tags and authors":"Etsi kirjoituksia, tunnisteita ja kirjoittajia","Show more results":"Näytä enemmän tuloksia",Tags:"Tunnisteet"},fp={Authors:"Auteurs",Cancel:"Annuler","No matches found":"Aucun résultat trouvé",Posts:"Articles","Search posts, tags and authors":"Rechercher des articles, des catégories et des auteurs","Show more results":"Plus de résultats",Tags:"Catégories"},hp={Authors:"Ùghdaran",Cancel:"Sguir dheth","No matches found":"Cha deach dad a lorg a fhreagras ris na lorg thu",Posts:"Postaichean","Search posts, tags and authors":"Lorg sna postaichean, tagaichean agus ùghdaran","Show more results":"Seall barrachd thoraidhean",Tags:"Tagaichean"},dp={Authors:"מחברים",Cancel:"ביטול","No matches found":"לא נמצאו התאמות",Posts:"פוסטים","Search posts, tags and authors":"חיפוש פוסטים, תגיות ומחברים","Show more results":"הצגת תוצאות נוספות",Tags:"תגיות"},pp={Authors:"लेखक",Cancel:"रद्द करें","No matches found":"कोई मैच नहीं मिला",Posts:"पोस्ट","Search posts, tags and authors":"पोस्ट, टैग और लेखक की तलाश करें","Show more results":"और परिणाम दिखाएं",Tags:"टैग"},gp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},mp={Authors:"Szerzők",Cancel:"Mégse","No matches found":"Nincs találat",Posts:"Bejegyzések","Search posts, tags and authors":"Keresés a bejegyzések, a címkék és a szerzők között","Show more results":"További találatok megjelenítése",Tags:"Címkék"},yp={Authors:"Penulis",Cancel:"Batalkan","No matches found":"Tidak ada hasil yang ditemukan",Posts:"Postingan","Search posts, tags and authors":"Cari postingan, tag, dan penulis","Show more results":"Tampilkan lebih banyak hasil",Tags:"Tag"},vp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},wp={Authors:"Autori",Cancel:"Annulla","No matches found":"Nessun risultato trovato",Posts:"Articoli","Search posts, tags and authors":"Cerca articoli, tag e autori","Show more results":"Mostra più risultati",Tags:"Tag"},Sp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},xp={Authors:"작성자",Cancel:"취소","No matches found":"일치하는 결과가 없어요",Posts:"게시물","Search posts, tags and authors":"게시물, 태그, 작성자 검색","Show more results":"더 많은 결과 보기",Tags:"태그"},Cp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},kp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Pp={Authors:"Autori",Cancel:"Atcelt","No matches found":"Nav atrasta neviena atbilstība",Posts:"Ziņas","Search posts, tags and authors":"Meklēt ziņas, atzīmes un autorus","Show more results":"Rādīt vairāk rezultātu",Tags:"Tagi"},Ep={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},$p={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},jp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ap={Authors:"Forfattere",Cancel:"Avbryt","No matches found":"Ingen treff funnet",Posts:"Innlegg","Search posts, tags and authors":"Søk i innlegg, etiketter og forfattere","Show more results":"Vis flere resultater",Tags:"Etiketter"},Op={Authors:"लेखकहरू",Cancel:"रद्द गर्नुहोस्","No matches found":"कुनै परिणाम भेटिएन",Posts:"पोस्टहरू","Search posts, tags and authors":"पोस्टहरू, ट्यागहरू र लेखकहरू खोज्नुहोस्","Show more results":"थप परिणामहरू देखाउनुहोस्",Tags:"ट्यागहरू"},Tp={Authors:"Auteurs",Cancel:"Annuleren","No matches found":"Geen resultaten gevonden",Posts:"Berichten","Search posts, tags and authors":"Zoek berichten, tags en auteurs","Show more results":"Meer resultaten weergeven",Tags:"Tags"},Np={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Rp={Authors:"ਲੇਖਕ",Cancel:"ਰੱਦ ਕਰੋ","No matches found":"ਕੋਈ ਮੇਲ ਨਹੀਂ ਮਿਲਿਆ",Posts:"ਪੋਸਟਾਂ","Search posts, tags and authors":"ਪੋਸਟਾਂ, ਟੈਗ ਅਤੇ ਲੇਖਕ ਖੋਜੋ","Show more results":"ਹੋਰ ਨਤੀਜੇ ਦਿਖਾਓ",Tags:"ਟੈਗ"},_p={Authors:"Autorzy",Cancel:"Anuluj","No matches found":"Nie znaleziono dopasowań",Posts:"Posty","Search posts, tags and authors":"Szukaj postów, tagów lub autorów","Show more results":"Pokaż więcej wyników",Tags:"Tagi"},Lp={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Procurar publicações, marcadores e autores","Show more results":"Mostrar mais resultados",Tags:"Marcadores"},Fp={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Buscar posts, tags e autores","Show more results":"Mostrar mais resultados",Tags:"Tags"},Ip={Authors:"Autori",Cancel:"Anulează","No matches found":"Nu s-au găsit rezultate",Posts:"Postări","Search posts, tags and authors":"Caută postări, etichete și autori","Show more results":"Afișează mai multe rezultate",Tags:"Etichete"},Dp={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},Mp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},zp={Authors:"Autori",Cancel:"Zrušiť","No matches found":"Nenašli sa žiadne výsledky",Posts:"Príspevky","Search posts, tags and authors":"Vyhľadajte príspevky, tagy a autorov","Show more results":"Zobraziť viac výsledkov",Tags:"Tagy"},bp={Authors:"Avtorji",Cancel:"Prekliči","No matches found":"Ni najdenih zadetkov",Posts:"Članki","Search posts, tags and authors":"Iščite članke, oznake in avtorje","Show more results":"Prikaži več rezultatov",Tags:"Oznake"},Up={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Bp={Authors:"Autori",Cancel:"Otkažite","No matches found":"Nema rezultata",Posts:"Objave","Search posts, tags and authors":"Pretražite objave, tag-ove i autore","Show more results":"Prikažite više rezultata",Tags:"Tag-ovi"},qp={Authors:"Аутори",Cancel:"Откажите","No matches found":"Нема резултата",Posts:"Објаве","Search posts, tags and authors":"Претражите објаве, tag-ове и ауторе","Show more results":"Прикажите више резултата",Tags:"Tag-ови"},Vp={Authors:"Författare",Cancel:"Avbryt","No matches found":"Inga träffar hittade",Posts:"Inlägg","Search posts, tags and authors":"Sök inlägg, taggar och författare","Show more results":"Visa fler resultat",Tags:"Taggar"},Hp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Wp={Authors:"ஆசிரியர்கள்",Cancel:"ரத்து செய்","No matches found":"பொருத்தங்கள் எதுவும் இல்லை",Posts:"பதிவுகள்","Search posts, tags and authors":"பதிவுகள், குறிச்சொற்கள் மற்றும் ஆசிரியர்களைத் தேடுங்கள்","Show more results":"மேலும் முடிவுகளைக் காட்டு",Tags:"குறிச்சொற்கள்"},Kp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Gp={Authors:"Yazarlar",Cancel:"İptal","No matches found":"Eşleşme bulunamadı",Posts:"Yazılar","Search posts, tags and authors":"Yazıları, etiketleri ve yazarları ara","Show more results":"Daha fazla sonuç göster",Tags:"Etiketler"},Jp={Authors:"Автори",Cancel:"Скасувати","No matches found":"Збігів не знайдено",Posts:"Публікації","Search posts, tags and authors":"Шукайте публікацій, теги та авторів","Show more results":"Показати більше результатів",Tags:"Теги"},Qp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Yp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Xp={Authors:"Tác giả",Cancel:"Hủy","No matches found":"Không tìm thấy",Posts:"Bài viết","Search posts, tags and authors":"Tìm bài viết, thẻ & tác giả","Show more results":"Xem thêm kết quả",Tags:"Thẻ"},Zp={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"},eg={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"};var du;function pu(){return du||(du={"/ghost/i18n/locales/af/search.json":function(){return Kd},"/ghost/i18n/locales/ar/search.json":function(){return Gd},"/ghost/i18n/locales/bg/search.json":function(){return Jd},"/ghost/i18n/locales/bn/search.json":function(){return Qd},"/ghost/i18n/locales/bs/search.json":function(){return Yd},"/ghost/i18n/locales/ca/search.json":function(){return Xd},"/ghost/i18n/locales/cs/search.json":function(){return Zd},"/ghost/i18n/locales/da/search.json":function(){return ep},"/ghost/i18n/locales/de/search.json":function(){return tp},"/ghost/i18n/locales/de-CH/search.json":function(){return np},"/ghost/i18n/locales/el/search.json":function(){return rp},"/ghost/i18n/locales/en/search.json":function(){return sp},"/ghost/i18n/locales/eo/search.json":function(){return op},"/ghost/i18n/locales/es/search.json":function(){return ip},"/ghost/i18n/locales/et/search.json":function(){return lp},"/ghost/i18n/locales/eu/search.json":function(){return ap},"/ghost/i18n/locales/fa/search.json":function(){return up},"/ghost/i18n/locales/fi/search.json":function(){return cp},"/ghost/i18n/locales/fr/search.json":function(){return fp},"/ghost/i18n/locales/gd/search.json":function(){return hp},"/ghost/i18n/locales/he/search.json":function(){return dp},"/ghost/i18n/locales/hi/search.json":function(){return pp},"/ghost/i18n/locales/hr/search.json":function(){return gp},"/ghost/i18n/locales/hu/search.json":function(){return mp},"/ghost/i18n/locales/id/search.json":function(){return yp},"/ghost/i18n/locales/is/search.json":function(){return vp},"/ghost/i18n/locales/it/search.json":function(){return wp},"/ghost/i18n/locales/ja/search.json":function(){return Sp},"/ghost/i18n/locales/ko/search.json":function(){return xp},"/ghost/i18n/locales/kz/search.json":function(){return Cp},"/ghost/i18n/locales/lt/search.json":function(){return kp},"/ghost/i18n/locales/lv/search.json":function(){return Pp},"/ghost/i18n/locales/mk/search.json":function(){return Ep},"/ghost/i18n/locales/mn/search.json":function(){return $p},"/ghost/i18n/locales/ms/search.json":function(){return jp},"/ghost/i18n/locales/nb/search.json":function(){return Ap},"/ghost/i18n/locales/ne/search.json":function(){return Op},"/ghost/i18n/locales/nl/search.json":function(){return Tp},"/ghost/i18n/locales/nn/search.json":function(){return Np},"/ghost/i18n/locales/pa/search.json":function(){return Rp},"/ghost/i18n/locales/pl/search.json":function(){return _p},"/ghost/i18n/locales/pt/search.json":function(){return Lp},"/ghost/i18n/locales/pt-BR/search.json":function(){return Fp},"/ghost/i18n/locales/ro/search.json":function(){return Ip},"/ghost/i18n/locales/ru/search.json":function(){return Dp},"/ghost/i18n/locales/si/search.json":function(){return Mp},"/ghost/i18n/locales/sk/search.json":function(){return zp},"/ghost/i18n/locales/sl/search.json":function(){return bp},"/ghost/i18n/locales/sq/search.json":function(){return Up},"/ghost/i18n/locales/sr/search.json":function(){return Bp},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return qp},"/ghost/i18n/locales/sv/search.json":function(){return Vp},"/ghost/i18n/locales/sw/search.json":function(){return Hp},"/ghost/i18n/locales/ta/search.json":function(){return Wp},"/ghost/i18n/locales/th/search.json":function(){return Kp},"/ghost/i18n/locales/tr/search.json":function(){return Gp},"/ghost/i18n/locales/uk/search.json":function(){return Jp},"/ghost/i18n/locales/ur/search.json":function(){return Qp},"/ghost/i18n/locales/uz/search.json":function(){return Yp},"/ghost/i18n/locales/vi/search.json":function(){return Xp},"/ghost/i18n/locales/zh/search.json":function(){return Zp},"/ghost/i18n/locales/zh-Hant/search.json":function(){return eg}})}function Nn(r){function s(l){var i=gu(l,r);if(i!==null)return pu()[i]();throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return s.resolve=function(l){var i=gu(l,r);return i!==null?i:require.resolve(l)},s}function gu(r,s){var l=tg(r);r=js(r);var i;r[0]==="/"&&(s="");for(var u=pu(),c=["",".js",".json"];l?i=js(s+"/node_modules/"+r):i=js(s+"/"+r),!i.endsWith("/..");){for(var d=0;d<c.length;d++){var v=i+c[d];if(u[v])return v}if(!l)break;var g=js(s+"/..");if(g===s)break;s=g}return null}function tg(r){var s=r[0];if(s==="/"||s==="\\")return!1;var l=r[1],i=r[2];return!(s==="."&&(!l||l==="/"||l==="\\")||s==="."&&l==="."&&(!i||i==="/"||i==="\\")||l===":"&&(i==="/"||i==="\\"))}function js(r){r=r.replace(/\\/g,"/");for(var s=r.split("/"),l=s[0]==="",i=1;i<s.length;i++)(s[i]==="."||s[i]==="")&&s.splice(i--,1);for(var i=1;i<s.length;i++)s[i]===".."&&i>0&&s[i-1]!==".."&&s[i-1]!=="."&&(s.splice(--i,2),i--);return r=s.join("/"),l&&r[0]!=="/"?r="/"+r:r.length===0&&(r="."),r}var Kn={exports:{}},Zo,mu;function ng(){if(mu)return Zo;mu=1;const r=k=>typeof k=="string",s=()=>{let k,f;const p=new Promise((m,x)=>{k=m,f=x});return p.resolve=k,p.reject=f,p},l=k=>k==null?"":""+k,i=(k,f,p)=>{k.forEach(m=>{f[m]&&(p[m]=f[m])})},u=/###/g,c=k=>k&&k.indexOf("###")>-1?k.replace(u,"."):k,d=k=>!k||r(k),v=(k,f,p)=>{const m=r(f)?f.split("."):f;let x=0;for(;x<m.length-1;){if(d(k))return{};const E=c(m[x]);!k[E]&&p&&(k[E]=new p),Object.prototype.hasOwnProperty.call(k,E)?k=k[E]:k={},++x}return d(k)?{}:{obj:k,k:c(m[x])}},g=(k,f,p)=>{const{obj:m,k:x}=v(k,f,Object);if(m!==void 0||f.length===1){m[x]=p;return}let E=f[f.length-1],N=f.slice(0,f.length-1),I=v(k,N,Object);for(;I.obj===void 0&&N.length;)E=`${N[N.length-1]}.${E}`,N=N.slice(0,N.length-1),I=v(k,N,Object),I&&I.obj&&typeof I.obj[`${I.k}.${E}`]<"u"&&(I.obj=void 0);I.obj[`${I.k}.${E}`]=p},C=(k,f,p,m)=>{const{obj:x,k:E}=v(k,f,Object);x[E]=x[E]||[],x[E].push(p)},$=(k,f)=>{const{obj:p,k:m}=v(k,f);if(p)return p[m]},P=(k,f,p)=>{const m=$(k,p);return m!==void 0?m:$(f,p)},O=(k,f,p)=>{for(const m in f)m!=="__proto__"&&m!=="constructor"&&(m in k?r(k[m])||k[m]instanceof String||r(f[m])||f[m]instanceof String?p&&(k[m]=f[m]):O(k[m],f[m],p):k[m]=f[m]);return k},F=k=>k.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const V=k=>r(k)?k.replace(/[&<>"'\/]/g,f=>b[f]):k;class U{constructor(f){this.capacity=f,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(f){const p=this.regExpMap.get(f);if(p!==void 0)return p;const m=new RegExp(f);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(f,m),this.regExpQueue.push(f),m}}const J=[" ",",","?","!",";"],re=new U(20),we=(k,f,p)=>{f=f||"",p=p||"";const m=J.filter(N=>f.indexOf(N)<0&&p.indexOf(N)<0);if(m.length===0)return!0;const x=re.getRegExp(`(${m.map(N=>N==="?"?"\\?":N).join("|")})`);let E=!x.test(k);if(!E){const N=k.indexOf(p);N>0&&!x.test(k.substring(0,N))&&(E=!0)}return E},ge=function(k,f){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!k)return;if(k[f])return k[f];const m=f.split(p);let x=k;for(let E=0;E<m.length;){if(!x||typeof x!="object")return;let N,I="";for(let M=E;M<m.length;++M)if(M!==E&&(I+=p),I+=m[M],N=x[I],N!==void 0){if(["string","number","boolean"].indexOf(typeof N)>-1&&M<m.length-1)continue;E+=M-E+1;break}x=N}return x},ne=k=>k&&k.replace("_","-"),me={type:"logger",log(k){this.output("log",k)},warn(k){this.output("warn",k)},error(k){this.output("error",k)},output(k,f){console&&console[k]&&console[k].apply(console,f)}};class ie{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(f,p)}init(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=p.prefix||"i18next:",this.logger=f||me,this.options=p,this.debug=p.debug}log(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"log","",!0)}warn(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"warn","",!0)}error(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"error","")}deprecate(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"warn","WARNING DEPRECATED: ",!0)}forward(f,p,m,x){return x&&!this.debug?null:(r(f[0])&&(f[0]=`${m}${this.prefix} ${f[0]}`),this.logger[p](f))}create(f){return new ie(this.logger,{prefix:`${this.prefix}:${f}:`,...this.options})}clone(f){return f=f||this.options,f.prefix=f.prefix||this.prefix,new ie(this.logger,f)}}var fe=new ie;class Ee{constructor(){this.observers={}}on(f,p){return f.split(" ").forEach(m=>{this.observers[m]||(this.observers[m]=new Map);const x=this.observers[m].get(p)||0;this.observers[m].set(p,x+1)}),this}off(f,p){if(this.observers[f]){if(!p){delete this.observers[f];return}this.observers[f].delete(p)}}emit(f){for(var p=arguments.length,m=new Array(p>1?p-1:0),x=1;x<p;x++)m[x-1]=arguments[x];this.observers[f]&&Array.from(this.observers[f].entries()).forEach(N=>{let[I,M]=N;for(let Q=0;Q<M;Q++)I(...m)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(N=>{let[I,M]=N;for(let Q=0;Q<M;Q++)I.apply(I,[f,...m])})}}class L extends Ee{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=f||{},this.options=p,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(f){this.options.ns.indexOf(f)<0&&this.options.ns.push(f)}removeNamespaces(f){const p=this.options.ns.indexOf(f);p>-1&&this.options.ns.splice(p,1)}getResource(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=x.keySeparator!==void 0?x.keySeparator:this.options.keySeparator,N=x.ignoreJSONStructure!==void 0?x.ignoreJSONStructure:this.options.ignoreJSONStructure;let I;f.indexOf(".")>-1?I=f.split("."):(I=[f,p],m&&(Array.isArray(m)?I.push(...m):r(m)&&E?I.push(...m.split(E)):I.push(m)));const M=$(this.data,I);return!M&&!p&&!m&&f.indexOf(".")>-1&&(f=I[0],p=I[1],m=I.slice(2).join(".")),M||!N||!r(m)?M:ge(this.data&&this.data[f]&&this.data[f][p],m,E)}addResource(f,p,m,x){let E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const N=E.keySeparator!==void 0?E.keySeparator:this.options.keySeparator;let I=[f,p];m&&(I=I.concat(N?m.split(N):m)),f.indexOf(".")>-1&&(I=f.split("."),x=p,p=I[1]),this.addNamespaces(p),g(this.data,I,x),E.silent||this.emit("added",f,p,m,x)}addResources(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const E in m)(r(m[E])||Array.isArray(m[E]))&&this.addResource(f,p,E,m[E],{silent:!0});x.silent||this.emit("added",f,p,m)}addResourceBundle(f,p,m,x,E){let N=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},I=[f,p];f.indexOf(".")>-1&&(I=f.split("."),x=m,m=p,p=I[1]),this.addNamespaces(p);let M=$(this.data,I)||{};N.skipCopy||(m=JSON.parse(JSON.stringify(m))),x?O(M,m,E):M={...M,...m},g(this.data,I,M),N.silent||this.emit("added",f,p,m)}removeResourceBundle(f,p){this.hasResourceBundle(f,p)&&delete this.data[f][p],this.removeNamespaces(p),this.emit("removed",f,p)}hasResourceBundle(f,p){return this.getResource(f,p)!==void 0}getResourceBundle(f,p){return p||(p=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(f,p)}:this.getResource(f,p)}getDataByLanguage(f){return this.data[f]}hasLanguageSomeTranslations(f){const p=this.getDataByLanguage(f);return!!(p&&Object.keys(p)||[]).find(x=>p[x]&&Object.keys(p[x]).length>0)}toJSON(){return this.data}}var z={processors:{},addPostProcessor(k){this.processors[k.name]=k},handle(k,f,p,m,x){return k.forEach(E=>{this.processors[E]&&(f=this.processors[E].process(f,p,m,x))}),f}};const Y={};class se extends Ee{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),i(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],f,this),this.options=p,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=fe.create("translator")}changeLanguage(f){f&&(this.language=f)}exists(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(f==null)return!1;const m=this.resolve(f,p);return m&&m.res!==void 0}extractFromKey(f,p){let m=p.nsSeparator!==void 0?p.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const x=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator;let E=p.ns||this.options.defaultNS||[];const N=m&&f.indexOf(m)>-1,I=!this.options.userDefinedKeySeparator&&!p.keySeparator&&!this.options.userDefinedNsSeparator&&!p.nsSeparator&&!we(f,m,x);if(N&&!I){const M=f.match(this.interpolator.nestingRegexp);if(M&&M.length>0)return{key:f,namespaces:r(E)?[E]:E};const Q=f.split(m);(m!==x||m===x&&this.options.ns.indexOf(Q[0])>-1)&&(E=Q.shift()),f=Q.join(x)}return{key:f,namespaces:r(E)?[E]:E}}translate(f,p,m){if(typeof p!="object"&&this.options.overloadTranslationOptionHandler&&(p=this.options.overloadTranslationOptionHandler(arguments)),typeof p=="object"&&(p={...p}),p||(p={}),f==null)return"";Array.isArray(f)||(f=[String(f)]);const x=p.returnDetails!==void 0?p.returnDetails:this.options.returnDetails,E=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator,{key:N,namespaces:I}=this.extractFromKey(f[f.length-1],p),M=I[I.length-1],Q=p.lng||this.language,ee=p.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(Q&&Q.toLowerCase()==="cimode"){if(ee){const Ue=p.nsSeparator||this.options.nsSeparator;return x?{res:`${M}${Ue}${N}`,usedKey:N,exactUsedKey:N,usedLng:Q,usedNS:M,usedParams:this.getUsedParamsDetails(p)}:`${M}${Ue}${N}`}return x?{res:N,usedKey:N,exactUsedKey:N,usedLng:Q,usedNS:M,usedParams:this.getUsedParamsDetails(p)}:N}const ue=this.resolve(f,p);let K=ue&&ue.res;const Se=ue&&ue.usedKey||N,_e=ue&&ue.exactUsedKey||N,Ke=Object.prototype.toString.apply(K),ze=["[object Number]","[object Function]","[object RegExp]"],tt=p.joinArrays!==void 0?p.joinArrays:this.options.joinArrays,nt=!this.i18nFormat||this.i18nFormat.handleAsObject,Lt=!r(K)&&typeof K!="boolean"&&typeof K!="number";if(nt&&K&&Lt&&ze.indexOf(Ke)<0&&!(r(tt)&&Array.isArray(K))){if(!p.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Ue=this.options.returnedObjectHandler?this.options.returnedObjectHandler(Se,K,{...p,ns:I}):`key '${N} (${this.language})' returned an object instead of string.`;return x?(ue.res=Ue,ue.usedParams=this.getUsedParamsDetails(p),ue):Ue}if(E){const Ue=Array.isArray(K),gt=Ue?[]:{},vt=Ue?_e:Se;for(const rt in K)if(Object.prototype.hasOwnProperty.call(K,rt)){const Jn=`${vt}${E}${rt}`;gt[rt]=this.translate(Jn,{...p,joinArrays:!1,ns:I}),gt[rt]===Jn&&(gt[rt]=K[rt])}K=gt}}else if(nt&&r(tt)&&Array.isArray(K))K=K.join(tt),K&&(K=this.extendTranslation(K,f,p,m));else{let Ue=!1,gt=!1;const vt=p.count!==void 0&&!r(p.count),rt=se.hasDefaultValue(p),Jn=vt?this.pluralResolver.getSuffix(Q,p.count,p):"",Tr=p.ordinal&&vt?this.pluralResolver.getSuffix(Q,p.count,{ordinal:!1}):"",Qn=vt&&!p.ordinal&&p.count===0&&this.pluralResolver.shouldUseIntlApi(),Wt=Qn&&p[`defaultValue${this.options.pluralSeparator}zero`]||p[`defaultValue${Jn}`]||p[`defaultValue${Tr}`]||p.defaultValue;!this.isValidLookup(K)&&rt&&(Ue=!0,K=Wt),this.isValidLookup(K)||(gt=!0,K=N);const rn=(p.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&gt?void 0:K,$t=rt&&Wt!==K&&this.options.updateMissing;if(gt||Ue||$t){if(this.logger.log($t?"updateKey":"missingKey",Q,M,N,$t?Wt:K),E){const it=this.resolve(N,{...p,keySeparator:!1});it&&it.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 sn=[];const Rn=this.languageUtils.getFallbackCodes(this.options.fallbackLng,p.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Rn&&Rn[0])for(let it=0;it<Rn.length;it++)sn.push(Rn[it]);else this.options.saveMissingTo==="all"?sn=this.languageUtils.toResolveHierarchy(p.lng||this.language):sn.push(p.lng||this.language);const Nr=(it,zt,Kt)=>{const Rr=rt&&Kt!==K?Kt:rn;this.options.missingKeyHandler?this.options.missingKeyHandler(it,M,zt,Rr,$t,p):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(it,M,zt,Rr,$t,p),this.emit("missingKey",it,M,zt,K)};this.options.saveMissing&&(this.options.saveMissingPlurals&&vt?sn.forEach(it=>{const zt=this.pluralResolver.getSuffixes(it,p);Qn&&p[`defaultValue${this.options.pluralSeparator}zero`]&&zt.indexOf(`${this.options.pluralSeparator}zero`)<0&&zt.push(`${this.options.pluralSeparator}zero`),zt.forEach(Kt=>{Nr([it],N+Kt,p[`defaultValue${Kt}`]||Wt)})}):Nr(sn,N,Wt))}K=this.extendTranslation(K,f,p,ue,m),gt&&K===N&&this.options.appendNamespaceToMissingKey&&(K=`${M}:${N}`),(gt||Ue)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?K=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${M}:${N}`:N,Ue?K:void 0):K=this.options.parseMissingKeyHandler(K))}return x?(ue.res=K,ue.usedParams=this.getUsedParamsDetails(p),ue):K}extendTranslation(f,p,m,x,E){var N=this;if(this.i18nFormat&&this.i18nFormat.parse)f=this.i18nFormat.parse(f,{...this.options.interpolation.defaultVariables,...m},m.lng||this.language||x.usedLng,x.usedNS,x.usedKey,{resolved:x});else if(!m.skipInterpolation){m.interpolation&&this.interpolator.init({...m,interpolation:{...this.options.interpolation,...m.interpolation}});const Q=r(f)&&(m&&m.interpolation&&m.interpolation.skipOnVariables!==void 0?m.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let ee;if(Q){const K=f.match(this.interpolator.nestingRegexp);ee=K&&K.length}let ue=m.replace&&!r(m.replace)?m.replace:m;if(this.options.interpolation.defaultVariables&&(ue={...this.options.interpolation.defaultVariables,...ue}),f=this.interpolator.interpolate(f,ue,m.lng||this.language||x.usedLng,m),Q){const K=f.match(this.interpolator.nestingRegexp),Se=K&&K.length;ee<Se&&(m.nest=!1)}!m.lng&&this.options.compatibilityAPI!=="v1"&&x&&x.res&&(m.lng=this.language||x.usedLng),m.nest!==!1&&(f=this.interpolator.nest(f,function(){for(var K=arguments.length,Se=new Array(K),_e=0;_e<K;_e++)Se[_e]=arguments[_e];return E&&E[0]===Se[0]&&!m.context?(N.logger.warn(`It seems you are nesting recursively key: ${Se[0]} in key: ${p[0]}`),null):N.translate(...Se,p)},m)),m.interpolation&&this.interpolator.reset()}const I=m.postProcess||this.options.postProcess,M=r(I)?[I]:I;return f!=null&&M&&M.length&&m.applyPostProcessor!==!1&&(f=z.handle(M,f,p,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...x,usedParams:this.getUsedParamsDetails(m)},...m}:m,this)),f}resolve(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m,x,E,N,I;return r(f)&&(f=[f]),f.forEach(M=>{if(this.isValidLookup(m))return;const Q=this.extractFromKey(M,p),ee=Q.key;x=ee;let ue=Q.namespaces;this.options.fallbackNS&&(ue=ue.concat(this.options.fallbackNS));const K=p.count!==void 0&&!r(p.count),Se=K&&!p.ordinal&&p.count===0&&this.pluralResolver.shouldUseIntlApi(),_e=p.context!==void 0&&(r(p.context)||typeof p.context=="number")&&p.context!=="",Ke=p.lngs?p.lngs:this.languageUtils.toResolveHierarchy(p.lng||this.language,p.fallbackLng);ue.forEach(ze=>{this.isValidLookup(m)||(I=ze,!Y[`${Ke[0]}-${ze}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(I)&&(Y[`${Ke[0]}-${ze}`]=!0,this.logger.warn(`key "${x}" for languages "${Ke.join(", ")}" won't get resolved as namespace "${I}" 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!!!")),Ke.forEach(tt=>{if(this.isValidLookup(m))return;N=tt;const nt=[ee];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(nt,ee,tt,ze,p);else{let Ue;K&&(Ue=this.pluralResolver.getSuffix(tt,p.count,p));const gt=`${this.options.pluralSeparator}zero`,vt=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(K&&(nt.push(ee+Ue),p.ordinal&&Ue.indexOf(vt)===0&&nt.push(ee+Ue.replace(vt,this.options.pluralSeparator)),Se&&nt.push(ee+gt)),_e){const rt=`${ee}${this.options.contextSeparator}${p.context}`;nt.push(rt),K&&(nt.push(rt+Ue),p.ordinal&&Ue.indexOf(vt)===0&&nt.push(rt+Ue.replace(vt,this.options.pluralSeparator)),Se&&nt.push(rt+gt))}}let Lt;for(;Lt=nt.pop();)this.isValidLookup(m)||(E=Lt,m=this.getResource(tt,ze,Lt,p))}))})}),{res:m,usedKey:x,exactUsedKey:E,usedLng:N,usedNS:I}}isValidLookup(f){return f!==void 0&&!(!this.options.returnNull&&f===null)&&!(!this.options.returnEmptyString&&f==="")}getResource(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(f,p,m,x):this.resourceStore.getResource(f,p,m,x)}getUsedParamsDetails(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const p=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],m=f.replace&&!r(f.replace);let x=m?f.replace:f;if(m&&typeof f.count<"u"&&(x.count=f.count),this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),!m){x={...x};for(const E of p)delete x[E]}return x}static hasDefaultValue(f){const p="defaultValue";for(const m in f)if(Object.prototype.hasOwnProperty.call(f,m)&&p===m.substring(0,p.length)&&f[m]!==void 0)return!0;return!1}}const de=k=>k.charAt(0).toUpperCase()+k.slice(1);class Oe{constructor(f){this.options=f,this.supportedLngs=this.options.supportedLngs||!1,this.logger=fe.create("languageUtils")}getScriptPartFromCode(f){if(f=ne(f),!f||f.indexOf("-")<0)return null;const p=f.split("-");return p.length===2||(p.pop(),p[p.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(p.join("-"))}getLanguagePartFromCode(f){if(f=ne(f),!f||f.indexOf("-")<0)return f;const p=f.split("-");return this.formatLanguageCode(p[0])}formatLanguageCode(f){if(r(f)&&f.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let x=Intl.getCanonicalLocales(f)[0];if(x&&this.options.lowerCaseLng&&(x=x.toLowerCase()),x)return x}catch{}const p=["hans","hant","latn","cyrl","cans","mong","arab"];let m=f.split("-");return this.options.lowerCaseLng?m=m.map(x=>x.toLowerCase()):m.length===2?(m[0]=m[0].toLowerCase(),m[1]=m[1].toUpperCase(),p.indexOf(m[1].toLowerCase())>-1&&(m[1]=de(m[1].toLowerCase()))):m.length===3&&(m[0]=m[0].toLowerCase(),m[1].length===2&&(m[1]=m[1].toUpperCase()),m[0]!=="sgn"&&m[2].length===2&&(m[2]=m[2].toUpperCase()),p.indexOf(m[1].toLowerCase())>-1&&(m[1]=de(m[1].toLowerCase())),p.indexOf(m[2].toLowerCase())>-1&&(m[2]=de(m[2].toLowerCase()))),m.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?f.toLowerCase():f}isSupportedCode(f){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(f=this.getLanguagePartFromCode(f)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(f)>-1}getBestMatchFromCodes(f){if(!f)return null;let p;return f.forEach(m=>{if(p)return;const x=this.formatLanguageCode(m);(!this.options.supportedLngs||this.isSupportedCode(x))&&(p=x)}),!p&&this.options.supportedLngs&&f.forEach(m=>{if(p)return;const x=this.getLanguagePartFromCode(m);if(this.isSupportedCode(x))return p=x;p=this.options.supportedLngs.find(E=>{if(E===x)return E;if(!(E.indexOf("-")<0&&x.indexOf("-")<0)&&(E.indexOf("-")>0&&x.indexOf("-")<0&&E.substring(0,E.indexOf("-"))===x||E.indexOf(x)===0&&x.length>1))return E})}),p||(p=this.getFallbackCodes(this.options.fallbackLng)[0]),p}getFallbackCodes(f,p){if(!f)return[];if(typeof f=="function"&&(f=f(p)),r(f)&&(f=[f]),Array.isArray(f))return f;if(!p)return f.default||[];let m=f[p];return m||(m=f[this.getScriptPartFromCode(p)]),m||(m=f[this.formatLanguageCode(p)]),m||(m=f[this.getLanguagePartFromCode(p)]),m||(m=f.default),m||[]}toResolveHierarchy(f,p){const m=this.getFallbackCodes(p||this.options.fallbackLng||[],f),x=[],E=N=>{N&&(this.isSupportedCode(N)?x.push(N):this.logger.warn(`rejecting language code not found in supportedLngs: ${N}`))};return r(f)&&(f.indexOf("-")>-1||f.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&E(this.formatLanguageCode(f)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&E(this.getScriptPartFromCode(f)),this.options.load!=="currentOnly"&&E(this.getLanguagePartFromCode(f))):r(f)&&E(this.formatLanguageCode(f)),m.forEach(N=>{x.indexOf(N)<0&&E(this.formatLanguageCode(N))}),x}}let Ie=[{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}],w={1:k=>+(k>1),2:k=>+(k!=1),3:k=>0,4:k=>k%10==1&&k%100!=11?0:k%10>=2&&k%10<=4&&(k%100<10||k%100>=20)?1:2,5:k=>k==0?0:k==1?1:k==2?2:k%100>=3&&k%100<=10?3:k%100>=11?4:5,6:k=>k==1?0:k>=2&&k<=4?1:2,7:k=>k==1?0:k%10>=2&&k%10<=4&&(k%100<10||k%100>=20)?1:2,8:k=>k==1?0:k==2?1:k!=8&&k!=11?2:3,9:k=>+(k>=2),10:k=>k==1?0:k==2?1:k<7?2:k<11?3:4,11:k=>k==1||k==11?0:k==2||k==12?1:k>2&&k<20?2:3,12:k=>+(k%10!=1||k%100==11),13:k=>+(k!==0),14:k=>k==1?0:k==2?1:k==3?2:3,15:k=>k%10==1&&k%100!=11?0:k%10>=2&&(k%100<10||k%100>=20)?1:2,16:k=>k%10==1&&k%100!=11?0:k!==0?1:2,17:k=>k==1||k%10==1&&k%100!=11?0:1,18:k=>k==0?0:k==1?1:2,19:k=>k==1?0:k==0||k%100>1&&k%100<11?1:k%100>10&&k%100<20?2:3,20:k=>k==1?0:k==0||k%100>0&&k%100<20?1:2,21:k=>k%100==1?1:k%100==2?2:k%100==3||k%100==4?3:0,22:k=>k==1?0:k==2?1:(k<0||k>10)&&k%10==0?2:3};const T=["v1","v2","v3"],q=["v4"],pe={zero:0,one:1,two:2,few:3,many:4,other:5},B=()=>{const k={};return Ie.forEach(f=>{f.lngs.forEach(p=>{k[p]={numbers:f.nr,plurals:w[f.fc]}})}),k};class Z{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=f,this.options=p,this.logger=fe.create("pluralResolver"),(!this.options.compatibilityJSON||q.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=B(),this.pluralRulesCache={}}addRule(f,p){this.rules[f]=p}clearCache(){this.pluralRulesCache={}}getRule(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const m=ne(f==="dev"?"en":f),x=p.ordinal?"ordinal":"cardinal",E=JSON.stringify({cleanedCode:m,type:x});if(E in this.pluralRulesCache)return this.pluralRulesCache[E];let N;try{N=new Intl.PluralRules(m,{type:x})}catch{if(!f.match(/-|_/))return;const M=this.languageUtils.getLanguagePartFromCode(f);N=this.getRule(M,p)}return this.pluralRulesCache[E]=N,N}return this.rules[f]||this.rules[this.languageUtils.getLanguagePartFromCode(f)]}needsPlural(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(f,p);return this.shouldUseIntlApi()?m&&m.resolvedOptions().pluralCategories.length>1:m&&m.numbers.length>1}getPluralFormsOfKey(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(f,m).map(x=>`${p}${x}`)}getSuffixes(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(f,p);return m?this.shouldUseIntlApi()?m.resolvedOptions().pluralCategories.sort((x,E)=>pe[x]-pe[E]).map(x=>`${this.options.prepend}${p.ordinal?`ordinal${this.options.prepend}`:""}${x}`):m.numbers.map(x=>this.getSuffix(f,x,p)):[]}getSuffix(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const x=this.getRule(f,m);return x?this.shouldUseIntlApi()?`${this.options.prepend}${m.ordinal?`ordinal${this.options.prepend}`:""}${x.select(p)}`:this.getSuffixRetroCompatible(x,p):(this.logger.warn(`no plural rule found for: ${f}`),"")}getSuffixRetroCompatible(f,p){const m=f.noAbs?f.plurals(p):f.plurals(Math.abs(p));let x=f.numbers[m];this.options.simplifyPluralSuffix&&f.numbers.length===2&&f.numbers[0]===1&&(x===2?x="plural":x===1&&(x=""));const E=()=>this.options.prepend&&x.toString()?this.options.prepend+x.toString():x.toString();return this.options.compatibilityJSON==="v1"?x===1?"":typeof x=="number"?`_plural_${x.toString()}`:E():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&f.numbers.length===2&&f.numbers[0]===1?E():this.options.prepend&&m.toString()?this.options.prepend+m.toString():m.toString()}shouldUseIntlApi(){return!T.includes(this.options.compatibilityJSON)}}const W=function(k,f,p){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",x=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,E=P(k,f,p);return!E&&x&&r(p)&&(E=ge(k,p,m),E===void 0&&(E=ge(f,p,m))),E},oe=k=>k.replace(/\$/g,"$$$$");class ae{constructor(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=fe.create("interpolator"),this.options=f,this.format=f.interpolation&&f.interpolation.format||(p=>p),this.init(f)}init(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};f.interpolation||(f.interpolation={escapeValue:!0});const{escape:p,escapeValue:m,useRawValueToEscape:x,prefix:E,prefixEscaped:N,suffix:I,suffixEscaped:M,formatSeparator:Q,unescapeSuffix:ee,unescapePrefix:ue,nestingPrefix:K,nestingPrefixEscaped:Se,nestingSuffix:_e,nestingSuffixEscaped:Ke,nestingOptionsSeparator:ze,maxReplaces:tt,alwaysFormat:nt}=f.interpolation;this.escape=p!==void 0?p:V,this.escapeValue=m!==void 0?m:!0,this.useRawValueToEscape=x!==void 0?x:!1,this.prefix=E?F(E):N||"{{",this.suffix=I?F(I):M||"}}",this.formatSeparator=Q||",",this.unescapePrefix=ee?"":ue||"-",this.unescapeSuffix=this.unescapePrefix?"":ee||"",this.nestingPrefix=K?F(K):Se||F("$t("),this.nestingSuffix=_e?F(_e):Ke||F(")"),this.nestingOptionsSeparator=ze||",",this.maxReplaces=tt||1e3,this.alwaysFormat=nt!==void 0?nt:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const f=(p,m)=>p&&p.source===m?(p.lastIndex=0,p):new RegExp(m,"g");this.regexp=f(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=f(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=f(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(f,p,m,x){let E,N,I;const M=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},Q=Se=>{if(Se.indexOf(this.formatSeparator)<0){const tt=W(p,M,Se,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(tt,void 0,m,{...x,...p,interpolationkey:Se}):tt}const _e=Se.split(this.formatSeparator),Ke=_e.shift().trim(),ze=_e.join(this.formatSeparator).trim();return this.format(W(p,M,Ke,this.options.keySeparator,this.options.ignoreJSONStructure),ze,m,{...x,...p,interpolationkey:Ke})};this.resetRegExp();const ee=x&&x.missingInterpolationHandler||this.options.missingInterpolationHandler,ue=x&&x.interpolation&&x.interpolation.skipOnVariables!==void 0?x.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:Se=>oe(Se)},{regex:this.regexp,safeValue:Se=>this.escapeValue?oe(this.escape(Se)):oe(Se)}].forEach(Se=>{for(I=0;E=Se.regex.exec(f);){const _e=E[1].trim();if(N=Q(_e),N===void 0)if(typeof ee=="function"){const ze=ee(f,E,x);N=r(ze)?ze:""}else if(x&&Object.prototype.hasOwnProperty.call(x,_e))N="";else if(ue){N=E[0];continue}else this.logger.warn(`missed to pass in variable ${_e} for interpolating ${f}`),N="";else!r(N)&&!this.useRawValueToEscape&&(N=l(N));const Ke=Se.safeValue(N);if(f=f.replace(E[0],Ke),ue?(Se.regex.lastIndex+=N.length,Se.regex.lastIndex-=E[0].length):Se.regex.lastIndex=0,I++,I>=this.maxReplaces)break}}),f}nest(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x,E,N;const I=(M,Q)=>{const ee=this.nestingOptionsSeparator;if(M.indexOf(ee)<0)return M;const ue=M.split(new RegExp(`${ee}[ ]*{`));let K=`{${ue[1]}`;M=ue[0],K=this.interpolate(K,N);const Se=K.match(/'/g),_e=K.match(/"/g);(Se&&Se.length%2===0&&!_e||_e.length%2!==0)&&(K=K.replace(/'/g,'"'));try{N=JSON.parse(K),Q&&(N={...Q,...N})}catch(Ke){return this.logger.warn(`failed parsing options string in nesting for key ${M}`,Ke),`${M}${ee}${K}`}return N.defaultValue&&N.defaultValue.indexOf(this.prefix)>-1&&delete N.defaultValue,M};for(;x=this.nestingRegexp.exec(f);){let M=[];N={...m},N=N.replace&&!r(N.replace)?N.replace:N,N.applyPostProcessor=!1,delete N.defaultValue;let Q=!1;if(x[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(x[1])){const ee=x[1].split(this.formatSeparator).map(ue=>ue.trim());x[1]=ee.shift(),M=ee,Q=!0}if(E=p(I.call(this,x[1].trim(),N),N),E&&x[0]===f&&!r(E))return E;r(E)||(E=l(E)),E||(this.logger.warn(`missed to resolve ${x[1]} for nesting ${f}`),E=""),Q&&(E=M.reduce((ee,ue)=>this.format(ee,ue,m.lng,{...m,interpolationkey:x[1].trim()}),E.trim())),f=f.replace(x[0],E),this.regexp.lastIndex=0}return f}}const Re=k=>{let f=k.toLowerCase().trim();const p={};if(k.indexOf("(")>-1){const m=k.split("(");f=m[0].toLowerCase().trim();const x=m[1].substring(0,m[1].length-1);f==="currency"&&x.indexOf(":")<0?p.currency||(p.currency=x.trim()):f==="relativetime"&&x.indexOf(":")<0?p.range||(p.range=x.trim()):x.split(";").forEach(N=>{if(N){const[I,...M]=N.split(":"),Q=M.join(":").trim().replace(/^'+|'+$/g,""),ee=I.trim();p[ee]||(p[ee]=Q),Q==="false"&&(p[ee]=!1),Q==="true"&&(p[ee]=!0),isNaN(Q)||(p[ee]=parseInt(Q,10))}})}return{formatName:f,formatOptions:p}},be=k=>{const f={};return(p,m,x)=>{let E=x;x&&x.interpolationkey&&x.formatParams&&x.formatParams[x.interpolationkey]&&x[x.interpolationkey]&&(E={...E,[x.interpolationkey]:void 0});const N=m+JSON.stringify(E);let I=f[N];return I||(I=k(ne(m),x),f[N]=I),I(p)}};class pt{constructor(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=fe.create("formatter"),this.options=f,this.formats={number:be((p,m)=>{const x=new Intl.NumberFormat(p,{...m});return E=>x.format(E)}),currency:be((p,m)=>{const x=new Intl.NumberFormat(p,{...m,style:"currency"});return E=>x.format(E)}),datetime:be((p,m)=>{const x=new Intl.DateTimeFormat(p,{...m});return E=>x.format(E)}),relativetime:be((p,m)=>{const x=new Intl.RelativeTimeFormat(p,{...m});return E=>x.format(E,m.range||"day")}),list:be((p,m)=>{const x=new Intl.ListFormat(p,{...m});return E=>x.format(E)})},this.init(f)}init(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=p.interpolation.formatSeparator||","}add(f,p){this.formats[f.toLowerCase().trim()]=p}addCached(f,p){this.formats[f.toLowerCase().trim()]=be(p)}format(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=p.split(this.formatSeparator);if(E.length>1&&E[0].indexOf("(")>1&&E[0].indexOf(")")<0&&E.find(I=>I.indexOf(")")>-1)){const I=E.findIndex(M=>M.indexOf(")")>-1);E[0]=[E[0],...E.splice(1,I)].join(this.formatSeparator)}return E.reduce((I,M)=>{const{formatName:Q,formatOptions:ee}=Re(M);if(this.formats[Q]){let ue=I;try{const K=x&&x.formatParams&&x.formatParams[x.interpolationkey]||{},Se=K.locale||K.lng||x.locale||x.lng||m;ue=this.formats[Q](I,Se,{...ee,...x,...K})}catch(K){this.logger.warn(K)}return ue}else this.logger.warn(`there was no format function for ${Q}`);return I},f)}}const De=(k,f)=>{k.pending[f]!==void 0&&(delete k.pending[f],k.pendingCount--)};class Me extends Ee{constructor(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=f,this.store=p,this.services=m,this.languageUtils=m.languageUtils,this.options=x,this.logger=fe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=x.maxParallelReads||10,this.readingCalls=0,this.maxRetries=x.maxRetries>=0?x.maxRetries:5,this.retryTimeout=x.retryTimeout>=1?x.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(m,x.backend,x)}queueLoad(f,p,m,x){const E={},N={},I={},M={};return f.forEach(Q=>{let ee=!0;p.forEach(ue=>{const K=`${Q}|${ue}`;!m.reload&&this.store.hasResourceBundle(Q,ue)?this.state[K]=2:this.state[K]<0||(this.state[K]===1?N[K]===void 0&&(N[K]=!0):(this.state[K]=1,ee=!1,N[K]===void 0&&(N[K]=!0),E[K]===void 0&&(E[K]=!0),M[ue]===void 0&&(M[ue]=!0)))}),ee||(I[Q]=!0)}),(Object.keys(E).length||Object.keys(N).length)&&this.queue.push({pending:N,pendingCount:Object.keys(N).length,loaded:{},errors:[],callback:x}),{toLoad:Object.keys(E),pending:Object.keys(N),toLoadLanguages:Object.keys(I),toLoadNamespaces:Object.keys(M)}}loaded(f,p,m){const x=f.split("|"),E=x[0],N=x[1];p&&this.emit("failedLoading",E,N,p),!p&&m&&this.store.addResourceBundle(E,N,m,void 0,void 0,{skipCopy:!0}),this.state[f]=p?-1:2,p&&m&&(this.state[f]=0);const I={};this.queue.forEach(M=>{C(M.loaded,[E],N),De(M,f),p&&M.errors.push(p),M.pendingCount===0&&!M.done&&(Object.keys(M.loaded).forEach(Q=>{I[Q]||(I[Q]={});const ee=M.loaded[Q];ee.length&&ee.forEach(ue=>{I[Q][ue]===void 0&&(I[Q][ue]=!0)})}),M.done=!0,M.errors.length?M.callback(M.errors):M.callback())}),this.emit("loaded",I),this.queue=this.queue.filter(M=>!M.done)}read(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,N=arguments.length>5?arguments[5]:void 0;if(!f.length)return N(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:f,ns:p,fcName:m,tried:x,wait:E,callback:N});return}this.readingCalls++;const I=(Q,ee)=>{if(this.readingCalls--,this.waitingReads.length>0){const ue=this.waitingReads.shift();this.read(ue.lng,ue.ns,ue.fcName,ue.tried,ue.wait,ue.callback)}if(Q&&ee&&x<this.maxRetries){setTimeout(()=>{this.read.call(this,f,p,m,x+1,E*2,N)},E);return}N(Q,ee)},M=this.backend[m].bind(this.backend);if(M.length===2){try{const Q=M(f,p);Q&&typeof Q.then=="function"?Q.then(ee=>I(null,ee)).catch(I):I(null,Q)}catch(Q){I(Q)}return}return M(f,p,I)}prepareLoading(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=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."),x&&x();r(f)&&(f=this.languageUtils.toResolveHierarchy(f)),r(p)&&(p=[p]);const E=this.queueLoad(f,p,m,x);if(!E.toLoad.length)return E.pending.length||x(),null;E.toLoad.forEach(N=>{this.loadOne(N)})}load(f,p,m){this.prepareLoading(f,p,{},m)}reload(f,p,m){this.prepareLoading(f,p,{reload:!0},m)}loadOne(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const m=f.split("|"),x=m[0],E=m[1];this.read(x,E,"read",void 0,void 0,(N,I)=>{N&&this.logger.warn(`${p}loading namespace ${E} for language ${x} failed`,N),!N&&I&&this.logger.log(`${p}loaded namespace ${E} for language ${x}`,I),this.loaded(f,N,I)})}saveMissing(f,p,m,x,E){let N=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},I=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(p)){this.logger.warn(`did not save key "${m}" as the namespace "${p}" 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(!(m==null||m==="")){if(this.backend&&this.backend.create){const M={...N,isUpdate:E},Q=this.backend.create.bind(this.backend);if(Q.length<6)try{let ee;Q.length===5?ee=Q(f,p,m,x,M):ee=Q(f,p,m,x),ee&&typeof ee.then=="function"?ee.then(ue=>I(null,ue)).catch(I):I(null,ee)}catch(ee){I(ee)}else Q(f,p,m,x,I,M)}!f||!f[0]||this.store.addResource(f[0],p,m,x)}}}const Be=()=>({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:k=>{let f={};if(typeof k[1]=="object"&&(f=k[1]),r(k[1])&&(f.defaultValue=k[1]),r(k[2])&&(f.tDescription=k[2]),typeof k[2]=="object"||typeof k[3]=="object"){const p=k[3]||k[2];Object.keys(p).forEach(m=>{f[m]=p[m]})}return f},interpolation:{escapeValue:!0,format:k=>k,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Fe=k=>(r(k.ns)&&(k.ns=[k.ns]),r(k.fallbackLng)&&(k.fallbackLng=[k.fallbackLng]),r(k.fallbackNS)&&(k.fallbackNS=[k.fallbackNS]),k.supportedLngs&&k.supportedLngs.indexOf("cimode")<0&&(k.supportedLngs=k.supportedLngs.concat(["cimode"])),k),Ge=()=>{},yt=k=>{Object.getOwnPropertyNames(Object.getPrototypeOf(k)).forEach(p=>{typeof k[p]=="function"&&(k[p]=k[p].bind(k))})};class ot extends Ee{constructor(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Fe(f),this.services={},this.logger=fe,this.modules={external:[]},yt(this),p&&!this.isInitialized&&!f.isClone){if(!this.options.initImmediate)return this.init(f,p),this;setTimeout(()=>{this.init(f,p)},0)}}init(){var f=this;let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof p=="function"&&(m=p,p={}),!p.defaultNS&&p.defaultNS!==!1&&p.ns&&(r(p.ns)?p.defaultNS=p.ns:p.ns.indexOf("translation")<0&&(p.defaultNS=p.ns[0]));const x=Be();this.options={...x,...this.options,...Fe(p)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...x.interpolation,...this.options.interpolation}),p.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=p.keySeparator),p.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=p.nsSeparator);const E=ee=>ee?typeof ee=="function"?new ee:ee:null;if(!this.options.isClone){this.modules.logger?fe.init(E(this.modules.logger),this.options):fe.init(null,this.options);let ee;this.modules.formatter?ee=this.modules.formatter:typeof Intl<"u"&&(ee=pt);const ue=new Oe(this.options);this.store=new L(this.options.resources,this.options);const K=this.services;K.logger=fe,K.resourceStore=this.store,K.languageUtils=ue,K.pluralResolver=new Z(ue,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),ee&&(!this.options.interpolation.format||this.options.interpolation.format===x.interpolation.format)&&(K.formatter=E(ee),K.formatter.init(K,this.options),this.options.interpolation.format=K.formatter.format.bind(K.formatter)),K.interpolator=new ae(this.options),K.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},K.backendConnector=new Me(E(this.modules.backend),K.resourceStore,K,this.options),K.backendConnector.on("*",function(Se){for(var _e=arguments.length,Ke=new Array(_e>1?_e-1:0),ze=1;ze<_e;ze++)Ke[ze-1]=arguments[ze];f.emit(Se,...Ke)}),this.modules.languageDetector&&(K.languageDetector=E(this.modules.languageDetector),K.languageDetector.init&&K.languageDetector.init(K,this.options.detection,this.options)),this.modules.i18nFormat&&(K.i18nFormat=E(this.modules.i18nFormat),K.i18nFormat.init&&K.i18nFormat.init(this)),this.translator=new se(this.services,this.options),this.translator.on("*",function(Se){for(var _e=arguments.length,Ke=new Array(_e>1?_e-1:0),ze=1;ze<_e;ze++)Ke[ze-1]=arguments[ze];f.emit(Se,...Ke)}),this.modules.external.forEach(Se=>{Se.init&&Se.init(this)})}if(this.format=this.options.interpolation.format,m||(m=Ge),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const ee=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);ee.length>0&&ee[0]!=="dev"&&(this.options.lng=ee[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(ee=>{this[ee]=function(){return f.store[ee](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(ee=>{this[ee]=function(){return f.store[ee](...arguments),f}});const M=s(),Q=()=>{const ee=(ue,K)=>{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),M.resolve(K),m(ue,K)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return ee(null,this.t.bind(this));this.changeLanguage(this.options.lng,ee)};return this.options.resources||!this.options.initImmediate?Q():setTimeout(Q,0),M}loadResources(f){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const x=r(f)?f:this.language;if(typeof f=="function"&&(m=f),!this.options.resources||this.options.partialBundledLanguages){if(x&&x.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return m();const E=[],N=I=>{if(!I||I==="cimode")return;this.services.languageUtils.toResolveHierarchy(I).forEach(Q=>{Q!=="cimode"&&E.indexOf(Q)<0&&E.push(Q)})};x?N(x):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(M=>N(M)),this.options.preload&&this.options.preload.forEach(I=>N(I)),this.services.backendConnector.load(E,this.options.ns,I=>{!I&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),m(I)})}else m(null)}reloadResources(f,p,m){const x=s();return typeof f=="function"&&(m=f,f=void 0),typeof p=="function"&&(m=p,p=void 0),f||(f=this.languages),p||(p=this.options.ns),m||(m=Ge),this.services.backendConnector.reload(f,p,E=>{x.resolve(),m(E)}),x}use(f){if(!f)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!f.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return f.type==="backend"&&(this.modules.backend=f),(f.type==="logger"||f.log&&f.warn&&f.error)&&(this.modules.logger=f),f.type==="languageDetector"&&(this.modules.languageDetector=f),f.type==="i18nFormat"&&(this.modules.i18nFormat=f),f.type==="postProcessor"&&z.addPostProcessor(f),f.type==="formatter"&&(this.modules.formatter=f),f.type==="3rdParty"&&this.modules.external.push(f),this}setResolvedLanguage(f){if(!(!f||!this.languages)&&!(["cimode","dev"].indexOf(f)>-1))for(let p=0;p<this.languages.length;p++){const m=this.languages[p];if(!(["cimode","dev"].indexOf(m)>-1)&&this.store.hasLanguageSomeTranslations(m)){this.resolvedLanguage=m;break}}}changeLanguage(f,p){var m=this;this.isLanguageChangingTo=f;const x=s();this.emit("languageChanging",f);const E=M=>{this.language=M,this.languages=this.services.languageUtils.toResolveHierarchy(M),this.resolvedLanguage=void 0,this.setResolvedLanguage(M)},N=(M,Q)=>{Q?(E(Q),this.translator.changeLanguage(Q),this.isLanguageChangingTo=void 0,this.emit("languageChanged",Q),this.logger.log("languageChanged",Q)):this.isLanguageChangingTo=void 0,x.resolve(function(){return m.t(...arguments)}),p&&p(M,function(){return m.t(...arguments)})},I=M=>{!f&&!M&&this.services.languageDetector&&(M=[]);const Q=r(M)?M:this.services.languageUtils.getBestMatchFromCodes(M);Q&&(this.language||E(Q),this.translator.language||this.translator.changeLanguage(Q),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(Q)),this.loadResources(Q,ee=>{N(ee,Q)})};return!f&&this.services.languageDetector&&!this.services.languageDetector.async?I(this.services.languageDetector.detect()):!f&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(I):this.services.languageDetector.detect(I):I(f),x}getFixedT(f,p,m){var x=this;const E=function(N,I){let M;if(typeof I!="object"){for(var Q=arguments.length,ee=new Array(Q>2?Q-2:0),ue=2;ue<Q;ue++)ee[ue-2]=arguments[ue];M=x.options.overloadTranslationOptionHandler([N,I].concat(ee))}else M={...I};M.lng=M.lng||E.lng,M.lngs=M.lngs||E.lngs,M.ns=M.ns||E.ns,M.keyPrefix!==""&&(M.keyPrefix=M.keyPrefix||m||E.keyPrefix);const K=x.options.keySeparator||".";let Se;return M.keyPrefix&&Array.isArray(N)?Se=N.map(_e=>`${M.keyPrefix}${K}${_e}`):Se=M.keyPrefix?`${M.keyPrefix}${K}${N}`:N,x.t(Se,M)};return r(f)?E.lng=f:E.lngs=f,E.ns=p,E.keyPrefix=m,E}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(f){this.options.defaultNS=f}hasLoadedNamespace(f){let p=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 m=p.lng||this.resolvedLanguage||this.languages[0],x=this.options?this.options.fallbackLng:!1,E=this.languages[this.languages.length-1];if(m.toLowerCase()==="cimode")return!0;const N=(I,M)=>{const Q=this.services.backendConnector.state[`${I}|${M}`];return Q===-1||Q===0||Q===2};if(p.precheck){const I=p.precheck(this,N);if(I!==void 0)return I}return!!(this.hasResourceBundle(m,f)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||N(m,f)&&(!x||N(E,f)))}loadNamespaces(f,p){const m=s();return this.options.ns?(r(f)&&(f=[f]),f.forEach(x=>{this.options.ns.indexOf(x)<0&&this.options.ns.push(x)}),this.loadResources(x=>{m.resolve(),p&&p(x)}),m):(p&&p(),Promise.resolve())}loadLanguages(f,p){const m=s();r(f)&&(f=[f]);const x=this.options.preload||[],E=f.filter(N=>x.indexOf(N)<0&&this.services.languageUtils.isSupportedCode(N));return E.length?(this.options.preload=x.concat(E),this.loadResources(N=>{m.resolve(),p&&p(N)}),m):(p&&p(),Promise.resolve())}dir(f){if(f||(f=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!f)return"rtl";const p=["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"],m=this.services&&this.services.languageUtils||new Oe(Be());return p.indexOf(m.getLanguagePartFromCode(f))>-1||f.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1?arguments[1]:void 0;return new ot(f,p)}cloneInstance(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const m=f.forkResourceStore;m&&delete f.forkResourceStore;const x={...this.options,...f,isClone:!0},E=new ot(x);return(f.debug!==void 0||f.prefix!==void 0)&&(E.logger=E.logger.clone(f)),["store","services","language"].forEach(I=>{E[I]=this[I]}),E.services={...this.services},E.services.utils={hasLoadedNamespace:E.hasLoadedNamespace.bind(E)},m&&(E.store=new L(this.store.data,x),E.services.resourceStore=E.store),E.translator=new se(E.services,x),E.translator.on("*",function(I){for(var M=arguments.length,Q=new Array(M>1?M-1:0),ee=1;ee<M;ee++)Q[ee-1]=arguments[ee];E.emit(I,...Q)}),E.init(x,p),E.translator.options=x,E.translator.backendConnector.services.utils={hasLoadedNamespace:E.hasLoadedNamespace.bind(E)},E}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ze=ot.createInstance();return Ze.createInstance=ot.createInstance,Zo=Ze,Zo}const yu=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),Gn=Wh(yu);var As={exports:{}},Os={},ei={exports:{}},vu;function rg(){return vu||(vu=1,(function(r){var s=Gn,l=Gn;function i(c){return l.existsSync(s.join(c,"package.json"))}function u(c,d){if(c=c||r.parent.filename,d=d||i,typeof c=="string"&&(c[c.length-1]!==s.sep&&(c+=s.sep),c=c.split(s.sep)),!c.length)throw new Error("package.json not found in path");c.pop();var v=c.join(s.sep);try{if(d(v))return v}catch{}return u(c,d)}r.exports=u})(ei)),ei.exports}var ti={exports:{}},ni,wu;function Su(){if(wu)return ni;wu=1;var r=Object.prototype.toString;return ni=function(l){var i=r.call(l),u=i==="[object Arguments]";return u||(u=i!=="[object Array]"&&l!==null&&typeof l=="object"&&typeof l.length=="number"&&l.length>=0&&r.call(l.callee)==="[object Function]"),u},ni}var ri,xu;function sg(){if(xu)return ri;xu=1;var r;if(!Object.keys){var s=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Su(),u=Object.prototype.propertyIsEnumerable,c=!u.call({toString:null},"toString"),d=u.call(function(){},"prototype"),v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],g=function(O){var F=O.constructor;return F&&F.prototype===O},C={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},$=(function(){if(typeof window>"u")return!1;for(var O in window)try{if(!C["$"+O]&&s.call(window,O)&&window[O]!==null&&typeof window[O]=="object")try{g(window[O])}catch{return!0}}catch{return!0}return!1})(),P=function(O){if(typeof window>"u"||!$)return g(O);try{return g(O)}catch{return!1}};r=function(F){var b=F!==null&&typeof F=="object",V=l.call(F)==="[object Function]",U=i(F),J=b&&l.call(F)==="[object String]",re=[];if(!b&&!V&&!U)throw new TypeError("Object.keys called on a non-object");var we=d&&V;if(J&&F.length>0&&!s.call(F,0))for(var ge=0;ge<F.length;++ge)re.push(String(ge));if(U&&F.length>0)for(var ne=0;ne<F.length;++ne)re.push(String(ne));else for(var me in F)!(we&&me==="prototype")&&s.call(F,me)&&re.push(String(me));if(c)for(var ie=P(F),fe=0;fe<v.length;++fe)!(ie&&v[fe]==="constructor")&&s.call(F,v[fe])&&re.push(v[fe]);return re}}return ri=r,ri}var si,Cu;function og(){if(Cu)return si;Cu=1;var r=Array.prototype.slice,s=Su(),l=Object.keys,i=l?function(d){return l(d)}:sg(),u=Object.keys;return i.shim=function(){if(Object.keys){var d=(function(){var v=Object.keys(arguments);return v&&v.length===arguments.length})(1,2);d||(Object.keys=function(g){return s(g)?u(r.call(g)):u(g)})}else Object.keys=i;return Object.keys||i},si=i,si}var oi,ku;function Pu(){return ku||(ku=1,oi=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},l=Symbol("test"),i=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var u=42;s[l]=u;for(var c in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var d=Object.getOwnPropertySymbols(s);if(d.length!==1||d[0]!==l||!Object.prototype.propertyIsEnumerable.call(s,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(s,l);if(v.value!==u||v.enumerable!==!0)return!1}return!0}),oi}var ii,Eu;function li(){return Eu||(Eu=1,ii=Object),ii}var ai,$u;function ig(){return $u||($u=1,ai=Error),ai}var ui,ju;function lg(){return ju||(ju=1,ui=EvalError),ui}var ci,Au;function ag(){return Au||(Au=1,ci=RangeError),ci}var fi,Ou;function ug(){return Ou||(Ou=1,fi=ReferenceError),fi}var hi,Tu;function cg(){return Tu||(Tu=1,hi=SyntaxError),hi}var di,Nu;function Ru(){return Nu||(Nu=1,di=TypeError),di}var pi,_u;function fg(){return _u||(_u=1,pi=URIError),pi}var gi,Lu;function hg(){return Lu||(Lu=1,gi=Math.abs),gi}var mi,Fu;function dg(){return Fu||(Fu=1,mi=Math.floor),mi}var yi,Iu;function pg(){return Iu||(Iu=1,yi=Math.max),yi}var vi,Du;function gg(){return Du||(Du=1,vi=Math.min),vi}var wi,Mu;function mg(){return Mu||(Mu=1,wi=Math.pow),wi}var Si,zu;function yg(){return zu||(zu=1,Si=Math.round),Si}var xi,bu;function vg(){return bu||(bu=1,xi=Number.isNaN||function(s){return s!==s}),xi}var Ci,Uu;function wg(){if(Uu)return Ci;Uu=1;var r=vg();return Ci=function(l){return r(l)||l===0?l:l<0?-1:1},Ci}var ki,Bu;function Sg(){return Bu||(Bu=1,ki=Object.getOwnPropertyDescriptor),ki}var Pi,qu;function Vu(){if(qu)return Pi;qu=1;var r=Sg();if(r)try{r([],"length")}catch{r=null}return Pi=r,Pi}var Ei,Hu;function xg(){if(Hu)return Ei;Hu=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Ei=r,Ei}var $i,Wu;function Cg(){if(Wu)return $i;Wu=1;var r=typeof Symbol<"u"&&Symbol,s=Pu();return $i=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},$i}var ji,Ku;function Gu(){return Ku||(Ku=1,ji=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ji}var Ai,Ju;function Qu(){if(Ju)return Ai;Ju=1;var r=li();return Ai=r.getPrototypeOf||null,Ai}var Oi,Yu;function kg(){if(Yu)return Oi;Yu=1;var r="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,l=Math.max,i="[object Function]",u=function(g,C){for(var $=[],P=0;P<g.length;P+=1)$[P]=g[P];for(var O=0;O<C.length;O+=1)$[O+g.length]=C[O];return $},c=function(g,C){for(var $=[],P=C,O=0;P<g.length;P+=1,O+=1)$[O]=g[P];return $},d=function(v,g){for(var C="",$=0;$<v.length;$+=1)C+=v[$],$+1<v.length&&(C+=g);return C};return Oi=function(g){var C=this;if(typeof C!="function"||s.apply(C)!==i)throw new TypeError(r+C);for(var $=c(arguments,1),P,O=function(){if(this instanceof P){var J=C.apply(this,u($,arguments));return Object(J)===J?J:this}return C.apply(g,u($,arguments))},F=l(0,C.length-$.length),b=[],V=0;V<F;V++)b[V]="$"+V;if(P=Function("binder","return function ("+d(b,",")+"){ return binder.apply(this,arguments); }")(O),C.prototype){var U=function(){};U.prototype=C.prototype,P.prototype=new U,U.prototype=null}return P},Oi}var Ti,Xu;function Ts(){if(Xu)return Ti;Xu=1;var r=kg();return Ti=Function.prototype.bind||r,Ti}var Ni,Zu;function Ri(){return Zu||(Zu=1,Ni=Function.prototype.call),Ni}var _i,ec;function tc(){return ec||(ec=1,_i=Function.prototype.apply),_i}var Li,nc;function Pg(){return nc||(nc=1,Li=typeof Reflect<"u"&&Reflect&&Reflect.apply),Li}var Fi,rc;function Eg(){if(rc)return Fi;rc=1;var r=Ts(),s=tc(),l=Ri(),i=Pg();return Fi=i||r.call(l,s),Fi}var Ii,sc;function oc(){if(sc)return Ii;sc=1;var r=Ts(),s=Ru(),l=Ri(),i=Eg();return Ii=function(c){if(c.length<1||typeof c[0]!="function")throw new s("a function is required");return i(r,l,c)},Ii}var Di,ic;function $g(){if(ic)return Di;ic=1;var r=oc(),s=Vu(),l;try{l=[].__proto__===Array.prototype}catch(d){if(!d||typeof d!="object"||!("code"in d)||d.code!=="ERR_PROTO_ACCESS")throw d}var i=!!l&&s&&s(Object.prototype,"__proto__"),u=Object,c=u.getPrototypeOf;return Di=i&&typeof i.get=="function"?r([i.get]):typeof c=="function"?function(v){return c(v==null?v:u(v))}:!1,Di}var Mi,lc;function jg(){if(lc)return Mi;lc=1;var r=Gu(),s=Qu(),l=$g();return Mi=r?function(u){return r(u)}:s?function(u){if(!u||typeof u!="object"&&typeof u!="function")throw new TypeError("getProto: not an object");return s(u)}:l?function(u){return l(u)}:null,Mi}var zi,ac;function Ag(){if(ac)return zi;ac=1;var r=Function.prototype.call,s=Object.prototype.hasOwnProperty,l=Ts();return zi=l.call(r,s),zi}var bi,uc;function Og(){if(uc)return bi;uc=1;var r,s=li(),l=ig(),i=lg(),u=ag(),c=ug(),d=cg(),v=Ru(),g=fg(),C=hg(),$=dg(),P=pg(),O=gg(),F=mg(),b=yg(),V=wg(),U=Function,J=function(De){try{return U('"use strict"; return ('+De+").constructor;")()}catch{}},re=Vu(),we=xg(),ge=function(){throw new v},ne=re?(function(){try{return arguments.callee,ge}catch{try{return re(arguments,"callee").get}catch{return ge}}})():ge,me=Cg()(),ie=jg(),fe=Qu(),Ee=Gu(),L=tc(),z=Ri(),Y={},se=typeof Uint8Array>"u"||!ie?r:ie(Uint8Array),de={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":me&&ie?ie([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":Y,"%AsyncGenerator%":Y,"%AsyncGeneratorFunction%":Y,"%AsyncIteratorPrototype%":Y,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":l,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":U,"%GeneratorFunction%":Y,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":me&&ie?ie(ie([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!me||!ie?r:ie(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":re,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":u,"%ReferenceError%":c,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!me||!ie?r:ie(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":me&&ie?ie(""[Symbol.iterator]()):r,"%Symbol%":me?Symbol:r,"%SyntaxError%":d,"%ThrowTypeError%":ne,"%TypedArray%":se,"%TypeError%":v,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":g,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":z,"%Function.prototype.apply%":L,"%Object.defineProperty%":we,"%Object.getPrototypeOf%":fe,"%Math.abs%":C,"%Math.floor%":$,"%Math.max%":P,"%Math.min%":O,"%Math.pow%":F,"%Math.round%":b,"%Math.sign%":V,"%Reflect.getPrototypeOf%":Ee};if(ie)try{null.error}catch(De){var Oe=ie(ie(De));de["%Error.prototype%"]=Oe}var Ie=function De(Me){var Be;if(Me==="%AsyncFunction%")Be=J("async function () {}");else if(Me==="%GeneratorFunction%")Be=J("function* () {}");else if(Me==="%AsyncGeneratorFunction%")Be=J("async function* () {}");else if(Me==="%AsyncGenerator%"){var Fe=De("%AsyncGeneratorFunction%");Fe&&(Be=Fe.prototype)}else if(Me==="%AsyncIteratorPrototype%"){var Ge=De("%AsyncGenerator%");Ge&&ie&&(Be=ie(Ge.prototype))}return de[Me]=Be,Be},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=Ts(),q=Ag(),pe=T.call(z,Array.prototype.concat),B=T.call(L,Array.prototype.splice),Z=T.call(z,String.prototype.replace),W=T.call(z,String.prototype.slice),oe=T.call(z,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Re=/\\(\\)?/g,be=function(Me){var Be=W(Me,0,1),Fe=W(Me,-1);if(Be==="%"&&Fe!=="%")throw new d("invalid intrinsic syntax, expected closing `%`");if(Fe==="%"&&Be!=="%")throw new d("invalid intrinsic syntax, expected opening `%`");var Ge=[];return Z(Me,ae,function(yt,ot,Ze,k){Ge[Ge.length]=Ze?Z(k,Re,"$1"):ot||yt}),Ge},pt=function(Me,Be){var Fe=Me,Ge;if(q(w,Fe)&&(Ge=w[Fe],Fe="%"+Ge[0]+"%"),q(de,Fe)){var yt=de[Fe];if(yt===Y&&(yt=Ie(Fe)),typeof yt>"u"&&!Be)throw new v("intrinsic "+Me+" exists, but is not available. Please file an issue!");return{alias:Ge,name:Fe,value:yt}}throw new d("intrinsic "+Me+" does not exist!")};return bi=function(Me,Be){if(typeof Me!="string"||Me.length===0)throw new v("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Be!="boolean")throw new v('"allowMissing" argument must be a boolean');if(oe(/^%?[^%]*%?$/,Me)===null)throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Fe=be(Me),Ge=Fe.length>0?Fe[0]:"",yt=pt("%"+Ge+"%",Be),ot=yt.name,Ze=yt.value,k=!1,f=yt.alias;f&&(Ge=f[0],B(Fe,pe([0,1],f)));for(var p=1,m=!0;p<Fe.length;p+=1){var x=Fe[p],E=W(x,0,1),N=W(x,-1);if((E==='"'||E==="'"||E==="`"||N==='"'||N==="'"||N==="`")&&E!==N)throw new d("property names with quotes must have matching quotes");if((x==="constructor"||!m)&&(k=!0),Ge+="."+x,ot="%"+Ge+"%",q(de,ot))Ze=de[ot];else if(Ze!=null){if(!(x in Ze)){if(!Be)throw new v("base intrinsic for "+Me+" exists, but the property is not available.");return}if(re&&p+1>=Fe.length){var I=re(Ze,x);m=!!I,m&&"get"in I&&!("originalValue"in I.get)?Ze=I.get:Ze=Ze[x]}else m=q(Ze,x),Ze=Ze[x];m&&!k&&(de[ot]=Ze)}}return Ze},bi}var Ui,cc;function Tg(){if(cc)return Ui;cc=1;var r=Og(),s=oc(),l=s([r("%String.prototype.indexOf%")]);return Ui=function(u,c){var d=r(u,!!c);return typeof d=="function"&&l(u,".prototype.")>-1?s([d]):d},Ui}var Bi,fc;function Ng(){if(fc)return Bi;fc=1;var r=og(),s=Pu()(),l=Tg(),i=li(),u=l("Array.prototype.push"),c=l("Object.prototype.propertyIsEnumerable"),d=s?i.getOwnPropertySymbols:null;return Bi=function(g,C){if(g==null)throw new TypeError("target must be an object");var $=i(g);if(arguments.length===1)return $;for(var P=1;P<arguments.length;++P){var O=i(arguments[P]),F=r(O),b=s&&(i.getOwnPropertySymbols||d);if(b)for(var V=b(O),U=0;U<V.length;++U){var J=V[U];c(O,J)&&u(F,J)}for(var re=0;re<F.length;++re){var we=F[re];if(c(O,we)){var ge=O[we];$[we]=ge}}}return $},Bi}var qi,hc;function Rg(){if(hc)return qi;hc=1;var r=Ng(),s=function(){if(!Object.assign)return!1;for(var i="abcdefghijklmnopqrst",u=i.split(""),c={},d=0;d<u.length;++d)c[u[d]]=u[d];var v=Object.assign({},c),g="";for(var C in v)g+=C;return i!==g},l=function(){if(!Object.assign||!Object.preventExtensions)return!1;var i=Object.preventExtensions({1:2});try{Object.assign(i,"xy")}catch{return i[1]==="y"}return!1};return qi=function(){return!Object.assign||s()||l()?r:Object.assign},qi}var Vi={},Hi,dc;function _g(){return dc||(dc=1,Hi=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}),Hi}var Ns={exports:{}},pc;function Lg(){return pc||(pc=1,typeof Object.create=="function"?Ns.exports=function(s,l){s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:Ns.exports=function(s,l){s.super_=l;var i=function(){};i.prototype=l.prototype,s.prototype=new i,s.prototype.constructor=s}),Ns.exports}var gc;function Fg(){return gc||(gc=1,(function(r){var s=/%[sdj%]/g;r.format=function(w){if(!we(w)){for(var T=[],q=0;q<arguments.length;q++)T.push(u(arguments[q]));return T.join(" ")}for(var q=1,pe=arguments,B=pe.length,Z=String(w).replace(s,function(oe){if(oe==="%%")return"%";if(q>=B)return oe;switch(oe){case"%s":return String(pe[q++]);case"%d":return Number(pe[q++]);case"%j":try{return JSON.stringify(pe[q++])}catch{return"[Circular]"}default:return oe}}),W=pe[q];q<B;W=pe[++q])U(W)||!ie(W)?Z+=" "+W:Z+=" "+u(W);return Z},r.deprecate=function(w,T){if(ne(xr.process))return function(){return r.deprecate(w,T).apply(this,arguments)};if(process.noDeprecation===!0)return w;var q=!1;function pe(){if(!q){if(process.throwDeprecation)throw new Error(T);process.traceDeprecation?console.trace(T):console.error(T),q=!0}return w.apply(this,arguments)}return pe};var l={},i;r.debuglog=function(w){if(ne(i)&&(i=process.env.NODE_DEBUG||""),w=w.toUpperCase(),!l[w])if(new RegExp("\\b"+w+"\\b","i").test(i)){var T=process.pid;l[w]=function(){var q=r.format.apply(r,arguments);console.error("%s %d: %s",w,T,q)}}else l[w]=function(){};return l[w]};function u(w,T){var q={seen:[],stylize:d};return arguments.length>=3&&(q.depth=arguments[2]),arguments.length>=4&&(q.colors=arguments[3]),V(T)?q.showHidden=T:T&&r._extend(q,T),ne(q.showHidden)&&(q.showHidden=!1),ne(q.depth)&&(q.depth=2),ne(q.colors)&&(q.colors=!1),ne(q.customInspect)&&(q.customInspect=!0),q.colors&&(q.stylize=c),g(q,w,q.depth)}r.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(w,T){var q=u.styles[T];return q?"\x1B["+u.colors[q][0]+"m"+w+"\x1B["+u.colors[q][1]+"m":w}function d(w,T){return w}function v(w){var T={};return w.forEach(function(q,pe){T[q]=!0}),T}function g(w,T,q){if(w.customInspect&&T&&L(T.inspect)&&T.inspect!==r.inspect&&!(T.constructor&&T.constructor.prototype===T)){var pe=T.inspect(q,w);return we(pe)||(pe=g(w,pe,q)),pe}var B=C(w,T);if(B)return B;var Z=Object.keys(T),W=v(Z);if(w.showHidden&&(Z=Object.getOwnPropertyNames(T)),Ee(T)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return $(T);if(Z.length===0){if(L(T)){var oe=T.name?": "+T.name:"";return w.stylize("[Function"+oe+"]","special")}if(me(T))return w.stylize(RegExp.prototype.toString.call(T),"regexp");if(fe(T))return w.stylize(Date.prototype.toString.call(T),"date");if(Ee(T))return $(T)}var ae="",Re=!1,be=["{","}"];if(b(T)&&(Re=!0,be=["[","]"]),L(T)){var pt=T.name?": "+T.name:"";ae=" [Function"+pt+"]"}if(me(T)&&(ae=" "+RegExp.prototype.toString.call(T)),fe(T)&&(ae=" "+Date.prototype.toUTCString.call(T)),Ee(T)&&(ae=" "+$(T)),Z.length===0&&(!Re||T.length==0))return be[0]+ae+be[1];if(q<0)return me(T)?w.stylize(RegExp.prototype.toString.call(T),"regexp"):w.stylize("[Object]","special");w.seen.push(T);var De;return Re?De=P(w,T,q,W,Z):De=Z.map(function(Me){return O(w,T,q,W,Me,Re)}),w.seen.pop(),F(De,ae,be)}function C(w,T){if(ne(T))return w.stylize("undefined","undefined");if(we(T)){var q="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return w.stylize(q,"string")}if(re(T))return w.stylize(""+T,"number");if(V(T))return w.stylize(""+T,"boolean");if(U(T))return w.stylize("null","null")}function $(w){return"["+Error.prototype.toString.call(w)+"]"}function P(w,T,q,pe,B){for(var Z=[],W=0,oe=T.length;W<oe;++W)Ie(T,String(W))?Z.push(O(w,T,q,pe,String(W),!0)):Z.push("");return B.forEach(function(ae){ae.match(/^\d+$/)||Z.push(O(w,T,q,pe,ae,!0))}),Z}function O(w,T,q,pe,B,Z){var W,oe,ae;if(ae=Object.getOwnPropertyDescriptor(T,B)||{value:T[B]},ae.get?ae.set?oe=w.stylize("[Getter/Setter]","special"):oe=w.stylize("[Getter]","special"):ae.set&&(oe=w.stylize("[Setter]","special")),Ie(pe,B)||(W="["+B+"]"),oe||(w.seen.indexOf(ae.value)<0?(U(q)?oe=g(w,ae.value,null):oe=g(w,ae.value,q-1),oe.indexOf(`
18
+ `,l=this.context.stylesUrl;return l?te.jsxs(te.Fragment,{children:[te.jsx("link",{rel:"stylesheet",href:l}),te.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),te.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):te.jsxs(te.Fragment,{children:[te.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),te.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const s=id(),l={...s.frame.common};return te.jsx("div",{style:s.modalContainer,className:"gh-root-frame",children:te.jsxs(rd,{style:l,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[te.jsx("div",{onClick:i=>this.handlePopupClose(i),className:"absolute top-0 bottom-0 left-0 right-0 block backdrop-blur-[2px] animate-fadein z-0 bg-gradient-to-br from-[rgba(0,0,0,0.2)] to-[rgba(0,0,0,0.1)]"}),te.jsx(ld,{})]})})}render(){const{showPopup:s}=this.context;return s?this.renderFrameContainer():null}}var ve;function st(r,s,l){const i=typeof l,u=typeof r;if(i!=="undefined"){if(u!=="undefined"){if(l){if(u==="function"&&i===u)return function(v){return r(l(v))};if(s=r.constructor,s===l.constructor){if(s===Array)return l.concat(r);if(s===Map){var c=new Map(l);for(var d of r)c.set(d[0],d[1]);return c}if(s===Set){d=new Set(l);for(c of r.values())d.add(c);return d}}}return r}return l}return u==="undefined"?s:r}function Xe(){return Object.create(null)}function Rt(r){return typeof r=="string"}function Cr(r){return typeof r=="object"}function jd(r){const s=[];for(const l of r.keys())s.push(l);return s}function kr(r,s){if(Rt(s))r=r[s];else for(let l=0;r&&l<s.length;l++)r=r[s[l]];return r}function Ad(r){let s=0;for(let l=0,i;l<r.length;l++)(i=r[l])&&s<i.length&&(s=i.length);return s}const Od=/[^\p{L}\p{N}]+/u,Td=/(\d{3})/g,Nd=/(\D)(\d{3})/g,Rd=/(\d{3})(\D)/g,Da=/[\u0300-\u036f]/g;function Pr(r={}){if(!this||this.constructor!==Pr)return new Pr(...arguments);if(arguments.length)for(r=0;r<arguments.length;r++)this.assign(arguments[r]);else this.assign(r)}ve=Pr.prototype,ve.assign=function(r){this.normalize=st(r.normalize,!0,this.normalize);let s=r.include,l=s||r.exclude||r.split,i;if(l||l===""){if(typeof l=="object"&&l.constructor!==RegExp){let u="";i=!s,s||(u+="\\p{Z}"),l.letter&&(u+="\\p{L}"),l.number&&(u+="\\p{N}",i=!!s),l.symbol&&(u+="\\p{S}"),l.punctuation&&(u+="\\p{P}"),l.control&&(u+="\\p{C}"),(l=l.char)&&(u+=typeof l=="object"?l.join(""):l);try{this.split=new RegExp("["+(s?"^":"")+u+"]+","u")}catch{this.split=/\s+/}}else this.split=l,i=l===!1||2>"a1a".split(l).length;this.numeric=st(r.numeric,i)}else{try{this.split=st(this.split,Od)}catch{this.split=/\s+/}this.numeric=st(r.numeric,st(this.numeric,!0))}if(this.prepare=st(r.prepare,null,this.prepare),this.finalize=st(r.finalize,null,this.finalize),l=r.filter,this.filter=typeof l=="function"?l:st(l&&new Set(l),null,this.filter),this.dedupe=st(r.dedupe,!0,this.dedupe),this.matcher=st((l=r.matcher)&&new Map(l),null,this.matcher),this.mapper=st((l=r.mapper)&&new Map(l),null,this.mapper),this.stemmer=st((l=r.stemmer)&&new Map(l),null,this.stemmer),this.replacer=st(r.replacer,null,this.replacer),this.minlength=st(r.minlength,1,this.minlength),this.maxlength=st(r.maxlength,1024,this.maxlength),this.rtl=st(r.rtl,!1,this.rtl),(this.cache=l=st(r.cache,!0,this.cache))&&(this.H=null,this.S=typeof l=="number"?l:2e5,this.B=new Map,this.G=new Map,this.L=this.K=128),this.h="",this.M=null,this.A="",this.N=null,this.matcher)for(const u of this.matcher.keys())this.h+=(this.h?"|":"")+u;if(this.stemmer)for(const u of this.stemmer.keys())this.A+=(this.A?"|":"")+u;return this},ve.addStemmer=function(r,s){return this.stemmer||(this.stemmer=new Map),this.stemmer.set(r,s),this.A+=(this.A?"|":"")+r,this.N=null,this.cache&&En(this),this},ve.addFilter=function(r){return typeof r=="function"?this.filter=r:(this.filter||(this.filter=new Set),this.filter.add(r)),this.cache&&En(this),this},ve.addMapper=function(r,s){return typeof r=="object"?this.addReplacer(r,s):1<r.length?this.addMatcher(r,s):(this.mapper||(this.mapper=new Map),this.mapper.set(r,s),this.cache&&En(this),this)},ve.addMatcher=function(r,s){return typeof r=="object"?this.addReplacer(r,s):2>r.length&&(this.dedupe||this.mapper)?this.addMapper(r,s):(this.matcher||(this.matcher=new Map),this.matcher.set(r,s),this.h+=(this.h?"|":"")+r,this.M=null,this.cache&&En(this),this)},ve.addReplacer=function(r,s){return typeof r=="string"?this.addMatcher(r,s):(this.replacer||(this.replacer=[]),this.replacer.push(r,s),this.cache&&En(this),this)},ve.encode=function(r){if(this.cache&&r.length<=this.K)if(this.H){if(this.B.has(r))return this.B.get(r)}else this.H=setTimeout(En,50,this);this.normalize&&(typeof this.normalize=="function"?r=this.normalize(r):r=Da?r.normalize("NFKD").replace(Da,"").toLowerCase():r.toLowerCase()),this.prepare&&(r=this.prepare(r)),this.numeric&&3<r.length&&(r=r.replace(Nd,"$1 $2").replace(Rd,"$1 $2").replace(Td,"$1 "));const s=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let l=[],i=this.split||this.split===""?r.split(this.split):r;for(let c=0,d,v;c<i.length;c++)if((d=v=i[c])&&!(d.length<this.minlength||d.length>this.maxlength)){if(s)l.push(d);else if(!this.filter||(typeof this.filter=="function"?this.filter(d):!this.filter.has(d))){if(this.cache&&d.length<=this.L)if(this.H){var u=this.G.get(d);if(u||u===""){u&&l.push(u);continue}}else this.H=setTimeout(En,50,this);if(this.stemmer&&2<d.length&&(this.N||(this.N=new RegExp("(?!^)("+this.A+")$")),d=d.replace(this.N,g=>this.stemmer.get(g))),d&&(this.mapper||this.dedupe&&1<d.length)){u="";for(let g=0,C="",$,P;g<d.length;g++)$=d.charAt(g),$===C&&this.dedupe||((P=this.mapper&&this.mapper.get($))||P===""?P===C&&this.dedupe||!(C=P)||(u+=P):u+=C=$);d=u}if(this.matcher&&1<d.length&&(this.M||(this.M=new RegExp("("+this.h+")","g")),d=d.replace(this.M,g=>this.matcher.get(g))),d&&this.replacer)for(u=0;d&&u<this.replacer.length;u+=2)d=d.replace(this.replacer[u],this.replacer[u+1]);this.cache&&v.length<=this.L&&(this.G.set(v,d),this.G.size>this.S&&(this.G.clear(),this.L=this.L/1.1|0)),d&&l.push(d)}}return this.finalize&&(l=this.finalize(l)||l),this.cache&&r.length<=this.K&&(this.B.set(r,l),this.B.size>this.S&&(this.B.clear(),this.K=this.K/1.1|0)),l};function En(r){r.H=null,r.B.clear(),r.G.clear()}let Hn,Er;async function _d(r){r=r.data;var s=r.task;const l=r.id;let i=r.args;if(s==="init")Er=r.options||{},(s=r.factory)?(Function("return "+s)()(self),Hn=new self.FlexSearch.Index(Er),delete self.FlexSearch):Hn=new Mt(Er),postMessage({id:l});else{let u;s==="export"&&(i[1]?(i[0]=Er.export,i[2]=0,i[3]=1):i=null),s==="import"?i[0]&&(r=await Er.import.call(Hn,i[0]),Hn.import(i[0],r)):(u=i&&Hn[s].apply(Hn,i))&&u.then&&(u=await u),postMessage(s==="search"?{id:l,msg:u}:{id:l})}}function Bo(r){$r.call(r,"add"),$r.call(r,"append"),$r.call(r,"search"),$r.call(r,"update"),$r.call(r,"remove")}let qo,Ma,ws;function Ld(){qo=ws=0}function $r(r){this[r+"Async"]=function(){const s=arguments;var l=s[s.length-1];let i;if(typeof l=="function"&&(i=l,delete s[s.length-1]),qo?ws||(ws=Date.now()-Ma>=this.priority*this.priority*3):(qo=setTimeout(Ld,0),Ma=Date.now()),ws){const c=this;return new Promise(d=>{setTimeout(function(){d(c[r+"Async"].apply(c,s))},0)})}const u=this[r].apply(this,s);return l=u.then?u:new Promise(c=>c(u)),i&&l.then(i),l}}let Wn=0;function jr(r={}){function s(d){function v(g){g=g.data||g;const C=g.id,$=C&&u.h[C];$&&($(g.msg),delete u.h[C])}if(this.worker=d,this.h=Xe(),this.worker)return i?this.worker.on("message",v):this.worker.onmessage=v,r.config?new Promise(function(g){u.h[++Wn]=function(){g(u),1e9<Wn&&(Wn=0)},u.worker.postMessage({id:Wn,task:"init",factory:l,options:r})}):(this.worker.postMessage({task:"init",factory:l,options:r}),this.priority=r.priority||4,this)}if(!this||this.constructor!==jr)return new jr(r);let l=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;l&&(l=l.toString());const i=typeof window>"u",u=this,c=Fd(l,i,r.worker);return c.then?c.then(function(d){return s.call(u,d)}):s.call(this,c)}en("add"),en("append"),en("search"),en("update"),en("remove"),en("clear"),en("export"),en("import"),Bo(jr.prototype);function en(r){jr.prototype[r]=function(){const s=this,l=[].slice.call(arguments);var i=l[l.length-1];let u;return typeof i=="function"&&(u=i,l.pop()),i=new Promise(function(c){r==="export"&&typeof l[0]=="function"&&(l[0]=null),s.h[++Wn]=c,s.worker.postMessage({task:r,id:Wn,args:l})}),u?(i.then(u),this):i}}function Fd(r,s,l){return s?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>yu).then(function(i){return new i.Worker("undefined/node/node.mjs")}):r?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+_d.toString()],{type:"text/javascript"}))):new window.Worker(typeof l=="string"?l:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:No&&No.tagName.toUpperCase()==="SCRIPT"&&No.src||new URL("sodo-search.min.js",document.baseURI).href).replace("/worker.js","/worker/worker.js").replace("flexsearch.bundle.module.min.js","module/worker/worker.js"),{type:"module"})}function Vo(r,s=0){let l=[],i=[];s&&(s=25e4/s*5e3|0);for(const u of r.entries())i.push(u),i.length===s&&(l.push(i),i=[]);return i.length&&l.push(i),l}function Ho(r,s){s||(s=new Map);for(let l=0,i;l<r.length;l++)i=r[l],s.set(i[0],i[1]);return s}function za(r,s=0){let l=[],i=[];s&&(s=25e4/s*1e3|0);for(const u of r.entries())i.push([u[0],Vo(u[1])[0]]),i.length===s&&(l.push(i),i=[]);return i.length&&l.push(i),l}function ba(r,s){s||(s=new Map);for(let l=0,i,u;l<r.length;l++)i=r[l],u=s.get(i[0]),s.set(i[0],Ho(i[1],u));return s}function Ua(r){let s=[],l=[];for(const i of r.keys())l.push(i),l.length===25e4&&(s.push(l),l=[]);return l.length&&s.push(l),s}function Ba(r,s){s||(s=new Set);for(let l=0;l<r.length;l++)s.add(r[l]);return s}function Ss(r,s,l,i,u,c,d=0){const v=i&&i.constructor===Array;var g=v?i.shift():i;if(!g)return this.export(r,s,u,c+1);if((g=r((s?s+".":"")+(d+1)+"."+l,JSON.stringify(g)))&&g.then){const C=this;return g.then(function(){return Ss.call(C,r,s,l,v?i:null,u,c,d+1)})}return Ss.call(this,r,s,l,v?i:null,u,c,d+1)}function qa(r,s){let l="";for(const i of r.entries()){r=i[0];const u=i[1];let c="";for(let d=0,v;d<u.length;d++){v=u[d]||[""];let g="";for(let C=0;C<v.length;C++)g+=(g?",":"")+(s==="string"?'"'+v[C]+'"':v[C]);g="["+g+"]",c+=(c?",":"")+g}c='["'+r+'",['+c+"]]",l+=(l?",":"")+c}return l}function Va(r,s,l,i){let u=[];for(let c=0,d;c<r.index.length;c++)if(d=r.index[c],s>=d.length)s-=d.length;else{s=d[i?"splice":"slice"](s,l);const v=s.length;if(v&&(u=u.length?u.concat(s):s,l-=v,i&&(r.length-=v),!l))break;s=0}return u}function $n(r){if(!this||this.constructor!==$n)return new $n(r);this.index=r?[r]:[],this.length=r?r.length:0;const s=this;return new Proxy([],{get(l,i){if(i==="length")return s.length;if(i==="push")return function(u){s.index[s.index.length-1].push(u),s.length++};if(i==="pop")return function(){if(s.length)return s.length--,s.index[s.index.length-1].pop()};if(i==="indexOf")return function(u){let c=0;for(let d=0,v,g;d<s.index.length;d++){if(v=s.index[d],g=v.indexOf(u),0<=g)return c+g;c+=v.length}return-1};if(i==="includes")return function(u){for(let c=0;c<s.index.length;c++)if(s.index[c].includes(u))return!0;return!1};if(i==="slice")return function(u,c){return Va(s,u||0,c||s.length,!1)};if(i==="splice")return function(u,c){return Va(s,u||0,c||s.length,!0)};if(i==="constructor")return Array;if(typeof i!="symbol")return(l=s.index[i/2**31|0])&&l[i]},set(l,i,u){return l=i/2**31|0,(s.index[l]||(s.index[l]=[]))[i]=u,s.length++,!0}})}$n.prototype.clear=function(){this.index.length=0},$n.prototype.destroy=function(){this.proxy=this.index=null},$n.prototype.push=function(){};function Dt(r=8){if(!this||this.constructor!==Dt)return new Dt(r);this.index=Xe(),this.h=[],this.size=0,32<r?(this.B=Wa,this.A=BigInt(r)):(this.B=Ha,this.A=r)}Dt.prototype.get=function(r){const s=this.index[this.B(r)];return s&&s.get(r)},Dt.prototype.set=function(r,s){var l=this.B(r);let i=this.index[l];i?(l=i.size,i.set(r,s),(l-=i.size)&&this.size++):(this.index[l]=i=new Map([[r,s]]),this.h.push(i),this.size++)};function _t(r=8){if(!this||this.constructor!==_t)return new _t(r);this.index=Xe(),this.h=[],this.size=0,32<r?(this.B=Wa,this.A=BigInt(r)):(this.B=Ha,this.A=r)}_t.prototype.add=function(r){var s=this.B(r);let l=this.index[s];l?(s=l.size,l.add(r),(s-=l.size)&&this.size++):(this.index[s]=l=new Set([r]),this.h.push(l),this.size++)},ve=Dt.prototype,ve.has=_t.prototype.has=function(r){const s=this.index[this.B(r)];return s&&s.has(r)},ve.delete=_t.prototype.delete=function(r){const s=this.index[this.B(r)];s&&s.delete(r)&&this.size--},ve.clear=_t.prototype.clear=function(){this.index=Xe(),this.h=[],this.size=0},ve.values=_t.prototype.values=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].values())yield s},ve.keys=_t.prototype.keys=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].keys())yield s},ve.entries=_t.prototype.entries=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].entries())yield s};function Ha(r){let s=2**this.A-1;if(typeof r=="number")return r&s;let l=0,i=this.A+1;for(let u=0;u<r.length;u++)l=(l*i^r.charCodeAt(u))&s;return this.A===32?l+2**31:l}function Wa(r){let s=BigInt(2)**this.A-BigInt(1);var l=typeof r;if(l==="bigint")return r&s;if(l==="number")return BigInt(r)&s;l=BigInt(0);let i=this.A+BigInt(1);for(let u=0;u<r.length;u++)l=(l*i^BigInt(r.charCodeAt(u)))&s;return l}jn.prototype.add=function(r,s,l){if(Cr(r)&&(s=r,r=kr(s,this.key)),s&&(r||r===0)){if(!l&&this.reg.has(r))return this.update(r,s);for(let v=0,g;v<this.field.length;v++){g=this.D[v];var i=this.index.get(this.field[v]);if(typeof g=="function"){var u=g(s);u&&i.add(r,u,!1,!0)}else u=g.I,(!u||u(s))&&(g.constructor===String?g=[""+g]:Rt(g)&&(g=[g]),Ko(s,g,this.J,0,i,r,g[0],l))}if(this.tag)for(i=0;i<this.F.length;i++){var c=this.F[i];u=this.tag.get(this.R[i]);let v=Xe();if(typeof c=="function"){if(c=c(s),!c)continue}else{var d=c.I;if(d&&!d(s))continue;c.constructor===String&&(c=""+c),c=kr(s,c)}if(u&&c){Rt(c)&&(c=[c]);for(let g=0,C,$;g<c.length;g++)if(C=c[g],!v[C]&&(v[C]=1,(d=u.get(C))?$=d:u.set(C,$=[]),!l||!$.includes(r))){if($.length===2**31-1){if(d=new $n($),this.fastupdate)for(let P of this.reg.values())P.includes($)&&(P[P.indexOf($)]=d);u.set(C,$=d)}$.push(r),this.fastupdate&&((d=this.reg.get(r))?d.push($):this.reg.set(r,[$]))}}}if(this.store&&(!l||!this.store.has(r))){let v;if(this.C){v=Xe();for(let g=0,C;g<this.C.length;g++){if(C=this.C[g],(l=C.I)&&!l(s))continue;let $;if(typeof C=="function"){if($=C(s),!$)continue;C=[C.V]}else if(Rt(C)||C.constructor===String){v[C]=s[C];continue}Wo(s,v,C,0,C[0],$)}}this.store.set(r,v||s)}this.worker&&(this.fastupdate||this.reg.add(r))}return this};function Wo(r,s,l,i,u,c){if(r=r[u],i===l.length-1)s[u]=c||r;else if(r)if(r.constructor===Array)for(s=s[u]=Array(r.length),u=0;u<r.length;u++)Wo(r,s,l,i,u);else s=s[u]||(s[u]=Xe()),u=l[++i],Wo(r,s,l,i,u)}function Ko(r,s,l,i,u,c,d,v){if(r=r[d])if(i===s.length-1){if(r.constructor===Array){if(l[i]){for(s=0;s<r.length;s++)u.add(c,r[s],!0,!0);return}r=r.join(" ")}u.add(c,r,v,!0)}else if(r.constructor===Array)for(d=0;d<r.length;d++)Ko(r,s,l,i,u,c,d,v);else d=s[++i],Ko(r,s,l,i,u,c,d,v);else u.db&&u.remove(c)}function Ka(r,s,l,i,u,c,d){const v=r.length;let g=[],C,$;C=Xe();for(let P=0,O,F,b,V;P<s;P++)for(let U=0;U<v;U++)if(b=r[U],P<b.length&&(O=b[P]))for(let J=0;J<O.length;J++){if(F=O[J],($=C[F])?C[F]++:($=0,C[F]=1),V=g[$]||(g[$]=[]),!d){let re=P+(U||!u?0:c||0);V=V[re]||(V[re]=[])}if(V.push(F),d&&l&&$===v-1&&V.length-i===l)return i?V.slice(i):V}if(r=g.length)if(u)g=1<g.length?Ga(g,l,i,d,c):(g=g[0]).length>l||i?g.slice(i,l+i):g;else{if(r<v)return[];if(g=g[r-1],l||i)if(d)(g.length>l||i)&&(g=g.slice(i,l+i));else{u=[];for(let P=0,O;P<g.length;P++)if(O=g[P],O.length>i)i-=O.length;else if((O.length>l||i)&&(O=O.slice(i,l+i),l-=O.length,i&&(i-=O.length)),u.push(O),!l)break;g=1<u.length?[].concat.apply([],u):u[0]}}return g}function Ga(r,s,l,i,u){const c=[],d=Xe();let v;var g=r.length;let C;if(i){for(u=g-1;0<=u;u--)if(C=(i=r[u])&&i.length){for(g=0;g<C;g++)if(v=i[g],!d[v]){if(d[v]=1,l)l--;else if(c.push(v),c.length===s)return c}}}else for(let $=g-1,P,O=0;0<=$;$--){P=r[$];for(let F=0;F<P.length;F++)if(C=(i=P[F])&&i.length){for(let b=0;b<C;b++)if(v=i[b],!d[v])if(d[v]=1,l)l--;else{let V=(F+($<g-1&&u||0))/($+1)|0;if((c[V]||(c[V]=[])).push(v),++O===s)return c}}}return c}function Id(r,s,l){const i=Xe(),u=[];for(let c=0,d;c<s.length;c++){d=s[c];for(let v=0;v<d.length;v++)i[d[v]]=1}if(l)for(let c=0,d;c<r.length;c++)d=r[c],i[d]&&(u.push(d),i[d]=0);else for(let c=0,d,v;c<r.result.length;c++)for(d=r.result[c],s=0;s<d.length;s++)v=d[s],i[v]&&((u[c]||(u[c]=[])).push(v),i[v]=0);return u}function Go(r,s,l,i){if(!r.length)return r;if(r.length===1)return r=r[0],r=l||r.length>s?s?r.slice(l,l+s):r.slice(l):r,i?tn.call(this,r):r;let u=[];for(let c=0,d,v;c<r.length;c++)if((d=r[c])&&(v=d.length)){if(l){if(l>=v){l-=v;continue}l<v&&(d=s?d.slice(l,l+s):d.slice(l),v=d.length,l=0)}if(v>s&&(d=d.slice(0,s),v=s),!u.length&&v>=s)return i?tn.call(this,d):d;if(u.push(d),s-=v,!s)break}return u=1<u.length?[].concat.apply([],u):u[0],i?tn.call(this,u):u}function xs(r,s,l){var i=l[0];if(i.then)return Promise.all(l).then(function($){return r[s].apply(r,$)});if(i[0]&&i[0].index)return r[s].apply(r,i);i=[];let u=[],c=0,d=0,v,g,C;for(let $=0,P;$<l.length;$++)if(P=l[$]){let O;if(P.constructor===We)O=P.result;else if(P.constructor===Array)O=P;else if(c=P.limit||0,d=P.offset||0,C=P.suggest,g=P.resolve,v=P.enrich&&g,P.index)P.resolve=!1,O=P.index.search(P).result,P.resolve=g;else if(P.and)O=r.and(P.and);else if(P.or)O=r.or(P.or);else if(P.xor)O=r.xor(P.xor);else if(P.not)O=r.not(P.not);else continue;if(O.then)u.push(O);else if(O.length)i[$]=O;else if(!C&&(s==="and"||s==="xor")){i=[];break}}return{O:i,P:u,limit:c,offset:d,enrich:v,resolve:g,suggest:C}}We.prototype.or=function(){const{O:r,P:s,limit:l,offset:i,enrich:u,resolve:c}=xs(this,"or",arguments);return Ja.call(this,r,s,l,i,u,c)};function Ja(r,s,l,i,u,c){if(s.length){const d=this;return Promise.all(s).then(function(v){r=[];for(let g=0,C;g<v.length;g++)(C=v[g]).length&&(r[g]=C);return Ja.call(d,r,[],l,i,u,c)})}return r.length&&(this.result.length&&r.push(this.result),2>r.length?this.result=r[0]:(this.result=Ga(r,l,i,!1,this.h),i=0)),c?this.resolve(l,i,u):this}We.prototype.and=function(){let r=this.result.length,s,l,i,u;if(!r){const c=arguments[0];c&&(r=!!c.suggest,u=c.resolve,s=c.limit,l=c.offset,i=c.enrich&&u)}if(r){const{O:c,P:d,limit:v,offset:g,enrich:C,resolve:$,suggest:P}=xs(this,"and",arguments);return Qa.call(this,c,d,v,g,C,$,P)}return u?this.resolve(s,l,i):this};function Qa(r,s,l,i,u,c,d){if(s.length){const v=this;return Promise.all(s).then(function(g){r=[];for(let C=0,$;C<g.length;C++)($=g[C]).length&&(r[C]=$);return Qa.call(v,r,[],l,i,u,c,d)})}if(r.length)if(this.result.length&&r.unshift(this.result),2>r.length)this.result=r[0];else{if(s=Ad(r))return this.result=Ka(r,s,l,i,d,this.h,c),c?u?tn.call(this.index,this.result):this.result:this;this.result=[]}else d||(this.result=r);return c?this.resolve(l,i,u):this}We.prototype.xor=function(){const{O:r,P:s,limit:l,offset:i,enrich:u,resolve:c,suggest:d}=xs(this,"xor",arguments);return Ya.call(this,r,s,l,i,u,c,d)};function Ya(r,s,l,i,u,c,d){if(s.length){const v=this;return Promise.all(s).then(function(g){r=[];for(let C=0,$;C<g.length;C++)($=g[C]).length&&(r[C]=$);return Ya.call(v,r,[],l,i,u,c,d)})}if(r.length)if(this.result.length&&r.unshift(this.result),2>r.length)this.result=r[0];else return this.result=Dd.call(this,r,l,i,c,this.h),c?u?tn.call(this.index,this.result):this.result:this;else d||(this.result=r);return c?this.resolve(l,i,u):this}function Dd(r,s,l,i,u){const c=[],d=Xe();let v=0;for(let g=0,C;g<r.length;g++)if(C=r[g]){v<C.length&&(v=C.length);for(let $=0,P;$<C.length;$++)if(P=C[$])for(let O=0,F;O<P.length;O++)F=P[O],d[F]=d[F]?2:1}for(let g=0,C,$=0;g<v;g++)for(let P=0,O;P<r.length;P++)if((O=r[P])&&(C=O[g])){for(let F=0,b;F<C.length;F++)if(b=C[F],d[b]===1)if(l)l--;else if(i){if(c.push(b),c.length===s)return c}else{const V=g+(P?u:0);if(c[V]||(c[V]=[]),c[V].push(b),++$===s)return c}}return c}We.prototype.not=function(){const{O:r,P:s,limit:l,offset:i,enrich:u,resolve:c,suggest:d}=xs(this,"not",arguments);return Xa.call(this,r,s,l,i,u,c,d)};function Xa(r,s,l,i,u,c,d){if(s.length){const v=this;return Promise.all(s).then(function(g){r=[];for(let C=0,$;C<g.length;C++)($=g[C]).length&&(r[C]=$);return Xa.call(v,r,[],l,i,u,c,d)})}if(r.length&&this.result.length)this.result=Md.call(this,r,l,i,c);else if(c)return this.resolve(l,i,u);return c?u?tn.call(this.index,this.result):this.result:this}function Md(r,s,l,i){const u=[];r=new Set(r.flat().flat());for(let c=0,d,v=0;c<this.result.length;c++)if(d=this.result[c]){for(let g=0,C;g<d.length;g++)if(C=d[g],!r.has(C)){if(l)l--;else if(i){if(u.push(C),u.length===s)return u}else if(u[c]||(u[c]=[]),u[c].push(C),++v===s)return u}}return u}function We(r){if(!this||this.constructor!==We)return new We(r);if(r&&r.index)return r.resolve=!1,this.index=r.index,this.h=r.boost||0,this.result=r.index.search(r).result,this;this.index=null,this.result=r||[],this.h=0}We.prototype.limit=function(r){if(this.result.length){const s=[];for(let l=0,i;l<this.result.length;l++)if(i=this.result[l])if(i.length<=r){if(s[l]=i,r-=i.length,!r)break}else{s[l]=i.slice(0,r);break}this.result=s}return this},We.prototype.offset=function(r){if(this.result.length){const s=[];for(let l=0,i;l<this.result.length;l++)(i=this.result[l])&&(i.length<=r?r-=i.length:(s[l]=i.slice(r),r=0));this.result=s}return this},We.prototype.boost=function(r){return this.h+=r,this},We.prototype.resolve=function(r,s,l){const i=this.result,u=this.index;return this.result=this.index=null,i.length?(typeof r=="object"&&(l=r.enrich,s=r.offset,r=r.limit),Go.call(u,i,r||100,s,l)):i},jn.prototype.search=function(r,s,l,i){l||(!s&&Cr(r)?(l=r,r=""):Cr(s)&&(l=s,s=0));let u=[];var c=[],d;let v,g,C,$=0;var P=!0;let O;if(l){l.constructor===Array&&(l={index:l}),r=l.query||r;var F=l.pluck;v=l.merge,g=F||l.field||(g=l.index)&&(g.index?null:g),C=this.tag&&l.tag;var b=l.suggest;P=l.resolve!==!1,P||F||!(g=g||this.field)||(Rt(g)?F=g:(g.constructor===Array&&g.length===1&&(g=g[0]),F=g.field||g.index)),O=(d=this.store&&l.enrich&&P)&&l.highlight,s=l.limit||s;var V=l.offset||0;if(s||(s=100),C&&(!this.db||!i)){C.constructor!==Array&&(C=[C]);var U=[];for(let ge=0,ne;ge<C.length;ge++)if(ne=C[ge],ne.field&&ne.tag){var J=ne.tag;if(J.constructor===Array)for(var re=0;re<J.length;re++)U.push(ne.field,J[re]);else U.push(ne.field,J)}else{J=Object.keys(ne);for(let me=0,ie,fe;me<J.length;me++)if(ie=J[me],fe=ne[ie],fe.constructor===Array)for(re=0;re<fe.length;re++)U.push(ie,fe[re]);else U.push(ie,fe)}if(C=U,!r){if(P=[],U.length)for(c=0;c<U.length;c+=2){if(this.db){if(F=this.index.get(U[c]),!F)continue;P.push(F=F.db.tag(U[c+1],s,V,d))}else F=zd.call(this,U[c],U[c+1],s,V,d);u.push({field:U[c],tag:U[c+1],result:F})}return P.length?Promise.all(P).then(function(ge){for(let ne=0;ne<ge.length;ne++)u[ne].result=ge[ne];return u}):u}}g&&g.constructor!==Array&&(g=[g])}g||(g=this.field),U=!i&&(this.worker||this.db)&&[];let we;for(let ge=0,ne,me,ie;ge<g.length;ge++){if(me=g[ge],this.db&&this.tag&&!this.D[ge])continue;let fe;if(Rt(me)||(fe=me,me=fe.field,r=fe.query||r,s=fe.limit||s,V=fe.offset||V,b=fe.suggest||b,d=this.store&&(fe.enrich||d)),i)ne=i[ge];else if(J=fe||l,re=this.index.get(me),C&&(this.db&&(J.tag=C,we=re.db.support_tag_search,J.field=g),we||(J.enrich=!1)),U){U[ge]=re.search(r,s,J),J&&d&&(J.enrich=d);continue}else ne=re.search(r,s,J),J&&d&&(J.enrich=d);if(ie=ne&&(P?ne.length:ne.result.length),C&&ie){if(J=[],re=0,this.db&&i){if(!we)for(let Ee=g.length;Ee<i.length;Ee++){let L=i[Ee];if(L&&L.length)re++,J.push(L);else if(!b)return P?u:new We(u)}}else for(let Ee=0,L,z;Ee<C.length;Ee+=2){if(L=this.tag.get(C[Ee]),!L){if(b)continue;return P?u:new We(u)}if(z=(L=L&&L.get(C[Ee+1]))&&L.length)re++,J.push(L);else if(!b)return P?u:new We(u)}if(re){if(ne=Id(ne,J,P),ie=ne.length,!ie&&!b)return P?ne:new We(ne);re--}}if(ie)c[$]=me,u.push(ne),$++;else if(g.length===1)return P?u:new We(u)}if(U){if(this.db&&C&&C.length&&!we)for(d=0;d<C.length;d+=2){if(c=this.index.get(C[d]),!c){if(b)continue;return P?u:new We(u)}U.push(c.db.tag(C[d+1],s,V,!1))}const ge=this;return Promise.all(U).then(function(ne){return ne.length?ge.search(r,s,l,ne):ne})}if(!$)return P?u:new We(u);if(F&&(!d||!this.store))return u[0];for(U=[],V=0;V<c.length;V++){if(b=u[V],d&&b.length&&typeof b[0].doc>"u"&&(this.db?U.push(b=this.index.get(this.field[0]).db.enrich(b)):b=tn.call(this,b)),F)return P?b:new We(b);u[V]={field:c[V],result:b}}if(d&&this.db&&U.length){const ge=this;return Promise.all(U).then(function(ne){for(let me=0;me<ne.length;me++)u[me].result=ne[me];return v?eu(u):O?Za(u,r,ge.index,ge.field,ge.D,O):u})}return v?eu(u):O?Za(u,r,this.index,this.field,this.D,O):u};function Za(r,s,l,i,u,c){let d,v,g;for(let C=0,$,P,O,F;C<r.length;C++){if($=r[C].field,!$)continue;let b=r[C].result;O=l.get($),P=O.encoder,g=O.tokenize,F=u[i.indexOf($)],P!==d&&(d=P,v=d.encode(s));for(let V=0;V<b.length;V++){let U="",J=kr(b[V].doc,F).split(/\s+/);for(let re=0,we,ge;re<J.length;re++){we=J[re],ge=P.encode(we),ge=1<ge.length?ge.join(" "):ge[0];let ne;if(ge&&we)for(let me=0,ie;me<v.length;me++)if(ie=v[me],g==="strict"){if(ge===ie){U+=(U?" ":"")+c.replace("$1",we),ne=!0;break}}else{const fe=ge.indexOf(ie);if(-1<fe){U+=(U?" ":"")+we.substring(0,fe)+c.replace("$1",we.substring(fe,ie.length))+we.substring(fe+ie.length),ne=!0;break}}ne||(U+=(U?" ":"")+J[re])}b[V].highlight=U}}return r}function eu(r){const s=[],l=Xe();for(let i=0,u,c;i<r.length;i++){u=r[i],c=u.result;for(let d=0,v,g,C;d<c.length;d++)g=c[d],typeof g!="object"&&(g={id:g}),v=g.id,(C=l[v])?C.push(u.field):(g.field=l[v]=[u.field],s.push(g))}return s}function zd(r,s,l,i,u){if(r=this.tag.get(r),!r)return[];if((s=(r=r&&r.get(s))&&r.length-i)&&0<s)return(s>l||i)&&(r=r.slice(i,i+l)),u&&(r=tn.call(this,r)),r}function tn(r){if(!this||!this.store)return r;const s=Array(r.length);for(let l=0,i;l<r.length;l++)i=r[l],s[l]={id:i,doc:this.store.get(i)};return s}function jn(r){if(!this||this.constructor!==jn)return new jn(r);const s=r.document||r.doc||r;let l,i;if(this.D=[],this.field=[],this.J=[],this.key=(l=s.key||s.id)&&Cs(l,this.J)||"id",(i=r.keystore||0)&&(this.keystore=i),this.fastupdate=!!r.fastupdate,this.reg=!this.fastupdate||r.worker||r.db?i?new _t(i):new Set:i?new Dt(i):new Map,this.C=(l=s.store||null)&&l&&l!==!0&&[],this.store=l&&(i?new Dt(i):new Map),this.cache=(l=r.cache||null)&&new An(l),r.cache=!1,this.worker=r.worker,this.priority=r.priority||4,this.index=bd.call(this,r,s),this.tag=null,(l=s.tag)&&(typeof l=="string"&&(l=[l]),l.length)){this.tag=new Map,this.F=[],this.R=[];for(let u=0,c,d;u<l.length;u++){if(c=l[u],d=c.field||c,!d)throw Error("The tag field from the document descriptor is undefined.");c.custom?this.F[u]=c.custom:(this.F[u]=Cs(d,this.J),c.filter&&(typeof this.F[u]=="string"&&(this.F[u]=new String(this.F[u])),this.F[u].I=c.filter)),this.R[u]=d,this.tag.set(d,new Map)}}if(this.worker){this.fastupdate=!1,r=[];for(const u of this.index.values())u.then&&r.push(u);if(r.length){const u=this;return Promise.all(r).then(function(c){let d=0;for(const v of u.index.entries()){const g=v[0];v[1].then&&u.index.set(g,c[d++])}return u})}}else r.db&&(this.fastupdate=!1,this.mount(r.db))}ve=jn.prototype,ve.mount=function(r){let s=this.field;if(this.tag)for(let u=0,c;u<this.R.length;u++){c=this.R[u];var l=void 0;this.index.set(c,l=new Mt({},this.reg)),s===this.field&&(s=s.slice(0)),s.push(c),l.tag=this.tag.get(c)}l=[];const i={db:r.db,type:r.type,fastupdate:r.fastupdate};for(let u=0,c,d;u<s.length;u++){i.field=d=s[u],c=this.index.get(d);const v=new r.constructor(r.id,i);v.id=r.id,l[u]=v.mount(c),c.document=!0,u?c.bypass=!0:c.store=this.store}return this.db=!0,Promise.all(l)},ve.commit=async function(r,s){const l=[];for(const i of this.index.values())l.push(i.commit(r,s));await Promise.all(l),this.reg.clear()},ve.destroy=function(){const r=[];for(const s of this.index.values())r.push(s.destroy());return Promise.all(r)};function bd(r,s){const l=new Map;let i=s.index||s.field||s;Rt(i)&&(i=[i]);for(let u=0,c,d;u<i.length;u++){if(c=i[u],Rt(c)||(d=c,c=c.field),d=Cr(d)?Object.assign({},r,d):r,this.worker){const v=new jr(d);l.set(c,v)}this.worker||l.set(c,new Mt(d,this.reg)),d.custom?this.D[u]=d.custom:(this.D[u]=Cs(c,this.J),d.filter&&(typeof this.D[u]=="string"&&(this.D[u]=new String(this.D[u])),this.D[u].I=d.filter)),this.field[u]=c}if(this.C){r=s.store,Rt(r)&&(r=[r]);for(let u=0,c,d;u<r.length;u++)c=r[u],d=c.field||c,c.custom?(this.C[u]=c.custom,c.custom.V=d):(this.C[u]=Cs(d,this.J),c.filter&&(typeof this.C[u]=="string"&&(this.C[u]=new String(this.C[u])),this.C[u].I=c.filter))}return l}function Cs(r,s){const l=r.split(":");let i=0;for(let u=0;u<l.length;u++)r=l[u],r[r.length-1]==="]"&&(r=r.substring(0,r.length-2))&&(s[i]=!0),r&&(l[i++]=r);return i<l.length&&(l.length=i),1<i?l:l[0]}ve.append=function(r,s){return this.add(r,s,!0)},ve.update=function(r,s){return this.remove(r).add(r,s)},ve.remove=function(r){Cr(r)&&(r=kr(r,this.key));for(var s of this.index.values())s.remove(r,!0);if(this.reg.has(r)){if(this.tag&&!this.fastupdate)for(let l of this.tag.values())for(let i of l){s=i[0];const u=i[1],c=u.indexOf(r);-1<c&&(1<u.length?u.splice(c,1):l.delete(s))}this.store&&this.store.delete(r),this.reg.delete(r)}return this.cache&&this.cache.remove(r),this},ve.clear=function(){const r=[];for(const s of this.index.values()){const l=s.clear();l.then&&r.push(l)}if(this.tag)for(const s of this.tag.values())s.clear();return this.store&&this.store.clear(),this.cache&&this.cache.clear(),r.length?Promise.all(r):this},ve.contain=function(r){return this.db?this.index.get(this.field[0]).db.has(r):this.reg.has(r)},ve.cleanup=function(){for(const r of this.index.values())r.cleanup();return this},ve.get=function(r){return this.db?this.index.get(this.field[0]).db.enrich(r).then(function(s){return s[0]&&s[0].doc||null}):this.store.get(r)||null},ve.set=function(r,s){return typeof r=="object"&&(s=r,r=kr(s,this.key)),this.store.set(r,s),this},ve.searchCache=tu,ve.export=function(r,s,l=0,i=0){if(l<this.field.length){const d=this.field[l];if((s=this.index.get(d).export(r,d,l,i=1))&&s.then){const v=this;return s.then(function(){return v.export(r,d,l+1)})}return this.export(r,d,l+1)}let u,c;switch(i){case 0:u="reg",c=Ua(this.reg),s=null;break;case 1:u="tag",c=this.tag&&za(this.tag,this.reg.size),s=null;break;case 2:u="doc",c=this.store&&Vo(this.store),s=null;break;default:return}return Ss.call(this,r,s,u,c,l,i)},ve.import=function(r,s){var l=r.split(".");l[l.length-1]==="json"&&l.pop();const i=2<l.length?l[0]:"";if(l=2<l.length?l[2]:l[1],this.worker&&i)return this.index.get(i).import(r);if(s){if(typeof s=="string"&&(s=JSON.parse(s)),i)return this.index.get(i).import(l,s);switch(l){case"reg":this.fastupdate=!1,this.reg=Ba(s,this.reg);for(let u=0,c;u<this.field.length;u++)c=this.index.get(this.field[u]),c.fastupdate=!1,c.reg=this.reg;if(this.worker){s=[];for(const u of this.index.values())s.push(u.import(r));return Promise.all(s)}break;case"tag":this.tag=ba(s,this.tag);break;case"doc":this.store=Ho(s,this.store)}}},Bo(jn.prototype);function tu(r,s,l){r=(typeof r=="object"?""+r.query:r).toLowerCase(),this.cache||(this.cache=new An);let i=this.cache.get(r);if(!i){if(i=this.search(r,s,l),i.then){const u=this;i.then(function(c){return u.cache.set(r,c),c})}this.cache.set(r,i)}return i}function An(r){this.limit=r&&r!==!0?r:1e3,this.cache=new Map,this.h=""}An.prototype.set=function(r,s){this.cache.set(this.h=r,s),this.cache.size>this.limit&&this.cache.delete(this.cache.keys().next().value)},An.prototype.get=function(r){const s=this.cache.get(r);return s&&this.h!==r&&(this.cache.delete(r),this.cache.set(this.h=r,s)),s},An.prototype.remove=function(r){for(const s of this.cache){const l=s[0];s[1].includes(r)&&this.cache.delete(l)}},An.prototype.clear=function(){this.cache.clear(),this.h=""};const nu={normalize:!1,numeric:!1,dedupe:!1},ks={},Jo=new Map([["b","p"],["v","f"],["w","f"],["z","s"],["x","s"],["d","t"],["n","m"],["c","k"],["g","k"],["j","k"],["q","k"],["i","e"],["y","e"],["u","o"]]),ru=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),su=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],ou={a:"",e:"",i:"",o:"",u:"",y:"",b:1,f:1,p:1,v:1,c:2,g:2,j:2,k:2,q:2,s:2,x:2,z:2,ß:2,d:3,t:3,l:4,m:5,n:5,r:6};var iu={Exact:nu,Default:ks,Normalize:ks,LatinBalance:{mapper:Jo},LatinAdvanced:{mapper:Jo,matcher:ru,replacer:su},LatinExtra:{mapper:Jo,replacer:su.concat([/(?!^)[aeo]/g,""]),matcher:ru},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(r){for(let l=0;l<r.length;l++){var s=r[l];let i=s.charAt(0),u=ou[i];for(let c=1,d;c<s.length&&(d=s.charAt(c),d==="h"||d==="w"||!(d=ou[d])||d===u||(i+=d,u=d,i.length!==4));c++);r[l]=i}}},CJK:{split:""},LatinExact:nu,LatinDefault:ks,LatinSimple:ks};Mt.prototype.remove=function(r,s){const l=this.reg.size&&(this.fastupdate?this.reg.get(r):this.reg.has(r));if(l){if(this.fastupdate){for(let i=0,u;i<l.length;i++)if(u=l[i])if(2>u.length)u.pop();else{const c=u.indexOf(r);c===l.length-1?u.pop():u.splice(c,1)}}else Ar(this.map,r),this.depth&&Ar(this.ctx,r);s||this.reg.delete(r)}return this.db&&(this.commit_task.push({del:r}),this.T&&cu(this)),this.cache&&this.cache.remove(r),this};function Ar(r,s){let l=0;var i=typeof s>"u";if(r.constructor===Array){for(let u=0,c,d;u<r.length;u++)if((c=r[u])&&c.length)if(i)l++;else if(d=c.indexOf(s),0<=d){1<c.length?(c.splice(d,1),l++):delete r[u];break}else l++}else for(let u of r.entries()){i=u[0];const c=Ar(u[1],s);c?l+=c:r.delete(i)}return l}const Ud={memory:{resolution:1},performance:{resolution:3,fastupdate:!0,context:{depth:1,resolution:1}},match:{tokenize:"forward"},score:{resolution:9,context:{depth:2,resolution:3}}};Mt.prototype.add=function(r,s,l,i){if(s&&(r||r===0)){if(!i&&!l&&this.reg.has(r))return this.update(r,s);if(s=this.encoder.encode(s),i=s.length){const C=Xe(),$=Xe(),P=this.depth,O=this.resolution;for(let F=0;F<i;F++){let b=s[this.rtl?i-1-F:F];var u=b.length;if(u&&(P||!$[b])){var c=this.score?this.score(s,b,F,null,0):Ps(O,i,F),d="";switch(this.tokenize){case"full":if(2<u){for(let V=0,U;V<u;V++)for(c=u;c>V;c--){d=b.substring(V,c),U=this.rtl?u-1-V:V;var v=this.score?this.score(s,b,F,d,U):Ps(O,i,F,u,U);Or(this,$,d,v,r,l)}break}case"bidirectional":case"reverse":if(1<u){for(v=u-1;0<v;v--){d=b[this.rtl?u-1-v:v]+d;var g=this.score?this.score(s,b,F,d,v):Ps(O,i,F,u,v);Or(this,$,d,g,r,l)}d=""}case"forward":if(1<u){for(v=0;v<u;v++)d+=b[this.rtl?u-1-v:v],Or(this,$,d,c,r,l);break}default:if(Or(this,$,b,c,r,l),P&&1<i&&F<i-1){for(u=Xe(),d=this.U,c=b,v=Math.min(P+1,this.rtl?F+1:i-F),u[c]=1,g=1;g<v;g++)if((b=s[this.rtl?i-1-F-g:F+g])&&!u[b]){u[b]=1;const V=this.score?this.score(s,c,F,b,g-1):Ps(d+(i/2>d?0:1),i,F,v-1,g-1),U=this.bidirectional&&b>c;Or(this,C,U?c:b,V,r,l,U?b:c)}}}}}this.fastupdate||this.reg.add(r)}else s=""}return this.db&&(s||this.commit_task.push({del:r}),this.T&&cu(this)),this};function Or(r,s,l,i,u,c,d){let v=d?r.ctx:r.map,g;if((!s[l]||d&&!(g=s[l])[d])&&(d?(s=g||(s[l]=Xe()),s[d]=1,(g=v.get(d))?v=g:v.set(d,v=new Map)):s[l]=1,(g=v.get(l))?v=g:v.set(l,v=g=[]),v=v[i]||(v[i]=[]),!c||!v.includes(u))){if(v.length===2**31-1){if(s=new $n(v),r.fastupdate)for(let C of r.reg.values())C.includes(v)&&(C[C.indexOf(v)]=s);g[i]=v=s}v.push(u),r.fastupdate&&((i=r.reg.get(u))?i.push(v):r.reg.set(u,[v]))}}function Ps(r,s,l,i,u){return l&&1<r?s+(i||0)<=r?l+(u||0):(r-1)/(s+(i||0))*(l+(u||0))+1|0:0}Mt.prototype.search=function(r,s,l){l||(s||typeof r!="object"?typeof s=="object"&&(l=s,s=0):(l=r,r=""));let i=[],u,c,d,v=0,g,C,$,P,O;l?(r=l.query||r,s=l.limit||s,v=l.offset||0,c=l.context,d=l.suggest,O=(g=l.resolve!==!1)&&l.enrich,$=l.boost,P=l.resolution,C=this.db&&l.tag):g=this.resolve;let F=this.encoder.encode(r);if(u=F.length,s=s||(g?100:0),u===1)return au.call(this,F[0],"",s,v,g,O,C);if(c=this.depth&&c!==!1,u===2&&c&&!d)return au.call(this,F[1],F[0],s,v,g,O,C);let b=Xe(),V=0,U;if(c&&(U=F[0],V=1),P||P===0||(P=U?this.U:this.resolution),this.db){if(this.db.search&&(r=this.db.search(this,F,s,v,d,g,O,C),r!==!1))return r;const J=this;return(async function(){for(let re,we;V<u;V++){if((we=F[V])&&!b[we]){if(b[we]=1,re=await Qo(J,we,U,0,0,!1,!1),re=uu(re,i,d,P)){i=re;break}U&&(d&&re&&i.length||(U=we))}d&&U&&V===u-1&&!i.length&&(P=J.resolution,U="",V=-1,b=Xe())}return lu(i,P,s,v,d,$,g)})()}for(let J,re;V<u;V++){if((re=F[V])&&!b[re]){if(b[re]=1,J=Qo(this,re,U,0,0,!1,!1),J=uu(J,i,d,P)){i=J;break}U&&(d&&J&&i.length||(U=re))}d&&U&&V===u-1&&!i.length&&(P=this.resolution,U="",V=-1,b=Xe())}return lu(i,P,s,v,d,$,g)};function lu(r,s,l,i,u,c,d){let v=r.length,g=r;if(1<v)g=Ka(r,s,l,i,u,c,d);else if(v===1)return d?Go.call(null,r[0],l,i):new We(r[0]);return d?g:new We(g)}function au(r,s,l,i,u,c,d){return r=Qo(this,r,s,l,i,u,c,d),this.db?r.then(function(v){return u?v||[]:new We(v)}):r&&r.length?u?Go.call(this,r,l,i):new We(r):u?[]:new We}function uu(r,s,l,i){let u=[];if(r&&r.length){if(r.length<=i){s.push(r);return}for(let c=0,d;c<i;c++)(d=r[c])&&(u[c]=d);if(u.length){s.push(u);return}}if(!l)return u}function Qo(r,s,l,i,u,c,d,v){let g;return l&&(g=r.bidirectional&&s>l)&&(g=l,l=s,s=g),r.db?r.db.get(s,l,i,u,c,d,v):(r=l?(r=r.ctx.get(l))&&r.get(s):r.map.get(s),r)}function Mt(r,s){if(!this||this.constructor!==Mt)return new Mt(r);if(r){var l=Rt(r)?r:r.preset;l&&(r=Object.assign({},Ud[l],r))}else r={};l=r.context;const i=l===!0?{depth:1}:l||{},u=Rt(r.encoder)?iu[r.encoder]:r.encode||r.encoder||{};this.encoder=u.encode?u:typeof u=="object"?new Pr(u):{encode:u},this.resolution=r.resolution||9,this.tokenize=l=(l=r.tokenize)&&l!=="default"&&l!=="exact"&&l||"strict",this.depth=l==="strict"&&i.depth||0,this.bidirectional=i.bidirectional!==!1,this.fastupdate=!!r.fastupdate,this.score=r.score||null,(l=r.keystore||0)&&(this.keystore=l),this.map=l?new Dt(l):new Map,this.ctx=l?new Dt(l):new Map,this.reg=s||(this.fastupdate?l?new Dt(l):new Map:l?new _t(l):new Set),this.U=i.resolution||3,this.rtl=u.rtl||r.rtl||!1,this.cache=(l=r.cache||null)&&new An(l),this.resolve=r.resolve!==!1,(l=r.db)&&(this.db=this.mount(l)),this.T=r.commit!==!1,this.commit_task=[],this.commit_timer=null,this.priority=r.priority||4}ve=Mt.prototype,ve.mount=function(r){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),r.mount(this)},ve.commit=function(r,s){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this,r,s)},ve.destroy=function(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.destroy()};function cu(r){r.commit_timer||(r.commit_timer=setTimeout(function(){r.commit_timer=null,r.db.commit(r,void 0,void 0)},1))}ve.clear=function(){return this.map.clear(),this.ctx.clear(),this.reg.clear(),this.cache&&this.cache.clear(),this.db&&(this.commit_timer&&clearTimeout(this.commit_timer),this.commit_timer=null,this.commit_task=[{clear:!0}]),this},ve.append=function(r,s){return this.add(r,s,!0)},ve.contain=function(r){return this.db?this.db.has(r):this.reg.has(r)},ve.update=function(r,s){const l=this,i=this.remove(r);return i&&i.then?i.then(()=>l.add(r,s)):this.add(r,s)},ve.cleanup=function(){return this.fastupdate?(Ar(this.map),this.depth&&Ar(this.ctx),this):this},ve.searchCache=tu,ve.export=function(r,s,l=0,i=0){let u,c;switch(i){case 0:u="reg",c=Ua(this.reg);break;case 1:u="cfg",c=null;break;case 2:u="map",c=Vo(this.map,this.reg.size);break;case 3:u="ctx",c=za(this.ctx,this.reg.size);break;default:return}return Ss.call(this,r,s,u,c,l,i)},ve.import=function(r,s){if(s)switch(typeof s=="string"&&(s=JSON.parse(s)),r=r.split("."),r[r.length-1]==="json"&&r.pop(),r.length===3&&r.shift(),r=1<r.length?r[1]:r[0],r){case"reg":this.fastupdate=!1,this.reg=Ba(s,this.reg);break;case"map":this.map=Ho(s,this.map);break;case"ctx":this.ctx=ba(s,this.ctx)}},ve.serialize=function(r=!0){let s="",l="",i="";if(this.reg.size){let c;for(var u of this.reg.keys())c||(c=typeof u),s+=(s?",":"")+(c==="string"?'"'+u+'"':u);s="index.reg=new Set(["+s+"]);",l=qa(this.map,c),l="index.map=new Map(["+l+"]);";for(const d of this.ctx.entries()){u=d[0];let v=qa(d[1],c);v="new Map(["+v+"])",v='["'+u+'",'+v+"]",i+=(i?",":"")+v}i="index.ctx=new Map(["+i+"]);"}return r?"function inject(index){"+s+l+i+"}":s+l+i},Bo(Mt.prototype);const fu=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Es=["map","ctx","tag","reg","cfg"],On=Xe();function hu(r,s={}){if(!this)return new hu(r,s);typeof r=="object"&&(s=r,r=r.name),r||console.info("Default storage space was used, because a name was not passed."),this.id="flexsearch"+(r?":"+r.toLowerCase().replace(/[^a-z0-9_\-]/g,""):""),this.field=s.field?s.field.toLowerCase().replace(/[^a-z0-9_\-]/g,""):"",this.type=s.type,this.fastupdate=this.support_tag_search=!1,this.db=null,this.h={}}ve=hu.prototype,ve.mount=function(r){return r.encoder?(r.db=this,this.open()):r.mount(this)},ve.open=function(){if(this.db)return this.db;let r=this;navigator.storage&&navigator.storage.persist(),On[r.id]||(On[r.id]=[]),On[r.id].push(r.field);const s=fu.open(r.id,1);return s.onupgradeneeded=function(){const l=r.db=this.result;for(let i=0,u;i<Es.length;i++){u=Es[i];for(let c=0,d;c<On[r.id].length;c++)d=On[r.id][c],l.objectStoreNames.contains(u+(u!=="reg"&&d?":"+d:""))||l.createObjectStore(u+(u!=="reg"&&d?":"+d:""))}},r.db=nn(s,function(l){r.db=l,r.db.onversionchange=function(){r.close()}})},ve.close=function(){this.db&&this.db.close(),this.db=null},ve.destroy=function(){const r=fu.deleteDatabase(this.id);return nn(r)},ve.clear=function(){const r=[];for(let l=0,i;l<Es.length;l++){i=Es[l];for(let u=0,c;u<On[this.id].length;u++)c=On[this.id][u],r.push(i+(i!=="reg"&&c?":"+c:""))}const s=this.db.transaction(r,"readwrite");for(let l=0;l<r.length;l++)s.objectStore(r[l]).clear();return nn(s)},ve.get=function(r,s,l=0,i=0,u=!0,c=!1){r=this.db.transaction((s?"ctx":"map")+(this.field?":"+this.field:""),"readonly").objectStore((s?"ctx":"map")+(this.field?":"+this.field:"")).get(s?s+":"+r:r);const d=this;return nn(r).then(function(v){let g=[];if(!v||!v.length)return g;if(u){if(!l&&!i&&v.length===1)return v[0];for(let C=0,$;C<v.length;C++)if(($=v[C])&&$.length){if(i>=$.length){i-=$.length;continue}const P=l?i+Math.min($.length-i,l):$.length;for(let O=i;O<P;O++)g.push($[O]);if(i=0,g.length===l)break}return c?d.enrich(g):g}return v})},ve.tag=function(r,s=0,l=0,i=!1){r=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(r);const u=this;return nn(r).then(function(c){return!c||!c.length||l>=c.length?[]:!s&&!l?c:(c=c.slice(l,l+s),i?u.enrich(c):c)})},ve.enrich=function(r){typeof r!="object"&&(r=[r]);const s=this.db.transaction("reg","readonly").objectStore("reg"),l=[];for(let i=0;i<r.length;i++)l[i]=nn(s.get(r[i]));return Promise.all(l).then(function(i){for(let u=0;u<i.length;u++)i[u]={id:r[u],doc:i[u]?JSON.parse(i[u]):null};return i})},ve.has=function(r){return r=this.db.transaction("reg","readonly").objectStore("reg").getKey(r),nn(r).then(function(s){return!!s})},ve.search=null,ve.info=function(){},ve.transaction=function(r,s,l){r+=r!=="reg"&&this.field?":"+this.field:"";let i=this.h[r+":"+s];if(i)return l.call(this,i);let u=this.db.transaction(r,s);this.h[r+":"+s]=i=u.objectStore(r);const c=l.call(this,i);return this.h[r+":"+s]=null,nn(u).finally(function(){return u=i=null,c})},ve.commit=async function(r,s,l){if(s)await this.clear(),r.commit_task=[];else{let i=r.commit_task;r.commit_task=[];for(let u=0,c;u<i.length;u++)if(c=i[u],c.clear){await this.clear(),s=!0;break}else i[u]=c.del;s||(l||(i=i.concat(jd(r.reg))),i.length&&await this.remove(i))}r.reg.size&&(await this.transaction("map","readwrite",function(i){for(const u of r.map){const c=u[0],d=u[1];d.length&&(s?i.put(d,c):i.get(c).onsuccess=function(){let v=this.result;var g;if(v&&v.length){const C=Math.max(v.length,d.length);for(let $=0,P,O;$<C;$++)if((O=d[$])&&O.length){if((P=v[$])&&P.length)for(g=0;g<O.length;g++)P.push(O[g]);else v[$]=O;g=1}}else v=d,g=1;g&&i.put(v,c)})}}),await this.transaction("ctx","readwrite",function(i){for(const u of r.ctx){const c=u[0],d=u[1];for(const v of d){const g=v[0],C=v[1];C.length&&(s?i.put(C,c+":"+g):i.get(c+":"+g).onsuccess=function(){let $=this.result;var P;if($&&$.length){const O=Math.max($.length,C.length);for(let F=0,b,V;F<O;F++)if((V=C[F])&&V.length){if((b=$[F])&&b.length)for(P=0;P<V.length;P++)b.push(V[P]);else $[F]=V;P=1}}else $=C,P=1;P&&i.put($,c+":"+g)})}}}),r.store?await this.transaction("reg","readwrite",function(i){for(const u of r.store){const c=u[0],d=u[1];i.put(typeof d=="object"?JSON.stringify(d):1,c)}}):r.bypass||await this.transaction("reg","readwrite",function(i){for(const u of r.reg.keys())i.put(1,u)}),r.tag&&await this.transaction("tag","readwrite",function(i){for(const u of r.tag){const c=u[0],d=u[1];d.length&&(i.get(c).onsuccess=function(){let v=this.result;v=v&&v.length?v.concat(d):d,i.put(v,c)})}}),r.map.clear(),r.ctx.clear(),r.tag&&r.tag.clear(),r.store&&r.store.clear(),r.document||r.reg.clear())};function Yo(r,s,l){const i=r.value;let u,c=0;for(let d=0,v;d<i.length;d++){if(v=l?i:i[d]){for(let g=0,C,$;g<s.length;g++)if($=s[g],C=v.indexOf($),0<=C)if(u=1,1<v.length)v.splice(C,1);else{i[d]=[];break}c+=v.length}if(l)break}c?u&&r.update(i):r.delete(),r.continue()}ve.remove=function(r){return typeof r!="object"&&(r=[r]),Promise.all([this.transaction("map","readwrite",function(s){s.openCursor().onsuccess=function(){const l=this.result;l&&Yo(l,r)}}),this.transaction("ctx","readwrite",function(s){s.openCursor().onsuccess=function(){const l=this.result;l&&Yo(l,r)}}),this.transaction("tag","readwrite",function(s){s.openCursor().onsuccess=function(){const l=this.result;l&&Yo(l,r,!0)}}),this.transaction("reg","readwrite",function(s){for(let l=0;l<r.length;l++)s.delete(r[l])})])};function nn(r,s){return new Promise((l,i)=>{r.onsuccess=r.oncomplete=function(){s&&s(this.result),s=null,l(this.result)},r.onerror=r.onblocked=i,r=null})}const $s={Encoder:Pr,Document:jn},Bd=iu,qd={finalize:r=>{let s=[];for(const l of r)s.push(...Hd(l));return s}};function Vd(r){return r>=19968&&r<=40959||r>=12352&&r<=12543||r>=44032&&r<=55203||r>=13312&&r<=19903||r>=131072&&r<=173791||r>=173824&&r<=191471||r>=196608&&r<=205743||r>=191472&&r<=192095||r>=63744&&r<=64255||r>=194560&&r<=195103}function Hd(r){const s=[];let l="";for(const i of r){const u=i.codePointAt(0);Vd(u)?(l&&(s.push(l),l=""),s.push(i)):l+=i}return l&&s.push(l),s}const Xo=new $s.Encoder(Bd.Default,qd);class Wd{constructor({adminUrl:s,apiKey:l,dir:i}){const u=i==="rtl",c=i==="rtl"?"reverse":"forward";this.apiUrl=s,this.apiKey=l,this.postsIndex=new $s.Document({tokenize:c,rtl:u,document:{id:"id",index:["title","excerpt"],store:!0},encoder:Xo}),this.authorsIndex=new $s.Document({tokenize:c,rtl:u,document:{id:"id",index:["name"],store:!0},encoder:Xo}),this.tagsIndex=new $s.Document({tokenize:c,rtl:u,document:{id:"id",index:["name"],store:!0},encoder:Xo}),this.init=this.init.bind(this),this.search=this.search.bind(this)}async#t(){const s=await this.#n();s.length>0&&this.#r(s)}async#n(){try{const s=`${this.apiUrl}/ghost/api/content/search-index/posts/?key=${this.apiKey}`;return(await(await fetch(s)).json()).posts}catch(s){return console.error("Error fetching posts:",s),[]}}#r(s){s.forEach(l=>{this.postsIndex.add(l)})}async#s(){const s=await this.#o();s.length>0&&this.#i(s)}async#o(){try{const s=`${this.apiUrl}/ghost/api/content/search-index/authors/?key=${this.apiKey}`;return(await(await fetch(s)).json()).authors}catch(s){return console.error("Error fetching authors:",s),[]}}#i(s){s.forEach(l=>{this.authorsIndex.add(l)})}async#l(){const s=await this.#a();s.length>0&&this.#u(s)}async#a(){try{const s=`${this.apiUrl}/ghost/api/content/search-index/tags/?key=${this.apiKey}`;return(await(await fetch(s)).json()).tags}catch(s){return console.error("Error fetching tags:",s),[]}}#u(s){s.forEach(l=>{this.tagsIndex.add(l)})}async init(){await this.#t(),await this.#s(),await this.#l()}#e(s){const l=[],i={};return s.forEach(u=>{u.result.forEach(c=>{i[c.id]||(l.push(c.doc),i[c.id]=!0)})}),l}search(s){const l=this.postsIndex.search(s,{enrich:!0}),i=this.authorsIndex.search(s,{enrich:!0}),u=this.tagsIndex.search(s,{enrich:!0});return{posts:this.#e(l),authors:this.#e(i),tags:this.#e(u)}}}var Tn={exports:{}};const Kd={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Gd={Authors:"الكتّاب",Cancel:"إلغاء","No matches found":"لا يوجد نتائج مطابقة",Posts:"منشورات","Search posts, tags and authors":"قم بالبحث عن المنشورات، الوسوم و الكتّاب","Show more results":"اظهر المزيد من النتائج",Tags:"الوسوم"},Jd={Authors:"Автори",Cancel:"Отказ","No matches found":"Няма съвпадения",Posts:"Публикации","Search posts, tags and authors":"Търсене в публикации, етикети и автори","Show more results":"Покажи още резултати",Tags:"Етикети"},Qd={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Yd={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Xd={Authors:"Autors",Cancel:"Cancel·la","No matches found":"No s'ha trobat cap resultat",Posts:"Articles","Search posts, tags and authors":"Cerca articles, etiquetes i autors","Show more results":"Mostra més resultats",Tags:"Etiquetes"},Zd={Authors:"Autoři",Cancel:"Zrušit","No matches found":"Nenalezeno",Posts:"Články","Search posts, tags and authors":"Prohledat články, štítky a autory","Show more results":"Zobrazit více výsledků",Tags:"Štítky"},ep={Authors:"Forfattere",Cancel:"Annuller","No matches found":"Ingen resultater fundet",Posts:"Indlæg","Search posts, tags and authors":"Søg i indlæg, tags og forfattere","Show more results":"Vis flere resultater",Tags:"Tags"},tp={Authors:"Autoren",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Beiträge","Search posts, tags and authors":"Nach Posts, Tags und Autoren suchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},np={Authors:"Autor*innen",Cancel:"Abbrechen","No matches found":"Keine Treffer gefunden",Posts:"Posts","Search posts, tags and authors":"Posts, Tags und Autor*innen durchsuchen","Show more results":"Mehr Ergebnisse anzeigen",Tags:"Tags"},rp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},sp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},op={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},ip={Authors:"Autores",Cancel:"Cancelar","No matches found":"No se encontraron resultados",Posts:"Publicaciones","Search posts, tags and authors":"Buscar publicaciones, etiquetas y autores","Show more results":"Mostrar más resultados",Tags:"Etiquetas"},lp={Authors:"Autorid",Cancel:"Tühista","No matches found":"Vasteid ei leitud",Posts:"Postitused","Search posts, tags and authors":"Otsi postitusi, silte ja autoreid","Show more results":"Näita rohkem tulemusi",Tags:"Sildid"},ap={Authors:"Autoreak",Cancel:"Utzi","No matches found":"Ez da bat datorren ezer topatu",Posts:"Artikuluak","Search posts, tags and authors":"Bilatu artikuluak, etiketak eta autoreak","Show more results":"Erakutsi emaitza gehiago",Tags:"Etiketak"},up={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},cp={Authors:"Kirjoittajat",Cancel:"Peruuta","No matches found":"Ei hakutuloksia",Posts:"Kirjoitukset","Search posts, tags and authors":"Etsi kirjoituksia, tunnisteita ja kirjoittajia","Show more results":"Näytä enemmän tuloksia",Tags:"Tunnisteet"},fp={Authors:"Auteurs",Cancel:"Annuler","No matches found":"Aucun résultat trouvé",Posts:"Articles","Search posts, tags and authors":"Rechercher des articles, des catégories et des auteurs","Show more results":"Plus de résultats",Tags:"Catégories"},hp={Authors:"Ùghdaran",Cancel:"Sguir dheth","No matches found":"Cha deach dad a lorg a fhreagras ris na lorg thu",Posts:"Postaichean","Search posts, tags and authors":"Lorg sna postaichean, tagaichean agus ùghdaran","Show more results":"Seall barrachd thoraidhean",Tags:"Tagaichean"},dp={Authors:"מחברים",Cancel:"ביטול","No matches found":"לא נמצאו התאמות",Posts:"פוסטים","Search posts, tags and authors":"חיפוש פוסטים, תגיות ומחברים","Show more results":"הצגת תוצאות נוספות",Tags:"תגיות"},pp={Authors:"लेखक",Cancel:"रद्द करें","No matches found":"कोई मैच नहीं मिला",Posts:"पोस्ट","Search posts, tags and authors":"पोस्ट, टैग और लेखक की तलाश करें","Show more results":"और परिणाम दिखाएं",Tags:"टैग"},gp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},mp={Authors:"Szerzők",Cancel:"Mégse","No matches found":"Nincs találat",Posts:"Bejegyzések","Search posts, tags and authors":"Keresés a bejegyzések, a címkék és a szerzők között","Show more results":"További találatok megjelenítése",Tags:"Címkék"},yp={Authors:"Penulis",Cancel:"Batalkan","No matches found":"Tidak ada hasil yang ditemukan",Posts:"Postingan","Search posts, tags and authors":"Cari postingan, tag, dan penulis","Show more results":"Tampilkan lebih banyak hasil",Tags:"Tag"},vp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},wp={Authors:"Autori",Cancel:"Annulla","No matches found":"Nessun risultato trovato",Posts:"Articoli","Search posts, tags and authors":"Cerca articoli, tag e autori","Show more results":"Mostra più risultati",Tags:"Tag"},Sp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},xp={Authors:"작성자",Cancel:"취소","No matches found":"일치하는 결과가 없어요",Posts:"게시물","Search posts, tags and authors":"게시물, 태그, 작성자 검색","Show more results":"더 많은 결과 보기",Tags:"태그"},Cp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},kp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Pp={Authors:"Autori",Cancel:"Atcelt","No matches found":"Nav atrasta neviena atbilstība",Posts:"Ziņas","Search posts, tags and authors":"Meklēt ziņas, atzīmes un autorus","Show more results":"Rādīt vairāk rezultātu",Tags:"Tagi"},Ep={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},$p={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},jp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Ap={Authors:"Forfattere",Cancel:"Avbryt","No matches found":"Ingen treff funnet",Posts:"Innlegg","Search posts, tags and authors":"Søk i innlegg, etiketter og forfattere","Show more results":"Vis flere resultater",Tags:"Etiketter"},Op={Authors:"लेखकहरू",Cancel:"रद्द गर्नुहोस्","No matches found":"कुनै परिणाम भेटिएन",Posts:"पोस्टहरू","Search posts, tags and authors":"पोस्टहरू, ट्यागहरू र लेखकहरू खोज्नुहोस्","Show more results":"थप परिणामहरू देखाउनुहोस्",Tags:"ट्यागहरू"},Tp={Authors:"Auteurs",Cancel:"Annuleren","No matches found":"Geen resultaten gevonden",Posts:"Berichten","Search posts, tags and authors":"Zoek berichten, tags en auteurs","Show more results":"Meer resultaten weergeven",Tags:"Tags"},Np={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Rp={Authors:"ਲੇਖਕ",Cancel:"ਰੱਦ ਕਰੋ","No matches found":"ਕੋਈ ਮੇਲ ਨਹੀਂ ਮਿਲਿਆ",Posts:"ਪੋਸਟਾਂ","Search posts, tags and authors":"ਪੋਸਟਾਂ, ਟੈਗ ਅਤੇ ਲੇਖਕ ਖੋਜੋ","Show more results":"ਹੋਰ ਨਤੀਜੇ ਦਿਖਾਓ",Tags:"ਟੈਗ"},_p={Authors:"Autorzy",Cancel:"Anuluj","No matches found":"Nie znaleziono dopasowań",Posts:"Posty","Search posts, tags and authors":"Szukaj postów, tagów lub autorów","Show more results":"Pokaż więcej wyników",Tags:"Tagi"},Lp={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Buscar posts, tags e autores","Show more results":"Mostrar mais resultados",Tags:"Tags"},Fp={Authors:"Autores",Cancel:"Cancelar","No matches found":"Nenhum resultado encontrado",Posts:"Publicações","Search posts, tags and authors":"Procurar publicações, marcadores e autores","Show more results":"Mostrar mais resultados",Tags:"Marcadores"},Ip={Authors:"Autori",Cancel:"Anulează","No matches found":"Nu s-au găsit rezultate",Posts:"Postări","Search posts, tags and authors":"Caută postări, etichete și autori","Show more results":"Afișează mai multe rezultate",Tags:"Etichete"},Dp={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},Mp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},zp={Authors:"Autori",Cancel:"Zrušiť","No matches found":"Nenašli sa žiadne výsledky",Posts:"Príspevky","Search posts, tags and authors":"Vyhľadajte príspevky, tagy a autorov","Show more results":"Zobraziť viac výsledkov",Tags:"Tagy"},bp={Authors:"Avtorji",Cancel:"Prekliči","No matches found":"Ni najdenih zadetkov",Posts:"Članki","Search posts, tags and authors":"Iščite članke, oznake in avtorje","Show more results":"Prikaži več rezultatov",Tags:"Oznake"},Up={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Bp={Authors:"Аутори",Cancel:"Откажите","No matches found":"Нема резултата",Posts:"Објаве","Search posts, tags and authors":"Претражите објаве, tag-ове и ауторе","Show more results":"Прикажите више резултата",Tags:"Tag-ови"},qp={Authors:"Autori",Cancel:"Otkažite","No matches found":"Nema rezultata",Posts:"Objave","Search posts, tags and authors":"Pretražite objave, tag-ove i autore","Show more results":"Prikažite više rezultata",Tags:"Tag-ovi"},Vp={Authors:"Författare",Cancel:"Avbryt","No matches found":"Inga träffar hittade",Posts:"Inlägg","Search posts, tags and authors":"Sök inlägg, taggar och författare","Show more results":"Visa fler resultat",Tags:"Taggar"},Hp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Wp={Authors:"ஆசிரியர்கள்",Cancel:"ரத்து செய்","No matches found":"பொருத்தங்கள் எதுவும் இல்லை",Posts:"பதிவுகள்","Search posts, tags and authors":"பதிவுகள், குறிச்சொற்கள் மற்றும் ஆசிரியர்களைத் தேடுங்கள்","Show more results":"மேலும் முடிவுகளைக் காட்டு",Tags:"குறிச்சொற்கள்"},Kp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Gp={Authors:"Yazarlar",Cancel:"İptal","No matches found":"Eşleşme bulunamadı",Posts:"Yazılar","Search posts, tags and authors":"Yazıları, etiketleri ve yazarları ara","Show more results":"Daha fazla sonuç göster",Tags:"Etiketler"},Jp={Authors:"Автори",Cancel:"Скасувати","No matches found":"Збігів не знайдено",Posts:"Публікації","Search posts, tags and authors":"Шукайте публікацій, теги та авторів","Show more results":"Показати більше результатів",Tags:"Теги"},Qp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Yp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Xp={Authors:"Tác giả",Cancel:"Hủy","No matches found":"Không tìm thấy",Posts:"Bài viết","Search posts, tags and authors":"Tìm bài viết, thẻ & tác giả","Show more results":"Xem thêm kết quả",Tags:"Thẻ"},Zp={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"},eg={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"};var du;function pu(){return du||(du={"/ghost/i18n/locales/af/search.json":function(){return Kd},"/ghost/i18n/locales/ar/search.json":function(){return Gd},"/ghost/i18n/locales/bg/search.json":function(){return Jd},"/ghost/i18n/locales/bn/search.json":function(){return Qd},"/ghost/i18n/locales/bs/search.json":function(){return Yd},"/ghost/i18n/locales/ca/search.json":function(){return Xd},"/ghost/i18n/locales/cs/search.json":function(){return Zd},"/ghost/i18n/locales/da/search.json":function(){return ep},"/ghost/i18n/locales/de-CH/search.json":function(){return tp},"/ghost/i18n/locales/de/search.json":function(){return np},"/ghost/i18n/locales/el/search.json":function(){return rp},"/ghost/i18n/locales/en/search.json":function(){return sp},"/ghost/i18n/locales/eo/search.json":function(){return op},"/ghost/i18n/locales/es/search.json":function(){return ip},"/ghost/i18n/locales/et/search.json":function(){return lp},"/ghost/i18n/locales/eu/search.json":function(){return ap},"/ghost/i18n/locales/fa/search.json":function(){return up},"/ghost/i18n/locales/fi/search.json":function(){return cp},"/ghost/i18n/locales/fr/search.json":function(){return fp},"/ghost/i18n/locales/gd/search.json":function(){return hp},"/ghost/i18n/locales/he/search.json":function(){return dp},"/ghost/i18n/locales/hi/search.json":function(){return pp},"/ghost/i18n/locales/hr/search.json":function(){return gp},"/ghost/i18n/locales/hu/search.json":function(){return mp},"/ghost/i18n/locales/id/search.json":function(){return yp},"/ghost/i18n/locales/is/search.json":function(){return vp},"/ghost/i18n/locales/it/search.json":function(){return wp},"/ghost/i18n/locales/ja/search.json":function(){return Sp},"/ghost/i18n/locales/ko/search.json":function(){return xp},"/ghost/i18n/locales/kz/search.json":function(){return Cp},"/ghost/i18n/locales/lt/search.json":function(){return kp},"/ghost/i18n/locales/lv/search.json":function(){return Pp},"/ghost/i18n/locales/mk/search.json":function(){return Ep},"/ghost/i18n/locales/mn/search.json":function(){return $p},"/ghost/i18n/locales/ms/search.json":function(){return jp},"/ghost/i18n/locales/nb/search.json":function(){return Ap},"/ghost/i18n/locales/ne/search.json":function(){return Op},"/ghost/i18n/locales/nl/search.json":function(){return Tp},"/ghost/i18n/locales/nn/search.json":function(){return Np},"/ghost/i18n/locales/pa/search.json":function(){return Rp},"/ghost/i18n/locales/pl/search.json":function(){return _p},"/ghost/i18n/locales/pt-BR/search.json":function(){return Lp},"/ghost/i18n/locales/pt/search.json":function(){return Fp},"/ghost/i18n/locales/ro/search.json":function(){return Ip},"/ghost/i18n/locales/ru/search.json":function(){return Dp},"/ghost/i18n/locales/si/search.json":function(){return Mp},"/ghost/i18n/locales/sk/search.json":function(){return zp},"/ghost/i18n/locales/sl/search.json":function(){return bp},"/ghost/i18n/locales/sq/search.json":function(){return Up},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return Bp},"/ghost/i18n/locales/sr/search.json":function(){return qp},"/ghost/i18n/locales/sv/search.json":function(){return Vp},"/ghost/i18n/locales/sw/search.json":function(){return Hp},"/ghost/i18n/locales/ta/search.json":function(){return Wp},"/ghost/i18n/locales/th/search.json":function(){return Kp},"/ghost/i18n/locales/tr/search.json":function(){return Gp},"/ghost/i18n/locales/uk/search.json":function(){return Jp},"/ghost/i18n/locales/ur/search.json":function(){return Qp},"/ghost/i18n/locales/uz/search.json":function(){return Yp},"/ghost/i18n/locales/vi/search.json":function(){return Xp},"/ghost/i18n/locales/zh-Hant/search.json":function(){return Zp},"/ghost/i18n/locales/zh/search.json":function(){return eg}})}function Nn(r){function s(l){var i=gu(l,r);if(i!==null)return pu()[i]();throw new Error('Could not dynamically require "'+l+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return s.resolve=function(l){var i=gu(l,r);return i!==null?i:require.resolve(l)},s}function gu(r,s){var l=tg(r);r=js(r);var i;r[0]==="/"&&(s="");for(var u=pu(),c=["",".js",".json"];l?i=js(s+"/node_modules/"+r):i=js(s+"/"+r),!i.endsWith("/..");){for(var d=0;d<c.length;d++){var v=i+c[d];if(u[v])return v}if(!l)break;var g=js(s+"/..");if(g===s)break;s=g}return null}function tg(r){var s=r[0];if(s==="/"||s==="\\")return!1;var l=r[1],i=r[2];return!(s==="."&&(!l||l==="/"||l==="\\")||s==="."&&l==="."&&(!i||i==="/"||i==="\\")||l===":"&&(i==="/"||i==="\\"))}function js(r){r=r.replace(/\\/g,"/");for(var s=r.split("/"),l=s[0]==="",i=1;i<s.length;i++)(s[i]==="."||s[i]==="")&&s.splice(i--,1);for(var i=1;i<s.length;i++)s[i]===".."&&i>0&&s[i-1]!==".."&&s[i-1]!=="."&&(s.splice(--i,2),i--);return r=s.join("/"),l&&r[0]!=="/"?r="/"+r:r.length===0&&(r="."),r}var Kn={exports:{}},Zo,mu;function ng(){if(mu)return Zo;mu=1;const r=k=>typeof k=="string",s=()=>{let k,f;const p=new Promise((m,x)=>{k=m,f=x});return p.resolve=k,p.reject=f,p},l=k=>k==null?"":""+k,i=(k,f,p)=>{k.forEach(m=>{f[m]&&(p[m]=f[m])})},u=/###/g,c=k=>k&&k.indexOf("###")>-1?k.replace(u,"."):k,d=k=>!k||r(k),v=(k,f,p)=>{const m=r(f)?f.split("."):f;let x=0;for(;x<m.length-1;){if(d(k))return{};const E=c(m[x]);!k[E]&&p&&(k[E]=new p),Object.prototype.hasOwnProperty.call(k,E)?k=k[E]:k={},++x}return d(k)?{}:{obj:k,k:c(m[x])}},g=(k,f,p)=>{const{obj:m,k:x}=v(k,f,Object);if(m!==void 0||f.length===1){m[x]=p;return}let E=f[f.length-1],N=f.slice(0,f.length-1),I=v(k,N,Object);for(;I.obj===void 0&&N.length;)E=`${N[N.length-1]}.${E}`,N=N.slice(0,N.length-1),I=v(k,N,Object),I&&I.obj&&typeof I.obj[`${I.k}.${E}`]<"u"&&(I.obj=void 0);I.obj[`${I.k}.${E}`]=p},C=(k,f,p,m)=>{const{obj:x,k:E}=v(k,f,Object);x[E]=x[E]||[],x[E].push(p)},$=(k,f)=>{const{obj:p,k:m}=v(k,f);if(p)return p[m]},P=(k,f,p)=>{const m=$(k,p);return m!==void 0?m:$(f,p)},O=(k,f,p)=>{for(const m in f)m!=="__proto__"&&m!=="constructor"&&(m in k?r(k[m])||k[m]instanceof String||r(f[m])||f[m]instanceof String?p&&(k[m]=f[m]):O(k[m],f[m],p):k[m]=f[m]);return k},F=k=>k.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const V=k=>r(k)?k.replace(/[&<>"'\/]/g,f=>b[f]):k;class U{constructor(f){this.capacity=f,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(f){const p=this.regExpMap.get(f);if(p!==void 0)return p;const m=new RegExp(f);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(f,m),this.regExpQueue.push(f),m}}const J=[" ",",","?","!",";"],re=new U(20),we=(k,f,p)=>{f=f||"",p=p||"";const m=J.filter(N=>f.indexOf(N)<0&&p.indexOf(N)<0);if(m.length===0)return!0;const x=re.getRegExp(`(${m.map(N=>N==="?"?"\\?":N).join("|")})`);let E=!x.test(k);if(!E){const N=k.indexOf(p);N>0&&!x.test(k.substring(0,N))&&(E=!0)}return E},ge=function(k,f){let p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!k)return;if(k[f])return k[f];const m=f.split(p);let x=k;for(let E=0;E<m.length;){if(!x||typeof x!="object")return;let N,I="";for(let M=E;M<m.length;++M)if(M!==E&&(I+=p),I+=m[M],N=x[I],N!==void 0){if(["string","number","boolean"].indexOf(typeof N)>-1&&M<m.length-1)continue;E+=M-E+1;break}x=N}return x},ne=k=>k&&k.replace("_","-"),me={type:"logger",log(k){this.output("log",k)},warn(k){this.output("warn",k)},error(k){this.output("error",k)},output(k,f){console&&console[k]&&console[k].apply(console,f)}};class ie{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(f,p)}init(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=p.prefix||"i18next:",this.logger=f||me,this.options=p,this.debug=p.debug}log(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"log","",!0)}warn(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"warn","",!0)}error(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"error","")}deprecate(){for(var f=arguments.length,p=new Array(f),m=0;m<f;m++)p[m]=arguments[m];return this.forward(p,"warn","WARNING DEPRECATED: ",!0)}forward(f,p,m,x){return x&&!this.debug?null:(r(f[0])&&(f[0]=`${m}${this.prefix} ${f[0]}`),this.logger[p](f))}create(f){return new ie(this.logger,{prefix:`${this.prefix}:${f}:`,...this.options})}clone(f){return f=f||this.options,f.prefix=f.prefix||this.prefix,new ie(this.logger,f)}}var fe=new ie;class Ee{constructor(){this.observers={}}on(f,p){return f.split(" ").forEach(m=>{this.observers[m]||(this.observers[m]=new Map);const x=this.observers[m].get(p)||0;this.observers[m].set(p,x+1)}),this}off(f,p){if(this.observers[f]){if(!p){delete this.observers[f];return}this.observers[f].delete(p)}}emit(f){for(var p=arguments.length,m=new Array(p>1?p-1:0),x=1;x<p;x++)m[x-1]=arguments[x];this.observers[f]&&Array.from(this.observers[f].entries()).forEach(N=>{let[I,M]=N;for(let Q=0;Q<M;Q++)I(...m)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(N=>{let[I,M]=N;for(let Q=0;Q<M;Q++)I.apply(I,[f,...m])})}}class L extends Ee{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=f||{},this.options=p,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(f){this.options.ns.indexOf(f)<0&&this.options.ns.push(f)}removeNamespaces(f){const p=this.options.ns.indexOf(f);p>-1&&this.options.ns.splice(p,1)}getResource(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=x.keySeparator!==void 0?x.keySeparator:this.options.keySeparator,N=x.ignoreJSONStructure!==void 0?x.ignoreJSONStructure:this.options.ignoreJSONStructure;let I;f.indexOf(".")>-1?I=f.split("."):(I=[f,p],m&&(Array.isArray(m)?I.push(...m):r(m)&&E?I.push(...m.split(E)):I.push(m)));const M=$(this.data,I);return!M&&!p&&!m&&f.indexOf(".")>-1&&(f=I[0],p=I[1],m=I.slice(2).join(".")),M||!N||!r(m)?M:ge(this.data&&this.data[f]&&this.data[f][p],m,E)}addResource(f,p,m,x){let E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const N=E.keySeparator!==void 0?E.keySeparator:this.options.keySeparator;let I=[f,p];m&&(I=I.concat(N?m.split(N):m)),f.indexOf(".")>-1&&(I=f.split("."),x=p,p=I[1]),this.addNamespaces(p),g(this.data,I,x),E.silent||this.emit("added",f,p,m,x)}addResources(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const E in m)(r(m[E])||Array.isArray(m[E]))&&this.addResource(f,p,E,m[E],{silent:!0});x.silent||this.emit("added",f,p,m)}addResourceBundle(f,p,m,x,E){let N=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},I=[f,p];f.indexOf(".")>-1&&(I=f.split("."),x=m,m=p,p=I[1]),this.addNamespaces(p);let M=$(this.data,I)||{};N.skipCopy||(m=JSON.parse(JSON.stringify(m))),x?O(M,m,E):M={...M,...m},g(this.data,I,M),N.silent||this.emit("added",f,p,m)}removeResourceBundle(f,p){this.hasResourceBundle(f,p)&&delete this.data[f][p],this.removeNamespaces(p),this.emit("removed",f,p)}hasResourceBundle(f,p){return this.getResource(f,p)!==void 0}getResourceBundle(f,p){return p||(p=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(f,p)}:this.getResource(f,p)}getDataByLanguage(f){return this.data[f]}hasLanguageSomeTranslations(f){const p=this.getDataByLanguage(f);return!!(p&&Object.keys(p)||[]).find(x=>p[x]&&Object.keys(p[x]).length>0)}toJSON(){return this.data}}var z={processors:{},addPostProcessor(k){this.processors[k.name]=k},handle(k,f,p,m,x){return k.forEach(E=>{this.processors[E]&&(f=this.processors[E].process(f,p,m,x))}),f}};const Y={};class se extends Ee{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),i(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],f,this),this.options=p,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=fe.create("translator")}changeLanguage(f){f&&(this.language=f)}exists(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(f==null)return!1;const m=this.resolve(f,p);return m&&m.res!==void 0}extractFromKey(f,p){let m=p.nsSeparator!==void 0?p.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const x=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator;let E=p.ns||this.options.defaultNS||[];const N=m&&f.indexOf(m)>-1,I=!this.options.userDefinedKeySeparator&&!p.keySeparator&&!this.options.userDefinedNsSeparator&&!p.nsSeparator&&!we(f,m,x);if(N&&!I){const M=f.match(this.interpolator.nestingRegexp);if(M&&M.length>0)return{key:f,namespaces:r(E)?[E]:E};const Q=f.split(m);(m!==x||m===x&&this.options.ns.indexOf(Q[0])>-1)&&(E=Q.shift()),f=Q.join(x)}return{key:f,namespaces:r(E)?[E]:E}}translate(f,p,m){if(typeof p!="object"&&this.options.overloadTranslationOptionHandler&&(p=this.options.overloadTranslationOptionHandler(arguments)),typeof p=="object"&&(p={...p}),p||(p={}),f==null)return"";Array.isArray(f)||(f=[String(f)]);const x=p.returnDetails!==void 0?p.returnDetails:this.options.returnDetails,E=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator,{key:N,namespaces:I}=this.extractFromKey(f[f.length-1],p),M=I[I.length-1],Q=p.lng||this.language,ee=p.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(Q&&Q.toLowerCase()==="cimode"){if(ee){const Ue=p.nsSeparator||this.options.nsSeparator;return x?{res:`${M}${Ue}${N}`,usedKey:N,exactUsedKey:N,usedLng:Q,usedNS:M,usedParams:this.getUsedParamsDetails(p)}:`${M}${Ue}${N}`}return x?{res:N,usedKey:N,exactUsedKey:N,usedLng:Q,usedNS:M,usedParams:this.getUsedParamsDetails(p)}:N}const ue=this.resolve(f,p);let K=ue&&ue.res;const Se=ue&&ue.usedKey||N,_e=ue&&ue.exactUsedKey||N,Ke=Object.prototype.toString.apply(K),ze=["[object Number]","[object Function]","[object RegExp]"],tt=p.joinArrays!==void 0?p.joinArrays:this.options.joinArrays,nt=!this.i18nFormat||this.i18nFormat.handleAsObject,Lt=!r(K)&&typeof K!="boolean"&&typeof K!="number";if(nt&&K&&Lt&&ze.indexOf(Ke)<0&&!(r(tt)&&Array.isArray(K))){if(!p.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Ue=this.options.returnedObjectHandler?this.options.returnedObjectHandler(Se,K,{...p,ns:I}):`key '${N} (${this.language})' returned an object instead of string.`;return x?(ue.res=Ue,ue.usedParams=this.getUsedParamsDetails(p),ue):Ue}if(E){const Ue=Array.isArray(K),gt=Ue?[]:{},vt=Ue?_e:Se;for(const rt in K)if(Object.prototype.hasOwnProperty.call(K,rt)){const Jn=`${vt}${E}${rt}`;gt[rt]=this.translate(Jn,{...p,joinArrays:!1,ns:I}),gt[rt]===Jn&&(gt[rt]=K[rt])}K=gt}}else if(nt&&r(tt)&&Array.isArray(K))K=K.join(tt),K&&(K=this.extendTranslation(K,f,p,m));else{let Ue=!1,gt=!1;const vt=p.count!==void 0&&!r(p.count),rt=se.hasDefaultValue(p),Jn=vt?this.pluralResolver.getSuffix(Q,p.count,p):"",Tr=p.ordinal&&vt?this.pluralResolver.getSuffix(Q,p.count,{ordinal:!1}):"",Qn=vt&&!p.ordinal&&p.count===0&&this.pluralResolver.shouldUseIntlApi(),Wt=Qn&&p[`defaultValue${this.options.pluralSeparator}zero`]||p[`defaultValue${Jn}`]||p[`defaultValue${Tr}`]||p.defaultValue;!this.isValidLookup(K)&&rt&&(Ue=!0,K=Wt),this.isValidLookup(K)||(gt=!0,K=N);const rn=(p.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&gt?void 0:K,$t=rt&&Wt!==K&&this.options.updateMissing;if(gt||Ue||$t){if(this.logger.log($t?"updateKey":"missingKey",Q,M,N,$t?Wt:K),E){const it=this.resolve(N,{...p,keySeparator:!1});it&&it.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 sn=[];const Rn=this.languageUtils.getFallbackCodes(this.options.fallbackLng,p.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Rn&&Rn[0])for(let it=0;it<Rn.length;it++)sn.push(Rn[it]);else this.options.saveMissingTo==="all"?sn=this.languageUtils.toResolveHierarchy(p.lng||this.language):sn.push(p.lng||this.language);const Nr=(it,zt,Kt)=>{const Rr=rt&&Kt!==K?Kt:rn;this.options.missingKeyHandler?this.options.missingKeyHandler(it,M,zt,Rr,$t,p):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(it,M,zt,Rr,$t,p),this.emit("missingKey",it,M,zt,K)};this.options.saveMissing&&(this.options.saveMissingPlurals&&vt?sn.forEach(it=>{const zt=this.pluralResolver.getSuffixes(it,p);Qn&&p[`defaultValue${this.options.pluralSeparator}zero`]&&zt.indexOf(`${this.options.pluralSeparator}zero`)<0&&zt.push(`${this.options.pluralSeparator}zero`),zt.forEach(Kt=>{Nr([it],N+Kt,p[`defaultValue${Kt}`]||Wt)})}):Nr(sn,N,Wt))}K=this.extendTranslation(K,f,p,ue,m),gt&&K===N&&this.options.appendNamespaceToMissingKey&&(K=`${M}:${N}`),(gt||Ue)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?K=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${M}:${N}`:N,Ue?K:void 0):K=this.options.parseMissingKeyHandler(K))}return x?(ue.res=K,ue.usedParams=this.getUsedParamsDetails(p),ue):K}extendTranslation(f,p,m,x,E){var N=this;if(this.i18nFormat&&this.i18nFormat.parse)f=this.i18nFormat.parse(f,{...this.options.interpolation.defaultVariables,...m},m.lng||this.language||x.usedLng,x.usedNS,x.usedKey,{resolved:x});else if(!m.skipInterpolation){m.interpolation&&this.interpolator.init({...m,interpolation:{...this.options.interpolation,...m.interpolation}});const Q=r(f)&&(m&&m.interpolation&&m.interpolation.skipOnVariables!==void 0?m.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let ee;if(Q){const K=f.match(this.interpolator.nestingRegexp);ee=K&&K.length}let ue=m.replace&&!r(m.replace)?m.replace:m;if(this.options.interpolation.defaultVariables&&(ue={...this.options.interpolation.defaultVariables,...ue}),f=this.interpolator.interpolate(f,ue,m.lng||this.language||x.usedLng,m),Q){const K=f.match(this.interpolator.nestingRegexp),Se=K&&K.length;ee<Se&&(m.nest=!1)}!m.lng&&this.options.compatibilityAPI!=="v1"&&x&&x.res&&(m.lng=this.language||x.usedLng),m.nest!==!1&&(f=this.interpolator.nest(f,function(){for(var K=arguments.length,Se=new Array(K),_e=0;_e<K;_e++)Se[_e]=arguments[_e];return E&&E[0]===Se[0]&&!m.context?(N.logger.warn(`It seems you are nesting recursively key: ${Se[0]} in key: ${p[0]}`),null):N.translate(...Se,p)},m)),m.interpolation&&this.interpolator.reset()}const I=m.postProcess||this.options.postProcess,M=r(I)?[I]:I;return f!=null&&M&&M.length&&m.applyPostProcessor!==!1&&(f=z.handle(M,f,p,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...x,usedParams:this.getUsedParamsDetails(m)},...m}:m,this)),f}resolve(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m,x,E,N,I;return r(f)&&(f=[f]),f.forEach(M=>{if(this.isValidLookup(m))return;const Q=this.extractFromKey(M,p),ee=Q.key;x=ee;let ue=Q.namespaces;this.options.fallbackNS&&(ue=ue.concat(this.options.fallbackNS));const K=p.count!==void 0&&!r(p.count),Se=K&&!p.ordinal&&p.count===0&&this.pluralResolver.shouldUseIntlApi(),_e=p.context!==void 0&&(r(p.context)||typeof p.context=="number")&&p.context!=="",Ke=p.lngs?p.lngs:this.languageUtils.toResolveHierarchy(p.lng||this.language,p.fallbackLng);ue.forEach(ze=>{this.isValidLookup(m)||(I=ze,!Y[`${Ke[0]}-${ze}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(I)&&(Y[`${Ke[0]}-${ze}`]=!0,this.logger.warn(`key "${x}" for languages "${Ke.join(", ")}" won't get resolved as namespace "${I}" 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!!!")),Ke.forEach(tt=>{if(this.isValidLookup(m))return;N=tt;const nt=[ee];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(nt,ee,tt,ze,p);else{let Ue;K&&(Ue=this.pluralResolver.getSuffix(tt,p.count,p));const gt=`${this.options.pluralSeparator}zero`,vt=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(K&&(nt.push(ee+Ue),p.ordinal&&Ue.indexOf(vt)===0&&nt.push(ee+Ue.replace(vt,this.options.pluralSeparator)),Se&&nt.push(ee+gt)),_e){const rt=`${ee}${this.options.contextSeparator}${p.context}`;nt.push(rt),K&&(nt.push(rt+Ue),p.ordinal&&Ue.indexOf(vt)===0&&nt.push(rt+Ue.replace(vt,this.options.pluralSeparator)),Se&&nt.push(rt+gt))}}let Lt;for(;Lt=nt.pop();)this.isValidLookup(m)||(E=Lt,m=this.getResource(tt,ze,Lt,p))}))})}),{res:m,usedKey:x,exactUsedKey:E,usedLng:N,usedNS:I}}isValidLookup(f){return f!==void 0&&!(!this.options.returnNull&&f===null)&&!(!this.options.returnEmptyString&&f==="")}getResource(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(f,p,m,x):this.resourceStore.getResource(f,p,m,x)}getUsedParamsDetails(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const p=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],m=f.replace&&!r(f.replace);let x=m?f.replace:f;if(m&&typeof f.count<"u"&&(x.count=f.count),this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),!m){x={...x};for(const E of p)delete x[E]}return x}static hasDefaultValue(f){const p="defaultValue";for(const m in f)if(Object.prototype.hasOwnProperty.call(f,m)&&p===m.substring(0,p.length)&&f[m]!==void 0)return!0;return!1}}const de=k=>k.charAt(0).toUpperCase()+k.slice(1);class Oe{constructor(f){this.options=f,this.supportedLngs=this.options.supportedLngs||!1,this.logger=fe.create("languageUtils")}getScriptPartFromCode(f){if(f=ne(f),!f||f.indexOf("-")<0)return null;const p=f.split("-");return p.length===2||(p.pop(),p[p.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(p.join("-"))}getLanguagePartFromCode(f){if(f=ne(f),!f||f.indexOf("-")<0)return f;const p=f.split("-");return this.formatLanguageCode(p[0])}formatLanguageCode(f){if(r(f)&&f.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let x=Intl.getCanonicalLocales(f)[0];if(x&&this.options.lowerCaseLng&&(x=x.toLowerCase()),x)return x}catch{}const p=["hans","hant","latn","cyrl","cans","mong","arab"];let m=f.split("-");return this.options.lowerCaseLng?m=m.map(x=>x.toLowerCase()):m.length===2?(m[0]=m[0].toLowerCase(),m[1]=m[1].toUpperCase(),p.indexOf(m[1].toLowerCase())>-1&&(m[1]=de(m[1].toLowerCase()))):m.length===3&&(m[0]=m[0].toLowerCase(),m[1].length===2&&(m[1]=m[1].toUpperCase()),m[0]!=="sgn"&&m[2].length===2&&(m[2]=m[2].toUpperCase()),p.indexOf(m[1].toLowerCase())>-1&&(m[1]=de(m[1].toLowerCase())),p.indexOf(m[2].toLowerCase())>-1&&(m[2]=de(m[2].toLowerCase()))),m.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?f.toLowerCase():f}isSupportedCode(f){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(f=this.getLanguagePartFromCode(f)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(f)>-1}getBestMatchFromCodes(f){if(!f)return null;let p;return f.forEach(m=>{if(p)return;const x=this.formatLanguageCode(m);(!this.options.supportedLngs||this.isSupportedCode(x))&&(p=x)}),!p&&this.options.supportedLngs&&f.forEach(m=>{if(p)return;const x=this.getLanguagePartFromCode(m);if(this.isSupportedCode(x))return p=x;p=this.options.supportedLngs.find(E=>{if(E===x)return E;if(!(E.indexOf("-")<0&&x.indexOf("-")<0)&&(E.indexOf("-")>0&&x.indexOf("-")<0&&E.substring(0,E.indexOf("-"))===x||E.indexOf(x)===0&&x.length>1))return E})}),p||(p=this.getFallbackCodes(this.options.fallbackLng)[0]),p}getFallbackCodes(f,p){if(!f)return[];if(typeof f=="function"&&(f=f(p)),r(f)&&(f=[f]),Array.isArray(f))return f;if(!p)return f.default||[];let m=f[p];return m||(m=f[this.getScriptPartFromCode(p)]),m||(m=f[this.formatLanguageCode(p)]),m||(m=f[this.getLanguagePartFromCode(p)]),m||(m=f.default),m||[]}toResolveHierarchy(f,p){const m=this.getFallbackCodes(p||this.options.fallbackLng||[],f),x=[],E=N=>{N&&(this.isSupportedCode(N)?x.push(N):this.logger.warn(`rejecting language code not found in supportedLngs: ${N}`))};return r(f)&&(f.indexOf("-")>-1||f.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&E(this.formatLanguageCode(f)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&E(this.getScriptPartFromCode(f)),this.options.load!=="currentOnly"&&E(this.getLanguagePartFromCode(f))):r(f)&&E(this.formatLanguageCode(f)),m.forEach(N=>{x.indexOf(N)<0&&E(this.formatLanguageCode(N))}),x}}let Ie=[{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}],w={1:k=>+(k>1),2:k=>+(k!=1),3:k=>0,4:k=>k%10==1&&k%100!=11?0:k%10>=2&&k%10<=4&&(k%100<10||k%100>=20)?1:2,5:k=>k==0?0:k==1?1:k==2?2:k%100>=3&&k%100<=10?3:k%100>=11?4:5,6:k=>k==1?0:k>=2&&k<=4?1:2,7:k=>k==1?0:k%10>=2&&k%10<=4&&(k%100<10||k%100>=20)?1:2,8:k=>k==1?0:k==2?1:k!=8&&k!=11?2:3,9:k=>+(k>=2),10:k=>k==1?0:k==2?1:k<7?2:k<11?3:4,11:k=>k==1||k==11?0:k==2||k==12?1:k>2&&k<20?2:3,12:k=>+(k%10!=1||k%100==11),13:k=>+(k!==0),14:k=>k==1?0:k==2?1:k==3?2:3,15:k=>k%10==1&&k%100!=11?0:k%10>=2&&(k%100<10||k%100>=20)?1:2,16:k=>k%10==1&&k%100!=11?0:k!==0?1:2,17:k=>k==1||k%10==1&&k%100!=11?0:1,18:k=>k==0?0:k==1?1:2,19:k=>k==1?0:k==0||k%100>1&&k%100<11?1:k%100>10&&k%100<20?2:3,20:k=>k==1?0:k==0||k%100>0&&k%100<20?1:2,21:k=>k%100==1?1:k%100==2?2:k%100==3||k%100==4?3:0,22:k=>k==1?0:k==2?1:(k<0||k>10)&&k%10==0?2:3};const T=["v1","v2","v3"],q=["v4"],pe={zero:0,one:1,two:2,few:3,many:4,other:5},B=()=>{const k={};return Ie.forEach(f=>{f.lngs.forEach(p=>{k[p]={numbers:f.nr,plurals:w[f.fc]}})}),k};class Z{constructor(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=f,this.options=p,this.logger=fe.create("pluralResolver"),(!this.options.compatibilityJSON||q.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=B(),this.pluralRulesCache={}}addRule(f,p){this.rules[f]=p}clearCache(){this.pluralRulesCache={}}getRule(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const m=ne(f==="dev"?"en":f),x=p.ordinal?"ordinal":"cardinal",E=JSON.stringify({cleanedCode:m,type:x});if(E in this.pluralRulesCache)return this.pluralRulesCache[E];let N;try{N=new Intl.PluralRules(m,{type:x})}catch{if(!f.match(/-|_/))return;const M=this.languageUtils.getLanguagePartFromCode(f);N=this.getRule(M,p)}return this.pluralRulesCache[E]=N,N}return this.rules[f]||this.rules[this.languageUtils.getLanguagePartFromCode(f)]}needsPlural(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(f,p);return this.shouldUseIntlApi()?m&&m.resolvedOptions().pluralCategories.length>1:m&&m.numbers.length>1}getPluralFormsOfKey(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(f,m).map(x=>`${p}${x}`)}getSuffixes(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(f,p);return m?this.shouldUseIntlApi()?m.resolvedOptions().pluralCategories.sort((x,E)=>pe[x]-pe[E]).map(x=>`${this.options.prepend}${p.ordinal?`ordinal${this.options.prepend}`:""}${x}`):m.numbers.map(x=>this.getSuffix(f,x,p)):[]}getSuffix(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const x=this.getRule(f,m);return x?this.shouldUseIntlApi()?`${this.options.prepend}${m.ordinal?`ordinal${this.options.prepend}`:""}${x.select(p)}`:this.getSuffixRetroCompatible(x,p):(this.logger.warn(`no plural rule found for: ${f}`),"")}getSuffixRetroCompatible(f,p){const m=f.noAbs?f.plurals(p):f.plurals(Math.abs(p));let x=f.numbers[m];this.options.simplifyPluralSuffix&&f.numbers.length===2&&f.numbers[0]===1&&(x===2?x="plural":x===1&&(x=""));const E=()=>this.options.prepend&&x.toString()?this.options.prepend+x.toString():x.toString();return this.options.compatibilityJSON==="v1"?x===1?"":typeof x=="number"?`_plural_${x.toString()}`:E():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&f.numbers.length===2&&f.numbers[0]===1?E():this.options.prepend&&m.toString()?this.options.prepend+m.toString():m.toString()}shouldUseIntlApi(){return!T.includes(this.options.compatibilityJSON)}}const W=function(k,f,p){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",x=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,E=P(k,f,p);return!E&&x&&r(p)&&(E=ge(k,p,m),E===void 0&&(E=ge(f,p,m))),E},oe=k=>k.replace(/\$/g,"$$$$");class ae{constructor(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=fe.create("interpolator"),this.options=f,this.format=f.interpolation&&f.interpolation.format||(p=>p),this.init(f)}init(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};f.interpolation||(f.interpolation={escapeValue:!0});const{escape:p,escapeValue:m,useRawValueToEscape:x,prefix:E,prefixEscaped:N,suffix:I,suffixEscaped:M,formatSeparator:Q,unescapeSuffix:ee,unescapePrefix:ue,nestingPrefix:K,nestingPrefixEscaped:Se,nestingSuffix:_e,nestingSuffixEscaped:Ke,nestingOptionsSeparator:ze,maxReplaces:tt,alwaysFormat:nt}=f.interpolation;this.escape=p!==void 0?p:V,this.escapeValue=m!==void 0?m:!0,this.useRawValueToEscape=x!==void 0?x:!1,this.prefix=E?F(E):N||"{{",this.suffix=I?F(I):M||"}}",this.formatSeparator=Q||",",this.unescapePrefix=ee?"":ue||"-",this.unescapeSuffix=this.unescapePrefix?"":ee||"",this.nestingPrefix=K?F(K):Se||F("$t("),this.nestingSuffix=_e?F(_e):Ke||F(")"),this.nestingOptionsSeparator=ze||",",this.maxReplaces=tt||1e3,this.alwaysFormat=nt!==void 0?nt:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const f=(p,m)=>p&&p.source===m?(p.lastIndex=0,p):new RegExp(m,"g");this.regexp=f(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=f(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=f(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(f,p,m,x){let E,N,I;const M=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},Q=Se=>{if(Se.indexOf(this.formatSeparator)<0){const tt=W(p,M,Se,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(tt,void 0,m,{...x,...p,interpolationkey:Se}):tt}const _e=Se.split(this.formatSeparator),Ke=_e.shift().trim(),ze=_e.join(this.formatSeparator).trim();return this.format(W(p,M,Ke,this.options.keySeparator,this.options.ignoreJSONStructure),ze,m,{...x,...p,interpolationkey:Ke})};this.resetRegExp();const ee=x&&x.missingInterpolationHandler||this.options.missingInterpolationHandler,ue=x&&x.interpolation&&x.interpolation.skipOnVariables!==void 0?x.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:Se=>oe(Se)},{regex:this.regexp,safeValue:Se=>this.escapeValue?oe(this.escape(Se)):oe(Se)}].forEach(Se=>{for(I=0;E=Se.regex.exec(f);){const _e=E[1].trim();if(N=Q(_e),N===void 0)if(typeof ee=="function"){const ze=ee(f,E,x);N=r(ze)?ze:""}else if(x&&Object.prototype.hasOwnProperty.call(x,_e))N="";else if(ue){N=E[0];continue}else this.logger.warn(`missed to pass in variable ${_e} for interpolating ${f}`),N="";else!r(N)&&!this.useRawValueToEscape&&(N=l(N));const Ke=Se.safeValue(N);if(f=f.replace(E[0],Ke),ue?(Se.regex.lastIndex+=N.length,Se.regex.lastIndex-=E[0].length):Se.regex.lastIndex=0,I++,I>=this.maxReplaces)break}}),f}nest(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x,E,N;const I=(M,Q)=>{const ee=this.nestingOptionsSeparator;if(M.indexOf(ee)<0)return M;const ue=M.split(new RegExp(`${ee}[ ]*{`));let K=`{${ue[1]}`;M=ue[0],K=this.interpolate(K,N);const Se=K.match(/'/g),_e=K.match(/"/g);(Se&&Se.length%2===0&&!_e||_e.length%2!==0)&&(K=K.replace(/'/g,'"'));try{N=JSON.parse(K),Q&&(N={...Q,...N})}catch(Ke){return this.logger.warn(`failed parsing options string in nesting for key ${M}`,Ke),`${M}${ee}${K}`}return N.defaultValue&&N.defaultValue.indexOf(this.prefix)>-1&&delete N.defaultValue,M};for(;x=this.nestingRegexp.exec(f);){let M=[];N={...m},N=N.replace&&!r(N.replace)?N.replace:N,N.applyPostProcessor=!1,delete N.defaultValue;let Q=!1;if(x[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(x[1])){const ee=x[1].split(this.formatSeparator).map(ue=>ue.trim());x[1]=ee.shift(),M=ee,Q=!0}if(E=p(I.call(this,x[1].trim(),N),N),E&&x[0]===f&&!r(E))return E;r(E)||(E=l(E)),E||(this.logger.warn(`missed to resolve ${x[1]} for nesting ${f}`),E=""),Q&&(E=M.reduce((ee,ue)=>this.format(ee,ue,m.lng,{...m,interpolationkey:x[1].trim()}),E.trim())),f=f.replace(x[0],E),this.regexp.lastIndex=0}return f}}const Re=k=>{let f=k.toLowerCase().trim();const p={};if(k.indexOf("(")>-1){const m=k.split("(");f=m[0].toLowerCase().trim();const x=m[1].substring(0,m[1].length-1);f==="currency"&&x.indexOf(":")<0?p.currency||(p.currency=x.trim()):f==="relativetime"&&x.indexOf(":")<0?p.range||(p.range=x.trim()):x.split(";").forEach(N=>{if(N){const[I,...M]=N.split(":"),Q=M.join(":").trim().replace(/^'+|'+$/g,""),ee=I.trim();p[ee]||(p[ee]=Q),Q==="false"&&(p[ee]=!1),Q==="true"&&(p[ee]=!0),isNaN(Q)||(p[ee]=parseInt(Q,10))}})}return{formatName:f,formatOptions:p}},be=k=>{const f={};return(p,m,x)=>{let E=x;x&&x.interpolationkey&&x.formatParams&&x.formatParams[x.interpolationkey]&&x[x.interpolationkey]&&(E={...E,[x.interpolationkey]:void 0});const N=m+JSON.stringify(E);let I=f[N];return I||(I=k(ne(m),x),f[N]=I),I(p)}};class pt{constructor(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=fe.create("formatter"),this.options=f,this.formats={number:be((p,m)=>{const x=new Intl.NumberFormat(p,{...m});return E=>x.format(E)}),currency:be((p,m)=>{const x=new Intl.NumberFormat(p,{...m,style:"currency"});return E=>x.format(E)}),datetime:be((p,m)=>{const x=new Intl.DateTimeFormat(p,{...m});return E=>x.format(E)}),relativetime:be((p,m)=>{const x=new Intl.RelativeTimeFormat(p,{...m});return E=>x.format(E,m.range||"day")}),list:be((p,m)=>{const x=new Intl.ListFormat(p,{...m});return E=>x.format(E)})},this.init(f)}init(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=p.interpolation.formatSeparator||","}add(f,p){this.formats[f.toLowerCase().trim()]=p}addCached(f,p){this.formats[f.toLowerCase().trim()]=be(p)}format(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=p.split(this.formatSeparator);if(E.length>1&&E[0].indexOf("(")>1&&E[0].indexOf(")")<0&&E.find(I=>I.indexOf(")")>-1)){const I=E.findIndex(M=>M.indexOf(")")>-1);E[0]=[E[0],...E.splice(1,I)].join(this.formatSeparator)}return E.reduce((I,M)=>{const{formatName:Q,formatOptions:ee}=Re(M);if(this.formats[Q]){let ue=I;try{const K=x&&x.formatParams&&x.formatParams[x.interpolationkey]||{},Se=K.locale||K.lng||x.locale||x.lng||m;ue=this.formats[Q](I,Se,{...ee,...x,...K})}catch(K){this.logger.warn(K)}return ue}else this.logger.warn(`there was no format function for ${Q}`);return I},f)}}const De=(k,f)=>{k.pending[f]!==void 0&&(delete k.pending[f],k.pendingCount--)};class Me extends Ee{constructor(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=f,this.store=p,this.services=m,this.languageUtils=m.languageUtils,this.options=x,this.logger=fe.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=x.maxParallelReads||10,this.readingCalls=0,this.maxRetries=x.maxRetries>=0?x.maxRetries:5,this.retryTimeout=x.retryTimeout>=1?x.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(m,x.backend,x)}queueLoad(f,p,m,x){const E={},N={},I={},M={};return f.forEach(Q=>{let ee=!0;p.forEach(ue=>{const K=`${Q}|${ue}`;!m.reload&&this.store.hasResourceBundle(Q,ue)?this.state[K]=2:this.state[K]<0||(this.state[K]===1?N[K]===void 0&&(N[K]=!0):(this.state[K]=1,ee=!1,N[K]===void 0&&(N[K]=!0),E[K]===void 0&&(E[K]=!0),M[ue]===void 0&&(M[ue]=!0)))}),ee||(I[Q]=!0)}),(Object.keys(E).length||Object.keys(N).length)&&this.queue.push({pending:N,pendingCount:Object.keys(N).length,loaded:{},errors:[],callback:x}),{toLoad:Object.keys(E),pending:Object.keys(N),toLoadLanguages:Object.keys(I),toLoadNamespaces:Object.keys(M)}}loaded(f,p,m){const x=f.split("|"),E=x[0],N=x[1];p&&this.emit("failedLoading",E,N,p),!p&&m&&this.store.addResourceBundle(E,N,m,void 0,void 0,{skipCopy:!0}),this.state[f]=p?-1:2,p&&m&&(this.state[f]=0);const I={};this.queue.forEach(M=>{C(M.loaded,[E],N),De(M,f),p&&M.errors.push(p),M.pendingCount===0&&!M.done&&(Object.keys(M.loaded).forEach(Q=>{I[Q]||(I[Q]={});const ee=M.loaded[Q];ee.length&&ee.forEach(ue=>{I[Q][ue]===void 0&&(I[Q][ue]=!0)})}),M.done=!0,M.errors.length?M.callback(M.errors):M.callback())}),this.emit("loaded",I),this.queue=this.queue.filter(M=>!M.done)}read(f,p,m){let x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,N=arguments.length>5?arguments[5]:void 0;if(!f.length)return N(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:f,ns:p,fcName:m,tried:x,wait:E,callback:N});return}this.readingCalls++;const I=(Q,ee)=>{if(this.readingCalls--,this.waitingReads.length>0){const ue=this.waitingReads.shift();this.read(ue.lng,ue.ns,ue.fcName,ue.tried,ue.wait,ue.callback)}if(Q&&ee&&x<this.maxRetries){setTimeout(()=>{this.read.call(this,f,p,m,x+1,E*2,N)},E);return}N(Q,ee)},M=this.backend[m].bind(this.backend);if(M.length===2){try{const Q=M(f,p);Q&&typeof Q.then=="function"?Q.then(ee=>I(null,ee)).catch(I):I(null,Q)}catch(Q){I(Q)}return}return M(f,p,I)}prepareLoading(f,p){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},x=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."),x&&x();r(f)&&(f=this.languageUtils.toResolveHierarchy(f)),r(p)&&(p=[p]);const E=this.queueLoad(f,p,m,x);if(!E.toLoad.length)return E.pending.length||x(),null;E.toLoad.forEach(N=>{this.loadOne(N)})}load(f,p,m){this.prepareLoading(f,p,{},m)}reload(f,p,m){this.prepareLoading(f,p,{reload:!0},m)}loadOne(f){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const m=f.split("|"),x=m[0],E=m[1];this.read(x,E,"read",void 0,void 0,(N,I)=>{N&&this.logger.warn(`${p}loading namespace ${E} for language ${x} failed`,N),!N&&I&&this.logger.log(`${p}loaded namespace ${E} for language ${x}`,I),this.loaded(f,N,I)})}saveMissing(f,p,m,x,E){let N=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},I=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(p)){this.logger.warn(`did not save key "${m}" as the namespace "${p}" 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(!(m==null||m==="")){if(this.backend&&this.backend.create){const M={...N,isUpdate:E},Q=this.backend.create.bind(this.backend);if(Q.length<6)try{let ee;Q.length===5?ee=Q(f,p,m,x,M):ee=Q(f,p,m,x),ee&&typeof ee.then=="function"?ee.then(ue=>I(null,ue)).catch(I):I(null,ee)}catch(ee){I(ee)}else Q(f,p,m,x,I,M)}!f||!f[0]||this.store.addResource(f[0],p,m,x)}}}const Be=()=>({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:k=>{let f={};if(typeof k[1]=="object"&&(f=k[1]),r(k[1])&&(f.defaultValue=k[1]),r(k[2])&&(f.tDescription=k[2]),typeof k[2]=="object"||typeof k[3]=="object"){const p=k[3]||k[2];Object.keys(p).forEach(m=>{f[m]=p[m]})}return f},interpolation:{escapeValue:!0,format:k=>k,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Fe=k=>(r(k.ns)&&(k.ns=[k.ns]),r(k.fallbackLng)&&(k.fallbackLng=[k.fallbackLng]),r(k.fallbackNS)&&(k.fallbackNS=[k.fallbackNS]),k.supportedLngs&&k.supportedLngs.indexOf("cimode")<0&&(k.supportedLngs=k.supportedLngs.concat(["cimode"])),k),Ge=()=>{},yt=k=>{Object.getOwnPropertyNames(Object.getPrototypeOf(k)).forEach(p=>{typeof k[p]=="function"&&(k[p]=k[p].bind(k))})};class ot extends Ee{constructor(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Fe(f),this.services={},this.logger=fe,this.modules={external:[]},yt(this),p&&!this.isInitialized&&!f.isClone){if(!this.options.initImmediate)return this.init(f,p),this;setTimeout(()=>{this.init(f,p)},0)}}init(){var f=this;let p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof p=="function"&&(m=p,p={}),!p.defaultNS&&p.defaultNS!==!1&&p.ns&&(r(p.ns)?p.defaultNS=p.ns:p.ns.indexOf("translation")<0&&(p.defaultNS=p.ns[0]));const x=Be();this.options={...x,...this.options,...Fe(p)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...x.interpolation,...this.options.interpolation}),p.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=p.keySeparator),p.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=p.nsSeparator);const E=ee=>ee?typeof ee=="function"?new ee:ee:null;if(!this.options.isClone){this.modules.logger?fe.init(E(this.modules.logger),this.options):fe.init(null,this.options);let ee;this.modules.formatter?ee=this.modules.formatter:typeof Intl<"u"&&(ee=pt);const ue=new Oe(this.options);this.store=new L(this.options.resources,this.options);const K=this.services;K.logger=fe,K.resourceStore=this.store,K.languageUtils=ue,K.pluralResolver=new Z(ue,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),ee&&(!this.options.interpolation.format||this.options.interpolation.format===x.interpolation.format)&&(K.formatter=E(ee),K.formatter.init(K,this.options),this.options.interpolation.format=K.formatter.format.bind(K.formatter)),K.interpolator=new ae(this.options),K.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},K.backendConnector=new Me(E(this.modules.backend),K.resourceStore,K,this.options),K.backendConnector.on("*",function(Se){for(var _e=arguments.length,Ke=new Array(_e>1?_e-1:0),ze=1;ze<_e;ze++)Ke[ze-1]=arguments[ze];f.emit(Se,...Ke)}),this.modules.languageDetector&&(K.languageDetector=E(this.modules.languageDetector),K.languageDetector.init&&K.languageDetector.init(K,this.options.detection,this.options)),this.modules.i18nFormat&&(K.i18nFormat=E(this.modules.i18nFormat),K.i18nFormat.init&&K.i18nFormat.init(this)),this.translator=new se(this.services,this.options),this.translator.on("*",function(Se){for(var _e=arguments.length,Ke=new Array(_e>1?_e-1:0),ze=1;ze<_e;ze++)Ke[ze-1]=arguments[ze];f.emit(Se,...Ke)}),this.modules.external.forEach(Se=>{Se.init&&Se.init(this)})}if(this.format=this.options.interpolation.format,m||(m=Ge),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const ee=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);ee.length>0&&ee[0]!=="dev"&&(this.options.lng=ee[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(ee=>{this[ee]=function(){return f.store[ee](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(ee=>{this[ee]=function(){return f.store[ee](...arguments),f}});const M=s(),Q=()=>{const ee=(ue,K)=>{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),M.resolve(K),m(ue,K)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return ee(null,this.t.bind(this));this.changeLanguage(this.options.lng,ee)};return this.options.resources||!this.options.initImmediate?Q():setTimeout(Q,0),M}loadResources(f){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const x=r(f)?f:this.language;if(typeof f=="function"&&(m=f),!this.options.resources||this.options.partialBundledLanguages){if(x&&x.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return m();const E=[],N=I=>{if(!I||I==="cimode")return;this.services.languageUtils.toResolveHierarchy(I).forEach(Q=>{Q!=="cimode"&&E.indexOf(Q)<0&&E.push(Q)})};x?N(x):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(M=>N(M)),this.options.preload&&this.options.preload.forEach(I=>N(I)),this.services.backendConnector.load(E,this.options.ns,I=>{!I&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),m(I)})}else m(null)}reloadResources(f,p,m){const x=s();return typeof f=="function"&&(m=f,f=void 0),typeof p=="function"&&(m=p,p=void 0),f||(f=this.languages),p||(p=this.options.ns),m||(m=Ge),this.services.backendConnector.reload(f,p,E=>{x.resolve(),m(E)}),x}use(f){if(!f)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!f.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return f.type==="backend"&&(this.modules.backend=f),(f.type==="logger"||f.log&&f.warn&&f.error)&&(this.modules.logger=f),f.type==="languageDetector"&&(this.modules.languageDetector=f),f.type==="i18nFormat"&&(this.modules.i18nFormat=f),f.type==="postProcessor"&&z.addPostProcessor(f),f.type==="formatter"&&(this.modules.formatter=f),f.type==="3rdParty"&&this.modules.external.push(f),this}setResolvedLanguage(f){if(!(!f||!this.languages)&&!(["cimode","dev"].indexOf(f)>-1))for(let p=0;p<this.languages.length;p++){const m=this.languages[p];if(!(["cimode","dev"].indexOf(m)>-1)&&this.store.hasLanguageSomeTranslations(m)){this.resolvedLanguage=m;break}}}changeLanguage(f,p){var m=this;this.isLanguageChangingTo=f;const x=s();this.emit("languageChanging",f);const E=M=>{this.language=M,this.languages=this.services.languageUtils.toResolveHierarchy(M),this.resolvedLanguage=void 0,this.setResolvedLanguage(M)},N=(M,Q)=>{Q?(E(Q),this.translator.changeLanguage(Q),this.isLanguageChangingTo=void 0,this.emit("languageChanged",Q),this.logger.log("languageChanged",Q)):this.isLanguageChangingTo=void 0,x.resolve(function(){return m.t(...arguments)}),p&&p(M,function(){return m.t(...arguments)})},I=M=>{!f&&!M&&this.services.languageDetector&&(M=[]);const Q=r(M)?M:this.services.languageUtils.getBestMatchFromCodes(M);Q&&(this.language||E(Q),this.translator.language||this.translator.changeLanguage(Q),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(Q)),this.loadResources(Q,ee=>{N(ee,Q)})};return!f&&this.services.languageDetector&&!this.services.languageDetector.async?I(this.services.languageDetector.detect()):!f&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(I):this.services.languageDetector.detect(I):I(f),x}getFixedT(f,p,m){var x=this;const E=function(N,I){let M;if(typeof I!="object"){for(var Q=arguments.length,ee=new Array(Q>2?Q-2:0),ue=2;ue<Q;ue++)ee[ue-2]=arguments[ue];M=x.options.overloadTranslationOptionHandler([N,I].concat(ee))}else M={...I};M.lng=M.lng||E.lng,M.lngs=M.lngs||E.lngs,M.ns=M.ns||E.ns,M.keyPrefix!==""&&(M.keyPrefix=M.keyPrefix||m||E.keyPrefix);const K=x.options.keySeparator||".";let Se;return M.keyPrefix&&Array.isArray(N)?Se=N.map(_e=>`${M.keyPrefix}${K}${_e}`):Se=M.keyPrefix?`${M.keyPrefix}${K}${N}`:N,x.t(Se,M)};return r(f)?E.lng=f:E.lngs=f,E.ns=p,E.keyPrefix=m,E}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(f){this.options.defaultNS=f}hasLoadedNamespace(f){let p=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 m=p.lng||this.resolvedLanguage||this.languages[0],x=this.options?this.options.fallbackLng:!1,E=this.languages[this.languages.length-1];if(m.toLowerCase()==="cimode")return!0;const N=(I,M)=>{const Q=this.services.backendConnector.state[`${I}|${M}`];return Q===-1||Q===0||Q===2};if(p.precheck){const I=p.precheck(this,N);if(I!==void 0)return I}return!!(this.hasResourceBundle(m,f)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||N(m,f)&&(!x||N(E,f)))}loadNamespaces(f,p){const m=s();return this.options.ns?(r(f)&&(f=[f]),f.forEach(x=>{this.options.ns.indexOf(x)<0&&this.options.ns.push(x)}),this.loadResources(x=>{m.resolve(),p&&p(x)}),m):(p&&p(),Promise.resolve())}loadLanguages(f,p){const m=s();r(f)&&(f=[f]);const x=this.options.preload||[],E=f.filter(N=>x.indexOf(N)<0&&this.services.languageUtils.isSupportedCode(N));return E.length?(this.options.preload=x.concat(E),this.loadResources(N=>{m.resolve(),p&&p(N)}),m):(p&&p(),Promise.resolve())}dir(f){if(f||(f=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!f)return"rtl";const p=["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"],m=this.services&&this.services.languageUtils||new Oe(Be());return p.indexOf(m.getLanguagePartFromCode(f))>-1||f.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1?arguments[1]:void 0;return new ot(f,p)}cloneInstance(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const m=f.forkResourceStore;m&&delete f.forkResourceStore;const x={...this.options,...f,isClone:!0},E=new ot(x);return(f.debug!==void 0||f.prefix!==void 0)&&(E.logger=E.logger.clone(f)),["store","services","language"].forEach(I=>{E[I]=this[I]}),E.services={...this.services},E.services.utils={hasLoadedNamespace:E.hasLoadedNamespace.bind(E)},m&&(E.store=new L(this.store.data,x),E.services.resourceStore=E.store),E.translator=new se(E.services,x),E.translator.on("*",function(I){for(var M=arguments.length,Q=new Array(M>1?M-1:0),ee=1;ee<M;ee++)Q[ee-1]=arguments[ee];E.emit(I,...Q)}),E.init(x,p),E.translator.options=x,E.translator.backendConnector.services.utils={hasLoadedNamespace:E.hasLoadedNamespace.bind(E)},E}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ze=ot.createInstance();return Ze.createInstance=ot.createInstance,Zo=Ze,Zo}const yu=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),Gn=Wh(yu);var As={exports:{}},Os={},ei={exports:{}},vu;function rg(){return vu||(vu=1,(function(r){var s=Gn,l=Gn;function i(c){return l.existsSync(s.join(c,"package.json"))}function u(c,d){if(c=c||r.parent.filename,d=d||i,typeof c=="string"&&(c[c.length-1]!==s.sep&&(c+=s.sep),c=c.split(s.sep)),!c.length)throw new Error("package.json not found in path");c.pop();var v=c.join(s.sep);try{if(d(v))return v}catch{}return u(c,d)}r.exports=u})(ei)),ei.exports}var ti={exports:{}},ni,wu;function Su(){if(wu)return ni;wu=1;var r=Object.prototype.toString;return ni=function(l){var i=r.call(l),u=i==="[object Arguments]";return u||(u=i!=="[object Array]"&&l!==null&&typeof l=="object"&&typeof l.length=="number"&&l.length>=0&&r.call(l.callee)==="[object Function]"),u},ni}var ri,xu;function sg(){if(xu)return ri;xu=1;var r;if(!Object.keys){var s=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Su(),u=Object.prototype.propertyIsEnumerable,c=!u.call({toString:null},"toString"),d=u.call(function(){},"prototype"),v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],g=function(O){var F=O.constructor;return F&&F.prototype===O},C={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},$=(function(){if(typeof window>"u")return!1;for(var O in window)try{if(!C["$"+O]&&s.call(window,O)&&window[O]!==null&&typeof window[O]=="object")try{g(window[O])}catch{return!0}}catch{return!0}return!1})(),P=function(O){if(typeof window>"u"||!$)return g(O);try{return g(O)}catch{return!1}};r=function(F){var b=F!==null&&typeof F=="object",V=l.call(F)==="[object Function]",U=i(F),J=b&&l.call(F)==="[object String]",re=[];if(!b&&!V&&!U)throw new TypeError("Object.keys called on a non-object");var we=d&&V;if(J&&F.length>0&&!s.call(F,0))for(var ge=0;ge<F.length;++ge)re.push(String(ge));if(U&&F.length>0)for(var ne=0;ne<F.length;++ne)re.push(String(ne));else for(var me in F)!(we&&me==="prototype")&&s.call(F,me)&&re.push(String(me));if(c)for(var ie=P(F),fe=0;fe<v.length;++fe)!(ie&&v[fe]==="constructor")&&s.call(F,v[fe])&&re.push(v[fe]);return re}}return ri=r,ri}var si,Cu;function og(){if(Cu)return si;Cu=1;var r=Array.prototype.slice,s=Su(),l=Object.keys,i=l?function(d){return l(d)}:sg(),u=Object.keys;return i.shim=function(){if(Object.keys){var d=(function(){var v=Object.keys(arguments);return v&&v.length===arguments.length})(1,2);d||(Object.keys=function(g){return s(g)?u(r.call(g)):u(g)})}else Object.keys=i;return Object.keys||i},si=i,si}var oi,ku;function Pu(){return ku||(ku=1,oi=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},l=Symbol("test"),i=Object(l);if(typeof l=="string"||Object.prototype.toString.call(l)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var u=42;s[l]=u;for(var c in s)return!1;if(typeof Object.keys=="function"&&Object.keys(s).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(s).length!==0)return!1;var d=Object.getOwnPropertySymbols(s);if(d.length!==1||d[0]!==l||!Object.prototype.propertyIsEnumerable.call(s,l))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(s,l);if(v.value!==u||v.enumerable!==!0)return!1}return!0}),oi}var ii,Eu;function li(){return Eu||(Eu=1,ii=Object),ii}var ai,$u;function ig(){return $u||($u=1,ai=Error),ai}var ui,ju;function lg(){return ju||(ju=1,ui=EvalError),ui}var ci,Au;function ag(){return Au||(Au=1,ci=RangeError),ci}var fi,Ou;function ug(){return Ou||(Ou=1,fi=ReferenceError),fi}var hi,Tu;function cg(){return Tu||(Tu=1,hi=SyntaxError),hi}var di,Nu;function Ru(){return Nu||(Nu=1,di=TypeError),di}var pi,_u;function fg(){return _u||(_u=1,pi=URIError),pi}var gi,Lu;function hg(){return Lu||(Lu=1,gi=Math.abs),gi}var mi,Fu;function dg(){return Fu||(Fu=1,mi=Math.floor),mi}var yi,Iu;function pg(){return Iu||(Iu=1,yi=Math.max),yi}var vi,Du;function gg(){return Du||(Du=1,vi=Math.min),vi}var wi,Mu;function mg(){return Mu||(Mu=1,wi=Math.pow),wi}var Si,zu;function yg(){return zu||(zu=1,Si=Math.round),Si}var xi,bu;function vg(){return bu||(bu=1,xi=Number.isNaN||function(s){return s!==s}),xi}var Ci,Uu;function wg(){if(Uu)return Ci;Uu=1;var r=vg();return Ci=function(l){return r(l)||l===0?l:l<0?-1:1},Ci}var ki,Bu;function Sg(){return Bu||(Bu=1,ki=Object.getOwnPropertyDescriptor),ki}var Pi,qu;function Vu(){if(qu)return Pi;qu=1;var r=Sg();if(r)try{r([],"length")}catch{r=null}return Pi=r,Pi}var Ei,Hu;function xg(){if(Hu)return Ei;Hu=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Ei=r,Ei}var $i,Wu;function Cg(){if(Wu)return $i;Wu=1;var r=typeof Symbol<"u"&&Symbol,s=Pu();return $i=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},$i}var ji,Ku;function Gu(){return Ku||(Ku=1,ji=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),ji}var Ai,Ju;function Qu(){if(Ju)return Ai;Ju=1;var r=li();return Ai=r.getPrototypeOf||null,Ai}var Oi,Yu;function kg(){if(Yu)return Oi;Yu=1;var r="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,l=Math.max,i="[object Function]",u=function(g,C){for(var $=[],P=0;P<g.length;P+=1)$[P]=g[P];for(var O=0;O<C.length;O+=1)$[O+g.length]=C[O];return $},c=function(g,C){for(var $=[],P=C,O=0;P<g.length;P+=1,O+=1)$[O]=g[P];return $},d=function(v,g){for(var C="",$=0;$<v.length;$+=1)C+=v[$],$+1<v.length&&(C+=g);return C};return Oi=function(g){var C=this;if(typeof C!="function"||s.apply(C)!==i)throw new TypeError(r+C);for(var $=c(arguments,1),P,O=function(){if(this instanceof P){var J=C.apply(this,u($,arguments));return Object(J)===J?J:this}return C.apply(g,u($,arguments))},F=l(0,C.length-$.length),b=[],V=0;V<F;V++)b[V]="$"+V;if(P=Function("binder","return function ("+d(b,",")+"){ return binder.apply(this,arguments); }")(O),C.prototype){var U=function(){};U.prototype=C.prototype,P.prototype=new U,U.prototype=null}return P},Oi}var Ti,Xu;function Ts(){if(Xu)return Ti;Xu=1;var r=kg();return Ti=Function.prototype.bind||r,Ti}var Ni,Zu;function Ri(){return Zu||(Zu=1,Ni=Function.prototype.call),Ni}var _i,ec;function tc(){return ec||(ec=1,_i=Function.prototype.apply),_i}var Li,nc;function Pg(){return nc||(nc=1,Li=typeof Reflect<"u"&&Reflect&&Reflect.apply),Li}var Fi,rc;function Eg(){if(rc)return Fi;rc=1;var r=Ts(),s=tc(),l=Ri(),i=Pg();return Fi=i||r.call(l,s),Fi}var Ii,sc;function oc(){if(sc)return Ii;sc=1;var r=Ts(),s=Ru(),l=Ri(),i=Eg();return Ii=function(c){if(c.length<1||typeof c[0]!="function")throw new s("a function is required");return i(r,l,c)},Ii}var Di,ic;function $g(){if(ic)return Di;ic=1;var r=oc(),s=Vu(),l;try{l=[].__proto__===Array.prototype}catch(d){if(!d||typeof d!="object"||!("code"in d)||d.code!=="ERR_PROTO_ACCESS")throw d}var i=!!l&&s&&s(Object.prototype,"__proto__"),u=Object,c=u.getPrototypeOf;return Di=i&&typeof i.get=="function"?r([i.get]):typeof c=="function"?function(v){return c(v==null?v:u(v))}:!1,Di}var Mi,lc;function jg(){if(lc)return Mi;lc=1;var r=Gu(),s=Qu(),l=$g();return Mi=r?function(u){return r(u)}:s?function(u){if(!u||typeof u!="object"&&typeof u!="function")throw new TypeError("getProto: not an object");return s(u)}:l?function(u){return l(u)}:null,Mi}var zi,ac;function Ag(){if(ac)return zi;ac=1;var r=Function.prototype.call,s=Object.prototype.hasOwnProperty,l=Ts();return zi=l.call(r,s),zi}var bi,uc;function Og(){if(uc)return bi;uc=1;var r,s=li(),l=ig(),i=lg(),u=ag(),c=ug(),d=cg(),v=Ru(),g=fg(),C=hg(),$=dg(),P=pg(),O=gg(),F=mg(),b=yg(),V=wg(),U=Function,J=function(De){try{return U('"use strict"; return ('+De+").constructor;")()}catch{}},re=Vu(),we=xg(),ge=function(){throw new v},ne=re?(function(){try{return arguments.callee,ge}catch{try{return re(arguments,"callee").get}catch{return ge}}})():ge,me=Cg()(),ie=jg(),fe=Qu(),Ee=Gu(),L=tc(),z=Ri(),Y={},se=typeof Uint8Array>"u"||!ie?r:ie(Uint8Array),de={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":me&&ie?ie([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":Y,"%AsyncGenerator%":Y,"%AsyncGeneratorFunction%":Y,"%AsyncIteratorPrototype%":Y,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":l,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":U,"%GeneratorFunction%":Y,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":me&&ie?ie(ie([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!me||!ie?r:ie(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":re,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":u,"%ReferenceError%":c,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!me||!ie?r:ie(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":me&&ie?ie(""[Symbol.iterator]()):r,"%Symbol%":me?Symbol:r,"%SyntaxError%":d,"%ThrowTypeError%":ne,"%TypedArray%":se,"%TypeError%":v,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":g,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":z,"%Function.prototype.apply%":L,"%Object.defineProperty%":we,"%Object.getPrototypeOf%":fe,"%Math.abs%":C,"%Math.floor%":$,"%Math.max%":P,"%Math.min%":O,"%Math.pow%":F,"%Math.round%":b,"%Math.sign%":V,"%Reflect.getPrototypeOf%":Ee};if(ie)try{null.error}catch(De){var Oe=ie(ie(De));de["%Error.prototype%"]=Oe}var Ie=function De(Me){var Be;if(Me==="%AsyncFunction%")Be=J("async function () {}");else if(Me==="%GeneratorFunction%")Be=J("function* () {}");else if(Me==="%AsyncGeneratorFunction%")Be=J("async function* () {}");else if(Me==="%AsyncGenerator%"){var Fe=De("%AsyncGeneratorFunction%");Fe&&(Be=Fe.prototype)}else if(Me==="%AsyncIteratorPrototype%"){var Ge=De("%AsyncGenerator%");Ge&&ie&&(Be=ie(Ge.prototype))}return de[Me]=Be,Be},w={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=Ts(),q=Ag(),pe=T.call(z,Array.prototype.concat),B=T.call(L,Array.prototype.splice),Z=T.call(z,String.prototype.replace),W=T.call(z,String.prototype.slice),oe=T.call(z,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Re=/\\(\\)?/g,be=function(Me){var Be=W(Me,0,1),Fe=W(Me,-1);if(Be==="%"&&Fe!=="%")throw new d("invalid intrinsic syntax, expected closing `%`");if(Fe==="%"&&Be!=="%")throw new d("invalid intrinsic syntax, expected opening `%`");var Ge=[];return Z(Me,ae,function(yt,ot,Ze,k){Ge[Ge.length]=Ze?Z(k,Re,"$1"):ot||yt}),Ge},pt=function(Me,Be){var Fe=Me,Ge;if(q(w,Fe)&&(Ge=w[Fe],Fe="%"+Ge[0]+"%"),q(de,Fe)){var yt=de[Fe];if(yt===Y&&(yt=Ie(Fe)),typeof yt>"u"&&!Be)throw new v("intrinsic "+Me+" exists, but is not available. Please file an issue!");return{alias:Ge,name:Fe,value:yt}}throw new d("intrinsic "+Me+" does not exist!")};return bi=function(Me,Be){if(typeof Me!="string"||Me.length===0)throw new v("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Be!="boolean")throw new v('"allowMissing" argument must be a boolean');if(oe(/^%?[^%]*%?$/,Me)===null)throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Fe=be(Me),Ge=Fe.length>0?Fe[0]:"",yt=pt("%"+Ge+"%",Be),ot=yt.name,Ze=yt.value,k=!1,f=yt.alias;f&&(Ge=f[0],B(Fe,pe([0,1],f)));for(var p=1,m=!0;p<Fe.length;p+=1){var x=Fe[p],E=W(x,0,1),N=W(x,-1);if((E==='"'||E==="'"||E==="`"||N==='"'||N==="'"||N==="`")&&E!==N)throw new d("property names with quotes must have matching quotes");if((x==="constructor"||!m)&&(k=!0),Ge+="."+x,ot="%"+Ge+"%",q(de,ot))Ze=de[ot];else if(Ze!=null){if(!(x in Ze)){if(!Be)throw new v("base intrinsic for "+Me+" exists, but the property is not available.");return}if(re&&p+1>=Fe.length){var I=re(Ze,x);m=!!I,m&&"get"in I&&!("originalValue"in I.get)?Ze=I.get:Ze=Ze[x]}else m=q(Ze,x),Ze=Ze[x];m&&!k&&(de[ot]=Ze)}}return Ze},bi}var Ui,cc;function Tg(){if(cc)return Ui;cc=1;var r=Og(),s=oc(),l=s([r("%String.prototype.indexOf%")]);return Ui=function(u,c){var d=r(u,!!c);return typeof d=="function"&&l(u,".prototype.")>-1?s([d]):d},Ui}var Bi,fc;function Ng(){if(fc)return Bi;fc=1;var r=og(),s=Pu()(),l=Tg(),i=li(),u=l("Array.prototype.push"),c=l("Object.prototype.propertyIsEnumerable"),d=s?i.getOwnPropertySymbols:null;return Bi=function(g,C){if(g==null)throw new TypeError("target must be an object");var $=i(g);if(arguments.length===1)return $;for(var P=1;P<arguments.length;++P){var O=i(arguments[P]),F=r(O),b=s&&(i.getOwnPropertySymbols||d);if(b)for(var V=b(O),U=0;U<V.length;++U){var J=V[U];c(O,J)&&u(F,J)}for(var re=0;re<F.length;++re){var we=F[re];if(c(O,we)){var ge=O[we];$[we]=ge}}}return $},Bi}var qi,hc;function Rg(){if(hc)return qi;hc=1;var r=Ng(),s=function(){if(!Object.assign)return!1;for(var i="abcdefghijklmnopqrst",u=i.split(""),c={},d=0;d<u.length;++d)c[u[d]]=u[d];var v=Object.assign({},c),g="";for(var C in v)g+=C;return i!==g},l=function(){if(!Object.assign||!Object.preventExtensions)return!1;var i=Object.preventExtensions({1:2});try{Object.assign(i,"xy")}catch{return i[1]==="y"}return!1};return qi=function(){return!Object.assign||s()||l()?r:Object.assign},qi}var Vi={},Hi,dc;function _g(){return dc||(dc=1,Hi=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}),Hi}var Ns={exports:{}},pc;function Lg(){return pc||(pc=1,typeof Object.create=="function"?Ns.exports=function(s,l){s.super_=l,s.prototype=Object.create(l.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:Ns.exports=function(s,l){s.super_=l;var i=function(){};i.prototype=l.prototype,s.prototype=new i,s.prototype.constructor=s}),Ns.exports}var gc;function Fg(){return gc||(gc=1,(function(r){var s=/%[sdj%]/g;r.format=function(w){if(!we(w)){for(var T=[],q=0;q<arguments.length;q++)T.push(u(arguments[q]));return T.join(" ")}for(var q=1,pe=arguments,B=pe.length,Z=String(w).replace(s,function(oe){if(oe==="%%")return"%";if(q>=B)return oe;switch(oe){case"%s":return String(pe[q++]);case"%d":return Number(pe[q++]);case"%j":try{return JSON.stringify(pe[q++])}catch{return"[Circular]"}default:return oe}}),W=pe[q];q<B;W=pe[++q])U(W)||!ie(W)?Z+=" "+W:Z+=" "+u(W);return Z},r.deprecate=function(w,T){if(ne(xr.process))return function(){return r.deprecate(w,T).apply(this,arguments)};if(process.noDeprecation===!0)return w;var q=!1;function pe(){if(!q){if(process.throwDeprecation)throw new Error(T);process.traceDeprecation?console.trace(T):console.error(T),q=!0}return w.apply(this,arguments)}return pe};var l={},i;r.debuglog=function(w){if(ne(i)&&(i=process.env.NODE_DEBUG||""),w=w.toUpperCase(),!l[w])if(new RegExp("\\b"+w+"\\b","i").test(i)){var T=process.pid;l[w]=function(){var q=r.format.apply(r,arguments);console.error("%s %d: %s",w,T,q)}}else l[w]=function(){};return l[w]};function u(w,T){var q={seen:[],stylize:d};return arguments.length>=3&&(q.depth=arguments[2]),arguments.length>=4&&(q.colors=arguments[3]),V(T)?q.showHidden=T:T&&r._extend(q,T),ne(q.showHidden)&&(q.showHidden=!1),ne(q.depth)&&(q.depth=2),ne(q.colors)&&(q.colors=!1),ne(q.customInspect)&&(q.customInspect=!0),q.colors&&(q.stylize=c),g(q,w,q.depth)}r.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(w,T){var q=u.styles[T];return q?"\x1B["+u.colors[q][0]+"m"+w+"\x1B["+u.colors[q][1]+"m":w}function d(w,T){return w}function v(w){var T={};return w.forEach(function(q,pe){T[q]=!0}),T}function g(w,T,q){if(w.customInspect&&T&&L(T.inspect)&&T.inspect!==r.inspect&&!(T.constructor&&T.constructor.prototype===T)){var pe=T.inspect(q,w);return we(pe)||(pe=g(w,pe,q)),pe}var B=C(w,T);if(B)return B;var Z=Object.keys(T),W=v(Z);if(w.showHidden&&(Z=Object.getOwnPropertyNames(T)),Ee(T)&&(Z.indexOf("message")>=0||Z.indexOf("description")>=0))return $(T);if(Z.length===0){if(L(T)){var oe=T.name?": "+T.name:"";return w.stylize("[Function"+oe+"]","special")}if(me(T))return w.stylize(RegExp.prototype.toString.call(T),"regexp");if(fe(T))return w.stylize(Date.prototype.toString.call(T),"date");if(Ee(T))return $(T)}var ae="",Re=!1,be=["{","}"];if(b(T)&&(Re=!0,be=["[","]"]),L(T)){var pt=T.name?": "+T.name:"";ae=" [Function"+pt+"]"}if(me(T)&&(ae=" "+RegExp.prototype.toString.call(T)),fe(T)&&(ae=" "+Date.prototype.toUTCString.call(T)),Ee(T)&&(ae=" "+$(T)),Z.length===0&&(!Re||T.length==0))return be[0]+ae+be[1];if(q<0)return me(T)?w.stylize(RegExp.prototype.toString.call(T),"regexp"):w.stylize("[Object]","special");w.seen.push(T);var De;return Re?De=P(w,T,q,W,Z):De=Z.map(function(Me){return O(w,T,q,W,Me,Re)}),w.seen.pop(),F(De,ae,be)}function C(w,T){if(ne(T))return w.stylize("undefined","undefined");if(we(T)){var q="'"+JSON.stringify(T).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return w.stylize(q,"string")}if(re(T))return w.stylize(""+T,"number");if(V(T))return w.stylize(""+T,"boolean");if(U(T))return w.stylize("null","null")}function $(w){return"["+Error.prototype.toString.call(w)+"]"}function P(w,T,q,pe,B){for(var Z=[],W=0,oe=T.length;W<oe;++W)Ie(T,String(W))?Z.push(O(w,T,q,pe,String(W),!0)):Z.push("");return B.forEach(function(ae){ae.match(/^\d+$/)||Z.push(O(w,T,q,pe,ae,!0))}),Z}function O(w,T,q,pe,B,Z){var W,oe,ae;if(ae=Object.getOwnPropertyDescriptor(T,B)||{value:T[B]},ae.get?ae.set?oe=w.stylize("[Getter/Setter]","special"):oe=w.stylize("[Getter]","special"):ae.set&&(oe=w.stylize("[Setter]","special")),Ie(pe,B)||(W="["+B+"]"),oe||(w.seen.indexOf(ae.value)<0?(U(q)?oe=g(w,ae.value,null):oe=g(w,ae.value,q-1),oe.indexOf(`
19
19
  `)>-1&&(Z?oe=oe.split(`
20
20
  `).map(function(Re){return" "+Re}).join(`
21
21
  `).substr(2):oe=`