var n6=Object.defineProperty,s6=Object.defineProperties;var i6=Object.getOwnPropertyDescriptors;var zh=Object.getOwnPropertySymbols;var l2=Object.prototype.hasOwnProperty,c2=Object.prototype.propertyIsEnumerable;var xd=(e,r)=>(r=Symbol[e])?r:Symbol.for("Symbol."+e),o6=e=>{throw TypeError(e)};var nx=(e,r,a)=>r in e?n6(e,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[r]=a,_e=(e,r)=>{for(var a in r||(r={}))l2.call(r,a)&&nx(e,a,r[a]);if(zh)for(var a of zh(r))c2.call(r,a)&&nx(e,a,r[a]);return e},$e=(e,r)=>s6(e,i6(r));var Gs=(e,r)=>{var a={};for(var n in e)l2.call(e,n)&&r.indexOf(n)<0&&(a[n]=e[n]);if(e!=null&&zh)for(var n of zh(e))r.indexOf(n)<0&&c2.call(e,n)&&(a[n]=e[n]);return a};var l6=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var Ti=(e,r,a)=>nx(e,typeof r!="symbol"?r+"":r,a);var xe=(e,r,a)=>new Promise((n,i)=>{var c=y=>{try{g(a.next(y))}catch(x){i(x)}},u=y=>{try{g(a.throw(y))}catch(x){i(x)}},g=y=>y.done?n(y.value):Promise.resolve(y.value).then(c,u);g((a=a.apply(e,r)).next())}),yc=function(e,r){this[0]=e,this[1]=r},sx=(e,r,a)=>{var n=(u,g,y,x)=>{try{var k=a[u](g),N=(g=k.value)instanceof yc,C=k.done;Promise.resolve(N?g[0]:g).then(O=>N?n(u==="return"?u:"next",g[1]?{done:O.done,value:O.value}:O,y,x):y({value:O,done:C})).catch(O=>n("throw",O,y,x))}catch(O){x(O)}},i=u=>c[u]=g=>new Promise((y,x)=>n(u,g,y,x)),c={};return a=a.apply(e,r),c[xd("asyncIterator")]=()=>c,i("next"),i("throw"),i("return"),c},ix=e=>{var r=e[xd("asyncIterator")],a=!1,n,i={};return r==null?(r=e[xd("iterator")](),n=c=>i[c]=u=>r[c](u)):(r=r.call(e),n=c=>i[c]=u=>{if(a){if(a=!1,c==="throw")throw u;return u}return a=!0,{done:!1,value:new yc(new Promise(g=>{var y=r[c](u);y instanceof Object||o6("Object expected"),g(y)}),1)}}),i[xd("iterator")]=()=>i,n("next"),"throw"in r?n("throw"):i.throw=c=>{throw c},"return"in r&&n("return"),i},d2=(e,r,a)=>(r=e[xd("asyncIterator")])?r.call(e):(e=e[xd("iterator")](),r={},a=(n,i)=>(i=e[n])&&(r[n]=c=>new Promise((u,g,y)=>(c=i.call(e,c),y=c.done,Promise.resolve(c.value).then(x=>u({value:x,done:y}),g)))),a("next"),a("return"),r);var cB=l6(ht=>{function c6(e,r){for(var a=0;an[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const c of i)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function a(i){const c={};return i.integrity&&(c.integrity=i.integrity),i.referrerPolicy&&(c.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?c.credentials="include":i.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function n(i){if(i.ep)return;i.ep=!0;const c=a(i);fetch(i.href,c)}})();var Hh=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function gp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ox={exports:{}},H0={};var u2;function d6(){if(u2)return H0;u2=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(n,i,c){var u=null;if(c!==void 0&&(u=""+c),i.key!==void 0&&(u=""+i.key),"key"in i){c={};for(var g in i)g!=="key"&&(c[g]=i[g])}else c=i;return i=c.ref,{$$typeof:e,type:n,key:u,ref:i!==void 0?i:null,props:c}}return H0.Fragment=r,H0.jsx=a,H0.jsxs=a,H0}var h2;function u6(){return h2||(h2=1,ox.exports=d6()),ox.exports}var t=u6(),lx={exports:{}},Vr={};var f2;function h6(){if(f2)return Vr;f2=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),C=Symbol.iterator;function O(J){return J===null||typeof J!="object"?null:(J=C&&J[C]||J["@@iterator"],typeof J=="function"?J:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,I={};function z(J,G,ie){this.props=J,this.context=G,this.refs=I,this.updater=ie||D}z.prototype.isReactComponent={},z.prototype.setState=function(J,G){if(typeof J!="object"&&typeof J!="function"&&J!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,J,G,"setState")},z.prototype.forceUpdate=function(J){this.updater.enqueueForceUpdate(this,J,"forceUpdate")};function U(){}U.prototype=z.prototype;function B(J,G,ie){this.props=J,this.context=G,this.refs=I,this.updater=ie||D}var V=B.prototype=new U;V.constructor=B,A(V,z.prototype),V.isPureReactComponent=!0;var Z=Array.isArray;function W(){}var H={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function Q(J,G,ie){var re=ie.ref;return{$$typeof:e,type:J,key:G,ref:re!==void 0?re:null,props:ie}}function Ne(J,G){return Q(J.type,G,J.props)}function oe(J){return typeof J=="object"&&J!==null&&J.$$typeof===e}function se(J){var G={"=":"=0",":":"=2"};return"$"+J.replace(/[=:]/g,function(ie){return G[ie]})}var ce=/\/+/g;function Ce(J,G){return typeof J=="object"&&J!==null&&J.key!=null?se(""+J.key):G.toString(36)}function ae(J){switch(J.status){case"fulfilled":return J.value;case"rejected":throw J.reason;default:switch(typeof J.status=="string"?J.then(W,W):(J.status="pending",J.then(function(G){J.status==="pending"&&(J.status="fulfilled",J.value=G)},function(G){J.status==="pending"&&(J.status="rejected",J.reason=G)})),J.status){case"fulfilled":return J.value;case"rejected":throw J.reason}}throw J}function me(J,G,ie,re,ne){var ve=typeof J;(ve==="undefined"||ve==="boolean")&&(J=null);var Ve=!1;if(J===null)Ve=!0;else switch(ve){case"bigint":case"string":case"number":Ve=!0;break;case"object":switch(J.$$typeof){case e:case r:Ve=!0;break;case k:return Ve=J._init,me(Ve(J._payload),G,ie,re,ne)}}if(Ve)return ne=ne(J),Ve=re===""?"."+Ce(J,0):re,Z(ne)?(ie="",Ve!=null&&(ie=Ve.replace(ce,"$&/")+"/"),me(ne,G,ie,"",function(Re){return Re})):ne!=null&&(oe(ne)&&(ne=Ne(ne,ie+(ne.key==null||J&&J.key===ne.key?"":(""+ne.key).replace(ce,"$&/")+"/")+Ve)),G.push(ne)),1;Ve=0;var Ae=re===""?".":re+":";if(Z(J))for(var ze=0;ze>>1,ye=me[Oe];if(0>>1;Oei(ie,fe))rei(ne,ie)?(me[Oe]=ne,me[re]=fe,Oe=re):(me[Oe]=ie,me[G]=fe,Oe=G);else if(rei(ne,fe))me[Oe]=ne,me[re]=fe,Oe=re;else break e}}return K}function i(me,K){var fe=me.sortIndex-K.sortIndex;return fe!==0?fe:me.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,g=u.now();e.unstable_now=function(){return u.now()-g}}var y=[],x=[],k=1,N=null,C=3,O=!1,D=!1,A=!1,I=!1,z=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate!="undefined"?setImmediate:null;function V(me){for(var K=a(x);K!==null;){if(K.callback===null)n(x);else if(K.startTime<=me)n(x),K.sortIndex=K.expirationTime,r(y,K);else break;K=a(x)}}function Z(me){if(A=!1,V(me),!D)if(a(y)!==null)D=!0,W||(W=!0,se());else{var K=a(x);K!==null&&ae(Z,K.startTime-me)}}var W=!1,H=-1,le=5,Q=-1;function Ne(){return I?!0:!(e.unstable_now()-Qme&&Ne());){var Oe=N.callback;if(typeof Oe=="function"){N.callback=null,C=N.priorityLevel;var ye=Oe(N.expirationTime<=me);if(me=e.unstable_now(),typeof ye=="function"){N.callback=ye,V(me),K=!0;break t}N===a(y)&&n(y),V(me)}else n(y);N=a(y)}if(N!==null)K=!0;else{var J=a(x);J!==null&&ae(Z,J.startTime-me),K=!1}}break e}finally{N=null,C=fe,O=!1}K=void 0}}finally{K?se():W=!1}}}var se;if(typeof B=="function")se=function(){B(oe)};else if(typeof MessageChannel!="undefined"){var ce=new MessageChannel,Ce=ce.port2;ce.port1.onmessage=oe,se=function(){Ce.postMessage(null)}}else se=function(){z(oe,0)};function ae(me,K){H=z(function(){me(e.unstable_now())},K)}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(me){me.callback=null},e.unstable_forceFrameRate=function(me){0>me||125Oe?(me.sortIndex=fe,r(x,me),a(y)===null&&me===a(x)&&(A?(U(H),H=-1):A=!0,ae(Z,fe-Oe))):(me.sortIndex=ye,r(y,me),D||O||(D=!0,W||(W=!0,se()))),me},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function(me){var K=C;return function(){var fe=C;C=K;try{return me.apply(this,arguments)}finally{C=fe}}}})(ux)),ux}var x2;function m6(){return x2||(x2=1,dx.exports=f6()),dx.exports}var hx={exports:{}},xs={};var p2;function g6(){if(p2)return xs;p2=1;var e=Xf();function r(y){var x="https://react.dev/errors/"+y;if(1ye||(s.current=Oe[ye],Oe[ye]=null,ye--)}function ie(s,l){ye++,Oe[ye]=s.current,s.current=l}var re=J(null),ne=J(null),ve=J(null),Ve=J(null);function Ae(s,l){switch(ie(ve,l),ie(ne,s),ie(re,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?Ob(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=Ob(l),s=Rb(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}G(re),ie(re,s)}function ze(){G(re),G(ne),G(ve)}function Re(s){s.memoizedState!==null&&ie(Ve,s);var l=re.current,m=Rb(l,s.type);l!==m&&(ie(ne,s),ie(re,m))}function Ze(s){ne.current===s&&(G(re),G(ne)),Ve.current===s&&(G(Ve),F0._currentValue=fe)}var Lt,mt;function Zt(s){if(Lt===void 0)try{throw Error()}catch(m){var l=m.stack.trim().match(/\n( *(at )?)/);Lt=l&&l[1]||"",mt=-1)":-1T||Ie[_]!==ot[T]){var Et=` `+Ie[_].replace(" at new "," at ");return s.displayName&&Et.includes("")&&(Et=Et.replace("",s.displayName)),Et}while(1<=_&&0<=T);break}}}finally{ar=!1,Error.prepareStackTrace=m}return(m=s?s.displayName||s.name:"")?Zt(m):""}function yt(s,l){switch(s.tag){case 26:case 27:case 5:return Zt(s.type);case 16:return Zt("Lazy");case 13:return s.child!==l&&l!==null?Zt("Suspense Fallback"):Zt("Suspense");case 19:return Zt("SuspenseList");case 0:case 15:return or(s.type,!1);case 11:return or(s.type.render,!1);case 1:return or(s.type,!0);case 31:return Zt("Activity");default:return""}}function nr(s){try{var l="",m=null;do l+=yt(s,m),m=s,s=s.return;while(s);return l}catch(_){return` Error generating stack: `+_.message+` `+_.stack}}var $t=Object.prototype.hasOwnProperty,Er=e.unstable_scheduleCallback,St=e.unstable_cancelCallback,Br=e.unstable_shouldYield,Pt=e.unstable_requestPaint,it=e.unstable_now,De=e.unstable_getCurrentPriorityLevel,Je=e.unstable_ImmediatePriority,Be=e.unstable_UserBlockingPriority,vt=e.unstable_NormalPriority,jt=e.unstable_LowPriority,Ct=e.unstable_IdlePriority,Wt=e.log,pr=e.unstable_setDisableYieldValue,Ge=null,We=null;function At(s){if(typeof Wt=="function"&&pr(s),We&&typeof We.setStrictMode=="function")try{We.setStrictMode(Ge,s)}catch(l){}}var lt=Math.clz32?Math.clz32:tr,Dt=Math.log,mr=Math.LN2;function tr(s){return s>>>=0,s===0?32:31-(Dt(s)/mr|0)|0}var pt=256,Jt=262144,vr=4194304;function Ir(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Le(s,l,m){var _=s.pendingLanes;if(_===0)return 0;var T=0,M=s.suspendedLanes,q=s.pingedLanes;s=s.warmLanes;var pe=_&134217727;return pe!==0?(_=pe&~M,_!==0?T=Ir(_):(q&=pe,q!==0?T=Ir(q):m||(m=pe&~s,m!==0&&(T=Ir(m))))):(pe=_&~M,pe!==0?T=Ir(pe):q!==0?T=Ir(q):m||(m=_&~s,m!==0&&(T=Ir(m)))),T===0?0:l!==0&&l!==T&&(l&M)===0&&(M=T&-T,m=l&-l,M>=m||M===32&&(m&4194048)!==0)?l:T}function qe(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function Ke(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Yt(){var s=vr;return vr<<=1,(vr&62914560)===0&&(vr=4194304),s}function gr(s){for(var l=[],m=0;31>m;m++)l.push(s);return l}function jr(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function Zr(s,l,m,_,T,M){var q=s.pendingLanes;s.pendingLanes=m,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=m,s.entangledLanes&=m,s.errorRecoveryDisabledLanes&=m,s.shellSuspendCounter=0;var pe=s.entanglements,Ie=s.expirationTimes,ot=s.hiddenUpdates;for(m=q&~m;0=zi),ni=" ",yl=!1;function Hc(s,l){switch(s){case"keyup":return es.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hi(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var oo=!1;function ln(s,l){switch(s){case"compositionend":return Hi(l);case"keypress":return l.which!==32?null:(yl=!0,ni);case"textInput":return s=l.data,s===ni&&yl?null:s;default:return null}}function si(s,l){if(oo)return s==="compositionend"||!io&&Hc(s,l)?(s=us(),qa=qn=ws=null,oo=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1=l)return{node:m,offset:l-s};s=_}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=R(m)}}function X(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?X(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function te(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=Rs(s.document);l instanceof s.HTMLIFrameElement;){try{var m=typeof l.contentWindow.location.href=="string"}catch(_){m=!1}if(m)s=l.contentWindow;else break;l=Rs(s.document)}return l}function ue(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var je=wa&&"documentMode"in document&&11>=document.documentMode,Fe=null,Ue=null,tt=null,ut=!1;function Xt(s,l,m){var _=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;ut||Fe==null||Fe!==Rs(_)||(_=Fe,"selectionStart"in _&&ue(_)?_={start:_.selectionStart,end:_.selectionEnd}:(_=(_.ownerDocument&&_.ownerDocument.defaultView||window).getSelection(),_={anchorNode:_.anchorNode,anchorOffset:_.anchorOffset,focusNode:_.focusNode,focusOffset:_.focusOffset}),tt&&S(tt,_)||(tt=_,_=Ch(Ue,"onSelect"),0<_.length&&(l=new pn("onSelect","select",null,l,m),s.push({event:l,listeners:_}),l.target=Fe)))}function Gt(s,l){var m={};return m[s.toLowerCase()]=l.toLowerCase(),m["Webkit"+s]="webkit"+l,m["Moz"+s]="moz"+l,m}var Ft={animationend:Gt("Animation","AnimationEnd"),animationiteration:Gt("Animation","AnimationIteration"),animationstart:Gt("Animation","AnimationStart"),transitionrun:Gt("Transition","TransitionRun"),transitionstart:Gt("Transition","TransitionStart"),transitioncancel:Gt("Transition","TransitionCancel"),transitionend:Gt("Transition","TransitionEnd")},Wr={},Ur={};wa&&(Ur=document.createElement("div").style,"AnimationEvent"in window||(delete Ft.animationend.animation,delete Ft.animationiteration.animation,delete Ft.animationstart.animation),"TransitionEvent"in window||delete Ft.transitionend.transition);function fa(s){if(Wr[s])return Wr[s];if(!Ft[s])return s;var l=Ft[s],m;for(m in l)if(l.hasOwnProperty(m)&&m in Ur)return Wr[s]=l[m];return s}var Rn=fa("animationend"),Mn=fa("animationiteration"),ca=fa("animationstart"),bn=fa("transitionrun"),Hn=fa("transitionstart"),co=fa("transitioncancel"),Ss=fa("transitionend"),Wc=new Map,ki="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ki.push("scrollEnd");function Ps(s,l){Wc.set(s,l),xr(l,[s])}var ac=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Fs=[],ms=0,Gc=0;function nc(){for(var s=ms,l=Gc=ms=0;l>=q,T-=q,Rt=1<<32-lt(l)+T|m<Yr?(ia=_r,_r=null):ia=_r.sibling;var ba=dt(Xe,_r,st[Yr],Tt);if(ba===null){_r===null&&(_r=ia);break}s&&_r&&ba.alternate===null&&l(Xe,_r),He=M(ba,He,Yr),ya===null?Mr=ba:ya.sibling=ba,ya=ba,_r=ia}if(Yr===st.length)return m(Xe,_r),ra&&Cr(Xe,Yr),Mr;if(_r===null){for(;YrYr?(ia=_r,_r=null):ia=_r.sibling;var Fl=dt(Xe,_r,ba.value,Tt);if(Fl===null){_r===null&&(_r=ia);break}s&&_r&&Fl.alternate===null&&l(Xe,_r),He=M(Fl,He,Yr),ya===null?Mr=Fl:ya.sibling=Fl,ya=Fl,_r=ia}if(ba.done)return m(Xe,_r),ra&&Cr(Xe,Yr),Mr;if(_r===null){for(;!ba.done;Yr++,ba=st.next())ba=Mt(Xe,ba.value,Tt),ba!==null&&(He=M(ba,He,Yr),ya===null?Mr=ba:ya.sibling=ba,ya=ba);return ra&&Cr(Xe,Yr),Mr}for(_r=_(_r);!ba.done;Yr++,ba=st.next())ba=xt(_r,Xe,Yr,ba.value,Tt),ba!==null&&(s&&ba.alternate!==null&&_r.delete(ba.key===null?Yr:ba.key),He=M(ba,He,Yr),ya===null?Mr=ba:ya.sibling=ba,ya=ba);return s&&_r.forEach(function(a6){return l(Xe,a6)}),ra&&Cr(Xe,Yr),Mr}function Pa(Xe,He,st,Tt){if(typeof st=="object"&&st!==null&&st.type===A&&st.key===null&&(st=st.props.children),typeof st=="object"&&st!==null){switch(st.$$typeof){case O:e:{for(var Mr=st.key;He!==null;){if(He.key===Mr){if(Mr=st.type,Mr===A){if(He.tag===7){m(Xe,He.sibling),Tt=T(He,st.props.children),Tt.return=Xe,Xe=Tt;break e}}else if(He.elementType===Mr||typeof Mr=="object"&&Mr!==null&&Mr.$$typeof===le&&uc(Mr)===He.type){m(Xe,He.sibling),Tt=T(He,st.props),g0(Tt,st),Tt.return=Xe,Xe=Tt;break e}m(Xe,He);break}else l(Xe,He);He=He.sibling}st.type===A?(Tt=Po(st.props.children,Xe.mode,Tt,st.key),Tt.return=Xe,Xe=Tt):(Tt=ic(st.type,st.key,st.props,null,Xe.mode,Tt),g0(Tt,st),Tt.return=Xe,Xe=Tt)}return q(Xe);case D:e:{for(Mr=st.key;He!==null;){if(He.key===Mr)if(He.tag===4&&He.stateNode.containerInfo===st.containerInfo&&He.stateNode.implementation===st.implementation){m(Xe,He.sibling),Tt=T(He,st.children||[]),Tt.return=Xe,Xe=Tt;break e}else{m(Xe,He);break}else l(Xe,He);He=He.sibling}Tt=c0(st,Xe.mode,Tt),Tt.return=Xe,Xe=Tt}return q(Xe);case le:return st=uc(st),Pa(Xe,He,st,Tt)}if(ae(st))return br(Xe,He,st,Tt);if(se(st)){if(Mr=se(st),typeof Mr!="function")throw Error(n(150));return st=Mr.call(st),Pr(Xe,He,st,Tt)}if(typeof st.then=="function")return Pa(Xe,He,qu(st),Tt);if(st.$$typeof===B)return Pa(Xe,He,$u(Xe,st),Tt);Ku(Xe,st)}return typeof st=="string"&&st!==""||typeof st=="number"||typeof st=="bigint"?(st=""+st,He!==null&&He.tag===6?(m(Xe,He.sibling),Tt=T(He,st),Tt.return=Xe,Xe=Tt):(m(Xe,He),Tt=Xc(st,Xe.mode,Tt),Tt.return=Xe,Xe=Tt),q(Xe)):m(Xe,He)}return function(Xe,He,st,Tt){try{m0=0;var Mr=Pa(Xe,He,st,Tt);return Qc=null,Mr}catch(_r){if(_r===Jc||_r===Yu)throw _r;var ya=gs(29,_r,null,Xe.mode);return ya.lanes=Tt,ya.return=Xe,ya}finally{}}}var fc=w1(!0),k1=w1(!1),_l=!1;function Dm(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Lm(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function wl(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function kl(s,l,m){var _=s.updateQueue;if(_===null)return null;if(_=_.shared,(ka&2)!==0){var T=_.pending;return T===null?l.next=l:(l.next=T.next,T.next=l),_.pending=l,l=sc(s),bl(s,null,m),l}return uo(s,_,l,m),sc(s)}function x0(s,l,m){if(l=l.updateQueue,l!==null&&(l=l.shared,(m&4194048)!==0)){var _=l.lanes;_&=s.pendingLanes,m|=_,l.lanes=m,Qt(s,m)}}function Im(s,l){var m=s.updateQueue,_=s.alternate;if(_!==null&&(_=_.updateQueue,m===_)){var T=null,M=null;if(m=m.firstBaseUpdate,m!==null){do{var q={lane:m.lane,tag:m.tag,payload:m.payload,callback:null,next:null};M===null?T=M=q:M=M.next=q,m=m.next}while(m!==null);M===null?T=M=l:M=M.next=l}else T=M=l;m={baseState:_.baseState,firstBaseUpdate:T,lastBaseUpdate:M,shared:_.shared,callbacks:_.callbacks},s.updateQueue=m;return}s=m.lastBaseUpdate,s===null?m.firstBaseUpdate=l:s.next=l,m.lastBaseUpdate=l}var Pm=!1;function p0(){if(Pm){var s=Kc;if(s!==null)throw s}}function y0(s,l,m,_){Pm=!1;var T=s.updateQueue;_l=!1;var M=T.firstBaseUpdate,q=T.lastBaseUpdate,pe=T.shared.pending;if(pe!==null){T.shared.pending=null;var Ie=pe,ot=Ie.next;Ie.next=null,q===null?M=ot:q.next=ot,q=Ie;var Et=s.alternate;Et!==null&&(Et=Et.updateQueue,pe=Et.lastBaseUpdate,pe!==q&&(pe===null?Et.firstBaseUpdate=ot:pe.next=ot,Et.lastBaseUpdate=Ie))}if(M!==null){var Mt=T.baseState;q=0,Et=ot=Ie=null,pe=M;do{var dt=pe.lane&-536870913,xt=dt!==pe.lane;if(xt?(sa&dt)===dt:(_&dt)===dt){dt!==0&&dt===qc&&(Pm=!0),Et!==null&&(Et=Et.next={lane:0,tag:pe.tag,payload:pe.payload,callback:null,next:null});e:{var br=s,Pr=pe;dt=l;var Pa=m;switch(Pr.tag){case 1:if(br=Pr.payload,typeof br=="function"){Mt=br.call(Pa,Mt,dt);break e}Mt=br;break e;case 3:br.flags=br.flags&-65537|128;case 0:if(br=Pr.payload,dt=typeof br=="function"?br.call(Pa,Mt,dt):br,dt==null)break e;Mt=N({},Mt,dt);break e;case 2:_l=!0}}dt=pe.callback,dt!==null&&(s.flags|=64,xt&&(s.flags|=8192),xt=T.callbacks,xt===null?T.callbacks=[dt]:xt.push(dt))}else xt={lane:dt,tag:pe.tag,payload:pe.payload,callback:pe.callback,next:null},Et===null?(ot=Et=xt,Ie=Mt):Et=Et.next=xt,q|=dt;if(pe=pe.next,pe===null){if(pe=T.shared.pending,pe===null)break;xt=pe,pe=xt.next,xt.next=null,T.lastBaseUpdate=xt,T.shared.pending=null}}while(!0);Et===null&&(Ie=Mt),T.baseState=Ie,T.firstBaseUpdate=ot,T.lastBaseUpdate=Et,M===null&&(T.shared.lanes=0),jl|=q,s.lanes=q,s.memoizedState=Mt}}function N1(s,l){if(typeof s!="function")throw Error(n(191,s));s.call(l)}function S1(s,l){var m=s.callbacks;if(m!==null)for(s.callbacks=null,s=0;sM?M:8;var q=me.T,pe={};me.T=pe,rg(s,!1,l,m);try{var Ie=T(),ot=me.S;if(ot!==null&&ot(pe,Ie),Ie!==null&&typeof Ie=="object"&&typeof Ie.then=="function"){var Et=$k(Ie,_);_0(s,l,Et,di(s))}else _0(s,l,_,di(s))}catch(Mt){_0(s,l,{then:function(){},status:"rejected",reason:Mt},di())}finally{K.p=M,q!==null&&pe.types!==null&&(q.types=pe.types),me.T=q}}function Jk(){}function eg(s,l,m,_){if(s.tag!==5)throw Error(n(476));var T=ay(s).queue;ry(s,T,l,fe,m===null?Jk:function(){return ny(s),m(_)})}function ay(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:fe,baseState:fe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:fe},next:null};var m={};return l.next={memoizedState:m,baseState:m,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:m},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function ny(s){var l=ay(s);l.next===null&&(l=s.alternate.memoizedState),_0(s,l.next.queue,{},di())}function tg(){return ts(F0)}function sy(){return _n().memoizedState}function iy(){return _n().memoizedState}function Qk(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var m=di();s=wl(m);var _=kl(l,s,m);_!==null&&(Ws(_,l,m),x0(_,l,m)),l={cache:Am()},s.payload=l;return}l=l.return}}function eN(s,l,m){var _=di();m={lane:_,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},oh(s)?ly(l,m):(m=i0(s,l,m,_),m!==null&&(Ws(m,s,_),cy(m,l,_)))}function oy(s,l,m){var _=di();_0(s,l,m,_)}function _0(s,l,m,_){var T={lane:_,revertLane:0,gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null};if(oh(s))ly(l,T);else{var M=s.alternate;if(s.lanes===0&&(M===null||M.lanes===0)&&(M=l.lastRenderedReducer,M!==null))try{var q=l.lastRenderedState,pe=M(q,m);if(T.hasEagerState=!0,T.eagerState=pe,w(pe,q))return uo(s,l,T,0),Va===null&&nc(),!1}catch(Ie){}finally{}if(m=i0(s,l,T,_),m!==null)return Ws(m,s,_),cy(m,l,_),!0}return!1}function rg(s,l,m,_){if(_={lane:2,revertLane:Dg(),gesture:null,action:_,hasEagerState:!1,eagerState:null,next:null},oh(s)){if(l)throw Error(n(479))}else l=i0(s,m,_,2),l!==null&&Ws(l,s,2)}function oh(s){var l=s.alternate;return s===Gr||l!==null&&l===Gr}function ly(s,l){td=eh=!0;var m=s.pending;m===null?l.next=l:(l.next=m.next,m.next=l),s.pending=l}function cy(s,l,m){if((m&4194048)!==0){var _=l.lanes;_&=s.pendingLanes,m|=_,l.lanes=m,Qt(s,m)}}var w0={readContext:ts,use:ah,useCallback:dn,useContext:dn,useEffect:dn,useImperativeHandle:dn,useLayoutEffect:dn,useInsertionEffect:dn,useMemo:dn,useReducer:dn,useRef:dn,useState:dn,useDebugValue:dn,useDeferredValue:dn,useTransition:dn,useSyncExternalStore:dn,useId:dn,useHostTransitionStatus:dn,useFormState:dn,useActionState:dn,useOptimistic:dn,useMemoCache:dn,useCacheRefresh:dn};w0.useEffectEvent=dn;var dy={readContext:ts,use:ah,useCallback:function(s,l){return Es().memoizedState=[s,l===void 0?null:l],s},useContext:ts,useEffect:X1,useImperativeHandle:function(s,l,m){m=m!=null?m.concat([s]):null,sh(4194308,4,K1.bind(null,l,s),m)},useLayoutEffect:function(s,l){return sh(4194308,4,s,l)},useInsertionEffect:function(s,l){sh(4,2,s,l)},useMemo:function(s,l){var m=Es();l=l===void 0?null:l;var _=s();if(mc){At(!0);try{s()}finally{At(!1)}}return m.memoizedState=[_,l],_},useReducer:function(s,l,m){var _=Es();if(m!==void 0){var T=m(l);if(mc){At(!0);try{m(l)}finally{At(!1)}}}else T=l;return _.memoizedState=_.baseState=T,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:T},_.queue=s,s=s.dispatch=eN.bind(null,Gr,s),[_.memoizedState,s]},useRef:function(s){var l=Es();return s={current:s},l.memoizedState=s},useState:function(s){s=Zm(s);var l=s.queue,m=oy.bind(null,Gr,l);return l.dispatch=m,[s.memoizedState,m]},useDebugValue:Jm,useDeferredValue:function(s,l){var m=Es();return Qm(m,s,l)},useTransition:function(){var s=Zm(!1);return s=ry.bind(null,Gr,s.queue,!0,!1),Es().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,m){var _=Gr,T=Es();if(ra){if(m===void 0)throw Error(n(407));m=m()}else{if(m=l(),Va===null)throw Error(n(349));(sa&127)!==0||O1(_,l,m)}T.memoizedState=m;var M={value:m,getSnapshot:l};return T.queue=M,X1(M1.bind(null,_,M,s),[s]),_.flags|=2048,ad(9,{destroy:void 0},R1.bind(null,_,M,m,l),null),m},useId:function(){var s=Es(),l=Va.identifierPrefix;if(ra){var m=lr,_=Rt;m=(_&~(1<<32-lt(_)-1)).toString(32)+m,l="_"+l+"R_"+m,m=th++,0<\/script>",M=M.removeChild(M.firstChild);break;case"select":M=typeof _.is=="string"?q.createElement("select",{is:_.is}):q.createElement("select"),_.multiple?M.multiple=!0:_.size&&(M.size=_.size);break;default:M=typeof _.is=="string"?q.createElement(T,{is:_.is}):q.createElement(T)}}M[we]=l,M[ke]=_;e:for(q=l.child;q!==null;){if(q.tag===5||q.tag===6)M.appendChild(q.stateNode);else if(q.tag!==4&&q.tag!==27&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===l)break e;for(;q.sibling===null;){if(q.return===null||q.return===l)break e;q=q.return}q.sibling.return=q.return,q=q.sibling}l.stateNode=M;e:switch(as(M,T,_),T){case"button":case"input":case"select":case"textarea":_=!!_.autoFocus;break e;case"img":_=!0;break e;default:_=!1}_&&Vo(l)}}return $a(l),xg(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,m),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==_&&Vo(l);else{if(typeof _!="string"&&l.stateNode===null)throw Error(n(166));if(s=ve.current,Gi(l)){if(s=l.stateNode,m=l.memoizedProps,_=null,T=xa,T!==null)switch(T.tag){case 27:case 5:_=T.memoizedProps}s[we]=l,s=!!(s.nodeValue===m||_!==null&&_.suppressHydrationWarning===!0||Tb(s.nodeValue,m)),s||fo(l,!0)}else s=Eh(s).createTextNode(_),s[we]=l,l.stateNode=s}return $a(l),null;case 31:if(m=l.memoizedState,s===null||s.memoizedState!==null){if(_=Gi(l),m!==null){if(s===null){if(!_)throw Error(n(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(n(557));s[we]=l}else Fo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;$a(l),s=!1}else m=u0(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=m),s=!0;if(!s)return l.flags&256?(oi(l),l):(oi(l),null);if((l.flags&128)!==0)throw Error(n(558))}return $a(l),null;case 13:if(_=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(T=Gi(l),_!==null&&_.dehydrated!==null){if(s===null){if(!T)throw Error(n(318));if(T=l.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[we]=l}else Fo(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;$a(l),T=!1}else T=u0(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=T),T=!0;if(!T)return l.flags&256?(oi(l),l):(oi(l),null)}return oi(l),(l.flags&128)!==0?(l.lanes=m,l):(m=_!==null,s=s!==null&&s.memoizedState!==null,m&&(_=l.child,T=null,_.alternate!==null&&_.alternate.memoizedState!==null&&_.alternate.memoizedState.cachePool!==null&&(T=_.alternate.memoizedState.cachePool.pool),M=null,_.memoizedState!==null&&_.memoizedState.cachePool!==null&&(M=_.memoizedState.cachePool.pool),M!==T&&(_.flags|=2048)),m!==s&&m&&(l.child.flags|=8192),hh(l,l.updateQueue),$a(l),null);case 4:return ze(),s===null&&Fg(l.stateNode.containerInfo),$a(l),null;case 10:return Bo(l.type),$a(l),null;case 19:if(G(vn),_=l.memoizedState,_===null)return $a(l),null;if(T=(l.flags&128)!==0,M=_.rendering,M===null)if(T)N0(_,!1);else{if(un!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(M=Qu(s),M!==null){for(l.flags|=128,N0(_,!1),s=M.updateQueue,l.updateQueue=s,hh(l,s),l.subtreeFlags=0,s=m,m=l.child;m!==null;)o0(m,s),m=m.sibling;return ie(vn,vn.current&1|2),ra&&Cr(l,_.treeForkCount),l.child}s=s.sibling}_.tail!==null&&it()>ph&&(l.flags|=128,T=!0,N0(_,!1),l.lanes=4194304)}else{if(!T)if(s=Qu(M),s!==null){if(l.flags|=128,T=!0,s=s.updateQueue,l.updateQueue=s,hh(l,s),N0(_,!0),_.tail===null&&_.tailMode==="hidden"&&!M.alternate&&!ra)return $a(l),null}else 2*it()-_.renderingStartTime>ph&&m!==536870912&&(l.flags|=128,T=!0,N0(_,!1),l.lanes=4194304);_.isBackwards?(M.sibling=l.child,l.child=M):(s=_.last,s!==null?s.sibling=M:l.child=M,_.last=M)}return _.tail!==null?(s=_.tail,_.rendering=s,_.tail=s.sibling,_.renderingStartTime=it(),s.sibling=null,m=vn.current,ie(vn,T?m&1|2:m&1),ra&&Cr(l,_.treeForkCount),s):($a(l),null);case 22:case 23:return oi(l),Bm(),_=l.memoizedState!==null,s!==null?s.memoizedState!==null!==_&&(l.flags|=8192):_&&(l.flags|=8192),_?(m&536870912)!==0&&(l.flags&128)===0&&($a(l),l.subtreeFlags&6&&(l.flags|=8192)):$a(l),m=l.updateQueue,m!==null&&hh(l,m.retryQueue),m=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),_=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(_=l.memoizedState.cachePool.pool),_!==m&&(l.flags|=2048),s!==null&&G(dc),null;case 24:return m=null,s!==null&&(m=s.memoizedState.cache),l.memoizedState.cache!==m&&(l.flags|=2048),Bo(kn),$a(l),null;case 25:return null;case 30:return null}throw Error(n(156,l.tag))}function sN(s,l){switch(cn(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return Bo(kn),ze(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return Ze(l),null;case 31:if(l.memoizedState!==null){if(oi(l),l.alternate===null)throw Error(n(340));Fo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(oi(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(n(340));Fo()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return G(vn),null;case 4:return ze(),null;case 10:return Bo(l.type),null;case 22:case 23:return oi(l),Bm(),s!==null&&G(dc),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return Bo(kn),null;case 25:return null;default:return null}}function Dy(s,l){switch(cn(l),l.tag){case 3:Bo(kn),ze();break;case 26:case 27:case 5:Ze(l);break;case 4:ze();break;case 31:l.memoizedState!==null&&oi(l);break;case 13:oi(l);break;case 19:G(vn);break;case 10:Bo(l.type);break;case 22:case 23:oi(l),Bm(),s!==null&&G(dc);break;case 24:Bo(kn)}}function S0(s,l){try{var m=l.updateQueue,_=m!==null?m.lastEffect:null;if(_!==null){var T=_.next;m=T;do{if((m.tag&s)===s){_=void 0;var M=m.create,q=m.inst;_=M(),q.destroy=_}m=m.next}while(m!==T)}}catch(pe){Ta(l,l.return,pe)}}function Cl(s,l,m){try{var _=l.updateQueue,T=_!==null?_.lastEffect:null;if(T!==null){var M=T.next;_=M;do{if((_.tag&s)===s){var q=_.inst,pe=q.destroy;if(pe!==void 0){q.destroy=void 0,T=l;var Ie=m,ot=pe;try{ot()}catch(Et){Ta(T,Ie,Et)}}}_=_.next}while(_!==M)}}catch(Et){Ta(l,l.return,Et)}}function Ly(s){var l=s.updateQueue;if(l!==null){var m=s.stateNode;try{S1(l,m)}catch(_){Ta(s,s.return,_)}}}function Iy(s,l,m){m.props=gc(s.type,s.memoizedProps),m.state=s.memoizedState;try{m.componentWillUnmount()}catch(_){Ta(s,l,_)}}function C0(s,l){try{var m=s.ref;if(m!==null){switch(s.tag){case 26:case 27:case 5:var _=s.stateNode;break;case 30:_=s.stateNode;break;default:_=s.stateNode}typeof m=="function"?s.refCleanup=m(_):m.current=_}}catch(T){Ta(s,l,T)}}function go(s,l){var m=s.ref,_=s.refCleanup;if(m!==null)if(typeof _=="function")try{_()}catch(T){Ta(s,l,T)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof m=="function")try{m(null)}catch(T){Ta(s,l,T)}else m.current=null}function Py(s){var l=s.type,m=s.memoizedProps,_=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":m.autoFocus&&_.focus();break e;case"img":m.src?_.src=m.src:m.srcSet&&(_.srcset=m.srcSet)}}catch(T){Ta(s,s.return,T)}}function pg(s,l,m){try{var _=s.stateNode;EN(_,s.type,m,l),_[ke]=l}catch(T){Ta(s,s.return,T)}}function Fy(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Ml(s.type)||s.tag===4}function yg(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Fy(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Ml(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function bg(s,l,m){var _=s.tag;if(_===5||_===6)s=s.stateNode,l?(m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m).insertBefore(s,l):(l=m.nodeType===9?m.body:m.nodeName==="HTML"?m.ownerDocument.body:m,l.appendChild(s),m=m._reactRootContainer,m!=null||l.onclick!==null||(l.onclick=On));else if(_!==4&&(_===27&&Ml(s.type)&&(m=s.stateNode,l=null),s=s.child,s!==null))for(bg(s,l,m),s=s.sibling;s!==null;)bg(s,l,m),s=s.sibling}function fh(s,l,m){var _=s.tag;if(_===5||_===6)s=s.stateNode,l?m.insertBefore(s,l):m.appendChild(s);else if(_!==4&&(_===27&&Ml(s.type)&&(m=s.stateNode),s=s.child,s!==null))for(fh(s,l,m),s=s.sibling;s!==null;)fh(s,l,m),s=s.sibling}function By(s){var l=s.stateNode,m=s.memoizedProps;try{for(var _=s.type,T=l.attributes;T.length;)l.removeAttributeNode(T[0]);as(l,_,m),l[we]=s,l[ke]=m}catch(M){Ta(s,s.return,M)}}var Wo=!1,Cn=!1,vg=!1,Uy=typeof WeakSet=="function"?WeakSet:Set,Vn=null;function iN(s,l){if(s=s.containerInfo,zg=Dh,s=te(s),ue(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var _=m.getSelection&&m.getSelection();if(_&&_.rangeCount!==0){m=_.anchorNode;var T=_.anchorOffset,M=_.focusNode;_=_.focusOffset;try{m.nodeType,M.nodeType}catch(Pr){m=null;break e}var q=0,pe=-1,Ie=-1,ot=0,Et=0,Mt=s,dt=null;t:for(;;){for(var xt;Mt!==m||T!==0&&Mt.nodeType!==3||(pe=q+T),Mt!==M||_!==0&&Mt.nodeType!==3||(Ie=q+_),Mt.nodeType===3&&(q+=Mt.nodeValue.length),(xt=Mt.firstChild)!==null;)dt=Mt,Mt=xt;for(;;){if(Mt===s)break t;if(dt===m&&++ot===T&&(pe=q),dt===M&&++Et===_&&(Ie=q),(xt=Mt.nextSibling)!==null)break;Mt=dt,dt=Mt.parentNode}Mt=xt}m=pe===-1||Ie===-1?null:{start:pe,end:Ie}}else m=null}m=m||{start:0,end:0}}else m=null;for(Hg={focusedElem:s,selectionRange:m},Dh=!1,Vn=l;Vn!==null;)if(l=Vn,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,Vn=s;else for(;Vn!==null;){switch(l=Vn,M=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(m=0;m title"))),as(M,_,m),M[we]=s,fr(M),_=M;break e;case"link":var q=$b("link","href",T).get(_+(m.href||""));if(q){for(var pe=0;pePa&&(q=Pa,Pa=Pr,Pr=q);var Xe=P(pe,Pr),He=P(pe,Pa);if(Xe&&He&&(xt.rangeCount!==1||xt.anchorNode!==Xe.node||xt.anchorOffset!==Xe.offset||xt.focusNode!==He.node||xt.focusOffset!==He.offset)){var st=Mt.createRange();st.setStart(Xe.node,Xe.offset),xt.removeAllRanges(),Pr>Pa?(xt.addRange(st),xt.extend(He.node,He.offset)):(st.setEnd(He.node,He.offset),xt.addRange(st))}}}}for(Mt=[],xt=pe;xt=xt.parentNode;)xt.nodeType===1&&Mt.push({element:xt,left:xt.scrollLeft,top:xt.scrollTop});for(typeof pe.focus=="function"&&pe.focus(),pe=0;pem?32:m,me.T=null,m=Eg,Eg=null;var M=Al,q=Zo;if(Ln=0,ld=Al=null,Zo=0,(ka&6)!==0)throw Error(n(331));var pe=ka;if(ka|=4,Ky(M.current),Yy(M,M.current,q,m),ka=pe,R0(0,!1),We&&typeof We.onPostCommitFiberRoot=="function")try{We.onPostCommitFiberRoot(Ge,M)}catch(Ie){}return!0}finally{K.p=T,me.T=_,gb(s,l)}}function pb(s,l,m){l=v(m,l),l=ig(s.stateNode,l,2),s=kl(s,l,2),s!==null&&(jr(s,2),xo(s))}function Ta(s,l,m){if(s.tag===3)pb(s,s,m);else for(;l!==null;){if(l.tag===3){pb(l,s,m);break}else if(l.tag===1){var _=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(Tl===null||!Tl.has(_))){s=v(m,s),m=yy(2),_=kl(l,m,2),_!==null&&(by(m,_,l,s),jr(_,2),xo(_));break}}l=l.return}}function Og(s,l,m){var _=s.pingCache;if(_===null){_=s.pingCache=new cN;var T=new Set;_.set(l,T)}else T=_.get(l),T===void 0&&(T=new Set,_.set(l,T));T.has(m)||(kg=!0,T.add(m),s=mN.bind(null,s,l,m),l.then(s,s))}function mN(s,l,m){var _=s.pingCache;_!==null&&_.delete(l),s.pingedLanes|=s.suspendedLanes&m,s.warmLanes&=~m,Va===s&&(sa&m)===m&&(un===4||un===3&&(sa&62914560)===sa&&300>it()-xh?(ka&2)===0&&cd(s,0):Ng|=m,od===sa&&(od=0)),xo(s)}function yb(s,l){l===0&&(l=Yt()),s=Ni(s,l),s!==null&&(jr(s,l),xo(s))}function gN(s){var l=s.memoizedState,m=0;l!==null&&(m=l.retryLane),yb(s,m)}function xN(s,l){var m=0;switch(s.tag){case 31:case 13:var _=s.stateNode,T=s.memoizedState;T!==null&&(m=T.retryLane);break;case 19:_=s.stateNode;break;case 22:_=s.stateNode._retryCache;break;default:throw Error(n(314))}_!==null&&_.delete(l),yb(s,m)}function pN(s,l){return Er(s,l)}var kh=null,ud=null,Rg=!1,Nh=!1,Mg=!1,Rl=0;function xo(s){s!==ud&&s.next===null&&(ud===null?kh=ud=s:ud=ud.next=s),Nh=!0,Rg||(Rg=!0,bN())}function R0(s,l){if(!Mg&&Nh){Mg=!0;do for(var m=!1,_=kh;_!==null;){if(s!==0){var T=_.pendingLanes;if(T===0)var M=0;else{var q=_.suspendedLanes,pe=_.pingedLanes;M=(1<<31-lt(42|s)+1)-1,M&=T&~(q&~pe),M=M&201326741?M&201326741|1:M?M|2:0}M!==0&&(m=!0,wb(_,M))}else M=sa,M=Le(_,_===Va?M:0,_.cancelPendingCommit!==null||_.timeoutHandle!==-1),(M&3)===0||qe(_,M)||(m=!0,wb(_,M));_=_.next}while(m);Mg=!1}}function yN(){bb()}function bb(){Nh=Rg=!1;var s=0;Rl!==0&&TN()&&(s=Rl);for(var l=it(),m=null,_=kh;_!==null;){var T=_.next,M=vb(_,l);M===0?(_.next=null,m===null?kh=T:m.next=T,T===null&&(ud=m)):(m=_,(s!==0||(M&3)!==0)&&(Nh=!0)),_=T}Ln!==0&&Ln!==5||R0(s),Rl!==0&&(Rl=0)}function vb(s,l){for(var m=s.suspendedLanes,_=s.pingedLanes,T=s.expirationTimes,M=s.pendingLanes&-62914561;0pe)break;var Et=Ie.transferSize,Mt=Ie.initiatorType;Et&&Ab(Mt)&&(Ie=Ie.responseEnd,q+=Et*(Ie title"):null)}function $N(s,l,m){if(m===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function Yb(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function XN(s,l,m,_){if(m.type==="stylesheet"&&(typeof _.media!="string"||matchMedia(_.media).matches!==!1)&&(m.state.loading&4)===0){if(m.instance===null){var T=fd(_.href),M=l.querySelector(I0(T));if(M){l=M._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=Oh.bind(s),l.then(s,s)),m.state.loading|=4,m.instance=M,fr(M);return}M=l.ownerDocument||l,_=Wb(_),(T=ji.get(T))&&Zg(_,T),M=M.createElement("link"),fr(M);var q=M;q._p=new Promise(function(pe,Ie){q.onload=pe,q.onerror=Ie}),as(M,"link",_),m.instance=M}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(m,l),(l=m.state.preload)&&(m.state.loading&3)===0&&(s.count++,m=Oh.bind(s),l.addEventListener("load",m),l.addEventListener("error",m))}}var Kg=0;function YN(s,l){return s.stylesheets&&s.count===0&&Mh(s,s.stylesheets),0Kg?50:800)+l);return s.unsuspend=m,function(){s.unsuspend=null,clearTimeout(_),clearTimeout(T)}}:null}function Oh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mh(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var Rh=null;function Mh(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,Rh=new Map,l.forEach(ZN,s),Rh=null,Oh.call(s))}function ZN(s,l){if(!(l.state.loading&4)){var m=Rh.get(s);if(m)var _=m.get(null);else{m=new Map,Rh.set(s,m);for(var T=s.querySelectorAll("link[data-precedence],style[data-precedence]"),M=0;Mtypeof e=="string",W0=()=>{let e,r;const a=new Promise((n,i)=>{e=n,r=i});return a.resolve=e,a.reject=r,a},_2=e=>e==null?"":""+e,b6=(e,r,a)=>{e.forEach(n=>{r[n]&&(a[n]=r[n])})},v6=/###/g,w2=e=>e&&e.indexOf("###")>-1?e.replace(v6,"."):e,k2=e=>!e||zr(e),ru=(e,r,a)=>{const n=zr(r)?r.split("."):r;let i=0;for(;i{const{obj:n,k:i}=ru(e,r,Object);if(n!==void 0||r.length===1){n[i]=a;return}let c=r[r.length-1],u=r.slice(0,r.length-1),g=ru(e,u,Object);for(;g.obj===void 0&&u.length;)c=`${u[u.length-1]}.${c}`,u=u.slice(0,u.length-1),g=ru(e,u,Object),g!=null&&g.obj&&typeof g.obj[`${g.k}.${c}`]!="undefined"&&(g.obj=void 0);g.obj[`${g.k}.${c}`]=a},_6=(e,r,a,n)=>{const{obj:i,k:c}=ru(e,r,Object);i[c]=i[c]||[],i[c].push(a)},pf=(e,r)=>{const{obj:a,k:n}=ru(e,r);if(a&&Object.prototype.hasOwnProperty.call(a,n))return a[n]},w6=(e,r,a)=>{const n=pf(e,a);return n!==void 0?n:pf(r,a)},W_=(e,r,a)=>{for(const n in r)n!=="__proto__"&&n!=="constructor"&&(n in e?zr(e[n])||e[n]instanceof String||zr(r[n])||r[n]instanceof String?a&&(e[n]=r[n]):W_(e[n],r[n],a):e[n]=r[n]);return e},pd=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var k6={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const N6=e=>zr(e)?e.replace(/[&<>"'\/]/g,r=>k6[r]):e;class S6{constructor(r){this.capacity=r,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(r){const a=this.regExpMap.get(r);if(a!==void 0)return a;const n=new RegExp(r);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(r,n),this.regExpQueue.push(r),n}}const C6=[" ",",","?","!",";"],E6=new S6(20),j6=(e,r,a)=>{r=r||"",a=a||"";const n=C6.filter(u=>r.indexOf(u)<0&&a.indexOf(u)<0);if(n.length===0)return!0;const i=E6.getRegExp(`(${n.map(u=>u==="?"?"\\?":u).join("|")})`);let c=!i.test(e);if(!c){const u=e.indexOf(a);u>0&&!i.test(e.substring(0,u))&&(c=!0)}return c},Vx=(e,r,a=".")=>{if(!e)return;if(e[r])return Object.prototype.hasOwnProperty.call(e,r)?e[r]:void 0;const n=r.split(a);let i=e;for(let c=0;c-1&&ye==null?void 0:e.replace("_","-"),T6={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,r){var a,n;(n=(a=console==null?void 0:console[e])==null?void 0:a.apply)==null||n.call(a,console,r)}};class yf{constructor(r,a={}){this.init(r,a)}init(r,a={}){this.prefix=a.prefix||"i18next:",this.logger=r||T6,this.options=a,this.debug=a.debug}log(...r){return this.forward(r,"log","",!0)}warn(...r){return this.forward(r,"warn","",!0)}error(...r){return this.forward(r,"error","")}deprecate(...r){return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}forward(r,a,n,i){return i&&!this.debug?null:(zr(r[0])&&(r[0]=`${n}${this.prefix} ${r[0]}`),this.logger[a](r))}create(r){return new yf(this.logger,_e({prefix:`${this.prefix}:${r}:`},this.options))}clone(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new yf(this.logger,r)}}var vo=new yf;class Yf{constructor(){this.observers={}}on(r,a){return r.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(a)||0;this.observers[n].set(a,i+1)}),this}off(r,a){if(this.observers[r]){if(!a){delete this.observers[r];return}this.observers[r].delete(a)}}emit(r,...a){this.observers[r]&&Array.from(this.observers[r].entries()).forEach(([i,c])=>{for(let u=0;u{for(let u=0;u-1&&this.options.ns.splice(a,1)}getResource(r,a,n,i={}){var x,k;const c=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,u=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let g;r.indexOf(".")>-1?g=r.split("."):(g=[r,a],n&&(Array.isArray(n)?g.push(...n):zr(n)&&c?g.push(...n.split(c)):g.push(n)));const y=pf(this.data,g);return!y&&!a&&!n&&r.indexOf(".")>-1&&(r=g[0],a=g[1],n=g.slice(2).join(".")),y||!u||!zr(n)?y:Vx((k=(x=this.data)==null?void 0:x[r])==null?void 0:k[a],n,c)}addResource(r,a,n,i,c={silent:!1}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let g=[r,a];n&&(g=g.concat(u?n.split(u):n)),r.indexOf(".")>-1&&(g=r.split("."),i=a,a=g[1]),this.addNamespaces(a),N2(this.data,g,i),c.silent||this.emit("added",r,a,n,i)}addResources(r,a,n,i={silent:!1}){for(const c in n)(zr(n[c])||Array.isArray(n[c]))&&this.addResource(r,a,c,n[c],{silent:!0});i.silent||this.emit("added",r,a,n)}addResourceBundle(r,a,n,i,c,u={silent:!1,skipCopy:!1}){let g=[r,a];r.indexOf(".")>-1&&(g=r.split("."),i=n,n=a,a=g[1]),this.addNamespaces(a);let y=pf(this.data,g)||{};u.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?W_(y,n,c):y=_e(_e({},y),n),N2(this.data,g,y),u.silent||this.emit("added",r,a,n)}removeResourceBundle(r,a){this.hasResourceBundle(r,a)&&delete this.data[r][a],this.removeNamespaces(a),this.emit("removed",r,a)}hasResourceBundle(r,a){return this.getResource(r,a)!==void 0}getResourceBundle(r,a){return a||(a=this.options.defaultNS),this.getResource(r,a)}getDataByLanguage(r){return this.data[r]}hasLanguageSomeTranslations(r){const a=this.getDataByLanguage(r);return!!(a&&Object.keys(a)||[]).find(i=>a[i]&&Object.keys(a[i]).length>0)}toJSON(){return this.data}}var G_={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,r,a,n,i){return e.forEach(c=>{var u,g;r=(g=(u=this.processors[c])==null?void 0:u.process(r,a,n,i))!=null?g:r}),r}};const $_=Symbol("i18next/PATH_KEY");function A6(){const e=[],r=Object.create(null);let a;return r.get=(n,i)=>{var c;return(c=a==null?void 0:a.revoke)==null||c.call(a),i===$_?e:(e.push(i),a=Proxy.revocable(n,r),a.proxy)},Proxy.revocable(Object.create(null),r).proxy}function Wx(e,r){var n;const{[$_]:a}=e(A6());return a.join((n=r==null?void 0:r.keySeparator)!=null?n:".")}const C2={},fx=e=>!zr(e)&&typeof e!="boolean"&&typeof e!="number";class bf extends Yf{constructor(r,a={}){super(),b6(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,this),this.options=a,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=vo.create("translator")}changeLanguage(r){r&&(this.language=r)}exists(r,a={interpolation:{}}){const n=_e({},a);if(r==null)return!1;const i=this.resolve(r,n);if((i==null?void 0:i.res)===void 0)return!1;const c=fx(i.res);return!(n.returnObjects===!1&&c)}extractFromKey(r,a){let n=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=a.ns||this.options.defaultNS||[];const u=n&&r.indexOf(n)>-1,g=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!j6(r,n,i);if(u&&!g){const y=r.match(this.interpolator.nestingRegexp);if(y&&y.length>0)return{key:r,namespaces:zr(c)?[c]:c};const x=r.split(n);(n!==i||n===i&&this.options.ns.indexOf(x[0])>-1)&&(c=x.shift()),r=x.join(i)}return{key:r,namespaces:zr(c)?[c]:c}}translate(r,a,n){let i=typeof a=="object"?_e({},a):a;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i=_e({},i)),i||(i={}),r==null)return"";typeof r=="function"&&(r=Wx(r,_e(_e({},this.options),i))),Array.isArray(r)||(r=[String(r)]);const c=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:g,namespaces:y}=this.extractFromKey(r[r.length-1],i),x=y[y.length-1];let k=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;k===void 0&&(k=":");const N=i.lng||this.language,C=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((N==null?void 0:N.toLowerCase())==="cimode")return C?c?{res:`${x}${k}${g}`,usedKey:g,exactUsedKey:g,usedLng:N,usedNS:x,usedParams:this.getUsedParamsDetails(i)}:`${x}${k}${g}`:c?{res:g,usedKey:g,exactUsedKey:g,usedLng:N,usedNS:x,usedParams:this.getUsedParamsDetails(i)}:g;const O=this.resolve(r,i);let D=O==null?void 0:O.res;const A=(O==null?void 0:O.usedKey)||g,I=(O==null?void 0:O.exactUsedKey)||g,z=["[object Number]","[object Function]","[object RegExp]"],U=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,B=!this.i18nFormat||this.i18nFormat.handleAsObject,V=i.count!==void 0&&!zr(i.count),Z=bf.hasDefaultValue(i),W=V?this.pluralResolver.getSuffix(N,i.count,i):"",H=i.ordinal&&V?this.pluralResolver.getSuffix(N,i.count,{ordinal:!1}):"",le=V&&!i.ordinal&&i.count===0,Q=le&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${W}`]||i[`defaultValue${H}`]||i.defaultValue;let Ne=D;B&&!D&&Z&&(Ne=Q);const oe=fx(Ne),se=Object.prototype.toString.apply(Ne);if(B&&Ne&&oe&&z.indexOf(se)<0&&!(zr(U)&&Array.isArray(Ne))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ce=this.options.returnedObjectHandler?this.options.returnedObjectHandler(A,Ne,$e(_e({},i),{ns:y})):`key '${g} (${this.language})' returned an object instead of string.`;return c?(O.res=ce,O.usedParams=this.getUsedParamsDetails(i),O):ce}if(u){const ce=Array.isArray(Ne),Ce=ce?[]:{},ae=ce?I:A;for(const me in Ne)if(Object.prototype.hasOwnProperty.call(Ne,me)){const K=`${ae}${u}${me}`;Z&&!D?Ce[me]=this.translate(K,$e(_e({},i),{defaultValue:fx(Q)?Q[me]:void 0,joinArrays:!1,ns:y})):Ce[me]=this.translate(K,$e(_e({},i),{joinArrays:!1,ns:y})),Ce[me]===K&&(Ce[me]=Ne[me])}D=Ce}}else if(B&&zr(U)&&Array.isArray(D))D=D.join(U),D&&(D=this.extendTranslation(D,r,i,n));else{let ce=!1,Ce=!1;!this.isValidLookup(D)&&Z&&(ce=!0,D=Q),this.isValidLookup(D)||(Ce=!0,D=g);const me=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Ce?void 0:D,K=Z&&Q!==D&&this.options.updateMissing;if(Ce||ce||K){if(this.logger.log(K?"updateKey":"missingKey",N,x,g,K?Q:D),u){const J=this.resolve(g,$e(_e({},i),{keySeparator:!1}));J&&J.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 fe=[];const Oe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Oe&&Oe[0])for(let J=0;J{var ne;const re=Z&&ie!==D?ie:me;this.options.missingKeyHandler?this.options.missingKeyHandler(J,x,G,re,K,i):(ne=this.backendConnector)!=null&&ne.saveMissing&&this.backendConnector.saveMissing(J,x,G,re,K,i),this.emit("missingKey",J,x,G,D)};this.options.saveMissing&&(this.options.saveMissingPlurals&&V?fe.forEach(J=>{const G=this.pluralResolver.getSuffixes(J,i);le&&i[`defaultValue${this.options.pluralSeparator}zero`]&&G.indexOf(`${this.options.pluralSeparator}zero`)<0&&G.push(`${this.options.pluralSeparator}zero`),G.forEach(ie=>{ye([J],g+ie,i[`defaultValue${ie}`]||Q)})}):ye(fe,g,Q))}D=this.extendTranslation(D,r,i,O,n),Ce&&D===g&&this.options.appendNamespaceToMissingKey&&(D=`${x}${k}${g}`),(Ce||ce)&&this.options.parseMissingKeyHandler&&(D=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${x}${k}${g}`:g,ce?D:void 0,i))}return c?(O.res=D,O.usedParams=this.getUsedParamsDetails(i),O):D}extendTranslation(r,a,n,i,c){var y,x;if((y=this.i18nFormat)!=null&&y.parse)r=this.i18nFormat.parse(r,_e(_e({},this.options.interpolation.defaultVariables),n),n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init($e(_e({},n),{interpolation:_e(_e({},this.options.interpolation),n.interpolation)}));const k=zr(r)&&(((x=n==null?void 0:n.interpolation)==null?void 0:x.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let N;if(k){const O=r.match(this.interpolator.nestingRegexp);N=O&&O.length}let C=n.replace&&!zr(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(C=_e(_e({},this.options.interpolation.defaultVariables),C)),r=this.interpolator.interpolate(r,C,n.lng||this.language||i.usedLng,n),k){const O=r.match(this.interpolator.nestingRegexp),D=O&&O.length;N(c==null?void 0:c[0])===O[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${a[0]}`),null):this.translate(...O,a),n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,g=zr(u)?[u]:u;return r!=null&&(g!=null&&g.length)&&n.applyPostProcessor!==!1&&(r=G_.handle(g,r,a,this.options&&this.options.postProcessPassResolved?_e({i18nResolved:$e(_e({},i),{usedParams:this.getUsedParamsDetails(n)})},n):n,this)),r}resolve(r,a={}){let n,i,c,u,g;return zr(r)&&(r=[r]),r.forEach(y=>{if(this.isValidLookup(n))return;const x=this.extractFromKey(y,a),k=x.key;i=k;let N=x.namespaces;this.options.fallbackNS&&(N=N.concat(this.options.fallbackNS));const C=a.count!==void 0&&!zr(a.count),O=C&&!a.ordinal&&a.count===0,D=a.context!==void 0&&(zr(a.context)||typeof a.context=="number")&&a.context!=="",A=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);N.forEach(I=>{var z,U;this.isValidLookup(n)||(g=I,!C2[`${A[0]}-${I}`]&&((z=this.utils)!=null&&z.hasLoadedNamespace)&&!((U=this.utils)!=null&&U.hasLoadedNamespace(g))&&(C2[`${A[0]}-${I}`]=!0,this.logger.warn(`key "${i}" for languages "${A.join(", ")}" won't get resolved as namespace "${g}" 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!!!")),A.forEach(B=>{var W;if(this.isValidLookup(n))return;u=B;const V=[k];if((W=this.i18nFormat)!=null&&W.addLookupKeys)this.i18nFormat.addLookupKeys(V,k,B,I,a);else{let H;C&&(H=this.pluralResolver.getSuffix(B,a.count,a));const le=`${this.options.pluralSeparator}zero`,Q=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(a.ordinal&&H.indexOf(Q)===0&&V.push(k+H.replace(Q,this.options.pluralSeparator)),V.push(k+H),O&&V.push(k+le)),D){const Ne=`${k}${this.options.contextSeparator||"_"}${a.context}`;V.push(Ne),C&&(a.ordinal&&H.indexOf(Q)===0&&V.push(Ne+H.replace(Q,this.options.pluralSeparator)),V.push(Ne+H),O&&V.push(Ne+le))}}let Z;for(;Z=V.pop();)this.isValidLookup(n)||(c=Z,n=this.getResource(B,I,Z,a))}))})}),{res:n,usedKey:i,exactUsedKey:c,usedLng:u,usedNS:g}}isValidLookup(r){return r!==void 0&&!(!this.options.returnNull&&r===null)&&!(!this.options.returnEmptyString&&r==="")}getResource(r,a,n,i={}){var c;return(c=this.i18nFormat)!=null&&c.getResource?this.i18nFormat.getResource(r,a,n,i):this.resourceStore.getResource(r,a,n,i)}getUsedParamsDetails(r={}){const a=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=r.replace&&!zr(r.replace);let i=n?r.replace:r;if(n&&typeof r.count!="undefined"&&(i.count=r.count),this.options.interpolation.defaultVariables&&(i=_e(_e({},this.options.interpolation.defaultVariables),i)),!n){i=_e({},i);for(const c of a)delete i[c]}return i}static hasDefaultValue(r){const a="defaultValue";for(const n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&a===n.substring(0,a.length)&&r[n]!==void 0)return!0;return!1}}class E2{constructor(r){this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=vo.create("languageUtils")}getScriptPartFromCode(r){if(r=uu(r),!r||r.indexOf("-")<0)return null;const a=r.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}getLanguagePartFromCode(r){if(r=uu(r),!r||r.indexOf("-")<0)return r;const a=r.split("-");return this.formatLanguageCode(a[0])}formatLanguageCode(r){if(zr(r)&&r.indexOf("-")>-1){let a;try{a=Intl.getCanonicalLocales(r)[0]}catch(n){}return a&&this.options.lowerCaseLng&&(a=a.toLowerCase()),a||(this.options.lowerCaseLng?r.toLowerCase():r)}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}isSupportedCode(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}getBestMatchFromCodes(r){if(!r)return null;let a;return r.forEach(n=>{if(a)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(a=i)}),!a&&this.options.supportedLngs&&r.forEach(n=>{if(a)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return a=i;const c=this.getLanguagePartFromCode(n);if(this.isSupportedCode(c))return a=c;a=this.options.supportedLngs.find(u=>{if(u===c)return u;if(!(u.indexOf("-")<0&&c.indexOf("-")<0)&&(u.indexOf("-")>0&&c.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===c||u.indexOf(c)===0&&c.length>1))return u})}),a||(a=this.getFallbackCodes(this.options.fallbackLng)[0]),a}getFallbackCodes(r,a){if(!r)return[];if(typeof r=="function"&&(r=r(a)),zr(r)&&(r=[r]),Array.isArray(r))return r;if(!a)return r.default||[];let n=r[a];return n||(n=r[this.getScriptPartFromCode(a)]),n||(n=r[this.formatLanguageCode(a)]),n||(n=r[this.getLanguagePartFromCode(a)]),n||(n=r.default),n||[]}toResolveHierarchy(r,a){const n=this.getFallbackCodes((a===!1?[]:a)||this.options.fallbackLng||[],r),i=[],c=u=>{u&&(this.isSupportedCode(u)?i.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return zr(r)&&(r.indexOf("-")>-1||r.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&c(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&c(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&c(this.getLanguagePartFromCode(r))):zr(r)&&c(this.formatLanguageCode(r)),n.forEach(u=>{i.indexOf(u)<0&&c(this.formatLanguageCode(u))}),i}}const j2={zero:0,one:1,two:2,few:3,many:4,other:5},T2={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class O6{constructor(r,a={}){this.languageUtils=r,this.options=a,this.logger=vo.create("pluralResolver"),this.pluralRulesCache={}}addRule(r,a){this.rules[r]=a}clearCache(){this.pluralRulesCache={}}getRule(r,a={}){const n=uu(r==="dev"?"en":r),i=a.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:n,type:i});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let u;try{u=new Intl.PluralRules(n,{type:i})}catch(g){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),T2;if(!r.match(/-|_/))return T2;const y=this.languageUtils.getLanguagePartFromCode(r);u=this.getRule(y,a)}return this.pluralRulesCache[c]=u,u}needsPlural(r,a={}){let n=this.getRule(r,a);return n||(n=this.getRule("dev",a)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(r,a,n={}){return this.getSuffixes(r,n).map(i=>`${a}${i}`)}getSuffixes(r,a={}){let n=this.getRule(r,a);return n||(n=this.getRule("dev",a)),n?n.resolvedOptions().pluralCategories.sort((i,c)=>j2[i]-j2[c]).map(i=>`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(r,a,n={}){const i=this.getRule(r,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(a)}`:(this.logger.warn(`no plural rule found for: ${r}`),this.getSuffix("dev",a,n))}}const A2=(e,r,a,n=".",i=!0)=>{let c=w6(e,r,a);return!c&&i&&zr(a)&&(c=Vx(e,a,n),c===void 0&&(c=Vx(r,a,n))),c},mx=e=>e.replace(/\$/g,"$$$$");class O2{constructor(r={}){var a;this.logger=vo.create("interpolator"),this.options=r,this.format=((a=r==null?void 0:r.interpolation)==null?void 0:a.format)||(n=>n),this.init(r)}init(r={}){r.interpolation||(r.interpolation={escapeValue:!0});const{escape:a,escapeValue:n,useRawValueToEscape:i,prefix:c,prefixEscaped:u,suffix:g,suffixEscaped:y,formatSeparator:x,unescapeSuffix:k,unescapePrefix:N,nestingPrefix:C,nestingPrefixEscaped:O,nestingSuffix:D,nestingSuffixEscaped:A,nestingOptionsSeparator:I,maxReplaces:z,alwaysFormat:U}=r.interpolation;this.escape=a!==void 0?a:N6,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=c?pd(c):u||"{{",this.suffix=g?pd(g):y||"}}",this.formatSeparator=x||",",this.unescapePrefix=k?"":N||"-",this.unescapeSuffix=this.unescapePrefix?"":k||"",this.nestingPrefix=C?pd(C):O||pd("$t("),this.nestingSuffix=D?pd(D):A||pd(")"),this.nestingOptionsSeparator=I||",",this.maxReplaces=z||1e3,this.alwaysFormat=U!==void 0?U:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const r=(a,n)=>(a==null?void 0:a.source)===n?(a.lastIndex=0,a):new RegExp(n,"g");this.regexp=r(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=r(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=r(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(r,a,n,i){var O;let c,u,g;const y=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},x=D=>{if(D.indexOf(this.formatSeparator)<0){const U=A2(a,y,D,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(U,void 0,n,$e(_e(_e({},i),a),{interpolationkey:D})):U}const A=D.split(this.formatSeparator),I=A.shift().trim(),z=A.join(this.formatSeparator).trim();return this.format(A2(a,y,I,this.options.keySeparator,this.options.ignoreJSONStructure),z,n,$e(_e(_e({},i),a),{interpolationkey:I}))};this.resetRegExp();const k=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,N=((O=i==null?void 0:i.interpolation)==null?void 0:O.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:D=>mx(D)},{regex:this.regexp,safeValue:D=>this.escapeValue?mx(this.escape(D)):mx(D)}].forEach(D=>{for(g=0;c=D.regex.exec(r);){const A=c[1].trim();if(u=x(A),u===void 0)if(typeof k=="function"){const z=k(r,c,i);u=zr(z)?z:""}else if(i&&Object.prototype.hasOwnProperty.call(i,A))u="";else if(N){u=c[0];continue}else this.logger.warn(`missed to pass in variable ${A} for interpolating ${r}`),u="";else!zr(u)&&!this.useRawValueToEscape&&(u=_2(u));const I=D.safeValue(u);if(r=r.replace(c[0],I),N?(D.regex.lastIndex+=u.length,D.regex.lastIndex-=c[0].length):D.regex.lastIndex=0,g++,g>=this.maxReplaces)break}}),r}nest(r,a,n={}){let i,c,u;const g=(y,x)=>{var A;const k=this.nestingOptionsSeparator;if(y.indexOf(k)<0)return y;const N=y.split(new RegExp(`${k}[ ]*{`));let C=`{${N[1]}`;y=N[0],C=this.interpolate(C,u);const O=C.match(/'/g),D=C.match(/"/g);(((A=O==null?void 0:O.length)!=null?A:0)%2===0&&!D||D.length%2!==0)&&(C=C.replace(/'/g,'"'));try{u=JSON.parse(C),x&&(u=_e(_e({},x),u))}catch(I){return this.logger.warn(`failed parsing options string in nesting for key ${y}`,I),`${y}${k}${C}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,y};for(;i=this.nestingRegexp.exec(r);){let y=[];u=_e({},n),u=u.replace&&!zr(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const x=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(x!==-1&&(y=i[1].slice(x).split(this.formatSeparator).map(k=>k.trim()).filter(Boolean),i[1]=i[1].slice(0,x)),c=a(g.call(this,i[1].trim(),u),u),c&&i[0]===r&&!zr(c))return c;zr(c)||(c=_2(c)),c||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${r}`),c=""),y.length&&(c=y.reduce((k,N)=>this.format(k,N,n.lng,$e(_e({},n),{interpolationkey:i[1].trim()})),c.trim())),r=r.replace(i[0],c),this.regexp.lastIndex=0}return r}}const R6=e=>{let r=e.toLowerCase().trim();const a={};if(e.indexOf("(")>-1){const n=e.split("(");r=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);r==="currency"&&i.indexOf(":")<0?a.currency||(a.currency=i.trim()):r==="relativetime"&&i.indexOf(":")<0?a.range||(a.range=i.trim()):i.split(";").forEach(u=>{if(u){const[g,...y]=u.split(":"),x=y.join(":").trim().replace(/^'+|'+$/g,""),k=g.trim();a[k]||(a[k]=x),x==="false"&&(a[k]=!1),x==="true"&&(a[k]=!0),isNaN(x)||(a[k]=parseInt(x,10))}})}return{formatName:r,formatOptions:a}},R2=e=>{const r={};return(a,n,i)=>{let c=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(c=$e(_e({},c),{[i.interpolationkey]:void 0}));const u=n+JSON.stringify(c);let g=r[u];return g||(g=e(uu(n),i),r[u]=g),g(a)}},M6=e=>(r,a,n)=>e(uu(a),n)(r);class D6{constructor(r={}){this.logger=vo.create("formatter"),this.options=r,this.init(r)}init(r,a={interpolation:{}}){this.formatSeparator=a.interpolation.formatSeparator||",";const n=a.cacheInBuiltFormats?R2:M6;this.formats={number:n((i,c)=>{const u=new Intl.NumberFormat(i,_e({},c));return g=>u.format(g)}),currency:n((i,c)=>{const u=new Intl.NumberFormat(i,$e(_e({},c),{style:"currency"}));return g=>u.format(g)}),datetime:n((i,c)=>{const u=new Intl.DateTimeFormat(i,_e({},c));return g=>u.format(g)}),relativetime:n((i,c)=>{const u=new Intl.RelativeTimeFormat(i,_e({},c));return g=>u.format(g,c.range||"day")}),list:n((i,c)=>{const u=new Intl.ListFormat(i,_e({},c));return g=>u.format(g)})}}add(r,a){this.formats[r.toLowerCase().trim()]=a}addCached(r,a){this.formats[r.toLowerCase().trim()]=R2(a)}format(r,a,n,i={}){const c=a.split(this.formatSeparator);if(c.length>1&&c[0].indexOf("(")>1&&c[0].indexOf(")")<0&&c.find(g=>g.indexOf(")")>-1)){const g=c.findIndex(y=>y.indexOf(")")>-1);c[0]=[c[0],...c.splice(1,g)].join(this.formatSeparator)}return c.reduce((g,y)=>{var N;const{formatName:x,formatOptions:k}=R6(y);if(this.formats[x]){let C=g;try{const O=((N=i==null?void 0:i.formatParams)==null?void 0:N[i.interpolationkey])||{},D=O.locale||O.lng||i.locale||i.lng||n;C=this.formats[x](g,D,_e(_e(_e({},k),i),O))}catch(O){this.logger.warn(O)}return C}else this.logger.warn(`there was no format function for ${x}`);return g},r)}}const L6=(e,r)=>{e.pending[r]!==void 0&&(delete e.pending[r],e.pendingCount--)};class I6 extends Yf{constructor(r,a,n,i={}){var c,u;super(),this.backend=r,this.store=a,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=vo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(u=(c=this.backend)==null?void 0:c.init)==null||u.call(c,n,i.backend,i)}queueLoad(r,a,n,i){const c={},u={},g={},y={};return r.forEach(x=>{let k=!0;a.forEach(N=>{const C=`${x}|${N}`;!n.reload&&this.store.hasResourceBundle(x,N)?this.state[C]=2:this.state[C]<0||(this.state[C]===1?u[C]===void 0&&(u[C]=!0):(this.state[C]=1,k=!1,u[C]===void 0&&(u[C]=!0),c[C]===void 0&&(c[C]=!0),y[N]===void 0&&(y[N]=!0)))}),k||(g[x]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(g),toLoadNamespaces:Object.keys(y)}}loaded(r,a,n){const i=r.split("|"),c=i[0],u=i[1];a&&this.emit("failedLoading",c,u,a),!a&&n&&this.store.addResourceBundle(c,u,n,void 0,void 0,{skipCopy:!0}),this.state[r]=a?-1:2,a&&n&&(this.state[r]=0);const g={};this.queue.forEach(y=>{_6(y.loaded,[c],u),L6(y,r),a&&y.errors.push(a),y.pendingCount===0&&!y.done&&(Object.keys(y.loaded).forEach(x=>{g[x]||(g[x]={});const k=y.loaded[x];k.length&&k.forEach(N=>{g[x][N]===void 0&&(g[x][N]=!0)})}),y.done=!0,y.errors.length?y.callback(y.errors):y.callback())}),this.emit("loaded",g),this.queue=this.queue.filter(y=>!y.done)}read(r,a,n,i=0,c=this.retryTimeout,u){if(!r.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:r,ns:a,fcName:n,tried:i,wait:c,callback:u});return}this.readingCalls++;const g=(x,k)=>{if(this.readingCalls--,this.waitingReads.length>0){const N=this.waitingReads.shift();this.read(N.lng,N.ns,N.fcName,N.tried,N.wait,N.callback)}if(x&&k&&i{this.read.call(this,r,a,n,i+1,c*2,u)},c);return}u(x,k)},y=this.backend[n].bind(this.backend);if(y.length===2){try{const x=y(r,a);x&&typeof x.then=="function"?x.then(k=>g(null,k)).catch(g):g(null,x)}catch(x){g(x)}return}return y(r,a,g)}prepareLoading(r,a,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();zr(r)&&(r=this.languageUtils.toResolveHierarchy(r)),zr(a)&&(a=[a]);const c=this.queueLoad(r,a,n,i);if(!c.toLoad.length)return c.pending.length||i(),null;c.toLoad.forEach(u=>{this.loadOne(u)})}load(r,a,n){this.prepareLoading(r,a,{},n)}reload(r,a,n){this.prepareLoading(r,a,{reload:!0},n)}loadOne(r,a=""){const n=r.split("|"),i=n[0],c=n[1];this.read(i,c,"read",void 0,void 0,(u,g)=>{u&&this.logger.warn(`${a}loading namespace ${c} for language ${i} failed`,u),!u&&g&&this.logger.log(`${a}loaded namespace ${c} for language ${i}`,g),this.loaded(r,u,g)})}saveMissing(r,a,n,i,c,u={},g=()=>{}){var y,x,k,N,C;if((x=(y=this.services)==null?void 0:y.utils)!=null&&x.hasLoadedNamespace&&!((N=(k=this.services)==null?void 0:k.utils)!=null&&N.hasLoadedNamespace(a))){this.logger.warn(`did not save key "${n}" as the namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((C=this.backend)!=null&&C.create){const O=$e(_e({},u),{isUpdate:c}),D=this.backend.create.bind(this.backend);if(D.length<6)try{let A;D.length===5?A=D(r,a,n,i,O):A=D(r,a,n,i),A&&typeof A.then=="function"?A.then(I=>g(null,I)).catch(g):g(null,A)}catch(A){g(A)}else D(r,a,n,i,g,O)}!r||!r[0]||this.store.addResource(r[0],a,n,i)}}}const M2=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let r={};if(typeof e[1]=="object"&&(r=e[1]),zr(e[1])&&(r.defaultValue=e[1]),zr(e[2])&&(r.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const a=e[3]||e[2];Object.keys(a).forEach(n=>{r[n]=a[n]})}return r},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),D2=e=>{var r,a;return zr(e.ns)&&(e.ns=[e.ns]),zr(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),zr(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((a=(r=e.supportedLngs)==null?void 0:r.indexOf)==null?void 0:a.call(r,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},Vh=()=>{},P6=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(a=>{typeof e[a]=="function"&&(e[a]=e[a].bind(e))})};class au extends Yf{constructor(r={},a){if(super(),this.options=D2(r),this.services={},this.logger=vo,this.modules={external:[]},P6(this),a&&!this.isInitialized&&!r.isClone){if(!this.options.initAsync)return this.init(r,a),this;setTimeout(()=>{this.init(r,a)},0)}}init(r={},a){this.isInitializing=!0,typeof r=="function"&&(a=r,r={}),r.defaultNS==null&&r.ns&&(zr(r.ns)?r.defaultNS=r.ns:r.ns.indexOf("translation")<0&&(r.defaultNS=r.ns[0]));const n=M2();this.options=_e(_e(_e({},n),this.options),D2(r)),this.options.interpolation=_e(_e({},n.interpolation),this.options.interpolation),r.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=r.keySeparator),r.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=r.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=x=>x?typeof x=="function"?new x:x:null;if(!this.options.isClone){this.modules.logger?vo.init(i(this.modules.logger),this.options):vo.init(null,this.options);let x;this.modules.formatter?x=this.modules.formatter:x=D6;const k=new E2(this.options);this.store=new S2(this.options.resources,this.options);const N=this.services;N.logger=vo,N.resourceStore=this.store,N.languageUtils=k,N.pluralResolver=new O6(k,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),x&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(N.formatter=i(x),N.formatter.init&&N.formatter.init(N,this.options),this.options.interpolation.format=N.formatter.format.bind(N.formatter)),N.interpolator=new O2(this.options),N.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},N.backendConnector=new I6(i(this.modules.backend),N.resourceStore,N,this.options),N.backendConnector.on("*",(O,...D)=>{this.emit(O,...D)}),this.modules.languageDetector&&(N.languageDetector=i(this.modules.languageDetector),N.languageDetector.init&&N.languageDetector.init(N,this.options.detection,this.options)),this.modules.i18nFormat&&(N.i18nFormat=i(this.modules.i18nFormat),N.i18nFormat.init&&N.i18nFormat.init(this)),this.translator=new bf(this.services,this.options),this.translator.on("*",(O,...D)=>{this.emit(O,...D)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,a||(a=Vh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const x=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);x.length>0&&x[0]!=="dev"&&(this.options.lng=x[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(x=>{this[x]=(...k)=>this.store[x](...k)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(x=>{this[x]=(...k)=>(this.store[x](...k),this)});const g=W0(),y=()=>{const x=(k,N)=>{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),g.resolve(N),a(k,N)};if(this.languages&&!this.isInitialized)return x(null,this.t.bind(this));this.changeLanguage(this.options.lng,x)};return this.options.resources||!this.options.initAsync?y():setTimeout(y,0),g}loadResources(r,a=Vh){var c,u;let n=a;const i=zr(r)?r:this.language;if(typeof r=="function"&&(n=r),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const g=[],y=x=>{if(!x||x==="cimode")return;this.services.languageUtils.toResolveHierarchy(x).forEach(N=>{N!=="cimode"&&g.indexOf(N)<0&&g.push(N)})};i?y(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(k=>y(k)),(u=(c=this.options.preload)==null?void 0:c.forEach)==null||u.call(c,x=>y(x)),this.services.backendConnector.load(g,this.options.ns,x=>{!x&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(x)})}else n(null)}reloadResources(r,a,n){const i=W0();return typeof r=="function"&&(n=r,r=void 0),typeof a=="function"&&(n=a,a=void 0),r||(r=this.languages),a||(a=this.options.ns),n||(n=Vh),this.services.backendConnector.reload(r,a,c=>{i.resolve(),n(c)}),i}use(r){if(!r)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!r.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return r.type==="backend"&&(this.modules.backend=r),(r.type==="logger"||r.log&&r.warn&&r.error)&&(this.modules.logger=r),r.type==="languageDetector"&&(this.modules.languageDetector=r),r.type==="i18nFormat"&&(this.modules.i18nFormat=r),r.type==="postProcessor"&&G_.addPostProcessor(r),r.type==="formatter"&&(this.modules.formatter=r),r.type==="3rdParty"&&this.modules.external.push(r),this}setResolvedLanguage(r){if(!(!r||!this.languages)&&!(["cimode","dev"].indexOf(r)>-1)){for(let a=0;a-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(r)<0&&this.store.hasLanguageSomeTranslations(r)&&(this.resolvedLanguage=r,this.languages.unshift(r))}}changeLanguage(r,a){this.isLanguageChangingTo=r;const n=W0();this.emit("languageChanging",r);const i=g=>{this.language=g,this.languages=this.services.languageUtils.toResolveHierarchy(g),this.resolvedLanguage=void 0,this.setResolvedLanguage(g)},c=(g,y)=>{y?this.isLanguageChangingTo===r&&(i(y),this.translator.changeLanguage(y),this.isLanguageChangingTo=void 0,this.emit("languageChanged",y),this.logger.log("languageChanged",y)):this.isLanguageChangingTo=void 0,n.resolve((...x)=>this.t(...x)),a&&a(g,(...x)=>this.t(...x))},u=g=>{var k,N;!r&&!g&&this.services.languageDetector&&(g=[]);const y=zr(g)?g:g&&g[0],x=this.store.hasLanguageSomeTranslations(y)?y:this.services.languageUtils.getBestMatchFromCodes(zr(g)?[g]:g);x&&(this.language||i(x),this.translator.language||this.translator.changeLanguage(x),(N=(k=this.services.languageDetector)==null?void 0:k.cacheUserLanguage)==null||N.call(k,x)),this.loadResources(x,C=>{c(C,x)})};return!r&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!r&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(r),n}getFixedT(r,a,n){const i=(c,u,...g)=>{let y;typeof u!="object"?y=this.options.overloadTranslationOptionHandler([c,u].concat(g)):y=_e({},u),y.lng=y.lng||i.lng,y.lngs=y.lngs||i.lngs,y.ns=y.ns||i.ns,y.keyPrefix!==""&&(y.keyPrefix=y.keyPrefix||n||i.keyPrefix);const x=this.options.keySeparator||".";let k;return y.keyPrefix&&Array.isArray(c)?k=c.map(N=>(typeof N=="function"&&(N=Wx(N,_e(_e({},this.options),u))),`${y.keyPrefix}${x}${N}`)):(typeof c=="function"&&(c=Wx(c,_e(_e({},this.options),u))),k=y.keyPrefix?`${y.keyPrefix}${x}${c}`:c),this.t(k,y)};return zr(r)?i.lng=r:i.lngs=r,i.ns=a,i.keyPrefix=n,i}t(...r){var a;return(a=this.translator)==null?void 0:a.translate(...r)}exists(...r){var a;return(a=this.translator)==null?void 0:a.exists(...r)}setDefaultNamespace(r){this.options.defaultNS=r}hasLoadedNamespace(r,a={}){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 n=a.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const u=(g,y)=>{const x=this.services.backendConnector.state[`${g}|${y}`];return x===-1||x===0||x===2};if(a.precheck){const g=a.precheck(this,u);if(g!==void 0)return g}return!!(this.hasResourceBundle(n,r)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(n,r)&&(!i||u(c,r)))}loadNamespaces(r,a){const n=W0();return this.options.ns?(zr(r)&&(r=[r]),r.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),a&&a(i)}),n):(a&&a(),Promise.resolve())}loadLanguages(r,a){const n=W0();zr(r)&&(r=[r]);const i=this.options.preload||[],c=r.filter(u=>i.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return c.length?(this.options.preload=i.concat(c),this.loadResources(u=>{n.resolve(),a&&a(u)}),n):(a&&a(),Promise.resolve())}dir(r){var i,c;if(r||(r=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!r)return"rtl";try{const u=new Intl.Locale(r);if(u&&u.getTextInfo){const g=u.getTextInfo();if(g&&g.direction)return g.direction}}catch(u){}const a=["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"],n=((c=this.services)==null?void 0:c.languageUtils)||new E2(M2());return r.toLowerCase().indexOf("-latn")>1?"ltr":a.indexOf(n.getLanguagePartFromCode(r))>-1||r.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(r={},a){const n=new au(r,a);return n.createInstance=au.createInstance,n}cloneInstance(r={},a=Vh){const n=r.forkResourceStore;n&&delete r.forkResourceStore;const i=$e(_e(_e({},this.options),r),{isClone:!0}),c=new au(i);if((r.debug!==void 0||r.prefix!==void 0)&&(c.logger=c.logger.clone(r)),["store","services","language"].forEach(g=>{c[g]=this[g]}),c.services=_e({},this.services),c.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},n){const g=Object.keys(this.store.data).reduce((y,x)=>(y[x]=_e({},this.store.data[x]),y[x]=Object.keys(y[x]).reduce((k,N)=>(k[N]=_e({},y[x][N]),k),y[x]),y),{});c.store=new S2(g,i),c.services.resourceStore=c.store}return r.interpolation&&(c.services.interpolator=new O2(i)),c.translator=new bf(c.services,i),c.translator.on("*",(g,...y)=>{c.emit(g,...y)}),c.init(i,a),c.translator.options=i,c.translator.backendConnector.services.utils={hasLoadedNamespace:c.hasLoadedNamespace.bind(c)},c}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Xn=au.createInstance();Xn.createInstance;Xn.dir;Xn.init;Xn.loadResources;Xn.reloadResources;Xn.use;Xn.changeLanguage;Xn.getFixedT;Xn.t;Xn.exists;Xn.setDefaultNamespace;Xn.hasLoadedNamespace;Xn.loadNamespaces;Xn.loadLanguages;const F6=(e,r,a,n)=>{var c,u,g,y;const i=[a,_e({code:r},n||{})];if((u=(c=e==null?void 0:e.services)==null?void 0:c.logger)!=null&&u.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);jc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(y=(g=e==null?void 0:e.services)==null?void 0:g.logger)!=null&&y.warn?e.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},L2={},X_=(e,r,a,n)=>{jc(a)&&L2[a]||(jc(a)&&(L2[a]=new Date),F6(e,r,a,n))},Y_=(e,r)=>()=>{if(e.isInitialized)r();else{const a=()=>{setTimeout(()=>{e.off("initialized",a)},0),r()};e.on("initialized",a)}},Gx=(e,r,a)=>{e.loadNamespaces(r,Y_(e,a))},I2=(e,r,a,n)=>{if(jc(a)&&(a=[a]),e.options.preload&&e.options.preload.indexOf(r)>-1)return Gx(e,a,n);a.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(r,Y_(e,n))},B6=(e,r,a={})=>!r.languages||!r.languages.length?(X_(r,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:r.languages}),!0):r.hasLoadedNamespace(e,{lng:a.lng,precheck:(n,i)=>{if(a.bindI18n&&a.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,e))return!1}}),jc=e=>typeof e=="string",U6=e=>typeof e=="object"&&e!==null,z6=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,H6={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},V6=e=>H6[e],W6=e=>e.replace(z6,V6);let $x={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:W6};const G6=(e={})=>{$x=_e(_e({},$x),e)},$6=()=>$x;let Z_;const X6=e=>{Z_=e},Y6=()=>Z_,Z6={type:"3rdParty",init(e){G6(e.options.react),X6(e)}},q6=E.createContext();class K6{constructor(){this.usedNamespaces={}}addUsedNamespaces(r){r.forEach(a=>{this.usedNamespaces[a]||(this.usedNamespaces[a]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var gx={exports:{}},xx={};var P2;function J6(){if(P2)return xx;P2=1;var e=Xf();function r(N,C){return N===C&&(N!==0||1/N===1/C)||N!==N&&C!==C}var a=typeof Object.is=="function"?Object.is:r,n=e.useState,i=e.useEffect,c=e.useLayoutEffect,u=e.useDebugValue;function g(N,C){var O=C(),D=n({inst:{value:O,getSnapshot:C}}),A=D[0].inst,I=D[1];return c(function(){A.value=O,A.getSnapshot=C,y(A)&&I({inst:A})},[N,O,C]),i(function(){return y(A)&&I({inst:A}),N(function(){y(A)&&I({inst:A})})},[N]),u(O),O}function y(N){var C=N.getSnapshot;N=N.value;try{var O=C();return!a(N,O)}catch(D){return!0}}function x(N,C){return C()}var k=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?x:g;return xx.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:k,xx}var F2;function Q6(){return F2||(F2=1,gx.exports=J6()),gx.exports}var eS=Q6();const tS=(e,r)=>jc(r)?r:U6(r)&&jc(r.defaultValue)?r.defaultValue:Array.isArray(e)?e[e.length-1]:e,rS={t:tS,ready:!1},aS=()=>()=>{},oa=(e,r={})=>{var Q,Ne,oe;const{i18n:a}=r,{i18n:n,defaultNS:i}=E.useContext(q6)||{},c=a||n||Y6();c&&!c.reportNamespaces&&(c.reportNamespaces=new K6),c||X_(c,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const u=E.useMemo(()=>{var se;return _e(_e(_e({},$6()),(se=c==null?void 0:c.options)==null?void 0:se.react),r)},[c,r]),{useSuspense:g,keyPrefix:y}=u,x=i||((Q=c==null?void 0:c.options)==null?void 0:Q.defaultNS),k=jc(x)?[x]:x||["translation"],N=E.useMemo(()=>k,k);(oe=(Ne=c==null?void 0:c.reportNamespaces)==null?void 0:Ne.addUsedNamespaces)==null||oe.call(Ne,N);const C=E.useRef(0),O=E.useCallback(se=>{if(!c)return aS;const{bindI18n:ce,bindI18nStore:Ce}=u,ae=()=>{C.current+=1,se()};return ce&&c.on(ce,ae),Ce&&c.store.on(Ce,ae),()=>{ce&&ce.split(" ").forEach(me=>c.off(me,ae)),Ce&&Ce.split(" ").forEach(me=>c.store.off(me,ae))}},[c,u]),D=E.useRef(),A=E.useCallback(()=>{if(!c)return rS;const se=!!(c.isInitialized||c.initializedStoreOnce)&&N.every(fe=>B6(fe,c,u)),ce=r.lng||c.language,Ce=C.current,ae=D.current;if(ae&&ae.ready===se&&ae.lng===ce&&ae.keyPrefix===y&&ae.revision===Ce)return ae;const K={t:c.getFixedT(ce,u.nsMode==="fallback"?N:N[0],y),ready:se,lng:ce,keyPrefix:y,revision:Ce};return D.current=K,K},[c,N,y,u,r.lng]),[I,z]=E.useState(0),{t:U,ready:B}=eS.useSyncExternalStore(O,A,A);E.useEffect(()=>{if(c&&!B&&!g){const se=()=>z(ce=>ce+1);r.lng?I2(c,r.lng,N,se):Gx(c,N,se)}},[c,r.lng,N,B,g,I]);const V=c||{},Z=E.useRef(null),W=E.useRef(),H=se=>{const ce=Object.getOwnPropertyDescriptors(se);ce.__original&&delete ce.__original;const Ce=Object.create(Object.getPrototypeOf(se),ce);if(!Object.prototype.hasOwnProperty.call(Ce,"__original"))try{Object.defineProperty(Ce,"__original",{value:se,writable:!1,enumerable:!1,configurable:!1})}catch(ae){}return Ce},le=E.useMemo(()=>{const se=V,ce=se==null?void 0:se.language;let Ce=se;se&&(Z.current&&Z.current.__original===se?W.current!==ce?(Ce=H(se),Z.current=Ce,W.current=ce):Ce=Z.current:(Ce=H(se),Z.current=Ce,W.current=ce));const ae=[U,Ce,B];return ae.t=U,ae.i18n=Ce,ae.ready=B,ae},[U,V,B,V.resolvedLanguage,V.language,V.languages]);if(c&&g&&!B)throw new Promise(se=>{const ce=()=>se();r.lng?I2(c,r.lng,N,ce):Gx(c,N,ce)});return le},{slice:nS,forEach:sS}=[];function iS(e){return sS.call(nS.call(arguments,1),r=>{if(r)for(const a in r)e[a]===void 0&&(e[a]=r[a])}),e}function oS(e){return typeof e!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(a=>a.test(e))}const B2=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,lS=function(e,r){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(r);let c=`${e}=${i}`;if(n.maxAge>0){const u=n.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");c+=`; Max-Age=${Math.floor(u)}`}if(n.domain){if(!B2.test(n.domain))throw new TypeError("option domain is invalid");c+=`; Domain=${n.domain}`}if(n.path){if(!B2.test(n.path))throw new TypeError("option path is invalid");c+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");c+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(c+="; HttpOnly"),n.secure&&(c+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"strict":c+="; SameSite=Strict";break;case"none":c+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return n.partitioned&&(c+="; Partitioned"),c},U2={create(e,r,a,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};a&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+a*60*1e3)),n&&(i.domain=n),document.cookie=lS(e,r,i)},read(e){const r=`${e}=`,a=document.cookie.split(";");for(let n=0;n-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const u=i.substring(1).split("&");for(let g=0;g0&&u[g].substring(0,y)===r&&(a=u[g].substring(y+1))}}return a}},uS={name:"hash",lookup(e){var i;let{lookupHash:r,lookupFromHashIndex:a}=e,n;if(typeof window!="undefined"){const{hash:c}=window.location;if(c&&c.length>2){const u=c.substring(1);if(r){const g=u.split("&");for(let y=0;y0&&g[y].substring(0,x)===r&&(n=g[y].substring(x+1))}}if(n)return n;if(!n&&a>-1){const g=c.match(/\/([a-zA-Z-]*)/g);return Array.isArray(g)?(i=g[typeof a=="number"?a:0])==null?void 0:i.replace("/",""):void 0}}}return n}};let yd=null;const z2=()=>{if(yd!==null)return yd;try{if(yd=typeof window!="undefined"&&window.localStorage!==null,!yd)return!1;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch(e){yd=!1}return yd};var hS={name:"localStorage",lookup(e){let{lookupLocalStorage:r}=e;if(r&&z2())return window.localStorage.getItem(r)||void 0},cacheUserLanguage(e,r){let{lookupLocalStorage:a}=r;a&&z2()&&window.localStorage.setItem(a,e)}};let bd=null;const H2=()=>{if(bd!==null)return bd;try{if(bd=typeof window!="undefined"&&window.sessionStorage!==null,!bd)return!1;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch(e){bd=!1}return bd};var fS={name:"sessionStorage",lookup(e){let{lookupSessionStorage:r}=e;if(r&&H2())return window.sessionStorage.getItem(r)||void 0},cacheUserLanguage(e,r){let{lookupSessionStorage:a}=r;a&&H2()&&window.sessionStorage.setItem(a,e)}},mS={name:"navigator",lookup(e){const r=[];if(typeof navigator!="undefined"){const{languages:a,userLanguage:n,language:i}=navigator;if(a)for(let c=0;c0?r:void 0}},gS={name:"htmlTag",lookup(e){let{htmlTag:r}=e,a;const n=r||(typeof document!="undefined"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(a=n.getAttribute("lang")),a}},xS={name:"path",lookup(e){var i;let{lookupFromPathIndex:r}=e;if(typeof window=="undefined")return;const a=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(i=a[typeof r=="number"?r:0])==null?void 0:i.replace("/",""):void 0}},pS={name:"subdomain",lookup(e){var i,c;let{lookupFromSubdomainIndex:r}=e;const a=typeof r=="number"?r+1:1,n=typeof window!="undefined"&&((c=(i=window.location)==null?void 0:i.hostname)==null?void 0:c.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[a]}};let q_=!1;try{document.cookie,q_=!0}catch(e){}const K_=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];q_||K_.splice(1,1);const yS=()=>({order:K_,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class J_{constructor(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(r,a)}init(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=r,this.options=iS(a,this.options||{},yS()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(cS),this.addDetector(dS),this.addDetector(hS),this.addDetector(fS),this.addDetector(mS),this.addDetector(gS),this.addDetector(xS),this.addDetector(pS),this.addDetector(uS)}addDetector(r){return this.detectors[r.name]=r,this}detect(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,a=[];return r.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(a=a.concat(i))}}),a=a.filter(n=>n!=null&&!oS(n)).map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}cacheUserLanguage(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;a&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(r)>-1||a.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(r,this.options)}))}}J_.type="languageDetector";const bS={dashboard:"Dashboard",assets:"Assets",workOrders:"Work Orders",maintenance:"Asset Maintenance",ppm:"PPM",logout:"Logout",login:"Login",email:"Email",password:"Password",submit:"Submit",cancel:"Cancel",save:"Save",delete:"Delete",deleting:"Deleting...",edit:"Edit",create:"Create",search:"Search",filter:"Filter",export:"Export",import:"Import",loading:"Loading...",noData:"No data available",error:"Error",success:"Success",darkMode:"Dark Mode",lightMode:"Light Mode",language:"Language",english:"English",arabic:"Arabic",backToDashboard:"Back to Dashboard"},vS={title:"Seera-ASM",loggedInAs:"Logged in as:",version:"Seera-ASM v2.26",inventory:"Inventory",ppmPlanner:"PPM Planner",maintenanceCalendar:"Maintenance Calendar",activeMap:"Active Map",maintenanceTeam:"Maintenance Team",procurement:"Procurement",sla:"Service Level Agreement (SLA)",support:"Support"},_S={title:"Seera-ASM",subtitle:"Asset Management System",signIn:"Sign in to continue",emailPlaceholder:"Enter your email",passwordPlaceholder:"Enter your password",loginFailed:"Login failed. Please check your credentials.",demoLogin:"Demo Login",forgotPassword:"Forgot password?",forgotPasswordTitle:"Reset your password",forgotPasswordHint:"Enter your email address or username. We will send you a link to reset your password.",forgotPasswordUserRequired:"Please enter your email or username.",forgotPasswordUserPlaceholder:"Email or username",forgotPasswordSubmit:"Send reset link",forgotPasswordClose:"Close",forgotPasswordSentSuccess:"If an account exists for that user, password reset instructions have been sent by email.",forgotPasswordNotFound:"No account was found with that email or username.",forgotPasswordTimeout:"The request timed out. Please try again.",forgotPasswordCannotReset:"Password reset is not available for this account.",forgotPasswordFailed:"Could not send the reset link. Please try again later.",finishingSignOut:"Finishing sign-out…",afterPasswordResetSignIn:"Your password was updated. Please sign in with your new password."},wS={title:"Dashboard",loading:"Loading dashboard...",totalAssets:"Total Assets",openWorkOrders:"OPEN WORK ORDERS",workOrdersInProgress:"WORK ORDERS IN PROGRESS",completedWorkOrders:"COMPLETED WORK ORDERS",closedWorkOrders:"CLOSED WORK ORDERS",totalWorkOrders:"TOTAL WORK ORDERS",overdueWorkOrders:"OVERDUE WORK ORDERS",upTime:"Up Time",downTime:"Down Time",workOrderStatus:"Work Order Status",workOrderTypeStatusHint:"Type vs status counts — click a number to view filtered work orders",workOrderByType:"Work Order by Type",maintenanceByAsset:"Maintenance by Asset",assigneesStatus:"Asset Maintenance Assignees Status Count",assignedTo:"Assigned To",plannedTasks:"Planned",completedTasks:"Completed",cancelledTasks:"Cancelled",overdueTasks:"Overdue",totalTasks:"Total",maintenanceFrequency:"Maintenance Frequency",maintenanceLogs:"MAINTENANCE LOGS",assetUptime:"Asset Uptime",avgResponseTime:"Avg Response Time",maintenanceEfficiency:"Maintenance Efficiency",overdueMaintenance:"Overdue Maintenance",upDownTimeChart:"Up & Down Time Chart",assetUpDown:"Asset UP & Down",assetStatusOverview:"Asset Status Overview",clickStatusCardHint:"Click a card to view filtered assets",totalAssetsLabel:"Total",noAssetStatusData:"No asset status data",viewAssetStatusOverview:"View asset status overview",viewAll:"View all",viewFiltered:"View ↗",ofTotal:"of total",ppmStatus:"PPM Status",techniciansWorked:"Technicians Work Summary",workOrderStatusDistribution:"Work Order Status Distribution",workOrders:"Work Orders",activeDateRange:"Date range: {{from}} to {{to}}",allDates:"Showing all dates",applyFilters:"Apply",clearDates:"Clear dates",techniciansWorkedSubtitle:"{{completed}} done • {{inProgress}} wip • {{open}} open",techniciansWorkedEmpty:"No technician data",techniciansWorkedReportHint:"Work orders grouped by assigned contractor",technicianWorkingHours:"Technicians Working Hours",technicianHoursSubtitle:"Total: {{total}} hrs",technicianHoursEmpty:"No technician hours data",loadingTechnicianHours:"Loading technician hours…",technicianHoursFound:"{{count}} technicians found",totalTechnicians:"Total Technicians",totalHoursWorked:"Total Hours Worked",avgHoursPerTechnician:"Average Hours/Technician",technicianName:"Technician Name",engineer:"Engineer",totalHoursSpent:"Total Hours Spent",technicianHoursFooter:"Showing {{count}} technicians (filtered) • {{total}} total hours",filters:"Filters",clearFilters:"Clear Filters",viewFullReport:"View Full Report",noChartData:"No chart data available",fromDate:"From Date",toDate:"To Date",technicalDepartment:"Technical Department",allDepartments:"All Departments",refreshReport:"Refresh",allHospitals:"All Hospitals",allSites:"All Sites",overallCompletionRate:"Overall Completion Rate",overallCompletionByDepartment:"Overall Completion Rate by Department",viewCompletionDetails:"View completion details",clickRowToFilter:"Click a row or value to view filtered work orders",woType:"WO Type",woFeedbackReport:"WO Feedback Report",woFeedbackTotalResponses:"Total responses: {{total}}"},kS={assetId:"Asset ID",assetName:"Asset Name",serialNumber:"Serial Number",company:"Company/Hospital",location:"Location",department:"Department",deviceStatus:"Device Status",modality:"Modality",manufacturer:"Manufacturer",supplier:"Supplier",assetCategory:"Asset Category",purchaseDate:"Purchase Date",purchaseAmount:"Purchase Amount",availableForUseDate:"Available For Use Date",createdOn:"Created On",modifiedOn:"Modified On",createdBy:"Created By",modifiedBy:"Modified By",workOrderId:"Work Order ID",workOrderType:"Type",status:"Status",priority:"Priority",description:"Description",assignedTo:"Assigned To",scheduledDate:"Scheduled Date",completedDate:"Completed Date",hospital:"Hospital",assetType:"Asset Type",siteName:"Site Name",assignedSupervisor:"Assigned Supervisor",assignedContractor:"Assigned Contractor",serialNumberShort:"Serial",departmentShort:"Dept",manufacturerShort:"Mfr",workOrderIdShort:"WO ID",assetShort:"Asset",typeShort:"Type",nameShort:"Name",pmId:"PM ID",name:"Name"},NS={filterBy:"Filter By",sortBy:"Sort By",createdDate:"Created Date",latestModifiedDate:"Latest Modified Date",startDate:"Start Date",endDate:"End Date",sortCreationNewest:"Created (Newest)",sortCreationOldest:"Created (Oldest)",sortModifiedNewest:"Modified (Newest)",sortModifiedOldest:"Modified (Oldest)",sortNameAsc:"Name (A-Z)",sortNameDesc:"Name (Z-A)"},SS={addNew:"Add New",searchPlaceholder:"Search...",noResults:"No results found",showing:"Showing",of:"of",results:"results",selectAll:"Select All",deselectAll:"Deselect All",selected:"selected",actions:"Actions",view:"View",edit:"Edit",delete:"Delete",duplicate:"Duplicate",export:"Export",print:"Print",filters:"Filters",clearFilters:"Clear filters",applyFilters:"Apply Filters",columns:"Columns",exportSelected:"Export Selected",exportAllOnPage:"Export All on Page",exportAllWithFilters:"Export All with Filters",exportFormat:"Export Format",csv:"CSV",excel:"Excel",exporting:"Exporting...",exportComplete:"Export Complete",close:"Close",loading:"Loading...",refresh:"Refresh",deselectAllTitle:"Deselect all",selectAllTitle:"Select all",typeToSearch:"Type to search...",enterFilterName:"Enter filter name",enterFilterNameExample:"Enter filter name (e.g., 'Open High Priority')",allStatuses:"All Statuses",noIssuesFound:"No issues found",createFirstIssue:"Create your first issue",saveFilterPreset:"Save Filter Preset",saveFilter:"Save Filter",filtering:"Filtering...",noMaintenanceTeamsFound:"No maintenance teams found",createFirstTeam:"Create your first team",all:"All",tryAdjustingFilters:"Try adjusting your search or filters",getStartedCreateFirst:"Get started by creating your first PPM Planner",noMaintenanceLogsFound:"No maintenance logs found",createFirstMaintenanceLog:"Create your first maintenance log",total:"Total",noPPMSchedulesFound:"No PPM schedules found",createFirstPPMSchedule:"Create your first PPM schedule"},CS={title:"Assets",addAsset:"Add New Asset",assetDetails:"Asset Details",assetInformation:"Asset Information",newAsset:"New Asset",duplicateAsset:"Duplicate Asset",fromAsset:"From Asset",creatingFromAsset:"Creating Work Order from Asset",assetInfoPrefilled:"Asset information prefilled from",pleaseSelectWorkOrderType:"Please select a Work Order type and add any additional details",loadingAssetDetails:"Loading asset details...",pleaseEnterAssetName:"Please enter an Asset Name",pleaseSelectCategory:"Please select a Category",assetDuplicatedSuccessfully:"Asset duplicated successfully!",assetCreatedSuccessfully:"Asset created successfully!",assetUpdatedSuccessfully:"Asset updated successfully!",sourceAssetNotFound:"Source Asset Not Found",assetNotFoundMessage:"The asset you're trying to duplicate could not be found.",backToAssetsList:"Back to Assets List",newAssetDetails:"New Asset Details",noAssetsFound:"No assets found",createFirstAsset:"Create your first asset"},ES={title:"Work Orders",addWorkOrder:"Add New Work Order",workOrderDetails:"Work Order Details",newWorkOrder:"New Work Order",duplicateWorkOrder:"Duplicate Work Order",createFromAsset:"Create Work Order from Asset"},jS={title:"Asset Maintenance",maintenanceLogs:"Maintenance Logs",maintenanceDetails:"Maintenance Details",addMaintenance:"Add New Maintenance",maintenanceTeam:"Maintenance Team",newMaintenanceTeam:"New Maintenance Team",teamId:"Team ID",teamName:"Team Name",managerEmail:"Manager Email",managerName:"Manager Name",expertise:"Expertise",selectTeam:"Select Team",viewDetails:"View Details",editTeam:"Edit Team",duplicateTeam:"Duplicate Team",deleteTeam:"Delete Team",selectHospital:"Select Hospital",selectExpertise:"Select Expertise",selectManager:"Select Manager",enterTeamName:"Enter Team Name",teamInformation:"Team Information",selectUser:"Select User",selectRole:"Select Role",totalMembers:"Total Members",teamSummary:"Team Summary",addFirstMember:"Add First Member",manager:"Maintenance Manager"},TS={title:"PPM",ppmDetails:"PPM Details",addPPM:"Add New PPM",periodicity:"Periodicity",dueDate:"Due Date",manageSchedules:"Manage PM Schedules",pmId:"PM ID",name:"Name",manufacturer:"Manufacturer"},AS={title:"Export",whatToExport:"What to Export",selectedRows:"Selected Rows",currentPage:"Current Page",allWithFilters:"All with Filters",exportSelected:"Export {count} selected",exportPage:"Export {count} on current page",exportAll:"Export all {count}",columnsToExport:"Columns to Export",selectAll:"Select All",selectDefault:"Select Default",exporting:"Exporting...",exportingSelected:"Exporting {count} selected row(s)",exportingPage:"Exporting {count} row(s) from current page",exportingAll:"Exporting all {count} row(s)",selected:"selected",rows:"rows"},OS={title:"Items",itemDetails:"Item Details",newItem:"New Item",addItem:"Add New Item",itemId:"Item ID",itemCode:"Item Code",itemName:"Item Name",itemGroup:"Item Group",stockUOM:"Stock UOM",partDescription:"Part Description",brand:"Brand",valuationRate:"Valuation Rate",openingStock:"Opening Stock",lastCalibrationDate:"Last Calibration Date",nextCalibrationDate:"Next Calibration Date",selectItem:"Select Item",selectItemGroup:"Select Item Group",selectHospital:"Select Hospital",viewDetails:"View Details",editItem:"Edit Item",duplicateItem:"Duplicate Item",deleteItem:"Delete Item",basicInformation:"Basic Information",stockInformation:"Stock Information",isStockItem:"Is Stock Item",balanceQty:"Balance Qty",calibrationInformation:"Calibration Information",additionalInformation:"Additional Information",refreshBalanceQty:"Refresh Balance Qty",warrantyMonths:"Warranty (Months)"},RS={title:"Issues",issueDetails:"Issue Details",newIssue:"New Issue",addIssue:"Add New Issue",issueId:"Issue ID",subject:"Subject",raisedBy:"Raised By",contact:"Contact",issueType:"Issue Type",openingDate:"Opening Date",resolutionDate:"Resolution Date",resolvedBy:"Resolved By",firstRespondedOn:"First Responded On",resolutionDetails:"Resolution Details",selectIssue:"Select Issue",allPriorities:"All Priorities",allCompanies:"All Companies",viewDetails:"View Details",editIssue:"Edit Issue",deleteIssue:"Delete Issue",enterSubject:"Enter issue subject",selectPriority:"Select priority",selectIssueType:"Select issue type",describeIssue:"Describe the issue in detail...",contactInformation:"Contact Information",createNewIssue:"Create a new support issue",resolution:"Resolution",describeResolution:"Describe how the issue was resolved...",selectCompany:"Select company",statusInformation:"Status Information",currentStatus:"Current Status",timeline:"Timeline"},MS={title:"Users",userDetails:"User Details",newUser:"New User",addUser:"Add New User",searchUsers:"Search users...",manageUsers:"Manage user accounts and permissions",noUsersFound:"No users found",tryAdjustingSearch:"Try adjusting your search terms.",noUsersAvailable:"No users available.",backToDashboard:"Back to Dashboard"},DS={title:"Events",eventDetails:"Event Details",newEvent:"New Event",addEvent:"Add New Event",upcomingEvents:"Upcoming Events",eventsFromFrappe:"Events from your Frappe backend",noEventsFound:"No events found",noEventsScheduled:"No events are currently scheduled.",refreshEvents:"Refresh Events"},LS={showingToOf:"Showing {{start}} to {{end}} of {{total}} {{label}}",showingTo:"Showing {{start}} to {{end}} {{label}}",previous:"Previous",next:"Next",goTo:"Go to",go:"Go",page:"Page",assets:"assets",workOrders:"work orders",items:"items",issues:"issues",maintenanceTeams:"maintenance teams"},IS={common:bS,sidebar:vS,login:_S,dashboard:wS,commonFields:kS,filters:NS,listPages:SS,assets:CS,workOrders:ES,maintenance:jS,ppm:TS,exportModal:AS,items:OS,issues:RS,users:MS,events:DS,pagination:LS},PS={dashboard:"لوحة التحكم",assets:"الأصول",workOrders:"أوامر العمل",maintenance:"صيانة الأصول",ppm:"الصيانة الوقائية",logout:"تسجيل الخروج",login:"تسجيل الدخول",email:"البريد الإلكتروني",password:"كلمة المرور",submit:"إرسال",cancel:"إلغاء",save:"حفظ",delete:"حذف",edit:"تعديل",create:"إنشاء",search:"بحث",filter:"تصفية",export:"تصدير",import:"استيراد",loading:"جاري التحميل...",noData:"لا توجد بيانات",error:"خطأ",success:"نجح",darkMode:"الوضع الداكن",lightMode:"الوضع الفاتح",language:"اللغة",english:"الإنجليزية",arabic:"العربية"},FS={title:"أصول سيرا",loggedInAs:"تم تسجيل الدخول كـ:",version:"أصول سيرا نظام إدارة الأصول الإصدار 2.26"},BS={title:"أصول سيرا",subtitle:"نظام إدارة الأصول",signIn:"قم بتسجيل الدخول للمتابعة",emailPlaceholder:"أدخل بريدك الإلكتروني",passwordPlaceholder:"أدخل كلمة المرور",loginFailed:"فشل تسجيل الدخول. يرجى التحقق من بيانات الاعتماد الخاصة بك.",demoLogin:"تسجيل دخول تجريبي",forgotPassword:"نسيت كلمة المرور؟",forgotPasswordTitle:"إعادة تعيين كلمة المرور",forgotPasswordHint:"أدخل بريدك الإلكتروني أو اسم المستخدم. سنرسل لك رابطًا لإعادة تعيين كلمة المرور.",forgotPasswordUserRequired:"يرجى إدخال بريدك الإلكتروني أو اسم المستخدم.",forgotPasswordUserPlaceholder:"البريد الإلكتروني أو اسم المستخدم",forgotPasswordSubmit:"إرسال رابط إعادة التعيين",forgotPasswordClose:"إغلاق",forgotPasswordSentSuccess:"إذا كان هناك حساب لهذا المستخدم، فقد أُرسلت تعليمات إعادة تعيين كلمة المرور بالبريد الإلكتروني.",forgotPasswordNotFound:"لم يتم العثور على حساب بهذا البريد الإلكتروني أو اسم المستخدم.",forgotPasswordTimeout:"انتهت مهلة الطلب. يرجى المحاولة مرة أخرى.",forgotPasswordCannotReset:"إعادة تعيين كلمة المرور غير متاحة لهذا الحساب.",forgotPasswordFailed:"تعذر إرسال رابط إعادة التعيين. يرجى المحاولة لاحقًا.",finishingSignOut:"جاري إنهاء تسجيل الخروج…",afterPasswordResetSignIn:"تم تحديث كلمة المرور. يرجى تسجيل الدخول بكلمة المرور الجديدة."},US={title:"لوحة التحكم",loading:"جاري تحميل لوحة التحكم...",totalAssets:"إجمالي الأصول",openWorkOrders:"أوامر العمل المفتوحة",workOrdersInProgress:"أوامر العمل قيد التنفيذ",completedWorkOrders:"أوامر العمل المكتملة",closedWorkOrders:"أوامر العمل المغلقة",totalWorkOrders:"إجمالي أوامر العمل",overdueWorkOrders:"أوامر العمل المتأخرة",upTime:"وقت التشغيل",downTime:"وقت التوقف",workOrderStatus:"حالة أمر العمل",workOrderTypeStatusHint:"عدد الحالات حسب النوع — انقر على الرقم لعرض أوامر العمل المفلترة",workOrderByType:"أمر العمل حسب النوع",maintenanceByAsset:"الصيانة حسب الأصل",assigneesStatus:"عدد حالة مكلفي صيانة الأصول",assignedTo:"المكلف",plannedTasks:"مخطط",completedTasks:"مكتمل",cancelledTasks:"ملغى",overdueTasks:"متأخر",totalTasks:"الإجمالي",maintenanceFrequency:"تكرار الصيانة",maintenanceLogs:"سجلات الصيانة",assetUptime:"وقت تشغيل الأصل",avgResponseTime:"متوسط وقت الاستجابة",maintenanceEfficiency:"كفاءة الصيانة",overdueMaintenance:"صيانة متأخرة",upDownTimeChart:"مخطط وقت التشغيل والتوقف",assetUpDown:"حالة الأصول (تشغيل / توقف)",assetStatusOverview:"نظرة عامة على حالة الأصول",clickStatusCardHint:"انقر على بطاقة لعرض الأصول المفلترة",totalAssetsLabel:"الإجمالي",noAssetStatusData:"لا توجد بيانات لحالة الأصول",viewAssetStatusOverview:"عرض نظرة عامة على حالة الأصول",viewAll:"عرض الكل",viewFiltered:"عرض ↗",ofTotal:"من الإجمالي",ppmStatus:"حالة الصيانة الوقائية",techniciansWorked:"ملخص عمل الفنيين",workOrderStatusDistribution:"توزيع حالة أمر العمل",workOrders:"أوامر العمل",activeDateRange:"نطاق التاريخ: {{from}} إلى {{to}}",allDates:"عرض جميع التواريخ",applyFilters:"تطبيق",clearDates:"مسح التواريخ",techniciansWorkedSubtitle:"{{completed}} منجز • {{inProgress}} قيد التنفيذ • {{open}} مفتوح",techniciansWorkedEmpty:"لا توجد بيانات للفنيين",techniciansWorkedReportHint:"أوامر العمل مجمعة حسب المقاول المعين",technicianWorkingHours:"ساعات عمل الفنيين",technicianHoursSubtitle:"الإجمالي: {{total}} ساعة",technicianHoursEmpty:"لا توجد بيانات لساعات الفنيين",loadingTechnicianHours:"جاري تحميل ساعات الفنيين…",technicianHoursFound:"تم العثور على {{count}} فني",totalTechnicians:"إجمالي الفنيين",totalHoursWorked:"إجمالي ساعات العمل",avgHoursPerTechnician:"متوسط الساعات/فني",technicianName:"اسم الفني",engineer:"المهندس",totalHoursSpent:"إجمالي الساعات",technicianHoursFooter:"عرض {{count}} فني (مفلتر) • {{total}} إجمالي الساعات",filters:"الفلاتر",clearFilters:"مسح الفلاتر",viewFullReport:"عرض التقرير الكامل",noChartData:"لا توجد بيانات للمخطط",fromDate:"من تاريخ",toDate:"إلى تاريخ",technicalDepartment:"القسم الفني",allDepartments:"جميع الأقسام",refreshReport:"تحديث",allHospitals:"جميع المستشفيات",allSites:"جميع المواقع",overallCompletionRate:"معدل الإنجاز الإجمالي",overallCompletionByDepartment:"معدل الإنجاز الإجمالي حسب القسم",viewCompletionDetails:"عرض تفاصيل الإنجاز",clickRowToFilter:"انقر على صف أو قيمة لعرض أوامر العمل المفلترة",woType:"نوع أمر العمل",woFeedbackReport:"تقرير ملاحظات أمر العمل",woFeedbackTotalResponses:"إجمالي الردود: {{total}}"},zS={assetId:"معرف الأصل",assetName:"اسم الأصل",serialNumber:"الرقم التسلسلي",company:"الشركة/المستشفى",location:"الموقع",department:"القسم",deviceStatus:"حالة الجهاز",modality:"الطريقة",manufacturer:"الشركة المصنعة",supplier:"المورد",assetCategory:"فئة الأصل",purchaseDate:"تاريخ الشراء",purchaseAmount:"مبلغ الشراء",availableForUseDate:"تاريخ التوفر للاستخدام",createdOn:"تم الإنشاء في",modifiedOn:"تم التعديل في",createdBy:"تم الإنشاء بواسطة",modifiedBy:"تم التعديل بواسطة",workOrderId:"معرف أمر العمل",workOrderType:"النوع",status:"الحالة",priority:"الأولوية",description:"الوصف",assignedTo:"مكلف إلى",scheduledDate:"التاريخ المجدول",completedDate:"تاريخ الإكمال"},HS={addNew:"إضافة جديد",searchPlaceholder:"بحث...",noResults:"لم يتم العثور على نتائج",showing:"عرض",of:"من",results:"نتائج",selectAll:"تحديد الكل",deselectAll:"إلغاء تحديد الكل",selected:"محدد",actions:"الإجراءات",view:"عرض",edit:"تعديل",delete:"حذف",duplicate:"نسخ",export:"تصدير",print:"طباعة",filters:"المرشحات",clearFilters:"مسح المرشحات",applyFilters:"تطبيق المرشحات",columns:"الأعمدة",exportSelected:"تصدير المحدد",exportAllOnPage:"تصدير الكل في الصفحة",exportAllWithFilters:"تصدير الكل مع المرشحات",exportFormat:"تنسيق التصدير",csv:"CSV",excel:"Excel",exporting:"جاري التصدير...",exportComplete:"اكتمل التصدير",close:"إغلاق",loading:"جاري التحميل...",refresh:"تحديث"},VS={title:"الأصول",addAsset:"إضافة أصل جديد",assetDetails:"تفاصيل الأصل"},WS={title:"أوامر العمل",addWorkOrder:"إضافة أمر عمل جديد",workOrderDetails:"تفاصيل أمر العمل",newWorkOrder:"أمر عمل جديد",duplicateWorkOrder:"نسخ أمر العمل",createFromAsset:"إنشاء أمر عمل من الأصل"},GS={title:"صيانة الأصول",maintenanceLogs:"سجلات الصيانة",maintenanceDetails:"تفاصيل الصيانة",addMaintenance:"إضافة صيانة جديدة"},$S={title:"الصيانة الوقائية",ppmDetails:"تفاصيل الصيانة الوقائية",addPPM:"إضافة صيانة وقائية جديدة"},XS={title:"تصدير",whatToExport:"ما الذي سيتم تصديره",selectedRows:"الصفوف المحددة",currentPage:"الصفحة الحالية",allWithFilters:"الكل مع المرشحات",exportSelected:"تصدير {count} محدد",exportPage:"تصدير {count} في الصفحة الحالية",exportAll:"تصدير الكل {count}",columnsToExport:"الأعمدة للتصدير",selectAll:"تحديد الكل",selectDefault:"تحديد الافتراضي",exporting:"جاري التصدير...",exportingSelected:"جاري تصدير {count} صف(وف) محدد(ة)",exportingPage:"جاري تصدير {count} صف(وف) من الصفحة الحالية",exportingAll:"جاري تصدير جميع {count} صف(وف)",selected:"محدد",rows:"صفوف"},YS={filterBy:"تصفية حسب",sortBy:"ترتيب حسب",createdDate:"تاريخ الإنشاء",latestModifiedDate:"تاريخ آخر تعديل",startDate:"تاريخ البداية",endDate:"تاريخ النهاية",sortCreationNewest:"الإنشاء (الأحدث)",sortCreationOldest:"الإنشاء (الأقدم)",sortModifiedNewest:"التعديل (الأحدث)",sortModifiedOldest:"التعديل (الأقدم)",sortNameAsc:"الاسم (أ-ي)",sortNameDesc:"الاسم (ي-أ)"},ZS={showingToOf:"عرض {{start}} إلى {{end}} من {{total}} {{label}}",showingTo:"عرض {{start}} إلى {{end}} {{label}}",previous:"السابق",next:"التالي",goTo:"انتقل إلى",go:"انتقل",page:"صفحة",assets:"أصول",workOrders:"أوامر عمل",items:"عناصر",issues:"مشكلات",maintenanceTeams:"فرق صيانة"},qS={common:PS,sidebar:FS,login:BS,dashboard:US,commonFields:zS,listPages:HS,assets:VS,workOrders:WS,maintenance:GS,ppm:$S,exportModal:XS,filters:YS,pagination:ZS},Lr={BASE_URL:"",ENDPOINTS:{USER_DETAILS:"/api/method/asset_lite.api.custom_api.get_user_details",DOCTYPE_RECORDS:"/api/method/asset_lite.api.custom_api.get_doctype_records",DASHBOARD_STATS:"/api/method/asset_lite.api.custom_api.get_dashboard_stats",DASHBOARD_NUMBER_CARDS:"/api/method/asset_lite.api.dashboard_api.get_number_cards",DASHBOARD_WORK_ORDER_METRICS:"/api/method/asset_lite.api.dashboard_api.get_dashboard_work_order_metrics",DASHBOARD_ASSET_DEVICE_STATUS:"/api/method/asset_lite.api.dashboard_api.get_asset_device_status_summary",DASHBOARD_LIST_CHARTS:"/api/method/asset_lite.api.dashboard_api.list_dashboard_charts",DASHBOARD_CHART_DATA:"/api/method/asset_lite.api.dashboard_api.get_dashboard_chart_data",DASHBOARD_REPAIR_COST:"/api/method/asset_lite.api.dashboard_api.get_repair_cost_by_item",KYC_DETAILS:"/api/method/asset_lite.api.custom_api.get_kyc_details",GET_ASSETS:"/api/method/asset_lite.api.asset_api.get_assets",GET_ASSET_DETAILS:"/api/method/asset_lite.api.asset_api.get_asset_details",CREATE_ASSET:"/api/method/asset_lite.api.asset_api.create_asset",UPDATE_ASSET:"/api/method/asset_lite.api.asset_api.update_asset",DELETE_ASSET:"/api/method/asset_lite.api.asset_api.delete_asset",GET_ASSET_FILTERS:"/api/method/asset_lite.api.asset_api.get_asset_filters",GET_ASSET_STATS:"/api/method/asset_lite.api.asset_api.get_asset_stats",SEARCH_ASSETS:"/api/method/asset_lite.api.asset_api.search_assets",SUBMIT_ASSET:"/api/method/asset_lite.api.asset_api.submit_asset",CANCEL_ASSET:"/api/method/asset_lite.api.asset_api.cancel_asset",GET_WORK_ORDERS:"/api/method/asset_lite.api.work_order_api.get_work_orders",GET_WORK_ORDER_DETAILS:"/api/method/asset_lite.api.work_order_api.get_work_order_details",CREATE_WORK_ORDER:"/api/method/asset_lite.api.work_order_api.create_work_order",UPDATE_WORK_ORDER:"/api/method/asset_lite.api.work_order_api.update_work_order",DELETE_WORK_ORDER:"/api/method/asset_lite.api.work_order_api.delete_work_order",UPDATE_WORK_ORDER_STATUS:"/api/method/asset_lite.api.work_order_api.update_work_order_status",GET_ASSET_MAINTENANCE_LOGS:"/api/method/asset_lite.api.asset_maintenance_api.get_asset_maintenance_logs",GET_ASSET_MAINTENANCE_LOG_DETAILS:"/api/method/asset_lite.api.asset_maintenance_api.get_asset_maintenance_log_details",CREATE_ASSET_MAINTENANCE_LOG:"/api/method/asset_lite.api.asset_maintenance_api.create_asset_maintenance_log",UPDATE_ASSET_MAINTENANCE_LOG:"/api/method/asset_lite.api.asset_maintenance_api.update_asset_maintenance_log",DELETE_ASSET_MAINTENANCE_LOG:"/api/method/asset_lite.api.asset_maintenance_api.delete_asset_maintenance_log",UPDATE_MAINTENANCE_STATUS:"/api/method/asset_lite.api.asset_maintenance_api.update_maintenance_status",GET_MAINTENANCE_LOGS_BY_ASSET:"/api/method/asset_lite.api.asset_maintenance_api.get_maintenance_logs_by_asset",GET_OVERDUE_MAINTENANCE_LOGS:"/api/method/asset_lite.api.asset_maintenance_api.get_overdue_maintenance_logs",GET_ASSET_MAINTENANCES:"/api/method/asset_lite.api.ppm_api.get_asset_maintenances",GET_ASSET_MAINTENANCE_DETAILS:"/api/method/asset_lite.api.ppm_api.get_asset_maintenance_details",CREATE_ASSET_MAINTENANCE:"/api/method/asset_lite.api.ppm_api.create_asset_maintenance",UPDATE_ASSET_MAINTENANCE:"/api/method/asset_lite.api.ppm_api.update_asset_maintenance",DELETE_ASSET_MAINTENANCE:"/api/method/asset_lite.api.ppm_api.delete_asset_maintenance",GET_MAINTENANCE_TASKS:"/api/method/asset_lite.api.ppm_api.get_maintenance_tasks",GET_SERVICE_COVERAGE:"/api/method/asset_lite.api.ppm_api.get_service_coverage",GET_MAINTENANCES_BY_ASSET:"/api/method/asset_lite.api.ppm_api.get_maintenances_by_asset",GET_ACTIVE_SERVICE_CONTRACTS:"/api/method/asset_lite.api.ppm_api.get_active_service_contracts",LOGIN:"/api/method/login",LOGOUT:"/api/method/logout",CSRF_TOKEN:"/api/method/asset_lite.api.custom_api.get_user_details",RESET_PASSWORD:"/api/method/frappe.core.doctype.user.user.reset_password",UPLOAD_FILE:"/api/method/upload_file",GET_USER_PERMISSIONS:"/api/method/asset_lite.api.userperm_api.get_user_permissions",GET_PERMISSION_FILTERS:"/api/method/asset_lite.api.userperm_api.get_permission_filters",GET_ALLOWED_VALUES:"/api/method/asset_lite.api.userperm_api.get_allowed_values",CHECK_DOCUMENT_ACCESS:"/api/method/asset_lite.api.userperm_api.check_document_access",GET_CONFIGURED_DOCTYPES:"/api/method/asset_lite.api.userperm_api.get_configured_doctypes",GET_USER_DEFAULTS:"/api/method/asset_lite.api.userperm_api.get_user_defaults"},DEFAULT_HEADERS:{"Content-Type":"application/json",Accept:"application/json"},TIMEOUT:parseInt("60000")};class KS{constructor(){Ti(this,"baseURL");Ti(this,"endpoints");Ti(this,"defaultHeaders");Ti(this,"timeout");this.baseURL=Lr.BASE_URL,this.endpoints=Lr.ENDPOINTS,this.defaultHeaders=Lr.DEFAULT_HEADERS,this.timeout=Lr.TIMEOUT}getCSRFTokenForGuest(){return xe(this,null,function*(){if(typeof window!="undefined"){const r=window.csrf_token;if(r&&r!=="None")return r}try{const r=yield fetch(`${this.baseURL}${this.endpoints.CSRF_TOKEN}`,{method:"GET",headers:{Accept:"application/json"},credentials:"include"});if(r.ok)return(yield r.json()).message||null}catch(r){}return null})}requestPasswordReset(r,a){return xe(this,null,function*(){var x;const n=r.trim();if(!n)throw new ps("User required",void 0,"USER_REQUIRED");const i=yield this.getCSRFTokenForGuest(),c={"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"};i&&(c["X-Frappe-CSRF-Token"]=i);const u=new AbortController,g=setTimeout(()=>u.abort(),45e3),y=()=>u.abort();if(a){if(a.aborted)throw clearTimeout(g),new ps("Aborted",void 0,"TIMEOUT");a.addEventListener("abort",y)}try{const k=yield fetch(`${this.baseURL}${this.endpoints.RESET_PASSWORD}`,{method:"POST",headers:c,body:`user=${encodeURIComponent(n)}`,credentials:"include",signal:u.signal}),N=yield k.json().catch(()=>({})),C=typeof N.message=="string"?N.message:typeof N.message=="object"&&N.message!==null?String((x=N.message.message)!=null?x:""):"";if(k.status===404||C==="not found"||/not found/i.test(C))throw new ps("not found",404,"NOT_FOUND");if(k.status===403)throw new ps("forbidden",403,"FORBIDDEN");if(C==="disabled"||C==="not allowed")throw new ps(C,200,"CANNOT_RESET");if(!k.ok)throw new ps(N.error||`HTTP error! status: ${k.status}`,k.status)}catch(k){throw k instanceof ps?k:k instanceof DOMException&&k.name==="AbortError"?new ps("timeout",void 0,"TIMEOUT"):k instanceof Error&&k.name==="AbortError"?new ps("timeout",void 0,"TIMEOUT"):k}finally{clearTimeout(g),a&&a.removeEventListener("abort",y)}})}getCSRFToken(){return xe(this,null,function*(){var r;try{if(typeof window!="undefined"){const u=window.csrf_token;if(u&&u!=="None")return u}if(!localStorage.getItem("user"))return null;const n=yield fetch(`${this.baseURL}${this.endpoints.CSRF_TOKEN}`,{method:"GET",headers:{Accept:"application/json"},credentials:"include"});if(!n.ok)return null;const c=((r=(yield n.json()).message)==null?void 0:r.csrf_token)||null;return c&&typeof window!="undefined"&&(window.csrf_token=c),c}catch(a){return null}})}refreshCSRFToken(){return xe(this,null,function*(){return typeof window!="undefined"&&(window.csrf_token=null),this.getCSRFToken()})}apiCall(n){return xe(this,arguments,function*(r,a={}){const i=`${this.baseURL}${r}`,c=_e({method:"GET",headers:_e(_e({},this.defaultHeaders),a.headers)},a),u=(c.method||"GET").toUpperCase();if(u!=="GET"&&u!=="HEAD"){const g=yield this.getCSRFToken();g&&(c.headers["X-Frappe-CSRF-Token"]=g)}try{const g=new AbortController,y=setTimeout(()=>g.abort(),this.timeout),x=yield fetch(i,$e(_e({},c),{signal:g.signal}));if(clearTimeout(y),!x.ok){const N=yield x.json().catch(()=>({}));throw new ps(N.error||`HTTP error! status: ${x.status}`,x.status)}const k=yield x.json();return k.message!==void 0?k.message:k}catch(g){throw g instanceof Error?(console.error("API call failed:",g),new ps(g.message)):g}})}login(r){return xe(this,null,function*(){const a=new FormData;a.append("usr",r.email),a.append("pwd",r.password);const n=`${this.baseURL}${this.endpoints.LOGIN}`;try{const i=new AbortController,c=setTimeout(()=>i.abort(),this.timeout),u=yield fetch(n,{method:"POST",headers:{Accept:"application/json"},body:a,credentials:"include",signal:i.signal});if(clearTimeout(c),!u.ok){const y=yield u.json().catch(()=>({})),x="Invalid credentials. Please try again.";throw new ps(x,u.status)}const g=yield u.json();return yield this.refreshCSRFToken(),typeof g.message=="string"&&g.message==="Logged In"?{message:{full_name:g.full_name,user_id:g.user||g.email,home_page:g.home_page,sid:g.sid}}:g.message&&typeof g.message=="object"?{message:g.message}:g.full_name||g.user?{message:g}:{message:g}}catch(i){throw i instanceof Error?new ps("Login failed. Please try again."):i}})}logout(){return xe(this,null,function*(){yield this.apiCall(this.endpoints.LOGOUT,{method:"POST"})})}getUserDetails(r){return xe(this,null,function*(){const a=r?`?user_id=${r}`:"";return this.apiCall(`${this.endpoints.USER_DETAILS}${a}`)})}getDoctypeRecords(r,a,n,i=20,c=0){return xe(this,null,function*(){const u=new URLSearchParams({doctype:r,limit:i.toString(),offset:c.toString()});return a&&u.append("filters",JSON.stringify(a)),n&&u.append("fields",JSON.stringify(n)),this.apiCall(`${this.endpoints.DOCTYPE_RECORDS}?${u}`)})}getDashboardStats(){return xe(this,null,function*(){return this.apiCall(this.endpoints.DASHBOARD_STATS)})}getNumberCards(r){return xe(this,null,function*(){const a=new URLSearchParams;r!=null&&r.company&&a.append("company",r.company),r!=null&&r.site_name&&a.append("site_name",r.site_name);const n=a.toString(),i=n?`${this.endpoints.DASHBOARD_NUMBER_CARDS}?${n}`:this.endpoints.DASHBOARD_NUMBER_CARDS;return this.apiCall(i)})}getDashboardWorkOrderMetrics(r){return xe(this,null,function*(){const a=new URLSearchParams;r!=null&&r.company&&a.append("company",r.company),r!=null&&r.site_name&&a.append("site_name",r.site_name),r!=null&&r.work_order_type&&a.append("work_order_type",r.work_order_type),r!=null&&r.from_date&&a.append("from_date",r.from_date),r!=null&&r.to_date&&a.append("to_date",r.to_date);const n=a.toString(),i=n?`${this.endpoints.DASHBOARD_WORK_ORDER_METRICS}?${n}`:this.endpoints.DASHBOARD_WORK_ORDER_METRICS;return this.apiCall(i)})}getAssetDeviceStatusSummary(r){return xe(this,null,function*(){const a=new URLSearchParams;r!=null&&r.company&&a.append("company",r.company),r!=null&&r.site_name&&a.append("site_name",r.site_name),r!=null&&r.from_date&&a.append("from_date",r.from_date),r!=null&&r.to_date&&a.append("to_date",r.to_date);const n=a.toString(),i=n?`${this.endpoints.DASHBOARD_ASSET_DEVICE_STATUS}?${n}`:this.endpoints.DASHBOARD_ASSET_DEVICE_STATUS;return this.apiCall(i)})}listDashboardCharts(r=!0){return xe(this,null,function*(){const a=new URLSearchParams({public_only:r?"1":"0"});return this.apiCall(`${this.endpoints.DASHBOARD_LIST_CHARTS}?${a}`)})}getDashboardChartData(r,a){return xe(this,null,function*(){const n=new URLSearchParams({chart_name:r});return a&&n.append("report_filters",JSON.stringify(a)),this.apiCall(`${this.endpoints.DASHBOARD_CHART_DATA}?${n}`)})}getKycDetails(){return xe(this,null,function*(){return this.apiCall(this.endpoints.KYC_DETAILS)})}uploadFile(r){return xe(this,null,function*(){const a=new FormData;return a.append("file",r.file),a.append("doctype",r.doctype),a.append("docname",r.docname),a.append("fieldname",r.fieldname),this.apiCall(this.endpoints.UPLOAD_FILE,{method:"POST",headers:{},body:a})})}getUserPermissions(r){return xe(this,null,function*(){const a=r?`?user=${encodeURIComponent(r)}`:"";return this.apiCall(`${this.endpoints.GET_USER_PERMISSIONS}${a}`)})}getPermissionFilters(r,a){return xe(this,null,function*(){const n=new URLSearchParams({target_doctype:r});return a&&n.append("user",a),this.apiCall(`${this.endpoints.GET_PERMISSION_FILTERS}?${n}`)})}getAllowedValues(r,a){return xe(this,null,function*(){const n=new URLSearchParams({allow_doctype:r});return a&&n.append("user",a),this.apiCall(`${this.endpoints.GET_ALLOWED_VALUES}?${n}`)})}checkDocumentAccess(r,a,n){return xe(this,null,function*(){const i=new URLSearchParams({doctype:r,docname:a});return n&&i.append("user",n),this.apiCall(`${this.endpoints.CHECK_DOCUMENT_ACCESS}?${i}`)})}getConfiguredDoctypes(){return xe(this,null,function*(){return this.apiCall(this.endpoints.GET_CONFIGURED_DOCTYPES)})}getUserDefaults(r){return xe(this,null,function*(){const a=r?`?user=${encodeURIComponent(r)}`:"";return this.apiCall(`${this.endpoints.GET_USER_DEFAULTS}${a}`)})}isAuthenticated(){return!!localStorage.getItem("frappe_session_id")}getSessionId(){return localStorage.getItem("frappe_session_id")}setSessionId(r){localStorage.setItem("frappe_session_id",r)}}class ps extends Error{constructor(a,n,i){super(a);Ti(this,"status");Ti(this,"code");this.name="ApiError",this.status=n,this.code=i}}const _t=new KS;function JS(e){return xe(this,null,function*(){try{const r=yield _t.getDoctypeRecords("Translation",{language:e},["source_text","translated_text","context"],1e4,0),a={};return r.records&&r.records.length>0&&r.records.forEach(n=>{const i=n.source_text,c=n.translated_text||i;if(n.context){const u=`${n.context}.${i}`;a[u]=c}else i.includes("."),a[i]=c}),a}catch(r){return console.error("Error fetching translations from Frappe:",r),{}}})}function QS(e){const r={};return Object.keys(e).forEach(a=>{if(a.includes(".")){const n=a.split(".");let i=r;for(let c=0;c0&&Xn.addResourceBundle("en","translation",r,!0,!0);const a=yield V2("ar");Object.keys(a).length>0&&Xn.addResourceBundle("ar","translation",a,!0,!0),console.log("✓ Translations loaded from Frappe")}catch(e){console.warn("⚠ Could not load translations from Frappe, using static translations:",e)}})}Xn.on("initialized",()=>{jd()});var W2="popstate";function e5(e={}){function r(n,i){let{pathname:c,search:u,hash:g}=n.location;return Xx("",{pathname:c,search:u,hash:g},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function a(n,i){return typeof i=="string"?i:hu(i)}return r5(r,a,null,e)}function Qa(e,r){if(e===!1||e===null||typeof e=="undefined")throw new Error(r)}function xi(e,r){if(!e){typeof console!="undefined"&&console.warn(r);try{throw new Error(r)}catch(a){}}}function t5(){return Math.random().toString(36).substring(2,10)}function G2(e,r){return{usr:e.state,key:e.key,idx:r}}function Xx(e,r,a=null,n){return $e(_e({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof r=="string"?$d(r):r),{state:a,key:r&&r.key||n||t5()})}function hu({pathname:e="/",search:r="",hash:a=""}){return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),a&&a!=="#"&&(e+=a.charAt(0)==="#"?a:"#"+a),e}function $d(e){let r={};if(e){let a=e.indexOf("#");a>=0&&(r.hash=e.substring(a),e=e.substring(0,a));let n=e.indexOf("?");n>=0&&(r.search=e.substring(n),e=e.substring(0,n)),e&&(r.pathname=e)}return r}function r5(e,r,a,n={}){let{window:i=document.defaultView,v5Compat:c=!1}=n,u=i.history,g="POP",y=null,x=k();x==null&&(x=0,u.replaceState($e(_e({},u.state),{idx:x}),""));function k(){return(u.state||{idx:null}).idx}function N(){g="POP";let I=k(),z=I==null?null:I-x;x=I,y&&y({action:g,location:A.location,delta:z})}function C(I,z){g="PUSH";let U=Xx(A.location,I,z);x=k()+1;let B=G2(U,x),V=A.createHref(U);try{u.pushState(B,"",V)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;i.location.assign(V)}c&&y&&y({action:g,location:A.location,delta:1})}function O(I,z){g="REPLACE";let U=Xx(A.location,I,z);x=k();let B=G2(U,x),V=A.createHref(U);u.replaceState(B,"",V),c&&y&&y({action:g,location:A.location,delta:0})}function D(I){return a5(I)}let A={get action(){return g},get location(){return e(i,u)},listen(I){if(y)throw new Error("A history only accepts one active listener");return i.addEventListener(W2,N),y=I,()=>{i.removeEventListener(W2,N),y=null}},createHref(I){return r(i,I)},createURL:D,encodeLocation(I){let z=D(I);return{pathname:z.pathname,search:z.search,hash:z.hash}},push:C,replace:O,go(I){return u.go(I)}};return A}function a5(e,r=!1){let a="http://localhost";typeof window!="undefined"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Qa(a,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:hu(e);return n=n.replace(/ $/,"%20"),!r&&n.startsWith("//")&&(n=a+n),new URL(n,a)}function Q_(e,r,a="/"){return n5(e,r,a,!1)}function n5(e,r,a,n){let i=typeof r=="string"?$d(r):r,c=rl(i.pathname||"/",a);if(c==null)return null;let u=ew(e);s5(u);let g=null;for(let y=0;g==null&&y{let k={relativePath:x===void 0?u.path||"":x,caseSensitive:u.caseSensitive===!0,childrenIndex:g,route:u};if(k.relativePath.startsWith("/")){if(!k.relativePath.startsWith(n)&&y)return;Qa(k.relativePath.startsWith(n),`Absolute route path "${k.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),k.relativePath=k.relativePath.slice(n.length)}let N=Jo([n,k.relativePath]),C=a.concat(k);u.children&&u.children.length>0&&(Qa(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${N}".`),ew(u.children,r,C,N,y)),!(u.path==null&&!u.index)&&r.push({path:N,score:h5(N,u.index),routesMeta:C})};return e.forEach((u,g)=>{var y;if(u.path===""||!((y=u.path)!=null&&y.includes("?")))c(u,g);else for(let x of tw(u.path))c(u,g,!0,x)}),r}function tw(e){let r=e.split("/");if(r.length===0)return[];let[a,...n]=r,i=a.endsWith("?"),c=a.replace(/\?$/,"");if(n.length===0)return i?[c,""]:[c];let u=tw(n.join("/")),g=[];return g.push(...u.map(y=>y===""?c:[c,y].join("/"))),i&&g.push(...u),g.map(y=>e.startsWith("/")&&y===""?"/":y)}function s5(e){e.sort((r,a)=>r.score!==a.score?a.score-r.score:f5(r.routesMeta.map(n=>n.childrenIndex),a.routesMeta.map(n=>n.childrenIndex)))}var i5=/^:[\w-]+$/,o5=3,l5=2,c5=1,d5=10,u5=-2,$2=e=>e==="*";function h5(e,r){let a=e.split("/"),n=a.length;return a.some($2)&&(n+=u5),r&&(n+=l5),a.filter(i=>!$2(i)).reduce((i,c)=>i+(i5.test(c)?o5:c===""?c5:d5),n)}function f5(e,r){return e.length===r.length&&e.slice(0,-1).every((n,i)=>n===r[i])?e[e.length-1]-r[r.length-1]:0}function m5(e,r,a=!1){let{routesMeta:n}=e,i={},c="/",u=[];for(let g=0;g{if(k==="*"){let D=g[C]||"";u=c.slice(0,c.length-D.length).replace(/(.)\/+$/,"$1")}const O=g[C];return N&&!O?x[k]=void 0:x[k]=(O||"").replace(/%2F/g,"/"),x},{}),pathname:c,pathnameBase:u,pattern:e}}function g5(e,r=!1,a=!0){xi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,g,y)=>(n.push({paramName:g,isOptional:y!=null}),y?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,r?void 0:"i"),n]}function x5(e){try{return e.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return xi(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),e}}function rl(e,r){if(r==="/")return e;if(!e.toLowerCase().startsWith(r.toLowerCase()))return null;let a=r.endsWith("/")?r.length-1:r.length,n=e.charAt(a);return n&&n!=="/"?null:e.slice(a)||"/"}var p5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,y5=e=>p5.test(e);function b5(e,r="/"){let{pathname:a,search:n="",hash:i=""}=typeof e=="string"?$d(e):e,c;if(a)if(y5(a))c=a;else{if(a.includes("//")){let u=a;a=a.replace(/\/\/+/g,"/"),xi(!1,`Pathnames cannot have embedded double slashes - normalizing ${u} -> ${a}`)}a.startsWith("/")?c=X2(a.substring(1),"/"):c=X2(a,r)}else c=r;return{pathname:c,search:w5(n),hash:k5(i)}}function X2(e,r){let a=r.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?a.length>1&&a.pop():i!=="."&&a.push(i)}),a.length>1?a.join("/"):"/"}function px(e,r,a,n){return`Cannot include a '${e}' character in a manually specified \`to.${r}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function v5(e){return e.filter((r,a)=>a===0||r.route.path&&r.route.path.length>0)}function xp(e){let r=v5(e);return r.map((a,n)=>n===r.length-1?a.pathname:a.pathnameBase)}function pp(e,r,a,n=!1){let i;typeof e=="string"?i=$d(e):(i=_e({},e),Qa(!i.pathname||!i.pathname.includes("?"),px("?","pathname","search",i)),Qa(!i.pathname||!i.pathname.includes("#"),px("#","pathname","hash",i)),Qa(!i.search||!i.search.includes("#"),px("#","search","hash",i)));let c=e===""||i.pathname==="",u=c?"/":i.pathname,g;if(u==null)g=a;else{let N=r.length-1;if(!n&&u.startsWith("..")){let C=u.split("/");for(;C[0]==="..";)C.shift(),N-=1;i.pathname=C.join("/")}g=N>=0?r[N]:"/"}let y=b5(i,g),x=u&&u!=="/"&&u.endsWith("/"),k=(c||u===".")&&a.endsWith("/");return!y.pathname.endsWith("/")&&(x||k)&&(y.pathname+="/"),y}var Jo=e=>e.join("/").replace(/\/\/+/g,"/"),_5=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),w5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,k5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function N5(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function S5(e){return e.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var rw=["POST","PUT","PATCH","DELETE"];new Set(rw);var C5=["GET",...rw];new Set(C5);var Xd=E.createContext(null);Xd.displayName="DataRouter";var Zf=E.createContext(null);Zf.displayName="DataRouterState";E.createContext(!1);var aw=E.createContext({isTransitioning:!1});aw.displayName="ViewTransition";var E5=E.createContext(new Map);E5.displayName="Fetchers";var j5=E.createContext(null);j5.displayName="Await";var Di=E.createContext(null);Di.displayName="Navigation";var ku=E.createContext(null);ku.displayName="Location";var ao=E.createContext({outlet:null,matches:[],isDataRoute:!1});ao.displayName="Route";var yp=E.createContext(null);yp.displayName="RouteError";function T5(e,{relative:r}={}){Qa(Yd(),"useHref() may be used only in the context of a component.");let{basename:a,navigator:n}=E.useContext(Di),{hash:i,pathname:c,search:u}=Nu(e,{relative:r}),g=c;return a!=="/"&&(g=c==="/"?a:Jo([a,c])),n.createHref({pathname:g,search:u,hash:i})}function Yd(){return E.useContext(ku)!=null}function yi(){return Qa(Yd(),"useLocation() may be used only in the context of a component."),E.useContext(ku).location}var nw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function sw(e){E.useContext(Di).static||E.useLayoutEffect(e)}function ua(){let{isDataRoute:e}=E.useContext(ao);return e?H5():A5()}function A5(){Qa(Yd(),"useNavigate() may be used only in the context of a component.");let e=E.useContext(Xd),{basename:r,navigator:a}=E.useContext(Di),{matches:n}=E.useContext(ao),{pathname:i}=yi(),c=JSON.stringify(xp(n)),u=E.useRef(!1);return sw(()=>{u.current=!0}),E.useCallback((y,x={})=>{if(xi(u.current,nw),!u.current)return;if(typeof y=="number"){a.go(y);return}let k=pp(y,JSON.parse(c),i,x.relative==="path");e==null&&r!=="/"&&(k.pathname=k.pathname==="/"?r:Jo([r,k.pathname])),(x.replace?a.replace:a.push)(k,x.state,x)},[r,a,c,i,e])}E.createContext(null);function Yl(){let{matches:e}=E.useContext(ao),r=e[e.length-1];return r?r.params:{}}function Nu(e,{relative:r}={}){let{matches:a}=E.useContext(ao),{pathname:n}=yi(),i=JSON.stringify(xp(a));return E.useMemo(()=>pp(e,JSON.parse(i),n,r==="path"),[e,i,n,r])}function O5(e,r){return iw(e,r)}function iw(e,r,a,n,i){var U;Qa(Yd(),"useRoutes() may be used only in the context of a component.");let{navigator:c}=E.useContext(Di),{matches:u}=E.useContext(ao),g=u[u.length-1],y=g?g.params:{},x=g?g.pathname:"/",k=g?g.pathnameBase:"/",N=g&&g.route;{let B=N&&N.path||"";ow(x,!N||B.endsWith("*")||B.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${x}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let C=yi(),O;if(r){let B=typeof r=="string"?$d(r):r;Qa(k==="/"||((U=B.pathname)==null?void 0:U.startsWith(k)),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${k}" but pathname "${B.pathname}" was given in the \`location\` prop.`),O=B}else O=C;let D=O.pathname||"/",A=D;if(k!=="/"){let B=k.replace(/^\//,"").split("/");A="/"+D.replace(/^\//,"").split("/").slice(B.length).join("/")}let I=Q_(e,{pathname:A});xi(N||I!=null,`No routes matched location "${O.pathname}${O.search}${O.hash}" `),xi(I==null||I[I.length-1].route.element!==void 0||I[I.length-1].route.Component!==void 0||I[I.length-1].route.lazy!==void 0,`Matched leaf route at location "${O.pathname}${O.search}${O.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let z=I5(I&&I.map(B=>Object.assign({},B,{params:Object.assign({},y,B.params),pathname:Jo([k,c.encodeLocation?c.encodeLocation(B.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathname]),pathnameBase:B.pathnameBase==="/"?k:Jo([k,c.encodeLocation?c.encodeLocation(B.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:B.pathnameBase])})),u,a,n,i);return r&&z?E.createElement(ku.Provider,{value:{location:_e({pathname:"/",search:"",hash:"",state:null,key:"default"},O),navigationType:"POP"}},z):z}function R5(){let e=z5(),r=N5(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),a=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:n},c={padding:"2px 4px",backgroundColor:n},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:c},"ErrorBoundary")," or"," ",E.createElement("code",{style:c},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},r),a?E.createElement("pre",{style:i},a):null,u)}var M5=E.createElement(R5,null),D5=class extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){this.props.onError?this.props.onError(e,r):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?E.createElement(ao.Provider,{value:this.props.routeContext},E.createElement(yp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function L5({routeContext:e,match:r,children:a}){let n=E.useContext(Xd);return n&&n.static&&n.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(ao.Provider,{value:e},a)}function I5(e,r=[],a=null,n=null,i=null){if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(r.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let c=e,u=a==null?void 0:a.errors;if(u!=null){let k=c.findIndex(N=>N.route.id&&(u==null?void 0:u[N.route.id])!==void 0);Qa(k>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(u).join(",")}`),c=c.slice(0,Math.min(c.length,k+1))}let g=!1,y=-1;if(a)for(let k=0;k=0?c=c.slice(0,y+1):c=[c[0]];break}}}let x=a&&n?(k,N)=>{var C,O,D;n(k,{location:a.location,params:(D=(O=(C=a.matches)==null?void 0:C[0])==null?void 0:O.params)!=null?D:{},unstable_pattern:S5(a.matches),errorInfo:N})}:void 0;return c.reduceRight((k,N,C)=>{let O,D=!1,A=null,I=null;a&&(O=u&&N.route.id?u[N.route.id]:void 0,A=N.route.errorElement||M5,g&&(y<0&&C===0?(ow("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),D=!0,I=null):y===C&&(D=!0,I=N.route.hydrateFallbackElement||null)));let z=r.concat(c.slice(0,C+1)),U=()=>{let B;return O?B=A:D?B=I:N.route.Component?B=E.createElement(N.route.Component,null):N.route.element?B=N.route.element:B=k,E.createElement(L5,{match:N,routeContext:{outlet:k,matches:z,isDataRoute:a!=null},children:B})};return a&&(N.route.ErrorBoundary||N.route.errorElement||C===0)?E.createElement(D5,{location:a.location,revalidation:a.revalidation,component:A,error:O,children:U(),routeContext:{outlet:null,matches:z,isDataRoute:!0},onError:x}):U()},null)}function bp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function P5(e){let r=E.useContext(Xd);return Qa(r,bp(e)),r}function F5(e){let r=E.useContext(Zf);return Qa(r,bp(e)),r}function B5(e){let r=E.useContext(ao);return Qa(r,bp(e)),r}function vp(e){let r=B5(e),a=r.matches[r.matches.length-1];return Qa(a.route.id,`${e} can only be used on routes that contain a unique "id"`),a.route.id}function U5(){return vp("useRouteId")}function z5(){var n;let e=E.useContext(yp),r=F5("useRouteError"),a=vp("useRouteError");return e!==void 0?e:(n=r.errors)==null?void 0:n[a]}function H5(){let{router:e}=P5("useNavigate"),r=vp("useNavigate"),a=E.useRef(!1);return sw(()=>{a.current=!0}),E.useCallback((u,...g)=>xe(null,[u,...g],function*(i,c={}){xi(a.current,nw),a.current&&(typeof i=="number"?yield e.navigate(i):yield e.navigate(i,_e({fromRouteId:r},c)))}),[e,r])}var Y2={};function ow(e,r,a){!r&&!Y2[e]&&(Y2[e]=!0,xi(!1,a))}E.memo(V5);function V5({routes:e,future:r,state:a,unstable_onError:n}){return iw(e,void 0,a,n,r)}function fu({to:e,replace:r,state:a,relative:n}){Qa(Yd()," may be used only in the context of a component.");let{static:i}=E.useContext(Di);xi(!i," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:c}=E.useContext(ao),{pathname:u}=yi(),g=ua(),y=pp(e,xp(c),u,n==="path"),x=JSON.stringify(y);return E.useEffect(()=>{g(JSON.parse(x),{replace:r,state:a,relative:n})},[g,x,n,r,a]),null}function da(e){Qa(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function W5({basename:e="/",children:r=null,location:a,navigationType:n="POP",navigator:i,static:c=!1,unstable_useTransitions:u}){Qa(!Yd(),"You cannot render a inside another . You should never have more than one in your app.");let g=e.replace(/^\/*/,"/"),y=E.useMemo(()=>({basename:g,navigator:i,static:c,unstable_useTransitions:u,future:{}}),[g,i,c,u]);typeof a=="string"&&(a=$d(a));let{pathname:x="/",search:k="",hash:N="",state:C=null,key:O="default"}=a,D=E.useMemo(()=>{let A=rl(x,g);return A==null?null:{location:{pathname:A,search:k,hash:N,state:C,key:O},navigationType:n}},[g,x,k,N,C,O,n]);return xi(D!=null,` is not able to match the URL "${x}${k}${N}" because it does not start with the basename, so the won't render anything.`),D==null?null:E.createElement(Di.Provider,{value:y},E.createElement(ku.Provider,{children:r,value:D}))}function G5({children:e,location:r}){return O5(Yx(e),r)}function Yx(e,r=[]){let a=[];return E.Children.forEach(e,(n,i)=>{if(!E.isValidElement(n))return;let c=[...r,i];if(n.type===E.Fragment){a.push.apply(a,Yx(n.props.children,c));return}Qa(n.type===da,`[${typeof n.type=="string"?n.type:n.type.name}] is not a component. All component children of must be a or `),Qa(!n.props.index||!n.props.children,"An index route cannot have child routes.");let u={id:n.props.id||c.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(u.children=Yx(n.props.children,c)),a.push(u)}),a}var lf="get",cf="application/x-www-form-urlencoded";function qf(e){return typeof HTMLElement!="undefined"&&e instanceof HTMLElement}function $5(e){return qf(e)&&e.tagName.toLowerCase()==="button"}function X5(e){return qf(e)&&e.tagName.toLowerCase()==="form"}function Y5(e){return qf(e)&&e.tagName.toLowerCase()==="input"}function Z5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function q5(e,r){return e.button===0&&(!r||r==="_self")&&!Z5(e)}function Zx(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((r,a)=>{let n=e[a];return r.concat(Array.isArray(n)?n.map(i=>[a,i]):[[a,n]])},[]))}function K5(e,r){let a=Zx(e);return r&&r.forEach((n,i)=>{a.has(i)||r.getAll(i).forEach(c=>{a.append(i,c)})}),a}var Wh=null;function J5(){if(Wh===null)try{new FormData(document.createElement("form"),0),Wh=!1}catch(e){Wh=!0}return Wh}var Q5=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function yx(e){return e!=null&&!Q5.has(e)?(xi(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${cf}"`),null):e}function e8(e,r){let a,n,i,c,u;if(X5(e)){let g=e.getAttribute("action");n=g?rl(g,r):null,a=e.getAttribute("method")||lf,i=yx(e.getAttribute("enctype"))||cf,c=new FormData(e)}else if($5(e)||Y5(e)&&(e.type==="submit"||e.type==="image")){let g=e.form;if(g==null)throw new Error('Cannot submit a