@tryghost/sodo-search 1.8.23 → 1.8.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
- `,i=this.context.stylesUrl;return i?le.jsxs(le.Fragment,{children:[le.jsx("link",{rel:"stylesheet",href:i}),le.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),le.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):le.jsxs(le.Fragment,{children:[le.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),le.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const s=od(),i={...s.frame.common};return le.jsx("div",{style:s.modalContainer,className:"gh-root-frame",children:le.jsxs(nd,{style:i,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[le.jsx("div",{onClick:l=>this.handlePopupClose(l),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)]"}),le.jsx(id,{})]})})}render(){const{showPopup:s}=this.context;return s?this.renderFrameContainer():null}}var ve;function st(r,s,i){const l=typeof i,a=typeof r;if(l!=="undefined"){if(a!=="undefined"){if(i){if(a==="function"&&l===a)return function(v){return r(i(v))};if(s=r.constructor,s===i.constructor){if(s===Array)return i.concat(r);if(s===Map){var h=new Map(i);for(var p of r)h.set(p[0],p[1]);return h}if(s===Set){p=new Set(i);for(h of r.values())p.add(h);return p}}}return r}return i}return a==="undefined"?s:r}function qn(r,s){return typeof r>"u"?s:r}function Ye(){return Object.create(null)}function Rt(r){return typeof r=="string"}function jr(r){return typeof r=="object"}function Ar(r,s){if(Rt(s))r=r[s];else for(let i=0;r&&i<s.length;i++)r=r[s[i]];return r}const Ed=/[^\p{L}\p{N}]+/u,jd=/(\d{3})/g,Ad=/(\D)(\d{3})/g,Td=/(\d{3})(\D)/g,qa=/[\u0300-\u036f]/g;function Wn(r={}){if(!this||this.constructor!==Wn)return new Wn(...arguments);if(arguments.length)for(r=0;r<arguments.length;r++)this.assign(arguments[r]);else this.assign(r)}ve=Wn.prototype,ve.assign=function(r){this.normalize=st(r.normalize,!0,this.normalize);let s=r.include,i=s||r.exclude||r.split,l;if(i||i===""){if(typeof i=="object"&&i.constructor!==RegExp){let a="";l=!s,s||(a+="\\p{Z}"),i.letter&&(a+="\\p{L}"),i.number&&(a+="\\p{N}",l=!!s),i.symbol&&(a+="\\p{S}"),i.punctuation&&(a+="\\p{P}"),i.control&&(a+="\\p{C}"),(i=i.char)&&(a+=typeof i=="object"?i.join(""):i);try{this.split=new RegExp("["+(s?"^":"")+a+"]+","u")}catch{this.split=/\s+/}}else this.split=i,l=i===!1||"a1a".split(i).length<2;this.numeric=st(r.numeric,l)}else{try{this.split=st(this.split,Ed)}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),i=r.filter,this.filter=typeof i=="function"?i:st(i&&new Set(i),null,this.filter),this.dedupe=st(r.dedupe,!0,this.dedupe),this.matcher=st((i=r.matcher)&&new Map(i),null,this.matcher),this.mapper=st((i=r.mapper)&&new Map(i),null,this.mapper),this.stemmer=st((i=r.stemmer)&&new Map(i),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=i=st(r.cache,!0,this.cache))&&(this.F=null,this.L=typeof i=="number"?i:2e5,this.B=new Map,this.D=new Map,this.I=this.H=128),this.h="",this.J=null,this.A="",this.K=null,this.matcher)for(const a of this.matcher.keys())this.h+=(this.h?"|":"")+a;if(this.stemmer)for(const a of this.stemmer.keys())this.A+=(this.A?"|":"")+a;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.K=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):r.length>1?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):r.length<2&&(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.J=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,s){if(this.cache&&r.length<=this.H)if(this.F){if(this.B.has(r))return this.B.get(r)}else this.F=setTimeout(En,50,this);this.normalize&&(typeof this.normalize=="function"?r=this.normalize(r):r=qa?r.normalize("NFKD").replace(qa,"").toLowerCase():r.toLowerCase()),this.prepare&&(r=this.prepare(r)),this.numeric&&r.length>3&&(r=r.replace(Ad,"$1 $2").replace(Td,"$1 $2").replace(jd,"$1 "));const i=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let l=[],a=Ye(),h,p,v=this.split||this.split===""?r.split(this.split):[r];for(let w=0,k,$;w<v.length;w++)if((k=$=v[w])&&!(k.length<this.minlength||k.length>this.maxlength)){if(s){if(a[k])continue;a[k]=1}else{if(h===k)continue;h=k}if(i)l.push(k);else if(!this.filter||(typeof this.filter=="function"?this.filter(k):!this.filter.has(k))){if(this.cache&&k.length<=this.I)if(this.F){var g=this.D.get(k);if(g||g===""){g&&l.push(g);continue}}else this.F=setTimeout(En,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let j;for(;j!==k&&k.length>2;)j=k,k=k.replace(this.K,A=>this.stemmer.get(A))}if(k&&(this.mapper||this.dedupe&&k.length>1)){g="";for(let j=0,A="",z,_;j<k.length;j++)z=k.charAt(j),z===A&&this.dedupe||((_=this.mapper&&this.mapper.get(z))||_===""?_===A&&this.dedupe||!(A=_)||(g+=_):g+=A=z);k=g}if(this.matcher&&k.length>1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),k=k.replace(this.J,j=>this.matcher.get(j))),k&&this.replacer)for(g=0;k&&g<this.replacer.length;g+=2)k=k.replace(this.replacer[g],this.replacer[g+1]);if(this.cache&&$.length<=this.I&&(this.D.set($,k),this.D.size>this.L&&(this.D.clear(),this.I=this.I/1.1|0)),k){if(k!==$)if(s){if(a[k])continue;a[k]=1}else{if(p===k)continue;p=k}l.push(k)}}}return this.finalize&&(l=this.finalize(l)||l),this.cache&&r.length<=this.H&&(this.B.set(r,l),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),l};function En(r){r.F=null,r.B.clear(),r.D.clear()}function Wo(r,s,i){i||(s||typeof r!="object"?typeof s=="object"&&(i=s,s=0):i=r),i&&(r=i.query||r,s=i.limit||s);let l=""+(s||0);i&&(l+=(i.offset||0)+!!i.context+!!i.suggest+(i.resolve!==!1)+(i.resolution||this.resolution)+(i.boost||0)),r=(""+r).toLowerCase(),this.cache||(this.cache=new jn);let a=this.cache.get(r+l);if(!a){const h=i&&i.cache;h&&(i.cache=!1),a=this.search(r,s,i),h&&(i.cache=h),this.cache.set(r+l,a)}return a}function jn(r){this.limit=r&&r!==!0?r:1e3,this.cache=new Map,this.h=""}jn.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)},jn.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},jn.prototype.remove=function(r){for(const s of this.cache){const i=s[0];s[1].includes(r)&&this.cache.delete(i)}},jn.prototype.clear=function(){this.cache.clear(),this.h=""};const Wa={normalize:!1,numeric:!1,dedupe:!1},Ss={},Ko=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"]]),Ka=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),Ga=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],Qa={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 Go={Exact:Wa,Default:Ss,Normalize:Ss,LatinBalance:{mapper:Ko},LatinAdvanced:{mapper:Ko,matcher:Ka,replacer:Ga},LatinExtra:{mapper:Ko,replacer:Ga.concat([/(?!^)[aeo]/g,""]),matcher:Ka},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(r){for(let i=0;i<r.length;i++){var s=r[i];let l=s.charAt(0),a=Qa[l];for(let h=1,p;h<s.length&&(p=s.charAt(h),p==="h"||p==="w"||!(p=Qa[p])||p===a||(l+=p,a=p,l.length!==4));h++);r[i]=l}}},CJK:{split:""},LatinExact:Wa,LatinDefault:Ss,LatinSimple:Ss};function Ja(r,s,i,l){let a=[];for(let h=0,p;h<r.index.length;h++)if(p=r.index[h],s>=p.length)s-=p.length;else{s=p[l?"splice":"slice"](s,i);const v=s.length;if(v&&(a=a.length?a.concat(s):s,i-=v,l&&(r.length-=v),!i))break;s=0}return a}function Kn(r){if(!this||this.constructor!==Kn)return new Kn(r);this.index=r?[r]:[],this.length=r?r.length:0;const s=this;return new Proxy([],{get(i,l){if(l==="length")return s.length;if(l==="push")return function(a){s.index[s.index.length-1].push(a),s.length++};if(l==="pop")return function(){if(s.length)return s.length--,s.index[s.index.length-1].pop()};if(l==="indexOf")return function(a){let h=0;for(let p=0,v,g;p<s.index.length;p++){if(v=s.index[p],g=v.indexOf(a),g>=0)return h+g;h+=v.length}return-1};if(l==="includes")return function(a){for(let h=0;h<s.index.length;h++)if(s.index[h].includes(a))return!0;return!1};if(l==="slice")return function(a,h){return Ja(s,a||0,h||s.length,!1)};if(l==="splice")return function(a,h){return Ja(s,a||0,h||s.length,!0)};if(l==="constructor")return Array;if(typeof l!="symbol")return(i=s.index[l/2**31|0])&&i[l]},set(i,l,a){return i=l/2**31|0,(s.index[i]||(s.index[i]=[]))[l]=a,s.length++,!0}})}Kn.prototype.clear=function(){this.index.length=0},Kn.prototype.push=function(){};function _t(r=8){if(!this||this.constructor!==_t)return new _t(r);this.index=Ye(),this.h=[],this.size=0,r>32?(this.B=Xa,this.A=BigInt(r)):(this.B=Ya,this.A=r)}_t.prototype.get=function(r){const s=this.index[this.B(r)];return s&&s.get(r)},_t.prototype.set=function(r,s){var i=this.B(r);let l=this.index[i];l?(i=l.size,l.set(r,s),(i-=l.size)&&this.size++):(this.index[i]=l=new Map([[r,s]]),this.h.push(l),this.size++)};function Lt(r=8){if(!this||this.constructor!==Lt)return new Lt(r);this.index=Ye(),this.h=[],this.size=0,r>32?(this.B=Xa,this.A=BigInt(r)):(this.B=Ya,this.A=r)}Lt.prototype.add=function(r){var s=this.B(r);let i=this.index[s];i?(s=i.size,i.add(r),(s-=i.size)&&this.size++):(this.index[s]=i=new Set([r]),this.h.push(i),this.size++)},ve=_t.prototype,ve.has=Lt.prototype.has=function(r){const s=this.index[this.B(r)];return s&&s.has(r)},ve.delete=Lt.prototype.delete=function(r){const s=this.index[this.B(r)];s&&s.delete(r)&&this.size--},ve.clear=Lt.prototype.clear=function(){this.index=Ye(),this.h=[],this.size=0},ve.values=Lt.prototype.values=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].values())yield s},ve.keys=Lt.prototype.keys=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].keys())yield s},ve.entries=Lt.prototype.entries=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].entries())yield s};function Ya(r){let s=2**this.A-1;if(typeof r=="number")return r&s;let i=0,l=this.A+1;for(let a=0;a<r.length;a++)i=(i*l^r.charCodeAt(a))&s;return this.A===32?i+2**31:i}function Xa(r){let s=BigInt(2)**this.A-BigInt(1);var i=typeof r;if(i==="bigint")return r&s;if(i==="number")return BigInt(r)&s;i=BigInt(0);let l=this.A+BigInt(1);for(let a=0;a<r.length;a++)i=(i*l^BigInt(r.charCodeAt(a)))&s;return i}let Gn,Tr;async function Od(r){r=r.data;var s=r.task;const i=r.id;let l=r.args;if(s==="init")Tr=r.options||{},(s=r.factory)?(Function("return "+s)()(self),Gn=new self.FlexSearch.Index(Tr),delete self.FlexSearch):Gn=new Mt(Tr),postMessage({id:i});else{let a;s==="export"&&(l[1]?(l[0]=Tr.export,l[2]=0,l[3]=1):l=null),s==="import"?l[0]&&(r=await Tr.import.call(Gn,l[0]),Gn.import(l[0],r)):((a=l&&Gn[s].apply(Gn,l))&&a.then&&(a=await a),a&&a.await&&(a=await a.await),s==="search"&&a.result&&(a=a.result)),postMessage(s==="search"?{id:i,msg:a}:{id:i})}}function Qo(r){Qn.call(r,"add"),Qn.call(r,"append"),Qn.call(r,"search"),Qn.call(r,"update"),Qn.call(r,"remove"),Qn.call(r,"searchCache")}let Jo,Za,xs;function Nd(){Jo=xs=0}function Qn(r){this[r+"Async"]=function(){const s=arguments;var i=s[s.length-1];let l;if(typeof i=="function"&&(l=i,delete s[s.length-1]),Jo?xs||(xs=Date.now()-Za>=this.priority*this.priority*3):(Jo=setTimeout(Nd,0),Za=Date.now()),xs){const h=this;return new Promise(p=>{setTimeout(function(){p(h[r+"Async"].apply(h,s))},0)})}const a=this[r].apply(this,s);return i=a.then?a:new Promise(h=>h(a)),l&&i.then(l),i}}let tn=0;function Jn(r={},s){function i(v){function g(w){w=w.data||w;const k=w.id,$=k&&h.h[k];$&&($(w.msg),delete h.h[k])}if(this.worker=v,this.h=Ye(),this.worker)return a?this.worker.on("message",g):this.worker.onmessage=g,r.config?new Promise(function(w){tn>1e9&&(tn=0),h.h[++tn]=function(){w(h)},h.worker.postMessage({id:tn,task:"init",factory:l,options:r})}):(this.priority=r.priority||4,this.encoder=s||null,this.worker.postMessage({task:"init",factory:l,options:r}),this)}if(!this||this.constructor!==Jn)return new Jn(r);let l=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;l&&(l=l.toString());const a=typeof window>"u",h=this,p=Rd(l,a,r.worker);return p.then?p.then(function(v){return i.call(h,v)}):i.call(this,p)}nn("add"),nn("append"),nn("search"),nn("update"),nn("remove"),nn("clear"),nn("export"),nn("import"),Jn.prototype.searchCache=Wo,Qo(Jn.prototype);function nn(r){Jn.prototype[r]=function(){const s=this,i=[].slice.call(arguments);var l=i[i.length-1];let a;return typeof l=="function"&&(a=l,i.pop()),l=new Promise(function(h){r==="export"&&typeof i[0]=="function"&&(i[0]=null),tn>1e9&&(tn=0),s.h[++tn]=h,s.worker.postMessage({task:r,id:tn,args:i})}),a?(l.then(a),this):l}}function Rd(r,s,i){return s?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>mu).then(function(l){return new l.Worker("undefined/node/node.mjs")}):r?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Od.toString()],{type:"text/javascript"}))):new window.Worker(typeof i=="string"?i:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:bo&&bo.tagName.toUpperCase()==="SCRIPT"&&bo.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").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}An.prototype.add=function(r,s,i){if(jr(r)&&(s=r,r=Ar(s,this.key)),s&&(r||r===0)){if(!i&&this.reg.has(r))return this.update(r,s);for(let v=0,g;v<this.field.length;v++){g=this.B[v];var l=this.index.get(this.field[v]);if(typeof g=="function"){var a=g(s);a&&l.add(r,a,i,!0)}else a=g.G,(!a||a(s))&&(g.constructor===String?g=[""+g]:Rt(g)&&(g=[g]),Xo(s,g,this.D,0,l,r,g[0],i))}if(this.tag)for(l=0;l<this.A.length;l++){var h=this.A[l];a=this.tag.get(this.F[l]);let v=Ye();if(typeof h=="function"){if(h=h(s),!h)continue}else{var p=h.G;if(p&&!p(s))continue;h.constructor===String&&(h=""+h),h=Ar(s,h)}if(a&&h){Rt(h)&&(h=[h]);for(let g=0,w,k;g<h.length;g++)if(w=h[g],!v[w]&&(v[w]=1,(p=a.get(w))?k=p:a.set(w,k=[]),!i||!k.includes(r))){if(k.length===2**31-1){if(p=new Kn(k),this.fastupdate)for(let $ of this.reg.values())$.includes(k)&&($[$.indexOf(k)]=p);a.set(w,k=p)}k.push(r),this.fastupdate&&((p=this.reg.get(r))?p.push(k):this.reg.set(r,[k]))}}}if(this.store&&(!i||!this.store.has(r))){let v;if(this.h){v=Ye();for(let g=0,w;g<this.h.length;g++){if(w=this.h[g],(i=w.G)&&!i(s))continue;let k;if(typeof w=="function"){if(k=w(s),!k)continue;w=[w.O]}else if(Rt(w)||w.constructor===String){v[w]=s[w];continue}Yo(s,v,w,0,w[0],k)}}this.store.set(r,v||s)}this.worker&&(this.fastupdate||this.reg.add(r))}return this};function Yo(r,s,i,l,a,h){if(r=r[a],l===i.length-1)s[a]=h||r;else if(r)if(r.constructor===Array)for(s=s[a]=Array(r.length),a=0;a<r.length;a++)Yo(r,s,i,l,a);else s=s[a]||(s[a]=Ye()),a=i[++l],Yo(r,s,i,l,a)}function Xo(r,s,i,l,a,h,p,v){if(r=r[p])if(l===s.length-1){if(r.constructor===Array){if(i[l]){for(s=0;s<r.length;s++)a.add(h,r[s],!0,!0);return}r=r.join(" ")}a.add(h,r,v,!0)}else if(r.constructor===Array)for(p=0;p<r.length;p++)Xo(r,s,i,l,a,h,p,v);else p=s[++l],Xo(r,s,i,l,a,h,p,v)}function Zo(r,s,i,l){if(!r.length)return r;if(r.length===1)return r=r[0],r=i||r.length>s?r.slice(i,i+s):r,l?Yn.call(this,r):r;let a=[];for(let h=0,p,v;h<r.length;h++)if((p=r[h])&&(v=p.length)){if(i){if(i>=v){i-=v;continue}p=p.slice(i,i+s),v=p.length,i=0}if(v>s&&(p=p.slice(0,s),v=s),!a.length&&v>=s)return l?Yn.call(this,p):p;if(a.push(p),s-=v,!s)break}return a=a.length>1?[].concat.apply([],a):a[0],l?Yn.call(this,a):a}function Cs(r,s,i,l){var a=l[0];if(a[0]&&a[0].query)return r[s].apply(r,a);if(!(s!=="and"&&s!=="not"||r.result.length||r.await||a.suggest))return l.length>1&&(a=l[l.length-1]),(l=a.resolve)?r.await||r.result:r;let h=[],p=0,v=0,g,w,k,$,j;for(s=0;s<l.length;s++)if(a=l[s]){var A=void 0;if(a.constructor===He)A=a.await||a.result;else if(a.then||a.constructor===Array)A=a;else{p=a.limit||0,v=a.offset||0,k=a.suggest,w=a.resolve,g=(($=a.highlight||r.highlight)||a.enrich)&&w,A=a.queue;let z=a.async||A,_=a.index,R=a.query;if(_?r.index||(r.index=_):_=r.index,R||a.tag){const q=a.field||a.pluck;if(q&&(!R||r.query&&!$||(r.query=R,r.field=q,r.highlight=$),_=_.index.get(q)),A&&(j||r.await)){j=1;let Q;const ue=r.C.length,pe=new Promise(function(ce){Q=ce});(function(ce,ae){pe.h=function(){ae.index=null,ae.resolve=!1;let ne=z?ce.searchAsync(ae):ce.search(ae);return ne.then?ne.then(function(re){return r.C[ue]=re=re.result||re,Q(re),re}):(ne=ne.result||ne,Q(ne),ne)}})(_,Object.assign({},a)),r.C.push(pe),h[s]=pe;continue}else a.resolve=!1,a.index=null,A=z?_.searchAsync(a):_.search(a),a.resolve=w,a.index=_}else if(a.and)A=ks(a,"and",_);else if(a.or)A=ks(a,"or",_);else if(a.not)A=ks(a,"not",_);else if(a.xor)A=ks(a,"xor",_);else continue}A.await?(j=1,A=A.await):A.then?(j=1,A=A.then(function(z){return z.result||z})):A=A.result||A,h[s]=A}if(j&&!r.await&&(r.await=new Promise(function(z){r.return=z})),j){const z=Promise.all(h).then(function(_){for(let R=0;R<r.C.length;R++)if(r.C[R]===z){r.C[R]=function(){return i.call(r,_,p,v,g,w,k,$)};break}ei(r)});r.C.push(z)}else if(r.await)r.C.push(function(){return i.call(r,h,p,v,g,w,k,$)});else return i.call(r,h,p,v,g,w,k,$);return w?r.await||r.result:r}function ks(r,s,i){r=r[s];const l=r[0]||r;return l.index||(l.index=i),i=new He(l),r.length>1&&(i=i[s].apply(i,r.slice(1))),i}He.prototype.or=function(){return Cs(this,"or",_d,arguments)};function _d(r,s,i,l,a,h,p){return r.length&&(this.result.length&&r.push(this.result),r.length<2?this.result=r[0]:(this.result=eu(r,s,i,!1,this.h),i=0)),a&&(this.await=null),a?this.resolve(s,i,l,p):this}He.prototype.and=function(){return Cs(this,"and",Ld,arguments)};function Ld(r,s,i,l,a,h,p){if(!h&&!this.result.length)return a?this.result:this;let v;if(r.length)if(this.result.length&&r.unshift(this.result),r.length<2)this.result=r[0];else{let g=0;for(let w=0,k,$;w<r.length;w++)if((k=r[w])&&($=k.length))g<$&&(g=$);else if(!h){g=0;break}g?(this.result=$s(r,g,s,i,h,this.h,a),v=!0):this.result=[]}else h||(this.result=r);return a&&(this.await=null),a?this.resolve(s,i,l,p,v):this}He.prototype.xor=function(){return Cs(this,"xor",bd,arguments)};function bd(r,s,i,l,a,h,p){if(r.length)if(this.result.length&&r.unshift(this.result),r.length<2)this.result=r[0];else{e:{h=i;var v=this.h;const g=[],w=Ye();let k=0;for(let $=0,j;$<r.length;$++)if(j=r[$]){k<j.length&&(k=j.length);for(let A=0,z;A<j.length;A++)if(z=j[A])for(let _=0,R;_<z.length;_++)R=z[_],w[R]=w[R]?2:1}for(let $=0,j,A=0;$<k;$++)for(let z=0,_;z<r.length;z++)if((_=r[z])&&(j=_[$])){for(let R=0,q;R<j.length;R++)if(q=j[R],w[q]===1)if(h)h--;else if(a){if(g.push(q),g.length===s){r=g;break e}}else{const Q=$+(z?v:0);if(g[Q]||(g[Q]=[]),g[Q].push(q),++A===s){r=g;break e}}}r=g}this.result=r,v=!0}else h||(this.result=r);return a&&(this.await=null),a?this.resolve(s,i,l,p,v):this}He.prototype.not=function(){return Cs(this,"not",Id,arguments)};function Id(r,s,i,l,a,h,p){if(!h&&!this.result.length)return a?this.result:this;if(r.length&&this.result.length){e:{h=i;var v=[];r=new Set(r.flat().flat());for(let g=0,w,k=0;g<this.result.length;g++)if(w=this.result[g]){for(let $=0,j;$<w.length;$++)if(j=w[$],!r.has(j)){if(h)h--;else if(a){if(v.push(j),v.length===s){r=v;break e}}else if(v[g]||(v[g]=[]),v[g].push(j),++k===s){r=v;break e}}}r=v}this.result=r,v=!0}return a&&(this.await=null),a?this.resolve(s,i,l,p,v):this}function Ps(r,s,i,l,a){let h,p,v;typeof a=="string"?(h=a,a=""):h=a.template,p=h.indexOf("$1"),v=h.substring(p+2),p=h.substring(0,p);let g=a&&a.boundary,w=!a||a.clip!==!1,k=a&&a.merge&&v&&p&&new RegExp(v+" "+p,"g");a=a&&a.ellipsis;var $=0;if(typeof a=="object"){var j=a.template;$=j.length-2,a=a.pattern}typeof a!="string"&&(a=a===!1?"":"..."),$&&(a=j.replace("$1",a)),j=a.length-$;let A,z;typeof g=="object"&&(A=g.before,A===0&&(A=-1),z=g.after,z===0&&(z=-1),g=g.total||9e5),$=new Map;for(let S=0,O,W,ge;S<s.length;S++){let V;if(l)V=s,ge=l;else{var _=s[S];if(ge=_.field,!ge)continue;V=_.result}W=i.get(ge),O=W.encoder,_=$.get(O),typeof _!="string"&&(_=O.encode(r),$.set(O,_));for(let ee=0;ee<V.length;ee++){var R=V[ee].doc;if(!R||(R=Ar(R,ge),!R))continue;var q=R.trim().split(/\s+/);if(!q.length)continue;R="";var Q=[];let G=[];for(var ue=-1,pe=-1,ce=0,ae=0;ae<q.length;ae++){var ne=q[ae],re=O.encode(ne);re=re.length>1?re.join(" "):re[0];let H;if(re&&ne){for(var fe=ne.length,b=(O.split?ne.replace(O.split,""):ne).length-re.length,M="",K=0,se=0;se<_.length;se++){var he=_[se];if(he){var Se=he.length;Se+=b<0?0:b,K&&Se<=K||(he=re.indexOf(he),he>-1&&(M=(he?ne.substring(0,he):"")+p+ne.substring(he,he+Se)+v+(he+Se<fe?ne.substring(he+Se):""),K=Se,H=!0))}}M&&(g&&(ue<0&&(ue=R.length+(R?1:0)),pe=R.length+(R?1:0)+M.length,ce+=fe,G.push(Q.length),Q.push({match:M})),R+=(R?" ":"")+M)}if(!H)ne=q[ae],R+=(R?" ":"")+ne,g&&Q.push({text:ne});else if(g&&ce>=g)break}if(ce=G.length*(h.length-2),A||z||g&&R.length-ce>g)if(ce=g+ce-j*2,ae=pe-ue,A>0&&(ae+=A),z>0&&(ae+=z),ae<=ce)q=A?ue-(A>0?A:0):ue-((ce-ae)/2|0),Q=z?pe+(z>0?z:0):q+ce,w||(q>0&&R.charAt(q)!==" "&&R.charAt(q-1)!==" "&&(q=R.indexOf(" ",q),q<0&&(q=0)),Q<R.length&&R.charAt(Q-1)!==" "&&R.charAt(Q)!==" "&&(Q=R.lastIndexOf(" ",Q),Q<pe?Q=pe:++Q)),R=(q?a:"")+R.substring(q,Q)+(Q<R.length?a:"");else{for(pe=[],ue={},ce={},ae={},ne={},re={},M=b=fe=0,se=K=1;;){var Te=void 0;for(let H=0,ie;H<G.length;H++){if(ie=G[H],M)if(b!==M){if(ae[H+1])continue;if(ie+=M,ue[ie]){fe-=j,ce[H+1]=1,ae[H+1]=1;continue}if(ie>=Q.length-1){if(ie>=Q.length){ae[H+1]=1,ie>=q.length&&(ce[H+1]=1);continue}fe-=j}if(R=Q[ie].text,Se=z&&re[H])if(Se>0){if(R.length>Se)if(ae[H+1]=1,w)R=R.substring(0,Se);else continue;(Se-=R.length)||(Se=-1),re[H]=Se}else{ae[H+1]=1;continue}if(fe+R.length+1<=g)R=" "+R,pe[H]+=R;else if(w)Te=g-fe-1,Te>0&&(R=" "+R.substring(0,Te),pe[H]+=R),ae[H+1]=1;else{ae[H+1]=1;continue}}else{if(ae[H])continue;if(ie-=b,ue[ie]){fe-=j,ae[H]=1,ce[H]=1;continue}if(ie<=0){if(ie<0){ae[H]=1,ce[H]=1;continue}fe-=j}if(R=Q[ie].text,Se=A&&ne[H])if(Se>0){if(R.length>Se)if(ae[H]=1,w)R=R.substring(R.length-Se);else continue;(Se-=R.length)||(Se=-1),ne[H]=Se}else{ae[H]=1;continue}if(fe+R.length+1<=g)R+=" ",pe[H]=R+pe[H];else if(w)Te=R.length+1-(g-fe),Te>=0&&Te<R.length&&(R=R.substring(Te)+" ",pe[H]=R+pe[H]),ae[H]=1;else{ae[H]=1;continue}}else{R=Q[ie].match,A&&(ne[H]=A),z&&(re[H]=z),H&&fe++;let Ne;if(ie?!H&&j&&(fe+=j):(ce[H]=1,ae[H]=1),ie>=q.length-1||ie<Q.length-1&&Q[ie+1].match?Ne=1:j&&(fe+=j),fe-=h.length-2,!H||fe+R.length<=g)pe[H]=R;else{Te=K=se=ce[H]=0;break}Ne&&(ce[H+1]=1,ae[H+1]=1)}fe+=R.length,Te=ue[ie]=1}if(Te)b===M?M++:b++;else{if(b===M?K=0:se=0,!K&&!se)break;K?(b++,M=b):M++}}R="";for(let H=0,ie;H<pe.length;H++)ie=(ce[H]?H?" ":"":(H&&!a?" ":"")+a)+pe[H],R+=ie;a&&!ce[pe.length]&&(R+=a)}k&&(R=R.replace(k," ")),V[ee].highlight=R}if(l)break}return s}function He(r,s){if(!this||this.constructor!==He)return new He(r,s);let i=0,l,a,h,p,v,g;if(r&&r.index){const w=r;if(s=w.index,i=w.boost||0,a=w.query){h=w.field||w.pluck,p=w.highlight;const k=w.resolve;r=w.async||w.queue,w.resolve=!1,w.index=null,r=r?s.searchAsync(w):s.search(w),w.resolve=k,w.index=s,r=r.result||r}else r=[]}if(r&&r.then){const w=this;r=r.then(function(k){w.C[0]=w.result=k.result||k,ei(w)}),l=[r],r=[],v=new Promise(function(k){g=k})}this.index=s||null,this.result=r||[],this.h=i,this.C=l||[],this.await=v||null,this.return=g||null,this.highlight=p||null,this.query=a||"",this.field=h||""}ve=He.prototype,ve.limit=function(r){if(this.await){const s=this;this.C.push(function(){return s.limit(r).result})}else if(this.result.length){const s=[];for(let i=0,l;i<this.result.length;i++)if(l=this.result[i])if(l.length<=r){if(s[i]=l,r-=l.length,!r)break}else{s[i]=l.slice(0,r);break}this.result=s}return this},ve.offset=function(r){if(this.await){const s=this;this.C.push(function(){return s.offset(r).result})}else if(this.result.length){const s=[];for(let i=0,l;i<this.result.length;i++)(l=this.result[i])&&(l.length<=r?r-=l.length:(s[i]=l.slice(r),r=0));this.result=s}return this},ve.boost=function(r){if(this.await){const s=this;this.C.push(function(){return s.boost(r).result})}else this.h+=r;return this};function ei(r,s){let i=r.result;var l=r.await;r.await=null;for(let a=0,h;a<r.C.length;a++)if(h=r.C[a]){if(typeof h=="function")i=h(),r.C[a]=i=i.result||i,a--;else if(h.h)i=h.h(),r.C[a]=i=i.result||i,a--;else if(h.then)return r.await=l}return l=r.return,r.C=[],r.return=null,s||l(i),i}ve.resolve=function(r,s,i,l,a){let h=this.await?ei(this,!0):this.result;if(h.then){const p=this;return h.then(function(){return p.resolve(r,s,i,l,a)})}return h.length&&(typeof r=="object"?(l=r.highlight||this.highlight,i=!!l||r.enrich,s=r.offset,r=r.limit):(l=l||this.highlight,i=!!l||i),h=a?i?Yn.call(this.index,h):h:Zo.call(this.index,h,r||100,s,i)),this.finalize(h,l)},ve.finalize=function(r,s){if(r.then){const l=this;return r.then(function(a){return l.finalize(a,s)})}s&&r.length&&this.query&&(r=Ps(this.query,r,this.index.index,this.field,s));const i=this.return;return this.highlight=this.index=this.result=this.C=this.await=this.return=null,this.query=this.field="",i&&i(r),r};function $s(r,s,i,l,a,h,p){const v=r.length;let g=[],w,k;w=Ye();for(let $=0,j,A,z,_;$<s;$++)for(let R=0;R<v;R++)if(z=r[R],$<z.length&&(j=z[$]))for(let q=0;q<j.length;q++){if(A=j[q],(k=w[A])?w[A]++:(k=0,w[A]=1),_=g[k]||(g[k]=[]),!p){let Q=$+(R||!a?0:h||0);_=_[Q]||(_[Q]=[])}if(_.push(A),p&&i&&k===v-1&&_.length-l===i)return l?_.slice(l):_}if(r=g.length)if(a)g=g.length>1?eu(g,i,l,p,h):(g=g[0])&&i&&g.length>i||l?g.slice(l,i+l):g;else{if(r<v)return[];if(g=g[r-1],i||l)if(p)(g.length>i||l)&&(g=g.slice(l,i+l));else{a=[];for(let $=0,j;$<g.length;$++)if(j=g[$]){if(l&&j.length>l)l-=j.length;else if((i&&j.length>i||l)&&(j=j.slice(l,i+l),i-=j.length,l&&(l-=j.length)),a.push(j),!i)break}g=a}}return g}function eu(r,s,i,l,a){const h=[],p=Ye();let v;var g=r.length;let w;if(l){for(a=g-1;a>=0;a--)if(w=(l=r[a])&&l.length){for(g=0;g<w;g++)if(v=l[g],!p[v]){if(p[v]=1,i)i--;else if(h.push(v),h.length===s)return h}}}else for(let k=g-1,$,j=0;k>=0;k--){$=r[k];for(let A=0;A<$.length;A++)if(w=(l=$[A])&&l.length){for(let z=0;z<w;z++)if(v=l[z],!p[v])if(p[v]=1,i)i--;else{let _=(A+(k<g-1&&a||0))/(k+1)|0;if((h[_]||(h[_]=[])).push(v),++j===s)return h}}}return h}function Fd(r,s,i,l,a){const h=Ye(),p=[];for(let v=0,g;v<s.length;v++){g=s[v];for(let w=0;w<g.length;w++)h[g[w]]=1}if(a){for(let v=0,g;v<r.length;v++)if(g=r[v],h[g]){if(l)l--;else if(p.push(g),h[g]=0,i&&--i===0)break}}else for(let v=0,g,w;v<r.result.length;v++)for(g=r.result[v],s=0;s<g.length;s++)w=g[s],h[w]&&((p[v]||(p[v]=[])).push(w),h[w]=0);return p}An.prototype.search=function(r,s,i,l){i||(!s&&jr(r)?(i=r,r=""):jr(s)&&(i=s,s=0));let a=[];var h=[];let p,v,g,w,k,$,j=0,A=!0,z;if(i){i.constructor===Array&&(i={index:i}),r=i.query||r,p=i.pluck,v=i.merge,w=i.boost,$=p||i.field||($=i.index)&&($.index?null:$);var _=this.tag&&i.tag;g=i.suggest,A=i.resolve!==!1,k=i.cache,z=A&&this.store&&i.highlight;var R=!!z||A&&this.store&&i.enrich;s=i.limit||s;var q=i.offset||0;if(s||(s=A?100:0),_&&(!this.db||!l)){_.constructor!==Array&&(_=[_]);var Q=[];for(let ne=0,re;ne<_.length;ne++)if(re=_[ne],re.field&&re.tag){var ue=re.tag;if(ue.constructor===Array)for(var pe=0;pe<ue.length;pe++)Q.push(re.field,ue[pe]);else Q.push(re.field,ue)}else{ue=Object.keys(re);for(let fe=0,b,M;fe<ue.length;fe++)if(b=ue[fe],M=re[b],M.constructor===Array)for(pe=0;pe<M.length;pe++)Q.push(b,M[pe]);else Q.push(b,M)}if(_=Q,!r){if(h=[],Q.length)for(_=0;_<Q.length;_+=2){if(this.db){if(l=this.index.get(Q[_]),!l)continue;h.push(l=l.db.tag(Q[_+1],s,q,R))}else l=Md.call(this,Q[_],Q[_+1],s,q,R);a.push(A?{field:Q[_],tag:Q[_+1],result:l}:[l])}if(h.length){const ne=this;return Promise.all(h).then(function(re){for(let fe=0;fe<re.length;fe++)A?a[fe].result=re[fe]:a[fe]=re[fe];return A?a:new He(a.length>1?$s(a,1,0,0,g,w):a[0],ne)})}return A?a:new He(a.length>1?$s(a,1,0,0,g,w):a[0],this)}}A||p||!($=$||this.field)||(Rt($)?p=$:($.constructor===Array&&$.length===1&&($=$[0]),p=$.field||$.index)),$&&$.constructor!==Array&&($=[$])}$||($=this.field);let ce;Q=(this.worker||this.db)&&!l&&[];for(let ne=0,re,fe,b;ne<$.length;ne++){if(fe=$[ne],this.db&&this.tag&&!this.B[ne])continue;let M;if(Rt(fe)||(M=fe,fe=M.field,r=M.query||r,s=qn(M.limit,s),q=qn(M.offset,q),g=qn(M.suggest,g),z=A&&this.store&&qn(M.highlight,z),R=!!z||A&&this.store&&qn(M.enrich,R),k=qn(M.cache,k)),l)re=l[ne];else{ue=M||i||{},pe=ue.enrich;var ae=this.index.get(fe);if(_&&(this.db&&(ue.tag=_,ue.field=$,ce=ae.db.support_tag_search),!ce&&pe&&(ue.enrich=!1),ce||(ue.limit=0,ue.offset=0)),re=k?ae.searchCache(r,_&&!ce?0:s,ue):ae.search(r,_&&!ce?0:s,ue),_&&!ce&&(ue.limit=s,ue.offset=q),pe&&(ue.enrich=pe),Q){Q[ne]=re;continue}}if(b=(re=re.result||re)&&re.length,_&&b){if(ue=[],pe=0,this.db&&l){if(!ce)for(ae=$.length;ae<l.length;ae++){let K=l[ae];if(K&&K.length)pe++,ue.push(K);else if(!g)return A?a:new He(a,this)}}else for(let K=0,se,he;K<_.length;K+=2){if(se=this.tag.get(_[K]),!se){if(g)continue;return A?a:new He(a,this)}if(he=(se=se&&se.get(_[K+1]))&&se.length)pe++,ue.push(se);else if(!g)return A?a:new He(a,this)}if(pe){if(re=Fd(re,ue,s,q,A),b=re.length,!b&&!g)return A?re:new He(re,this);pe--}}if(b)h[j]=fe,a.push(re),j++;else if($.length===1)return A?a:new He(a,this)}if(Q){if(this.db&&_&&_.length&&!ce)for(R=0;R<_.length;R+=2){if(h=this.index.get(_[R]),!h){if(g)continue;return A?a:new He(a,this)}Q.push(h.db.tag(_[R+1],s,q,!1))}const ne=this;return Promise.all(Q).then(function(re){return i&&(i.resolve=A),re.length&&(re=ne.search(r,s,i,re)),re})}if(!j)return A?a:new He(a,this);if(p&&(!R||!this.store))return a=a[0],A?a:new He(a,this);for(Q=[],q=0;q<h.length;q++){if(_=a[q],R&&_.length&&typeof _[0].doc>"u"&&(this.db?Q.push(_=this.index.get(this.field[0]).db.enrich(_)):_=Yn.call(this,_)),p)return A?z?Ps(r,_,this.index,p,z):_:new He(_,this);a[q]={field:h[q],result:_}}if(R&&this.db&&Q.length){const ne=this;return Promise.all(Q).then(function(re){for(let fe=0;fe<re.length;fe++)a[fe].result=re[fe];return z&&(a=Ps(r,a,ne.index,p,z)),v?tu(a):a})}return z&&(a=Ps(r,a,this.index,p,z)),v?tu(a):a};function tu(r){const s=[],i=Ye(),l=Ye();for(let a=0,h,p,v,g,w,k,$;a<r.length;a++){h=r[a],p=h.field,v=h.result;for(let j=0;j<v.length;j++)w=v[j],typeof w!="object"?w={id:g=w}:g=w.id,(k=i[g])?k.push(p):(w.field=i[g]=[p],s.push(w)),($=w.highlight)&&(k=l[g],k||(l[g]=k={},w.highlight=k),k[p]=$)}return s}function Md(r,s,i,l,a){return r=this.tag.get(r),r?(r=r.get(s),r?(s=r.length-l,s>0&&((i&&s>i||l)&&(r=r.slice(l,l+i)),a&&(r=Yn.call(this,r))),r):[]):[]}function Yn(r){if(!this||!this.store)return r;if(this.db)return this.index.get(this.field[0]).db.enrich(r);const s=Array(r.length);for(let i=0,l;i<r.length;i++)l=r[i],s[i]={id:l,doc:this.store.get(l)};return s}function An(r){if(!this||this.constructor!==An)return new An(r);const s=r.document||r.doc||r;let i,l;if(this.B=[],this.field=[],this.D=[],this.key=(i=s.key||s.id)&&Es(i,this.D)||"id",(l=r.keystore||0)&&(this.keystore=l),this.fastupdate=!!r.fastupdate,this.reg=!this.fastupdate||r.worker||r.db?l?new Lt(l):new Set:l?new _t(l):new Map,this.h=(i=s.store||null)&&i&&i!==!0&&[],this.store=i?l?new _t(l):new Map:null,this.cache=(i=r.cache||null)&&new jn(i),r.cache=!1,this.worker=r.worker||!1,this.priority=r.priority||4,this.index=zd.call(this,r,s),this.tag=null,(i=s.tag)&&(typeof i=="string"&&(i=[i]),i.length)){this.tag=new Map,this.A=[],this.F=[];for(let a=0,h,p;a<i.length;a++){if(h=i[a],p=h.field||h,!p)throw Error("The tag field from the document descriptor is undefined.");h.custom?this.A[a]=h.custom:(this.A[a]=Es(p,this.D),h.filter&&(typeof this.A[a]=="string"&&(this.A[a]=new String(this.A[a])),this.A[a].G=h.filter)),this.F[a]=p,this.tag.set(p,new Map)}}if(this.worker){this.fastupdate=!1,r=[];for(const a of this.index.values())a.then&&r.push(a);if(r.length){const a=this;return Promise.all(r).then(function(h){let p=0;for(const v of a.index.entries()){const g=v[0];let w=v[1];w.then&&(w=h[p],a.index.set(g,w),p++)}return a})}}else r.db&&(this.fastupdate=!1,this.mount(r.db))}ve=An.prototype,ve.mount=function(r){let s=this.field;if(this.tag)for(let h=0,p;h<this.F.length;h++){p=this.F[h];var i=void 0;this.index.set(p,i=new Mt({},this.reg)),s===this.field&&(s=s.slice(0)),s.push(p),i.tag=this.tag.get(p)}i=[];const l={db:r.db,type:r.type,fastupdate:r.fastupdate};for(let h=0,p,v;h<s.length;h++){l.field=v=s[h],p=this.index.get(v);const g=new r.constructor(r.id,l);g.id=r.id,i[h]=g.mount(p),p.document=!0,h?p.bypass=!0:p.store=this.store}const a=this;return this.db=Promise.all(i).then(function(){a.db=!0})},ve.commit=async function(){const r=[];for(const s of this.index.values())r.push(s.commit());await Promise.all(r),this.reg.clear()},ve.destroy=function(){const r=[];for(const s of this.index.values())r.push(s.destroy());return Promise.all(r)};function zd(r,s){const i=new Map;let l=s.index||s.field||s;Rt(l)&&(l=[l]);for(let h=0,p,v;h<l.length;h++){if(p=l[h],Rt(p)||(v=p,p=p.field),v=jr(v)?Object.assign({},r,v):r,this.worker){var a=void 0;a=(a=v.encoder)&&a.encode?a:new Wn(typeof a=="string"?Go[a]:a||{}),a=new Jn(v,a),i.set(p,a)}this.worker||i.set(p,new Mt(v,this.reg)),v.custom?this.B[h]=v.custom:(this.B[h]=Es(p,this.D),v.filter&&(typeof this.B[h]=="string"&&(this.B[h]=new String(this.B[h])),this.B[h].G=v.filter)),this.field[h]=p}if(this.h){r=s.store,Rt(r)&&(r=[r]);for(let h=0,p,v;h<r.length;h++)p=r[h],v=p.field||p,p.custom?(this.h[h]=p.custom,p.custom.O=v):(this.h[h]=Es(v,this.D),p.filter&&(typeof this.h[h]=="string"&&(this.h[h]=new String(this.h[h])),this.h[h].G=p.filter))}return i}function Es(r,s){const i=r.split(":");let l=0;for(let a=0;a<i.length;a++)r=i[a],r[r.length-1]==="]"&&(r=r.substring(0,r.length-2))&&(s[l]=!0),r&&(i[l++]=r);return l<i.length&&(i.length=l),l>1?i:i[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){jr(r)&&(r=Ar(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 i of this.tag.values())for(let l of i){s=l[0];const a=l[1],h=a.indexOf(r);h>-1&&(a.length>1?a.splice(h,1):i.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 i=s.clear();i.then&&r.push(i)}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=Ar(s,this.key)),this.store.set(r,s),this},ve.searchCache=Wo,ve.export=Dd,ve.import=Ud,Qo(An.prototype);function ti(r,s=0){let i=[],l=[];s&&(s=25e4/s*5e3|0);for(const a of r.entries())l.push(a),l.length===s&&(i.push(l),l=[]);return l.length&&i.push(l),i}function ni(r,s){s||(s=new Map);for(let i=0,l;i<r.length;i++)l=r[i],s.set(l[0],l[1]);return s}function nu(r,s=0){let i=[],l=[];s&&(s=25e4/s*1e3|0);for(const a of r.entries())l.push([a[0],ti(a[1])[0]||[]]),l.length===s&&(i.push(l),l=[]);return l.length&&i.push(l),i}function ru(r,s){s||(s=new Map);for(let i=0,l,a;i<r.length;i++)l=r[i],a=s.get(l[0]),s.set(l[0],ni(l[1],a));return s}function su(r){let s=[],i=[];for(const l of r.keys())i.push(l),i.length===25e4&&(s.push(i),i=[]);return i.length&&s.push(i),s}function ou(r,s){s||(s=new Set);for(let i=0;i<r.length;i++)s.add(r[i]);return s}function js(r,s,i,l,a,h,p=0){const v=l&&l.constructor===Array;var g=v?l.shift():l;if(!g)return this.export(r,s,a,h+1);if((g=r((s?s+".":"")+(p+1)+"."+i,JSON.stringify(g)))&&g.then){const w=this;return g.then(function(){return js.call(w,r,s,i,v?l:null,a,h,p+1)})}return js.call(this,r,s,i,v?l:null,a,h,p+1)}function Dd(r,s,i=0,l=0){if(i<this.field.length){const p=this.field[i];if((s=this.index.get(p).export(r,p,i,l=1))&&s.then){const v=this;return s.then(function(){return v.export(r,p,i+1)})}return this.export(r,p,i+1)}let a,h;switch(l){case 0:a="reg",h=su(this.reg),s=null;break;case 1:a="tag",h=this.tag&&nu(this.tag,this.reg.size),s=null;break;case 2:a="doc",h=this.store&&ti(this.store),s=null;break;default:return}return js.call(this,r,s,a,h||null,i,l)}function Ud(r,s){var i=r.split(".");i[i.length-1]==="json"&&i.pop();const l=i.length>2?i[0]:"";if(i=i.length>2?i[2]:i[1],this.worker&&l)return this.index.get(l).import(r);if(s){if(typeof s=="string"&&(s=JSON.parse(s)),l)return this.index.get(l).import(i,s);switch(i){case"reg":this.fastupdate=!1,this.reg=ou(s,this.reg);for(let a=0,h;a<this.field.length;a++)h=this.index.get(this.field[a]),h.fastupdate=!1,h.reg=this.reg;if(this.worker){s=[];for(const a of this.index.values())s.push(a.import(r));return Promise.all(s)}break;case"tag":this.tag=ru(s,this.tag);break;case"doc":this.store=ni(s,this.store)}}}function iu(r,s){let i="";for(const l of r.entries()){r=l[0];const a=l[1];let h="";for(let p=0,v;p<a.length;p++){v=a[p]||[""];let g="";for(let w=0;w<v.length;w++)g+=(g?",":"")+(s==="string"?'"'+v[w]+'"':v[w]);g="["+g+"]",h+=(h?",":"")+g}h='["'+r+'",['+h+"]]",i+=(i?",":"")+h}return i}Mt.prototype.remove=function(r,s){const i=this.reg.size&&(this.fastupdate?this.reg.get(r):this.reg.has(r));if(i){if(this.fastupdate){for(let l=0,a,h;l<i.length;l++)if((a=i[l])&&(h=a.length))if(a[h-1]===r)a.pop();else{const p=a.indexOf(r);p>=0&&a.splice(p,1)}}else Or(this.map,r),this.depth&&Or(this.ctx,r);s||this.reg.delete(r)}return this.db&&(this.commit_task.push({del:r}),this.M&&cu(this)),this.cache&&this.cache.remove(r),this};function Or(r,s){let i=0;var l=typeof s>"u";if(r.constructor===Array){for(let a=0,h,p,v;a<r.length;a++)if((h=r[a])&&h.length){if(l)return 1;if(p=h.indexOf(s),p>=0){if(h.length>1)return h.splice(p,1),1;if(delete r[a],i)return 1;v=1}else{if(v)return 1;i++}}}else for(let a of r.entries())l=a[0],Or(a[1],s)?i++:r.delete(l);return i}const Bd={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,i,l){if(s&&(r||r===0)){if(!l&&!i&&this.reg.has(r))return this.update(r,s);l=this.depth,s=this.encoder.encode(s,!l);const w=s.length;if(w){const k=Ye(),$=Ye(),j=this.resolution;for(let A=0;A<w;A++){let z=s[this.rtl?w-1-A:A];var a=z.length;if(a&&(l||!$[z])){var h=this.score?this.score(s,z,A,null,0):As(j,w,A),p="";switch(this.tokenize){case"tolerant":if(Wt(this,$,z,h,r,i),a>2){for(let _=1,R,q,Q,ue;_<a-1;_++)R=z.charAt(_),q=z.charAt(_+1),Q=z.substring(0,_)+q,ue=z.substring(_+2),p=Q+R+ue,Wt(this,$,p,h,r,i),p=Q+ue,Wt(this,$,p,h,r,i);Wt(this,$,z.substring(0,z.length-1),h,r,i)}break;case"full":if(a>2){for(let _=0,R;_<a;_++)for(h=a;h>_;h--){p=z.substring(_,h),R=this.rtl?a-1-_:_;var v=this.score?this.score(s,z,A,p,R):As(j,w,A,a,R);Wt(this,$,p,v,r,i)}break}case"bidirectional":case"reverse":if(a>1){for(v=a-1;v>0;v--){p=z[this.rtl?a-1-v:v]+p;var g=this.score?this.score(s,z,A,p,v):As(j,w,A,a,v);Wt(this,$,p,g,r,i)}p=""}case"forward":if(a>1){for(v=0;v<a;v++)p+=z[this.rtl?a-1-v:v],Wt(this,$,p,h,r,i);break}default:if(Wt(this,$,z,h,r,i),l&&w>1&&A<w-1)for(a=this.N,p=z,h=Math.min(l+1,this.rtl?A+1:w-A),v=1;v<h;v++){z=s[this.rtl?w-1-A-v:A+v],g=this.bidirectional&&z>p;const _=this.score?this.score(s,p,A,z,v-1):As(a+(w/2>a?0:1),w,A,h-1,v-1);Wt(this,k,g?p:z,_,r,i,g?z:p)}}}}this.fastupdate||this.reg.add(r)}}return this.db&&(this.commit_task.push(i?{ins:r}:{del:r}),this.M&&cu(this)),this};function Wt(r,s,i,l,a,h,p){let v,g;if(!(v=s[i])||p&&!v[p]){if(p?(s=v||(s[i]=Ye()),s[p]=1,g=r.ctx,(v=g.get(p))?g=v:g.set(p,g=r.keystore?new _t(r.keystore):new Map)):(g=r.map,s[i]=1),(v=g.get(i))?g=v:g.set(i,g=v=[]),h){for(let w=0,k;w<v.length;w++)if((k=v[w])&&k.includes(a)){if(w<=l)return;k.splice(k.indexOf(a),1),r.fastupdate&&(s=r.reg.get(a))&&s.splice(s.indexOf(k),1);break}}if(g=g[l]||(g[l]=[]),g.push(a),g.length===2**31-1){if(s=new Kn(g),r.fastupdate)for(let w of r.reg.values())w.includes(g)&&(w[w.indexOf(g)]=s);v[l]=g=s}r.fastupdate&&((l=r.reg.get(a))?l.push(g):r.reg.set(a,[g]))}}function As(r,s,i,l,a){return i&&r>1?s+(l||0)<=r?i+(a||0):(r-1)/(s+(l||0))*(i+(a||0))+1|0:0}Mt.prototype.search=function(r,s,i){if(i||(s||typeof r!="object"?typeof s=="object"&&(i=s,s=0):(i=r,r="")),i&&i.cache)return i.cache=!1,r=this.searchCache(r,s,i),i.cache=!0,r;let l=[],a,h,p,v=0,g,w,k,$,j;i&&(r=i.query||r,s=i.limit||s,v=i.offset||0,h=i.context,p=i.suggest,j=(g=i.resolve)&&i.enrich,k=i.boost,$=i.resolution,w=this.db&&i.tag),typeof g>"u"&&(g=this.resolve),h=this.depth&&h!==!1;let A=this.encoder.encode(r,!h);if(a=A.length,s=s||(g?100:0),a===1)return au.call(this,A[0],"",s,v,g,j,w);if(a===2&&h&&!p)return au.call(this,A[1],A[0],s,v,g,j,w);let z=Ye(),_=0,R;if(h&&(R=A[0],_=1),$||$===0||($=R?this.N:this.resolution),this.db){if(this.db.search&&(i=this.db.search(this,A,s,v,p,g,j,w),i!==!1))return i;const q=this;return(async function(){for(let Q,ue;_<a;_++){if((ue=A[_])&&!z[ue]){if(z[ue]=1,Q=await ri(q,ue,R,0,0,!1,!1),Q=uu(Q,l,p,$)){l=Q;break}R&&(p&&Q&&l.length||(R=ue))}p&&R&&_===a-1&&!l.length&&($=q.resolution,R="",_=-1,z=Ye())}return lu(l,$,s,v,p,k,g)})()}for(let q,Q;_<a;_++){if((Q=A[_])&&!z[Q]){if(z[Q]=1,q=ri(this,Q,R,0,0,!1,!1),q=uu(q,l,p,$)){l=q;break}R&&(p&&q&&l.length||(R=Q))}p&&R&&_===a-1&&!l.length&&($=this.resolution,R="",_=-1,z=Ye())}return lu(l,$,s,v,p,k,g)};function lu(r,s,i,l,a,h,p){let v=r.length,g=r;if(v>1)g=$s(r,s,i,l,a,h,p);else if(v===1)return p?Zo.call(null,r[0],i,l):new He(r[0],this);return p?g:new He(g,this)}function au(r,s,i,l,a,h,p){return r=ri(this,r,s,i,l,a,h,p),this.db?r.then(function(v){return a?v||[]:new He(v,this)}):r&&r.length?a?Zo.call(this,r,i,l):new He(r,this):a?[]:new He([],this)}function uu(r,s,i,l){let a=[];if(r&&r.length){if(r.length<=l){s.push(r);return}for(let h=0,p;h<l;h++)(p=r[h])&&(a[h]=p);if(a.length){s.push(a);return}}if(!i)return a}function ri(r,s,i,l,a,h,p,v){let g;return i&&(g=r.bidirectional&&s>i)&&(g=i,i=s,s=g),r.db?r.db.get(s,i,l,a,h,p,v):(r=i?(r=r.ctx.get(i))&&r.get(s):r.map.get(s),r)}function Mt(r,s){if(!this||this.constructor!==Mt)return new Mt(r);if(r){var i=Rt(r)?r:r.preset;i&&(r=Object.assign({},Bd[i],r))}else r={};i=r.context;const l=i===!0?{depth:1}:i||{},a=Rt(r.encoder)?Go[r.encoder]:r.encode||r.encoder||{};this.encoder=a.encode?a:typeof a=="object"?new Wn(a):{encode:a},this.resolution=r.resolution||9,this.tokenize=i=(i=r.tokenize)&&i!=="default"&&i!=="exact"&&i||"strict",this.depth=i==="strict"&&l.depth||0,this.bidirectional=l.bidirectional!==!1,this.fastupdate=!!r.fastupdate,this.score=r.score||null,(i=r.keystore||0)&&(this.keystore=i),this.map=i?new _t(i):new Map,this.ctx=i?new _t(i):new Map,this.reg=s||(this.fastupdate?i?new _t(i):new Map:i?new Lt(i):new Set),this.N=l.resolution||3,this.rtl=a.rtl||r.rtl||!1,this.cache=(i=r.cache||null)&&new jn(i),this.resolve=r.resolve!==!1,(i=r.db)&&(this.db=this.mount(i)),this.M=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(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)},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)},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=[],this.db.clear()):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 i=this,l=this.remove(r);return l&&l.then?l.then(()=>i.add(r,s)):this.add(r,s)},ve.cleanup=function(){return this.fastupdate?(Or(this.map),this.depth&&Or(this.ctx),this):this},ve.searchCache=Wo,ve.export=function(r,s,i=0,l=0){let a,h;switch(l){case 0:a="reg",h=su(this.reg);break;case 1:a="cfg",h=null;break;case 2:a="map",h=ti(this.map,this.reg.size);break;case 3:a="ctx",h=nu(this.ctx,this.reg.size);break;default:return}return js.call(this,r,s,a,h,i,l)},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=r.length>1?r[1]:r[0],r){case"reg":this.fastupdate=!1,this.reg=ou(s,this.reg);break;case"map":this.map=ni(s,this.map);break;case"ctx":this.ctx=ru(s,this.ctx)}},ve.serialize=function(r=!0){let s="",i="",l="";if(this.reg.size){let h;for(var a of this.reg.keys())h||(h=typeof a),s+=(s?",":"")+(h==="string"?'"'+a+'"':a);s="index.reg=new Set(["+s+"]);",i=iu(this.map,h),i="index.map=new Map(["+i+"]);";for(const p of this.ctx.entries()){a=p[0];let v=iu(p[1],h);v="new Map(["+v+"])",v='["'+a+'",'+v+"]",l+=(l?",":"")+v}l="index.ctx=new Map(["+l+"]);"}return r?"function inject(index){"+s+i+l+"}":s+i+l},Qo(Mt.prototype);const fu=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Ts=["map","ctx","tag","reg","cfg"],Tn=Ye();function si(r,s={}){if(!this||this.constructor!==si)return new si(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=si.prototype,ve.mount=function(r){return r.index?r.mount(this):(r.db=this,this.open())},ve.open=function(){if(this.db)return this.db;let r=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),Tn[r.id]||(Tn[r.id]=[]),Tn[r.id].push(r.field);const s=fu.open(r.id,1);return s.onupgradeneeded=function(){const i=r.db=this.result;for(let l=0,a;l<Ts.length;l++){a=Ts[l];for(let h=0,p;h<Tn[r.id].length;h++)p=Tn[r.id][h],i.objectStoreNames.contains(a+(a!=="reg"&&p?":"+p:""))||i.createObjectStore(a+(a!=="reg"&&p?":"+p:""))}},r.db=rn(s,function(i){r.db=i,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 rn(r)},ve.clear=function(){const r=[];for(let i=0,l;i<Ts.length;i++){l=Ts[i];for(let a=0,h;a<Tn[this.id].length;a++)h=Tn[this.id][a],r.push(l+(l!=="reg"&&h?":"+h:""))}const s=this.db.transaction(r,"readwrite");for(let i=0;i<r.length;i++)s.objectStore(r[i]).clear();return rn(s)},ve.get=function(r,s,i=0,l=0,a=!0,h=!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 p=this;return rn(r).then(function(v){let g=[];if(!v||!v.length)return g;if(a){if(!i&&!l&&v.length===1)return v[0];for(let w=0,k;w<v.length;w++)if((k=v[w])&&k.length){if(l>=k.length){l-=k.length;continue}const $=i?l+Math.min(k.length-l,i):k.length;for(let j=l;j<$;j++)g.push(k[j]);if(l=0,g.length===i)break}return h?p.enrich(g):g}return v})},ve.tag=function(r,s=0,i=0,l=!1){r=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(r);const a=this;return rn(r).then(function(h){return!h||!h.length||i>=h.length?[]:!s&&!i?h:(h=h.slice(i,i+s),l?a.enrich(h):h)})},ve.enrich=function(r){typeof r!="object"&&(r=[r]);const s=this.db.transaction("reg","readonly").objectStore("reg"),i=[];for(let l=0;l<r.length;l++)i[l]=rn(s.get(r[l]));return Promise.all(i).then(function(l){for(let a=0;a<l.length;a++)l[a]={id:r[a],doc:l[a]?JSON.parse(l[a]):null};return l})},ve.has=function(r){return r=this.db.transaction("reg","readonly").objectStore("reg").getKey(r),rn(r).then(function(s){return!!s})},ve.search=null,ve.info=function(){},ve.transaction=function(r,s,i){r+=r!=="reg"&&this.field?":"+this.field:"";let l=this.h[r+":"+s];if(l)return i.call(this,l);let a=this.db.transaction(r,s);this.h[r+":"+s]=l=a.objectStore(r);const h=i.call(this,l);return this.h[r+":"+s]=null,rn(a).finally(function(){return h})},ve.commit=async function(r){let s=r.commit_task,i=[];r.commit_task=[];for(let l=0,a;l<s.length;l++)a=s[l],a.del&&i.push(a.del);i.length&&await this.remove(i),r.reg.size&&(await this.transaction("map","readwrite",function(l){for(const a of r.map){const h=a[0],p=a[1];p.length&&(l.get(h).onsuccess=function(){let v=this.result;var g;if(v&&v.length){const w=Math.max(v.length,p.length);for(let k=0,$,j;k<w;k++)if((j=p[k])&&j.length){if(($=v[k])&&$.length)for(g=0;g<j.length;g++)$.push(j[g]);else v[k]=j;g=1}}else v=p,g=1;g&&l.put(v,h)})}}),await this.transaction("ctx","readwrite",function(l){for(const a of r.ctx){const h=a[0],p=a[1];for(const v of p){const g=v[0],w=v[1];w.length&&(l.get(h+":"+g).onsuccess=function(){let k=this.result;var $;if(k&&k.length){const j=Math.max(k.length,w.length);for(let A=0,z,_;A<j;A++)if((_=w[A])&&_.length){if((z=k[A])&&z.length)for($=0;$<_.length;$++)z.push(_[$]);else k[A]=_;$=1}}else k=w,$=1;$&&l.put(k,h+":"+g)})}}}),r.store?await this.transaction("reg","readwrite",function(l){for(const a of r.store){const h=a[0],p=a[1];l.put(typeof p=="object"?JSON.stringify(p):1,h)}}):r.bypass||await this.transaction("reg","readwrite",function(l){for(const a of r.reg.keys())l.put(1,a)}),r.tag&&await this.transaction("tag","readwrite",function(l){for(const a of r.tag){const h=a[0],p=a[1];p.length&&(l.get(h).onsuccess=function(){let v=this.result;v=v&&v.length?v.concat(p):p,l.put(v,h)})}}),r.map.clear(),r.ctx.clear(),r.tag&&r.tag.clear(),r.store&&r.store.clear(),r.document||r.reg.clear())};function oi(r,s,i){const l=r.value;let a,h=0;for(let p=0,v;p<l.length;p++){if(v=i?l:l[p]){for(let g=0,w,k;g<s.length;g++)if(k=s[g],w=v.indexOf(k),w>=0)if(a=1,v.length>1)v.splice(w,1);else{l[p]=[];break}h+=v.length}if(i)break}h?a&&r.update(l):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 i=this.result;i&&oi(i,r)}}),this.transaction("ctx","readwrite",function(s){s.openCursor().onsuccess=function(){const i=this.result;i&&oi(i,r)}}),this.transaction("tag","readwrite",function(s){s.openCursor().onsuccess=function(){const i=this.result;i&&oi(i,r,!0)}}),this.transaction("reg","readwrite",function(s){for(let i=0;i<r.length;i++)s.delete(r[i])})])};function rn(r,s){return new Promise((i,l)=>{r.onsuccess=r.oncomplete=function(){s&&s(this.result),s=null,i(this.result)},r.onerror=r.onblocked=l,r=null})}const Os={Encoder:Wn,Document:An},Vd=Go,Hd={finalize:r=>{let s=[];for(const i of r)s.push(...Wd(i));return s}};function qd(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 Wd(r){const s=[];let i="";for(const l of r){const a=l.codePointAt(0);qd(a)?(i&&(s.push(i),i=""),s.push(l)):i+=l}return i&&s.push(i),s}const ii=new Os.Encoder(Vd.Default,Hd);class Kd{constructor({adminUrl:s,apiKey:i,dir:l}){const a=l==="rtl",h=l==="rtl"?"reverse":"forward";this.apiUrl=s,this.apiKey=i,this.postsIndex=new Os.Document({tokenize:h,rtl:a,document:{id:"id",index:["title","excerpt"],store:!0},encoder:ii}),this.authorsIndex=new Os.Document({tokenize:h,rtl:a,document:{id:"id",index:["name"],store:!0},encoder:ii}),this.tagsIndex=new Os.Document({tokenize:h,rtl:a,document:{id:"id",index:["name"],store:!0},encoder:ii}),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(i=>{this.postsIndex.add(i)})}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(i=>{this.authorsIndex.add(i)})}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(i=>{this.tagsIndex.add(i)})}async init(){await this.#t(),await this.#s(),await this.#l()}#e(s){const i=[],l={};return s.forEach(a=>{a.result.forEach(h=>{l[h.id]||(i.push(h.doc),l[h.id]=!0)})}),i}search(s){const i=this.postsIndex.search(s,{enrich:!0}),l=this.authorsIndex.search(s,{enrich:!0}),a=this.tagsIndex.search(s,{enrich:!0});return{posts:this.#e(i),authors:this.#e(l),tags:this.#e(a)}}}var On={exports:{}};const Gd={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:"الوسوم"},Jd={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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Zd={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"},ep={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"},tp={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"},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:"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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},lp={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"},ap={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"},up={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"},cp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},fp={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"},hp={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"},dp={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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},yp={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"},vp={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"},wp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Sp={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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},$p={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:""},jp={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},Ap={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Tp={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:"ट्यागहरू"},Np={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"},Rp={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:"ਟੈਗ"},Lp={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"},bp={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:"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:"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"},Mp={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},zp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Dp={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"},Up={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"},Bp={Authors:"Autorët",Cancel:"Anulo","No matches found":"Nuk u gjet asnjë rezultat",Posts:"Postimet","Search posts, tags and authors":"Kërko postime, etiketa dhe autorë","Show more results":"Shfaq më shumë rezultate",Tags:"Etiketat"},Vp={Authors:"Аутори",Cancel:"Откажите","No matches found":"Нема резултата",Posts:"Објаве","Search posts, tags and authors":"Претражите објаве, tag-ове и ауторе","Show more results":"Прикажите више резултата",Tags:"Tag-ови"},Hp={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:"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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Qp={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:"Теги"},Yp={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:""},Zp={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ẻ và tác giả","Show more results":"Xem thêm kết quả",Tags:"Thẻ"},eg={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"},tg={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"};var hu;function du(){return hu||(hu={"/ghost/i18n/locales/af/search.json":function(){return Gd},"/ghost/i18n/locales/ar/search.json":function(){return Qd},"/ghost/i18n/locales/bg/search.json":function(){return Jd},"/ghost/i18n/locales/bn/search.json":function(){return Yd},"/ghost/i18n/locales/bs/search.json":function(){return Xd},"/ghost/i18n/locales/ca/search.json":function(){return Zd},"/ghost/i18n/locales/cs/search.json":function(){return ep},"/ghost/i18n/locales/da/search.json":function(){return tp},"/ghost/i18n/locales/de-CH/search.json":function(){return np},"/ghost/i18n/locales/de/search.json":function(){return rp},"/ghost/i18n/locales/el/search.json":function(){return sp},"/ghost/i18n/locales/en/search.json":function(){return op},"/ghost/i18n/locales/eo/search.json":function(){return ip},"/ghost/i18n/locales/es/search.json":function(){return lp},"/ghost/i18n/locales/et/search.json":function(){return ap},"/ghost/i18n/locales/eu/search.json":function(){return up},"/ghost/i18n/locales/fa/search.json":function(){return cp},"/ghost/i18n/locales/fi/search.json":function(){return fp},"/ghost/i18n/locales/fr/search.json":function(){return hp},"/ghost/i18n/locales/gd/search.json":function(){return dp},"/ghost/i18n/locales/he/search.json":function(){return pp},"/ghost/i18n/locales/hi/search.json":function(){return gp},"/ghost/i18n/locales/hr/search.json":function(){return mp},"/ghost/i18n/locales/hu/search.json":function(){return yp},"/ghost/i18n/locales/id/search.json":function(){return vp},"/ghost/i18n/locales/is/search.json":function(){return wp},"/ghost/i18n/locales/it/search.json":function(){return Sp},"/ghost/i18n/locales/ja/search.json":function(){return xp},"/ghost/i18n/locales/ko/search.json":function(){return Cp},"/ghost/i18n/locales/kz/search.json":function(){return kp},"/ghost/i18n/locales/lt/search.json":function(){return Pp},"/ghost/i18n/locales/lv/search.json":function(){return $p},"/ghost/i18n/locales/mk/search.json":function(){return Ep},"/ghost/i18n/locales/mn/search.json":function(){return jp},"/ghost/i18n/locales/ms/search.json":function(){return Ap},"/ghost/i18n/locales/nb/search.json":function(){return Tp},"/ghost/i18n/locales/ne/search.json":function(){return Op},"/ghost/i18n/locales/nl/search.json":function(){return Np},"/ghost/i18n/locales/nn/search.json":function(){return Rp},"/ghost/i18n/locales/pa/search.json":function(){return _p},"/ghost/i18n/locales/pl/search.json":function(){return Lp},"/ghost/i18n/locales/pt-BR/search.json":function(){return bp},"/ghost/i18n/locales/pt/search.json":function(){return Ip},"/ghost/i18n/locales/ro/search.json":function(){return Fp},"/ghost/i18n/locales/ru/search.json":function(){return Mp},"/ghost/i18n/locales/si/search.json":function(){return zp},"/ghost/i18n/locales/sk/search.json":function(){return Dp},"/ghost/i18n/locales/sl/search.json":function(){return Up},"/ghost/i18n/locales/sq/search.json":function(){return Bp},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return Vp},"/ghost/i18n/locales/sr/search.json":function(){return Hp},"/ghost/i18n/locales/sv/search.json":function(){return qp},"/ghost/i18n/locales/sw/search.json":function(){return Wp},"/ghost/i18n/locales/ta/search.json":function(){return Kp},"/ghost/i18n/locales/th/search.json":function(){return Gp},"/ghost/i18n/locales/tr/search.json":function(){return Qp},"/ghost/i18n/locales/uk/search.json":function(){return Jp},"/ghost/i18n/locales/ur/search.json":function(){return Yp},"/ghost/i18n/locales/uz/search.json":function(){return Xp},"/ghost/i18n/locales/vi/search.json":function(){return Zp},"/ghost/i18n/locales/zh-Hant/search.json":function(){return eg},"/ghost/i18n/locales/zh/search.json":function(){return tg}})}function Nn(r){function s(i){var l=pu(i,r);if(l!==null)return du()[l]();throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return s.resolve=function(i){var l=pu(i,r);return l!==null?l:require.resolve(i)},s}function pu(r,s){var i=ng(r);r=Ns(r);var l;r[0]==="/"&&(s="");for(var a=du(),h=["",".js",".json"];i?l=Ns(s+"/node_modules/"+r):l=Ns(s+"/"+r),!l.endsWith("/..");){for(var p=0;p<h.length;p++){var v=l+h[p];if(a[v])return v}if(!i)break;var g=Ns(s+"/..");if(g===s)break;s=g}return null}function ng(r){var s=r[0];if(s==="/"||s==="\\")return!1;var i=r[1],l=r[2];return!(s==="."&&(!i||i==="/"||i==="\\")||s==="."&&i==="."&&(!l||l==="/"||l==="\\")||i===":"&&(l==="/"||l==="\\"))}function Ns(r){r=r.replace(/\\/g,"/");for(var s=r.split("/"),i=s[0]==="",l=1;l<s.length;l++)(s[l]==="."||s[l]==="")&&s.splice(l--,1);for(var l=1;l<s.length;l++)s[l]===".."&&l>0&&s[l-1]!==".."&&s[l-1]!=="."&&(s.splice(--l,2),l--);return r=s.join("/"),i&&r[0]!=="/"?r="/"+r:r.length===0&&(r="."),r}var Xn={exports:{}},li,gu;function rg(){if(gu)return li;gu=1;const r=P=>typeof P=="string",s=()=>{let P,c;const d=new Promise((m,C)=>{P=m,c=C});return d.resolve=P,d.reject=c,d},i=P=>P==null?"":""+P,l=(P,c,d)=>{P.forEach(m=>{c[m]&&(d[m]=c[m])})},a=/###/g,h=P=>P&&P.indexOf("###")>-1?P.replace(a,"."):P,p=P=>!P||r(P),v=(P,c,d)=>{const m=r(c)?c.split("."):c;let C=0;for(;C<m.length-1;){if(p(P))return{};const E=h(m[C]);!P[E]&&d&&(P[E]=new d),Object.prototype.hasOwnProperty.call(P,E)?P=P[E]:P={},++C}return p(P)?{}:{obj:P,k:h(m[C])}},g=(P,c,d)=>{const{obj:m,k:C}=v(P,c,Object);if(m!==void 0||c.length===1){m[C]=d;return}let E=c[c.length-1],L=c.slice(0,c.length-1),D=v(P,L,Object);for(;D.obj===void 0&&L.length;)E=`${L[L.length-1]}.${E}`,L=L.slice(0,L.length-1),D=v(P,L,Object),D&&D.obj&&typeof D.obj[`${D.k}.${E}`]<"u"&&(D.obj=void 0);D.obj[`${D.k}.${E}`]=d},w=(P,c,d,m)=>{const{obj:C,k:E}=v(P,c,Object);C[E]=C[E]||[],C[E].push(d)},k=(P,c)=>{const{obj:d,k:m}=v(P,c);if(d)return d[m]},$=(P,c,d)=>{const m=k(P,d);return m!==void 0?m:k(c,d)},j=(P,c,d)=>{for(const m in c)m!=="__proto__"&&m!=="constructor"&&(m in P?r(P[m])||P[m]instanceof String||r(c[m])||c[m]instanceof String?d&&(P[m]=c[m]):j(P[m],c[m],d):P[m]=c[m]);return P},A=P=>P.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const _=P=>r(P)?P.replace(/[&<>"'\/]/g,c=>z[c]):P;class R{constructor(c){this.capacity=c,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(c){const d=this.regExpMap.get(c);if(d!==void 0)return d;const m=new RegExp(c);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(c,m),this.regExpQueue.push(c),m}}const q=[" ",",","?","!",";"],Q=new R(20),ue=(P,c,d)=>{c=c||"",d=d||"";const m=q.filter(L=>c.indexOf(L)<0&&d.indexOf(L)<0);if(m.length===0)return!0;const C=Q.getRegExp(`(${m.map(L=>L==="?"?"\\?":L).join("|")})`);let E=!C.test(P);if(!E){const L=P.indexOf(d);L>0&&!C.test(P.substring(0,L))&&(E=!0)}return E},pe=function(P,c){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!P)return;if(P[c])return P[c];const m=c.split(d);let C=P;for(let E=0;E<m.length;){if(!C||typeof C!="object")return;let L,D="";for(let B=E;B<m.length;++B)if(B!==E&&(D+=d),D+=m[B],L=C[D],L!==void 0){if(["string","number","boolean"].indexOf(typeof L)>-1&&B<m.length-1)continue;E+=B-E+1;break}C=L}return C},ce=P=>P&&P.replace("_","-"),ae={type:"logger",log(P){this.output("log",P)},warn(P){this.output("warn",P)},error(P){this.output("error",P)},output(P,c){console&&console[P]&&console[P].apply(console,c)}};class ne{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(c,d)}init(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=d.prefix||"i18next:",this.logger=c||ae,this.options=d,this.debug=d.debug}log(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"log","",!0)}warn(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"warn","",!0)}error(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"error","")}deprecate(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"warn","WARNING DEPRECATED: ",!0)}forward(c,d,m,C){return C&&!this.debug?null:(r(c[0])&&(c[0]=`${m}${this.prefix} ${c[0]}`),this.logger[d](c))}create(c){return new ne(this.logger,{prefix:`${this.prefix}:${c}:`,...this.options})}clone(c){return c=c||this.options,c.prefix=c.prefix||this.prefix,new ne(this.logger,c)}}var re=new ne;class fe{constructor(){this.observers={}}on(c,d){return c.split(" ").forEach(m=>{this.observers[m]||(this.observers[m]=new Map);const C=this.observers[m].get(d)||0;this.observers[m].set(d,C+1)}),this}off(c,d){if(this.observers[c]){if(!d){delete this.observers[c];return}this.observers[c].delete(d)}}emit(c){for(var d=arguments.length,m=new Array(d>1?d-1:0),C=1;C<d;C++)m[C-1]=arguments[C];this.observers[c]&&Array.from(this.observers[c].entries()).forEach(L=>{let[D,B]=L;for(let Z=0;Z<B;Z++)D(...m)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(L=>{let[D,B]=L;for(let Z=0;Z<B;Z++)D.apply(D,[c,...m])})}}class b extends fe{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=c||{},this.options=d,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(c){this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}removeNamespaces(c){const d=this.options.ns.indexOf(c);d>-1&&this.options.ns.splice(d,1)}getResource(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=C.keySeparator!==void 0?C.keySeparator:this.options.keySeparator,L=C.ignoreJSONStructure!==void 0?C.ignoreJSONStructure:this.options.ignoreJSONStructure;let D;c.indexOf(".")>-1?D=c.split("."):(D=[c,d],m&&(Array.isArray(m)?D.push(...m):r(m)&&E?D.push(...m.split(E)):D.push(m)));const B=k(this.data,D);return!B&&!d&&!m&&c.indexOf(".")>-1&&(c=D[0],d=D[1],m=D.slice(2).join(".")),B||!L||!r(m)?B:pe(this.data&&this.data[c]&&this.data[c][d],m,E)}addResource(c,d,m,C){let E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const L=E.keySeparator!==void 0?E.keySeparator:this.options.keySeparator;let D=[c,d];m&&(D=D.concat(L?m.split(L):m)),c.indexOf(".")>-1&&(D=c.split("."),C=d,d=D[1]),this.addNamespaces(d),g(this.data,D,C),E.silent||this.emit("added",c,d,m,C)}addResources(c,d,m){let C=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(c,d,E,m[E],{silent:!0});C.silent||this.emit("added",c,d,m)}addResourceBundle(c,d,m,C,E){let L=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},D=[c,d];c.indexOf(".")>-1&&(D=c.split("."),C=m,m=d,d=D[1]),this.addNamespaces(d);let B=k(this.data,D)||{};L.skipCopy||(m=JSON.parse(JSON.stringify(m))),C?j(B,m,E):B={...B,...m},g(this.data,D,B),L.silent||this.emit("added",c,d,m)}removeResourceBundle(c,d){this.hasResourceBundle(c,d)&&delete this.data[c][d],this.removeNamespaces(d),this.emit("removed",c,d)}hasResourceBundle(c,d){return this.getResource(c,d)!==void 0}getResourceBundle(c,d){return d||(d=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(c,d)}:this.getResource(c,d)}getDataByLanguage(c){return this.data[c]}hasLanguageSomeTranslations(c){const d=this.getDataByLanguage(c);return!!(d&&Object.keys(d)||[]).find(C=>d[C]&&Object.keys(d[C]).length>0)}toJSON(){return this.data}}var M={processors:{},addPostProcessor(P){this.processors[P.name]=P},handle(P,c,d,m,C){return P.forEach(E=>{this.processors[E]&&(c=this.processors[E].process(c,d,m,C))}),c}};const K={};class se extends fe{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),l(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],c,this),this.options=d,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=re.create("translator")}changeLanguage(c){c&&(this.language=c)}exists(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(c==null)return!1;const m=this.resolve(c,d);return m&&m.res!==void 0}extractFromKey(c,d){let m=d.nsSeparator!==void 0?d.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const C=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let E=d.ns||this.options.defaultNS||[];const L=m&&c.indexOf(m)>-1,D=!this.options.userDefinedKeySeparator&&!d.keySeparator&&!this.options.userDefinedNsSeparator&&!d.nsSeparator&&!ue(c,m,C);if(L&&!D){const B=c.match(this.interpolator.nestingRegexp);if(B&&B.length>0)return{key:c,namespaces:r(E)?[E]:E};const Z=c.split(m);(m!==C||m===C&&this.options.ns.indexOf(Z[0])>-1)&&(E=Z.shift()),c=Z.join(C)}return{key:c,namespaces:r(E)?[E]:E}}translate(c,d,m){if(typeof d!="object"&&this.options.overloadTranslationOptionHandler&&(d=this.options.overloadTranslationOptionHandler(arguments)),typeof d=="object"&&(d={...d}),d||(d={}),c==null)return"";Array.isArray(c)||(c=[String(c)]);const C=d.returnDetails!==void 0?d.returnDetails:this.options.returnDetails,E=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator,{key:L,namespaces:D}=this.extractFromKey(c[c.length-1],d),B=D[D.length-1],Z=d.lng||this.language,oe=d.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(Z&&Z.toLowerCase()==="cimode"){if(oe){const Ue=d.nsSeparator||this.options.nsSeparator;return C?{res:`${B}${Ue}${L}`,usedKey:L,exactUsedKey:L,usedLng:Z,usedNS:B,usedParams:this.getUsedParamsDetails(d)}:`${B}${Ue}${L}`}return C?{res:L,usedKey:L,exactUsedKey:L,usedLng:Z,usedNS:B,usedParams:this.getUsedParamsDetails(d)}:L}const me=this.resolve(c,d);let Y=me&&me.res;const Ce=me&&me.usedKey||L,Le=me&&me.exactUsedKey||L,Ke=Object.prototype.toString.apply(Y),ze=["[object Number]","[object Function]","[object RegExp]"],tt=d.joinArrays!==void 0?d.joinArrays:this.options.joinArrays,nt=!this.i18nFormat||this.i18nFormat.handleAsObject,bt=!r(Y)&&typeof Y!="boolean"&&typeof Y!="number";if(nt&&Y&&bt&&ze.indexOf(Ke)<0&&!(r(tt)&&Array.isArray(Y))){if(!d.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(Ce,Y,{...d,ns:D}):`key '${L} (${this.language})' returned an object instead of string.`;return C?(me.res=Ue,me.usedParams=this.getUsedParamsDetails(d),me):Ue}if(E){const Ue=Array.isArray(Y),gt=Ue?[]:{},vt=Ue?Le:Ce;for(const rt in Y)if(Object.prototype.hasOwnProperty.call(Y,rt)){const er=`${vt}${E}${rt}`;gt[rt]=this.translate(er,{...d,joinArrays:!1,ns:D}),gt[rt]===er&&(gt[rt]=Y[rt])}Y=gt}}else if(nt&&r(tt)&&Array.isArray(Y))Y=Y.join(tt),Y&&(Y=this.extendTranslation(Y,c,d,m));else{let Ue=!1,gt=!1;const vt=d.count!==void 0&&!r(d.count),rt=se.hasDefaultValue(d),er=vt?this.pluralResolver.getSuffix(Z,d.count,d):"",Nr=d.ordinal&&vt?this.pluralResolver.getSuffix(Z,d.count,{ordinal:!1}):"",tr=vt&&!d.ordinal&&d.count===0&&this.pluralResolver.shouldUseIntlApi(),Kt=tr&&d[`defaultValue${this.options.pluralSeparator}zero`]||d[`defaultValue${er}`]||d[`defaultValue${Nr}`]||d.defaultValue;!this.isValidLookup(Y)&&rt&&(Ue=!0,Y=Kt),this.isValidLookup(Y)||(gt=!0,Y=L);const sn=(d.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&gt?void 0:Y,Et=rt&&Kt!==Y&&this.options.updateMissing;if(gt||Ue||Et){if(this.logger.log(Et?"updateKey":"missingKey",Z,B,L,Et?Kt:Y),E){const it=this.resolve(L,{...d,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 on=[];const Rn=this.languageUtils.getFallbackCodes(this.options.fallbackLng,d.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Rn&&Rn[0])for(let it=0;it<Rn.length;it++)on.push(Rn[it]);else this.options.saveMissingTo==="all"?on=this.languageUtils.toResolveHierarchy(d.lng||this.language):on.push(d.lng||this.language);const Rr=(it,zt,Gt)=>{const _r=rt&&Gt!==Y?Gt:sn;this.options.missingKeyHandler?this.options.missingKeyHandler(it,B,zt,_r,Et,d):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(it,B,zt,_r,Et,d),this.emit("missingKey",it,B,zt,Y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&vt?on.forEach(it=>{const zt=this.pluralResolver.getSuffixes(it,d);tr&&d[`defaultValue${this.options.pluralSeparator}zero`]&&zt.indexOf(`${this.options.pluralSeparator}zero`)<0&&zt.push(`${this.options.pluralSeparator}zero`),zt.forEach(Gt=>{Rr([it],L+Gt,d[`defaultValue${Gt}`]||Kt)})}):Rr(on,L,Kt))}Y=this.extendTranslation(Y,c,d,me,m),gt&&Y===L&&this.options.appendNamespaceToMissingKey&&(Y=`${B}:${L}`),(gt||Ue)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?Y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${B}:${L}`:L,Ue?Y:void 0):Y=this.options.parseMissingKeyHandler(Y))}return C?(me.res=Y,me.usedParams=this.getUsedParamsDetails(d),me):Y}extendTranslation(c,d,m,C,E){var L=this;if(this.i18nFormat&&this.i18nFormat.parse)c=this.i18nFormat.parse(c,{...this.options.interpolation.defaultVariables,...m},m.lng||this.language||C.usedLng,C.usedNS,C.usedKey,{resolved:C});else if(!m.skipInterpolation){m.interpolation&&this.interpolator.init({...m,interpolation:{...this.options.interpolation,...m.interpolation}});const Z=r(c)&&(m&&m.interpolation&&m.interpolation.skipOnVariables!==void 0?m.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let oe;if(Z){const Y=c.match(this.interpolator.nestingRegexp);oe=Y&&Y.length}let me=m.replace&&!r(m.replace)?m.replace:m;if(this.options.interpolation.defaultVariables&&(me={...this.options.interpolation.defaultVariables,...me}),c=this.interpolator.interpolate(c,me,m.lng||this.language||C.usedLng,m),Z){const Y=c.match(this.interpolator.nestingRegexp),Ce=Y&&Y.length;oe<Ce&&(m.nest=!1)}!m.lng&&this.options.compatibilityAPI!=="v1"&&C&&C.res&&(m.lng=this.language||C.usedLng),m.nest!==!1&&(c=this.interpolator.nest(c,function(){for(var Y=arguments.length,Ce=new Array(Y),Le=0;Le<Y;Le++)Ce[Le]=arguments[Le];return E&&E[0]===Ce[0]&&!m.context?(L.logger.warn(`It seems you are nesting recursively key: ${Ce[0]} in key: ${d[0]}`),null):L.translate(...Ce,d)},m)),m.interpolation&&this.interpolator.reset()}const D=m.postProcess||this.options.postProcess,B=r(D)?[D]:D;return c!=null&&B&&B.length&&m.applyPostProcessor!==!1&&(c=M.handle(B,c,d,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...C,usedParams:this.getUsedParamsDetails(m)},...m}:m,this)),c}resolve(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m,C,E,L,D;return r(c)&&(c=[c]),c.forEach(B=>{if(this.isValidLookup(m))return;const Z=this.extractFromKey(B,d),oe=Z.key;C=oe;let me=Z.namespaces;this.options.fallbackNS&&(me=me.concat(this.options.fallbackNS));const Y=d.count!==void 0&&!r(d.count),Ce=Y&&!d.ordinal&&d.count===0&&this.pluralResolver.shouldUseIntlApi(),Le=d.context!==void 0&&(r(d.context)||typeof d.context=="number")&&d.context!=="",Ke=d.lngs?d.lngs:this.languageUtils.toResolveHierarchy(d.lng||this.language,d.fallbackLng);me.forEach(ze=>{this.isValidLookup(m)||(D=ze,!K[`${Ke[0]}-${ze}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(D)&&(K[`${Ke[0]}-${ze}`]=!0,this.logger.warn(`key "${C}" for languages "${Ke.join(", ")}" won't get resolved as namespace "${D}" 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;L=tt;const nt=[oe];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(nt,oe,tt,ze,d);else{let Ue;Y&&(Ue=this.pluralResolver.getSuffix(tt,d.count,d));const gt=`${this.options.pluralSeparator}zero`,vt=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(Y&&(nt.push(oe+Ue),d.ordinal&&Ue.indexOf(vt)===0&&nt.push(oe+Ue.replace(vt,this.options.pluralSeparator)),Ce&&nt.push(oe+gt)),Le){const rt=`${oe}${this.options.contextSeparator}${d.context}`;nt.push(rt),Y&&(nt.push(rt+Ue),d.ordinal&&Ue.indexOf(vt)===0&&nt.push(rt+Ue.replace(vt,this.options.pluralSeparator)),Ce&&nt.push(rt+gt))}}let bt;for(;bt=nt.pop();)this.isValidLookup(m)||(E=bt,m=this.getResource(tt,ze,bt,d))}))})}),{res:m,usedKey:C,exactUsedKey:E,usedLng:L,usedNS:D}}isValidLookup(c){return c!==void 0&&!(!this.options.returnNull&&c===null)&&!(!this.options.returnEmptyString&&c==="")}getResource(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(c,d,m,C):this.resourceStore.getResource(c,d,m,C)}getUsedParamsDetails(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const d=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],m=c.replace&&!r(c.replace);let C=m?c.replace:c;if(m&&typeof c.count<"u"&&(C.count=c.count),this.options.interpolation.defaultVariables&&(C={...this.options.interpolation.defaultVariables,...C}),!m){C={...C};for(const E of d)delete C[E]}return C}static hasDefaultValue(c){const d="defaultValue";for(const m in c)if(Object.prototype.hasOwnProperty.call(c,m)&&d===m.substring(0,d.length)&&c[m]!==void 0)return!0;return!1}}const he=P=>P.charAt(0).toUpperCase()+P.slice(1);class Se{constructor(c){this.options=c,this.supportedLngs=this.options.supportedLngs||!1,this.logger=re.create("languageUtils")}getScriptPartFromCode(c){if(c=ce(c),!c||c.indexOf("-")<0)return null;const d=c.split("-");return d.length===2||(d.pop(),d[d.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(d.join("-"))}getLanguagePartFromCode(c){if(c=ce(c),!c||c.indexOf("-")<0)return c;const d=c.split("-");return this.formatLanguageCode(d[0])}formatLanguageCode(c){if(r(c)&&c.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let C=Intl.getCanonicalLocales(c)[0];if(C&&this.options.lowerCaseLng&&(C=C.toLowerCase()),C)return C}catch{}const d=["hans","hant","latn","cyrl","cans","mong","arab"];let m=c.split("-");return this.options.lowerCaseLng?m=m.map(C=>C.toLowerCase()):m.length===2?(m[0]=m[0].toLowerCase(),m[1]=m[1].toUpperCase(),d.indexOf(m[1].toLowerCase())>-1&&(m[1]=he(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()),d.indexOf(m[1].toLowerCase())>-1&&(m[1]=he(m[1].toLowerCase())),d.indexOf(m[2].toLowerCase())>-1&&(m[2]=he(m[2].toLowerCase()))),m.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?c.toLowerCase():c}isSupportedCode(c){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(c=this.getLanguagePartFromCode(c)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(c)>-1}getBestMatchFromCodes(c){if(!c)return null;let d;return c.forEach(m=>{if(d)return;const C=this.formatLanguageCode(m);(!this.options.supportedLngs||this.isSupportedCode(C))&&(d=C)}),!d&&this.options.supportedLngs&&c.forEach(m=>{if(d)return;const C=this.getLanguagePartFromCode(m);if(this.isSupportedCode(C))return d=C;d=this.options.supportedLngs.find(E=>{if(E===C)return E;if(!(E.indexOf("-")<0&&C.indexOf("-")<0)&&(E.indexOf("-")>0&&C.indexOf("-")<0&&E.substring(0,E.indexOf("-"))===C||E.indexOf(C)===0&&C.length>1))return E})}),d||(d=this.getFallbackCodes(this.options.fallbackLng)[0]),d}getFallbackCodes(c,d){if(!c)return[];if(typeof c=="function"&&(c=c(d)),r(c)&&(c=[c]),Array.isArray(c))return c;if(!d)return c.default||[];let m=c[d];return m||(m=c[this.getScriptPartFromCode(d)]),m||(m=c[this.formatLanguageCode(d)]),m||(m=c[this.getLanguagePartFromCode(d)]),m||(m=c.default),m||[]}toResolveHierarchy(c,d){const m=this.getFallbackCodes(d||this.options.fallbackLng||[],c),C=[],E=L=>{L&&(this.isSupportedCode(L)?C.push(L):this.logger.warn(`rejecting language code not found in supportedLngs: ${L}`))};return r(c)&&(c.indexOf("-")>-1||c.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&E(this.formatLanguageCode(c)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&E(this.getScriptPartFromCode(c)),this.options.load!=="currentOnly"&&E(this.getLanguagePartFromCode(c))):r(c)&&E(this.formatLanguageCode(c)),m.forEach(L=>{C.indexOf(L)<0&&E(this.formatLanguageCode(L))}),C}}let Te=[{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}],S={1:P=>+(P>1),2:P=>+(P!=1),3:P=>0,4:P=>P%10==1&&P%100!=11?0:P%10>=2&&P%10<=4&&(P%100<10||P%100>=20)?1:2,5:P=>P==0?0:P==1?1:P==2?2:P%100>=3&&P%100<=10?3:P%100>=11?4:5,6:P=>P==1?0:P>=2&&P<=4?1:2,7:P=>P==1?0:P%10>=2&&P%10<=4&&(P%100<10||P%100>=20)?1:2,8:P=>P==1?0:P==2?1:P!=8&&P!=11?2:3,9:P=>+(P>=2),10:P=>P==1?0:P==2?1:P<7?2:P<11?3:4,11:P=>P==1||P==11?0:P==2||P==12?1:P>2&&P<20?2:3,12:P=>+(P%10!=1||P%100==11),13:P=>+(P!==0),14:P=>P==1?0:P==2?1:P==3?2:3,15:P=>P%10==1&&P%100!=11?0:P%10>=2&&(P%100<10||P%100>=20)?1:2,16:P=>P%10==1&&P%100!=11?0:P!==0?1:2,17:P=>P==1||P%10==1&&P%100!=11?0:1,18:P=>P==0?0:P==1?1:2,19:P=>P==1?0:P==0||P%100>1&&P%100<11?1:P%100>10&&P%100<20?2:3,20:P=>P==1?0:P==0||P%100>0&&P%100<20?1:2,21:P=>P%100==1?1:P%100==2?2:P%100==3||P%100==4?3:0,22:P=>P==1?0:P==2?1:(P<0||P>10)&&P%10==0?2:3};const O=["v1","v2","v3"],W=["v4"],ge={zero:0,one:1,two:2,few:3,many:4,other:5},V=()=>{const P={};return Te.forEach(c=>{c.lngs.forEach(d=>{P[d]={numbers:c.nr,plurals:S[c.fc]}})}),P};class ee{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=c,this.options=d,this.logger=re.create("pluralResolver"),(!this.options.compatibilityJSON||W.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=V(),this.pluralRulesCache={}}addRule(c,d){this.rules[c]=d}clearCache(){this.pluralRulesCache={}}getRule(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const m=ce(c==="dev"?"en":c),C=d.ordinal?"ordinal":"cardinal",E=JSON.stringify({cleanedCode:m,type:C});if(E in this.pluralRulesCache)return this.pluralRulesCache[E];let L;try{L=new Intl.PluralRules(m,{type:C})}catch{if(!c.match(/-|_/))return;const B=this.languageUtils.getLanguagePartFromCode(c);L=this.getRule(B,d)}return this.pluralRulesCache[E]=L,L}return this.rules[c]||this.rules[this.languageUtils.getLanguagePartFromCode(c)]}needsPlural(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(c,d);return this.shouldUseIntlApi()?m&&m.resolvedOptions().pluralCategories.length>1:m&&m.numbers.length>1}getPluralFormsOfKey(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(c,m).map(C=>`${d}${C}`)}getSuffixes(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(c,d);return m?this.shouldUseIntlApi()?m.resolvedOptions().pluralCategories.sort((C,E)=>ge[C]-ge[E]).map(C=>`${this.options.prepend}${d.ordinal?`ordinal${this.options.prepend}`:""}${C}`):m.numbers.map(C=>this.getSuffix(c,C,d)):[]}getSuffix(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const C=this.getRule(c,m);return C?this.shouldUseIntlApi()?`${this.options.prepend}${m.ordinal?`ordinal${this.options.prepend}`:""}${C.select(d)}`:this.getSuffixRetroCompatible(C,d):(this.logger.warn(`no plural rule found for: ${c}`),"")}getSuffixRetroCompatible(c,d){const m=c.noAbs?c.plurals(d):c.plurals(Math.abs(d));let C=c.numbers[m];this.options.simplifyPluralSuffix&&c.numbers.length===2&&c.numbers[0]===1&&(C===2?C="plural":C===1&&(C=""));const E=()=>this.options.prepend&&C.toString()?this.options.prepend+C.toString():C.toString();return this.options.compatibilityJSON==="v1"?C===1?"":typeof C=="number"?`_plural_${C.toString()}`:E():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&c.numbers.length===2&&c.numbers[0]===1?E():this.options.prepend&&m.toString()?this.options.prepend+m.toString():m.toString()}shouldUseIntlApi(){return!O.includes(this.options.compatibilityJSON)}}const G=function(P,c,d){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,E=$(P,c,d);return!E&&C&&r(d)&&(E=pe(P,d,m),E===void 0&&(E=pe(c,d,m))),E},H=P=>P.replace(/\$/g,"$$$$");class ie{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=re.create("interpolator"),this.options=c,this.format=c.interpolation&&c.interpolation.format||(d=>d),this.init(c)}init(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.interpolation||(c.interpolation={escapeValue:!0});const{escape:d,escapeValue:m,useRawValueToEscape:C,prefix:E,prefixEscaped:L,suffix:D,suffixEscaped:B,formatSeparator:Z,unescapeSuffix:oe,unescapePrefix:me,nestingPrefix:Y,nestingPrefixEscaped:Ce,nestingSuffix:Le,nestingSuffixEscaped:Ke,nestingOptionsSeparator:ze,maxReplaces:tt,alwaysFormat:nt}=c.interpolation;this.escape=d!==void 0?d:_,this.escapeValue=m!==void 0?m:!0,this.useRawValueToEscape=C!==void 0?C:!1,this.prefix=E?A(E):L||"{{",this.suffix=D?A(D):B||"}}",this.formatSeparator=Z||",",this.unescapePrefix=oe?"":me||"-",this.unescapeSuffix=this.unescapePrefix?"":oe||"",this.nestingPrefix=Y?A(Y):Ce||A("$t("),this.nestingSuffix=Le?A(Le):Ke||A(")"),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 c=(d,m)=>d&&d.source===m?(d.lastIndex=0,d):new RegExp(m,"g");this.regexp=c(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=c(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=c(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(c,d,m,C){let E,L,D;const B=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},Z=Ce=>{if(Ce.indexOf(this.formatSeparator)<0){const tt=G(d,B,Ce,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(tt,void 0,m,{...C,...d,interpolationkey:Ce}):tt}const Le=Ce.split(this.formatSeparator),Ke=Le.shift().trim(),ze=Le.join(this.formatSeparator).trim();return this.format(G(d,B,Ke,this.options.keySeparator,this.options.ignoreJSONStructure),ze,m,{...C,...d,interpolationkey:Ke})};this.resetRegExp();const oe=C&&C.missingInterpolationHandler||this.options.missingInterpolationHandler,me=C&&C.interpolation&&C.interpolation.skipOnVariables!==void 0?C.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:Ce=>H(Ce)},{regex:this.regexp,safeValue:Ce=>this.escapeValue?H(this.escape(Ce)):H(Ce)}].forEach(Ce=>{for(D=0;E=Ce.regex.exec(c);){const Le=E[1].trim();if(L=Z(Le),L===void 0)if(typeof oe=="function"){const ze=oe(c,E,C);L=r(ze)?ze:""}else if(C&&Object.prototype.hasOwnProperty.call(C,Le))L="";else if(me){L=E[0];continue}else this.logger.warn(`missed to pass in variable ${Le} for interpolating ${c}`),L="";else!r(L)&&!this.useRawValueToEscape&&(L=i(L));const Ke=Ce.safeValue(L);if(c=c.replace(E[0],Ke),me?(Ce.regex.lastIndex+=L.length,Ce.regex.lastIndex-=E[0].length):Ce.regex.lastIndex=0,D++,D>=this.maxReplaces)break}}),c}nest(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C,E,L;const D=(B,Z)=>{const oe=this.nestingOptionsSeparator;if(B.indexOf(oe)<0)return B;const me=B.split(new RegExp(`${oe}[ ]*{`));let Y=`{${me[1]}`;B=me[0],Y=this.interpolate(Y,L);const Ce=Y.match(/'/g),Le=Y.match(/"/g);(Ce&&Ce.length%2===0&&!Le||Le.length%2!==0)&&(Y=Y.replace(/'/g,'"'));try{L=JSON.parse(Y),Z&&(L={...Z,...L})}catch(Ke){return this.logger.warn(`failed parsing options string in nesting for key ${B}`,Ke),`${B}${oe}${Y}`}return L.defaultValue&&L.defaultValue.indexOf(this.prefix)>-1&&delete L.defaultValue,B};for(;C=this.nestingRegexp.exec(c);){let B=[];L={...m},L=L.replace&&!r(L.replace)?L.replace:L,L.applyPostProcessor=!1,delete L.defaultValue;let Z=!1;if(C[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(C[1])){const oe=C[1].split(this.formatSeparator).map(me=>me.trim());C[1]=oe.shift(),B=oe,Z=!0}if(E=d(D.call(this,C[1].trim(),L),L),E&&C[0]===c&&!r(E))return E;r(E)||(E=i(E)),E||(this.logger.warn(`missed to resolve ${C[1]} for nesting ${c}`),E=""),Z&&(E=B.reduce((oe,me)=>this.format(oe,me,m.lng,{...m,interpolationkey:C[1].trim()}),E.trim())),c=c.replace(C[0],E),this.regexp.lastIndex=0}return c}}const Ne=P=>{let c=P.toLowerCase().trim();const d={};if(P.indexOf("(")>-1){const m=P.split("(");c=m[0].toLowerCase().trim();const C=m[1].substring(0,m[1].length-1);c==="currency"&&C.indexOf(":")<0?d.currency||(d.currency=C.trim()):c==="relativetime"&&C.indexOf(":")<0?d.range||(d.range=C.trim()):C.split(";").forEach(L=>{if(L){const[D,...B]=L.split(":"),Z=B.join(":").trim().replace(/^'+|'+$/g,""),oe=D.trim();d[oe]||(d[oe]=Z),Z==="false"&&(d[oe]=!1),Z==="true"&&(d[oe]=!0),isNaN(Z)||(d[oe]=parseInt(Z,10))}})}return{formatName:c,formatOptions:d}},De=P=>{const c={};return(d,m,C)=>{let E=C;C&&C.interpolationkey&&C.formatParams&&C.formatParams[C.interpolationkey]&&C[C.interpolationkey]&&(E={...E,[C.interpolationkey]:void 0});const L=m+JSON.stringify(E);let D=c[L];return D||(D=P(ce(m),C),c[L]=D),D(d)}};class pt{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=re.create("formatter"),this.options=c,this.formats={number:De((d,m)=>{const C=new Intl.NumberFormat(d,{...m});return E=>C.format(E)}),currency:De((d,m)=>{const C=new Intl.NumberFormat(d,{...m,style:"currency"});return E=>C.format(E)}),datetime:De((d,m)=>{const C=new Intl.DateTimeFormat(d,{...m});return E=>C.format(E)}),relativetime:De((d,m)=>{const C=new Intl.RelativeTimeFormat(d,{...m});return E=>C.format(E,m.range||"day")}),list:De((d,m)=>{const C=new Intl.ListFormat(d,{...m});return E=>C.format(E)})},this.init(c)}init(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=d.interpolation.formatSeparator||","}add(c,d){this.formats[c.toLowerCase().trim()]=d}addCached(c,d){this.formats[c.toLowerCase().trim()]=De(d)}format(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=d.split(this.formatSeparator);if(E.length>1&&E[0].indexOf("(")>1&&E[0].indexOf(")")<0&&E.find(D=>D.indexOf(")")>-1)){const D=E.findIndex(B=>B.indexOf(")")>-1);E[0]=[E[0],...E.splice(1,D)].join(this.formatSeparator)}return E.reduce((D,B)=>{const{formatName:Z,formatOptions:oe}=Ne(B);if(this.formats[Z]){let me=D;try{const Y=C&&C.formatParams&&C.formatParams[C.interpolationkey]||{},Ce=Y.locale||Y.lng||C.locale||C.lng||m;me=this.formats[Z](D,Ce,{...oe,...C,...Y})}catch(Y){this.logger.warn(Y)}return me}else this.logger.warn(`there was no format function for ${Z}`);return D},c)}}const Fe=(P,c)=>{P.pending[c]!==void 0&&(delete P.pending[c],P.pendingCount--)};class Me extends fe{constructor(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=c,this.store=d,this.services=m,this.languageUtils=m.languageUtils,this.options=C,this.logger=re.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=C.maxParallelReads||10,this.readingCalls=0,this.maxRetries=C.maxRetries>=0?C.maxRetries:5,this.retryTimeout=C.retryTimeout>=1?C.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(m,C.backend,C)}queueLoad(c,d,m,C){const E={},L={},D={},B={};return c.forEach(Z=>{let oe=!0;d.forEach(me=>{const Y=`${Z}|${me}`;!m.reload&&this.store.hasResourceBundle(Z,me)?this.state[Y]=2:this.state[Y]<0||(this.state[Y]===1?L[Y]===void 0&&(L[Y]=!0):(this.state[Y]=1,oe=!1,L[Y]===void 0&&(L[Y]=!0),E[Y]===void 0&&(E[Y]=!0),B[me]===void 0&&(B[me]=!0)))}),oe||(D[Z]=!0)}),(Object.keys(E).length||Object.keys(L).length)&&this.queue.push({pending:L,pendingCount:Object.keys(L).length,loaded:{},errors:[],callback:C}),{toLoad:Object.keys(E),pending:Object.keys(L),toLoadLanguages:Object.keys(D),toLoadNamespaces:Object.keys(B)}}loaded(c,d,m){const C=c.split("|"),E=C[0],L=C[1];d&&this.emit("failedLoading",E,L,d),!d&&m&&this.store.addResourceBundle(E,L,m,void 0,void 0,{skipCopy:!0}),this.state[c]=d?-1:2,d&&m&&(this.state[c]=0);const D={};this.queue.forEach(B=>{w(B.loaded,[E],L),Fe(B,c),d&&B.errors.push(d),B.pendingCount===0&&!B.done&&(Object.keys(B.loaded).forEach(Z=>{D[Z]||(D[Z]={});const oe=B.loaded[Z];oe.length&&oe.forEach(me=>{D[Z][me]===void 0&&(D[Z][me]=!0)})}),B.done=!0,B.errors.length?B.callback(B.errors):B.callback())}),this.emit("loaded",D),this.queue=this.queue.filter(B=>!B.done)}read(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,L=arguments.length>5?arguments[5]:void 0;if(!c.length)return L(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:c,ns:d,fcName:m,tried:C,wait:E,callback:L});return}this.readingCalls++;const D=(Z,oe)=>{if(this.readingCalls--,this.waitingReads.length>0){const me=this.waitingReads.shift();this.read(me.lng,me.ns,me.fcName,me.tried,me.wait,me.callback)}if(Z&&oe&&C<this.maxRetries){setTimeout(()=>{this.read.call(this,c,d,m,C+1,E*2,L)},E);return}L(Z,oe)},B=this.backend[m].bind(this.backend);if(B.length===2){try{const Z=B(c,d);Z&&typeof Z.then=="function"?Z.then(oe=>D(null,oe)).catch(D):D(null,Z)}catch(Z){D(Z)}return}return B(c,d,D)}prepareLoading(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=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."),C&&C();r(c)&&(c=this.languageUtils.toResolveHierarchy(c)),r(d)&&(d=[d]);const E=this.queueLoad(c,d,m,C);if(!E.toLoad.length)return E.pending.length||C(),null;E.toLoad.forEach(L=>{this.loadOne(L)})}load(c,d,m){this.prepareLoading(c,d,{},m)}reload(c,d,m){this.prepareLoading(c,d,{reload:!0},m)}loadOne(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const m=c.split("|"),C=m[0],E=m[1];this.read(C,E,"read",void 0,void 0,(L,D)=>{L&&this.logger.warn(`${d}loading namespace ${E} for language ${C} failed`,L),!L&&D&&this.logger.log(`${d}loaded namespace ${E} for language ${C}`,D),this.loaded(c,L,D)})}saveMissing(c,d,m,C,E){let L=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},D=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(d)){this.logger.warn(`did not save key "${m}" as the namespace "${d}" 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 B={...L,isUpdate:E},Z=this.backend.create.bind(this.backend);if(Z.length<6)try{let oe;Z.length===5?oe=Z(c,d,m,C,B):oe=Z(c,d,m,C),oe&&typeof oe.then=="function"?oe.then(me=>D(null,me)).catch(D):D(null,oe)}catch(oe){D(oe)}else Z(c,d,m,C,D,B)}!c||!c[0]||this.store.addResource(c[0],d,m,C)}}}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:P=>{let c={};if(typeof P[1]=="object"&&(c=P[1]),r(P[1])&&(c.defaultValue=P[1]),r(P[2])&&(c.tDescription=P[2]),typeof P[2]=="object"||typeof P[3]=="object"){const d=P[3]||P[2];Object.keys(d).forEach(m=>{c[m]=d[m]})}return c},interpolation:{escapeValue:!0,format:P=>P,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ie=P=>(r(P.ns)&&(P.ns=[P.ns]),r(P.fallbackLng)&&(P.fallbackLng=[P.fallbackLng]),r(P.fallbackNS)&&(P.fallbackNS=[P.fallbackNS]),P.supportedLngs&&P.supportedLngs.indexOf("cimode")<0&&(P.supportedLngs=P.supportedLngs.concat(["cimode"])),P),Ge=()=>{},yt=P=>{Object.getOwnPropertyNames(Object.getPrototypeOf(P)).forEach(d=>{typeof P[d]=="function"&&(P[d]=P[d].bind(P))})};class ot extends fe{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ie(c),this.services={},this.logger=re,this.modules={external:[]},yt(this),d&&!this.isInitialized&&!c.isClone){if(!this.options.initImmediate)return this.init(c,d),this;setTimeout(()=>{this.init(c,d)},0)}}init(){var c=this;let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof d=="function"&&(m=d,d={}),!d.defaultNS&&d.defaultNS!==!1&&d.ns&&(r(d.ns)?d.defaultNS=d.ns:d.ns.indexOf("translation")<0&&(d.defaultNS=d.ns[0]));const C=Be();this.options={...C,...this.options,...Ie(d)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...C.interpolation,...this.options.interpolation}),d.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=d.keySeparator),d.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=d.nsSeparator);const E=oe=>oe?typeof oe=="function"?new oe:oe:null;if(!this.options.isClone){this.modules.logger?re.init(E(this.modules.logger),this.options):re.init(null,this.options);let oe;this.modules.formatter?oe=this.modules.formatter:typeof Intl<"u"&&(oe=pt);const me=new Se(this.options);this.store=new b(this.options.resources,this.options);const Y=this.services;Y.logger=re,Y.resourceStore=this.store,Y.languageUtils=me,Y.pluralResolver=new ee(me,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),oe&&(!this.options.interpolation.format||this.options.interpolation.format===C.interpolation.format)&&(Y.formatter=E(oe),Y.formatter.init(Y,this.options),this.options.interpolation.format=Y.formatter.format.bind(Y.formatter)),Y.interpolator=new ie(this.options),Y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},Y.backendConnector=new Me(E(this.modules.backend),Y.resourceStore,Y,this.options),Y.backendConnector.on("*",function(Ce){for(var Le=arguments.length,Ke=new Array(Le>1?Le-1:0),ze=1;ze<Le;ze++)Ke[ze-1]=arguments[ze];c.emit(Ce,...Ke)}),this.modules.languageDetector&&(Y.languageDetector=E(this.modules.languageDetector),Y.languageDetector.init&&Y.languageDetector.init(Y,this.options.detection,this.options)),this.modules.i18nFormat&&(Y.i18nFormat=E(this.modules.i18nFormat),Y.i18nFormat.init&&Y.i18nFormat.init(this)),this.translator=new se(this.services,this.options),this.translator.on("*",function(Ce){for(var Le=arguments.length,Ke=new Array(Le>1?Le-1:0),ze=1;ze<Le;ze++)Ke[ze-1]=arguments[ze];c.emit(Ce,...Ke)}),this.modules.external.forEach(Ce=>{Ce.init&&Ce.init(this)})}if(this.format=this.options.interpolation.format,m||(m=Ge),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const oe=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);oe.length>0&&oe[0]!=="dev"&&(this.options.lng=oe[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(oe=>{this[oe]=function(){return c.store[oe](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(oe=>{this[oe]=function(){return c.store[oe](...arguments),c}});const B=s(),Z=()=>{const oe=(me,Y)=>{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),B.resolve(Y),m(me,Y)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return oe(null,this.t.bind(this));this.changeLanguage(this.options.lng,oe)};return this.options.resources||!this.options.initImmediate?Z():setTimeout(Z,0),B}loadResources(c){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const C=r(c)?c:this.language;if(typeof c=="function"&&(m=c),!this.options.resources||this.options.partialBundledLanguages){if(C&&C.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return m();const E=[],L=D=>{if(!D||D==="cimode")return;this.services.languageUtils.toResolveHierarchy(D).forEach(Z=>{Z!=="cimode"&&E.indexOf(Z)<0&&E.push(Z)})};C?L(C):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(B=>L(B)),this.options.preload&&this.options.preload.forEach(D=>L(D)),this.services.backendConnector.load(E,this.options.ns,D=>{!D&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),m(D)})}else m(null)}reloadResources(c,d,m){const C=s();return typeof c=="function"&&(m=c,c=void 0),typeof d=="function"&&(m=d,d=void 0),c||(c=this.languages),d||(d=this.options.ns),m||(m=Ge),this.services.backendConnector.reload(c,d,E=>{C.resolve(),m(E)}),C}use(c){if(!c)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!c.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return c.type==="backend"&&(this.modules.backend=c),(c.type==="logger"||c.log&&c.warn&&c.error)&&(this.modules.logger=c),c.type==="languageDetector"&&(this.modules.languageDetector=c),c.type==="i18nFormat"&&(this.modules.i18nFormat=c),c.type==="postProcessor"&&M.addPostProcessor(c),c.type==="formatter"&&(this.modules.formatter=c),c.type==="3rdParty"&&this.modules.external.push(c),this}setResolvedLanguage(c){if(!(!c||!this.languages)&&!(["cimode","dev"].indexOf(c)>-1))for(let d=0;d<this.languages.length;d++){const m=this.languages[d];if(!(["cimode","dev"].indexOf(m)>-1)&&this.store.hasLanguageSomeTranslations(m)){this.resolvedLanguage=m;break}}}changeLanguage(c,d){var m=this;this.isLanguageChangingTo=c;const C=s();this.emit("languageChanging",c);const E=B=>{this.language=B,this.languages=this.services.languageUtils.toResolveHierarchy(B),this.resolvedLanguage=void 0,this.setResolvedLanguage(B)},L=(B,Z)=>{Z?(E(Z),this.translator.changeLanguage(Z),this.isLanguageChangingTo=void 0,this.emit("languageChanged",Z),this.logger.log("languageChanged",Z)):this.isLanguageChangingTo=void 0,C.resolve(function(){return m.t(...arguments)}),d&&d(B,function(){return m.t(...arguments)})},D=B=>{!c&&!B&&this.services.languageDetector&&(B=[]);const Z=r(B)?B:this.services.languageUtils.getBestMatchFromCodes(B);Z&&(this.language||E(Z),this.translator.language||this.translator.changeLanguage(Z),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(Z)),this.loadResources(Z,oe=>{L(oe,Z)})};return!c&&this.services.languageDetector&&!this.services.languageDetector.async?D(this.services.languageDetector.detect()):!c&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(D):this.services.languageDetector.detect(D):D(c),C}getFixedT(c,d,m){var C=this;const E=function(L,D){let B;if(typeof D!="object"){for(var Z=arguments.length,oe=new Array(Z>2?Z-2:0),me=2;me<Z;me++)oe[me-2]=arguments[me];B=C.options.overloadTranslationOptionHandler([L,D].concat(oe))}else B={...D};B.lng=B.lng||E.lng,B.lngs=B.lngs||E.lngs,B.ns=B.ns||E.ns,B.keyPrefix!==""&&(B.keyPrefix=B.keyPrefix||m||E.keyPrefix);const Y=C.options.keySeparator||".";let Ce;return B.keyPrefix&&Array.isArray(L)?Ce=L.map(Le=>`${B.keyPrefix}${Y}${Le}`):Ce=B.keyPrefix?`${B.keyPrefix}${Y}${L}`:L,C.t(Ce,B)};return r(c)?E.lng=c:E.lngs=c,E.ns=d,E.keyPrefix=m,E}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(c){this.options.defaultNS=c}hasLoadedNamespace(c){let d=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=d.lng||this.resolvedLanguage||this.languages[0],C=this.options?this.options.fallbackLng:!1,E=this.languages[this.languages.length-1];if(m.toLowerCase()==="cimode")return!0;const L=(D,B)=>{const Z=this.services.backendConnector.state[`${D}|${B}`];return Z===-1||Z===0||Z===2};if(d.precheck){const D=d.precheck(this,L);if(D!==void 0)return D}return!!(this.hasResourceBundle(m,c)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||L(m,c)&&(!C||L(E,c)))}loadNamespaces(c,d){const m=s();return this.options.ns?(r(c)&&(c=[c]),c.forEach(C=>{this.options.ns.indexOf(C)<0&&this.options.ns.push(C)}),this.loadResources(C=>{m.resolve(),d&&d(C)}),m):(d&&d(),Promise.resolve())}loadLanguages(c,d){const m=s();r(c)&&(c=[c]);const C=this.options.preload||[],E=c.filter(L=>C.indexOf(L)<0&&this.services.languageUtils.isSupportedCode(L));return E.length?(this.options.preload=C.concat(E),this.loadResources(L=>{m.resolve(),d&&d(L)}),m):(d&&d(),Promise.resolve())}dir(c){if(c||(c=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!c)return"rtl";const d=["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 Se(Be());return d.indexOf(m.getLanguagePartFromCode(c))>-1||c.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;return new ot(c,d)}cloneInstance(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const m=c.forkResourceStore;m&&delete c.forkResourceStore;const C={...this.options,...c,isClone:!0},E=new ot(C);return(c.debug!==void 0||c.prefix!==void 0)&&(E.logger=E.logger.clone(c)),["store","services","language"].forEach(D=>{E[D]=this[D]}),E.services={...this.services},E.services.utils={hasLoadedNamespace:E.hasLoadedNamespace.bind(E)},m&&(E.store=new b(this.store.data,C),E.services.resourceStore=E.store),E.translator=new se(E.services,C),E.translator.on("*",function(D){for(var B=arguments.length,Z=new Array(B>1?B-1:0),oe=1;oe<B;oe++)Z[oe-1]=arguments[oe];E.emit(D,...Z)}),E.init(C,d),E.translator.options=C,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,li=Ze,li}const mu=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),Zn=qh(mu);var Rs={exports:{}},_s={},ai={exports:{}},yu;function sg(){return yu||(yu=1,(function(r){var s=Zn,i=Zn;function l(h){return i.existsSync(s.join(h,"package.json"))}function a(h,p){if(h=h||r.parent.filename,p=p||l,typeof h=="string"&&(h[h.length-1]!==s.sep&&(h+=s.sep),h=h.split(s.sep)),!h.length)throw new Error("package.json not found in path");h.pop();var v=h.join(s.sep);try{if(p(v))return v}catch{}return a(h,p)}r.exports=a})(ai)),ai.exports}var ui={exports:{}},ci,vu;function wu(){if(vu)return ci;vu=1;var r=Object.prototype.toString;return ci=function(i){var l=r.call(i),a=l==="[object Arguments]";return a||(a=l!=="[object Array]"&&i!==null&&typeof i=="object"&&typeof i.length=="number"&&i.length>=0&&r.call(i.callee)==="[object Function]"),a},ci}var fi,Su;function og(){if(Su)return fi;Su=1;var r;if(!Object.keys){var s=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=wu(),a=Object.prototype.propertyIsEnumerable,h=!a.call({toString:null},"toString"),p=a.call(function(){},"prototype"),v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],g=function(j){var A=j.constructor;return A&&A.prototype===j},w={$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},k=(function(){if(typeof window>"u")return!1;for(var j in window)try{if(!w["$"+j]&&s.call(window,j)&&window[j]!==null&&typeof window[j]=="object")try{g(window[j])}catch{return!0}}catch{return!0}return!1})(),$=function(j){if(typeof window>"u"||!k)return g(j);try{return g(j)}catch{return!1}};r=function(A){var z=A!==null&&typeof A=="object",_=i.call(A)==="[object Function]",R=l(A),q=z&&i.call(A)==="[object String]",Q=[];if(!z&&!_&&!R)throw new TypeError("Object.keys called on a non-object");var ue=p&&_;if(q&&A.length>0&&!s.call(A,0))for(var pe=0;pe<A.length;++pe)Q.push(String(pe));if(R&&A.length>0)for(var ce=0;ce<A.length;++ce)Q.push(String(ce));else for(var ae in A)!(ue&&ae==="prototype")&&s.call(A,ae)&&Q.push(String(ae));if(h)for(var ne=$(A),re=0;re<v.length;++re)!(ne&&v[re]==="constructor")&&s.call(A,v[re])&&Q.push(v[re]);return Q}}return fi=r,fi}var hi,xu;function ig(){if(xu)return hi;xu=1;var r=Array.prototype.slice,s=wu(),i=Object.keys,l=i?function(p){return i(p)}:og(),a=Object.keys;return l.shim=function(){if(Object.keys){var p=(function(){var v=Object.keys(arguments);return v&&v.length===arguments.length})(1,2);p||(Object.keys=function(g){return s(g)?a(r.call(g)):a(g)})}else Object.keys=l;return Object.keys||l},hi=l,hi}var di,Cu;function ku(){return Cu||(Cu=1,di=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},i=Symbol("test"),l=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var a=42;s[i]=a;for(var h 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 p=Object.getOwnPropertySymbols(s);if(p.length!==1||p[0]!==i||!Object.prototype.propertyIsEnumerable.call(s,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(s,i);if(v.value!==a||v.enumerable!==!0)return!1}return!0}),di}var pi,Pu;function gi(){return Pu||(Pu=1,pi=Object),pi}var mi,$u;function lg(){return $u||($u=1,mi=Error),mi}var yi,Eu;function ag(){return Eu||(Eu=1,yi=EvalError),yi}var vi,ju;function ug(){return ju||(ju=1,vi=RangeError),vi}var wi,Au;function cg(){return Au||(Au=1,wi=ReferenceError),wi}var Si,Tu;function fg(){return Tu||(Tu=1,Si=SyntaxError),Si}var xi,Ou;function Nu(){return Ou||(Ou=1,xi=TypeError),xi}var Ci,Ru;function hg(){return Ru||(Ru=1,Ci=URIError),Ci}var ki,_u;function dg(){return _u||(_u=1,ki=Math.abs),ki}var Pi,Lu;function pg(){return Lu||(Lu=1,Pi=Math.floor),Pi}var $i,bu;function gg(){return bu||(bu=1,$i=Math.max),$i}var Ei,Iu;function mg(){return Iu||(Iu=1,Ei=Math.min),Ei}var ji,Fu;function yg(){return Fu||(Fu=1,ji=Math.pow),ji}var Ai,Mu;function vg(){return Mu||(Mu=1,Ai=Math.round),Ai}var Ti,zu;function wg(){return zu||(zu=1,Ti=Number.isNaN||function(s){return s!==s}),Ti}var Oi,Du;function Sg(){if(Du)return Oi;Du=1;var r=wg();return Oi=function(i){return r(i)||i===0?i:i<0?-1:1},Oi}var Ni,Uu;function xg(){return Uu||(Uu=1,Ni=Object.getOwnPropertyDescriptor),Ni}var Ri,Bu;function Vu(){if(Bu)return Ri;Bu=1;var r=xg();if(r)try{r([],"length")}catch{r=null}return Ri=r,Ri}var _i,Hu;function Cg(){if(Hu)return _i;Hu=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return _i=r,_i}var Li,qu;function kg(){if(qu)return Li;qu=1;var r=typeof Symbol<"u"&&Symbol,s=ku();return Li=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},Li}var bi,Wu;function Ku(){return Wu||(Wu=1,bi=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),bi}var Ii,Gu;function Qu(){if(Gu)return Ii;Gu=1;var r=gi();return Ii=r.getPrototypeOf||null,Ii}var Fi,Ju;function Pg(){if(Ju)return Fi;Ju=1;var r="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,i=Math.max,l="[object Function]",a=function(g,w){for(var k=[],$=0;$<g.length;$+=1)k[$]=g[$];for(var j=0;j<w.length;j+=1)k[j+g.length]=w[j];return k},h=function(g,w){for(var k=[],$=w,j=0;$<g.length;$+=1,j+=1)k[j]=g[$];return k},p=function(v,g){for(var w="",k=0;k<v.length;k+=1)w+=v[k],k+1<v.length&&(w+=g);return w};return Fi=function(g){var w=this;if(typeof w!="function"||s.apply(w)!==l)throw new TypeError(r+w);for(var k=h(arguments,1),$,j=function(){if(this instanceof $){var q=w.apply(this,a(k,arguments));return Object(q)===q?q:this}return w.apply(g,a(k,arguments))},A=i(0,w.length-k.length),z=[],_=0;_<A;_++)z[_]="$"+_;if($=Function("binder","return function ("+p(z,",")+"){ return binder.apply(this,arguments); }")(j),w.prototype){var R=function(){};R.prototype=w.prototype,$.prototype=new R,R.prototype=null}return $},Fi}var Mi,Yu;function Ls(){if(Yu)return Mi;Yu=1;var r=Pg();return Mi=Function.prototype.bind||r,Mi}var zi,Xu;function Di(){return Xu||(Xu=1,zi=Function.prototype.call),zi}var Ui,Zu;function ec(){return Zu||(Zu=1,Ui=Function.prototype.apply),Ui}var Bi,tc;function $g(){return tc||(tc=1,Bi=typeof Reflect<"u"&&Reflect&&Reflect.apply),Bi}var Vi,nc;function Eg(){if(nc)return Vi;nc=1;var r=Ls(),s=ec(),i=Di(),l=$g();return Vi=l||r.call(i,s),Vi}var Hi,rc;function sc(){if(rc)return Hi;rc=1;var r=Ls(),s=Nu(),i=Di(),l=Eg();return Hi=function(h){if(h.length<1||typeof h[0]!="function")throw new s("a function is required");return l(r,i,h)},Hi}var qi,oc;function jg(){if(oc)return qi;oc=1;var r=sc(),s=Vu(),i;try{i=[].__proto__===Array.prototype}catch(p){if(!p||typeof p!="object"||!("code"in p)||p.code!=="ERR_PROTO_ACCESS")throw p}var l=!!i&&s&&s(Object.prototype,"__proto__"),a=Object,h=a.getPrototypeOf;return qi=l&&typeof l.get=="function"?r([l.get]):typeof h=="function"?function(v){return h(v==null?v:a(v))}:!1,qi}var Wi,ic;function Ag(){if(ic)return Wi;ic=1;var r=Ku(),s=Qu(),i=jg();return Wi=r?function(a){return r(a)}:s?function(a){if(!a||typeof a!="object"&&typeof a!="function")throw new TypeError("getProto: not an object");return s(a)}:i?function(a){return i(a)}:null,Wi}var Ki,lc;function Tg(){if(lc)return Ki;lc=1;var r=Function.prototype.call,s=Object.prototype.hasOwnProperty,i=Ls();return Ki=i.call(r,s),Ki}var Gi,ac;function Og(){if(ac)return Gi;ac=1;var r,s=gi(),i=lg(),l=ag(),a=ug(),h=cg(),p=fg(),v=Nu(),g=hg(),w=dg(),k=pg(),$=gg(),j=mg(),A=yg(),z=vg(),_=Sg(),R=Function,q=function(Fe){try{return R('"use strict"; return ('+Fe+").constructor;")()}catch{}},Q=Vu(),ue=Cg(),pe=function(){throw new v},ce=Q?(function(){try{return arguments.callee,pe}catch{try{return Q(arguments,"callee").get}catch{return pe}}})():pe,ae=kg()(),ne=Ag(),re=Qu(),fe=Ku(),b=ec(),M=Di(),K={},se=typeof Uint8Array>"u"||!ne?r:ne(Uint8Array),he={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":ae&&ne?ne([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":K,"%AsyncGenerator%":K,"%AsyncGeneratorFunction%":K,"%AsyncIteratorPrototype%":K,"%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%":i,"%eval%":eval,"%EvalError%":l,"%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%":R,"%GeneratorFunction%":K,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ae&&ne?ne(ne([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ae||!ne?r:ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":Q,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":a,"%ReferenceError%":h,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ae||!ne?r:ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ae&&ne?ne(""[Symbol.iterator]()):r,"%Symbol%":ae?Symbol:r,"%SyntaxError%":p,"%ThrowTypeError%":ce,"%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%":M,"%Function.prototype.apply%":b,"%Object.defineProperty%":ue,"%Object.getPrototypeOf%":re,"%Math.abs%":w,"%Math.floor%":k,"%Math.max%":$,"%Math.min%":j,"%Math.pow%":A,"%Math.round%":z,"%Math.sign%":_,"%Reflect.getPrototypeOf%":fe};if(ne)try{null.error}catch(Fe){var Se=ne(ne(Fe));he["%Error.prototype%"]=Se}var Te=function Fe(Me){var Be;if(Me==="%AsyncFunction%")Be=q("async function () {}");else if(Me==="%GeneratorFunction%")Be=q("function* () {}");else if(Me==="%AsyncGeneratorFunction%")Be=q("async function* () {}");else if(Me==="%AsyncGenerator%"){var Ie=Fe("%AsyncGeneratorFunction%");Ie&&(Be=Ie.prototype)}else if(Me==="%AsyncIteratorPrototype%"){var Ge=Fe("%AsyncGenerator%");Ge&&ne&&(Be=ne(Ge.prototype))}return he[Me]=Be,Be},S={__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"]},O=Ls(),W=Tg(),ge=O.call(M,Array.prototype.concat),V=O.call(b,Array.prototype.splice),ee=O.call(M,String.prototype.replace),G=O.call(M,String.prototype.slice),H=O.call(M,RegExp.prototype.exec),ie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ne=/\\(\\)?/g,De=function(Me){var Be=G(Me,0,1),Ie=G(Me,-1);if(Be==="%"&&Ie!=="%")throw new p("invalid intrinsic syntax, expected closing `%`");if(Ie==="%"&&Be!=="%")throw new p("invalid intrinsic syntax, expected opening `%`");var Ge=[];return ee(Me,ie,function(yt,ot,Ze,P){Ge[Ge.length]=Ze?ee(P,Ne,"$1"):ot||yt}),Ge},pt=function(Me,Be){var Ie=Me,Ge;if(W(S,Ie)&&(Ge=S[Ie],Ie="%"+Ge[0]+"%"),W(he,Ie)){var yt=he[Ie];if(yt===K&&(yt=Te(Ie)),typeof yt>"u"&&!Be)throw new v("intrinsic "+Me+" exists, but is not available. Please file an issue!");return{alias:Ge,name:Ie,value:yt}}throw new p("intrinsic "+Me+" does not exist!")};return Gi=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(H(/^%?[^%]*%?$/,Me)===null)throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ie=De(Me),Ge=Ie.length>0?Ie[0]:"",yt=pt("%"+Ge+"%",Be),ot=yt.name,Ze=yt.value,P=!1,c=yt.alias;c&&(Ge=c[0],V(Ie,ge([0,1],c)));for(var d=1,m=!0;d<Ie.length;d+=1){var C=Ie[d],E=G(C,0,1),L=G(C,-1);if((E==='"'||E==="'"||E==="`"||L==='"'||L==="'"||L==="`")&&E!==L)throw new p("property names with quotes must have matching quotes");if((C==="constructor"||!m)&&(P=!0),Ge+="."+C,ot="%"+Ge+"%",W(he,ot))Ze=he[ot];else if(Ze!=null){if(!(C in Ze)){if(!Be)throw new v("base intrinsic for "+Me+" exists, but the property is not available.");return}if(Q&&d+1>=Ie.length){var D=Q(Ze,C);m=!!D,m&&"get"in D&&!("originalValue"in D.get)?Ze=D.get:Ze=Ze[C]}else m=W(Ze,C),Ze=Ze[C];m&&!P&&(he[ot]=Ze)}}return Ze},Gi}var Qi,uc;function Ng(){if(uc)return Qi;uc=1;var r=Og(),s=sc(),i=s([r("%String.prototype.indexOf%")]);return Qi=function(a,h){var p=r(a,!!h);return typeof p=="function"&&i(a,".prototype.")>-1?s([p]):p},Qi}var Ji,cc;function Rg(){if(cc)return Ji;cc=1;var r=ig(),s=ku()(),i=Ng(),l=gi(),a=i("Array.prototype.push"),h=i("Object.prototype.propertyIsEnumerable"),p=s?l.getOwnPropertySymbols:null;return Ji=function(g,w){if(g==null)throw new TypeError("target must be an object");var k=l(g);if(arguments.length===1)return k;for(var $=1;$<arguments.length;++$){var j=l(arguments[$]),A=r(j),z=s&&(l.getOwnPropertySymbols||p);if(z)for(var _=z(j),R=0;R<_.length;++R){var q=_[R];h(j,q)&&a(A,q)}for(var Q=0;Q<A.length;++Q){var ue=A[Q];if(h(j,ue)){var pe=j[ue];k[ue]=pe}}}return k},Ji}var Yi,fc;function _g(){if(fc)return Yi;fc=1;var r=Rg(),s=function(){if(!Object.assign)return!1;for(var l="abcdefghijklmnopqrst",a=l.split(""),h={},p=0;p<a.length;++p)h[a[p]]=a[p];var v=Object.assign({},h),g="";for(var w in v)g+=w;return l!==g},i=function(){if(!Object.assign||!Object.preventExtensions)return!1;var l=Object.preventExtensions({1:2});try{Object.assign(l,"xy")}catch{return l[1]==="y"}return!1};return Yi=function(){return!Object.assign||s()||i()?r:Object.assign},Yi}var Xi={},Zi,hc;function Lg(){return hc||(hc=1,Zi=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}),Zi}var bs={exports:{}},dc;function bg(){return dc||(dc=1,typeof Object.create=="function"?bs.exports=function(s,i){s.super_=i,s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:bs.exports=function(s,i){s.super_=i;var l=function(){};l.prototype=i.prototype,s.prototype=new l,s.prototype.constructor=s}),bs.exports}var pc;function Ig(){return pc||(pc=1,(function(r){var s=/%[sdj%]/g;r.format=function(S){if(!ue(S)){for(var O=[],W=0;W<arguments.length;W++)O.push(a(arguments[W]));return O.join(" ")}for(var W=1,ge=arguments,V=ge.length,ee=String(S).replace(s,function(H){if(H==="%%")return"%";if(W>=V)return H;switch(H){case"%s":return String(ge[W++]);case"%d":return Number(ge[W++]);case"%j":try{return JSON.stringify(ge[W++])}catch{return"[Circular]"}default:return H}}),G=ge[W];W<V;G=ge[++W])R(G)||!ne(G)?ee+=" "+G:ee+=" "+a(G);return ee},r.deprecate=function(S,O){if(ce(Er.process))return function(){return r.deprecate(S,O).apply(this,arguments)};if(process.noDeprecation===!0)return S;var W=!1;function ge(){if(!W){if(process.throwDeprecation)throw new Error(O);process.traceDeprecation?console.trace(O):console.error(O),W=!0}return S.apply(this,arguments)}return ge};var i={},l;r.debuglog=function(S){if(ce(l)&&(l=process.env.NODE_DEBUG||""),S=S.toUpperCase(),!i[S])if(new RegExp("\\b"+S+"\\b","i").test(l)){var O=process.pid;i[S]=function(){var W=r.format.apply(r,arguments);console.error("%s %d: %s",S,O,W)}}else i[S]=function(){};return i[S]};function a(S,O){var W={seen:[],stylize:p};return arguments.length>=3&&(W.depth=arguments[2]),arguments.length>=4&&(W.colors=arguments[3]),_(O)?W.showHidden=O:O&&r._extend(W,O),ce(W.showHidden)&&(W.showHidden=!1),ce(W.depth)&&(W.depth=2),ce(W.colors)&&(W.colors=!1),ce(W.customInspect)&&(W.customInspect=!0),W.colors&&(W.stylize=h),g(W,S,W.depth)}r.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(S,O){var W=a.styles[O];return W?"\x1B["+a.colors[W][0]+"m"+S+"\x1B["+a.colors[W][1]+"m":S}function p(S,O){return S}function v(S){var O={};return S.forEach(function(W,ge){O[W]=!0}),O}function g(S,O,W){if(S.customInspect&&O&&b(O.inspect)&&O.inspect!==r.inspect&&!(O.constructor&&O.constructor.prototype===O)){var ge=O.inspect(W,S);return ue(ge)||(ge=g(S,ge,W)),ge}var V=w(S,O);if(V)return V;var ee=Object.keys(O),G=v(ee);if(S.showHidden&&(ee=Object.getOwnPropertyNames(O)),fe(O)&&(ee.indexOf("message")>=0||ee.indexOf("description")>=0))return k(O);if(ee.length===0){if(b(O)){var H=O.name?": "+O.name:"";return S.stylize("[Function"+H+"]","special")}if(ae(O))return S.stylize(RegExp.prototype.toString.call(O),"regexp");if(re(O))return S.stylize(Date.prototype.toString.call(O),"date");if(fe(O))return k(O)}var ie="",Ne=!1,De=["{","}"];if(z(O)&&(Ne=!0,De=["[","]"]),b(O)){var pt=O.name?": "+O.name:"";ie=" [Function"+pt+"]"}if(ae(O)&&(ie=" "+RegExp.prototype.toString.call(O)),re(O)&&(ie=" "+Date.prototype.toUTCString.call(O)),fe(O)&&(ie=" "+k(O)),ee.length===0&&(!Ne||O.length==0))return De[0]+ie+De[1];if(W<0)return ae(O)?S.stylize(RegExp.prototype.toString.call(O),"regexp"):S.stylize("[Object]","special");S.seen.push(O);var Fe;return Ne?Fe=$(S,O,W,G,ee):Fe=ee.map(function(Me){return j(S,O,W,G,Me,Ne)}),S.seen.pop(),A(Fe,ie,De)}function w(S,O){if(ce(O))return S.stylize("undefined","undefined");if(ue(O)){var W="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return S.stylize(W,"string")}if(Q(O))return S.stylize(""+O,"number");if(_(O))return S.stylize(""+O,"boolean");if(R(O))return S.stylize("null","null")}function k(S){return"["+Error.prototype.toString.call(S)+"]"}function $(S,O,W,ge,V){for(var ee=[],G=0,H=O.length;G<H;++G)Te(O,String(G))?ee.push(j(S,O,W,ge,String(G),!0)):ee.push("");return V.forEach(function(ie){ie.match(/^\d+$/)||ee.push(j(S,O,W,ge,ie,!0))}),ee}function j(S,O,W,ge,V,ee){var G,H,ie;if(ie=Object.getOwnPropertyDescriptor(O,V)||{value:O[V]},ie.get?ie.set?H=S.stylize("[Getter/Setter]","special"):H=S.stylize("[Getter]","special"):ie.set&&(H=S.stylize("[Setter]","special")),Te(ge,V)||(G="["+V+"]"),H||(S.seen.indexOf(ie.value)<0?(R(W)?H=g(S,ie.value,null):H=g(S,ie.value,W-1),H.indexOf(`
18
+ `,i=this.context.stylesUrl;return i?le.jsxs(le.Fragment,{children:[le.jsx("link",{rel:"stylesheet",href:i}),le.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),le.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):le.jsxs(le.Fragment,{children:[le.jsx("style",{dangerouslySetInnerHTML:{__html:s}}),le.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const s=od(),i={...s.frame.common};return le.jsx("div",{style:s.modalContainer,className:"gh-root-frame",children:le.jsxs(nd,{style:i,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[le.jsx("div",{onClick:l=>this.handlePopupClose(l),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)]"}),le.jsx(id,{})]})})}render(){const{showPopup:s}=this.context;return s?this.renderFrameContainer():null}}var ve;function st(r,s,i){const l=typeof i,a=typeof r;if(l!=="undefined"){if(a!=="undefined"){if(i){if(a==="function"&&l===a)return function(v){return r(i(v))};if(s=r.constructor,s===i.constructor){if(s===Array)return i.concat(r);if(s===Map){var h=new Map(i);for(var p of r)h.set(p[0],p[1]);return h}if(s===Set){p=new Set(i);for(h of r.values())p.add(h);return p}}}return r}return i}return a==="undefined"?s:r}function qn(r,s){return typeof r>"u"?s:r}function Ye(){return Object.create(null)}function Rt(r){return typeof r=="string"}function jr(r){return typeof r=="object"}function Ar(r,s){if(Rt(s))r=r[s];else for(let i=0;r&&i<s.length;i++)r=r[s[i]];return r}const Ed=/[^\p{L}\p{N}]+/u,jd=/(\d{3})/g,Ad=/(\D)(\d{3})/g,Td=/(\d{3})(\D)/g,qa=/[\u0300-\u036f]/g;function Wn(r={}){if(!this||this.constructor!==Wn)return new Wn(...arguments);if(arguments.length)for(r=0;r<arguments.length;r++)this.assign(arguments[r]);else this.assign(r)}ve=Wn.prototype,ve.assign=function(r){this.normalize=st(r.normalize,!0,this.normalize);let s=r.include,i=s||r.exclude||r.split,l;if(i||i===""){if(typeof i=="object"&&i.constructor!==RegExp){let a="";l=!s,s||(a+="\\p{Z}"),i.letter&&(a+="\\p{L}"),i.number&&(a+="\\p{N}",l=!!s),i.symbol&&(a+="\\p{S}"),i.punctuation&&(a+="\\p{P}"),i.control&&(a+="\\p{C}"),(i=i.char)&&(a+=typeof i=="object"?i.join(""):i);try{this.split=new RegExp("["+(s?"^":"")+a+"]+","u")}catch{this.split=/\s+/}}else this.split=i,l=i===!1||"a1a".split(i).length<2;this.numeric=st(r.numeric,l)}else{try{this.split=st(this.split,Ed)}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),i=r.filter,this.filter=typeof i=="function"?i:st(i&&new Set(i),null,this.filter),this.dedupe=st(r.dedupe,!0,this.dedupe),this.matcher=st((i=r.matcher)&&new Map(i),null,this.matcher),this.mapper=st((i=r.mapper)&&new Map(i),null,this.mapper),this.stemmer=st((i=r.stemmer)&&new Map(i),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=i=st(r.cache,!0,this.cache))&&(this.F=null,this.L=typeof i=="number"?i:2e5,this.B=new Map,this.D=new Map,this.I=this.H=128),this.h="",this.J=null,this.A="",this.K=null,this.matcher)for(const a of this.matcher.keys())this.h+=(this.h?"|":"")+a;if(this.stemmer)for(const a of this.stemmer.keys())this.A+=(this.A?"|":"")+a;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.K=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):r.length>1?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):r.length<2&&(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.J=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,s){if(this.cache&&r.length<=this.H)if(this.F){if(this.B.has(r))return this.B.get(r)}else this.F=setTimeout(En,50,this);this.normalize&&(typeof this.normalize=="function"?r=this.normalize(r):r=qa?r.normalize("NFKD").replace(qa,"").toLowerCase():r.toLowerCase()),this.prepare&&(r=this.prepare(r)),this.numeric&&r.length>3&&(r=r.replace(Ad,"$1 $2").replace(Td,"$1 $2").replace(jd,"$1 "));const i=!(this.dedupe||this.mapper||this.filter||this.matcher||this.stemmer||this.replacer);let l=[],a=Ye(),h,p,v=this.split||this.split===""?r.split(this.split):[r];for(let w=0,k,$;w<v.length;w++)if((k=$=v[w])&&!(k.length<this.minlength||k.length>this.maxlength)){if(s){if(a[k])continue;a[k]=1}else{if(h===k)continue;h=k}if(i)l.push(k);else if(!this.filter||(typeof this.filter=="function"?this.filter(k):!this.filter.has(k))){if(this.cache&&k.length<=this.I)if(this.F){var g=this.D.get(k);if(g||g===""){g&&l.push(g);continue}}else this.F=setTimeout(En,50,this);if(this.stemmer){this.K||(this.K=new RegExp("(?!^)("+this.A+")$"));let j;for(;j!==k&&k.length>2;)j=k,k=k.replace(this.K,A=>this.stemmer.get(A))}if(k&&(this.mapper||this.dedupe&&k.length>1)){g="";for(let j=0,A="",z,_;j<k.length;j++)z=k.charAt(j),z===A&&this.dedupe||((_=this.mapper&&this.mapper.get(z))||_===""?_===A&&this.dedupe||!(A=_)||(g+=_):g+=A=z);k=g}if(this.matcher&&k.length>1&&(this.J||(this.J=new RegExp("("+this.h+")","g")),k=k.replace(this.J,j=>this.matcher.get(j))),k&&this.replacer)for(g=0;k&&g<this.replacer.length;g+=2)k=k.replace(this.replacer[g],this.replacer[g+1]);if(this.cache&&$.length<=this.I&&(this.D.set($,k),this.D.size>this.L&&(this.D.clear(),this.I=this.I/1.1|0)),k){if(k!==$)if(s){if(a[k])continue;a[k]=1}else{if(p===k)continue;p=k}l.push(k)}}}return this.finalize&&(l=this.finalize(l)||l),this.cache&&r.length<=this.H&&(this.B.set(r,l),this.B.size>this.L&&(this.B.clear(),this.H=this.H/1.1|0)),l};function En(r){r.F=null,r.B.clear(),r.D.clear()}function Wo(r,s,i){i||(s||typeof r!="object"?typeof s=="object"&&(i=s,s=0):i=r),i&&(r=i.query||r,s=i.limit||s);let l=""+(s||0);i&&(l+=(i.offset||0)+!!i.context+!!i.suggest+(i.resolve!==!1)+(i.resolution||this.resolution)+(i.boost||0)),r=(""+r).toLowerCase(),this.cache||(this.cache=new jn);let a=this.cache.get(r+l);if(!a){const h=i&&i.cache;h&&(i.cache=!1),a=this.search(r,s,i),h&&(i.cache=h),this.cache.set(r+l,a)}return a}function jn(r){this.limit=r&&r!==!0?r:1e3,this.cache=new Map,this.h=""}jn.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)},jn.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},jn.prototype.remove=function(r){for(const s of this.cache){const i=s[0];s[1].includes(r)&&this.cache.delete(i)}},jn.prototype.clear=function(){this.cache.clear(),this.h=""};const Wa={normalize:!1,numeric:!1,dedupe:!1},Ss={},Ko=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"]]),Ka=new Map([["ae","a"],["oe","o"],["sh","s"],["kh","k"],["th","t"],["ph","f"],["pf","f"]]),Ga=[/([^aeo])h(.)/g,"$1$2",/([aeo])h([^aeo]|$)/g,"$1$2",/(.)\1+/g,"$1"],Qa={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 Go={Exact:Wa,Default:Ss,Normalize:Ss,LatinBalance:{mapper:Ko},LatinAdvanced:{mapper:Ko,matcher:Ka,replacer:Ga},LatinExtra:{mapper:Ko,replacer:Ga.concat([/(?!^)[aeo]/g,""]),matcher:Ka},LatinSoundex:{dedupe:!1,include:{letter:!0},finalize:function(r){for(let i=0;i<r.length;i++){var s=r[i];let l=s.charAt(0),a=Qa[l];for(let h=1,p;h<s.length&&(p=s.charAt(h),p==="h"||p==="w"||!(p=Qa[p])||p===a||(l+=p,a=p,l.length!==4));h++);r[i]=l}}},CJK:{split:""},LatinExact:Wa,LatinDefault:Ss,LatinSimple:Ss};function Ja(r,s,i,l){let a=[];for(let h=0,p;h<r.index.length;h++)if(p=r.index[h],s>=p.length)s-=p.length;else{s=p[l?"splice":"slice"](s,i);const v=s.length;if(v&&(a=a.length?a.concat(s):s,i-=v,l&&(r.length-=v),!i))break;s=0}return a}function Kn(r){if(!this||this.constructor!==Kn)return new Kn(r);this.index=r?[r]:[],this.length=r?r.length:0;const s=this;return new Proxy([],{get(i,l){if(l==="length")return s.length;if(l==="push")return function(a){s.index[s.index.length-1].push(a),s.length++};if(l==="pop")return function(){if(s.length)return s.length--,s.index[s.index.length-1].pop()};if(l==="indexOf")return function(a){let h=0;for(let p=0,v,g;p<s.index.length;p++){if(v=s.index[p],g=v.indexOf(a),g>=0)return h+g;h+=v.length}return-1};if(l==="includes")return function(a){for(let h=0;h<s.index.length;h++)if(s.index[h].includes(a))return!0;return!1};if(l==="slice")return function(a,h){return Ja(s,a||0,h||s.length,!1)};if(l==="splice")return function(a,h){return Ja(s,a||0,h||s.length,!0)};if(l==="constructor")return Array;if(typeof l!="symbol")return(i=s.index[l/2**31|0])&&i[l]},set(i,l,a){return i=l/2**31|0,(s.index[i]||(s.index[i]=[]))[l]=a,s.length++,!0}})}Kn.prototype.clear=function(){this.index.length=0},Kn.prototype.push=function(){};function _t(r=8){if(!this||this.constructor!==_t)return new _t(r);this.index=Ye(),this.h=[],this.size=0,r>32?(this.B=Xa,this.A=BigInt(r)):(this.B=Ya,this.A=r)}_t.prototype.get=function(r){const s=this.index[this.B(r)];return s&&s.get(r)},_t.prototype.set=function(r,s){var i=this.B(r);let l=this.index[i];l?(i=l.size,l.set(r,s),(i-=l.size)&&this.size++):(this.index[i]=l=new Map([[r,s]]),this.h.push(l),this.size++)};function Lt(r=8){if(!this||this.constructor!==Lt)return new Lt(r);this.index=Ye(),this.h=[],this.size=0,r>32?(this.B=Xa,this.A=BigInt(r)):(this.B=Ya,this.A=r)}Lt.prototype.add=function(r){var s=this.B(r);let i=this.index[s];i?(s=i.size,i.add(r),(s-=i.size)&&this.size++):(this.index[s]=i=new Set([r]),this.h.push(i),this.size++)},ve=_t.prototype,ve.has=Lt.prototype.has=function(r){const s=this.index[this.B(r)];return s&&s.has(r)},ve.delete=Lt.prototype.delete=function(r){const s=this.index[this.B(r)];s&&s.delete(r)&&this.size--},ve.clear=Lt.prototype.clear=function(){this.index=Ye(),this.h=[],this.size=0},ve.values=Lt.prototype.values=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].values())yield s},ve.keys=Lt.prototype.keys=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].keys())yield s},ve.entries=Lt.prototype.entries=function*(){for(let r=0;r<this.h.length;r++)for(let s of this.h[r].entries())yield s};function Ya(r){let s=2**this.A-1;if(typeof r=="number")return r&s;let i=0,l=this.A+1;for(let a=0;a<r.length;a++)i=(i*l^r.charCodeAt(a))&s;return this.A===32?i+2**31:i}function Xa(r){let s=BigInt(2)**this.A-BigInt(1);var i=typeof r;if(i==="bigint")return r&s;if(i==="number")return BigInt(r)&s;i=BigInt(0);let l=this.A+BigInt(1);for(let a=0;a<r.length;a++)i=(i*l^BigInt(r.charCodeAt(a)))&s;return i}let Gn,Tr;async function Od(r){r=r.data;var s=r.task;const i=r.id;let l=r.args;if(s==="init")Tr=r.options||{},(s=r.factory)?(Function("return "+s)()(self),Gn=new self.FlexSearch.Index(Tr),delete self.FlexSearch):Gn=new Mt(Tr),postMessage({id:i});else{let a;s==="export"&&(l[1]?(l[0]=Tr.export,l[2]=0,l[3]=1):l=null),s==="import"?l[0]&&(r=await Tr.import.call(Gn,l[0]),Gn.import(l[0],r)):((a=l&&Gn[s].apply(Gn,l))&&a.then&&(a=await a),a&&a.await&&(a=await a.await),s==="search"&&a.result&&(a=a.result)),postMessage(s==="search"?{id:i,msg:a}:{id:i})}}function Qo(r){Qn.call(r,"add"),Qn.call(r,"append"),Qn.call(r,"search"),Qn.call(r,"update"),Qn.call(r,"remove"),Qn.call(r,"searchCache")}let Jo,Za,xs;function Nd(){Jo=xs=0}function Qn(r){this[r+"Async"]=function(){const s=arguments;var i=s[s.length-1];let l;if(typeof i=="function"&&(l=i,delete s[s.length-1]),Jo?xs||(xs=Date.now()-Za>=this.priority*this.priority*3):(Jo=setTimeout(Nd,0),Za=Date.now()),xs){const h=this;return new Promise(p=>{setTimeout(function(){p(h[r+"Async"].apply(h,s))},0)})}const a=this[r].apply(this,s);return i=a.then?a:new Promise(h=>h(a)),l&&i.then(l),i}}let tn=0;function Jn(r={},s){function i(v){function g(w){w=w.data||w;const k=w.id,$=k&&h.h[k];$&&($(w.msg),delete h.h[k])}if(this.worker=v,this.h=Ye(),this.worker)return a?this.worker.on("message",g):this.worker.onmessage=g,r.config?new Promise(function(w){tn>1e9&&(tn=0),h.h[++tn]=function(){w(h)},h.worker.postMessage({id:tn,task:"init",factory:l,options:r})}):(this.priority=r.priority||4,this.encoder=s||null,this.worker.postMessage({task:"init",factory:l,options:r}),this)}if(!this||this.constructor!==Jn)return new Jn(r);let l=typeof self<"u"?self._factory:typeof window<"u"?window._factory:null;l&&(l=l.toString());const a=typeof window>"u",h=this,p=Rd(l,a,r.worker);return p.then?p.then(function(v){return i.call(h,v)}):i.call(this,p)}nn("add"),nn("append"),nn("search"),nn("update"),nn("remove"),nn("clear"),nn("export"),nn("import"),Jn.prototype.searchCache=Wo,Qo(Jn.prototype);function nn(r){Jn.prototype[r]=function(){const s=this,i=[].slice.call(arguments);var l=i[i.length-1];let a;return typeof l=="function"&&(a=l,i.pop()),l=new Promise(function(h){r==="export"&&typeof i[0]=="function"&&(i[0]=null),tn>1e9&&(tn=0),s.h[++tn]=h,s.worker.postMessage({task:r,id:tn,args:i})}),a?(l.then(a),this):l}}function Rd(r,s,i){return s?typeof module<"u"?new(require("worker_threads")).Worker(__dirname+"/worker/node.js"):Promise.resolve().then(()=>mu).then(function(l){return new l.Worker("undefined/node/node.mjs")}):r?new window.Worker(URL.createObjectURL(new Blob(["onmessage="+Od.toString()],{type:"text/javascript"}))):new window.Worker(typeof i=="string"?i:(typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:bo&&bo.tagName.toUpperCase()==="SCRIPT"&&bo.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").replace("flexsearch.bundle.module.min.mjs","module/worker/worker.js"),{type:"module"})}An.prototype.add=function(r,s,i){if(jr(r)&&(s=r,r=Ar(s,this.key)),s&&(r||r===0)){if(!i&&this.reg.has(r))return this.update(r,s);for(let v=0,g;v<this.field.length;v++){g=this.B[v];var l=this.index.get(this.field[v]);if(typeof g=="function"){var a=g(s);a&&l.add(r,a,i,!0)}else a=g.G,(!a||a(s))&&(g.constructor===String?g=[""+g]:Rt(g)&&(g=[g]),Xo(s,g,this.D,0,l,r,g[0],i))}if(this.tag)for(l=0;l<this.A.length;l++){var h=this.A[l];a=this.tag.get(this.F[l]);let v=Ye();if(typeof h=="function"){if(h=h(s),!h)continue}else{var p=h.G;if(p&&!p(s))continue;h.constructor===String&&(h=""+h),h=Ar(s,h)}if(a&&h){Rt(h)&&(h=[h]);for(let g=0,w,k;g<h.length;g++)if(w=h[g],!v[w]&&(v[w]=1,(p=a.get(w))?k=p:a.set(w,k=[]),!i||!k.includes(r))){if(k.length===2**31-1){if(p=new Kn(k),this.fastupdate)for(let $ of this.reg.values())$.includes(k)&&($[$.indexOf(k)]=p);a.set(w,k=p)}k.push(r),this.fastupdate&&((p=this.reg.get(r))?p.push(k):this.reg.set(r,[k]))}}}if(this.store&&(!i||!this.store.has(r))){let v;if(this.h){v=Ye();for(let g=0,w;g<this.h.length;g++){if(w=this.h[g],(i=w.G)&&!i(s))continue;let k;if(typeof w=="function"){if(k=w(s),!k)continue;w=[w.O]}else if(Rt(w)||w.constructor===String){v[w]=s[w];continue}Yo(s,v,w,0,w[0],k)}}this.store.set(r,v||s)}this.worker&&(this.fastupdate||this.reg.add(r))}return this};function Yo(r,s,i,l,a,h){if(r=r[a],l===i.length-1)s[a]=h||r;else if(r)if(r.constructor===Array)for(s=s[a]=Array(r.length),a=0;a<r.length;a++)Yo(r,s,i,l,a);else s=s[a]||(s[a]=Ye()),a=i[++l],Yo(r,s,i,l,a)}function Xo(r,s,i,l,a,h,p,v){if(r=r[p])if(l===s.length-1){if(r.constructor===Array){if(i[l]){for(s=0;s<r.length;s++)a.add(h,r[s],!0,!0);return}r=r.join(" ")}a.add(h,r,v,!0)}else if(r.constructor===Array)for(p=0;p<r.length;p++)Xo(r,s,i,l,a,h,p,v);else p=s[++l],Xo(r,s,i,l,a,h,p,v)}function Zo(r,s,i,l){if(!r.length)return r;if(r.length===1)return r=r[0],r=i||r.length>s?r.slice(i,i+s):r,l?Yn.call(this,r):r;let a=[];for(let h=0,p,v;h<r.length;h++)if((p=r[h])&&(v=p.length)){if(i){if(i>=v){i-=v;continue}p=p.slice(i,i+s),v=p.length,i=0}if(v>s&&(p=p.slice(0,s),v=s),!a.length&&v>=s)return l?Yn.call(this,p):p;if(a.push(p),s-=v,!s)break}return a=a.length>1?[].concat.apply([],a):a[0],l?Yn.call(this,a):a}function Cs(r,s,i,l){var a=l[0];if(a[0]&&a[0].query)return r[s].apply(r,a);if(!(s!=="and"&&s!=="not"||r.result.length||r.await||a.suggest))return l.length>1&&(a=l[l.length-1]),(l=a.resolve)?r.await||r.result:r;let h=[],p=0,v=0,g,w,k,$,j;for(s=0;s<l.length;s++)if(a=l[s]){var A=void 0;if(a.constructor===He)A=a.await||a.result;else if(a.then||a.constructor===Array)A=a;else{p=a.limit||0,v=a.offset||0,k=a.suggest,w=a.resolve,g=(($=a.highlight||r.highlight)||a.enrich)&&w,A=a.queue;let z=a.async||A,_=a.index,R=a.query;if(_?r.index||(r.index=_):_=r.index,R||a.tag){const q=a.field||a.pluck;if(q&&(!R||r.query&&!$||(r.query=R,r.field=q,r.highlight=$),_=_.index.get(q)),A&&(j||r.await)){j=1;let Q;const ue=r.C.length,pe=new Promise(function(ce){Q=ce});(function(ce,ae){pe.h=function(){ae.index=null,ae.resolve=!1;let ne=z?ce.searchAsync(ae):ce.search(ae);return ne.then?ne.then(function(re){return r.C[ue]=re=re.result||re,Q(re),re}):(ne=ne.result||ne,Q(ne),ne)}})(_,Object.assign({},a)),r.C.push(pe),h[s]=pe;continue}else a.resolve=!1,a.index=null,A=z?_.searchAsync(a):_.search(a),a.resolve=w,a.index=_}else if(a.and)A=ks(a,"and",_);else if(a.or)A=ks(a,"or",_);else if(a.not)A=ks(a,"not",_);else if(a.xor)A=ks(a,"xor",_);else continue}A.await?(j=1,A=A.await):A.then?(j=1,A=A.then(function(z){return z.result||z})):A=A.result||A,h[s]=A}if(j&&!r.await&&(r.await=new Promise(function(z){r.return=z})),j){const z=Promise.all(h).then(function(_){for(let R=0;R<r.C.length;R++)if(r.C[R]===z){r.C[R]=function(){return i.call(r,_,p,v,g,w,k,$)};break}ei(r)});r.C.push(z)}else if(r.await)r.C.push(function(){return i.call(r,h,p,v,g,w,k,$)});else return i.call(r,h,p,v,g,w,k,$);return w?r.await||r.result:r}function ks(r,s,i){r=r[s];const l=r[0]||r;return l.index||(l.index=i),i=new He(l),r.length>1&&(i=i[s].apply(i,r.slice(1))),i}He.prototype.or=function(){return Cs(this,"or",_d,arguments)};function _d(r,s,i,l,a,h,p){return r.length&&(this.result.length&&r.push(this.result),r.length<2?this.result=r[0]:(this.result=eu(r,s,i,!1,this.h),i=0)),a&&(this.await=null),a?this.resolve(s,i,l,p):this}He.prototype.and=function(){return Cs(this,"and",Ld,arguments)};function Ld(r,s,i,l,a,h,p){if(!h&&!this.result.length)return a?this.result:this;let v;if(r.length)if(this.result.length&&r.unshift(this.result),r.length<2)this.result=r[0];else{let g=0;for(let w=0,k,$;w<r.length;w++)if((k=r[w])&&($=k.length))g<$&&(g=$);else if(!h){g=0;break}g?(this.result=$s(r,g,s,i,h,this.h,a),v=!0):this.result=[]}else h||(this.result=r);return a&&(this.await=null),a?this.resolve(s,i,l,p,v):this}He.prototype.xor=function(){return Cs(this,"xor",bd,arguments)};function bd(r,s,i,l,a,h,p){if(r.length)if(this.result.length&&r.unshift(this.result),r.length<2)this.result=r[0];else{e:{h=i;var v=this.h;const g=[],w=Ye();let k=0;for(let $=0,j;$<r.length;$++)if(j=r[$]){k<j.length&&(k=j.length);for(let A=0,z;A<j.length;A++)if(z=j[A])for(let _=0,R;_<z.length;_++)R=z[_],w[R]=w[R]?2:1}for(let $=0,j,A=0;$<k;$++)for(let z=0,_;z<r.length;z++)if((_=r[z])&&(j=_[$])){for(let R=0,q;R<j.length;R++)if(q=j[R],w[q]===1)if(h)h--;else if(a){if(g.push(q),g.length===s){r=g;break e}}else{const Q=$+(z?v:0);if(g[Q]||(g[Q]=[]),g[Q].push(q),++A===s){r=g;break e}}}r=g}this.result=r,v=!0}else h||(this.result=r);return a&&(this.await=null),a?this.resolve(s,i,l,p,v):this}He.prototype.not=function(){return Cs(this,"not",Id,arguments)};function Id(r,s,i,l,a,h,p){if(!h&&!this.result.length)return a?this.result:this;if(r.length&&this.result.length){e:{h=i;var v=[];r=new Set(r.flat().flat());for(let g=0,w,k=0;g<this.result.length;g++)if(w=this.result[g]){for(let $=0,j;$<w.length;$++)if(j=w[$],!r.has(j)){if(h)h--;else if(a){if(v.push(j),v.length===s){r=v;break e}}else if(v[g]||(v[g]=[]),v[g].push(j),++k===s){r=v;break e}}}r=v}this.result=r,v=!0}return a&&(this.await=null),a?this.resolve(s,i,l,p,v):this}function Ps(r,s,i,l,a){let h,p,v;typeof a=="string"?(h=a,a=""):h=a.template,p=h.indexOf("$1"),v=h.substring(p+2),p=h.substring(0,p);let g=a&&a.boundary,w=!a||a.clip!==!1,k=a&&a.merge&&v&&p&&new RegExp(v+" "+p,"g");a=a&&a.ellipsis;var $=0;if(typeof a=="object"){var j=a.template;$=j.length-2,a=a.pattern}typeof a!="string"&&(a=a===!1?"":"..."),$&&(a=j.replace("$1",a)),j=a.length-$;let A,z;typeof g=="object"&&(A=g.before,A===0&&(A=-1),z=g.after,z===0&&(z=-1),g=g.total||9e5),$=new Map;for(let S=0,O,W,ge;S<s.length;S++){let V;if(l)V=s,ge=l;else{var _=s[S];if(ge=_.field,!ge)continue;V=_.result}W=i.get(ge),O=W.encoder,_=$.get(O),typeof _!="string"&&(_=O.encode(r),$.set(O,_));for(let ee=0;ee<V.length;ee++){var R=V[ee].doc;if(!R||(R=Ar(R,ge),!R))continue;var q=R.trim().split(/\s+/);if(!q.length)continue;R="";var Q=[];let G=[];for(var ue=-1,pe=-1,ce=0,ae=0;ae<q.length;ae++){var ne=q[ae],re=O.encode(ne);re=re.length>1?re.join(" "):re[0];let H;if(re&&ne){for(var fe=ne.length,b=(O.split?ne.replace(O.split,""):ne).length-re.length,M="",K=0,se=0;se<_.length;se++){var he=_[se];if(he){var Se=he.length;Se+=b<0?0:b,K&&Se<=K||(he=re.indexOf(he),he>-1&&(M=(he?ne.substring(0,he):"")+p+ne.substring(he,he+Se)+v+(he+Se<fe?ne.substring(he+Se):""),K=Se,H=!0))}}M&&(g&&(ue<0&&(ue=R.length+(R?1:0)),pe=R.length+(R?1:0)+M.length,ce+=fe,G.push(Q.length),Q.push({match:M})),R+=(R?" ":"")+M)}if(!H)ne=q[ae],R+=(R?" ":"")+ne,g&&Q.push({text:ne});else if(g&&ce>=g)break}if(ce=G.length*(h.length-2),A||z||g&&R.length-ce>g)if(ce=g+ce-j*2,ae=pe-ue,A>0&&(ae+=A),z>0&&(ae+=z),ae<=ce)q=A?ue-(A>0?A:0):ue-((ce-ae)/2|0),Q=z?pe+(z>0?z:0):q+ce,w||(q>0&&R.charAt(q)!==" "&&R.charAt(q-1)!==" "&&(q=R.indexOf(" ",q),q<0&&(q=0)),Q<R.length&&R.charAt(Q-1)!==" "&&R.charAt(Q)!==" "&&(Q=R.lastIndexOf(" ",Q),Q<pe?Q=pe:++Q)),R=(q?a:"")+R.substring(q,Q)+(Q<R.length?a:"");else{for(pe=[],ue={},ce={},ae={},ne={},re={},M=b=fe=0,se=K=1;;){var Te=void 0;for(let H=0,ie;H<G.length;H++){if(ie=G[H],M)if(b!==M){if(ae[H+1])continue;if(ie+=M,ue[ie]){fe-=j,ce[H+1]=1,ae[H+1]=1;continue}if(ie>=Q.length-1){if(ie>=Q.length){ae[H+1]=1,ie>=q.length&&(ce[H+1]=1);continue}fe-=j}if(R=Q[ie].text,Se=z&&re[H])if(Se>0){if(R.length>Se)if(ae[H+1]=1,w)R=R.substring(0,Se);else continue;(Se-=R.length)||(Se=-1),re[H]=Se}else{ae[H+1]=1;continue}if(fe+R.length+1<=g)R=" "+R,pe[H]+=R;else if(w)Te=g-fe-1,Te>0&&(R=" "+R.substring(0,Te),pe[H]+=R),ae[H+1]=1;else{ae[H+1]=1;continue}}else{if(ae[H])continue;if(ie-=b,ue[ie]){fe-=j,ae[H]=1,ce[H]=1;continue}if(ie<=0){if(ie<0){ae[H]=1,ce[H]=1;continue}fe-=j}if(R=Q[ie].text,Se=A&&ne[H])if(Se>0){if(R.length>Se)if(ae[H]=1,w)R=R.substring(R.length-Se);else continue;(Se-=R.length)||(Se=-1),ne[H]=Se}else{ae[H]=1;continue}if(fe+R.length+1<=g)R+=" ",pe[H]=R+pe[H];else if(w)Te=R.length+1-(g-fe),Te>=0&&Te<R.length&&(R=R.substring(Te)+" ",pe[H]=R+pe[H]),ae[H]=1;else{ae[H]=1;continue}}else{R=Q[ie].match,A&&(ne[H]=A),z&&(re[H]=z),H&&fe++;let Ne;if(ie?!H&&j&&(fe+=j):(ce[H]=1,ae[H]=1),ie>=q.length-1||ie<Q.length-1&&Q[ie+1].match?Ne=1:j&&(fe+=j),fe-=h.length-2,!H||fe+R.length<=g)pe[H]=R;else{Te=K=se=ce[H]=0;break}Ne&&(ce[H+1]=1,ae[H+1]=1)}fe+=R.length,Te=ue[ie]=1}if(Te)b===M?M++:b++;else{if(b===M?K=0:se=0,!K&&!se)break;K?(b++,M=b):M++}}R="";for(let H=0,ie;H<pe.length;H++)ie=(ce[H]?H?" ":"":(H&&!a?" ":"")+a)+pe[H],R+=ie;a&&!ce[pe.length]&&(R+=a)}k&&(R=R.replace(k," ")),V[ee].highlight=R}if(l)break}return s}function He(r,s){if(!this||this.constructor!==He)return new He(r,s);let i=0,l,a,h,p,v,g;if(r&&r.index){const w=r;if(s=w.index,i=w.boost||0,a=w.query){h=w.field||w.pluck,p=w.highlight;const k=w.resolve;r=w.async||w.queue,w.resolve=!1,w.index=null,r=r?s.searchAsync(w):s.search(w),w.resolve=k,w.index=s,r=r.result||r}else r=[]}if(r&&r.then){const w=this;r=r.then(function(k){w.C[0]=w.result=k.result||k,ei(w)}),l=[r],r=[],v=new Promise(function(k){g=k})}this.index=s||null,this.result=r||[],this.h=i,this.C=l||[],this.await=v||null,this.return=g||null,this.highlight=p||null,this.query=a||"",this.field=h||""}ve=He.prototype,ve.limit=function(r){if(this.await){const s=this;this.C.push(function(){return s.limit(r).result})}else if(this.result.length){const s=[];for(let i=0,l;i<this.result.length;i++)if(l=this.result[i])if(l.length<=r){if(s[i]=l,r-=l.length,!r)break}else{s[i]=l.slice(0,r);break}this.result=s}return this},ve.offset=function(r){if(this.await){const s=this;this.C.push(function(){return s.offset(r).result})}else if(this.result.length){const s=[];for(let i=0,l;i<this.result.length;i++)(l=this.result[i])&&(l.length<=r?r-=l.length:(s[i]=l.slice(r),r=0));this.result=s}return this},ve.boost=function(r){if(this.await){const s=this;this.C.push(function(){return s.boost(r).result})}else this.h+=r;return this};function ei(r,s){let i=r.result;var l=r.await;r.await=null;for(let a=0,h;a<r.C.length;a++)if(h=r.C[a]){if(typeof h=="function")i=h(),r.C[a]=i=i.result||i,a--;else if(h.h)i=h.h(),r.C[a]=i=i.result||i,a--;else if(h.then)return r.await=l}return l=r.return,r.C=[],r.return=null,s||l(i),i}ve.resolve=function(r,s,i,l,a){let h=this.await?ei(this,!0):this.result;if(h.then){const p=this;return h.then(function(){return p.resolve(r,s,i,l,a)})}return h.length&&(typeof r=="object"?(l=r.highlight||this.highlight,i=!!l||r.enrich,s=r.offset,r=r.limit):(l=l||this.highlight,i=!!l||i),h=a?i?Yn.call(this.index,h):h:Zo.call(this.index,h,r||100,s,i)),this.finalize(h,l)},ve.finalize=function(r,s){if(r.then){const l=this;return r.then(function(a){return l.finalize(a,s)})}s&&r.length&&this.query&&(r=Ps(this.query,r,this.index.index,this.field,s));const i=this.return;return this.highlight=this.index=this.result=this.C=this.await=this.return=null,this.query=this.field="",i&&i(r),r};function $s(r,s,i,l,a,h,p){const v=r.length;let g=[],w,k;w=Ye();for(let $=0,j,A,z,_;$<s;$++)for(let R=0;R<v;R++)if(z=r[R],$<z.length&&(j=z[$]))for(let q=0;q<j.length;q++){if(A=j[q],(k=w[A])?w[A]++:(k=0,w[A]=1),_=g[k]||(g[k]=[]),!p){let Q=$+(R||!a?0:h||0);_=_[Q]||(_[Q]=[])}if(_.push(A),p&&i&&k===v-1&&_.length-l===i)return l?_.slice(l):_}if(r=g.length)if(a)g=g.length>1?eu(g,i,l,p,h):(g=g[0])&&i&&g.length>i||l?g.slice(l,i+l):g;else{if(r<v)return[];if(g=g[r-1],i||l)if(p)(g.length>i||l)&&(g=g.slice(l,i+l));else{a=[];for(let $=0,j;$<g.length;$++)if(j=g[$]){if(l&&j.length>l)l-=j.length;else if((i&&j.length>i||l)&&(j=j.slice(l,i+l),i-=j.length,l&&(l-=j.length)),a.push(j),!i)break}g=a}}return g}function eu(r,s,i,l,a){const h=[],p=Ye();let v;var g=r.length;let w;if(l){for(a=g-1;a>=0;a--)if(w=(l=r[a])&&l.length){for(g=0;g<w;g++)if(v=l[g],!p[v]){if(p[v]=1,i)i--;else if(h.push(v),h.length===s)return h}}}else for(let k=g-1,$,j=0;k>=0;k--){$=r[k];for(let A=0;A<$.length;A++)if(w=(l=$[A])&&l.length){for(let z=0;z<w;z++)if(v=l[z],!p[v])if(p[v]=1,i)i--;else{let _=(A+(k<g-1&&a||0))/(k+1)|0;if((h[_]||(h[_]=[])).push(v),++j===s)return h}}}return h}function Fd(r,s,i,l,a){const h=Ye(),p=[];for(let v=0,g;v<s.length;v++){g=s[v];for(let w=0;w<g.length;w++)h[g[w]]=1}if(a){for(let v=0,g;v<r.length;v++)if(g=r[v],h[g]){if(l)l--;else if(p.push(g),h[g]=0,i&&--i===0)break}}else for(let v=0,g,w;v<r.result.length;v++)for(g=r.result[v],s=0;s<g.length;s++)w=g[s],h[w]&&((p[v]||(p[v]=[])).push(w),h[w]=0);return p}An.prototype.search=function(r,s,i,l){i||(!s&&jr(r)?(i=r,r=""):jr(s)&&(i=s,s=0));let a=[];var h=[];let p,v,g,w,k,$,j=0,A=!0,z;if(i){i.constructor===Array&&(i={index:i}),r=i.query||r,p=i.pluck,v=i.merge,w=i.boost,$=p||i.field||($=i.index)&&($.index?null:$);var _=this.tag&&i.tag;g=i.suggest,A=i.resolve!==!1,k=i.cache,z=A&&this.store&&i.highlight;var R=!!z||A&&this.store&&i.enrich;s=i.limit||s;var q=i.offset||0;if(s||(s=A?100:0),_&&(!this.db||!l)){_.constructor!==Array&&(_=[_]);var Q=[];for(let ne=0,re;ne<_.length;ne++)if(re=_[ne],re.field&&re.tag){var ue=re.tag;if(ue.constructor===Array)for(var pe=0;pe<ue.length;pe++)Q.push(re.field,ue[pe]);else Q.push(re.field,ue)}else{ue=Object.keys(re);for(let fe=0,b,M;fe<ue.length;fe++)if(b=ue[fe],M=re[b],M.constructor===Array)for(pe=0;pe<M.length;pe++)Q.push(b,M[pe]);else Q.push(b,M)}if(_=Q,!r){if(h=[],Q.length)for(_=0;_<Q.length;_+=2){if(this.db){if(l=this.index.get(Q[_]),!l)continue;h.push(l=l.db.tag(Q[_+1],s,q,R))}else l=Md.call(this,Q[_],Q[_+1],s,q,R);a.push(A?{field:Q[_],tag:Q[_+1],result:l}:[l])}if(h.length){const ne=this;return Promise.all(h).then(function(re){for(let fe=0;fe<re.length;fe++)A?a[fe].result=re[fe]:a[fe]=re[fe];return A?a:new He(a.length>1?$s(a,1,0,0,g,w):a[0],ne)})}return A?a:new He(a.length>1?$s(a,1,0,0,g,w):a[0],this)}}A||p||!($=$||this.field)||(Rt($)?p=$:($.constructor===Array&&$.length===1&&($=$[0]),p=$.field||$.index)),$&&$.constructor!==Array&&($=[$])}$||($=this.field);let ce;Q=(this.worker||this.db)&&!l&&[];for(let ne=0,re,fe,b;ne<$.length;ne++){if(fe=$[ne],this.db&&this.tag&&!this.B[ne])continue;let M;if(Rt(fe)||(M=fe,fe=M.field,r=M.query||r,s=qn(M.limit,s),q=qn(M.offset,q),g=qn(M.suggest,g),z=A&&this.store&&qn(M.highlight,z),R=!!z||A&&this.store&&qn(M.enrich,R),k=qn(M.cache,k)),l)re=l[ne];else{ue=M||i||{},pe=ue.enrich;var ae=this.index.get(fe);if(_&&(this.db&&(ue.tag=_,ue.field=$,ce=ae.db.support_tag_search),!ce&&pe&&(ue.enrich=!1),ce||(ue.limit=0,ue.offset=0)),re=k?ae.searchCache(r,_&&!ce?0:s,ue):ae.search(r,_&&!ce?0:s,ue),_&&!ce&&(ue.limit=s,ue.offset=q),pe&&(ue.enrich=pe),Q){Q[ne]=re;continue}}if(b=(re=re.result||re)&&re.length,_&&b){if(ue=[],pe=0,this.db&&l){if(!ce)for(ae=$.length;ae<l.length;ae++){let K=l[ae];if(K&&K.length)pe++,ue.push(K);else if(!g)return A?a:new He(a,this)}}else for(let K=0,se,he;K<_.length;K+=2){if(se=this.tag.get(_[K]),!se){if(g)continue;return A?a:new He(a,this)}if(he=(se=se&&se.get(_[K+1]))&&se.length)pe++,ue.push(se);else if(!g)return A?a:new He(a,this)}if(pe){if(re=Fd(re,ue,s,q,A),b=re.length,!b&&!g)return A?re:new He(re,this);pe--}}if(b)h[j]=fe,a.push(re),j++;else if($.length===1)return A?a:new He(a,this)}if(Q){if(this.db&&_&&_.length&&!ce)for(R=0;R<_.length;R+=2){if(h=this.index.get(_[R]),!h){if(g)continue;return A?a:new He(a,this)}Q.push(h.db.tag(_[R+1],s,q,!1))}const ne=this;return Promise.all(Q).then(function(re){return i&&(i.resolve=A),re.length&&(re=ne.search(r,s,i,re)),re})}if(!j)return A?a:new He(a,this);if(p&&(!R||!this.store))return a=a[0],A?a:new He(a,this);for(Q=[],q=0;q<h.length;q++){if(_=a[q],R&&_.length&&typeof _[0].doc>"u"&&(this.db?Q.push(_=this.index.get(this.field[0]).db.enrich(_)):_=Yn.call(this,_)),p)return A?z?Ps(r,_,this.index,p,z):_:new He(_,this);a[q]={field:h[q],result:_}}if(R&&this.db&&Q.length){const ne=this;return Promise.all(Q).then(function(re){for(let fe=0;fe<re.length;fe++)a[fe].result=re[fe];return z&&(a=Ps(r,a,ne.index,p,z)),v?tu(a):a})}return z&&(a=Ps(r,a,this.index,p,z)),v?tu(a):a};function tu(r){const s=[],i=Ye(),l=Ye();for(let a=0,h,p,v,g,w,k,$;a<r.length;a++){h=r[a],p=h.field,v=h.result;for(let j=0;j<v.length;j++)w=v[j],typeof w!="object"?w={id:g=w}:g=w.id,(k=i[g])?k.push(p):(w.field=i[g]=[p],s.push(w)),($=w.highlight)&&(k=l[g],k||(l[g]=k={},w.highlight=k),k[p]=$)}return s}function Md(r,s,i,l,a){return r=this.tag.get(r),r?(r=r.get(s),r?(s=r.length-l,s>0&&((i&&s>i||l)&&(r=r.slice(l,l+i)),a&&(r=Yn.call(this,r))),r):[]):[]}function Yn(r){if(!this||!this.store)return r;if(this.db)return this.index.get(this.field[0]).db.enrich(r);const s=Array(r.length);for(let i=0,l;i<r.length;i++)l=r[i],s[i]={id:l,doc:this.store.get(l)};return s}function An(r){if(!this||this.constructor!==An)return new An(r);const s=r.document||r.doc||r;let i,l;if(this.B=[],this.field=[],this.D=[],this.key=(i=s.key||s.id)&&Es(i,this.D)||"id",(l=r.keystore||0)&&(this.keystore=l),this.fastupdate=!!r.fastupdate,this.reg=!this.fastupdate||r.worker||r.db?l?new Lt(l):new Set:l?new _t(l):new Map,this.h=(i=s.store||null)&&i&&i!==!0&&[],this.store=i?l?new _t(l):new Map:null,this.cache=(i=r.cache||null)&&new jn(i),r.cache=!1,this.worker=r.worker||!1,this.priority=r.priority||4,this.index=zd.call(this,r,s),this.tag=null,(i=s.tag)&&(typeof i=="string"&&(i=[i]),i.length)){this.tag=new Map,this.A=[],this.F=[];for(let a=0,h,p;a<i.length;a++){if(h=i[a],p=h.field||h,!p)throw Error("The tag field from the document descriptor is undefined.");h.custom?this.A[a]=h.custom:(this.A[a]=Es(p,this.D),h.filter&&(typeof this.A[a]=="string"&&(this.A[a]=new String(this.A[a])),this.A[a].G=h.filter)),this.F[a]=p,this.tag.set(p,new Map)}}if(this.worker){this.fastupdate=!1,r=[];for(const a of this.index.values())a.then&&r.push(a);if(r.length){const a=this;return Promise.all(r).then(function(h){let p=0;for(const v of a.index.entries()){const g=v[0];let w=v[1];w.then&&(w=h[p],a.index.set(g,w),p++)}return a})}}else r.db&&(this.fastupdate=!1,this.mount(r.db))}ve=An.prototype,ve.mount=function(r){let s=this.field;if(this.tag)for(let h=0,p;h<this.F.length;h++){p=this.F[h];var i=void 0;this.index.set(p,i=new Mt({},this.reg)),s===this.field&&(s=s.slice(0)),s.push(p),i.tag=this.tag.get(p)}i=[];const l={db:r.db,type:r.type,fastupdate:r.fastupdate};for(let h=0,p,v;h<s.length;h++){l.field=v=s[h],p=this.index.get(v);const g=new r.constructor(r.id,l);g.id=r.id,i[h]=g.mount(p),p.document=!0,h?p.bypass=!0:p.store=this.store}const a=this;return this.db=Promise.all(i).then(function(){a.db=!0})},ve.commit=async function(){const r=[];for(const s of this.index.values())r.push(s.commit());await Promise.all(r),this.reg.clear()},ve.destroy=function(){const r=[];for(const s of this.index.values())r.push(s.destroy());return Promise.all(r)};function zd(r,s){const i=new Map;let l=s.index||s.field||s;Rt(l)&&(l=[l]);for(let h=0,p,v;h<l.length;h++){if(p=l[h],Rt(p)||(v=p,p=p.field),v=jr(v)?Object.assign({},r,v):r,this.worker){var a=void 0;a=(a=v.encoder)&&a.encode?a:new Wn(typeof a=="string"?Go[a]:a||{}),a=new Jn(v,a),i.set(p,a)}this.worker||i.set(p,new Mt(v,this.reg)),v.custom?this.B[h]=v.custom:(this.B[h]=Es(p,this.D),v.filter&&(typeof this.B[h]=="string"&&(this.B[h]=new String(this.B[h])),this.B[h].G=v.filter)),this.field[h]=p}if(this.h){r=s.store,Rt(r)&&(r=[r]);for(let h=0,p,v;h<r.length;h++)p=r[h],v=p.field||p,p.custom?(this.h[h]=p.custom,p.custom.O=v):(this.h[h]=Es(v,this.D),p.filter&&(typeof this.h[h]=="string"&&(this.h[h]=new String(this.h[h])),this.h[h].G=p.filter))}return i}function Es(r,s){const i=r.split(":");let l=0;for(let a=0;a<i.length;a++)r=i[a],r[r.length-1]==="]"&&(r=r.substring(0,r.length-2))&&(s[l]=!0),r&&(i[l++]=r);return l<i.length&&(i.length=l),l>1?i:i[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){jr(r)&&(r=Ar(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 i of this.tag.values())for(let l of i){s=l[0];const a=l[1],h=a.indexOf(r);h>-1&&(a.length>1?a.splice(h,1):i.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 i=s.clear();i.then&&r.push(i)}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=Ar(s,this.key)),this.store.set(r,s),this},ve.searchCache=Wo,ve.export=Dd,ve.import=Ud,Qo(An.prototype);function ti(r,s=0){let i=[],l=[];s&&(s=25e4/s*5e3|0);for(const a of r.entries())l.push(a),l.length===s&&(i.push(l),l=[]);return l.length&&i.push(l),i}function ni(r,s){s||(s=new Map);for(let i=0,l;i<r.length;i++)l=r[i],s.set(l[0],l[1]);return s}function nu(r,s=0){let i=[],l=[];s&&(s=25e4/s*1e3|0);for(const a of r.entries())l.push([a[0],ti(a[1])[0]||[]]),l.length===s&&(i.push(l),l=[]);return l.length&&i.push(l),i}function ru(r,s){s||(s=new Map);for(let i=0,l,a;i<r.length;i++)l=r[i],a=s.get(l[0]),s.set(l[0],ni(l[1],a));return s}function su(r){let s=[],i=[];for(const l of r.keys())i.push(l),i.length===25e4&&(s.push(i),i=[]);return i.length&&s.push(i),s}function ou(r,s){s||(s=new Set);for(let i=0;i<r.length;i++)s.add(r[i]);return s}function js(r,s,i,l,a,h,p=0){const v=l&&l.constructor===Array;var g=v?l.shift():l;if(!g)return this.export(r,s,a,h+1);if((g=r((s?s+".":"")+(p+1)+"."+i,JSON.stringify(g)))&&g.then){const w=this;return g.then(function(){return js.call(w,r,s,i,v?l:null,a,h,p+1)})}return js.call(this,r,s,i,v?l:null,a,h,p+1)}function Dd(r,s,i=0,l=0){if(i<this.field.length){const p=this.field[i];if((s=this.index.get(p).export(r,p,i,l=1))&&s.then){const v=this;return s.then(function(){return v.export(r,p,i+1)})}return this.export(r,p,i+1)}let a,h;switch(l){case 0:a="reg",h=su(this.reg),s=null;break;case 1:a="tag",h=this.tag&&nu(this.tag,this.reg.size),s=null;break;case 2:a="doc",h=this.store&&ti(this.store),s=null;break;default:return}return js.call(this,r,s,a,h||null,i,l)}function Ud(r,s){var i=r.split(".");i[i.length-1]==="json"&&i.pop();const l=i.length>2?i[0]:"";if(i=i.length>2?i[2]:i[1],this.worker&&l)return this.index.get(l).import(r);if(s){if(typeof s=="string"&&(s=JSON.parse(s)),l)return this.index.get(l).import(i,s);switch(i){case"reg":this.fastupdate=!1,this.reg=ou(s,this.reg);for(let a=0,h;a<this.field.length;a++)h=this.index.get(this.field[a]),h.fastupdate=!1,h.reg=this.reg;if(this.worker){s=[];for(const a of this.index.values())s.push(a.import(r));return Promise.all(s)}break;case"tag":this.tag=ru(s,this.tag);break;case"doc":this.store=ni(s,this.store)}}}function iu(r,s){let i="";for(const l of r.entries()){r=l[0];const a=l[1];let h="";for(let p=0,v;p<a.length;p++){v=a[p]||[""];let g="";for(let w=0;w<v.length;w++)g+=(g?",":"")+(s==="string"?'"'+v[w]+'"':v[w]);g="["+g+"]",h+=(h?",":"")+g}h='["'+r+'",['+h+"]]",i+=(i?",":"")+h}return i}Mt.prototype.remove=function(r,s){const i=this.reg.size&&(this.fastupdate?this.reg.get(r):this.reg.has(r));if(i){if(this.fastupdate){for(let l=0,a,h;l<i.length;l++)if((a=i[l])&&(h=a.length))if(a[h-1]===r)a.pop();else{const p=a.indexOf(r);p>=0&&a.splice(p,1)}}else Or(this.map,r),this.depth&&Or(this.ctx,r);s||this.reg.delete(r)}return this.db&&(this.commit_task.push({del:r}),this.M&&cu(this)),this.cache&&this.cache.remove(r),this};function Or(r,s){let i=0;var l=typeof s>"u";if(r.constructor===Array){for(let a=0,h,p,v;a<r.length;a++)if((h=r[a])&&h.length){if(l)return 1;if(p=h.indexOf(s),p>=0){if(h.length>1)return h.splice(p,1),1;if(delete r[a],i)return 1;v=1}else{if(v)return 1;i++}}}else for(let a of r.entries())l=a[0],Or(a[1],s)?i++:r.delete(l);return i}const Bd={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,i,l){if(s&&(r||r===0)){if(!l&&!i&&this.reg.has(r))return this.update(r,s);l=this.depth,s=this.encoder.encode(s,!l);const w=s.length;if(w){const k=Ye(),$=Ye(),j=this.resolution;for(let A=0;A<w;A++){let z=s[this.rtl?w-1-A:A];var a=z.length;if(a&&(l||!$[z])){var h=this.score?this.score(s,z,A,null,0):As(j,w,A),p="";switch(this.tokenize){case"tolerant":if(Wt(this,$,z,h,r,i),a>2){for(let _=1,R,q,Q,ue;_<a-1;_++)R=z.charAt(_),q=z.charAt(_+1),Q=z.substring(0,_)+q,ue=z.substring(_+2),p=Q+R+ue,Wt(this,$,p,h,r,i),p=Q+ue,Wt(this,$,p,h,r,i);Wt(this,$,z.substring(0,z.length-1),h,r,i)}break;case"full":if(a>2){for(let _=0,R;_<a;_++)for(h=a;h>_;h--){p=z.substring(_,h),R=this.rtl?a-1-_:_;var v=this.score?this.score(s,z,A,p,R):As(j,w,A,a,R);Wt(this,$,p,v,r,i)}break}case"bidirectional":case"reverse":if(a>1){for(v=a-1;v>0;v--){p=z[this.rtl?a-1-v:v]+p;var g=this.score?this.score(s,z,A,p,v):As(j,w,A,a,v);Wt(this,$,p,g,r,i)}p=""}case"forward":if(a>1){for(v=0;v<a;v++)p+=z[this.rtl?a-1-v:v],Wt(this,$,p,h,r,i);break}default:if(Wt(this,$,z,h,r,i),l&&w>1&&A<w-1)for(a=this.N,p=z,h=Math.min(l+1,this.rtl?A+1:w-A),v=1;v<h;v++){z=s[this.rtl?w-1-A-v:A+v],g=this.bidirectional&&z>p;const _=this.score?this.score(s,p,A,z,v-1):As(a+(w/2>a?0:1),w,A,h-1,v-1);Wt(this,k,g?p:z,_,r,i,g?z:p)}}}}this.fastupdate||this.reg.add(r)}}return this.db&&(this.commit_task.push(i?{ins:r}:{del:r}),this.M&&cu(this)),this};function Wt(r,s,i,l,a,h,p){let v,g;if(!(v=s[i])||p&&!v[p]){if(p?(s=v||(s[i]=Ye()),s[p]=1,g=r.ctx,(v=g.get(p))?g=v:g.set(p,g=r.keystore?new _t(r.keystore):new Map)):(g=r.map,s[i]=1),(v=g.get(i))?g=v:g.set(i,g=v=[]),h){for(let w=0,k;w<v.length;w++)if((k=v[w])&&k.includes(a)){if(w<=l)return;k.splice(k.indexOf(a),1),r.fastupdate&&(s=r.reg.get(a))&&s.splice(s.indexOf(k),1);break}}if(g=g[l]||(g[l]=[]),g.push(a),g.length===2**31-1){if(s=new Kn(g),r.fastupdate)for(let w of r.reg.values())w.includes(g)&&(w[w.indexOf(g)]=s);v[l]=g=s}r.fastupdate&&((l=r.reg.get(a))?l.push(g):r.reg.set(a,[g]))}}function As(r,s,i,l,a){return i&&r>1?s+(l||0)<=r?i+(a||0):(r-1)/(s+(l||0))*(i+(a||0))+1|0:0}Mt.prototype.search=function(r,s,i){if(i||(s||typeof r!="object"?typeof s=="object"&&(i=s,s=0):(i=r,r="")),i&&i.cache)return i.cache=!1,r=this.searchCache(r,s,i),i.cache=!0,r;let l=[],a,h,p,v=0,g,w,k,$,j;i&&(r=i.query||r,s=i.limit||s,v=i.offset||0,h=i.context,p=i.suggest,j=(g=i.resolve)&&i.enrich,k=i.boost,$=i.resolution,w=this.db&&i.tag),typeof g>"u"&&(g=this.resolve),h=this.depth&&h!==!1;let A=this.encoder.encode(r,!h);if(a=A.length,s=s||(g?100:0),a===1)return au.call(this,A[0],"",s,v,g,j,w);if(a===2&&h&&!p)return au.call(this,A[1],A[0],s,v,g,j,w);let z=Ye(),_=0,R;if(h&&(R=A[0],_=1),$||$===0||($=R?this.N:this.resolution),this.db){if(this.db.search&&(i=this.db.search(this,A,s,v,p,g,j,w),i!==!1))return i;const q=this;return(async function(){for(let Q,ue;_<a;_++){if((ue=A[_])&&!z[ue]){if(z[ue]=1,Q=await ri(q,ue,R,0,0,!1,!1),Q=uu(Q,l,p,$)){l=Q;break}R&&(p&&Q&&l.length||(R=ue))}p&&R&&_===a-1&&!l.length&&($=q.resolution,R="",_=-1,z=Ye())}return lu(l,$,s,v,p,k,g)})()}for(let q,Q;_<a;_++){if((Q=A[_])&&!z[Q]){if(z[Q]=1,q=ri(this,Q,R,0,0,!1,!1),q=uu(q,l,p,$)){l=q;break}R&&(p&&q&&l.length||(R=Q))}p&&R&&_===a-1&&!l.length&&($=this.resolution,R="",_=-1,z=Ye())}return lu(l,$,s,v,p,k,g)};function lu(r,s,i,l,a,h,p){let v=r.length,g=r;if(v>1)g=$s(r,s,i,l,a,h,p);else if(v===1)return p?Zo.call(null,r[0],i,l):new He(r[0],this);return p?g:new He(g,this)}function au(r,s,i,l,a,h,p){return r=ri(this,r,s,i,l,a,h,p),this.db?r.then(function(v){return a?v||[]:new He(v,this)}):r&&r.length?a?Zo.call(this,r,i,l):new He(r,this):a?[]:new He([],this)}function uu(r,s,i,l){let a=[];if(r&&r.length){if(r.length<=l){s.push(r);return}for(let h=0,p;h<l;h++)(p=r[h])&&(a[h]=p);if(a.length){s.push(a);return}}if(!i)return a}function ri(r,s,i,l,a,h,p,v){let g;return i&&(g=r.bidirectional&&s>i)&&(g=i,i=s,s=g),r.db?r.db.get(s,i,l,a,h,p,v):(r=i?(r=r.ctx.get(i))&&r.get(s):r.map.get(s),r)}function Mt(r,s){if(!this||this.constructor!==Mt)return new Mt(r);if(r){var i=Rt(r)?r:r.preset;i&&(r=Object.assign({},Bd[i],r))}else r={};i=r.context;const l=i===!0?{depth:1}:i||{},a=Rt(r.encoder)?Go[r.encoder]:r.encode||r.encoder||{};this.encoder=a.encode?a:typeof a=="object"?new Wn(a):{encode:a},this.resolution=r.resolution||9,this.tokenize=i=(i=r.tokenize)&&i!=="default"&&i!=="exact"&&i||"strict",this.depth=i==="strict"&&l.depth||0,this.bidirectional=l.bidirectional!==!1,this.fastupdate=!!r.fastupdate,this.score=r.score||null,(i=r.keystore||0)&&(this.keystore=i),this.map=i?new _t(i):new Map,this.ctx=i?new _t(i):new Map,this.reg=s||(this.fastupdate?i?new _t(i):new Map:i?new Lt(i):new Set),this.N=l.resolution||3,this.rtl=a.rtl||r.rtl||!1,this.cache=(i=r.cache||null)&&new jn(i),this.resolve=r.resolve!==!1,(i=r.db)&&(this.db=this.mount(i)),this.M=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(){return this.commit_timer&&(clearTimeout(this.commit_timer),this.commit_timer=null),this.db.commit(this)},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)},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=[],this.db.clear()):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 i=this,l=this.remove(r);return l&&l.then?l.then(()=>i.add(r,s)):this.add(r,s)},ve.cleanup=function(){return this.fastupdate?(Or(this.map),this.depth&&Or(this.ctx),this):this},ve.searchCache=Wo,ve.export=function(r,s,i=0,l=0){let a,h;switch(l){case 0:a="reg",h=su(this.reg);break;case 1:a="cfg",h=null;break;case 2:a="map",h=ti(this.map,this.reg.size);break;case 3:a="ctx",h=nu(this.ctx,this.reg.size);break;default:return}return js.call(this,r,s,a,h,i,l)},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=r.length>1?r[1]:r[0],r){case"reg":this.fastupdate=!1,this.reg=ou(s,this.reg);break;case"map":this.map=ni(s,this.map);break;case"ctx":this.ctx=ru(s,this.ctx)}},ve.serialize=function(r=!0){let s="",i="",l="";if(this.reg.size){let h;for(var a of this.reg.keys())h||(h=typeof a),s+=(s?",":"")+(h==="string"?'"'+a+'"':a);s="index.reg=new Set(["+s+"]);",i=iu(this.map,h),i="index.map=new Map(["+i+"]);";for(const p of this.ctx.entries()){a=p[0];let v=iu(p[1],h);v="new Map(["+v+"])",v='["'+a+'",'+v+"]",l+=(l?",":"")+v}l="index.ctx=new Map(["+l+"]);"}return r?"function inject(index){"+s+i+l+"}":s+i+l},Qo(Mt.prototype);const fu=typeof window<"u"&&(window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),Ts=["map","ctx","tag","reg","cfg"],Tn=Ye();function si(r,s={}){if(!this||this.constructor!==si)return new si(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=si.prototype,ve.mount=function(r){return r.index?r.mount(this):(r.db=this,this.open())},ve.open=function(){if(this.db)return this.db;let r=this;navigator.storage&&navigator.storage.persist&&navigator.storage.persist(),Tn[r.id]||(Tn[r.id]=[]),Tn[r.id].push(r.field);const s=fu.open(r.id,1);return s.onupgradeneeded=function(){const i=r.db=this.result;for(let l=0,a;l<Ts.length;l++){a=Ts[l];for(let h=0,p;h<Tn[r.id].length;h++)p=Tn[r.id][h],i.objectStoreNames.contains(a+(a!=="reg"&&p?":"+p:""))||i.createObjectStore(a+(a!=="reg"&&p?":"+p:""))}},r.db=rn(s,function(i){r.db=i,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 rn(r)},ve.clear=function(){const r=[];for(let i=0,l;i<Ts.length;i++){l=Ts[i];for(let a=0,h;a<Tn[this.id].length;a++)h=Tn[this.id][a],r.push(l+(l!=="reg"&&h?":"+h:""))}const s=this.db.transaction(r,"readwrite");for(let i=0;i<r.length;i++)s.objectStore(r[i]).clear();return rn(s)},ve.get=function(r,s,i=0,l=0,a=!0,h=!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 p=this;return rn(r).then(function(v){let g=[];if(!v||!v.length)return g;if(a){if(!i&&!l&&v.length===1)return v[0];for(let w=0,k;w<v.length;w++)if((k=v[w])&&k.length){if(l>=k.length){l-=k.length;continue}const $=i?l+Math.min(k.length-l,i):k.length;for(let j=l;j<$;j++)g.push(k[j]);if(l=0,g.length===i)break}return h?p.enrich(g):g}return v})},ve.tag=function(r,s=0,i=0,l=!1){r=this.db.transaction("tag"+(this.field?":"+this.field:""),"readonly").objectStore("tag"+(this.field?":"+this.field:"")).get(r);const a=this;return rn(r).then(function(h){return!h||!h.length||i>=h.length?[]:!s&&!i?h:(h=h.slice(i,i+s),l?a.enrich(h):h)})},ve.enrich=function(r){typeof r!="object"&&(r=[r]);const s=this.db.transaction("reg","readonly").objectStore("reg"),i=[];for(let l=0;l<r.length;l++)i[l]=rn(s.get(r[l]));return Promise.all(i).then(function(l){for(let a=0;a<l.length;a++)l[a]={id:r[a],doc:l[a]?JSON.parse(l[a]):null};return l})},ve.has=function(r){return r=this.db.transaction("reg","readonly").objectStore("reg").getKey(r),rn(r).then(function(s){return!!s})},ve.search=null,ve.info=function(){},ve.transaction=function(r,s,i){r+=r!=="reg"&&this.field?":"+this.field:"";let l=this.h[r+":"+s];if(l)return i.call(this,l);let a=this.db.transaction(r,s);this.h[r+":"+s]=l=a.objectStore(r);const h=i.call(this,l);return this.h[r+":"+s]=null,rn(a).finally(function(){return h})},ve.commit=async function(r){let s=r.commit_task,i=[];r.commit_task=[];for(let l=0,a;l<s.length;l++)a=s[l],a.del&&i.push(a.del);i.length&&await this.remove(i),r.reg.size&&(await this.transaction("map","readwrite",function(l){for(const a of r.map){const h=a[0],p=a[1];p.length&&(l.get(h).onsuccess=function(){let v=this.result;var g;if(v&&v.length){const w=Math.max(v.length,p.length);for(let k=0,$,j;k<w;k++)if((j=p[k])&&j.length){if(($=v[k])&&$.length)for(g=0;g<j.length;g++)$.push(j[g]);else v[k]=j;g=1}}else v=p,g=1;g&&l.put(v,h)})}}),await this.transaction("ctx","readwrite",function(l){for(const a of r.ctx){const h=a[0],p=a[1];for(const v of p){const g=v[0],w=v[1];w.length&&(l.get(h+":"+g).onsuccess=function(){let k=this.result;var $;if(k&&k.length){const j=Math.max(k.length,w.length);for(let A=0,z,_;A<j;A++)if((_=w[A])&&_.length){if((z=k[A])&&z.length)for($=0;$<_.length;$++)z.push(_[$]);else k[A]=_;$=1}}else k=w,$=1;$&&l.put(k,h+":"+g)})}}}),r.store?await this.transaction("reg","readwrite",function(l){for(const a of r.store){const h=a[0],p=a[1];l.put(typeof p=="object"?JSON.stringify(p):1,h)}}):r.bypass||await this.transaction("reg","readwrite",function(l){for(const a of r.reg.keys())l.put(1,a)}),r.tag&&await this.transaction("tag","readwrite",function(l){for(const a of r.tag){const h=a[0],p=a[1];p.length&&(l.get(h).onsuccess=function(){let v=this.result;v=v&&v.length?v.concat(p):p,l.put(v,h)})}}),r.map.clear(),r.ctx.clear(),r.tag&&r.tag.clear(),r.store&&r.store.clear(),r.document||r.reg.clear())};function oi(r,s,i){const l=r.value;let a,h=0;for(let p=0,v;p<l.length;p++){if(v=i?l:l[p]){for(let g=0,w,k;g<s.length;g++)if(k=s[g],w=v.indexOf(k),w>=0)if(a=1,v.length>1)v.splice(w,1);else{l[p]=[];break}h+=v.length}if(i)break}h?a&&r.update(l):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 i=this.result;i&&oi(i,r)}}),this.transaction("ctx","readwrite",function(s){s.openCursor().onsuccess=function(){const i=this.result;i&&oi(i,r)}}),this.transaction("tag","readwrite",function(s){s.openCursor().onsuccess=function(){const i=this.result;i&&oi(i,r,!0)}}),this.transaction("reg","readwrite",function(s){for(let i=0;i<r.length;i++)s.delete(r[i])})])};function rn(r,s){return new Promise((i,l)=>{r.onsuccess=r.oncomplete=function(){s&&s(this.result),s=null,i(this.result)},r.onerror=r.onblocked=l,r=null})}const Os={Encoder:Wn,Document:An},Vd=Go,Hd={finalize:r=>{let s=[];for(const i of r)s.push(...Wd(i));return s}};function qd(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 Wd(r){const s=[];let i="";for(const l of r){const a=l.codePointAt(0);qd(a)?(i&&(s.push(i),i=""),s.push(l)):i+=l}return i&&s.push(i),s}const ii=new Os.Encoder(Vd.Default,Hd);class Kd{constructor({adminUrl:s,apiKey:i,dir:l}){const a=l==="rtl",h=l==="rtl"?"reverse":"forward";this.apiUrl=s,this.apiKey=i,this.postsIndex=new Os.Document({tokenize:h,rtl:a,document:{id:"id",index:["title","excerpt"],store:!0},encoder:ii}),this.authorsIndex=new Os.Document({tokenize:h,rtl:a,document:{id:"id",index:["name"],store:!0},encoder:ii}),this.tagsIndex=new Os.Document({tokenize:h,rtl:a,document:{id:"id",index:["name"],store:!0},encoder:ii}),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(i=>{this.postsIndex.add(i)})}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(i=>{this.authorsIndex.add(i)})}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(i=>{this.tagsIndex.add(i)})}async init(){await this.#t(),await this.#s(),await this.#l()}#e(s){const i=[],l={};return s.forEach(a=>{a.result.forEach(h=>{l[h.id]||(i.push(h.doc),l[h.id]=!0)})}),i}search(s){const i=this.postsIndex.search(s,{enrich:!0}),l=this.authorsIndex.search(s,{enrich:!0}),a=this.tagsIndex.search(s,{enrich:!0});return{posts:this.#e(i),authors:this.#e(l),tags:this.#e(a)}}}var On={exports:{}};const Gd={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:"الوسوم"},Jd={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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Zd={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"},ep={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"},tp={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"},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:"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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},lp={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"},ap={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"},up={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"},cp={Authors:"نویسندگان",Cancel:"لغو","No matches found":"موردی یافت نشد",Posts:"نوشته‌ها","Search posts, tags and authors":"جست‌وجوی نوشته‌ها، برچسب‌ها و نویسندگان","Show more results":"نمایش نتایج بیشتر",Tags:"برچسب‌ها"},fp={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"},hp={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"},dp={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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},yp={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"},vp={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"},wp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Sp={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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},$p={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:""},jp={Authors:"Нийтлэгчид",Cancel:"Цуцлах","No matches found":"Тохирох хайлтын үр дүн олдсонгүй",Posts:"Нийтлэлүүд","Search posts, tags and authors":"Нийтлэл, ангилал, нийтлэгчдээр хайх","Show more results":"Илүү олон үр дүн харуулах",Tags:"Ангилалууд"},Ap={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Tp={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:"ट्यागहरू"},Np={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"},Rp={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:"ਟੈਗ"},Lp={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"},bp={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:"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:"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"},Mp={Authors:"Авторы",Cancel:"Отмена","No matches found":"Совпадений не найдено",Posts:"Записи","Search posts, tags and authors":"Поиск по записям, тегам и авторам","Show more results":"Показать больше результатов",Tags:"Теги"},zp={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Dp={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"},Up={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"},Bp={Authors:"Autorët",Cancel:"Anulo","No matches found":"Nuk u gjet asnjë rezultat",Posts:"Postimet","Search posts, tags and authors":"Kërko postime, etiketa dhe autorë","Show more results":"Shfaq më shumë rezultate",Tags:"Etiketat"},Vp={Authors:"Аутори",Cancel:"Откажите","No matches found":"Нема резултата",Posts:"Објаве","Search posts, tags and authors":"Претражите објаве, tag-ове и ауторе","Show more results":"Прикажите више резултата",Tags:"Tag-ови"},Hp={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:"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"},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:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Qp={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:"Теги"},Yp={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:""},Zp={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ẻ và tác giả","Show more results":"Xem thêm kết quả",Tags:"Thẻ"},eg={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"},tg={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"};var hu;function du(){return hu||(hu={"/ghost/i18n/locales/af/search.json":function(){return Gd},"/ghost/i18n/locales/ar/search.json":function(){return Qd},"/ghost/i18n/locales/bg/search.json":function(){return Jd},"/ghost/i18n/locales/bn/search.json":function(){return Yd},"/ghost/i18n/locales/bs/search.json":function(){return Xd},"/ghost/i18n/locales/ca/search.json":function(){return Zd},"/ghost/i18n/locales/cs/search.json":function(){return ep},"/ghost/i18n/locales/da/search.json":function(){return tp},"/ghost/i18n/locales/de-CH/search.json":function(){return np},"/ghost/i18n/locales/de/search.json":function(){return rp},"/ghost/i18n/locales/el/search.json":function(){return sp},"/ghost/i18n/locales/en/search.json":function(){return op},"/ghost/i18n/locales/eo/search.json":function(){return ip},"/ghost/i18n/locales/es/search.json":function(){return lp},"/ghost/i18n/locales/et/search.json":function(){return ap},"/ghost/i18n/locales/eu/search.json":function(){return up},"/ghost/i18n/locales/fa/search.json":function(){return cp},"/ghost/i18n/locales/fi/search.json":function(){return fp},"/ghost/i18n/locales/fr/search.json":function(){return hp},"/ghost/i18n/locales/gd/search.json":function(){return dp},"/ghost/i18n/locales/he/search.json":function(){return pp},"/ghost/i18n/locales/hi/search.json":function(){return gp},"/ghost/i18n/locales/hr/search.json":function(){return mp},"/ghost/i18n/locales/hu/search.json":function(){return yp},"/ghost/i18n/locales/id/search.json":function(){return vp},"/ghost/i18n/locales/is/search.json":function(){return wp},"/ghost/i18n/locales/it/search.json":function(){return Sp},"/ghost/i18n/locales/ja/search.json":function(){return xp},"/ghost/i18n/locales/ko/search.json":function(){return Cp},"/ghost/i18n/locales/kz/search.json":function(){return kp},"/ghost/i18n/locales/lt/search.json":function(){return Pp},"/ghost/i18n/locales/lv/search.json":function(){return $p},"/ghost/i18n/locales/mk/search.json":function(){return Ep},"/ghost/i18n/locales/mn/search.json":function(){return jp},"/ghost/i18n/locales/ms/search.json":function(){return Ap},"/ghost/i18n/locales/nb/search.json":function(){return Tp},"/ghost/i18n/locales/ne/search.json":function(){return Op},"/ghost/i18n/locales/nl/search.json":function(){return Np},"/ghost/i18n/locales/nn/search.json":function(){return Rp},"/ghost/i18n/locales/pa/search.json":function(){return _p},"/ghost/i18n/locales/pl/search.json":function(){return Lp},"/ghost/i18n/locales/pt-BR/search.json":function(){return bp},"/ghost/i18n/locales/pt/search.json":function(){return Ip},"/ghost/i18n/locales/ro/search.json":function(){return Fp},"/ghost/i18n/locales/ru/search.json":function(){return Mp},"/ghost/i18n/locales/si/search.json":function(){return zp},"/ghost/i18n/locales/sk/search.json":function(){return Dp},"/ghost/i18n/locales/sl/search.json":function(){return Up},"/ghost/i18n/locales/sq/search.json":function(){return Bp},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return Vp},"/ghost/i18n/locales/sr/search.json":function(){return Hp},"/ghost/i18n/locales/sv/search.json":function(){return qp},"/ghost/i18n/locales/sw/search.json":function(){return Wp},"/ghost/i18n/locales/ta/search.json":function(){return Kp},"/ghost/i18n/locales/th/search.json":function(){return Gp},"/ghost/i18n/locales/tr/search.json":function(){return Qp},"/ghost/i18n/locales/uk/search.json":function(){return Jp},"/ghost/i18n/locales/ur/search.json":function(){return Yp},"/ghost/i18n/locales/uz/search.json":function(){return Xp},"/ghost/i18n/locales/vi/search.json":function(){return Zp},"/ghost/i18n/locales/zh-Hant/search.json":function(){return eg},"/ghost/i18n/locales/zh/search.json":function(){return tg}})}function Nn(r){function s(i){var l=pu(i,r);if(l!==null)return du()[l]();throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return s.resolve=function(i){var l=pu(i,r);return l!==null?l:require.resolve(i)},s}function pu(r,s){var i=ng(r);r=Ns(r);var l;r[0]==="/"&&(s="");for(var a=du(),h=["",".js",".json"];i?l=Ns(s+"/node_modules/"+r):l=Ns(s+"/"+r),!l.endsWith("/..");){for(var p=0;p<h.length;p++){var v=l+h[p];if(a[v])return v}if(!i)break;var g=Ns(s+"/..");if(g===s)break;s=g}return null}function ng(r){var s=r[0];if(s==="/"||s==="\\")return!1;var i=r[1],l=r[2];return!(s==="."&&(!i||i==="/"||i==="\\")||s==="."&&i==="."&&(!l||l==="/"||l==="\\")||i===":"&&(l==="/"||l==="\\"))}function Ns(r){r=r.replace(/\\/g,"/");for(var s=r.split("/"),i=s[0]==="",l=1;l<s.length;l++)(s[l]==="."||s[l]==="")&&s.splice(l--,1);for(var l=1;l<s.length;l++)s[l]===".."&&l>0&&s[l-1]!==".."&&s[l-1]!=="."&&(s.splice(--l,2),l--);return r=s.join("/"),i&&r[0]!=="/"?r="/"+r:r.length===0&&(r="."),r}var Xn={exports:{}},li,gu;function rg(){if(gu)return li;gu=1;const r=P=>typeof P=="string",s=()=>{let P,c;const d=new Promise((m,C)=>{P=m,c=C});return d.resolve=P,d.reject=c,d},i=P=>P==null?"":""+P,l=(P,c,d)=>{P.forEach(m=>{c[m]&&(d[m]=c[m])})},a=/###/g,h=P=>P&&P.indexOf("###")>-1?P.replace(a,"."):P,p=P=>!P||r(P),v=(P,c,d)=>{const m=r(c)?c.split("."):c;let C=0;for(;C<m.length-1;){if(p(P))return{};const E=h(m[C]);!P[E]&&d&&(P[E]=new d),Object.prototype.hasOwnProperty.call(P,E)?P=P[E]:P={},++C}return p(P)?{}:{obj:P,k:h(m[C])}},g=(P,c,d)=>{const{obj:m,k:C}=v(P,c,Object);if(m!==void 0||c.length===1){m[C]=d;return}let E=c[c.length-1],L=c.slice(0,c.length-1),D=v(P,L,Object);for(;D.obj===void 0&&L.length;)E=`${L[L.length-1]}.${E}`,L=L.slice(0,L.length-1),D=v(P,L,Object),D&&D.obj&&typeof D.obj[`${D.k}.${E}`]<"u"&&(D.obj=void 0);D.obj[`${D.k}.${E}`]=d},w=(P,c,d,m)=>{const{obj:C,k:E}=v(P,c,Object);C[E]=C[E]||[],C[E].push(d)},k=(P,c)=>{const{obj:d,k:m}=v(P,c);if(d)return d[m]},$=(P,c,d)=>{const m=k(P,d);return m!==void 0?m:k(c,d)},j=(P,c,d)=>{for(const m in c)m!=="__proto__"&&m!=="constructor"&&(m in P?r(P[m])||P[m]instanceof String||r(c[m])||c[m]instanceof String?d&&(P[m]=c[m]):j(P[m],c[m],d):P[m]=c[m]);return P},A=P=>P.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var z={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const _=P=>r(P)?P.replace(/[&<>"'\/]/g,c=>z[c]):P;class R{constructor(c){this.capacity=c,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(c){const d=this.regExpMap.get(c);if(d!==void 0)return d;const m=new RegExp(c);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(c,m),this.regExpQueue.push(c),m}}const q=[" ",",","?","!",";"],Q=new R(20),ue=(P,c,d)=>{c=c||"",d=d||"";const m=q.filter(L=>c.indexOf(L)<0&&d.indexOf(L)<0);if(m.length===0)return!0;const C=Q.getRegExp(`(${m.map(L=>L==="?"?"\\?":L).join("|")})`);let E=!C.test(P);if(!E){const L=P.indexOf(d);L>0&&!C.test(P.substring(0,L))&&(E=!0)}return E},pe=function(P,c){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!P)return;if(P[c])return P[c];const m=c.split(d);let C=P;for(let E=0;E<m.length;){if(!C||typeof C!="object")return;let L,D="";for(let B=E;B<m.length;++B)if(B!==E&&(D+=d),D+=m[B],L=C[D],L!==void 0){if(["string","number","boolean"].indexOf(typeof L)>-1&&B<m.length-1)continue;E+=B-E+1;break}C=L}return C},ce=P=>P&&P.replace("_","-"),ae={type:"logger",log(P){this.output("log",P)},warn(P){this.output("warn",P)},error(P){this.output("error",P)},output(P,c){console&&console[P]&&console[P].apply(console,c)}};class ne{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(c,d)}init(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=d.prefix||"i18next:",this.logger=c||ae,this.options=d,this.debug=d.debug}log(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"log","",!0)}warn(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"warn","",!0)}error(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"error","")}deprecate(){for(var c=arguments.length,d=new Array(c),m=0;m<c;m++)d[m]=arguments[m];return this.forward(d,"warn","WARNING DEPRECATED: ",!0)}forward(c,d,m,C){return C&&!this.debug?null:(r(c[0])&&(c[0]=`${m}${this.prefix} ${c[0]}`),this.logger[d](c))}create(c){return new ne(this.logger,{prefix:`${this.prefix}:${c}:`,...this.options})}clone(c){return c=c||this.options,c.prefix=c.prefix||this.prefix,new ne(this.logger,c)}}var re=new ne;class fe{constructor(){this.observers={}}on(c,d){return c.split(" ").forEach(m=>{this.observers[m]||(this.observers[m]=new Map);const C=this.observers[m].get(d)||0;this.observers[m].set(d,C+1)}),this}off(c,d){if(this.observers[c]){if(!d){delete this.observers[c];return}this.observers[c].delete(d)}}emit(c){for(var d=arguments.length,m=new Array(d>1?d-1:0),C=1;C<d;C++)m[C-1]=arguments[C];this.observers[c]&&Array.from(this.observers[c].entries()).forEach(L=>{let[D,B]=L;for(let Z=0;Z<B;Z++)D(...m)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(L=>{let[D,B]=L;for(let Z=0;Z<B;Z++)D.apply(D,[c,...m])})}}class b extends fe{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=c||{},this.options=d,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(c){this.options.ns.indexOf(c)<0&&this.options.ns.push(c)}removeNamespaces(c){const d=this.options.ns.indexOf(c);d>-1&&this.options.ns.splice(d,1)}getResource(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=C.keySeparator!==void 0?C.keySeparator:this.options.keySeparator,L=C.ignoreJSONStructure!==void 0?C.ignoreJSONStructure:this.options.ignoreJSONStructure;let D;c.indexOf(".")>-1?D=c.split("."):(D=[c,d],m&&(Array.isArray(m)?D.push(...m):r(m)&&E?D.push(...m.split(E)):D.push(m)));const B=k(this.data,D);return!B&&!d&&!m&&c.indexOf(".")>-1&&(c=D[0],d=D[1],m=D.slice(2).join(".")),B||!L||!r(m)?B:pe(this.data&&this.data[c]&&this.data[c][d],m,E)}addResource(c,d,m,C){let E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const L=E.keySeparator!==void 0?E.keySeparator:this.options.keySeparator;let D=[c,d];m&&(D=D.concat(L?m.split(L):m)),c.indexOf(".")>-1&&(D=c.split("."),C=d,d=D[1]),this.addNamespaces(d),g(this.data,D,C),E.silent||this.emit("added",c,d,m,C)}addResources(c,d,m){let C=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(c,d,E,m[E],{silent:!0});C.silent||this.emit("added",c,d,m)}addResourceBundle(c,d,m,C,E){let L=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},D=[c,d];c.indexOf(".")>-1&&(D=c.split("."),C=m,m=d,d=D[1]),this.addNamespaces(d);let B=k(this.data,D)||{};L.skipCopy||(m=JSON.parse(JSON.stringify(m))),C?j(B,m,E):B={...B,...m},g(this.data,D,B),L.silent||this.emit("added",c,d,m)}removeResourceBundle(c,d){this.hasResourceBundle(c,d)&&delete this.data[c][d],this.removeNamespaces(d),this.emit("removed",c,d)}hasResourceBundle(c,d){return this.getResource(c,d)!==void 0}getResourceBundle(c,d){return d||(d=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(c,d)}:this.getResource(c,d)}getDataByLanguage(c){return this.data[c]}hasLanguageSomeTranslations(c){const d=this.getDataByLanguage(c);return!!(d&&Object.keys(d)||[]).find(C=>d[C]&&Object.keys(d[C]).length>0)}toJSON(){return this.data}}var M={processors:{},addPostProcessor(P){this.processors[P.name]=P},handle(P,c,d,m,C){return P.forEach(E=>{this.processors[E]&&(c=this.processors[E].process(c,d,m,C))}),c}};const K={};class se extends fe{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),l(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],c,this),this.options=d,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=re.create("translator")}changeLanguage(c){c&&(this.language=c)}exists(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(c==null)return!1;const m=this.resolve(c,d);return m&&m.res!==void 0}extractFromKey(c,d){let m=d.nsSeparator!==void 0?d.nsSeparator:this.options.nsSeparator;m===void 0&&(m=":");const C=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let E=d.ns||this.options.defaultNS||[];const L=m&&c.indexOf(m)>-1,D=!this.options.userDefinedKeySeparator&&!d.keySeparator&&!this.options.userDefinedNsSeparator&&!d.nsSeparator&&!ue(c,m,C);if(L&&!D){const B=c.match(this.interpolator.nestingRegexp);if(B&&B.length>0)return{key:c,namespaces:r(E)?[E]:E};const Z=c.split(m);(m!==C||m===C&&this.options.ns.indexOf(Z[0])>-1)&&(E=Z.shift()),c=Z.join(C)}return{key:c,namespaces:r(E)?[E]:E}}translate(c,d,m){if(typeof d!="object"&&this.options.overloadTranslationOptionHandler&&(d=this.options.overloadTranslationOptionHandler(arguments)),typeof d=="object"&&(d={...d}),d||(d={}),c==null)return"";Array.isArray(c)||(c=[String(c)]);const C=d.returnDetails!==void 0?d.returnDetails:this.options.returnDetails,E=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator,{key:L,namespaces:D}=this.extractFromKey(c[c.length-1],d),B=D[D.length-1],Z=d.lng||this.language,oe=d.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(Z&&Z.toLowerCase()==="cimode"){if(oe){const Ue=d.nsSeparator||this.options.nsSeparator;return C?{res:`${B}${Ue}${L}`,usedKey:L,exactUsedKey:L,usedLng:Z,usedNS:B,usedParams:this.getUsedParamsDetails(d)}:`${B}${Ue}${L}`}return C?{res:L,usedKey:L,exactUsedKey:L,usedLng:Z,usedNS:B,usedParams:this.getUsedParamsDetails(d)}:L}const me=this.resolve(c,d);let Y=me&&me.res;const Ce=me&&me.usedKey||L,Le=me&&me.exactUsedKey||L,Ke=Object.prototype.toString.apply(Y),ze=["[object Number]","[object Function]","[object RegExp]"],tt=d.joinArrays!==void 0?d.joinArrays:this.options.joinArrays,nt=!this.i18nFormat||this.i18nFormat.handleAsObject,bt=!r(Y)&&typeof Y!="boolean"&&typeof Y!="number";if(nt&&Y&&bt&&ze.indexOf(Ke)<0&&!(r(tt)&&Array.isArray(Y))){if(!d.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(Ce,Y,{...d,ns:D}):`key '${L} (${this.language})' returned an object instead of string.`;return C?(me.res=Ue,me.usedParams=this.getUsedParamsDetails(d),me):Ue}if(E){const Ue=Array.isArray(Y),gt=Ue?[]:{},vt=Ue?Le:Ce;for(const rt in Y)if(Object.prototype.hasOwnProperty.call(Y,rt)){const er=`${vt}${E}${rt}`;gt[rt]=this.translate(er,{...d,joinArrays:!1,ns:D}),gt[rt]===er&&(gt[rt]=Y[rt])}Y=gt}}else if(nt&&r(tt)&&Array.isArray(Y))Y=Y.join(tt),Y&&(Y=this.extendTranslation(Y,c,d,m));else{let Ue=!1,gt=!1;const vt=d.count!==void 0&&!r(d.count),rt=se.hasDefaultValue(d),er=vt?this.pluralResolver.getSuffix(Z,d.count,d):"",Nr=d.ordinal&&vt?this.pluralResolver.getSuffix(Z,d.count,{ordinal:!1}):"",tr=vt&&!d.ordinal&&d.count===0&&this.pluralResolver.shouldUseIntlApi(),Kt=tr&&d[`defaultValue${this.options.pluralSeparator}zero`]||d[`defaultValue${er}`]||d[`defaultValue${Nr}`]||d.defaultValue;!this.isValidLookup(Y)&&rt&&(Ue=!0,Y=Kt),this.isValidLookup(Y)||(gt=!0,Y=L);const sn=(d.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&gt?void 0:Y,Et=rt&&Kt!==Y&&this.options.updateMissing;if(gt||Ue||Et){if(this.logger.log(Et?"updateKey":"missingKey",Z,B,L,Et?Kt:Y),E){const it=this.resolve(L,{...d,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 on=[];const Rn=this.languageUtils.getFallbackCodes(this.options.fallbackLng,d.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Rn&&Rn[0])for(let it=0;it<Rn.length;it++)on.push(Rn[it]);else this.options.saveMissingTo==="all"?on=this.languageUtils.toResolveHierarchy(d.lng||this.language):on.push(d.lng||this.language);const Rr=(it,zt,Gt)=>{const _r=rt&&Gt!==Y?Gt:sn;this.options.missingKeyHandler?this.options.missingKeyHandler(it,B,zt,_r,Et,d):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(it,B,zt,_r,Et,d),this.emit("missingKey",it,B,zt,Y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&vt?on.forEach(it=>{const zt=this.pluralResolver.getSuffixes(it,d);tr&&d[`defaultValue${this.options.pluralSeparator}zero`]&&zt.indexOf(`${this.options.pluralSeparator}zero`)<0&&zt.push(`${this.options.pluralSeparator}zero`),zt.forEach(Gt=>{Rr([it],L+Gt,d[`defaultValue${Gt}`]||Kt)})}):Rr(on,L,Kt))}Y=this.extendTranslation(Y,c,d,me,m),gt&&Y===L&&this.options.appendNamespaceToMissingKey&&(Y=`${B}:${L}`),(gt||Ue)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?Y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${B}:${L}`:L,Ue?Y:void 0):Y=this.options.parseMissingKeyHandler(Y))}return C?(me.res=Y,me.usedParams=this.getUsedParamsDetails(d),me):Y}extendTranslation(c,d,m,C,E){var L=this;if(this.i18nFormat&&this.i18nFormat.parse)c=this.i18nFormat.parse(c,{...this.options.interpolation.defaultVariables,...m},m.lng||this.language||C.usedLng,C.usedNS,C.usedKey,{resolved:C});else if(!m.skipInterpolation){m.interpolation&&this.interpolator.init({...m,interpolation:{...this.options.interpolation,...m.interpolation}});const Z=r(c)&&(m&&m.interpolation&&m.interpolation.skipOnVariables!==void 0?m.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let oe;if(Z){const Y=c.match(this.interpolator.nestingRegexp);oe=Y&&Y.length}let me=m.replace&&!r(m.replace)?m.replace:m;if(this.options.interpolation.defaultVariables&&(me={...this.options.interpolation.defaultVariables,...me}),c=this.interpolator.interpolate(c,me,m.lng||this.language||C.usedLng,m),Z){const Y=c.match(this.interpolator.nestingRegexp),Ce=Y&&Y.length;oe<Ce&&(m.nest=!1)}!m.lng&&this.options.compatibilityAPI!=="v1"&&C&&C.res&&(m.lng=this.language||C.usedLng),m.nest!==!1&&(c=this.interpolator.nest(c,function(){for(var Y=arguments.length,Ce=new Array(Y),Le=0;Le<Y;Le++)Ce[Le]=arguments[Le];return E&&E[0]===Ce[0]&&!m.context?(L.logger.warn(`It seems you are nesting recursively key: ${Ce[0]} in key: ${d[0]}`),null):L.translate(...Ce,d)},m)),m.interpolation&&this.interpolator.reset()}const D=m.postProcess||this.options.postProcess,B=r(D)?[D]:D;return c!=null&&B&&B.length&&m.applyPostProcessor!==!1&&(c=M.handle(B,c,d,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...C,usedParams:this.getUsedParamsDetails(m)},...m}:m,this)),c}resolve(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m,C,E,L,D;return r(c)&&(c=[c]),c.forEach(B=>{if(this.isValidLookup(m))return;const Z=this.extractFromKey(B,d),oe=Z.key;C=oe;let me=Z.namespaces;this.options.fallbackNS&&(me=me.concat(this.options.fallbackNS));const Y=d.count!==void 0&&!r(d.count),Ce=Y&&!d.ordinal&&d.count===0&&this.pluralResolver.shouldUseIntlApi(),Le=d.context!==void 0&&(r(d.context)||typeof d.context=="number")&&d.context!=="",Ke=d.lngs?d.lngs:this.languageUtils.toResolveHierarchy(d.lng||this.language,d.fallbackLng);me.forEach(ze=>{this.isValidLookup(m)||(D=ze,!K[`${Ke[0]}-${ze}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(D)&&(K[`${Ke[0]}-${ze}`]=!0,this.logger.warn(`key "${C}" for languages "${Ke.join(", ")}" won't get resolved as namespace "${D}" 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;L=tt;const nt=[oe];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(nt,oe,tt,ze,d);else{let Ue;Y&&(Ue=this.pluralResolver.getSuffix(tt,d.count,d));const gt=`${this.options.pluralSeparator}zero`,vt=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(Y&&(nt.push(oe+Ue),d.ordinal&&Ue.indexOf(vt)===0&&nt.push(oe+Ue.replace(vt,this.options.pluralSeparator)),Ce&&nt.push(oe+gt)),Le){const rt=`${oe}${this.options.contextSeparator}${d.context}`;nt.push(rt),Y&&(nt.push(rt+Ue),d.ordinal&&Ue.indexOf(vt)===0&&nt.push(rt+Ue.replace(vt,this.options.pluralSeparator)),Ce&&nt.push(rt+gt))}}let bt;for(;bt=nt.pop();)this.isValidLookup(m)||(E=bt,m=this.getResource(tt,ze,bt,d))}))})}),{res:m,usedKey:C,exactUsedKey:E,usedLng:L,usedNS:D}}isValidLookup(c){return c!==void 0&&!(!this.options.returnNull&&c===null)&&!(!this.options.returnEmptyString&&c==="")}getResource(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(c,d,m,C):this.resourceStore.getResource(c,d,m,C)}getUsedParamsDetails(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const d=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],m=c.replace&&!r(c.replace);let C=m?c.replace:c;if(m&&typeof c.count<"u"&&(C.count=c.count),this.options.interpolation.defaultVariables&&(C={...this.options.interpolation.defaultVariables,...C}),!m){C={...C};for(const E of d)delete C[E]}return C}static hasDefaultValue(c){const d="defaultValue";for(const m in c)if(Object.prototype.hasOwnProperty.call(c,m)&&d===m.substring(0,d.length)&&c[m]!==void 0)return!0;return!1}}const he=P=>P.charAt(0).toUpperCase()+P.slice(1);class Se{constructor(c){this.options=c,this.supportedLngs=this.options.supportedLngs||!1,this.logger=re.create("languageUtils")}getScriptPartFromCode(c){if(c=ce(c),!c||c.indexOf("-")<0)return null;const d=c.split("-");return d.length===2||(d.pop(),d[d.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(d.join("-"))}getLanguagePartFromCode(c){if(c=ce(c),!c||c.indexOf("-")<0)return c;const d=c.split("-");return this.formatLanguageCode(d[0])}formatLanguageCode(c){if(r(c)&&c.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let C=Intl.getCanonicalLocales(c)[0];if(C&&this.options.lowerCaseLng&&(C=C.toLowerCase()),C)return C}catch{}const d=["hans","hant","latn","cyrl","cans","mong","arab"];let m=c.split("-");return this.options.lowerCaseLng?m=m.map(C=>C.toLowerCase()):m.length===2?(m[0]=m[0].toLowerCase(),m[1]=m[1].toUpperCase(),d.indexOf(m[1].toLowerCase())>-1&&(m[1]=he(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()),d.indexOf(m[1].toLowerCase())>-1&&(m[1]=he(m[1].toLowerCase())),d.indexOf(m[2].toLowerCase())>-1&&(m[2]=he(m[2].toLowerCase()))),m.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?c.toLowerCase():c}isSupportedCode(c){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(c=this.getLanguagePartFromCode(c)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(c)>-1}getBestMatchFromCodes(c){if(!c)return null;let d;return c.forEach(m=>{if(d)return;const C=this.formatLanguageCode(m);(!this.options.supportedLngs||this.isSupportedCode(C))&&(d=C)}),!d&&this.options.supportedLngs&&c.forEach(m=>{if(d)return;const C=this.getLanguagePartFromCode(m);if(this.isSupportedCode(C))return d=C;d=this.options.supportedLngs.find(E=>{if(E===C)return E;if(!(E.indexOf("-")<0&&C.indexOf("-")<0)&&(E.indexOf("-")>0&&C.indexOf("-")<0&&E.substring(0,E.indexOf("-"))===C||E.indexOf(C)===0&&C.length>1))return E})}),d||(d=this.getFallbackCodes(this.options.fallbackLng)[0]),d}getFallbackCodes(c,d){if(!c)return[];if(typeof c=="function"&&(c=c(d)),r(c)&&(c=[c]),Array.isArray(c))return c;if(!d)return c.default||[];let m=c[d];return m||(m=c[this.getScriptPartFromCode(d)]),m||(m=c[this.formatLanguageCode(d)]),m||(m=c[this.getLanguagePartFromCode(d)]),m||(m=c.default),m||[]}toResolveHierarchy(c,d){const m=this.getFallbackCodes(d||this.options.fallbackLng||[],c),C=[],E=L=>{L&&(this.isSupportedCode(L)?C.push(L):this.logger.warn(`rejecting language code not found in supportedLngs: ${L}`))};return r(c)&&(c.indexOf("-")>-1||c.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&E(this.formatLanguageCode(c)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&E(this.getScriptPartFromCode(c)),this.options.load!=="currentOnly"&&E(this.getLanguagePartFromCode(c))):r(c)&&E(this.formatLanguageCode(c)),m.forEach(L=>{C.indexOf(L)<0&&E(this.formatLanguageCode(L))}),C}}let Te=[{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}],S={1:P=>+(P>1),2:P=>+(P!=1),3:P=>0,4:P=>P%10==1&&P%100!=11?0:P%10>=2&&P%10<=4&&(P%100<10||P%100>=20)?1:2,5:P=>P==0?0:P==1?1:P==2?2:P%100>=3&&P%100<=10?3:P%100>=11?4:5,6:P=>P==1?0:P>=2&&P<=4?1:2,7:P=>P==1?0:P%10>=2&&P%10<=4&&(P%100<10||P%100>=20)?1:2,8:P=>P==1?0:P==2?1:P!=8&&P!=11?2:3,9:P=>+(P>=2),10:P=>P==1?0:P==2?1:P<7?2:P<11?3:4,11:P=>P==1||P==11?0:P==2||P==12?1:P>2&&P<20?2:3,12:P=>+(P%10!=1||P%100==11),13:P=>+(P!==0),14:P=>P==1?0:P==2?1:P==3?2:3,15:P=>P%10==1&&P%100!=11?0:P%10>=2&&(P%100<10||P%100>=20)?1:2,16:P=>P%10==1&&P%100!=11?0:P!==0?1:2,17:P=>P==1||P%10==1&&P%100!=11?0:1,18:P=>P==0?0:P==1?1:2,19:P=>P==1?0:P==0||P%100>1&&P%100<11?1:P%100>10&&P%100<20?2:3,20:P=>P==1?0:P==0||P%100>0&&P%100<20?1:2,21:P=>P%100==1?1:P%100==2?2:P%100==3||P%100==4?3:0,22:P=>P==1?0:P==2?1:(P<0||P>10)&&P%10==0?2:3};const O=["v1","v2","v3"],W=["v4"],ge={zero:0,one:1,two:2,few:3,many:4,other:5},V=()=>{const P={};return Te.forEach(c=>{c.lngs.forEach(d=>{P[d]={numbers:c.nr,plurals:S[c.fc]}})}),P};class ee{constructor(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=c,this.options=d,this.logger=re.create("pluralResolver"),(!this.options.compatibilityJSON||W.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=V(),this.pluralRulesCache={}}addRule(c,d){this.rules[c]=d}clearCache(){this.pluralRulesCache={}}getRule(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const m=ce(c==="dev"?"en":c),C=d.ordinal?"ordinal":"cardinal",E=JSON.stringify({cleanedCode:m,type:C});if(E in this.pluralRulesCache)return this.pluralRulesCache[E];let L;try{L=new Intl.PluralRules(m,{type:C})}catch{if(!c.match(/-|_/))return;const B=this.languageUtils.getLanguagePartFromCode(c);L=this.getRule(B,d)}return this.pluralRulesCache[E]=L,L}return this.rules[c]||this.rules[this.languageUtils.getLanguagePartFromCode(c)]}needsPlural(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(c,d);return this.shouldUseIntlApi()?m&&m.resolvedOptions().pluralCategories.length>1:m&&m.numbers.length>1}getPluralFormsOfKey(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(c,m).map(C=>`${d}${C}`)}getSuffixes(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const m=this.getRule(c,d);return m?this.shouldUseIntlApi()?m.resolvedOptions().pluralCategories.sort((C,E)=>ge[C]-ge[E]).map(C=>`${this.options.prepend}${d.ordinal?`ordinal${this.options.prepend}`:""}${C}`):m.numbers.map(C=>this.getSuffix(c,C,d)):[]}getSuffix(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const C=this.getRule(c,m);return C?this.shouldUseIntlApi()?`${this.options.prepend}${m.ordinal?`ordinal${this.options.prepend}`:""}${C.select(d)}`:this.getSuffixRetroCompatible(C,d):(this.logger.warn(`no plural rule found for: ${c}`),"")}getSuffixRetroCompatible(c,d){const m=c.noAbs?c.plurals(d):c.plurals(Math.abs(d));let C=c.numbers[m];this.options.simplifyPluralSuffix&&c.numbers.length===2&&c.numbers[0]===1&&(C===2?C="plural":C===1&&(C=""));const E=()=>this.options.prepend&&C.toString()?this.options.prepend+C.toString():C.toString();return this.options.compatibilityJSON==="v1"?C===1?"":typeof C=="number"?`_plural_${C.toString()}`:E():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&c.numbers.length===2&&c.numbers[0]===1?E():this.options.prepend&&m.toString()?this.options.prepend+m.toString():m.toString()}shouldUseIntlApi(){return!O.includes(this.options.compatibilityJSON)}}const G=function(P,c,d){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,E=$(P,c,d);return!E&&C&&r(d)&&(E=pe(P,d,m),E===void 0&&(E=pe(c,d,m))),E},H=P=>P.replace(/\$/g,"$$$$");class ie{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=re.create("interpolator"),this.options=c,this.format=c.interpolation&&c.interpolation.format||(d=>d),this.init(c)}init(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};c.interpolation||(c.interpolation={escapeValue:!0});const{escape:d,escapeValue:m,useRawValueToEscape:C,prefix:E,prefixEscaped:L,suffix:D,suffixEscaped:B,formatSeparator:Z,unescapeSuffix:oe,unescapePrefix:me,nestingPrefix:Y,nestingPrefixEscaped:Ce,nestingSuffix:Le,nestingSuffixEscaped:Ke,nestingOptionsSeparator:ze,maxReplaces:tt,alwaysFormat:nt}=c.interpolation;this.escape=d!==void 0?d:_,this.escapeValue=m!==void 0?m:!0,this.useRawValueToEscape=C!==void 0?C:!1,this.prefix=E?A(E):L||"{{",this.suffix=D?A(D):B||"}}",this.formatSeparator=Z||",",this.unescapePrefix=oe?"":me||"-",this.unescapeSuffix=this.unescapePrefix?"":oe||"",this.nestingPrefix=Y?A(Y):Ce||A("$t("),this.nestingSuffix=Le?A(Le):Ke||A(")"),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 c=(d,m)=>d&&d.source===m?(d.lastIndex=0,d):new RegExp(m,"g");this.regexp=c(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=c(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=c(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(c,d,m,C){let E,L,D;const B=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},Z=Ce=>{if(Ce.indexOf(this.formatSeparator)<0){const tt=G(d,B,Ce,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(tt,void 0,m,{...C,...d,interpolationkey:Ce}):tt}const Le=Ce.split(this.formatSeparator),Ke=Le.shift().trim(),ze=Le.join(this.formatSeparator).trim();return this.format(G(d,B,Ke,this.options.keySeparator,this.options.ignoreJSONStructure),ze,m,{...C,...d,interpolationkey:Ke})};this.resetRegExp();const oe=C&&C.missingInterpolationHandler||this.options.missingInterpolationHandler,me=C&&C.interpolation&&C.interpolation.skipOnVariables!==void 0?C.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:Ce=>H(Ce)},{regex:this.regexp,safeValue:Ce=>this.escapeValue?H(this.escape(Ce)):H(Ce)}].forEach(Ce=>{for(D=0;E=Ce.regex.exec(c);){const Le=E[1].trim();if(L=Z(Le),L===void 0)if(typeof oe=="function"){const ze=oe(c,E,C);L=r(ze)?ze:""}else if(C&&Object.prototype.hasOwnProperty.call(C,Le))L="";else if(me){L=E[0];continue}else this.logger.warn(`missed to pass in variable ${Le} for interpolating ${c}`),L="";else!r(L)&&!this.useRawValueToEscape&&(L=i(L));const Ke=Ce.safeValue(L);if(c=c.replace(E[0],Ke),me?(Ce.regex.lastIndex+=L.length,Ce.regex.lastIndex-=E[0].length):Ce.regex.lastIndex=0,D++,D>=this.maxReplaces)break}}),c}nest(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C,E,L;const D=(B,Z)=>{const oe=this.nestingOptionsSeparator;if(B.indexOf(oe)<0)return B;const me=B.split(new RegExp(`${oe}[ ]*{`));let Y=`{${me[1]}`;B=me[0],Y=this.interpolate(Y,L);const Ce=Y.match(/'/g),Le=Y.match(/"/g);(Ce&&Ce.length%2===0&&!Le||Le.length%2!==0)&&(Y=Y.replace(/'/g,'"'));try{L=JSON.parse(Y),Z&&(L={...Z,...L})}catch(Ke){return this.logger.warn(`failed parsing options string in nesting for key ${B}`,Ke),`${B}${oe}${Y}`}return L.defaultValue&&L.defaultValue.indexOf(this.prefix)>-1&&delete L.defaultValue,B};for(;C=this.nestingRegexp.exec(c);){let B=[];L={...m},L=L.replace&&!r(L.replace)?L.replace:L,L.applyPostProcessor=!1,delete L.defaultValue;let Z=!1;if(C[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(C[1])){const oe=C[1].split(this.formatSeparator).map(me=>me.trim());C[1]=oe.shift(),B=oe,Z=!0}if(E=d(D.call(this,C[1].trim(),L),L),E&&C[0]===c&&!r(E))return E;r(E)||(E=i(E)),E||(this.logger.warn(`missed to resolve ${C[1]} for nesting ${c}`),E=""),Z&&(E=B.reduce((oe,me)=>this.format(oe,me,m.lng,{...m,interpolationkey:C[1].trim()}),E.trim())),c=c.replace(C[0],E),this.regexp.lastIndex=0}return c}}const Ne=P=>{let c=P.toLowerCase().trim();const d={};if(P.indexOf("(")>-1){const m=P.split("(");c=m[0].toLowerCase().trim();const C=m[1].substring(0,m[1].length-1);c==="currency"&&C.indexOf(":")<0?d.currency||(d.currency=C.trim()):c==="relativetime"&&C.indexOf(":")<0?d.range||(d.range=C.trim()):C.split(";").forEach(L=>{if(L){const[D,...B]=L.split(":"),Z=B.join(":").trim().replace(/^'+|'+$/g,""),oe=D.trim();d[oe]||(d[oe]=Z),Z==="false"&&(d[oe]=!1),Z==="true"&&(d[oe]=!0),isNaN(Z)||(d[oe]=parseInt(Z,10))}})}return{formatName:c,formatOptions:d}},De=P=>{const c={};return(d,m,C)=>{let E=C;C&&C.interpolationkey&&C.formatParams&&C.formatParams[C.interpolationkey]&&C[C.interpolationkey]&&(E={...E,[C.interpolationkey]:void 0});const L=m+JSON.stringify(E);let D=c[L];return D||(D=P(ce(m),C),c[L]=D),D(d)}};class pt{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=re.create("formatter"),this.options=c,this.formats={number:De((d,m)=>{const C=new Intl.NumberFormat(d,{...m});return E=>C.format(E)}),currency:De((d,m)=>{const C=new Intl.NumberFormat(d,{...m,style:"currency"});return E=>C.format(E)}),datetime:De((d,m)=>{const C=new Intl.DateTimeFormat(d,{...m});return E=>C.format(E)}),relativetime:De((d,m)=>{const C=new Intl.RelativeTimeFormat(d,{...m});return E=>C.format(E,m.range||"day")}),list:De((d,m)=>{const C=new Intl.ListFormat(d,{...m});return E=>C.format(E)})},this.init(c)}init(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=d.interpolation.formatSeparator||","}add(c,d){this.formats[c.toLowerCase().trim()]=d}addCached(c,d){this.formats[c.toLowerCase().trim()]=De(d)}format(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const E=d.split(this.formatSeparator);if(E.length>1&&E[0].indexOf("(")>1&&E[0].indexOf(")")<0&&E.find(D=>D.indexOf(")")>-1)){const D=E.findIndex(B=>B.indexOf(")")>-1);E[0]=[E[0],...E.splice(1,D)].join(this.formatSeparator)}return E.reduce((D,B)=>{const{formatName:Z,formatOptions:oe}=Ne(B);if(this.formats[Z]){let me=D;try{const Y=C&&C.formatParams&&C.formatParams[C.interpolationkey]||{},Ce=Y.locale||Y.lng||C.locale||C.lng||m;me=this.formats[Z](D,Ce,{...oe,...C,...Y})}catch(Y){this.logger.warn(Y)}return me}else this.logger.warn(`there was no format function for ${Z}`);return D},c)}}const Fe=(P,c)=>{P.pending[c]!==void 0&&(delete P.pending[c],P.pendingCount--)};class Me extends fe{constructor(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=c,this.store=d,this.services=m,this.languageUtils=m.languageUtils,this.options=C,this.logger=re.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=C.maxParallelReads||10,this.readingCalls=0,this.maxRetries=C.maxRetries>=0?C.maxRetries:5,this.retryTimeout=C.retryTimeout>=1?C.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(m,C.backend,C)}queueLoad(c,d,m,C){const E={},L={},D={},B={};return c.forEach(Z=>{let oe=!0;d.forEach(me=>{const Y=`${Z}|${me}`;!m.reload&&this.store.hasResourceBundle(Z,me)?this.state[Y]=2:this.state[Y]<0||(this.state[Y]===1?L[Y]===void 0&&(L[Y]=!0):(this.state[Y]=1,oe=!1,L[Y]===void 0&&(L[Y]=!0),E[Y]===void 0&&(E[Y]=!0),B[me]===void 0&&(B[me]=!0)))}),oe||(D[Z]=!0)}),(Object.keys(E).length||Object.keys(L).length)&&this.queue.push({pending:L,pendingCount:Object.keys(L).length,loaded:{},errors:[],callback:C}),{toLoad:Object.keys(E),pending:Object.keys(L),toLoadLanguages:Object.keys(D),toLoadNamespaces:Object.keys(B)}}loaded(c,d,m){const C=c.split("|"),E=C[0],L=C[1];d&&this.emit("failedLoading",E,L,d),!d&&m&&this.store.addResourceBundle(E,L,m,void 0,void 0,{skipCopy:!0}),this.state[c]=d?-1:2,d&&m&&(this.state[c]=0);const D={};this.queue.forEach(B=>{w(B.loaded,[E],L),Fe(B,c),d&&B.errors.push(d),B.pendingCount===0&&!B.done&&(Object.keys(B.loaded).forEach(Z=>{D[Z]||(D[Z]={});const oe=B.loaded[Z];oe.length&&oe.forEach(me=>{D[Z][me]===void 0&&(D[Z][me]=!0)})}),B.done=!0,B.errors.length?B.callback(B.errors):B.callback())}),this.emit("loaded",D),this.queue=this.queue.filter(B=>!B.done)}read(c,d,m){let C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,E=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,L=arguments.length>5?arguments[5]:void 0;if(!c.length)return L(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:c,ns:d,fcName:m,tried:C,wait:E,callback:L});return}this.readingCalls++;const D=(Z,oe)=>{if(this.readingCalls--,this.waitingReads.length>0){const me=this.waitingReads.shift();this.read(me.lng,me.ns,me.fcName,me.tried,me.wait,me.callback)}if(Z&&oe&&C<this.maxRetries){setTimeout(()=>{this.read.call(this,c,d,m,C+1,E*2,L)},E);return}L(Z,oe)},B=this.backend[m].bind(this.backend);if(B.length===2){try{const Z=B(c,d);Z&&typeof Z.then=="function"?Z.then(oe=>D(null,oe)).catch(D):D(null,Z)}catch(Z){D(Z)}return}return B(c,d,D)}prepareLoading(c,d){let m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=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."),C&&C();r(c)&&(c=this.languageUtils.toResolveHierarchy(c)),r(d)&&(d=[d]);const E=this.queueLoad(c,d,m,C);if(!E.toLoad.length)return E.pending.length||C(),null;E.toLoad.forEach(L=>{this.loadOne(L)})}load(c,d,m){this.prepareLoading(c,d,{},m)}reload(c,d,m){this.prepareLoading(c,d,{reload:!0},m)}loadOne(c){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const m=c.split("|"),C=m[0],E=m[1];this.read(C,E,"read",void 0,void 0,(L,D)=>{L&&this.logger.warn(`${d}loading namespace ${E} for language ${C} failed`,L),!L&&D&&this.logger.log(`${d}loaded namespace ${E} for language ${C}`,D),this.loaded(c,L,D)})}saveMissing(c,d,m,C,E){let L=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},D=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(d)){this.logger.warn(`did not save key "${m}" as the namespace "${d}" 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 B={...L,isUpdate:E},Z=this.backend.create.bind(this.backend);if(Z.length<6)try{let oe;Z.length===5?oe=Z(c,d,m,C,B):oe=Z(c,d,m,C),oe&&typeof oe.then=="function"?oe.then(me=>D(null,me)).catch(D):D(null,oe)}catch(oe){D(oe)}else Z(c,d,m,C,D,B)}!c||!c[0]||this.store.addResource(c[0],d,m,C)}}}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:P=>{let c={};if(typeof P[1]=="object"&&(c=P[1]),r(P[1])&&(c.defaultValue=P[1]),r(P[2])&&(c.tDescription=P[2]),typeof P[2]=="object"||typeof P[3]=="object"){const d=P[3]||P[2];Object.keys(d).forEach(m=>{c[m]=d[m]})}return c},interpolation:{escapeValue:!0,format:P=>P,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ie=P=>(r(P.ns)&&(P.ns=[P.ns]),r(P.fallbackLng)&&(P.fallbackLng=[P.fallbackLng]),r(P.fallbackNS)&&(P.fallbackNS=[P.fallbackNS]),P.supportedLngs&&P.supportedLngs.indexOf("cimode")<0&&(P.supportedLngs=P.supportedLngs.concat(["cimode"])),P),Ge=()=>{},yt=P=>{Object.getOwnPropertyNames(Object.getPrototypeOf(P)).forEach(d=>{typeof P[d]=="function"&&(P[d]=P[d].bind(P))})};class ot extends fe{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ie(c),this.services={},this.logger=re,this.modules={external:[]},yt(this),d&&!this.isInitialized&&!c.isClone){if(!this.options.initImmediate)return this.init(c,d),this;setTimeout(()=>{this.init(c,d)},0)}}init(){var c=this;let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},m=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof d=="function"&&(m=d,d={}),!d.defaultNS&&d.defaultNS!==!1&&d.ns&&(r(d.ns)?d.defaultNS=d.ns:d.ns.indexOf("translation")<0&&(d.defaultNS=d.ns[0]));const C=Be();this.options={...C,...this.options,...Ie(d)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...C.interpolation,...this.options.interpolation}),d.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=d.keySeparator),d.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=d.nsSeparator);const E=oe=>oe?typeof oe=="function"?new oe:oe:null;if(!this.options.isClone){this.modules.logger?re.init(E(this.modules.logger),this.options):re.init(null,this.options);let oe;this.modules.formatter?oe=this.modules.formatter:typeof Intl<"u"&&(oe=pt);const me=new Se(this.options);this.store=new b(this.options.resources,this.options);const Y=this.services;Y.logger=re,Y.resourceStore=this.store,Y.languageUtils=me,Y.pluralResolver=new ee(me,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),oe&&(!this.options.interpolation.format||this.options.interpolation.format===C.interpolation.format)&&(Y.formatter=E(oe),Y.formatter.init(Y,this.options),this.options.interpolation.format=Y.formatter.format.bind(Y.formatter)),Y.interpolator=new ie(this.options),Y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},Y.backendConnector=new Me(E(this.modules.backend),Y.resourceStore,Y,this.options),Y.backendConnector.on("*",function(Ce){for(var Le=arguments.length,Ke=new Array(Le>1?Le-1:0),ze=1;ze<Le;ze++)Ke[ze-1]=arguments[ze];c.emit(Ce,...Ke)}),this.modules.languageDetector&&(Y.languageDetector=E(this.modules.languageDetector),Y.languageDetector.init&&Y.languageDetector.init(Y,this.options.detection,this.options)),this.modules.i18nFormat&&(Y.i18nFormat=E(this.modules.i18nFormat),Y.i18nFormat.init&&Y.i18nFormat.init(this)),this.translator=new se(this.services,this.options),this.translator.on("*",function(Ce){for(var Le=arguments.length,Ke=new Array(Le>1?Le-1:0),ze=1;ze<Le;ze++)Ke[ze-1]=arguments[ze];c.emit(Ce,...Ke)}),this.modules.external.forEach(Ce=>{Ce.init&&Ce.init(this)})}if(this.format=this.options.interpolation.format,m||(m=Ge),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const oe=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);oe.length>0&&oe[0]!=="dev"&&(this.options.lng=oe[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(oe=>{this[oe]=function(){return c.store[oe](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(oe=>{this[oe]=function(){return c.store[oe](...arguments),c}});const B=s(),Z=()=>{const oe=(me,Y)=>{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),B.resolve(Y),m(me,Y)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return oe(null,this.t.bind(this));this.changeLanguage(this.options.lng,oe)};return this.options.resources||!this.options.initImmediate?Z():setTimeout(Z,0),B}loadResources(c){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const C=r(c)?c:this.language;if(typeof c=="function"&&(m=c),!this.options.resources||this.options.partialBundledLanguages){if(C&&C.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return m();const E=[],L=D=>{if(!D||D==="cimode")return;this.services.languageUtils.toResolveHierarchy(D).forEach(Z=>{Z!=="cimode"&&E.indexOf(Z)<0&&E.push(Z)})};C?L(C):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(B=>L(B)),this.options.preload&&this.options.preload.forEach(D=>L(D)),this.services.backendConnector.load(E,this.options.ns,D=>{!D&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),m(D)})}else m(null)}reloadResources(c,d,m){const C=s();return typeof c=="function"&&(m=c,c=void 0),typeof d=="function"&&(m=d,d=void 0),c||(c=this.languages),d||(d=this.options.ns),m||(m=Ge),this.services.backendConnector.reload(c,d,E=>{C.resolve(),m(E)}),C}use(c){if(!c)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!c.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return c.type==="backend"&&(this.modules.backend=c),(c.type==="logger"||c.log&&c.warn&&c.error)&&(this.modules.logger=c),c.type==="languageDetector"&&(this.modules.languageDetector=c),c.type==="i18nFormat"&&(this.modules.i18nFormat=c),c.type==="postProcessor"&&M.addPostProcessor(c),c.type==="formatter"&&(this.modules.formatter=c),c.type==="3rdParty"&&this.modules.external.push(c),this}setResolvedLanguage(c){if(!(!c||!this.languages)&&!(["cimode","dev"].indexOf(c)>-1))for(let d=0;d<this.languages.length;d++){const m=this.languages[d];if(!(["cimode","dev"].indexOf(m)>-1)&&this.store.hasLanguageSomeTranslations(m)){this.resolvedLanguage=m;break}}}changeLanguage(c,d){var m=this;this.isLanguageChangingTo=c;const C=s();this.emit("languageChanging",c);const E=B=>{this.language=B,this.languages=this.services.languageUtils.toResolveHierarchy(B),this.resolvedLanguage=void 0,this.setResolvedLanguage(B)},L=(B,Z)=>{Z?(E(Z),this.translator.changeLanguage(Z),this.isLanguageChangingTo=void 0,this.emit("languageChanged",Z),this.logger.log("languageChanged",Z)):this.isLanguageChangingTo=void 0,C.resolve(function(){return m.t(...arguments)}),d&&d(B,function(){return m.t(...arguments)})},D=B=>{!c&&!B&&this.services.languageDetector&&(B=[]);const Z=r(B)?B:this.services.languageUtils.getBestMatchFromCodes(B);Z&&(this.language||E(Z),this.translator.language||this.translator.changeLanguage(Z),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(Z)),this.loadResources(Z,oe=>{L(oe,Z)})};return!c&&this.services.languageDetector&&!this.services.languageDetector.async?D(this.services.languageDetector.detect()):!c&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(D):this.services.languageDetector.detect(D):D(c),C}getFixedT(c,d,m){var C=this;const E=function(L,D){let B;if(typeof D!="object"){for(var Z=arguments.length,oe=new Array(Z>2?Z-2:0),me=2;me<Z;me++)oe[me-2]=arguments[me];B=C.options.overloadTranslationOptionHandler([L,D].concat(oe))}else B={...D};B.lng=B.lng||E.lng,B.lngs=B.lngs||E.lngs,B.ns=B.ns||E.ns,B.keyPrefix!==""&&(B.keyPrefix=B.keyPrefix||m||E.keyPrefix);const Y=C.options.keySeparator||".";let Ce;return B.keyPrefix&&Array.isArray(L)?Ce=L.map(Le=>`${B.keyPrefix}${Y}${Le}`):Ce=B.keyPrefix?`${B.keyPrefix}${Y}${L}`:L,C.t(Ce,B)};return r(c)?E.lng=c:E.lngs=c,E.ns=d,E.keyPrefix=m,E}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(c){this.options.defaultNS=c}hasLoadedNamespace(c){let d=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=d.lng||this.resolvedLanguage||this.languages[0],C=this.options?this.options.fallbackLng:!1,E=this.languages[this.languages.length-1];if(m.toLowerCase()==="cimode")return!0;const L=(D,B)=>{const Z=this.services.backendConnector.state[`${D}|${B}`];return Z===-1||Z===0||Z===2};if(d.precheck){const D=d.precheck(this,L);if(D!==void 0)return D}return!!(this.hasResourceBundle(m,c)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||L(m,c)&&(!C||L(E,c)))}loadNamespaces(c,d){const m=s();return this.options.ns?(r(c)&&(c=[c]),c.forEach(C=>{this.options.ns.indexOf(C)<0&&this.options.ns.push(C)}),this.loadResources(C=>{m.resolve(),d&&d(C)}),m):(d&&d(),Promise.resolve())}loadLanguages(c,d){const m=s();r(c)&&(c=[c]);const C=this.options.preload||[],E=c.filter(L=>C.indexOf(L)<0&&this.services.languageUtils.isSupportedCode(L));return E.length?(this.options.preload=C.concat(E),this.loadResources(L=>{m.resolve(),d&&d(L)}),m):(d&&d(),Promise.resolve())}dir(c){if(c||(c=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!c)return"rtl";const d=["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 Se(Be());return d.indexOf(m.getLanguagePartFromCode(c))>-1||c.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1?arguments[1]:void 0;return new ot(c,d)}cloneInstance(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ge;const m=c.forkResourceStore;m&&delete c.forkResourceStore;const C={...this.options,...c,isClone:!0},E=new ot(C);return(c.debug!==void 0||c.prefix!==void 0)&&(E.logger=E.logger.clone(c)),["store","services","language"].forEach(D=>{E[D]=this[D]}),E.services={...this.services},E.services.utils={hasLoadedNamespace:E.hasLoadedNamespace.bind(E)},m&&(E.store=new b(this.store.data,C),E.services.resourceStore=E.store),E.translator=new se(E.services,C),E.translator.on("*",function(D){for(var B=arguments.length,Z=new Array(B>1?B-1:0),oe=1;oe<B;oe++)Z[oe-1]=arguments[oe];E.emit(D,...Z)}),E.init(C,d),E.translator.options=C,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,li=Ze,li}const mu=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),Zn=qh(mu);var Rs={exports:{}},_s={},ai={exports:{}},yu;function sg(){return yu||(yu=1,(function(r){var s=Zn,i=Zn;function l(h){return i.existsSync(s.join(h,"package.json"))}function a(h,p){if(h=h||r.parent.filename,p=p||l,typeof h=="string"&&(h[h.length-1]!==s.sep&&(h+=s.sep),h=h.split(s.sep)),!h.length)throw new Error("package.json not found in path");h.pop();var v=h.join(s.sep);try{if(p(v))return v}catch{}return a(h,p)}r.exports=a})(ai)),ai.exports}var ui={exports:{}},ci,vu;function wu(){if(vu)return ci;vu=1;var r=Object.prototype.toString;return ci=function(i){var l=r.call(i),a=l==="[object Arguments]";return a||(a=l!=="[object Array]"&&i!==null&&typeof i=="object"&&typeof i.length=="number"&&i.length>=0&&r.call(i.callee)==="[object Function]"),a},ci}var fi,Su;function og(){if(Su)return fi;Su=1;var r;if(!Object.keys){var s=Object.prototype.hasOwnProperty,i=Object.prototype.toString,l=wu(),a=Object.prototype.propertyIsEnumerable,h=!a.call({toString:null},"toString"),p=a.call(function(){},"prototype"),v=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],g=function(j){var A=j.constructor;return A&&A.prototype===j},w={$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},k=(function(){if(typeof window>"u")return!1;for(var j in window)try{if(!w["$"+j]&&s.call(window,j)&&window[j]!==null&&typeof window[j]=="object")try{g(window[j])}catch{return!0}}catch{return!0}return!1})(),$=function(j){if(typeof window>"u"||!k)return g(j);try{return g(j)}catch{return!1}};r=function(A){var z=A!==null&&typeof A=="object",_=i.call(A)==="[object Function]",R=l(A),q=z&&i.call(A)==="[object String]",Q=[];if(!z&&!_&&!R)throw new TypeError("Object.keys called on a non-object");var ue=p&&_;if(q&&A.length>0&&!s.call(A,0))for(var pe=0;pe<A.length;++pe)Q.push(String(pe));if(R&&A.length>0)for(var ce=0;ce<A.length;++ce)Q.push(String(ce));else for(var ae in A)!(ue&&ae==="prototype")&&s.call(A,ae)&&Q.push(String(ae));if(h)for(var ne=$(A),re=0;re<v.length;++re)!(ne&&v[re]==="constructor")&&s.call(A,v[re])&&Q.push(v[re]);return Q}}return fi=r,fi}var hi,xu;function ig(){if(xu)return hi;xu=1;var r=Array.prototype.slice,s=wu(),i=Object.keys,l=i?function(p){return i(p)}:og(),a=Object.keys;return l.shim=function(){if(Object.keys){var p=(function(){var v=Object.keys(arguments);return v&&v.length===arguments.length})(1,2);p||(Object.keys=function(g){return s(g)?a(r.call(g)):a(g)})}else Object.keys=l;return Object.keys||l},hi=l,hi}var di,Cu;function ku(){return Cu||(Cu=1,di=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var s={},i=Symbol("test"),l=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(l)!=="[object Symbol]")return!1;var a=42;s[i]=a;for(var h 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 p=Object.getOwnPropertySymbols(s);if(p.length!==1||p[0]!==i||!Object.prototype.propertyIsEnumerable.call(s,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(s,i);if(v.value!==a||v.enumerable!==!0)return!1}return!0}),di}var pi,Pu;function gi(){return Pu||(Pu=1,pi=Object),pi}var mi,$u;function lg(){return $u||($u=1,mi=Error),mi}var yi,Eu;function ag(){return Eu||(Eu=1,yi=EvalError),yi}var vi,ju;function ug(){return ju||(ju=1,vi=RangeError),vi}var wi,Au;function cg(){return Au||(Au=1,wi=ReferenceError),wi}var Si,Tu;function fg(){return Tu||(Tu=1,Si=SyntaxError),Si}var xi,Ou;function Nu(){return Ou||(Ou=1,xi=TypeError),xi}var Ci,Ru;function hg(){return Ru||(Ru=1,Ci=URIError),Ci}var ki,_u;function dg(){return _u||(_u=1,ki=Math.abs),ki}var Pi,Lu;function pg(){return Lu||(Lu=1,Pi=Math.floor),Pi}var $i,bu;function gg(){return bu||(bu=1,$i=Math.max),$i}var Ei,Iu;function mg(){return Iu||(Iu=1,Ei=Math.min),Ei}var ji,Fu;function yg(){return Fu||(Fu=1,ji=Math.pow),ji}var Ai,Mu;function vg(){return Mu||(Mu=1,Ai=Math.round),Ai}var Ti,zu;function wg(){return zu||(zu=1,Ti=Number.isNaN||function(s){return s!==s}),Ti}var Oi,Du;function Sg(){if(Du)return Oi;Du=1;var r=wg();return Oi=function(i){return r(i)||i===0?i:i<0?-1:1},Oi}var Ni,Uu;function xg(){return Uu||(Uu=1,Ni=Object.getOwnPropertyDescriptor),Ni}var Ri,Bu;function Vu(){if(Bu)return Ri;Bu=1;var r=xg();if(r)try{r([],"length")}catch{r=null}return Ri=r,Ri}var _i,Hu;function Cg(){if(Hu)return _i;Hu=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return _i=r,_i}var Li,qu;function kg(){if(qu)return Li;qu=1;var r=typeof Symbol<"u"&&Symbol,s=ku();return Li=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:s()},Li}var bi,Wu;function Ku(){return Wu||(Wu=1,bi=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),bi}var Ii,Gu;function Qu(){if(Gu)return Ii;Gu=1;var r=gi();return Ii=r.getPrototypeOf||null,Ii}var Fi,Ju;function Pg(){if(Ju)return Fi;Ju=1;var r="Function.prototype.bind called on incompatible ",s=Object.prototype.toString,i=Math.max,l="[object Function]",a=function(g,w){for(var k=[],$=0;$<g.length;$+=1)k[$]=g[$];for(var j=0;j<w.length;j+=1)k[j+g.length]=w[j];return k},h=function(g,w){for(var k=[],$=w,j=0;$<g.length;$+=1,j+=1)k[j]=g[$];return k},p=function(v,g){for(var w="",k=0;k<v.length;k+=1)w+=v[k],k+1<v.length&&(w+=g);return w};return Fi=function(g){var w=this;if(typeof w!="function"||s.apply(w)!==l)throw new TypeError(r+w);for(var k=h(arguments,1),$,j=function(){if(this instanceof $){var q=w.apply(this,a(k,arguments));return Object(q)===q?q:this}return w.apply(g,a(k,arguments))},A=i(0,w.length-k.length),z=[],_=0;_<A;_++)z[_]="$"+_;if($=Function("binder","return function ("+p(z,",")+"){ return binder.apply(this,arguments); }")(j),w.prototype){var R=function(){};R.prototype=w.prototype,$.prototype=new R,R.prototype=null}return $},Fi}var Mi,Yu;function Ls(){if(Yu)return Mi;Yu=1;var r=Pg();return Mi=Function.prototype.bind||r,Mi}var zi,Xu;function Di(){return Xu||(Xu=1,zi=Function.prototype.call),zi}var Ui,Zu;function ec(){return Zu||(Zu=1,Ui=Function.prototype.apply),Ui}var Bi,tc;function $g(){return tc||(tc=1,Bi=typeof Reflect<"u"&&Reflect&&Reflect.apply),Bi}var Vi,nc;function Eg(){if(nc)return Vi;nc=1;var r=Ls(),s=ec(),i=Di(),l=$g();return Vi=l||r.call(i,s),Vi}var Hi,rc;function sc(){if(rc)return Hi;rc=1;var r=Ls(),s=Nu(),i=Di(),l=Eg();return Hi=function(h){if(h.length<1||typeof h[0]!="function")throw new s("a function is required");return l(r,i,h)},Hi}var qi,oc;function jg(){if(oc)return qi;oc=1;var r=sc(),s=Vu(),i;try{i=[].__proto__===Array.prototype}catch(p){if(!p||typeof p!="object"||!("code"in p)||p.code!=="ERR_PROTO_ACCESS")throw p}var l=!!i&&s&&s(Object.prototype,"__proto__"),a=Object,h=a.getPrototypeOf;return qi=l&&typeof l.get=="function"?r([l.get]):typeof h=="function"?function(v){return h(v==null?v:a(v))}:!1,qi}var Wi,ic;function Ag(){if(ic)return Wi;ic=1;var r=Ku(),s=Qu(),i=jg();return Wi=r?function(a){return r(a)}:s?function(a){if(!a||typeof a!="object"&&typeof a!="function")throw new TypeError("getProto: not an object");return s(a)}:i?function(a){return i(a)}:null,Wi}var Ki,lc;function Tg(){if(lc)return Ki;lc=1;var r=Function.prototype.call,s=Object.prototype.hasOwnProperty,i=Ls();return Ki=i.call(r,s),Ki}var Gi,ac;function Og(){if(ac)return Gi;ac=1;var r,s=gi(),i=lg(),l=ag(),a=ug(),h=cg(),p=fg(),v=Nu(),g=hg(),w=dg(),k=pg(),$=gg(),j=mg(),A=yg(),z=vg(),_=Sg(),R=Function,q=function(Fe){try{return R('"use strict"; return ('+Fe+").constructor;")()}catch{}},Q=Vu(),ue=Cg(),pe=function(){throw new v},ce=Q?(function(){try{return arguments.callee,pe}catch{try{return Q(arguments,"callee").get}catch{return pe}}})():pe,ae=kg()(),ne=Ag(),re=Qu(),fe=Ku(),b=ec(),M=Di(),K={},se=typeof Uint8Array>"u"||!ne?r:ne(Uint8Array),he={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":ae&&ne?ne([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":K,"%AsyncGenerator%":K,"%AsyncGeneratorFunction%":K,"%AsyncIteratorPrototype%":K,"%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%":i,"%eval%":eval,"%EvalError%":l,"%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%":R,"%GeneratorFunction%":K,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ae&&ne?ne(ne([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ae||!ne?r:ne(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":s,"%Object.getOwnPropertyDescriptor%":Q,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":a,"%ReferenceError%":h,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ae||!ne?r:ne(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ae&&ne?ne(""[Symbol.iterator]()):r,"%Symbol%":ae?Symbol:r,"%SyntaxError%":p,"%ThrowTypeError%":ce,"%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%":M,"%Function.prototype.apply%":b,"%Object.defineProperty%":ue,"%Object.getPrototypeOf%":re,"%Math.abs%":w,"%Math.floor%":k,"%Math.max%":$,"%Math.min%":j,"%Math.pow%":A,"%Math.round%":z,"%Math.sign%":_,"%Reflect.getPrototypeOf%":fe};if(ne)try{null.error}catch(Fe){var Se=ne(ne(Fe));he["%Error.prototype%"]=Se}var Te=function Fe(Me){var Be;if(Me==="%AsyncFunction%")Be=q("async function () {}");else if(Me==="%GeneratorFunction%")Be=q("function* () {}");else if(Me==="%AsyncGeneratorFunction%")Be=q("async function* () {}");else if(Me==="%AsyncGenerator%"){var Ie=Fe("%AsyncGeneratorFunction%");Ie&&(Be=Ie.prototype)}else if(Me==="%AsyncIteratorPrototype%"){var Ge=Fe("%AsyncGenerator%");Ge&&ne&&(Be=ne(Ge.prototype))}return he[Me]=Be,Be},S={__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"]},O=Ls(),W=Tg(),ge=O.call(M,Array.prototype.concat),V=O.call(b,Array.prototype.splice),ee=O.call(M,String.prototype.replace),G=O.call(M,String.prototype.slice),H=O.call(M,RegExp.prototype.exec),ie=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ne=/\\(\\)?/g,De=function(Me){var Be=G(Me,0,1),Ie=G(Me,-1);if(Be==="%"&&Ie!=="%")throw new p("invalid intrinsic syntax, expected closing `%`");if(Ie==="%"&&Be!=="%")throw new p("invalid intrinsic syntax, expected opening `%`");var Ge=[];return ee(Me,ie,function(yt,ot,Ze,P){Ge[Ge.length]=Ze?ee(P,Ne,"$1"):ot||yt}),Ge},pt=function(Me,Be){var Ie=Me,Ge;if(W(S,Ie)&&(Ge=S[Ie],Ie="%"+Ge[0]+"%"),W(he,Ie)){var yt=he[Ie];if(yt===K&&(yt=Te(Ie)),typeof yt>"u"&&!Be)throw new v("intrinsic "+Me+" exists, but is not available. Please file an issue!");return{alias:Ge,name:Ie,value:yt}}throw new p("intrinsic "+Me+" does not exist!")};return Gi=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(H(/^%?[^%]*%?$/,Me)===null)throw new p("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Ie=De(Me),Ge=Ie.length>0?Ie[0]:"",yt=pt("%"+Ge+"%",Be),ot=yt.name,Ze=yt.value,P=!1,c=yt.alias;c&&(Ge=c[0],V(Ie,ge([0,1],c)));for(var d=1,m=!0;d<Ie.length;d+=1){var C=Ie[d],E=G(C,0,1),L=G(C,-1);if((E==='"'||E==="'"||E==="`"||L==='"'||L==="'"||L==="`")&&E!==L)throw new p("property names with quotes must have matching quotes");if((C==="constructor"||!m)&&(P=!0),Ge+="."+C,ot="%"+Ge+"%",W(he,ot))Ze=he[ot];else if(Ze!=null){if(!(C in Ze)){if(!Be)throw new v("base intrinsic for "+Me+" exists, but the property is not available.");return}if(Q&&d+1>=Ie.length){var D=Q(Ze,C);m=!!D,m&&"get"in D&&!("originalValue"in D.get)?Ze=D.get:Ze=Ze[C]}else m=W(Ze,C),Ze=Ze[C];m&&!P&&(he[ot]=Ze)}}return Ze},Gi}var Qi,uc;function Ng(){if(uc)return Qi;uc=1;var r=Og(),s=sc(),i=s([r("%String.prototype.indexOf%")]);return Qi=function(a,h){var p=r(a,!!h);return typeof p=="function"&&i(a,".prototype.")>-1?s([p]):p},Qi}var Ji,cc;function Rg(){if(cc)return Ji;cc=1;var r=ig(),s=ku()(),i=Ng(),l=gi(),a=i("Array.prototype.push"),h=i("Object.prototype.propertyIsEnumerable"),p=s?l.getOwnPropertySymbols:null;return Ji=function(g,w){if(g==null)throw new TypeError("target must be an object");var k=l(g);if(arguments.length===1)return k;for(var $=1;$<arguments.length;++$){var j=l(arguments[$]),A=r(j),z=s&&(l.getOwnPropertySymbols||p);if(z)for(var _=z(j),R=0;R<_.length;++R){var q=_[R];h(j,q)&&a(A,q)}for(var Q=0;Q<A.length;++Q){var ue=A[Q];if(h(j,ue)){var pe=j[ue];k[ue]=pe}}}return k},Ji}var Yi,fc;function _g(){if(fc)return Yi;fc=1;var r=Rg(),s=function(){if(!Object.assign)return!1;for(var l="abcdefghijklmnopqrst",a=l.split(""),h={},p=0;p<a.length;++p)h[a[p]]=a[p];var v=Object.assign({},h),g="";for(var w in v)g+=w;return l!==g},i=function(){if(!Object.assign||!Object.preventExtensions)return!1;var l=Object.preventExtensions({1:2});try{Object.assign(l,"xy")}catch{return l[1]==="y"}return!1};return Yi=function(){return!Object.assign||s()||i()?r:Object.assign},Yi}var Xi={},Zi,hc;function Lg(){return hc||(hc=1,Zi=function(s){return s&&typeof s=="object"&&typeof s.copy=="function"&&typeof s.fill=="function"&&typeof s.readUInt8=="function"}),Zi}var bs={exports:{}},dc;function bg(){return dc||(dc=1,typeof Object.create=="function"?bs.exports=function(s,i){s.super_=i,s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}})}:bs.exports=function(s,i){s.super_=i;var l=function(){};l.prototype=i.prototype,s.prototype=new l,s.prototype.constructor=s}),bs.exports}var pc;function Ig(){return pc||(pc=1,(function(r){var s=/%[sdj%]/g;r.format=function(S){if(!ue(S)){for(var O=[],W=0;W<arguments.length;W++)O.push(a(arguments[W]));return O.join(" ")}for(var W=1,ge=arguments,V=ge.length,ee=String(S).replace(s,function(H){if(H==="%%")return"%";if(W>=V)return H;switch(H){case"%s":return String(ge[W++]);case"%d":return Number(ge[W++]);case"%j":try{return JSON.stringify(ge[W++])}catch{return"[Circular]"}default:return H}}),G=ge[W];W<V;G=ge[++W])R(G)||!ne(G)?ee+=" "+G:ee+=" "+a(G);return ee},r.deprecate=function(S,O){if(ce(Er.process))return function(){return r.deprecate(S,O).apply(this,arguments)};if(process.noDeprecation===!0)return S;var W=!1;function ge(){if(!W){if(process.throwDeprecation)throw new Error(O);process.traceDeprecation?console.trace(O):console.error(O),W=!0}return S.apply(this,arguments)}return ge};var i={},l;r.debuglog=function(S){if(ce(l)&&(l=process.env.NODE_DEBUG||""),S=S.toUpperCase(),!i[S])if(new RegExp("\\b"+S+"\\b","i").test(l)){var O=process.pid;i[S]=function(){var W=r.format.apply(r,arguments);console.error("%s %d: %s",S,O,W)}}else i[S]=function(){};return i[S]};function a(S,O){var W={seen:[],stylize:p};return arguments.length>=3&&(W.depth=arguments[2]),arguments.length>=4&&(W.colors=arguments[3]),_(O)?W.showHidden=O:O&&r._extend(W,O),ce(W.showHidden)&&(W.showHidden=!1),ce(W.depth)&&(W.depth=2),ce(W.colors)&&(W.colors=!1),ce(W.customInspect)&&(W.customInspect=!0),W.colors&&(W.stylize=h),g(W,S,W.depth)}r.inspect=a,a.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]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function h(S,O){var W=a.styles[O];return W?"\x1B["+a.colors[W][0]+"m"+S+"\x1B["+a.colors[W][1]+"m":S}function p(S,O){return S}function v(S){var O={};return S.forEach(function(W,ge){O[W]=!0}),O}function g(S,O,W){if(S.customInspect&&O&&b(O.inspect)&&O.inspect!==r.inspect&&!(O.constructor&&O.constructor.prototype===O)){var ge=O.inspect(W,S);return ue(ge)||(ge=g(S,ge,W)),ge}var V=w(S,O);if(V)return V;var ee=Object.keys(O),G=v(ee);if(S.showHidden&&(ee=Object.getOwnPropertyNames(O)),fe(O)&&(ee.indexOf("message")>=0||ee.indexOf("description")>=0))return k(O);if(ee.length===0){if(b(O)){var H=O.name?": "+O.name:"";return S.stylize("[Function"+H+"]","special")}if(ae(O))return S.stylize(RegExp.prototype.toString.call(O),"regexp");if(re(O))return S.stylize(Date.prototype.toString.call(O),"date");if(fe(O))return k(O)}var ie="",Ne=!1,De=["{","}"];if(z(O)&&(Ne=!0,De=["[","]"]),b(O)){var pt=O.name?": "+O.name:"";ie=" [Function"+pt+"]"}if(ae(O)&&(ie=" "+RegExp.prototype.toString.call(O)),re(O)&&(ie=" "+Date.prototype.toUTCString.call(O)),fe(O)&&(ie=" "+k(O)),ee.length===0&&(!Ne||O.length==0))return De[0]+ie+De[1];if(W<0)return ae(O)?S.stylize(RegExp.prototype.toString.call(O),"regexp"):S.stylize("[Object]","special");S.seen.push(O);var Fe;return Ne?Fe=$(S,O,W,G,ee):Fe=ee.map(function(Me){return j(S,O,W,G,Me,Ne)}),S.seen.pop(),A(Fe,ie,De)}function w(S,O){if(ce(O))return S.stylize("undefined","undefined");if(ue(O)){var W="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return S.stylize(W,"string")}if(Q(O))return S.stylize(""+O,"number");if(_(O))return S.stylize(""+O,"boolean");if(R(O))return S.stylize("null","null")}function k(S){return"["+Error.prototype.toString.call(S)+"]"}function $(S,O,W,ge,V){for(var ee=[],G=0,H=O.length;G<H;++G)Te(O,String(G))?ee.push(j(S,O,W,ge,String(G),!0)):ee.push("");return V.forEach(function(ie){ie.match(/^\d+$/)||ee.push(j(S,O,W,ge,ie,!0))}),ee}function j(S,O,W,ge,V,ee){var G,H,ie;if(ie=Object.getOwnPropertyDescriptor(O,V)||{value:O[V]},ie.get?ie.set?H=S.stylize("[Getter/Setter]","special"):H=S.stylize("[Getter]","special"):ie.set&&(H=S.stylize("[Setter]","special")),Te(ge,V)||(G="["+V+"]"),H||(S.seen.indexOf(ie.value)<0?(R(W)?H=g(S,ie.value,null):H=g(S,ie.value,W-1),H.indexOf(`
19
19
  `)>-1&&(ee?H=H.split(`
20
20
  `).map(function(Ne){return" "+Ne}).join(`
21
21
  `).substr(2):H=`
@@ -26,5 +26,5 @@ Add a <Suspense fallback=...> component higher in the tree to provide a loading
26
26
  `)+" "+S.join(`,
27
27
  `)+" "+W[1]:W[0]+O+" "+S.join(", ")+" "+W[1]}function z(S){return Array.isArray(S)}r.isArray=z;function _(S){return typeof S=="boolean"}r.isBoolean=_;function R(S){return S===null}r.isNull=R;function q(S){return S==null}r.isNullOrUndefined=q;function Q(S){return typeof S=="number"}r.isNumber=Q;function ue(S){return typeof S=="string"}r.isString=ue;function pe(S){return typeof S=="symbol"}r.isSymbol=pe;function ce(S){return S===void 0}r.isUndefined=ce;function ae(S){return ne(S)&&K(S)==="[object RegExp]"}r.isRegExp=ae;function ne(S){return typeof S=="object"&&S!==null}r.isObject=ne;function re(S){return ne(S)&&K(S)==="[object Date]"}r.isDate=re;function fe(S){return ne(S)&&(K(S)==="[object Error]"||S instanceof Error)}r.isError=fe;function b(S){return typeof S=="function"}r.isFunction=b;function M(S){return S===null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||typeof S=="symbol"||typeof S>"u"}r.isPrimitive=M,r.isBuffer=Lg();function K(S){return Object.prototype.toString.call(S)}function se(S){return S<10?"0"+S.toString(10):S.toString(10)}var he=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Se(){var S=new Date,O=[se(S.getHours()),se(S.getMinutes()),se(S.getSeconds())].join(":");return[S.getDate(),he[S.getMonth()],O].join(" ")}r.log=function(){console.log("%s - %s",Se(),r.format.apply(r,arguments))},r.inherits=bg(),r._extend=function(S,O){if(!O||!ne(O))return S;for(var W=Object.keys(O),ge=W.length;ge--;)S[W[ge]]=O[W[ge]];return S};function Te(S,O){return Object.prototype.hasOwnProperty.call(S,O)}})(Xi)),Xi}var gc;function Fg(){if(gc)return ui.exports;gc=1;var r=_g()();function s(b,M){if(b===M)return 0;for(var K=b.length,se=M.length,he=0,Se=Math.min(K,se);he<Se;++he)if(b[he]!==M[he]){K=b[he],se=M[he];break}return K<se?-1:se<K?1:0}function i(b){return Er.Buffer&&typeof Er.Buffer.isBuffer=="function"?Er.Buffer.isBuffer(b):!!(b!=null&&b._isBuffer)}var l=Ig(),a=Object.prototype.hasOwnProperty,h=Array.prototype.slice,p=(function(){return(function(){}).name==="foo"})();function v(b){return Object.prototype.toString.call(b)}function g(b){return i(b)||typeof Er.ArrayBuffer!="function"?!1:typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(b):b?!!(b instanceof DataView||b.buffer&&b.buffer instanceof ArrayBuffer):!1}var w=ui.exports=R,k=/\s*function\s+([^\(\s]*)\s*/;function $(b){if(l.isFunction(b)){if(p)return b.name;var M=b.toString(),K=M.match(k);return K&&K[1]}}w.AssertionError=function(M){this.name="AssertionError",this.actual=M.actual,this.expected=M.expected,this.operator=M.operator,M.message?(this.message=M.message,this.generatedMessage=!1):(this.message=z(this),this.generatedMessage=!0);var K=M.stackStartFunction||_;if(Error.captureStackTrace)Error.captureStackTrace(this,K);else{var se=new Error;if(se.stack){var he=se.stack,Se=$(K),Te=he.indexOf(`
28
28
  `+Se);if(Te>=0){var S=he.indexOf(`
29
- `,Te+1);he=he.substring(S+1)}this.stack=he}}},l.inherits(w.AssertionError,Error);function j(b,M){return typeof b=="string"?b.length<M?b:b.slice(0,M):b}function A(b){if(p||!l.isFunction(b))return l.inspect(b);var M=$(b),K=M?": "+M:"";return"[Function"+K+"]"}function z(b){return j(A(b.actual),128)+" "+b.operator+" "+j(A(b.expected),128)}function _(b,M,K,se,he){throw new w.AssertionError({message:K,actual:b,expected:M,operator:se,stackStartFunction:he})}w.fail=_;function R(b,M){b||_(b,!0,M,"==",w.ok)}w.ok=R,w.equal=function(M,K,se){M!=K&&_(M,K,se,"==",w.equal)},w.notEqual=function(M,K,se){M==K&&_(M,K,se,"!=",w.notEqual)},w.deepEqual=function(M,K,se){q(M,K,!1)||_(M,K,se,"deepEqual",w.deepEqual)},w.deepStrictEqual=function(M,K,se){q(M,K,!0)||_(M,K,se,"deepStrictEqual",w.deepStrictEqual)};function q(b,M,K,se){if(b===M)return!0;if(i(b)&&i(M))return s(b,M)===0;if(l.isDate(b)&&l.isDate(M))return b.getTime()===M.getTime();if(l.isRegExp(b)&&l.isRegExp(M))return b.source===M.source&&b.global===M.global&&b.multiline===M.multiline&&b.lastIndex===M.lastIndex&&b.ignoreCase===M.ignoreCase;if((b===null||typeof b!="object")&&(M===null||typeof M!="object"))return K?b===M:b==M;if(g(b)&&g(M)&&v(b)===v(M)&&!(b instanceof Float32Array||b instanceof Float64Array))return s(new Uint8Array(b.buffer),new Uint8Array(M.buffer))===0;if(i(b)!==i(M))return!1;se=se||{actual:[],expected:[]};var he=se.actual.indexOf(b);return he!==-1&&he===se.expected.indexOf(M)?!0:(se.actual.push(b),se.expected.push(M),ue(b,M,K,se))}function Q(b){return Object.prototype.toString.call(b)=="[object Arguments]"}function ue(b,M,K,se){if(b==null||M===null||M===void 0)return!1;if(l.isPrimitive(b)||l.isPrimitive(M))return b===M;if(K&&Object.getPrototypeOf(b)!==Object.getPrototypeOf(M))return!1;var he=Q(b),Se=Q(M);if(he&&!Se||!he&&Se)return!1;if(he)return b=h.call(b),M=h.call(M),q(b,M,K);var Te=fe(b),S=fe(M),O,W;if(Te.length!==S.length)return!1;for(Te.sort(),S.sort(),W=Te.length-1;W>=0;W--)if(Te[W]!==S[W])return!1;for(W=Te.length-1;W>=0;W--)if(O=Te[W],!q(b[O],M[O],K,se))return!1;return!0}w.notDeepEqual=function(M,K,se){q(M,K,!1)&&_(M,K,se,"notDeepEqual",w.notDeepEqual)},w.notDeepStrictEqual=pe;function pe(b,M,K){q(b,M,!0)&&_(b,M,K,"notDeepStrictEqual",pe)}w.strictEqual=function(M,K,se){M!==K&&_(M,K,se,"===",w.strictEqual)},w.notStrictEqual=function(M,K,se){M===K&&_(M,K,se,"!==",w.notStrictEqual)};function ce(b,M){if(!b||!M)return!1;if(Object.prototype.toString.call(M)=="[object RegExp]")return M.test(b);try{if(b instanceof M)return!0}catch{}return Error.isPrototypeOf(M)?!1:M.call({},b)===!0}function ae(b){var M;try{b()}catch(K){M=K}return M}function ne(b,M,K,se){var he;if(typeof M!="function")throw new TypeError('"block" argument must be a function');typeof K=="string"&&(se=K,K=null),he=ae(M),se=(K&&K.name?" ("+K.name+").":".")+(se?" "+se:"."),b&&!he&&_(he,K,"Missing expected exception"+se);var Se=typeof se=="string",Te=!b&&l.isError(he),S=!b&&he&&!K;if((Te&&Se&&ce(he,K)||S)&&_(he,K,"Got unwanted exception"+se),b&&he&&K&&!ce(he,K)||!b&&he)throw he}w.throws=function(b,M,K){ne(!0,b,M,K)},w.doesNotThrow=function(b,M,K){ne(!1,b,M,K)},w.ifError=function(b){if(b)throw b};function re(b,M){b||_(b,!0,M,"==",re)}w.strict=r(re,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict;var fe=Object.keys||function(b){var M=[];for(var K in b)a.call(b,K)&&M.push(K);return M};return ui.exports}var el,mc;function Mg(){if(mc)return el;mc=1;var r=Fg();return el=function(s){var i,l,a,h,p;for(i=Error.prepareStackTrace,Error.prepareStackTrace=function(v,g){return Error.prepareStackTrace=i,g},l=new Error().stack,p=0;p<l.length&&l[p].getFileName()!==__filename;)p++;r(p<l.length,"Unexpected: unable to find caller/index.js in the stack"),s=!s||isNaN(s)?1:s>l.length-2?l.length-2:s,l=l.slice(p+s+1);do h=l.shift(),a=h&&h.getFileName();while(l.length&&a==="module.js");return a},el}var yc;function zg(){if(yc)return _s;yc=1;const r=Zn,s=Zn,i=sg(),l=Mg();return _s.getCallerRoot=function(){try{return i(l(2))}catch{return}},_s.getProcessRoot=function(){let h=process.cwd();const p=s.join(h,"current");try{r.statSync(p).isDirectory()&&(h=p)}catch{}try{return i(h)}catch{return}},_s}var tl,vc;function Dg(){return vc||(vc=1,tl=zg()),tl}var Is={exports:{}},nl,wc;function Ug(){if(wc)return nl;wc=1;var r=1e3,s=r*60,i=s*60,l=i*24,a=l*7,h=l*365.25;nl=function(k,$){$=$||{};var j=typeof k;if(j==="string"&&k.length>0)return p(k);if(j==="number"&&isFinite(k))return $.long?g(k):v(k);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(k))};function p(k){if(k=String(k),!(k.length>100)){var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(k);if($){var j=parseFloat($[1]),A=($[2]||"ms").toLowerCase();switch(A){case"years":case"year":case"yrs":case"yr":case"y":return j*h;case"weeks":case"week":case"w":return j*a;case"days":case"day":case"d":return j*l;case"hours":case"hour":case"hrs":case"hr":case"h":return j*i;case"minutes":case"minute":case"mins":case"min":case"m":return j*s;case"seconds":case"second":case"secs":case"sec":case"s":return j*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return j;default:return}}}}function v(k){var $=Math.abs(k);return $>=l?Math.round(k/l)+"d":$>=i?Math.round(k/i)+"h":$>=s?Math.round(k/s)+"m":$>=r?Math.round(k/r)+"s":k+"ms"}function g(k){var $=Math.abs(k);return $>=l?w(k,$,l,"day"):$>=i?w(k,$,i,"hour"):$>=s?w(k,$,s,"minute"):$>=r?w(k,$,r,"second"):k+" ms"}function w(k,$,j,A){var z=$>=j*1.5;return Math.round(k/j)+" "+A+(z?"s":"")}return nl}var rl,Sc;function Bg(){if(Sc)return rl;Sc=1;function r(s){l.debug=l,l.default=l,l.coerce=w,l.disable=v,l.enable=h,l.enabled=g,l.humanize=Ug(),l.destroy=k,Object.keys(s).forEach($=>{l[$]=s[$]}),l.names=[],l.skips=[],l.formatters={};function i($){let j=0;for(let A=0;A<$.length;A++)j=(j<<5)-j+$.charCodeAt(A),j|=0;return l.colors[Math.abs(j)%l.colors.length]}l.selectColor=i;function l($){let j,A=null,z,_;function R(...q){if(!R.enabled)return;const Q=R,ue=Number(new Date),pe=ue-(j||ue);Q.diff=pe,Q.prev=j,Q.curr=ue,j=ue,q[0]=l.coerce(q[0]),typeof q[0]!="string"&&q.unshift("%O");let ce=0;q[0]=q[0].replace(/%([a-zA-Z%])/g,(ne,re)=>{if(ne==="%%")return"%";ce++;const fe=l.formatters[re];if(typeof fe=="function"){const b=q[ce];ne=fe.call(Q,b),q.splice(ce,1),ce--}return ne}),l.formatArgs.call(Q,q),(Q.log||l.log).apply(Q,q)}return R.namespace=$,R.useColors=l.useColors(),R.color=l.selectColor($),R.extend=a,R.destroy=l.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>A!==null?A:(z!==l.namespaces&&(z=l.namespaces,_=l.enabled($)),_),set:q=>{A=q}}),typeof l.init=="function"&&l.init(R),R}function a($,j){const A=l(this.namespace+(typeof j>"u"?":":j)+$);return A.log=this.log,A}function h($){l.save($),l.namespaces=$,l.names=[],l.skips=[];const j=(typeof $=="string"?$:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const A of j)A[0]==="-"?l.skips.push(A.slice(1)):l.names.push(A)}function p($,j){let A=0,z=0,_=-1,R=0;for(;A<$.length;)if(z<j.length&&(j[z]===$[A]||j[z]==="*"))j[z]==="*"?(_=z,R=A,z++):(A++,z++);else if(_!==-1)z=_+1,R++,A=R;else return!1;for(;z<j.length&&j[z]==="*";)z++;return z===j.length}function v(){const $=[...l.names,...l.skips.map(j=>"-"+j)].join(",");return l.enable(""),$}function g($){for(const j of l.skips)if(p($,j))return!1;for(const j of l.names)if(p($,j))return!0;return!1}function w($){return $ instanceof Error?$.stack||$.message:$}function k(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return l.enable(l.load()),l}return rl=r,rl}var xc;function Vg(){return xc||(xc=1,(function(r,s){s.formatArgs=l,s.save=a,s.load=h,s.useColors=i,s.storage=p(),s.destroy=(()=>{let g=!1;return()=>{g||(g=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function i(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let g;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(g=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(g[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(g){if(g[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+g[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;const w="color: "+this.color;g.splice(1,0,w,"color: inherit");let k=0,$=0;g[0].replace(/%[a-zA-Z%]/g,j=>{j!=="%%"&&(k++,j==="%c"&&($=k))}),g.splice($,0,w)}s.log=console.debug||console.log||(()=>{});function a(g){try{g?s.storage.setItem("debug",g):s.storage.removeItem("debug")}catch{}}function h(){let g;try{g=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!g&&typeof process<"u"&&"env"in process&&(g=process.env.DEBUG),g}function p(){try{return localStorage}catch{}}r.exports=Bg()(s);const{formatters:v}=r.exports;v.j=function(g){try{return JSON.stringify(g)}catch(w){return"[UnexpectedJSONParseError]: "+w.message}}})(Is,Is.exports)),Is.exports}var Cc;function Hg(){if(Cc)return Rs.exports;Cc=1;const r=Dg(),s=Vg();return Rs.exports=function(l){const a=r.getCallerRoot();let h;try{const p=Nn("/node_modules/.pnpm/@tryghost+debug@2.2.1/node_modules/@tryghost/debug/lib")(a+"/package.json");p.alias?h=p.alias:h=p.name}catch{h="undefined"}return s(h+":"+l)},Rs.exports._base=s,Rs.exports}var sl,kc;function qg(){return kc||(kc=1,sl=Hg()),sl}const Wg=[{code:"af",label:"Afrikaans"},{code:"ar",label:"Arabic"},{code:"bg",label:"Bulgarian"},{code:"bn",label:"Bengali"},{code:"bs",label:"Bosnian"},{code:"ca",label:"Catalan"},{code:"cs",label:"Czech"},{code:"da",label:"Danish"},{code:"de",label:"German"},{code:"de-CH",label:"Swiss German"},{code:"el",label:"Greek"},{code:"en",label:"English"},{code:"eo",label:"Esperanto"},{code:"es",label:"Spanish"},{code:"et",label:"Estonian"},{code:"eu",label:"Basque"},{code:"fa",label:"Persian/Farsi"},{code:"fi",label:"Finnish"},{code:"fr",label:"French"},{code:"gd",label:"Gaelic (Scottish)"},{code:"he",label:"Hebrew"},{code:"hi",label:"Hindi"},{code:"hr",label:"Croatian"},{code:"hu",label:"Hungarian"},{code:"id",label:"Indonesian"},{code:"is",label:"Icelandic"},{code:"it",label:"Italian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"kz",label:"Kazakh"},{code:"lt",label:"Lithuanian"},{code:"lv",label:"Latvian"},{code:"mk",label:"Macedonian"},{code:"mn",label:"Mongolian"},{code:"ms",label:"Malay"},{code:"nb",label:"Norwegian Bokmål"},{code:"ne",label:"Nepali"},{code:"nl",label:"Dutch"},{code:"nn",label:"Norwegian Nynorsk"},{code:"pa",label:"Punjabi"},{code:"pl",label:"Polish"},{code:"pt",label:"Portuguese"},{code:"pt-BR",label:"Portuguese (Brazil)"},{code:"ro",label:"Romanian"},{code:"ru",label:"Russian"},{code:"si",label:"Sinhala"},{code:"sk",label:"Slovak"},{code:"sl",label:"Slovenian"},{code:"sq",label:"Albanian"},{code:"sr",label:"Serbian"},{code:"sr-Cyrl",label:"Serbian (Cyrillic)"},{code:"sv",label:"Swedish"},{code:"sw",label:"Swahili"},{code:"ta",label:"Tamil"},{code:"th",label:"Thai"},{code:"tr",label:"Turkish"},{code:"uk",label:"Ukrainian"},{code:"ur",label:"Urdu"},{code:"uz",label:"Uzbek"},{code:"vi",label:"Vietnamese"},{code:"zh",label:"Chinese"},{code:"zh-Hant",label:"Traditional Chinese"}];var Pc;function Kg(){if(Pc)return Xn.exports;Pc=1;const r=rg(),s=Zn,i=Zn,l=qg()("i18n"),a=Wg,h=a.map(g=>g.code);function p(g,w){return g.reduce((k,$)=>{let j;try{j=Nn("/ghost/i18n/lib")(`../locales/${$}/${w}.json`)}catch{j=Nn("/ghost/i18n/lib")(`../locales/en/${w}.json`)}return k[$]={[w]:{...j,...j.default&&typeof j.default=="object"?j.default:{}}},k},{})}function v(g,w){if(!w)return{[g]:{theme:{}}};let k=[];try{k=i.readdirSync(w).filter(A=>A.endsWith(".json")).map(A=>A.replace(".json",""))}catch{k=[g,"en"]}return[...new Set([g,...k,"en"])].reduce((j,A)=>{let z,_=!1;const R=s.join(w,`${A}.json`);if(i.existsSync(R))try{delete require.cache[Nn("/ghost/i18n/lib").resolve(R)],z=Nn("/ghost/i18n/lib")(R)}catch{l(`Error loading theme locale file: ${A}`),_=!0}else _=!0;if(_)if(A!=="en")try{const q=s.join(w,"en.json");i.existsSync(q)?(delete require.cache[Nn("/ghost/i18n/lib").resolve(q)],z=Nn("/ghost/i18n/lib")(q)):z={}}catch{z={}}else l("Theme en.json file not found"),z={};return j[A]={theme:{...z,...z.default&&typeof z.default=="object"?z.default:{}}},j},{})}return Xn.exports=(g="en",w="portal",k={})=>{const $=r.createInstance(),j={prefix:"{",suffix:"}"};(w==="theme"||w==="portal")&&(j.escapeValue=!1);let A;return w!=="theme"?A=p(h,w):(l(`generateThemeResources: ${g}, ${k.themePath}`),A=v(g,k.themePath)),$.init({lng:g,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:w,defaultNS:w,interpolation:j,resources:A}),$},Xn.exports.SUPPORTED_LOCALES=h,Xn.exports.LOCALE_DATA=a,Xn.exports.generateResources=p,Xn.exports}var $c;function Gg(){if($c)return On.exports;$c=1;const r=Kg();return On.exports=r,On.exports.default=r,On.exports.LOCALE_DATA=r.LOCALE_DATA,On.exports.SUPPORTED_LOCALES=r.SUPPORTED_LOCALES,On.exports.generateResources=r.generateResources,On.exports}var Qg=Gg();const Jg=Io(Qg);class Yg extends en.Component{constructor(s){super(s);const i=this.props.locale||"en",l=Jg(i,"search"),a=l.dir()||"ltr",h=new Kd({adminUrl:s.adminUrl,apiKey:s.apiKey,dir:a});this.state={searchIndex:h,showPopup:!1,indexStarted:!1,indexComplete:!1,t:l.t,dir:a,scrollbarWidth:0},this.inputRef=en.createRef()}componentDidMount(){const s=this.getScrollbarWidth();this.setState({scrollbarWidth:s}),this.initSetup()}componentDidUpdate(s,i){if(i.showPopup!==this.state.showPopup)try{this.state.showPopup?(this.bodyScroll=window.document?.body?.style?.overflow,this.bodyMargin=window.getComputedStyle(document.body).getPropertyValue("margin-right"),window.document.body.style.overflow="hidden",this.state.scrollbarWidth&&document.body.scrollHeight>window.innerHeight&&(window.document.body.style.marginRight=`calc(${this.bodyMargin} + ${this.state.scrollbarWidth}px)`)):(window.document.body.style.overflow=this.bodyScroll||"",!this.bodyMargin||this.bodyMargin==="0px"?window.document.body.style.marginRight="":window.document.body.style.marginRight=this.bodyMargin)}catch{}this.state.showPopup!==i?.showPopup&&!this.state.showPopup&&this.setState({searchValue:""}),this.state.showPopup&&!this.state.indexStarted&&this.setupSearchIndex()}async setupSearchIndex(){this.setState({indexStarted:!0}),await this.state.searchIndex.init(),this.setState({indexComplete:!0})}componentWillUnmount(){window.removeEventListener("hashchange",this.hashHandler,!1),window.removeEventListener("keydown",this.handleKeyDown,!1)}initSetup(){this.handleSearchUrl(),this.addKeyboardShortcuts(),this.setupCustomTriggerButton(),this.hashHandler=()=>{this.handleSearchUrl()},window.addEventListener("hashchange",this.hashHandler,!1)}getScrollbarWidth(){const s=document.createElement("div");s.style.visibility="hidden",s.style.overflow="scroll",document.body.appendChild(s);const i=s.offsetWidth-s.clientWidth;return document.body.removeChild(s),i}setupCustomTriggerButton(){this.clickHandler=s=>{s.preventDefault(),this.setState({showPopup:!0});const i=document.createElement("input");i.style.opacity="0",i.style.position="fixed",i.style.top="0",document.body.appendChild(i),i.focus(),setTimeout(()=>{this.inputRef.current.focus(),document.body.removeChild(i)},150)},this.customTriggerButtons=this.getCustomTriggerButtons(),this.customTriggerButtons.forEach(s=>{s.removeEventListener("click",this.clickHandler),s.addEventListener("click",this.clickHandler)})}getCustomTriggerButtons(){return document.querySelectorAll("[data-ghost-search]")||[]}handleSearchUrl(){const[s]=window.location.hash.substr(1).split("?");(s==="/search"||s==="/search/")&&(this.setState({showPopup:!0}),window.history.replaceState("",document.title,window.location.pathname))}addKeyboardShortcuts(){this.getCustomTriggerButtons()?.length&&(this.handleKeyDown=i=>{if(i.key==="k"&&i.metaKey)return this.setState({showPopup:!0}),i.preventDefault(),i.stopPropagation(),!1},document.addEventListener("keydown",this.handleKeyDown))}render(){return le.jsx(ut.Provider,{value:{page:"search",showPopup:this.state.showPopup,adminUrl:this.props.adminUrl,stylesUrl:this.props.stylesUrl,searchIndex:this.state.searchIndex,indexComplete:this.state.indexComplete,searchValue:this.state.searchValue,inputRef:this.inputRef,onAction:()=>{},dispatch:(s,i)=>{s==="update"&&this.setState({...this.state,...i})},t:this.state.t,dir:this.state.dir},children:le.jsx($d,{})})}}const Ec="sodo-search-root";function Xg(){const r=document.createElement("div");r.id=Ec,document.body.appendChild(r)}function Zg(){const r=document.querySelector("script[data-sodo-search]");if(r){const s=r.dataset.sodoSearch,i=r.dataset.key,l=r.dataset.styles,a=r.dataset.locale||"en";return{adminUrl:s,apiKey:i,stylesUrl:l,locale:a}}return{}}function em(){Xg()}function tm(){const{adminUrl:r,apiKey:s,stylesUrl:i,locale:l}=Zg(),a=(r||window.location.origin)?.replace(/\/+$/,"");em(),Zh.render(le.jsx(en.StrictMode,{children:le.jsx(Yg,{adminUrl:a,apiKey:s,stylesUrl:i,locale:l})}),document.getElementById(Ec))}tm()}));
29
+ `,Te+1);he=he.substring(S+1)}this.stack=he}}},l.inherits(w.AssertionError,Error);function j(b,M){return typeof b=="string"?b.length<M?b:b.slice(0,M):b}function A(b){if(p||!l.isFunction(b))return l.inspect(b);var M=$(b),K=M?": "+M:"";return"[Function"+K+"]"}function z(b){return j(A(b.actual),128)+" "+b.operator+" "+j(A(b.expected),128)}function _(b,M,K,se,he){throw new w.AssertionError({message:K,actual:b,expected:M,operator:se,stackStartFunction:he})}w.fail=_;function R(b,M){b||_(b,!0,M,"==",w.ok)}w.ok=R,w.equal=function(M,K,se){M!=K&&_(M,K,se,"==",w.equal)},w.notEqual=function(M,K,se){M==K&&_(M,K,se,"!=",w.notEqual)},w.deepEqual=function(M,K,se){q(M,K,!1)||_(M,K,se,"deepEqual",w.deepEqual)},w.deepStrictEqual=function(M,K,se){q(M,K,!0)||_(M,K,se,"deepStrictEqual",w.deepStrictEqual)};function q(b,M,K,se){if(b===M)return!0;if(i(b)&&i(M))return s(b,M)===0;if(l.isDate(b)&&l.isDate(M))return b.getTime()===M.getTime();if(l.isRegExp(b)&&l.isRegExp(M))return b.source===M.source&&b.global===M.global&&b.multiline===M.multiline&&b.lastIndex===M.lastIndex&&b.ignoreCase===M.ignoreCase;if((b===null||typeof b!="object")&&(M===null||typeof M!="object"))return K?b===M:b==M;if(g(b)&&g(M)&&v(b)===v(M)&&!(b instanceof Float32Array||b instanceof Float64Array))return s(new Uint8Array(b.buffer),new Uint8Array(M.buffer))===0;if(i(b)!==i(M))return!1;se=se||{actual:[],expected:[]};var he=se.actual.indexOf(b);return he!==-1&&he===se.expected.indexOf(M)?!0:(se.actual.push(b),se.expected.push(M),ue(b,M,K,se))}function Q(b){return Object.prototype.toString.call(b)=="[object Arguments]"}function ue(b,M,K,se){if(b==null||M===null||M===void 0)return!1;if(l.isPrimitive(b)||l.isPrimitive(M))return b===M;if(K&&Object.getPrototypeOf(b)!==Object.getPrototypeOf(M))return!1;var he=Q(b),Se=Q(M);if(he&&!Se||!he&&Se)return!1;if(he)return b=h.call(b),M=h.call(M),q(b,M,K);var Te=fe(b),S=fe(M),O,W;if(Te.length!==S.length)return!1;for(Te.sort(),S.sort(),W=Te.length-1;W>=0;W--)if(Te[W]!==S[W])return!1;for(W=Te.length-1;W>=0;W--)if(O=Te[W],!q(b[O],M[O],K,se))return!1;return!0}w.notDeepEqual=function(M,K,se){q(M,K,!1)&&_(M,K,se,"notDeepEqual",w.notDeepEqual)},w.notDeepStrictEqual=pe;function pe(b,M,K){q(b,M,!0)&&_(b,M,K,"notDeepStrictEqual",pe)}w.strictEqual=function(M,K,se){M!==K&&_(M,K,se,"===",w.strictEqual)},w.notStrictEqual=function(M,K,se){M===K&&_(M,K,se,"!==",w.notStrictEqual)};function ce(b,M){if(!b||!M)return!1;if(Object.prototype.toString.call(M)=="[object RegExp]")return M.test(b);try{if(b instanceof M)return!0}catch{}return Error.isPrototypeOf(M)?!1:M.call({},b)===!0}function ae(b){var M;try{b()}catch(K){M=K}return M}function ne(b,M,K,se){var he;if(typeof M!="function")throw new TypeError('"block" argument must be a function');typeof K=="string"&&(se=K,K=null),he=ae(M),se=(K&&K.name?" ("+K.name+").":".")+(se?" "+se:"."),b&&!he&&_(he,K,"Missing expected exception"+se);var Se=typeof se=="string",Te=!b&&l.isError(he),S=!b&&he&&!K;if((Te&&Se&&ce(he,K)||S)&&_(he,K,"Got unwanted exception"+se),b&&he&&K&&!ce(he,K)||!b&&he)throw he}w.throws=function(b,M,K){ne(!0,b,M,K)},w.doesNotThrow=function(b,M,K){ne(!1,b,M,K)},w.ifError=function(b){if(b)throw b};function re(b,M){b||_(b,!0,M,"==",re)}w.strict=r(re,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict;var fe=Object.keys||function(b){var M=[];for(var K in b)a.call(b,K)&&M.push(K);return M};return ui.exports}var el,mc;function Mg(){if(mc)return el;mc=1;var r=Fg();return el=function(s){var i,l,a,h,p;for(i=Error.prepareStackTrace,Error.prepareStackTrace=function(v,g){return Error.prepareStackTrace=i,g},l=new Error().stack,p=0;p<l.length&&l[p].getFileName()!==__filename;)p++;r(p<l.length,"Unexpected: unable to find caller/index.js in the stack"),s=!s||isNaN(s)?1:s>l.length-2?l.length-2:s,l=l.slice(p+s+1);do h=l.shift(),a=h&&h.getFileName();while(l.length&&a==="module.js");return a},el}var yc;function zg(){if(yc)return _s;yc=1;const r=Zn,s=Zn,i=sg(),l=Mg();return _s.getCallerRoot=function(){try{return i(l(2))}catch{return}},_s.getProcessRoot=function(){let h=process.cwd();const p=s.join(h,"current");try{r.statSync(p).isDirectory()&&(h=p)}catch{}try{return i(h)}catch{return}},_s}var tl,vc;function Dg(){return vc||(vc=1,tl=zg()),tl}var Is={exports:{}},nl,wc;function Ug(){if(wc)return nl;wc=1;var r=1e3,s=r*60,i=s*60,l=i*24,a=l*7,h=l*365.25;nl=function(k,$){$=$||{};var j=typeof k;if(j==="string"&&k.length>0)return p(k);if(j==="number"&&isFinite(k))return $.long?g(k):v(k);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(k))};function p(k){if(k=String(k),!(k.length>100)){var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(k);if($){var j=parseFloat($[1]),A=($[2]||"ms").toLowerCase();switch(A){case"years":case"year":case"yrs":case"yr":case"y":return j*h;case"weeks":case"week":case"w":return j*a;case"days":case"day":case"d":return j*l;case"hours":case"hour":case"hrs":case"hr":case"h":return j*i;case"minutes":case"minute":case"mins":case"min":case"m":return j*s;case"seconds":case"second":case"secs":case"sec":case"s":return j*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return j;default:return}}}}function v(k){var $=Math.abs(k);return $>=l?Math.round(k/l)+"d":$>=i?Math.round(k/i)+"h":$>=s?Math.round(k/s)+"m":$>=r?Math.round(k/r)+"s":k+"ms"}function g(k){var $=Math.abs(k);return $>=l?w(k,$,l,"day"):$>=i?w(k,$,i,"hour"):$>=s?w(k,$,s,"minute"):$>=r?w(k,$,r,"second"):k+" ms"}function w(k,$,j,A){var z=$>=j*1.5;return Math.round(k/j)+" "+A+(z?"s":"")}return nl}var rl,Sc;function Bg(){if(Sc)return rl;Sc=1;function r(s){l.debug=l,l.default=l,l.coerce=w,l.disable=v,l.enable=h,l.enabled=g,l.humanize=Ug(),l.destroy=k,Object.keys(s).forEach($=>{l[$]=s[$]}),l.names=[],l.skips=[],l.formatters={};function i($){let j=0;for(let A=0;A<$.length;A++)j=(j<<5)-j+$.charCodeAt(A),j|=0;return l.colors[Math.abs(j)%l.colors.length]}l.selectColor=i;function l($){let j,A=null,z,_;function R(...q){if(!R.enabled)return;const Q=R,ue=Number(new Date),pe=ue-(j||ue);Q.diff=pe,Q.prev=j,Q.curr=ue,j=ue,q[0]=l.coerce(q[0]),typeof q[0]!="string"&&q.unshift("%O");let ce=0;q[0]=q[0].replace(/%([a-zA-Z%])/g,(ne,re)=>{if(ne==="%%")return"%";ce++;const fe=l.formatters[re];if(typeof fe=="function"){const b=q[ce];ne=fe.call(Q,b),q.splice(ce,1),ce--}return ne}),l.formatArgs.call(Q,q),(Q.log||l.log).apply(Q,q)}return R.namespace=$,R.useColors=l.useColors(),R.color=l.selectColor($),R.extend=a,R.destroy=l.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>A!==null?A:(z!==l.namespaces&&(z=l.namespaces,_=l.enabled($)),_),set:q=>{A=q}}),typeof l.init=="function"&&l.init(R),R}function a($,j){const A=l(this.namespace+(typeof j>"u"?":":j)+$);return A.log=this.log,A}function h($){l.save($),l.namespaces=$,l.names=[],l.skips=[];const j=(typeof $=="string"?$:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const A of j)A[0]==="-"?l.skips.push(A.slice(1)):l.names.push(A)}function p($,j){let A=0,z=0,_=-1,R=0;for(;A<$.length;)if(z<j.length&&(j[z]===$[A]||j[z]==="*"))j[z]==="*"?(_=z,R=A,z++):(A++,z++);else if(_!==-1)z=_+1,R++,A=R;else return!1;for(;z<j.length&&j[z]==="*";)z++;return z===j.length}function v(){const $=[...l.names,...l.skips.map(j=>"-"+j)].join(",");return l.enable(""),$}function g($){for(const j of l.skips)if(p($,j))return!1;for(const j of l.names)if(p($,j))return!0;return!1}function w($){return $ instanceof Error?$.stack||$.message:$}function k(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return l.enable(l.load()),l}return rl=r,rl}var xc;function Vg(){return xc||(xc=1,(function(r,s){s.formatArgs=l,s.save=a,s.load=h,s.useColors=i,s.storage=p(),s.destroy=(()=>{let g=!1;return()=>{g||(g=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function i(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let g;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(g=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(g[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(g){if(g[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+g[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),!this.useColors)return;const w="color: "+this.color;g.splice(1,0,w,"color: inherit");let k=0,$=0;g[0].replace(/%[a-zA-Z%]/g,j=>{j!=="%%"&&(k++,j==="%c"&&($=k))}),g.splice($,0,w)}s.log=console.debug||console.log||(()=>{});function a(g){try{g?s.storage.setItem("debug",g):s.storage.removeItem("debug")}catch{}}function h(){let g;try{g=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch{}return!g&&typeof process<"u"&&"env"in process&&(g=process.env.DEBUG),g}function p(){try{return localStorage}catch{}}r.exports=Bg()(s);const{formatters:v}=r.exports;v.j=function(g){try{return JSON.stringify(g)}catch(w){return"[UnexpectedJSONParseError]: "+w.message}}})(Is,Is.exports)),Is.exports}var Cc;function Hg(){if(Cc)return Rs.exports;Cc=1;const r=Dg(),s=Vg();return Rs.exports=function(l){const a=r.getCallerRoot();let h;try{const p=Nn("/node_modules/.pnpm/@tryghost+debug@2.2.3/node_modules/@tryghost/debug/lib")(a+"/package.json");p.alias?h=p.alias:h=p.name}catch{h="undefined"}return s(h+":"+l)},Rs.exports._base=s,Rs.exports}var sl,kc;function qg(){return kc||(kc=1,sl=Hg()),sl}const Wg=[{code:"af",label:"Afrikaans"},{code:"ar",label:"Arabic"},{code:"bg",label:"Bulgarian"},{code:"bn",label:"Bengali"},{code:"bs",label:"Bosnian"},{code:"ca",label:"Catalan"},{code:"cs",label:"Czech"},{code:"da",label:"Danish"},{code:"de",label:"German"},{code:"de-CH",label:"Swiss German"},{code:"el",label:"Greek"},{code:"en",label:"English"},{code:"eo",label:"Esperanto"},{code:"es",label:"Spanish"},{code:"et",label:"Estonian"},{code:"eu",label:"Basque"},{code:"fa",label:"Persian/Farsi"},{code:"fi",label:"Finnish"},{code:"fr",label:"French"},{code:"gd",label:"Gaelic (Scottish)"},{code:"he",label:"Hebrew"},{code:"hi",label:"Hindi"},{code:"hr",label:"Croatian"},{code:"hu",label:"Hungarian"},{code:"id",label:"Indonesian"},{code:"is",label:"Icelandic"},{code:"it",label:"Italian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"kz",label:"Kazakh"},{code:"lt",label:"Lithuanian"},{code:"lv",label:"Latvian"},{code:"mk",label:"Macedonian"},{code:"mn",label:"Mongolian"},{code:"ms",label:"Malay"},{code:"nb",label:"Norwegian Bokmål"},{code:"ne",label:"Nepali"},{code:"nl",label:"Dutch"},{code:"nn",label:"Norwegian Nynorsk"},{code:"pa",label:"Punjabi"},{code:"pl",label:"Polish"},{code:"pt",label:"Portuguese"},{code:"pt-BR",label:"Portuguese (Brazil)"},{code:"ro",label:"Romanian"},{code:"ru",label:"Russian"},{code:"si",label:"Sinhala"},{code:"sk",label:"Slovak"},{code:"sl",label:"Slovenian"},{code:"sq",label:"Albanian"},{code:"sr",label:"Serbian"},{code:"sr-Cyrl",label:"Serbian (Cyrillic)"},{code:"sv",label:"Swedish"},{code:"sw",label:"Swahili"},{code:"ta",label:"Tamil"},{code:"th",label:"Thai"},{code:"tr",label:"Turkish"},{code:"uk",label:"Ukrainian"},{code:"ur",label:"Urdu"},{code:"uz",label:"Uzbek"},{code:"vi",label:"Vietnamese"},{code:"zh",label:"Chinese"},{code:"zh-Hant",label:"Traditional Chinese"}];var Pc;function Kg(){if(Pc)return Xn.exports;Pc=1;const r=rg(),s=Zn,i=Zn,l=qg()("i18n"),a=Wg,h=a.map(g=>g.code);function p(g,w){return g.reduce((k,$)=>{let j;try{j=Nn("/ghost/i18n/lib")(`../locales/${$}/${w}.json`)}catch{j=Nn("/ghost/i18n/lib")(`../locales/en/${w}.json`)}return k[$]={[w]:{...j,...j.default&&typeof j.default=="object"?j.default:{}}},k},{})}function v(g,w){if(!w)return{[g]:{theme:{}}};let k=[];try{k=i.readdirSync(w).filter(A=>A.endsWith(".json")).map(A=>A.replace(".json",""))}catch{k=[g,"en"]}return[...new Set([g,...k,"en"])].reduce((j,A)=>{let z,_=!1;const R=s.join(w,`${A}.json`);if(i.existsSync(R))try{delete require.cache[Nn("/ghost/i18n/lib").resolve(R)],z=Nn("/ghost/i18n/lib")(R)}catch{l(`Error loading theme locale file: ${A}`),_=!0}else _=!0;if(_)if(A!=="en")try{const q=s.join(w,"en.json");i.existsSync(q)?(delete require.cache[Nn("/ghost/i18n/lib").resolve(q)],z=Nn("/ghost/i18n/lib")(q)):z={}}catch{z={}}else l("Theme en.json file not found"),z={};return j[A]={theme:{...z,...z.default&&typeof z.default=="object"?z.default:{}}},j},{})}return Xn.exports=(g="en",w="portal",k={})=>{const $=r.createInstance(),j={prefix:"{",suffix:"}"};(w==="theme"||w==="portal")&&(j.escapeValue=!1);let A;return w!=="theme"?A=p(h,w):(l(`generateThemeResources: ${g}, ${k.themePath}`),A=v(g,k.themePath)),$.init({lng:g,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:{no:["nb","en"],default:["en"]},ns:w,defaultNS:w,interpolation:j,resources:A}),$},Xn.exports.SUPPORTED_LOCALES=h,Xn.exports.LOCALE_DATA=a,Xn.exports.generateResources=p,Xn.exports}var $c;function Gg(){if($c)return On.exports;$c=1;const r=Kg();return On.exports=r,On.exports.default=r,On.exports.LOCALE_DATA=r.LOCALE_DATA,On.exports.SUPPORTED_LOCALES=r.SUPPORTED_LOCALES,On.exports.generateResources=r.generateResources,On.exports}var Qg=Gg();const Jg=Io(Qg);class Yg extends en.Component{constructor(s){super(s);const i=this.props.locale||"en",l=Jg(i,"search"),a=l.dir()||"ltr",h=new Kd({adminUrl:s.adminUrl,apiKey:s.apiKey,dir:a});this.state={searchIndex:h,showPopup:!1,indexStarted:!1,indexComplete:!1,t:l.t,dir:a,scrollbarWidth:0},this.inputRef=en.createRef()}componentDidMount(){const s=this.getScrollbarWidth();this.setState({scrollbarWidth:s}),this.initSetup()}componentDidUpdate(s,i){if(i.showPopup!==this.state.showPopup)try{this.state.showPopup?(this.bodyScroll=window.document?.body?.style?.overflow,this.bodyMargin=window.getComputedStyle(document.body).getPropertyValue("margin-right"),window.document.body.style.overflow="hidden",this.state.scrollbarWidth&&document.body.scrollHeight>window.innerHeight&&(window.document.body.style.marginRight=`calc(${this.bodyMargin} + ${this.state.scrollbarWidth}px)`)):(window.document.body.style.overflow=this.bodyScroll||"",!this.bodyMargin||this.bodyMargin==="0px"?window.document.body.style.marginRight="":window.document.body.style.marginRight=this.bodyMargin)}catch{}this.state.showPopup!==i?.showPopup&&!this.state.showPopup&&this.setState({searchValue:""}),this.state.showPopup&&!this.state.indexStarted&&this.setupSearchIndex()}async setupSearchIndex(){this.setState({indexStarted:!0}),await this.state.searchIndex.init(),this.setState({indexComplete:!0})}componentWillUnmount(){window.removeEventListener("hashchange",this.hashHandler,!1),window.removeEventListener("keydown",this.handleKeyDown,!1)}initSetup(){this.handleSearchUrl(),this.addKeyboardShortcuts(),this.setupCustomTriggerButton(),this.hashHandler=()=>{this.handleSearchUrl()},window.addEventListener("hashchange",this.hashHandler,!1)}getScrollbarWidth(){const s=document.createElement("div");s.style.visibility="hidden",s.style.overflow="scroll",document.body.appendChild(s);const i=s.offsetWidth-s.clientWidth;return document.body.removeChild(s),i}setupCustomTriggerButton(){this.clickHandler=s=>{s.preventDefault(),this.setState({showPopup:!0});const i=document.createElement("input");i.style.opacity="0",i.style.position="fixed",i.style.top="0",document.body.appendChild(i),i.focus(),setTimeout(()=>{this.inputRef.current.focus(),document.body.removeChild(i)},150)},this.customTriggerButtons=this.getCustomTriggerButtons(),this.customTriggerButtons.forEach(s=>{s.removeEventListener("click",this.clickHandler),s.addEventListener("click",this.clickHandler)})}getCustomTriggerButtons(){return document.querySelectorAll("[data-ghost-search]")||[]}handleSearchUrl(){const[s]=window.location.hash.substr(1).split("?");(s==="/search"||s==="/search/")&&(this.setState({showPopup:!0}),window.history.replaceState("",document.title,window.location.pathname))}addKeyboardShortcuts(){this.getCustomTriggerButtons()?.length&&(this.handleKeyDown=i=>{if(i.key==="k"&&i.metaKey)return this.setState({showPopup:!0}),i.preventDefault(),i.stopPropagation(),!1},document.addEventListener("keydown",this.handleKeyDown))}render(){return le.jsx(ut.Provider,{value:{page:"search",showPopup:this.state.showPopup,adminUrl:this.props.adminUrl,stylesUrl:this.props.stylesUrl,searchIndex:this.state.searchIndex,indexComplete:this.state.indexComplete,searchValue:this.state.searchValue,inputRef:this.inputRef,onAction:()=>{},dispatch:(s,i)=>{s==="update"&&this.setState({...this.state,...i})},t:this.state.t,dir:this.state.dir},children:le.jsx($d,{})})}}const Ec="sodo-search-root";function Xg(){const r=document.createElement("div");r.id=Ec,document.body.appendChild(r)}function Zg(){const r=document.querySelector("script[data-sodo-search]");if(r){const s=r.dataset.sodoSearch,i=r.dataset.key,l=r.dataset.styles,a=r.dataset.locale||"en";return{adminUrl:s,apiKey:i,stylesUrl:l,locale:a}}return{}}function em(){Xg()}function tm(){const{adminUrl:r,apiKey:s,stylesUrl:i,locale:l}=Zg(),a=(r||window.location.origin)?.replace(/\/+$/,"");em(),Zh.render(le.jsx(en.StrictMode,{children:le.jsx(Yg,{adminUrl:a,apiKey:s,stylesUrl:i,locale:l})}),document.getElementById(Ec))}tm()}));
30
30
  //# sourceMappingURL=sodo-search.min.js.map