var ny=Object.defineProperty;var ry=(Y,J,ge)=>J in Y?ny(Y,J,{enumerable:!0,configurable:!0,writable:!0,value:ge}):Y[J]=ge;var vo=(Y,J,ge)=>(ry(Y,typeof J!="symbol"?J+"":J,ge),ge),sy=(Y,J,ge)=>{if(!J.has(Y))throw TypeError("Cannot "+ge)};var An=(Y,J,ge)=>{if(J.has(Y))throw TypeError("Cannot add the same private member more than once");J instanceof WeakSet?J.add(Y):J.set(Y,ge)};var qe=(Y,J,ge)=>(sy(Y,J,"access private method"),ge);(function(Y){typeof define=="function"&&define.amd?define(Y):Y()})(function(){var go,Dd,mo,Fd,yo,Id,Tn,wo,Nn,So;"use strict";var Y=document.createElement("style");Y.textContent=`.App{text-align:center}.App-logo{height:40vmin;pointer-events:none}@media (prefers-reduced-motion: no-preference){.App-logo{animation:App-logo-spin infinite 20s linear}}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.App-link{color:#61dafb}@keyframes App-logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}} `,document.head.appendChild(Y);function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ge={exports:{}},Ln={};/* object-assign (c) Sindre Sorhus @license MIT */var Zl=Object.getOwnPropertySymbols,Md=Object.prototype.hasOwnProperty,Ud=Object.prototype.propertyIsEnumerable;function zd(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Bd(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(o){s[o]=o}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var ea=Bd()?Object.assign:function(e,t){for(var n,r=zd(e),s,o=1;o"u"||typeof MessageChannel!="function"){var a=null,u=null,f=function(){if(a!==null)try{var k=e.unstable_now();a(!0,k),a=null}catch(L){throw setTimeout(f,0),L}};t=function(k){a!==null?setTimeout(t,0,k):(a=k,setTimeout(f,0))},n=function(k,L){u=setTimeout(k,L)},r=function(){clearTimeout(u)},e.unstable_shouldYield=function(){return!1},s=e.unstable_forceFrameRate=function(){}}else{var p=window.setTimeout,c=window.clearTimeout;if(typeof console<"u"){var v=window.cancelAnimationFrame;typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof v!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var m=!1,y=null,h=-1,d=5,g=0;e.unstable_shouldYield=function(){return e.unstable_now()>=g},s=function(){},e.unstable_forceFrameRate=function(k){0>k||125>>1,ie=k[q];if(ie!==void 0&&0j(Kt,_))jn!==void 0&&0>j(jn,Kt)?(k[q]=jn,k[Ur]=_,q=Ur):(k[q]=Kt,k[Vt]=_,q=Vt);else if(jn!==void 0&&0>j(jn,_))k[q]=jn,k[Ur]=_,q=Ur;else break e}}return L}return null}function j(k,L){var _=k.sortIndex-L.sortIndex;return _!==0?_:k.id-L.id}var O=[],G=[],nt=1,Ce=null,te=3,We=!1,Ee=!1,be=!1;function On(k){for(var L=C(G);L!==null;){if(L.callback===null)P(G);else if(L.startTime<=k)P(G),L.sortIndex=L.expirationTime,T(O,L);else break;L=C(G)}}function oe(k){if(be=!1,On(k),!Ee)if(C(O)!==null)Ee=!0,t(De);else{var L=C(G);L!==null&&n(oe,L.startTime-k)}}function De(k,L){Ee=!1,be&&(be=!1,r()),We=!0;var _=te;try{for(On(L),Ce=C(O);Ce!==null&&(!(Ce.expirationTime>L)||k&&!e.unstable_shouldYield());){var q=Ce.callback;if(typeof q=="function"){Ce.callback=null,te=Ce.priorityLevel;var ie=q(Ce.expirationTime<=L);L=e.unstable_now(),typeof ie=="function"?Ce.callback=ie:Ce===C(O)&&P(O),On(L)}else P(O);Ce=C(O)}if(Ce!==null)var Vt=!0;else{var Kt=C(G);Kt!==null&&n(oe,Kt.startTime-L),Vt=!1}return Vt}finally{Ce=null,te=_,We=!1}}var Ht=s;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_continueExecution=function(){Ee||We||(Ee=!0,t(De))},e.unstable_getCurrentPriorityLevel=function(){return te},e.unstable_getFirstCallbackNode=function(){return C(O)},e.unstable_next=function(k){switch(te){case 1:case 2:case 3:var L=3;break;default:L=te}var _=te;te=L;try{return k()}finally{te=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=Ht,e.unstable_runWithPriority=function(k,L){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var _=te;te=k;try{return L()}finally{te=_}},e.unstable_scheduleCallback=function(k,L,_){var q=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?q+_:q):_=q,k){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=_+ie,k={id:nt++,callback:L,priorityLevel:k,startTime:_,expirationTime:ie,sortIndex:-1},_>q?(k.sortIndex=_,T(G,k),C(O)===null&&k===C(G)&&(be?r():be=!0,n(oe,_-q))):(k.sortIndex=ie,T(O,k),Ee||We||(Ee=!0,t(De))),k},e.unstable_wrapCallback=function(k){var L=te;return function(){var _=te;te=L;try{return k.apply(this,arguments)}finally{te=_}}}})(Ca),xa.exports=Ca;var Yd=xa.exports;/** @license React v17.0.2 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Hr=R,z=ea,Z=Yd;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xd=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,$a=Object.prototype.hasOwnProperty,ka={},Pa={};function Zd(e){return $a.call(Pa,e)?!0:$a.call(ka,e)?!1:Xd.test(e)?Pa[e]=!0:(ka[e]=!0,!1)}function eh(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function th(e,t,n,r){if(t===null||typeof t>"u"||eh(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function he(e,t,n,r,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ne[e]=new he(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ne[t]=new he(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ne[e]=new he(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ne[e]=new he(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ne[e]=new he(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ne[e]=new he(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){ne[e]=new he(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){ne[e]=new he(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){ne[e]=new he(e,5,!1,e.toLowerCase(),null,!1,!1)});var To=/[\-:]([a-z])/g;function No(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(To,No);ne[t]=new he(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(To,No);ne[t]=new he(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(To,No);ne[t]=new he(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){ne[e]=new he(e,1,!1,e.toLowerCase(),null,!1,!1)}),ne.xlinkHref=new he("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){ne[e]=new he(e,1,!1,e.toLowerCase(),null,!0,!0)});function Oo(e,t,n,r){var s=ne.hasOwnProperty(t)?ne[t]:null,o=s!==null?s.type===0:r?!1:!(!(2l||s[i]!==o[l])return` `+s[i].replace(" at new "," at ");while(1<=i&&0<=l);break}}}finally{Uo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Un(e):""}function nh(e){switch(e.tag){case 5:return Un(e.type);case 16:return Un("Lazy");case 13:return Un("Suspense");case 19:return Un("SuspenseList");case 0:case 2:case 15:return e=br(e.type,!1),e;case 11:return e=br(e.type.render,!1),e;case 22:return e=br(e.type._render,!1),e;case 1:return e=br(e.type,!0),e;default:return""}}function Jt(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case st:return"Fragment";case Nt:return"Portal";case Fn:return"Profiler";case jo:return"StrictMode";case In:return"Suspense";case Kr:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lo:return(e.displayName||"Context")+".Consumer";case Ao:return(e._context.displayName||"Context")+".Provider";case Vr:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case Wr:return Jt(e.type);case _o:return Jt(e._render);case Ro:t=e._payload,e=e._init;try{return Jt(e(t))}catch{}}return null}function ot(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Oa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rh(e){var t=Oa(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){e._valueTracker||(e._valueTracker=rh(e))}function ja(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Oa(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Jr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function zo(e,t){var n=t.checked;return z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Aa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ot(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function La(e,t){t=t.checked,t!=null&&Oo(e,"checked",t,!1)}function Bo(e,t){La(e,t);var n=ot(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ho(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ho(e,t.type,ot(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ra(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ho(e,t,n){(t!=="number"||Jr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function sh(e){var t="";return Hr.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Vo(e,t){return e=z({children:void 0},t),(t=sh(t.children))&&(e.children=t),e}function Qt(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s=n.length))throw Error(E(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ot(n)}}function Da(e,t){var n=ot(t.value),r=ot(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Fa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Wo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Ia(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function bo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ia(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qr,Ma=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!==Wo.svg||"innerHTML"in e)e.innerHTML=t;else{for(Qr=Qr||document.createElement("div"),Qr.innerHTML=""+t.valueOf().toString()+"",t=Qr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bn={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},oh=["Webkit","ms","Moz","O"];Object.keys(Bn).forEach(function(e){oh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bn[t]=Bn[e]})});function Ua(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bn.hasOwnProperty(e)&&Bn[e]?(""+t).trim():t+"px"}function za(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Ua(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var ih=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qo(e,t){if(t){if(ih[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Jo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Qo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Go=null,Gt=null,Yt=null;function Ba(e){if(e=ir(e)){if(typeof Go!="function")throw Error(E(280));var t=e.stateNode;t&&(t=hs(t),Go(e.stateNode,e.type,t))}}function Ha(e){Gt?Yt?Yt.push(e):Yt=[e]:Gt=e}function Va(){if(Gt){var e=Gt,t=Yt;if(Yt=Gt=null,Ba(e),t)for(e=0;er?0:1<n;n++)t.push(e);return t}function ns(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-ut(t),e[t]=n}var ut=Math.clz32?Math.clz32:Ch,Sh=Math.log,xh=Math.LN2;function Ch(e){return e===0?32:31-(Sh(e)/xh|0)|0}var Eh=Z.unstable_UserBlockingPriority,$h=Z.unstable_runWithPriority,rs=!0;function kh(e,t,n,r){Ot||Xo();var s=ci,o=Ot;Ot=!0;try{Ka(s,e,t,n,r)}finally{(Ot=o)||ei()}}function Ph(e,t,n,r){$h(Eh,ci.bind(null,e,t,n,r))}function ci(e,t,n,r){if(rs){var s;if((s=(t&4)===0)&&0=Zn),mu=String.fromCharCode(32),yu=!1;function vu(e,t){switch(e){case"keyup":return Qh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nn=!1;function Yh(e,t){switch(e){case"compositionend":return wu(t);case"keypress":return t.which!==32?null:(yu=!0,mu);case"textInput":return e=t.data,e===mu&&yu?null:e;default:return null}}function Xh(e,t){if(nn)return e==="compositionend"||!vi&&vu(e,t)?(e=cu(),ss=di=ct=null,nn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pu(n)}}function Nu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ou(){for(var e=window,t=Jr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jr(e.document)}return t}function xi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var ap=Qe&&"documentMode"in document&&11>=document.documentMode,rn=null,Ci=null,rr=null,Ei=!1;function ju(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ei||rn==null||rn!==Jr(r)||(r=rn,"selectionStart"in r&&xi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rr&&nr(rr,r)||(rr=r,r=us(Ci,"onSelect"),0un||(e.current=ji[un],ji[un]=null,un--)}function H(e,t){un++,ji[un]=e.current,e.current=t}var ht={},le=dt(ht),me=dt(!1),Lt=ht;function cn(e,t){var n=e.type.contextTypes;if(!n)return ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in n)s[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ye(e){return e=e.childContextTypes,e!=null}function ps(){U(me),U(le)}function bu(e,t,n){if(le.current!==ht)throw Error(E(168));H(le,t),H(me,n)}function qu(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(E(108,Jt(t)||"Unknown",s));return z({},n,r)}function gs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ht,Lt=le.current,H(le,e),H(me,me.current),!0}function Ju(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=qu(e,t,Lt),r.__reactInternalMemoizedMergedChildContext=e,U(me),U(le),H(le,e)):U(me),H(me,n)}var Ai=null,Rt=null,fp=Z.unstable_runWithPriority,Li=Z.unstable_scheduleCallback,Ri=Z.unstable_cancelCallback,dp=Z.unstable_shouldYield,Qu=Z.unstable_requestPaint,_i=Z.unstable_now,hp=Z.unstable_getCurrentPriorityLevel,ms=Z.unstable_ImmediatePriority,Gu=Z.unstable_UserBlockingPriority,Yu=Z.unstable_NormalPriority,Xu=Z.unstable_LowPriority,Zu=Z.unstable_IdlePriority,Di={},pp=Qu!==void 0?Qu:function(){},Ge=null,ys=null,Fi=!1,ec=_i(),ae=1e4>ec?_i:function(){return _i()-ec};function fn(){switch(hp()){case ms:return 99;case Gu:return 98;case Yu:return 97;case Xu:return 96;case Zu:return 95;default:throw Error(E(332))}}function tc(e){switch(e){case 99:return ms;case 98:return Gu;case 97:return Yu;case 96:return Xu;case 95:return Zu;default:throw Error(E(332))}}function _t(e,t){return e=tc(e),fp(e,t)}function lr(e,t,n){return e=tc(e),Li(e,t,n)}function Ie(){if(ys!==null){var e=ys;ys=null,Ri(e)}nc()}function nc(){if(!Fi&&Ge!==null){Fi=!0;var e=0;try{var t=Ge;_t(99,function(){for(;eP?(j=C,C=null):j=C.sibling;var O=c(h,C,g[P],w);if(O===null){C===null&&(C=j);break}e&&C&&O.alternate===null&&t(h,C),d=o(O,d,P),T===null?S=O:T.sibling=O,T=O,C=j}if(P===g.length)return n(h,C),S;if(C===null){for(;PP?(j=C,C=null):j=C.sibling;var G=c(h,C,O.value,w);if(G===null){C===null&&(C=j);break}e&&C&&G.alternate===null&&t(h,C),d=o(G,d,P),T===null?S=G:T.sibling=G,T=G,C=j}if(O.done)return n(h,C),S;if(C===null){for(;!O.done;P++,O=g.next())O=p(h,O.value,w),O!==null&&(d=o(O,d,P),T===null?S=O:T.sibling=O,T=O);return S}for(C=r(h,C);!O.done;P++,O=g.next())O=v(C,h,P,O.value,w),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?P:O.key),d=o(O,d,P),T===null?S=O:T.sibling=O,T=O);return e&&C.forEach(function(nt){return t(h,nt)}),S}return function(h,d,g,w){var S=typeof g=="object"&&g!==null&&g.type===st&&g.key===null;S&&(g=g.props.children);var T=typeof g=="object"&&g!==null;if(T)switch(g.$$typeof){case Dn:e:{for(T=g.key,S=d;S!==null;){if(S.key===T){switch(S.tag){case 7:if(g.type===st){n(h,S.sibling),d=s(S,g.props.children),d.return=h,h=d;break e}break;default:if(S.elementType===g.type){n(h,S.sibling),d=s(S,g.props),d.ref=ur(h,S,g),d.return=h,h=d;break e}}n(h,S);break}else t(h,S);S=S.sibling}g.type===st?(d=xn(g.props.children,h.mode,w,g.key),d.return=h,h=d):(w=Hs(g.type,g.key,g.props,null,h.mode,w),w.ref=ur(h,d,g),w.return=h,h=w)}return i(h);case Nt:e:{for(S=g.key;d!==null;){if(d.key===S)if(d.tag===4&&d.stateNode.containerInfo===g.containerInfo&&d.stateNode.implementation===g.implementation){n(h,d.sibling),d=s(d,g.children||[]),d.return=h,h=d;break e}else{n(h,d);break}else t(h,d);d=d.sibling}d=El(g,h.mode,w),d.return=h,h=d}return i(h)}if(typeof g=="string"||typeof g=="number")return g=""+g,d!==null&&d.tag===6?(n(h,d.sibling),d=s(d,g),d.return=h,h=d):(n(h,d),d=Cl(g,h.mode,w),d.return=h,h=d),i(h);if(Es(g))return m(h,d,g,w);if(Mn(g))return y(h,d,g,w);if(T&&$s(h,g),typeof g>"u"&&!S)switch(h.tag){case 1:case 22:case 0:case 11:case 15:throw Error(E(152,Jt(h.type)||"Component"))}return n(h,d)}}var ks=fc(!0),dc=fc(!1),cr={},Me=dt(cr),fr=dt(cr),dr=dt(cr);function Dt(e){if(e===cr)throw Error(E(174));return e}function Bi(e,t){switch(H(dr,t),H(fr,e),H(Me,cr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:bo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=bo(t,e)}U(Me),H(Me,t)}function pn(){U(Me),U(fr),U(dr)}function hc(e){Dt(dr.current);var t=Dt(Me.current),n=bo(t,e.type);t!==n&&(H(fr,e),H(Me,n))}function Hi(e){fr.current===e&&(U(Me),U(fr))}var V=dt(0);function Ps(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ye=null,yt=null,Ue=!1;function pc(e,t){var n=Oe(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function gc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function Vi(e){if(Ue){var t=yt;if(t){var n=t;if(!gc(e,t)){if(t=on(n.nextSibling),!t||!gc(e,t)){e.flags=e.flags&-1025|2,Ue=!1,Ye=e;return}pc(Ye,n)}Ye=e,yt=on(t.firstChild)}else e.flags=e.flags&-1025|2,Ue=!1,Ye=e}}function mc(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ye=e}function Ts(e){if(e!==Ye)return!1;if(!Ue)return mc(e),Ue=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Ti(t,e.memoizedProps))for(t=yt;t;)pc(e,t),t=on(t.nextSibling);if(mc(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(E(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){yt=on(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}yt=null}}else yt=Ye?on(e.stateNode.nextSibling):null;return!0}function Ki(){yt=Ye=null,Ue=!1}var gn=[];function Wi(){for(var e=0;eo))throw Error(E(301));o+=1,re=ue=null,t.updateQueue=null,hr.current=wp,e=n(r,s)}while(gr)}if(hr.current=Ls,t=ue!==null&&ue.next!==null,pr=0,re=ue=W=null,Ns=!1,t)throw Error(E(300));return e}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return re===null?W.memoizedState=re=e:re=re.next=e,re}function It(){if(ue===null){var e=W.alternate;e=e!==null?e.memoizedState:null}else e=ue.next;var t=re===null?W.memoizedState:re.next;if(t!==null)re=t,ue=e;else{if(e===null)throw Error(E(310));ue=e,e={memoizedState:ue.memoizedState,baseState:ue.baseState,baseQueue:ue.baseQueue,queue:ue.queue,next:null},re===null?W.memoizedState=re=e:re=re.next=e}return re}function ze(e,t){return typeof t=="function"?t(e):t}function mr(e){var t=It(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=ue,s=r.baseQueue,o=n.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}r.baseQueue=s=o,n.pending=null}if(s!==null){s=s.next,r=r.baseState;var l=i=o=null,a=s;do{var u=a.lane;if((pr&u)===u)l!==null&&(l=l.next={lane:0,action:a.action,eagerReducer:a.eagerReducer,eagerState:a.eagerState,next:null}),r=a.eagerReducer===e?a.eagerState:e(r,a.action);else{var f={lane:u,action:a.action,eagerReducer:a.eagerReducer,eagerState:a.eagerState,next:null};l===null?(i=l=f,o=r):l=l.next=f,W.lanes|=u,Sr|=u}a=a.next}while(a!==null&&a!==s);l===null?o=r:l.next=i,ke(r,t.memoizedState)||(_e=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function yr(e){var t=It(),n=t.queue;if(n===null)throw Error(E(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,o=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);ke(o,t.memoizedState)||(_e=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function yc(e,t,n){var r=t._getVersion;r=r(t._source);var s=t._workInProgressVersionPrimary;if(s!==null?e=s===r:(e=e.mutableReadLanes,(e=(pr&e)===e)&&(t._workInProgressVersionPrimary=r,gn.push(t))),e)return n(t._source);throw gn.push(t),Error(E(350))}function vc(e,t,n,r){var s=pe;if(s===null)throw Error(E(349));var o=t._getVersion,i=o(t._source),l=hr.current,a=l.useState(function(){return yc(s,t,n)}),u=a[1],f=a[0];a=re;var p=e.memoizedState,c=p.refs,v=c.getSnapshot,m=p.source;p=p.subscribe;var y=W;return e.memoizedState={refs:c,source:t,subscribe:r},l.useEffect(function(){c.getSnapshot=n,c.setSnapshot=u;var h=o(t._source);if(!ke(i,h)){h=n(t._source),ke(f,h)||(u(h),h=wt(y),s.mutableReadLanes|=h&s.pendingLanes),h=s.mutableReadLanes,s.entangledLanes|=h;for(var d=s.entanglements,g=h;0n?98:n,function(){e(!0)}),_t(97<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[ft]=t,e[ds]=r,Uc(e,t,!1,!1),t.stateNode=e,i=Jo(n,r),n){case"dialog":M("cancel",e),M("close",e),s=r;break;case"iframe":case"object":case"embed":M("load",e),s=r;break;case"video":case"audio":for(s=0;shl&&(t.flags|=64,o=!0,wr(r,!1),t.lanes=33554432)}else{if(!o)if(e=Ps(i),e!==null){if(t.flags|=64,o=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wr(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ue)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*ae()-r.renderingStartTime>hl&&n!==1073741824&&(t.flags|=64,o=!0,wr(r,!1),t.lanes=33554432);r.isBackwards?(i.sibling=t.child,t.child=i):(n=r.last,n!==null?n.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=ae(),n.sibling=null,t=V.current,H(V,o?t&1|2:t&1),n):null;case 23:case 24:return wl(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(E(156,t.tag))}function Cp(e){switch(e.tag){case 1:ye(e.type)&&ps();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(pn(),U(me),U(le),Wi(),t=e.flags,t&64)throw Error(E(285));return e.flags=t&-4097|64,e;case 5:return Hi(e),null;case 13:return U(V),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return U(V),null;case 4:return pn(),null;case 10:return Mi(e),null;case 23:case 24:return wl(),null;default:return null}}function rl(e,t){try{var n="",r=t;do n+=nh(r),r=r.return;while(r);var s=n}catch(o){s=` Error generating stack: `+o.message+` `+o.stack}return{value:e,source:t,stack:s}}function sl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ep=typeof WeakMap=="function"?WeakMap:Map;function Hc(e,t,n){n=gt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fs||(Fs=!0,pl=r),sl(e,t)},n}function Vc(e,t,n){n=gt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return sl(e,t),r(s)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Be===null?Be=new Set([this]):Be.add(this),sl(e,t));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}var $p=typeof WeakSet=="function"?WeakSet:Set;function Kc(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Ct(e,n)}else t.current=null}function kp(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Re(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Ni(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(E(163))}function Pp(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var s=e;r=s.next,s=s.tag,s&4&&s&1&&(of(n,e),_p(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Re(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&ic(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}ic(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&Bu(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&nu(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(E(163))}function Wc(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var s=n.memoizedProps.style;s=s!=null&&s.hasOwnProperty("display")?s.display:null,r.style.display=Ua("display",s)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function bc(e,t){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Ai,t)}catch{}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,s=r.destroy;if(r=r.tag,s!==void 0)if(r&4)of(t,n);else{r=t;try{s()}catch(o){Ct(r,o)}}n=n.next}while(n!==e)}break;case 1:if(Kc(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(o){Ct(t,o)}break;case 5:Kc(t);break;case 4:Gc(e,t)}}function qc(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function Jc(e){return e.tag===5||e.tag===3||e.tag===4}function Qc(e){e:{for(var t=e.return;t!==null;){if(Jc(t))break e;t=t.return}throw Error(E(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(E(161))}n.flags&16&&(zn(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Jc(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?ol(e,n,t):il(e,n,t)}function ol(e,t,n){var r=e.tag,s=r===5||r===6;if(s)e=s?e.stateNode:e.stateNode.instance,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cs));else if(r!==4&&(e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag,s=r===5||r===6;if(s)e=s?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function Gc(e,t){for(var n=t,r=!1,s,o;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(E(160));switch(s=r.stateNode,r.tag){case 5:o=!1;break e;case 3:s=s.containerInfo,o=!0;break e;case 4:s=s.containerInfo,o=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var i=e,l=n,a=l;;)if(bc(i,a),a.child!==null&&a.tag!==4)a.child.return=a,a=a.child;else{if(a===l)break e;for(;a.sibling===null;){if(a.return===null||a.return===l)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}o?(i=s,l=n.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):s.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){s=n.stateNode.containerInfo,o=!0,n.child.return=n,n=n.child;continue}}else if(bc(e,n),n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return,n.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function ll(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var s=e!==null?e.memoizedProps:r;e=t.type;var o=t.updateQueue;if(t.updateQueue=null,o!==null){for(n[ds]=r,e==="input"&&r.type==="radio"&&r.name!=null&&La(n,r),Jo(e,s),t=Jo(e,r),s=0;ss&&(s=i),n&=~o}if(n=s,n=ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Np(n/1960))-n,10 component higher in the tree to provide a loading indicator or placeholder to display.`)}se!==5&&(se=2),a=rl(a,l),c=i;do{switch(c.tag){case 3:o=a,c.flags|=4096,t&=-t,c.lanes|=t;var T=Hc(c,o,t);oc(c,T);break e;case 1:o=a;var C=c.type,P=c.stateNode;if(!(c.flags&64)&&(typeof C.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Be===null||!Be.has(P)))){c.flags|=4096,t&=-t,c.lanes|=t;var j=Vc(c,o,t);oc(c,j);break e}}c=c.return}while(c!==null)}sf(n)}catch(O){t=O,X===n&&n!==null&&(X=n=n.return);continue}break}while(1)}function nf(){var e=_s.current;return _s.current=Ls,e===null?Ls:e}function kr(e,t){var n=A;A|=16;var r=nf();pe===e&&ce===t||Sn(e,t);do try{jp();break}catch(s){tf(e,s)}while(1);if(Ii(),A=n,_s.current=r,X!==null)throw Error(E(261));return pe=null,ce=0,se}function jp(){for(;X!==null;)rf(X)}function Ap(){for(;X!==null&&!dp();)rf(X)}function rf(e){var t=af(e.alternate,e,Mt);e.memoizedProps=e.pendingProps,t===null?sf(e):X=t,al.current=null}function sf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=Cp(t),n!==null){n.flags&=2047,X=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=xp(n,t,Mt),n!==null){X=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Mt&1073741824||!(n.mode&4)){for(var r=0,s=n.child;s!==null;)r|=s.lanes|s.childLanes,s=s.sibling;n.childLanes=r}e!==null&&!(e.flags&2048)&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1i&&(l=i,i=T,T=l),l=Tu(g,T),o=Tu(g,i),l&&o&&(S.rangeCount!==1||S.anchorNode!==l.node||S.anchorOffset!==l.offset||S.focusNode!==o.node||S.focusOffset!==o.offset)&&(w=w.createRange(),w.setStart(l.node,l.offset),S.removeAllRanges(),T>i?(S.addRange(w),S.extend(o.node,o.offset)):(w.setEnd(o.node,o.offset),S.addRange(w)))))),w=[],S=g;S=S.parentNode;)S.nodeType===1&&w.push({element:S,left:S.scrollLeft,top:S.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;gae()-dl?Sn(e,0):cl|=n),Ne(e,t)}function Ip(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(et===0&&(et=mn),t=en(62914560&~et),t===0&&(t=4194304)):t=fn()===99?1:2:t=1),n=xe(),e=zs(e,t),e!==null&&(ns(e,t,n),Ne(e,n))}var af;af=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||me.current)_e=!0;else if(n&r)_e=!!(e.flags&16384);else{switch(_e=!1,t.tag){case 3:Lc(t),Ki();break;case 5:hc(t);break;case 1:ye(t.type)&&gs(t);break;case 4:Bi(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var s=t.type._context;H(vs,s._currentValue),s._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Rc(e,t,n):(H(V,V.current&1),t=Xe(e,t,n),t!==null?t.sibling:null);H(V,V.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Mc(e,t,n);t.flags|=64}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),H(V,V.current),r)break;return null;case 23:case 24:return t.lanes=0,Xi(e,t,n)}return Xe(e,t,n)}else _e=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,s=cn(t,le.current),hn(t,n),s=qi(null,t,r,e,s,n),t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,ye(r)){var o=!0;gs(t)}else o=!1;t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ui(t);var i=r.getDerivedStateFromProps;typeof i=="function"&&xs(t,r,i,e),s.updater=Cs,t.stateNode=s,s._reactInternals=t,zi(t,r,e,n),t=el(null,t,r,!0,o,n)}else t.tag=0,we(null,t,s,n),t=t.child;return t;case 16:s=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=s._init,s=o(s._payload),t.type=s,o=t.tag=Up(s),e=Re(s,e),o){case 0:t=Zi(null,t,s,e,n);break e;case 1:t=Ac(null,t,s,e,n);break e;case 11:t=Tc(null,t,s,e,n);break e;case 14:t=Nc(null,t,s,Re(s.type,e),r,n);break e}throw Error(E(306,s,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Re(r,s),Zi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Re(r,s),Ac(e,t,r,s,n);case 3:if(Lc(t),r=t.updateQueue,e===null||r===null)throw Error(E(282));if(r=t.pendingProps,s=t.memoizedState,s=s!==null?s.element:null,sc(e,t),ar(t,r,null,n),r=t.memoizedState.element,r===s)Ki(),t=Xe(e,t,n);else{if(s=t.stateNode,(o=s.hydrate)&&(yt=on(t.stateNode.containerInfo.firstChild),Ye=t,o=Ue=!0),o){if(e=s.mutableSourceEagerHydrationData,e!=null)for(s=0;s"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ff)}catch(e){console.error(e)}}ff(),Sa.exports=$e;var Tl=Sa.exports;const bp=J(Tl),oy="",fe=rt.createContext({posts:[],authors:[],tags:[],action:"",lastPage:"",page:"",pageData:{},dispatch:(e,t)=>{},searchIndex:null,indexComplete:!1,searchValue:"",t:()=>{},dir:"ltr"});class qp extends R.Component{constructor(){super(...arguments);vo(this,"handleLoad",()=>{this.setupFrameBaseStyle()})}componentDidMount(){this.node.addEventListener("load",this.handleLoad)}componentWillUnmout(){this.node.removeEventListener("load",this.handleLoad)}setupFrameBaseStyle(){this.node.contentDocument&&(this.iframeHtml=this.node.contentDocument.documentElement,this.iframeHtml.setAttribute("dir",this.props.searchdir),this.iframeHead=this.node.contentDocument.head,this.iframeRoot=this.node.contentDocument.body,this.forceUpdate())}render(){const{children:n,head:r,title:s="",style:o={},...i}=this.props;return $.jsxs("iframe",{srcDoc:"",...i,ref:l=>this.node=l,title:s,style:o,frameBorder:"0",children:[this.iframeHead&&Tl.createPortal(r,this.iframeHead),this.iframeRoot&&Tl.createPortal(n,this.iframeRoot)]})}}const Jp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:16,width:16,...e},R.createElement("path",{d:"M23.38,21.62l-6.53-6.53a9.15,9.15,0,0,0,1.9-5.59,9.27,9.27,0,1,0-3.66,7.36l6.53,6.53a1.26,1.26,0,0,0,1.76,0A1.25,1.25,0,0,0,23.38,21.62ZM2.75,9.5A6.75,6.75,0,1,1,9.5,16.25,6.76,6.76,0,0,1,2.75,9.5Z",fill:"currentColor"})),Qp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:16,width:16,...e},R.createElement("path",{strokeLinecap:"round",strokeWidth:.4,fill:"currentColor",stroke:"#000000",strokeLinejoin:"round",d:"M.44,21.44a1.49,1.49,0,0,0,0,2.12,1.5,1.5,0,0,0,2.12,0l9.26-9.26a.25.25,0,0,1,.36,0l9.26,9.26a1.5,1.5,0,0,0,2.12,0,1.49,1.49,0,0,0,0-2.12L14.3,12.18a.25.25,0,0,1,0-.36l9.26-9.26A1.5,1.5,0,0,0,21.44.44L12.18,9.7a.25.25,0,0,1-.36,0L2.56.44A1.5,1.5,0,0,0,.44,2.56L9.7,11.82a.25.25,0,0,1,0,.36Z"})),Gp=e=>R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:16,width:16,viewBox:"0 0 16 16",...e},R.createElement("title",null,"circle anim"),R.createElement("g",{fill:"#40413F",className:"nc-icon-wrapper"},R.createElement("g",{className:"nc-loop-circle-16-icon-f"},R.createElement("path",{d:"M8 16a8 8 0 1 1 8-8 8.009 8.009 0 0 1-8 8zM8 2a6 6 0 1 0 6 6 6.006 6.006 0 0 0-6-6z",fill:"#D4D4D4"}),R.createElement("path",{d:"M8 0v2a6.006 6.006 0 0 1 6 6h2a8.009 8.009 0 0 0-8-8z","data-color":"color-2"})),R.createElement("style",null,".nc-loop-circle-16-icon-f{--animation-duration:0.5s;transform-origin:8px 8px;animation:nc-loop-circle-anim var(--animation-duration) infinite linear}@keyframes nc-loop-circle-anim{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}"))),df=10,Yp=10,Xp=()=>({modalContainer:{zIndex:"3999999",position:"fixed",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden"},frame:{common:{margin:"auto",position:"relative",padding:"0",outline:"0",width:"100%",opacity:"1",overflow:"hidden",height:"100%"}},page:{links:{width:"600px"}}});class hf extends rt.Component{componentDidMount(){this.sendContainerHeightChangeEvent()}sendContainerHeightChangeEvent(){}componentDidUpdate(){this.sendContainerHeightChangeEvent()}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.dispatch("update",{showPopup:!1})}render(){return $.jsx(mg,{})}}vo(hf,"contextType",fe);function Zp(){const{searchValue:e,dispatch:t,inputRef:n,t:r}=R.useContext(fe),s=R.useRef(null);R.useEffect(()=>{setTimeout(()=>{var a;(a=n==null?void 0:n.current)==null||a.focus()},150);let i=a=>{a.key==="Escape"&&t("update",{showPopup:!1})};const l=s==null?void 0:s.current;return l==null||l.ownerDocument.removeEventListener("keyup",i),l==null||l.ownerDocument.addEventListener("keyup",i),()=>{l==null||l.ownerDocument.removeEventListener("keyup",i)}},[t,n]);let o="z-10 relative flex items-center py-5 px-4 sm:px-7 bg-white rounded-t-lg shadow";return e||(o="z-10 relative flex items-center py-5 px-4 sm:px-7 bg-white rounded-lg"),$.jsxs("div",{className:o,ref:s,children:[$.jsx("div",{className:"flex items-center justify-center w-4 h-4 me-3",children:$.jsx(eg,{})}),$.jsx("input",{ref:n,value:e||"",onChange:i=>{t("update",{searchValue:i.target.value})},onKeyDown:i=>{(i.key==="ArrowUp"||i.key==="ArrowDown")&&i.preventDefault()},className:"grow -my-5 py-5 -ms-3 ps-3 text-[1.65rem] focus-visible:outline-none placeholder:text-gray-400 outline-none truncate",placeholder:r("Search posts, tags and authors")}),$.jsx(tg,{}),$.jsx(ng,{})]})}function eg(){const{searchValue:e="",dispatch:t}=R.useContext(fe);return e?$.jsx("button",{alt:"Clear",className:"-mb-[1px]",onClick:()=>{t("update",{searchValue:""})},children:$.jsx(Qp,{className:"text-neutral-900 hover:text-neutral-500 h-[1.1rem] w-[1.1rem]"})}):$.jsx(Jp,{className:"text-neutral-900",alt:"Search"})}function tg(){const{indexComplete:e,searchValue:t}=R.useContext(fe);return!e&&t?$.jsx(Gp,{className:"shrink-0"}):null}function ng(){const{dispatch:e,t}=R.useContext(fe);return $.jsx("button",{className:"ms-3 text-sm text-neutral-500 sm:hidden",alt:"Cancel",onClick:()=>{e("update",{showPopup:!1})},children:t("Cancel")})}function rg({tag:e,selectedResult:t,setSelectedResult:n}){const{name:r,url:s,id:o}=e;let i="flex items-center py-3 -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer";return o===t&&(i+=" bg-neutral-100"),$.jsxs("div",{className:i,onClick:()=>{s&&(window.location.href=s)},onMouseEnter:()=>{n(o)},children:[$.jsx("p",{className:"me-2 text-sm font-bold text-neutral-400",children:"#"}),$.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-900 truncate",children:r})]})}function sg({tags:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe);if(!(e!=null&&e.length))return null;const s=e.map(o=>$.jsx(rg,{tag:o,selectedResult:t,setSelectedResult:n},o.name));return $.jsxs("div",{className:"border-t border-gray-200 py-3 px-4 sm:px-7",children:[$.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Tags")}),s]})}function og({post:e,selectedResult:t,setSelectedResult:n}){const{searchValue:r}=R.useContext(fe),{title:s,excerpt:o,url:i,id:l}=e;let a="py-3 -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer";return l===t&&(a+=" bg-neutral-100"),$.jsxs("div",{className:a,onClick:()=>{i&&(window.location.href=i)},onMouseEnter:()=>{n(l)},children:[$.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-800",children:$.jsx(gf,{text:s,highlight:r,isExcerpt:!1})}),$.jsx("p",{className:"text-neutral-400 leading-normal text-sm mt-0 mb-0 truncate",children:$.jsx(gf,{text:o,highlight:r,isExcerpt:!0})})]})}function ig({text:e,highlight:t}){let n="";t==null||t.split(" ").forEach((i,l)=>{const a=String(i).replace(/\W/g,"\\&");l>0?n+="|^"+a+"|\\s"+a:n="^"+a+"|\\s"+a});const r=new RegExp(`${n}`,"ig");let s=e==null?void 0:e.matchAll(r);const o=[];for(const i of s)o.push({startIdx:i==null?void 0:i.index,endIdx:((i==null?void 0:i.index)||0)+((i==null?void 0:i[0].length)||0)});return o}function pf({text:e,highlight:t}){const n=ig({text:e,highlight:t}),r=[];let s=0;return n.forEach(o=>{s===o.startIdx?(r.push({text:e==null?void 0:e.slice(o.startIdx,o.endIdx),type:"highlight"}),s=o.endIdx):(r.push({text:e==null?void 0:e.slice(s,o.startIdx),type:"normal"}),r.push({text:e==null?void 0:e.slice(o.startIdx,o.endIdx),type:"highlight"}),s=o.endIdx)}),s<(e==null?void 0:e.length)&&r.push({text:e==null?void 0:e.slice(s,e.length),type:"normal"}),{parts:r,highlightIndexes:n}}function gf({text:e="",highlight:t="",isExcerpt:n}){var i;e=e||"",t=t||"";let{parts:r,highlightIndexes:s}=pf({text:e,highlight:t});if(n&&(s!=null&&s[0])){const l=(i=s==null?void 0:s[0])==null?void 0:i.startIdx;if(l>50){e="..."+(e==null?void 0:e.slice(l-20));const{parts:a}=pf({text:e,highlight:t});r=a}}const o=r.map((l,a)=>(l==null?void 0:l.type)==="highlight"?$.jsx(rt.Fragment,{children:$.jsx(lg,{word:l.text,isExcerpt:n})},a):$.jsx(rt.Fragment,{children:l.text},a));return $.jsx($.Fragment,{children:o})}function lg({word:e,isExcerpt:t}){return t?$.jsx($.Fragment,{children:$.jsx("span",{className:"font-bold",children:e})}):$.jsx($.Fragment,{children:$.jsx("span",{className:"font-bold text-neutral-900",children:e})})}function ag({posts:e,maxPosts:t,setMaxPosts:n}){const{t:r}=R.useContext(fe);return!(e!=null&&e.length)||t>=(e==null?void 0:e.length)?null:$.jsx("button",{className:"w-full my-3 p-[1rem] border border-neutral-200 hover:border-neutral-300 text-neutral-800 hover:text-black font-semibold rounded transition duration-150 ease hover:ease",onClick:()=>{const s=t+Yp;n(s)},children:r("Show more results")})}function ug({posts:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe),[s,o]=R.useState(df);if(R.useEffect(()=>{o(df)},[e]),!(e!=null&&e.length))return null;const l=(e==null?void 0:e.slice(0,s)).map(a=>$.jsx(og,{post:a,selectedResult:t,setSelectedResult:n},a.title));return $.jsxs("div",{className:"border-t border-neutral-200 py-3 px-4 sm:px-7",children:[$.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Posts")}),l,$.jsx(ag,{setMaxPosts:o,maxPosts:s,posts:e})]})}function cg({author:e,selectedResult:t,setSelectedResult:n}){const{name:r,profile_image:s,url:o,id:i}=e;let l="py-[1rem] -mx-4 sm:-mx-7 px-4 sm:px-7 cursor-pointer flex items-center";return i===t&&(l+=" bg-neutral-100"),$.jsxs("div",{className:l,onClick:()=>{o&&(window.location.href=o)},onMouseEnter:()=>{n(i)},children:[$.jsx(fg,{name:r,avatar:s}),$.jsx("h2",{className:"text-[1.65rem] font-medium leading-tight text-neutral-900 truncate",children:r})]})}function fg({name:e,avatar:t}){const n=t==null?void 0:t.length,r=e.charAt(0);return n?$.jsx("img",{className:"rounded-full bg-neutral-300 w-7 h-7 me-2 object-cover",src:t,alt:e}):$.jsx("div",{className:"rounded-full bg-neutral-200 w-7 h-7 me-2 flex items-center justify-center font-bold",children:$.jsx("span",{className:"text-neutral-400",children:r})})}function dg({authors:e,selectedResult:t,setSelectedResult:n}){const{t:r}=R.useContext(fe);if(!(e!=null&&e.length))return null;const s=e.map(o=>$.jsx(cg,{author:o,selectedResult:t,setSelectedResult:n},o.name));return $.jsxs("div",{className:"border-t border-neutral-200 py-3 px-4 sm:px-7",children:[$.jsx("h1",{className:"uppercase text-xs text-neutral-400 font-semibold mb-1 tracking-wide",children:r("Authors")}),s]})}function hg(){const{searchValue:e="",searchIndex:t,indexComplete:n}=R.useContext(fe);let r=null,s=[],o=[],i=[];return n&&e&&(r=t==null?void 0:t.search(e),o=(r==null?void 0:r.posts)||[],i=(r==null?void 0:r.authors)||[],s=(r==null?void 0:r.tags)||[]),i=i.filter(a=>{const u=/\/404\/$/;return!(a!=null&&a.url&&u.test(a==null?void 0:a.url))}),s=s.filter(a=>{const u=/\/404\/$/;return!(a!=null&&a.url&&u.test(a==null?void 0:a.url))}),(o==null?void 0:o.length)||(i==null?void 0:i.length)||(s==null?void 0:s.length)?$.jsx(pg,{posts:o,authors:i,tags:s}):e?$.jsx(gg,{}):null}function pg({posts:e,authors:t,tags:n}){var u;const{searchValue:r}=R.useContext(fe),s=R.useMemo(()=>[...t,...n,...e],[t,n,e]),o=((u=s==null?void 0:s[0])==null?void 0:u.id)||null,[i,l]=R.useState(o),a=R.useRef(null);return R.useEffect(()=>{var f;l(((f=s==null?void 0:s[0])==null?void 0:f.id)||null)},[s]),R.useEffect(()=>{let f=c=>{const v=s.findIndex(h=>h.id===i);let m=s[v+1],y=s[v-1];if(c.key==="ArrowUp"&&y?l(y==null?void 0:y.id):c.key==="ArrowDown"&&m&&l(m==null?void 0:m.id),c.key==="Enter"){const h=s.find(d=>d.id===i);window.location.href=h==null?void 0:h.url}};const p=a==null?void 0:a.current;return p==null||p.ownerDocument.removeEventListener("keyup",f),p==null||p.ownerDocument.addEventListener("keyup",f),()=>{var c;(c=p==null?void 0:p.ownerDocument)==null||c.removeEventListener("keyup",f)}},[s,i]),r?$.jsxs("div",{className:"overflow-y-auto max-h-[calc(100vh-172px)] sm:max-h-[70vh] -mt-[1px]",ref:a,children:[$.jsx(dg,{authors:t,selectedResult:i,setSelectedResult:l}),$.jsx(sg,{tags:n,selectedResult:i,setSelectedResult:l}),$.jsx(ug,{posts:e,selectedResult:i,setSelectedResult:l})]}):null}function gg(){const{t:e}=R.useContext(fe);return $.jsx("div",{className:"py-4 px-7",children:$.jsx("p",{className:"text-[1.65rem] text-neutral-400 leading-normal",children:e("No matches found")})})}function mg(){const{dispatch:e}=R.useContext(fe);return $.jsx($.Fragment,{children:$.jsx("div",{className:"h-screen w-screen pt-20 antialiased z-50 relative ghost-display",onClick:t=>{t.preventDefault(),t.target===t.currentTarget&&e("update",{showPopup:!1})},children:$.jsxs("div",{className:"bg-white w-full max-w-[95vw] sm:max-w-lg rounded-lg shadow-xl m-auto relative translate-z-0 animate-popup",children:[$.jsx(Zp,{}),$.jsx(hg,{})]})})})}class mf extends rt.Component{constructor(t){super(t),this.state={height:null}}onHeightChange(t){this.setState({height:t})}handlePopupClose(t){t.preventDefault(),t.target===t.currentTarget&&this.context.dispatch("update",{showPopup:!1})}renderFrameStyles(){const t=` :root { --brandcolor: ${this.context.brandColor||""} } .ghost-display { display: none; } `,n=this.context.stylesUrl;return n?$.jsxs($.Fragment,{children:[$.jsx("link",{rel:"stylesheet",href:n}),$.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),$.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]}):$.jsxs($.Fragment,{children:[$.jsx("style",{dangerouslySetInnerHTML:{__html:t}}),$.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1, maximum-scale=1"})]})}renderFrameContainer(){const t=Xp(),n={...t.frame.common};return $.jsx("div",{style:t.modalContainer,className:"gh-root-frame",children:$.jsxs(qp,{style:n,title:"portal-popup",head:this.renderFrameStyles(),searchdir:this.context.dir,children:[$.jsx("div",{onClick:r=>this.handlePopupClose(r),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)]"}),$.jsx(hf,{})]})})}render(){const{showPopup:t}=this.context;return t?this.renderFrameContainer():null}}vo(mf,"contextType",fe);var K;function bs(e){return typeof e<"u"?e:!0}function yf(e){const t=Array(e);for(let n=0;n=this.B&&(p||!f[m])){var o=Qs(c,r,v),i="";switch(this.G){case"full":if(2o;l--)if(l-o>=this.B){var a=Qs(c,r,v,s,o);i=m.substring(o,l),Or(this,f,i,a,e,n)}break}case"reverse":if(1=this.B&&Or(this,f,i,Qs(c,r,v,s,l),e,n);i=""}case"forward":if(1=this.B&&Or(this,f,i,o,e,n);break}default:if(this.C&&(o=Math.min(o/this.C(t,m,v)|0,c-1)),Or(this,f,m,o,e,n),p&&1=this.B&&!s[m]){s[m]=1;const y=this.l&&m>o;Or(this,u,y?o:m,Qs(i+(r/2>i?0:1),r,v,l-1,a-1),e,n,y?m:o)}}}}}this.m||(this.register[e]=1)}}return this};function Qs(e,t,n,r,s){return n&&1=this.B&&!n[c])if(this.s||o||this.map[c])a[p++]=c,n[c]=1;else return r;e=a,s=e.length}if(!s)return r;t||(t=100),l=this.depth&&1=r))));c++);if(f){if(o)return Nf(a,r,0);t[t.length]=a;return}}return!n&&a}function Nf(e,t,n){return e=e.length===1?e[0]:[].concat.apply([],e),n||e.length>t?e.slice(n,n+t):e}function Of(e,t,n,r){return n?(r=r&&t>n,e=(e=e[r?t:n])&&e[r?n:t]):e=e[t],e}K.contain=function(e){return!!this.register[e]},K.update=function(e,t){return this.remove(e).add(e,t)},K.remove=function(e,t){const n=this.register[e];if(n){if(this.m)for(let r=0,s;r"u"&&(i=new Promise(u=>{o=u}));let l,a;switch(s||(s=0)){case 0:if(l="reg",this.m){a=B();for(let u in this.register)a[u]=1}else a=this.register;break;case 1:l="cfg",a={doc:0,opt:this.s?1:0};break;case 2:l="map",a=this.map;break;case 3:l="ctx",a=this.h;break;default:typeof n>"u"&&o&&o();return}return Pf(e,t||this,n,l,r,s,a,o),i},K.import=function(e,t){if(t)switch(de(t)&&(t=JSON.parse(t)),e){case"cfg":this.s=!!t.opt;break;case"reg":this.m=!1,this.register=t;break;case"map":this.map=t;break;case"ctx":this.h=t}},Ef(Bt.prototype);function Eg(e){e=e.data;var t=self._index;const n=e.args;var r=e.task;switch(r){case"init":r=e.options||{},e=e.factory,t=r.encode,r.cache=!1,t&&t.indexOf("function")===0&&(r.encode=Function("return "+t)()),e?(Function("return "+e)()(self),self._index=new self.FlexSearch.Index(r),delete self.FlexSearch):self._index=new Bt(r);break;default:e=e.id,t=t[r].apply(t,n),postMessage(r==="search"?{id:e,msg:t}:{id:e})}}let jf=0;function Cn(e){if(!(this instanceof Cn))return new Cn(e);var t;e?Nl(t=e.encode)&&(e.encode=t.toString()):e={},(t=(self||window)._factory)&&(t=t.toString());const n=typeof window>"u"&&self.exports,r=this;this.o=$g(t,n,e.worker),this.h=B(),this.o&&(n?this.o.on("message",function(s){r.h[s.id](s.msg),delete r.h[s.id]}):this.o.onmessage=function(s){s=s.data,r.h[s.id](s.msg),delete r.h[s.id]},this.o.postMessage({task:"init",factory:t,options:e}))}jr("add"),jr("append"),jr("search"),jr("update"),jr("remove");function jr(e){Cn.prototype[e]=Cn.prototype[e+"Async"]=function(){const t=this,n=[].slice.call(arguments);var r=n[n.length-1];let s;return Nl(r)&&(s=r,n.splice(n.length-1,1)),r=new Promise(function(o){setTimeout(function(){t.h[++jf]=o,t.o.postMessage({task:e,id:jf,args:n})})}),s?(r.then(s),this):r}}function $g(e,t,n){let r;try{r=t?new(require("worker_threads")).Worker(__dirname+"/node/node.js"):e?new Worker(URL.createObjectURL(new Blob(["onmessage="+Eg.toString()],{type:"text/javascript"}))):new Worker(de(n)?n:"worker/worker.js",{type:"module"})}catch{}return r}function Ar(e){if(!(this instanceof Ar))return new Ar(e);var t=e.document||e.doc||e,n;this.K=[],this.h=[],this.A=[],this.register=B(),this.key=(n=t.key||t.id)&&Ys(n,this.A)||"id",this.m=bs(e.fastupdate),this.C=(n=t.store)&&n!==!0&&[],this.store=n&&B(),this.I=(n=t.tag)&&Ys(n,this.A),this.l=n&&B(),this.cache=(n=e.cache)&&new Js(n),e.cache=!1,this.o=e.worker,this.async=!1,n=B();let r=t.index||t.field||t;de(r)&&(r=[r]);for(let s=0,o,i;st||n)&&(s=s.slice(n,n+t)),r&&(s=Af.call(this,s)),{tag:e,result:s}}function Af(e){const t=Array(e.length);for(let n=0,r;n"u"&&(i=new Promise(l=>{o=l})),s||(s=0),r||(r=0),rt=>{const n=Dg.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),He=e=>(e=e.toLowerCase(),t=>Xs(t)===e),Zs=e=>t=>typeof t===e,{isArray:En}=Array,Lr=Zs("undefined");function Fg(e){return e!==null&&!Lr(e)&&e.constructor!==null&&!Lr(e.constructor)&&je(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const If=He("ArrayBuffer");function Ig(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&If(e.buffer),t}const Mg=Zs("string"),je=Zs("function"),Mf=Zs("number"),eo=e=>e!==null&&typeof e=="object",Ug=e=>e===!0||e===!1,to=e=>{if(Xs(e)!=="object")return!1;const t=Rl(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},zg=He("Date"),Bg=He("File"),Hg=He("Blob"),Vg=He("FileList"),Kg=e=>eo(e)&&je(e.pipe),Wg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||je(e.append)&&((t=Xs(e))==="formdata"||t==="object"&&je(e.toString)&&e.toString()==="[object FormData]"))},bg=He("URLSearchParams"),qg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),En(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const zf=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Bf=e=>!Lr(e)&&e!==zf;function _l(){const{caseless:e}=Bf(this)&&this||{},t={},n=(r,s)=>{const o=e&&Uf(t,s)||s;to(t[o])&&to(r)?t[o]=_l(t[o],r):to(r)?t[o]=_l({},r):En(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r(Rr(t,(s,o)=>{n&&je(s)?e[o]=Ff(s,n):e[o]=s},{allOwnKeys:r}),e),Qg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Gg=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Yg=(e,t,n,r)=>{let s,o,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&Rl(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Xg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zg=e=>{if(!e)return null;if(En(e))return e;let t=e.length;if(!Mf(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},em=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Rl(Uint8Array)),tm=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},nm=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},rm=He("HTMLFormElement"),sm=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Hf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),om=He("RegExp"),Vf=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Rr(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},im=e=>{Vf(e,(t,n)=>{if(je(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(je(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},lm=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return En(e)?r(e):r(String(e).split(t)),n},am=()=>{},um=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Dl="abcdefghijklmnopqrstuvwxyz",Kf="0123456789",Wf={DIGIT:Kf,ALPHA:Dl,ALPHA_DIGIT:Dl+Dl.toUpperCase()+Kf},cm=(e=16,t=Wf.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function fm(e){return!!(e&&je(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const dm=e=>{const t=new Array(10),n=(r,s)=>{if(eo(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=En(r)?[]:{};return Rr(r,(i,l)=>{const a=n(i,s+1);!Lr(a)&&(o[l]=a)}),t[s]=void 0,o}}return r};return n(e,0)},hm=He("AsyncFunction");var x={isArray:En,isArrayBuffer:If,isBuffer:Fg,isFormData:Wg,isArrayBufferView:Ig,isString:Mg,isNumber:Mf,isBoolean:Ug,isObject:eo,isPlainObject:to,isUndefined:Lr,isDate:zg,isFile:Bg,isBlob:Hg,isRegExp:om,isFunction:je,isStream:Kg,isURLSearchParams:bg,isTypedArray:em,isFileList:Vg,forEach:Rr,merge:_l,extend:Jg,trim:qg,stripBOM:Qg,inherits:Gg,toFlatObject:Yg,kindOf:Xs,kindOfTest:He,endsWith:Xg,toArray:Zg,forEachEntry:tm,matchAll:nm,isHTMLForm:rm,hasOwnProperty:Hf,hasOwnProp:Hf,reduceDescriptors:Vf,freezeMethods:im,toObjectSet:lm,toCamelCase:sm,noop:am,toFiniteNumber:um,findKey:Uf,global:zf,isContextDefined:Bf,ALPHABET:Wf,generateString:cm,isSpecCompliantForm:fm,toJSONObject:dm,isAsyncFn:hm,isThenable:e=>e&&(eo(e)||je(e))&&je(e.then)&&je(e.catch)};function D(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}x.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const bf=D.prototype,qf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{qf[e]={value:e}}),Object.defineProperties(D,qf),Object.defineProperty(bf,"isAxiosError",{value:!0}),D.from=(e,t,n,r,s,o)=>{const i=Object.create(bf);return x.toFlatObject(e,i,function(a){return a!==Error.prototype},l=>l!=="isAxiosError"),D.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};var pm=null;function Fl(e){return x.isPlainObject(e)||x.isArray(e)}function Jf(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function Qf(e,t,n){return e?e.concat(t).map(function(s,o){return s=Jf(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function gm(e){return x.isArray(e)&&!e.some(Fl)}const mm=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function no(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!x.isUndefined(h[y])});const r=n.metaTokens,s=n.visitor||f,o=n.dots,i=n.indexes,a=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(s))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(x.isDate(m))return m.toISOString();if(!a&&x.isBlob(m))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(m)||x.isTypedArray(m)?a&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function f(m,y,h){let d=m;if(m&&!h&&typeof m=="object"){if(x.endsWith(y,"{}"))y=r?y:y.slice(0,-2),m=JSON.stringify(m);else if(x.isArray(m)&&gm(m)||(x.isFileList(m)||x.endsWith(y,"[]"))&&(d=x.toArray(m)))return y=Jf(y),d.forEach(function(w,S){!(x.isUndefined(w)||w===null)&&t.append(i===!0?Qf([y],S,o):i===null?y:y+"[]",u(w))}),!1}return Fl(m)?!0:(t.append(Qf(h,y,o),u(m)),!1)}const p=[],c=Object.assign(mm,{defaultVisitor:f,convertValue:u,isVisitable:Fl});function v(m,y){if(!x.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));p.push(m),x.forEach(m,function(d,g){(!(x.isUndefined(d)||d===null)&&s.call(t,d,x.isString(g)?g.trim():g,y,c))===!0&&v(d,y?y.concat(g):[g])}),p.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Gf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Il(e,t){this._pairs=[],e&&no(e,this,t)}const Yf=Il.prototype;Yf.append=function(t,n){this._pairs.push([t,n])},Yf.toString=function(t){const n=t?function(r){return t.call(this,r,Gf)}:Gf;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function ym(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Xf(e,t,n){if(!t)return e;const r=n&&n.encode||ym,s=n&&n.serialize;let o;if(s?o=s(t,n):o=x.isURLSearchParams(t)?t.toString():new Il(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class vm{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}}var Zf=vm,ed={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wm=typeof URLSearchParams<"u"?URLSearchParams:Il,Sm=typeof FormData<"u"?FormData:null,xm=typeof Blob<"u"?Blob:null,Cm={isBrowser:!0,classes:{URLSearchParams:wm,FormData:Sm,Blob:xm},protocols:["http","https","file","blob","url","data"]};const td=typeof window<"u"&&typeof document<"u",Em=(e=>td&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),$m=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")();var km=Object.freeze({__proto__:null,hasBrowserEnv:td,hasStandardBrowserWebWorkerEnv:$m,hasStandardBrowserEnv:Em}),Ve={...km,...Cm};function Pm(e,t){return no(e,new Ve.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return Ve.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Tm(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Nm(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&x.isArray(s)?s.length:i,a?(x.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!l):((!s[i]||!x.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&x.isArray(s[i])&&(s[i]=Nm(s[i])),!l)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,s)=>{t(Tm(r),s,n,0)}),n}return null}function Om(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ml={transitional:ed,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return s?JSON.stringify(nd(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Pm(t,this.formSerializer).toString();if((l=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return no(l?{"files[]":t}:t,a&&new a,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Om(t)):t}],transformResponse:[function(t){const n=this.transitional||Ml.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&x.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?D.from(l,D.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ve.classes.FormData,Blob:Ve.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Ml.headers[e]={}});var Ul=Ml;const jm=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Am=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&jm[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};const rd=Symbol("internals");function _r(e){return e&&String(e).trim().toLowerCase()}function ro(e){return e===!1||e==null?e:x.isArray(e)?e.map(ro):String(e)}function Lm(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Rm=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zl(e,t,n,r,s){if(x.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function _m(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Dm(e,t){const n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class so{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(l,a,u){const f=_r(a);if(!f)throw new Error("header name must be a non-empty string");const p=x.findKey(s,f);(!p||s[p]===void 0||u===!0||u===void 0&&s[p]!==!1)&&(s[p||a]=ro(l))}const i=(l,a)=>x.forEach(l,(u,f)=>o(u,f,a));return x.isPlainObject(t)||t instanceof this.constructor?i(t,n):x.isString(t)&&(t=t.trim())&&!Rm(t)?i(Am(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=_r(t),t){const r=x.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Lm(s);if(x.isFunction(n))return n.call(this,s,r);if(x.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_r(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||zl(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=_r(i),i){const l=x.findKey(r,i);l&&(!n||zl(r,r[l],l,n))&&(delete r[l],s=!0)}}return x.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||zl(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return x.forEach(this,(s,o)=>{const i=x.findKey(r,o);if(i){n[i]=ro(s),delete n[o];return}const l=t?_m(o):String(o).trim();l!==o&&delete n[o],n[l]=ro(s),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return x.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[rd]=this[rd]={accessors:{}}).accessors,s=this.prototype;function o(i){const l=_r(i);r[l]||(Dm(s,i),r[l]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}}so.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(so.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),x.freezeMethods(so);var tt=so;function Bl(e,t){const n=this||Ul,r=t||n,s=tt.from(r.headers);let o=r.data;return x.forEach(e,function(l){o=l.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function sd(e){return!!(e&&e.__CANCEL__)}function Dr(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(Dr,D,{__CANCEL__:!0});function Fm(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var Im=Ve.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),x.isString(r)&&i.push("path="+r),x.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Mm(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Um(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function od(e,t){return e&&!Mm(t)?Um(e,t):t}var zm=Ve.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const l=x.isString(i)?s(i):i;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function Bm(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Hm(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(a){const u=Date.now(),f=r[o];i||(i=u),n[s]=a,r[s]=u;let p=o,c=0;for(;p!==s;)c+=n[p++],p=p%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i{const o=s.loaded,i=s.lengthComputable?s.total:void 0,l=o-n,a=r(l),u=o<=i;n=o;const f={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:a||void 0,estimated:a&&i&&u?(i-o)/a:void 0,event:s};f[t?"download":"upload"]=!0,e(f)}}var Vm=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let s=e.data;const o=tt.from(e.headers).normalize();let{responseType:i,withXSRFToken:l}=e,a;function u(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}let f;if(x.isFormData(s)){if(Ve.hasStandardBrowserEnv||Ve.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[y,...h]=f?f.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([y||"multipart/form-data",...h].join("; "))}}let p=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(y+":"+h))}const c=od(e.baseURL,e.url);p.open(e.method.toUpperCase(),Xf(c,e.params,e.paramsSerializer),!0),p.timeout=e.timeout;function v(){if(!p)return;const y=tt.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),d={data:!i||i==="text"||i==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:y,config:e,request:p};Fm(function(w){n(w),u()},function(w){r(w),u()},d),p=null}if("onloadend"in p?p.onloadend=v:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(v)},p.onabort=function(){p&&(r(new D("Request aborted",D.ECONNABORTED,e,p)),p=null)},p.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,p)),p=null},p.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const d=e.transitional||ed;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new D(h,d.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,p)),p=null},Ve.hasStandardBrowserEnv&&(l&&x.isFunction(l)&&(l=l(e)),l||l!==!1&&zm(c))){const y=e.xsrfHeaderName&&e.xsrfCookieName&&Im.read(e.xsrfCookieName);y&&o.set(e.xsrfHeaderName,y)}s===void 0&&o.setContentType(null),"setRequestHeader"in p&&x.forEach(o.toJSON(),function(h,d){p.setRequestHeader(d,h)}),x.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),i&&i!=="json"&&(p.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&p.addEventListener("progress",id(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",id(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=y=>{p&&(r(!y||y.type?new Dr(null,e,p):y),p.abort(),p=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const m=Bm(c);if(m&&Ve.protocols.indexOf(m)===-1){r(new D("Unsupported protocol "+m+":",D.ERR_BAD_REQUEST,e));return}p.send(s||null)})};const Hl={http:pm,xhr:Vm};x.forEach(Hl,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ld=e=>`- ${e}`,Km=e=>x.isFunction(e)||e===null||e===!1;var ad={getAdapter:e=>{e=x.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o`adapter ${l} `+(a===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(ld).join(` `):" "+ld(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Hl};function Vl(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Dr(null,e)}function ud(e){return Vl(e),e.headers=tt.from(e.headers),e.data=Bl.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ad.getAdapter(e.adapter||Ul.adapter)(e).then(function(r){return Vl(e),r.data=Bl.call(e,e.transformResponse,r),r.headers=tt.from(r.headers),r},function(r){return sd(r)||(Vl(e),r&&r.response&&(r.response.data=Bl.call(e,e.transformResponse,r.response),r.response.headers=tt.from(r.response.headers))),Promise.reject(r)})}const cd=e=>e instanceof tt?{...e}:e;function $n(e,t){t=t||{};const n={};function r(u,f,p){return x.isPlainObject(u)&&x.isPlainObject(f)?x.merge.call({caseless:p},u,f):x.isPlainObject(f)?x.merge({},f):x.isArray(f)?f.slice():f}function s(u,f,p){if(x.isUndefined(f)){if(!x.isUndefined(u))return r(void 0,u,p)}else return r(u,f,p)}function o(u,f){if(!x.isUndefined(f))return r(void 0,f)}function i(u,f){if(x.isUndefined(f)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function l(u,f,p){if(p in t)return r(u,f);if(p in e)return r(void 0,u)}const a={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,f)=>s(cd(u),cd(f),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(f){const p=a[f]||s,c=p(e[f],t[f],f);x.isUndefined(c)&&p!==l||(n[f]=c)}),n}const fd="1.6.8",Kl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Kl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const dd={};Kl.transitional=function(t,n,r){function s(o,i){return"[Axios v"+fd+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,l)=>{if(t===!1)throw new D(s(i," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!dd[i]&&(dd[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};function Wm(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const l=e[o],a=l===void 0||i(l,o,e);if(a!==!0)throw new D("option "+o+" must be "+a,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}var Wl={assertOptions:Wm,validators:Kl};const kt=Wl.validators;class oo{constructor(t){this.defaults=t,this.interceptors={request:new Zf,response:new Zf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$n(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Wl.assertOptions(r,{silentJSONParsing:kt.transitional(kt.boolean),forcedJSONParsing:kt.transitional(kt.boolean),clarifyTimeoutError:kt.transitional(kt.boolean)},!1),s!=null&&(x.isFunction(s)?n.paramsSerializer={serialize:s}:Wl.assertOptions(s,{encode:kt.function,serialize:kt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=tt.concat(i,o);const l=[];let a=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(a=a&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const u=[];this.interceptors.response.forEach(function(y){u.push(y.fulfilled,y.rejected)});let f,p=0,c;if(!a){const m=[ud.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,u),c=m.length,f=Promise.resolve(n);p{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,l){r.reason||(r.reason=new Dr(o,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new bl(function(s){t=s}),cancel:t}}}var bm=bl;function qm(e){return function(n){return e.apply(null,n)}}function Jm(e){return x.isObject(e)&&e.isAxiosError===!0}const ql={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ql).forEach(([e,t])=>{ql[t]=e});var Qm=ql;function hd(e){const t=new io(e),n=Ff(io.prototype.request,t);return x.extend(n,io.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return hd($n(e,s))},n}const Q=hd(Ul);Q.Axios=io,Q.CanceledError=Dr,Q.CancelToken=bm,Q.isCancel=sd,Q.VERSION=fd,Q.toFormData=no,Q.AxiosError=D,Q.Cancel=Q.CanceledError,Q.all=function(t){return Promise.all(t)},Q.spread=qm,Q.isAxiosError=Jm,Q.mergeConfig=$n,Q.AxiosHeaders=tt,Q.formToJSON=e=>nd(x.isHTMLForm(e)?new FormData(e):e),Q.getAdapter=ad.getAdapter,Q.HttpStatusCode=Qm,Q.default=Q;var Gm=Q,Ym="@tryghost/content-api",Xm="1.11.21",Zm="https://github.com/TryGhost/SDK/tree/main/packages/content-api",e0="Ghost Foundation",t0="MIT",n0="cjs/content-api.js",r0="umd/content-api.min.js",s0="es/content-api.js",o0="lib/content-api.js",i0=["LICENSE","README.md","cjs/","lib/","umd/","es/"],l0={dev:'echo "Implement me!"',pretest:"yarn build",test:"NODE_ENV=testing c8 --all --reporter text --reporter cobertura mocha './test/**/*.test.js'",build:"rollup -c",lint:"eslint . --ext .js --cache",prepare:"NODE_ENV=production yarn build",posttest:"yarn lint"},a0={access:"public"},u0={"@babel/core":"7.24.4","@babel/polyfill":"7.12.1","@babel/preset-env":"7.24.4","@rollup/plugin-json":"6.1.0",c8:"9.1.0","core-js":"3.37.0","eslint-plugin-ghost":"3.4.0",mocha:"10.4.0",rollup:"2.79.1","rollup-plugin-babel":"4.4.0","rollup-plugin-commonjs":"10.1.0","rollup-plugin-node-resolve":"5.2.0","rollup-plugin-polyfill-node":"0.12.0","rollup-plugin-replace":"2.2.0","rollup-plugin-terser":"7.0.2",should:"13.2.3",sinon:"17.0.1"},c0={axios:"^1.0.0"},f0="048ccde4bd78d2dcd60e778d03eb8dc3227cece5",d0={name:Ym,version:Xm,repository:Zm,author:e0,license:t0,main:n0,"umd:main":"umd/content-api.min.js",unpkg:r0,module:s0,source:o0,files:i0,scripts:l0,publishConfig:a0,devDependencies:u0,dependencies:c0,gitHead:f0};const h0=!1,p0=d0.version,pd="v5.0",gd=["v2","v3","v4","v5","canary"],Ae="@tryghost/content-api",g0=e=>{let t;return e==="v5"||e===void 0||e.match(/^v5\.\d+/)?t="/content/":e.match(/^v\d+\.\d+/)?t=`/${/^(v\d+)\.\d+/.exec(e)[1]}/content/`:t=`/${e}/content/`,t},m0=e=>{let{url:t,method:n,params:r,headers:s}=e;return Gm[n](t,{params:r,paramsSerializer:o=>Object.keys(o).reduce((i,l)=>{const a=encodeURIComponent([].concat(o[l]).join(","));return i.concat(`${l}=${a}`)},[]).join("&"),headers:s})};function Jl(e){let{url:t,key:n,host:r,version:s,userAgent:o,ghostPath:i="ghost",makeRequest:l=m0}=e;if(r&&(console.warn(`${Ae}: The 'host' parameter is deprecated, please use 'url' instead`),t||(t=r)),this instanceof Jl)return Jl({url:t,key:n,version:s,userAgent:o,ghostPath:i,makeRequest:l});if(s===void 0)throw new Error(`${Ae} Config Missing: 'version' is required. E.g. ${gd.join(",")}`);let a;if(typeof s=="boolean")s===!0&&(a=pd),s=void 0;else{if(s&&!gd.includes(s)&&!s.match(/^v\d+\.\d+/))throw new Error(`${Ae} Config Invalid: 'version' ${s} is not supported`);s==="canary"?(console.warn(`${Ae}: The 'version' parameter has a deprecated format 'canary', please use 'v{major}.{minor}' format instead`),a=pd):s.match(/^v\d+$/)?(console.warn(`${Ae}: The 'version' parameter has a deprecated format 'v{major}', please use 'v{major}.{minor}' format instead`),a=`${s}.0`):a=s}if(!t)throw new Error(`${Ae} Config Missing: 'url' is required. E.g. 'https://site.com'`);if(!/https?:\/\//.test(t))throw new Error(`${Ae} Config Invalid: 'url' ${t} requires a protocol. E.g. 'https://site.com'`);if(t.endsWith("/"))throw new Error(`${Ae} Config Invalid: 'url' ${t} must not have a trailing slash. E.g. 'https://site.com'`);if(i.endsWith("/")||i.startsWith("/"))throw new Error(`${Ae} Config Invalid: 'ghostPath' ${i} must not have a leading or trailing slash. E.g. 'ghost'`);if(n&&!/[0-9a-f]{26}/.test(n))throw new Error(`${Ae} Config Invalid: 'key' ${n} must have 26 hex characters`);o===void 0&&(o=h0);const u=["posts","authors","tags","pages","settings","tiers","newsletters","offers"].reduce((p,c)=>{function v(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=arguments.length>1?arguments[1]:void 0;return f(c,y,null,h)}function m(y){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},d=arguments.length>2?arguments[2]:void 0;if(!y||!y.id&&!y.slug)return Promise.reject(new Error(`${Ae} read requires an id or slug.`));const g=Object.assign({},y,h);return f(c,g,y.id||`slug/${y.slug}`,d)}return Object.assign(p,{[c]:{read:m,browse:v}})},{});return delete u.settings.read,delete u.tiers.read,delete u.newsletters.read,delete u.offers.browse,u;function f(p,c,v){let m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(!m&&!n)return Promise.reject(new Error(`${Ae} Config Missing: 'key' is required.`));delete c.id;const y=m?{Authorization:`GhostMembers ${m}`}:{};o&&(typeof o=="boolean"?y["User-Agent"]=`GhostContentSDK/${p0}`:y["User-Agent"]=o),a&&(y["Accept-Version"]=a),c=Object.assign({key:n},c);const h=`${t}/${i}/api${g0(s)}${p}/${v?v+"/":""}`;return l({url:h,method:"get",params:c,headers:y}).then(d=>Array.isArray(d.data[p])?d.data[p].length===1&&!d.data.meta?d.data[p][0]:Object.assign(d.data[p],{meta:d.data.meta}):d.data[p]).catch(d=>{if(d.response&&d.response.data&&d.response.data.errors){const g=d.response.data.errors[0],w=new Error(g.message),S=Object.keys(g);throw w.name=g.type,S.forEach(T=>{w[T]=g[T]}),w.response=d.response,w.request=d.request,w.config=d.config,w}else throw d})}}class y0{constructor({adminUrl:t,apiKey:n,dir:r}){An(this,go);An(this,mo);An(this,yo);An(this,Tn);An(this,Nn);this.api=new Jl({url:t,key:n,version:"v5.0"});const s=r==="rtl",o=r==="rtl"?"reverse":"forward";this.postsIndex=new Ll.Document({tokenize:o,rtl:s,document:{id:"id",index:["title","excerpt"],store:!0},...qe(this,Nn,So).call(this)}),this.authorsIndex=new Ll.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},...qe(this,Nn,So).call(this)}),this.tagsIndex=new Ll.Document({tokenize:o,rtl:s,document:{id:"id",index:["name"],store:!0},...qe(this,Nn,So).call(this)}),this.init=this.init.bind(this),this.search=this.search.bind(this)}async init(){let t=await this.api.posts.browse({limit:"10000",fields:"id,slug,title,excerpt,url,updated_at,visibility",order:"updated_at DESC"});(t||t.length>0)&&(t.length||(t=[t]),qe(this,go,Dd).call(this,t));let n=await this.api.authors.browse({limit:"10000",fields:"id,slug,name,url,profile_image",order:"updated_at DESC"});(n||n.length>0)&&(n.length||(n=[n]),qe(this,mo,Fd).call(this,n));let r=await this.api.tags.browse({limit:"10000",fields:"id,slug,name,url",order:"updated_at DESC",filter:"visibility:public"});(r||r.length>0)&&(r.length||(r=[r]),qe(this,yo,Id).call(this,r))}search(t){const n=this.postsIndex.search(t,{enrich:!0}),r=this.authorsIndex.search(t,{enrich:!0}),s=this.tagsIndex.search(t,{enrich:!0});return{posts:qe(this,Tn,wo).call(this,n),authors:qe(this,Tn,wo).call(this,r),tags:qe(this,Tn,wo).call(this,s)}}}go=new WeakSet,Dd=function(t){t.forEach(n=>{this.postsIndex.add(n)})},mo=new WeakSet,Fd=function(t){t.forEach(n=>{this.authorsIndex.add(n)})},yo=new WeakSet,Id=function(t){t.forEach(n=>{this.tagsIndex.add(n)})},Tn=new WeakSet,wo=function(t){const n=[],r={};return t.forEach(s=>{s.result.forEach(o=>{r[o.id]||(n.push(o.doc),r[o.id]=!0)})}),n},Nn=new WeakSet,So=function(){const t=new RegExp("[一-鿿぀-ゟ゠-ヿ가-힣㐀-䶿𠀀-𪛟𪜀-𫜿𫝀-𫠟𫠠-𬺯𬺰-𮯯𰀀-𱍏𱍐-𲎯𮯰-𮹟豈-﫿丽-𯨟]|[0-9A-Za-zа-яÀ-ſЀ-ӿ؀-ۿঀ-৿Ḁ-ỿ]+","mug");return{encode:n=>(""+n).toLowerCase().match(t)??[]}};const v0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},w0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},S0={Authors:"Автори",Cancel:"Отказ","No matches found":"Няма намерени резултати",Posts:"Публикации","Search posts, tags and authors":"Търсене в публикации, етикети и автори","Show more results":"Показване на още резултати",Tags:"Етикети"},x0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},C0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},E0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},$0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},k0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},P0={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"},T0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},N0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},O0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},j0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},A0={Authors:"Autores",Cancel:"Cancelar","No matches found":"No se encontraron coincidencias",Posts:"Publicaciones","Search posts, tags and authors":"Buscar publicaciones, etiquetas y autores","Show more results":"Mostrar más resultados",Tags:"Etiquetas"},L0={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"},R0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},_0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},D0={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"},F0={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"},I0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},M0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},U0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},z0={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"},B0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},H0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},V0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},K0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},W0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},b0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},q0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},J0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Q0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},G0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Y0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},X0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},Z0={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},e1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},t1={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"},n1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},r1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},s1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},o1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},i1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},l1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},a1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},u1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},c1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},f1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},d1={Authors:"Yazarlar",Cancel:"İptal","No matches found":"Eşleşme bulunamadı",Posts:"Yazılar","Search posts, tags and authors":"Gönderileri, etiketleri ve yazarları ara","Show more results":"Daha fazla sonuç göster",Tags:"Etiketler"},h1={Authors:"Автори",Cancel:"Скасувати","No matches found":"Збігів не знайдено",Posts:"Публікації","Search posts, tags and authors":"Шукайте публікацій, теги та авторів","Show more results":"Показати більше результатів",Tags:"Теги"},p1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},g1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},m1={Authors:"Tác giả",Cancel:"Hủy bỏ","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, chuyên mục và tác giả","Show more results":"Xem thêm kết quả",Tags:"Chuyên mục"},y1={Authors:"作者",Cancel:"取消","No matches found":"未找到匹配项",Posts:"文章","Search posts, tags and authors":"搜索文章、标签和作者","Show more results":"显示更多结果",Tags:"标签"},v1={Authors:"作者",Cancel:"取消","No matches found":"無相符結果",Posts:"文章","Search posts, tags and authors":"搜尋文章、標籤與作者","Show more results":"更多結果",Tags:"標籤"},w1={Authors:"",Cancel:"","No matches found":"",Posts:"","Search posts, tags and authors":"","Show more results":"",Tags:""},S1={Authors:"ஆசிரியர்கள்",Cancel:"ரத்து செய்","No matches found":"பொருத்தங்கள் எதுவும் இல்லை",Posts:"பதிவுகள்","Search posts, tags and authors":"பதிவுகள், குறிச்சொற்கள் மற்றும் ஆசிரியர்களைத் தேடுங்கள்","Show more results":"மேலும் முடிவுகளைக் காட்டு",Tags:"குறிச்சொற்கள்"};var md;function yd(){return md||(md={"/ghost/i18n/locales/af/search.json":function(){return v0},"/ghost/i18n/locales/ar/search.json":function(){return w0},"/ghost/i18n/locales/bg/search.json":function(){return S0},"/ghost/i18n/locales/bn/search.json":function(){return x0},"/ghost/i18n/locales/bs/search.json":function(){return C0},"/ghost/i18n/locales/ca/search.json":function(){return E0},"/ghost/i18n/locales/cs/search.json":function(){return $0},"/ghost/i18n/locales/da/search.json":function(){return k0},"/ghost/i18n/locales/de/search.json":function(){return P0},"/ghost/i18n/locales/de-CH/search.json":function(){return T0},"/ghost/i18n/locales/el/search.json":function(){return N0},"/ghost/i18n/locales/en/search.json":function(){return O0},"/ghost/i18n/locales/eo/search.json":function(){return j0},"/ghost/i18n/locales/es/search.json":function(){return A0},"/ghost/i18n/locales/et/search.json":function(){return L0},"/ghost/i18n/locales/fa/search.json":function(){return R0},"/ghost/i18n/locales/fi/search.json":function(){return _0},"/ghost/i18n/locales/fr/search.json":function(){return D0},"/ghost/i18n/locales/gd/search.json":function(){return F0},"/ghost/i18n/locales/hi/search.json":function(){return I0},"/ghost/i18n/locales/hr/search.json":function(){return M0},"/ghost/i18n/locales/hu/search.json":function(){return U0},"/ghost/i18n/locales/id/search.json":function(){return z0},"/ghost/i18n/locales/is/search.json":function(){return B0},"/ghost/i18n/locales/it/search.json":function(){return H0},"/ghost/i18n/locales/ja/search.json":function(){return V0},"/ghost/i18n/locales/ko/search.json":function(){return K0},"/ghost/i18n/locales/kz/search.json":function(){return W0},"/ghost/i18n/locales/lt/search.json":function(){return b0},"/ghost/i18n/locales/mk/search.json":function(){return q0},"/ghost/i18n/locales/mn/search.json":function(){return J0},"/ghost/i18n/locales/ms/search.json":function(){return Q0},"/ghost/i18n/locales/nl/search.json":function(){return G0},"/ghost/i18n/locales/nn/search.json":function(){return Y0},"/ghost/i18n/locales/no/search.json":function(){return X0},"/ghost/i18n/locales/pl/search.json":function(){return Z0},"/ghost/i18n/locales/pt/search.json":function(){return e1},"/ghost/i18n/locales/pt-BR/search.json":function(){return t1},"/ghost/i18n/locales/ro/search.json":function(){return n1},"/ghost/i18n/locales/ru/search.json":function(){return r1},"/ghost/i18n/locales/si/search.json":function(){return s1},"/ghost/i18n/locales/sk/search.json":function(){return o1},"/ghost/i18n/locales/sl/search.json":function(){return i1},"/ghost/i18n/locales/sq/search.json":function(){return l1},"/ghost/i18n/locales/sr/search.json":function(){return a1},"/ghost/i18n/locales/sr-Cyrl/search.json":function(){return u1},"/ghost/i18n/locales/sv/search.json":function(){return c1},"/ghost/i18n/locales/th/search.json":function(){return f1},"/ghost/i18n/locales/tr/search.json":function(){return d1},"/ghost/i18n/locales/uk/search.json":function(){return h1},"/ghost/i18n/locales/ur/search.json":function(){return p1},"/ghost/i18n/locales/uz/search.json":function(){return g1},"/ghost/i18n/locales/vi/search.json":function(){return m1},"/ghost/i18n/locales/zh/search.json":function(){return y1},"/ghost/i18n/locales/zh-Hant/search.json":function(){return v1},"/ghost/i18n/locales/sw/search.json":function(){return w1},"/ghost/i18n/locales/ta/search.json":function(){return S1}})}function x1(e){function t(n){var r=vd(n,e);if(r!==null)return yd()[r]();throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}return t.resolve=function(n){var r=vd(n,e);return r!==null?r:require.resolve(n)},t}function vd(e,t){var n=C1(e);e=lo(e);var r;e[0]==="/"&&(t="");for(var s=yd(),o=["",".js",".json"];n?r=lo(t+"/node_modules/"+e):r=lo(t+"/"+e),!r.endsWith("/..");){for(var i=0;i0&&t[r-1]!==".."&&t[r-1]!=="."&&(t.splice(--r,2),r--);return e=t.join("/"),n&&e[0]!=="/"?e="/"+e:e.length===0&&(e="."),e}var Ql={exports:{}};const E1={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class ao{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||E1,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{let[l,a]=i;for(let u=0;u{let[l,a]=i;for(let u=0;u{let e,t;const n=new Promise((r,s)=>{e=r,t=s});return n.resolve=e,n.reject=t,n},wd=e=>e==null?"":""+e,$1=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},k1=/###/g,Sd=e=>e&&e.indexOf("###")>-1?e.replace(k1,"."):e,xd=e=>!e||typeof e=="string",Ir=(e,t,n)=>{const r=typeof t!="string"?t:t.split(".");let s=0;for(;s{const{obj:r,k:s}=Ir(e,t,Object);if(r!==void 0||t.length===1){r[s]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),l=Ir(e,i,Object);for(;l.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),l=Ir(e,i,Object),l&&l.obj&&typeof l.obj[`${l.k}.${o}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${o}`]=n},P1=(e,t,n,r)=>{const{obj:s,k:o}=Ir(e,t,Object);s[o]=s[o]||[],s[o].push(n)},co=(e,t)=>{const{obj:n,k:r}=Ir(e,t);if(n)return n[r]},T1=(e,t,n)=>{const r=co(e,n);return r!==void 0?r:co(t,n)},Ed=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Ed(e[r],t[r],n):e[r]=t[r]);return e},kn=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var N1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const O1=e=>typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>N1[t]):e;class j1{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const A1=[" ",",","?","!",";"],L1=new j1(20),R1=(e,t,n)=>{t=t||"",n=n||"";const r=A1.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const s=L1.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(e);if(!o){const i=e.indexOf(n);i>0&&!s.test(e.substring(0,i))&&(o=!0)}return o},Gl=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let s=e;for(let o=0;o-1&&ae&&e.replace("_","-");class $d extends uo{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.indexOf(".")>-1?l=t.split("."):(l=[t,n],r&&(Array.isArray(r)?l.push(...r):typeof r=="string"&&o?l.push(...r.split(o)):l.push(r)));const a=co(this.data,l);return!a&&!n&&!r&&t.indexOf(".")>-1&&(t=l[0],n=l[1],r=l.slice(2).join(".")),a||!i||typeof r!="string"?a:Gl(this.data&&this.data[t]&&this.data[t][n],r,o)}addResource(t,n,r,s){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[t,n];r&&(l=l.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(l=t.split("."),s=n,n=l[1]),this.addNamespaces(n),Cd(this.data,l,s),o.silent||this.emit("added",t,n,r,s)}addResources(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(typeof r[o]=="string"||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});s.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[t,n];t.indexOf(".")>-1&&(l=t.split("."),s=r,r=n,n=l[1]),this.addNamespaces(n);let a=co(this.data,l)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Ed(a,r,o):a={...a,...r},Cd(this.data,l,a),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var kd={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,s){return e.forEach(o=>{this.processors[o]&&(t=this.processors[o].process(t,n,r,s))}),t}};const Pd={};class ho extends uo{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),$1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ke.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!R1(t,r,s);if(i&&!l){const a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:o};const u=t.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),t=u.join(s)}return typeof o=="string"&&(o=[o]),{key:t,namespaces:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:l}=this.extractFromKey(t[t.length-1],n),a=l[l.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const S=n.nsSeparator||this.options.nsSeparator;return s?{res:`${a}${S}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:`${a}${S}${i}`}return s?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:a,usedParams:this.getUsedParamsDetails(n)}:i}const p=this.resolve(t,n);let c=p&&p.res;const v=p&&p.usedKey||i,m=p&&p.exactUsedKey||i,y=Object.prototype.toString.apply(c),h=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,g=!this.i18nFormat||this.i18nFormat.handleAsObject;if(g&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&h.indexOf(y)<0&&!(typeof d=="string"&&Array.isArray(c))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,c,{...n,ns:l}):`key '${i} (${this.language})' returned an object instead of string.`;return s?(p.res=S,p.usedParams=this.getUsedParamsDetails(n),p):S}if(o){const S=Array.isArray(c),T=S?[]:{},C=S?m:v;for(const P in c)if(Object.prototype.hasOwnProperty.call(c,P)){const j=`${C}${o}${P}`;T[P]=this.translate(j,{...n,joinArrays:!1,ns:l}),T[P]===j&&(T[P]=c[P])}c=T}}else if(g&&typeof d=="string"&&Array.isArray(c))c=c.join(d),c&&(c=this.extendTranslation(c,t,n,r));else{let S=!1,T=!1;const C=n.count!==void 0&&typeof n.count!="string",P=ho.hasDefaultValue(n),j=C?this.pluralResolver.getSuffix(u,n.count,n):"",O=n.ordinal&&C?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",G=C&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),nt=G&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${j}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(c)&&P&&(S=!0,c=nt),this.isValidLookup(c)||(T=!0,c=i);const te=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:c,We=P&&nt!==c&&this.options.updateMissing;if(T||S||We){if(this.logger.log(We?"updateKey":"missingKey",u,a,i,We?nt:c),o){const oe=this.resolve(i,{...n,keySeparator:!1});oe&&oe.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 Ee=[];const be=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&be&&be[0])for(let oe=0;oe{const k=P&&Ht!==c?Ht:te;this.options.missingKeyHandler?this.options.missingKeyHandler(oe,a,De,k,We,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(oe,a,De,k,We,n),this.emit("missingKey",oe,a,De,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?Ee.forEach(oe=>{const De=this.pluralResolver.getSuffixes(oe,n);G&&n[`defaultValue${this.options.pluralSeparator}zero`]&&De.indexOf(`${this.options.pluralSeparator}zero`)<0&&De.push(`${this.options.pluralSeparator}zero`),De.forEach(Ht=>{On([oe],i+Ht,n[`defaultValue${Ht}`]||nt)})}):On(Ee,i,nt))}c=this.extendTranslation(c,t,n,p,r),T&&c===i&&this.options.appendNamespaceToMissingKey&&(c=`${a}:${i}`),(T||S)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${a}:${i}`:i,S?c:void 0):c=this.options.parseMissingKeyHandler(c))}return s?(p.res=c,p.usedParams=this.getUsedParamsDetails(n),p):c}extendTranslation(t,n,r,s,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const c=t.match(this.interpolator.nestingRegexp);f=c&&c.length}let p=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||s.usedLng,r),u){const c=t.match(this.interpolator.nestingRegexp),v=c&&c.length;f1&&arguments[1]!==void 0?arguments[1]:{},r,s,o,i,l;return typeof t=="string"&&(t=[t]),t.forEach(a=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(a,n),f=u.key;s=f;let p=u.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const c=n.count!==void 0&&typeof n.count!="string",v=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",y=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(h=>{this.isValidLookup(r)||(l=h,!Pd[`${y[0]}-${h}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Pd[`${y[0]}-${h}`]=!0,this.logger.warn(`key "${s}" for languages "${y.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),y.forEach(d=>{if(this.isValidLookup(r))return;i=d;const g=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(g,f,d,h,n);else{let S;c&&(S=this.pluralResolver.getSuffix(d,n.count,n));const T=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(g.push(f+S),n.ordinal&&S.indexOf(C)===0&&g.push(f+S.replace(C,this.options.pluralSeparator)),v&&g.push(f+T)),m){const P=`${f}${this.options.contextSeparator}${n.context}`;g.push(P),c&&(g.push(P+S),n.ordinal&&S.indexOf(C)===0&&g.push(P+S.replace(C,this.options.pluralSeparator)),v&&g.push(P+T))}}let w;for(;w=g.pop();)this.isValidLookup(r)||(o=w,r=this.getResource(d,h,w,n))}))})}),{res:r,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,s):this.resourceStore.getResource(t,n,r,s)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let s=r?t.replace:t;if(r&&typeof t.count<"u"&&(s.count=t.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const o of n)delete s[o]}return s}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const Yl=e=>e.charAt(0).toUpperCase()+e.slice(1);class Td{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ke.create("languageUtils")}getScriptPartFromCode(t){if(t=fo(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=fo(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(t)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Yl(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Yl(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Yl(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>{if(o===s)return o;if(!(o.indexOf("-")<0&&s.indexOf("-")<0)&&(o.indexOf("-")>0&&s.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===s||o.indexOf(s)===0&&s.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):typeof t=="string"&&o(this.formatLanguageCode(t)),r.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}let _1=[{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}],D1={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const F1=["v1","v2","v3"],I1=["v4"],Nd={zero:0,one:1,two:2,few:3,many:4,other:5},M1=()=>{const e={};return _1.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:D1[t.fc]}})}),e};class U1{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Ke.create("pluralResolver"),(!this.options.compatibilityJSON||I1.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=M1(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=fo(t==="dev"?"en":t),s=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(r,{type:s});return this.pluralRulesCache[o]=i,i}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(s=>`${n}${s}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,o)=>Nd[s]-Nd[o]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(t,s,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(t,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let s=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const o=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!F1.includes(this.options.compatibilityJSON)}}const Od=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=T1(e,t,n);return!o&&s&&typeof n=="string"&&(o=Gl(e,n,r),o===void 0&&(o=Gl(t,n,r))),o},Xl=e=>e.replace(/\$/g,"$$$$");class z1{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ke.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:l,suffixEscaped:a,formatSeparator:u,unescapeSuffix:f,unescapePrefix:p,nestingPrefix:c,nestingPrefixEscaped:v,nestingSuffix:m,nestingSuffixEscaped:y,nestingOptionsSeparator:h,maxReplaces:d,alwaysFormat:g}=t.interpolation;this.escape=n!==void 0?n:O1,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?kn(o):i||"{{",this.suffix=l?kn(l):a||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?kn(c):v||kn("$t("),this.nestingSuffix=m?kn(m):y||kn(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=d||1e3,this.alwaysFormat=g!==void 0?g:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,s){let o,i,l;const a=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=v=>{if(v.indexOf(this.formatSeparator)<0){const d=Od(n,a,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(d,void 0,r,{...s,...n,interpolationkey:v}):d}const m=v.split(this.formatSeparator),y=m.shift().trim(),h=m.join(this.formatSeparator).trim();return this.format(Od(n,a,y,this.options.keySeparator,this.options.ignoreJSONStructure),h,r,{...s,...n,interpolationkey:y})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,p=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>Xl(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?Xl(this.escape(v)):Xl(v)}].forEach(v=>{for(l=0;o=v.regex.exec(t);){const m=o[1].trim();if(i=u(m),i===void 0)if(typeof f=="function"){const h=f(t,o,s);i=typeof h=="string"?h:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))i="";else if(p){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),i="";else typeof i!="string"&&!this.useRawValueToEscape&&(i=wd(i));const y=v.safeValue(i);if(t=t.replace(o[0],y),p?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=o[0].length):v.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,o,i;const l=(a,u)=>{const f=this.nestingOptionsSeparator;if(a.indexOf(f)<0)return a;const p=a.split(new RegExp(`${f}[ ]*{`));let c=`{${p[1]}`;a=p[0],c=this.interpolate(c,i);const v=c.match(/'/g),m=c.match(/"/g);(v&&v.length%2===0&&!m||m.length%2!==0)&&(c=c.replace(/'/g,'"'));try{i=JSON.parse(c),u&&(i={...u,...i})}catch(y){return this.logger.warn(`failed parsing options string in nesting for key ${a}`,y),`${a}${f}${c}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,a};for(;s=this.nestingRegexp.exec(t);){let a=[];i={...r},i=i.replace&&typeof i.replace!="string"?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(p=>p.trim());s[1]=f.shift(),a=f,u=!0}if(o=n(l.call(this,s[1].trim(),i),i),o&&s[0]===t&&typeof o!="string")return o;typeof o!="string"&&(o=wd(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${t}`),o=""),u&&(o=a.reduce((f,p)=>this.format(f,p,r.lng,{...r,interpolationkey:s[1].trim()}),o.trim())),t=t.replace(s[0],o),this.regexp.lastIndex=0}return t}}const B1=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);t==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):t==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(i=>{if(i){const[l,...a]=i.split(":"),u=a.join(":").trim().replace(/^'+|'+$/g,""),f=l.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},Pn=e=>{const t={};return(n,r,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=r+JSON.stringify(o);let l=t[i];return l||(l=e(fo(r),s),t[i]=l),l(n)}};class H1{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Ke.create("formatter"),this.options=t,this.formats={number:Pn((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return o=>s.format(o)}),currency:Pn((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>s.format(o)}),datetime:Pn((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return o=>s.format(o)}),relativetime:Pn((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return o=>s.format(o,r.range||"day")}),list:Pn((n,r)=>{const s=new Intl.ListFormat(n,{...r});return o=>s.format(o)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Pn(n)}format(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(l=>l.indexOf(")")>-1)){const l=o.findIndex(a=>a.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,l)].join(this.formatSeparator)}return o.reduce((l,a)=>{const{formatName:u,formatOptions:f}=B1(a);if(this.formats[u]){let p=l;try{const c=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},v=c.locale||c.lng||s.locale||s.lng||r;p=this.formats[u](l,v,{...f,...s,...c})}catch(c){this.logger.warn(c)}return p}else this.logger.warn(`there was no format function for ${u}`);return l},t)}}const V1=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class K1 extends uo{constructor(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Ke.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(t,n,r,s){const o={},i={},l={},a={};return t.forEach(u=>{let f=!0;n.forEach(p=>{const c=`${u}|${p}`;!r.reload&&this.store.hasResourceBundle(u,p)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?i[c]===void 0&&(i[c]=!0):(this.state[c]=1,f=!1,i[c]===void 0&&(i[c]=!0),o[c]===void 0&&(o[c]=!0),a[p]===void 0&&(a[p]=!0)))}),f||(l[u]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(a)}}loaded(t,n,r){const s=t.split("|"),o=s[0],i=s[1];n&&this.emit("failedLoading",o,i,n),!n&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const l={};this.queue.forEach(a=>{P1(a.loaded,[o],i),V1(a,t),n&&a.errors.push(n),a.pendingCount===0&&!a.done&&(Object.keys(a.loaded).forEach(u=>{l[u]||(l[u]={});const f=a.loaded[u];f.length&&f.forEach(p=>{l[u][p]===void 0&&(l[u][p]=!0)})}),a.done=!0,a.errors.length?a.callback(a.errors):a.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(a=>!a.done)}read(t,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:s,wait:o,callback:i});return}this.readingCalls++;const l=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(u&&f&&s{this.read.call(this,t,n,r,s+1,o*2,i)},o);return}i(u,f)},a=this.backend[r].bind(this.backend);if(a.length===2){try{const u=a(t,n);u&&typeof u.then=="function"?u.then(f=>l(null,f)).catch(l):l(null,u)}catch(u){l(u)}return}return a(t,n,l)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=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."),s&&s();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(t,n,r,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),s=r[0],o=r[1];this.read(s,o,"read",void 0,void 0,(i,l)=>{i&&this.logger.warn(`${n}loading namespace ${o} for language ${s} failed`,i),!i&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${s}`,l),this.loaded(t,i,l)})}saveMissing(t,n,r,s,o){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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(!(r==null||r==="")){if(this.backend&&this.backend.create){const a={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(t,n,r,s,a):f=u(t,n,r,s),f&&typeof f.then=="function"?f.then(p=>l(null,p)).catch(l):l(null,f)}catch(f){l(f)}else u(t,n,r,s,l,a)}!t||!t[0]||this.store.addResource(t[0],n,r,s)}}}const jd=()=>({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:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ad=e=>(typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),po=()=>{},W1=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Mr extends uo{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ad(t),this.services={},this.logger=Ke,this.modules={external:[]},W1(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=jd();this.options={...s,...this.options,...Ad(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?Ke.init(o(this.modules.logger),this.options):Ke.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=H1);const p=new Td(this.options);this.store=new $d(this.options.resources,this.options);const c=this.services;c.logger=Ke,c.resourceStore=this.store,c.languageUtils=p,c.pluralResolver=new U1(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(c.formatter=o(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new z1(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new K1(o(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(v){for(var m=arguments.length,y=new Array(m>1?m-1:0),h=1;h1?m-1:0),h=1;h{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=po),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[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(f=>{this[f]=function(){return t.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return t.store[f](...arguments),t}});const a=Fr(),u=()=>{const f=(p,c)=>{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),a.resolve(c),r(p,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),a}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:po;const s=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],i=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(u=>{u!=="cimode"&&o.indexOf(u)<0&&o.push(u)})};s?i(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(a=>i(a)),this.options.preload&&this.options.preload.forEach(l=>i(l)),this.services.backendConnector.load(o,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(l)})}else r(null)}reloadResources(t,n,r){const s=Fr();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=po),this.services.backendConnector.reload(t,n,o=>{s.resolve(),r(o)}),s}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&kd.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const s=Fr();this.emit("languageChanging",t);const o=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},i=(a,u)=>{u?(o(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(a,function(){return r.t(...arguments)})},l=a=>{!t&&!a&&this.services.languageDetector&&(a=[]);const u=typeof a=="string"?a:this.services.languageUtils.getBestMatchFromCodes(a);u&&(this.language||o(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{i(f,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(t),s}getFixedT(t,n,r){var s=this;const o=function(i,l){let a;if(typeof l!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),p=2;p`${a.keyPrefix}${c}${m}`):v=a.keyPrefix?`${a.keyPrefix}${c}${i}`:i,s.t(v,a)};return typeof t=="string"?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=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 r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(l,a)=>{const u=this.services.backendConnector.state[`${l}|${a}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,i);if(l!==void 0)return l}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!s||i(o,t)))}loadNamespaces(t,n){const r=Fr();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Fr();typeof t=="string"&&(t=[t]);const s=this.options.preload||[],o=t.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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"],r=this.services&&this.services.languageUtils||new Td(jd());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Mr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:po;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const s={...this.options,...t,isClone:!0},o=new Mr(s);return(t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(l=>{o[l]=this[l]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r&&(o.store=new $d(this.store.data,s),o.services.resourceStore=o.store),o.translator=new ho(o.services,s),o.translator.on("*",function(l){for(var a=arguments.length,u=new Array(a>1?a-1:0),f=1;f{const n=q1.createInstance();return n.init({lng:e,nsSeparator:!1,keySeparator:!1,returnEmptyString:!1,fallbackLng:!1,ns:t,defaultNS:t,resources:Rd.reduce((r,s)=>{const o=x1("/ghost/i18n/lib")(`../locales/${s}/${t}.json`);return r[s]={[t]:{...o,...o.default&&typeof o.default=="object"?o.default:{}}},r},{})}),n},Ql.exports.SUPPORTED_LOCALES=Rd;var J1=Ql.exports,Q1=J1;const G1=J(Q1);class Y1 extends rt.Component{constructor(t){super(t);const n=this.props.locale||"en",r=G1(n,"search"),s=r.dir()||"ltr",o=new y0({adminUrl:t.adminUrl,apiKey:t.apiKey,dir:s});this.state={searchIndex:o,showPopup:!1,indexStarted:!1,indexComplete:!1,t:r.t,dir:s},this.inputRef=rt.createRef()}componentDidMount(){this.initSetup()}componentDidUpdate(t,n){var r,s,o;if(n.showPopup!==this.state.showPopup)try{this.state.showPopup?(this.bodyScroll=(o=(s=(r=window.document)==null?void 0:r.body)==null?void 0:s.style)==null?void 0:o.overflow,window.document.body.style.overflow="hidden"):window.document.body.style.overflow=this.bodyScroll||""}catch{}this.state.showPopup!==(n==null?void 0:n.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)}setupCustomTriggerButton(){this.clickHandler=t=>{t.preventDefault(),this.setState({showPopup:!0});const n=document.createElement("input");n.style.opacity="0",n.style.position="fixed",n.style.top="0",document.body.appendChild(n),n.focus(),setTimeout(()=>{this.inputRef.current.focus(),document.body.removeChild(n)},150)},this.customTriggerButtons=this.getCustomTriggerButtons(),this.customTriggerButtons.forEach(t=>{t.removeEventListener("click",this.clickHandler),t.addEventListener("click",this.clickHandler)})}getCustomTriggerButtons(){const t="[data-ghost-search]";return document.querySelectorAll(t)||[]}handleSearchUrl(){const[t]=window.location.hash.substr(1).split("?");(t==="/search"||t==="/search/")&&(this.setState({showPopup:!0}),window.history.replaceState("",document.title,window.location.pathname))}addKeyboardShortcuts(){const t=this.getCustomTriggerButtons();t!=null&&t.length&&(this.handleKeyDown=n=>{if(n.key==="k"&&n.metaKey)return this.setState({showPopup:!0}),n.preventDefault(),n.stopPropagation(),!1},document.addEventListener("keydown",this.handleKeyDown))}render(){return $.jsx(fe.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:(t,n)=>{t==="update"&&this.setState({...this.state,...n})},t:this.state.t,dir:this.state.dir},children:$.jsx(mf,{})})}}const _d="sodo-search-root";function X1(){const e=document.createElement("div");e.id=_d,document.body.appendChild(e)}function Z1(){const e=document.querySelector("script[data-sodo-search]");if(e){const t=e.dataset.sodoSearch,n=e.dataset.key,r=e.dataset.styles,s=e.dataset.locale||"en";return{adminUrl:t,apiKey:n,stylesUrl:r,locale:s}}return{}}function ey(){X1()}function ty(){var o;const{adminUrl:e,apiKey:t,stylesUrl:n,locale:r}=Z1(),s=(o=e||window.location.origin)==null?void 0:o.replace(/\/+$/,"");ey(),bp.render($.jsx(rt.StrictMode,{children:$.jsx(Y1,{adminUrl:s,apiKey:t,stylesUrl:n,locale:r})}),document.getElementById(_d))}ty()}); //# sourceMappingURL=sodo-search.min.js.map