aquasis-fe-components 1.3.2-c → 1.3.2-e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -70924,10 +70924,10 @@ const POe = {
|
|
|
70924
70924
|
/* @__PURE__ */ be.jsx("p", { className: "ant-upload-text", children: a("GENERAL.UPLOAD_LABEL") }),
|
|
70925
70925
|
/* @__PURE__ */ be.jsx("p", { className: "ant-upload-hint", children: a("GENERAL.JPG_PNG_WARNING") })
|
|
70926
70926
|
] }) });
|
|
70927
|
-
return /* @__PURE__ */ be.jsx(rn.List, { name: Ht.ReleasePages, children: (m) => /* @__PURE__ */ be.jsxs(be.Fragment, { children: [
|
|
70927
|
+
return /* @__PURE__ */ be.jsx($d, { infinite: !1, ref: t, beforeChange: (m, p) => c(p), adaptiveHeight: !0, children: /* @__PURE__ */ be.jsx(rn.List, { name: Ht.ReleasePages, children: (m) => /* @__PURE__ */ be.jsxs(be.Fragment, { children: [
|
|
70928
70928
|
/* @__PURE__ */ be.jsx(B0, { fieldName: "idRelease", hidden: !0 }),
|
|
70929
70929
|
/* @__PURE__ */ be.jsx(B0, { fieldName: "idReleasePage", hidden: !0 }),
|
|
70930
|
-
|
|
70930
|
+
m.map(({ key: p, name: g, ...v }) => {
|
|
70931
70931
|
var b, y;
|
|
70932
70932
|
const h = (b = l == null ? void 0 : l[g]) == null ? void 0 : b[Ht.Image], C = (y = l == null ? void 0 : l[g]) == null ? void 0 : y[Ht.NoImage];
|
|
70933
70933
|
return /* @__PURE__ */ be.jsx("div", { children: /* @__PURE__ */ be.jsxs(z1, { gutter: [8, 16], style: { marginBottom: 35 }, children: [
|
|
@@ -70965,8 +70965,8 @@ const POe = {
|
|
|
70965
70965
|
)
|
|
70966
70966
|
] }) })
|
|
70967
70967
|
] }) }, p);
|
|
70968
|
-
})
|
|
70969
|
-
] }) });
|
|
70968
|
+
})
|
|
70969
|
+
] }) }) });
|
|
70970
70970
|
}), Gr = "RELEASE-NOTES", _Oe = ({
|
|
70971
70971
|
addBtnLabel: e,
|
|
70972
70972
|
addBtnTooltipText: t,
|
|
@@ -1072,4 +1072,4 @@ This could lead to inefficient memoization and unnecessary re-renders.
|
|
|
1072
1072
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:o})}}},C$e=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:a,inputSelectorResultsCopy:i}=e,c=r(()=>({}),...o);if(!(c.apply(null,a)===c.apply(null,i))){let s;try{throw new Error}catch(d){({stack:s}=d)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
1073
1073
|
This means your output selector will likely run more frequently than intended.
|
|
1074
1074
|
Avoid returning a new reference inside your input selector, e.g.
|
|
1075
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:a,secondInputs:i,stack:s})}},S$e={inputStabilityCheck:"once",identityFunctionCheck:"once"};function x$e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function w$e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function L$e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var qT=e=>Array.isArray(e)?e:[e];function M$e(e){const t=Array.isArray(e[0])?e[0]:e;return L$e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function GT(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var z$e=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...S$e,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:y$e},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:C$e}}},E$e=class{constructor(e){this.value=e}deref(){return this.value}},N$e=typeof WeakRef<"u"?WeakRef:E$e,$$e=0,YT=1;function h3(){return{s:$$e,v:void 0,o:null,p:null}}function XT(e,t={}){let n=h3();const{resultEqualityCheck:r}=t;let o,a=0;function i(){var f;let c=n;const{length:l}=arguments;for(let m=0,p=l;m<p;m++){const g=arguments[m];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=c.o;v===null&&(c.o=v=new WeakMap);const h=v.get(g);h===void 0?(c=h3(),v.set(g,c)):c=h}else{let v=c.p;v===null&&(c.p=v=new Map);const h=v.get(g);h===void 0?(c=h3(),v.set(g,c)):c=h}}const s=c;let d;if(c.s===YT)d=c.v;else if(d=e.apply(null,arguments),a++,r){const m=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;m!=null&&r(m,d)&&(d=m,a!==0&&a--),o=typeof d=="object"&&d!==null||typeof d=="function"?new N$e(d):d}return s.s=YT,s.v=d,d}return i.clearCache=()=>{n=h3(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function O$e(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let a=0,i=0,c,l={},s=o.pop();typeof s=="object"&&(l=s,s=o.pop()),x$e(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:p=XT,argsMemoizeOptions:g=[],devModeChecks:v={}}=d,h=qT(m),y=qT(g),b=M$e(o),C=f(function(){return a++,s.apply(null,arguments)},...h);let x=!0;const S=p(function(){i++;const L=GT(b,arguments);if(c=C.apply(null,L),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:M,inputStabilityCheck:z}=z$e(x,v);if(M.shouldRun&&M.run(s,L,c),z.shouldRun){const E=GT(b,arguments);z.run({inputSelectorResults:L,inputSelectorResultsCopy:E},{memoize:f,memoizeOptions:h},arguments)}x&&(x=!1)}return c},...y);return Object.assign(S,{resultFunc:s,memoizedResultFunc:C,dependencies:b,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var P$e=O$e(XT),I$e=Object.assign((e,t=P$e)=>{w$e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((i,c,l)=>(i[n[l]]=c,i),{}))},{withTypes:()=>I$e});function QT(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?rr(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>c$e(r)&&r.type===e,n}function JT(e){return l2(e)?UT(e,()=>{}):e}function ZT(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?rr(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function eR(e){const t={},n=[];let r;const o={addCase(a,i){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?rr(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?rr(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const c=typeof a=="string"?a:a.type;if(!c)throw new Error(process.env.NODE_ENV==="production"?rr(28):"`builder.addCase` cannot be called with an empty action type");if(c in t)throw new Error(process.env.NODE_ENV==="production"?rr(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${c}'`);return t[c]=i,o},addMatcher(a,i){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?rr(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:a,reducer:i}),o},addDefaultCase(a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?rr(31):"`builder.addDefaultCase` can only be called once");return r=a,o}};return e(o),[t,n,r]}function T$e(e){return typeof e=="function"}function R$e(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?rr(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=eR(t),a;if(T$e(e))a=()=>JT(e());else{const c=JT(e);a=()=>c}function i(c=a(),l){let s=[n[l.type],...r.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return s.filter(d=>!!d).length===0&&(s=[o]),s.reduce((d,f)=>{if(f)if(wo(d)){const p=f(d,l);return p===void 0?d:p}else{if(l2(d))return UT(d,m=>f(m,l));{const m=f(d,l);if(m===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return d},c)}return i.getInitialState=a,i}var k$e=Symbol.for("rtk-slice-createasyncthunk");function _$e(e,t){return`${e}/${t}`}function D$e({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[k$e];return function(o){const{name:a,reducerPath:i=a}=o;if(!a)throw new Error(process.env.NODE_ENV==="production"?rr(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const c=(typeof o.reducers=="function"?o.reducers(j$e()):o.reducers)||{},l=Object.keys(c),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(C,x){const S=typeof C=="string"?C:C.type;if(!S)throw new Error(process.env.NODE_ENV==="production"?rr(12):"`context.addCase` cannot be called with an empty action type");if(S in s.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?rr(13):"`context.addCase` cannot be called with two reducers for the same action type: "+S);return s.sliceCaseReducersByType[S]=x,d},addMatcher(C,x){return s.sliceMatchers.push({matcher:C,reducer:x}),d},exposeAction(C,x){return s.actionCreators[C]=x,d},exposeCaseReducer(C,x){return s.sliceCaseReducersByName[C]=x,d}};l.forEach(C=>{const x=c[C],S={reducerName:C,type:_$e(a,C),createNotation:typeof o.reducers=="function"};H$e(x)?W$e(S,x,d,t):B$e(S,x,d)});function f(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?rr(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[C={},x=[],S=void 0]=typeof o.extraReducers=="function"?eR(o.extraReducers):[o.extraReducers],w={...C,...s.sliceCaseReducersByType};return R$e(o.initialState,L=>{for(let M in w)L.addCase(M,w[M]);for(let M of s.sliceMatchers)L.addMatcher(M.matcher,M.reducer);for(let M of x)L.addMatcher(M.matcher,M.reducer);S&&L.addDefaultCase(S)})}const m=C=>C,p=new Map;let g;function v(C,x){return g||(g=f()),g(C,x)}function h(){return g||(g=f()),g.getInitialState()}function y(C,x=!1){function S(L){let M=L[C];if(typeof M>"u"){if(x)M=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?rr(15):"selectSlice returned undefined for an uninjected slice reducer")}return M}function w(L=m){const M=ZT(p,x,{insert:()=>new WeakMap});return ZT(M,L,{insert:()=>{const z={};for(const[E,O]of Object.entries(o.selectors??{}))z[E]=A$e(O,L,h,x);return z}})}return{reducerPath:C,getSelectors:w,get selectors(){return w(S)},selectSlice:S}}const b={name:a,reducer:v,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:h,...y(i),injectInto(C,{reducerPath:x,...S}={}){const w=x??i;return C.inject({reducerPath:w,reducer:v},S),{...b,...y(w,!0)}}};return b}}function A$e(e,t,n,r){function o(a,...i){let c=t(a);if(typeof c>"u"){if(r)c=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?rr(16):"selectState returned undefined for an uninjected slice reducer")}return e(c,...i)}return o.unwrapped=e,o}var F$e=D$e();function j$e(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function B$e({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!V$e(r))throw new Error(process.env.NODE_ENV==="production"?rr(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?QT(e,i):QT(e))}function H$e(e){return e._reducerDefinitionType==="asyncThunk"}function V$e(e){return e._reducerDefinitionType==="reducerWithPrepare"}function W$e({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?rr(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:i,pending:c,rejected:l,settled:s,options:d}=n,f=o(e,a,d);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),c&&r.addCase(f.pending,c),l&&r.addCase(f.rejected,l),s&&r.addMatcher(f.settled,s),r.exposeCaseReducer(t,{fulfilled:i||v3,pending:c||v3,rejected:l||v3,settled:s||v3})}function v3(){}function rr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const K$e={theme:qc.Light,currentSlide:0},U$e=F$e({name:"AppState",initialState:K$e,reducers:{updTheme:(e,{payload:t})=>{e.theme=t},updLanguage:(e,{payload:t})=>{e.language=t},updateCurrSlide:(e,{payload:t})=>{e.currentSlide=t}}}),{updTheme:EPe,updLanguage:NPe,updateCurrSlide:q$e}=U$e.actions,G$e=({index:e})=>{const{t}=c2(),{requiredField:n}=Js();return be.jsx(en.List,{name:[e,At.Fields],children:(r,{remove:o})=>be.jsxs(be.Fragment,{children:[be.jsx(Zs,{fieldName:"idReleasePage",hidden:!0}),be.jsx(b1,{gap:16,vertical:!0,children:r.map(({key:a,name:i,...c})=>be.jsxs(b1,{gap:6,align:"center",children:[be.jsxs(b1,{vertical:!0,gap:2,style:{width:"100%"},children:[be.jsx(en.Item,{...c,name:[i,At.Title],rules:n,noStyle:!0,children:be.jsx(O1,{placeholder:t("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),be.jsx(en.Item,{...c,name:[i,At.Description],rules:n,noStyle:!0,children:be.jsx(I8,{autoSize:{minRows:2},placeholder:t("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),be.jsx(en.Item,{noStyle:!0,children:be.jsx(lr,{title:t("GENERAL.REMOVE"),children:be.jsx(dn,{type:"text",icon:be.jsx(XS,{}),onClick:()=>o(i),disabled:r.length===1})})})]},a))})]})})},Y$e=P.forwardRef((e,t)=>{const[n,r]=P.useState([]),{t:o}=c2(),a=yEe(),i=en.useFormInstance(),c=m=>a(q$e(m)),l=en.useWatch(At.ReleasePages,i),s=m=>({file:p,fileList:g})=>{const v=m[0],h=m[1],y=l[v];r(g),ww(p.originFileObj,b=>{i.setFieldValue(At.ReleasePages,l.toSpliced(v,1,{...y,[h]:b}))})},d=m=>()=>{var y;const p=l==null?void 0:l[m],v=[...((y=l==null?void 0:l[m])==null?void 0:y[At.Fields])??[],{}],h=l.toSpliced(m,1,{...p,[At.Fields]:v});i.setFieldValue(At.ReleasePages,h)},f=be.jsx(Sr,{justify:"center",align:"middle",children:be.jsxs(q0,{direction:"vertical",children:[be.jsx("p",{className:"ant-upload-drag-icon",children:be.jsx(ed,{})}),be.jsx("p",{className:"ant-upload-text",children:o("GENERAL.UPLOAD_LABEL")}),be.jsx("p",{className:"ant-upload-hint",children:o("GENERAL.JPG_PNG_WARNING")})]})});return be.jsx(en.List,{name:At.ReleasePages,children:m=>be.jsxs(be.Fragment,{children:[be.jsx(Zs,{fieldName:"idRelease",hidden:!0}),be.jsx(Zs,{fieldName:"idReleasePage",hidden:!0}),be.jsx(v8,{infinite:!1,ref:t,beforeChange:(p,g)=>c(g),adaptiveHeight:!0,children:m.map(({key:p,name:g,...v})=>{var b,C;const h=(b=l==null?void 0:l[g])==null?void 0:b[At.Image],y=(C=l==null?void 0:l[g])==null?void 0:C[At.NoImage];return be.jsx("div",{children:be.jsxs(Sr,{gutter:[8,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:24,children:be.jsxs(Sr,{gutter:8,children:[be.jsx(Ln,{span:y?24:12,children:be.jsx(G$e,{index:g})}),!y&&be.jsx(Ln,{span:12,children:be.jsx(co,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(en.Item,{...v,name:[g,At.Image],noStyle:!0,children:be.jsx(ys,{listType:"picture",className:"release-notes-image",showUploadList:!1,fileList:n,beforeUpload:tae,onChange:s([g,At.Image]),children:h?be.jsx(Z0,{src:h,preview:!1,style:{maxHeight:600}}):f})})})})]})}),be.jsx(Ln,{span:8,children:be.jsxs(b1,{vertical:!0,children:[be.jsx(en.Item,{children:be.jsx(dn,{type:"dashed",onClick:d(g),icon:be.jsx(T0,{}),block:!0,children:o("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})}),be.jsx(LEe,{fieldName:[g,At.NoImage],label:o("GENERAL.DO_NOT_USE_IMAGE"),onChange:x=>{const S=x.target.checked,w=l.map((L,M)=>({...L,[At.NoImage]:M===g?S:L[At.NoImage],[At.Image]:M===g&&S?void 0:L[At.Image]}));i.setFieldValue(At.ReleasePages,w)}})]})})]})},p)})})]})})}),s2="RELEASE-NOTES",X$e=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,beforeOpenModal:r,beforeCloseModal:o,afterSubmit:a})=>{const[i,c]=P.useState(!1),[l,s]=P.useState(!1),[d]=en.useForm(),{t:f}=c2(),m=Qs(),{getColor:p}=SEe(),g=P.useRef(null),{requiredField:v}=Js(),h=UI(bEe),{data:y}=RT(),b=en.useWatch(At.ReleasePages,d),C=()=>d.resetFields();P.useEffect(()=>{n&&(c(!0),d.setFieldsValue({...n,[At.ReleasePages]:n[At.ReleasePages].map(N=>({...N,[At.Image]:Kd(N[At.Image])})),[At.DeployDate]:Qn(n[At.DeployDate])}))},[n]);const x=()=>{r?new Promise(N=>N(r())).then(()=>c(!0)):c(!0)},S=()=>{o?new Promise(N=>N(o())).then(()=>c(!1)):c(!1)},w=()=>{var R;d.setFieldValue(At.ReleasePages,[...b,{[At.Fields]:[{}]}]);const N=d.getFieldValue(At.ReleasePages);(R=g.current)==null||R.goTo(N.length-1)},L=()=>{var R;d.setFieldValue(At.ReleasePages,b.filter((A,D)=>D!==h));const N=d.getFieldValue(At.ReleasePages);(R=g.current)==null||R.goTo(N.length-1)},M=N=>{const R={...N,[At.DeployDate]:Qn(N[At.DeployDate]).format(e_),[At.ReleasePages]:N[At.ReleasePages].map((A,D)=>({...A,[At.Image]:Lw(A[At.Image]),order:D,[At.Fields]:A[At.Fields].map((F,V)=>({...F,order:V}))}))};r$e(R).then(()=>{C(),rc.success(f("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:f(`${s2}.TEXT_SINGULAR`)})),a&&a()}).catch(A=>{var F;const D=((F=A.response)==null?void 0:F.data)??[];ac.error({message:f("GENERAL.ERROR"),description:be.jsx(Y8,{dataSource:D,renderItem:V=>be.jsx(Y8.Item,{children:f(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${V.error}`)})})})}).finally(S)},z=h===0,E=h===(b==null?void 0:b.length)-1,O=(b==null?void 0:b.length)<=1,I=be.jsxs(b1,{justify:"flex-end",gap:8,children:[be.jsx(dn,{type:"dashed",icon:be.jsx(S1,{icon:QO}),onClick:()=>{var N;return(N=g.current)==null?void 0:N.prev()},disabled:z,children:f("GENERAL.BACK")}),be.jsx(dn,{type:"dashed",iconPosition:"end",icon:be.jsx(S1,{icon:JO}),onClick:()=>{var N;return(N=g.current)==null?void 0:N.next()},disabled:E,children:f("GENERAL.NEXT")}),be.jsx(dn,{type:"dashed",danger:!0,icon:be.jsx(S1,{icon:JN}),onClick:L,disabled:O,children:f(`${s2}.REMOVE_CURRENT_SLIDE`)}),be.jsx(dn,{type:"dashed",icon:be.jsx(S1,{icon:NP}),onClick:w,children:f(`${s2}.ADD_NEW_SLIDE`)}),be.jsx(dn,{type:"primary",icon:be.jsx(S1,{icon:FN}),onClick:()=>d.submit(),children:f("GENERAL.SAVE")})]}),_=N=>{s(t?N:!1)},$={[At.ReleasePages]:[{[At.Fields]:[{}]}],[At.DeployDate]:Qn()},T=nae(y??[],"appName","id"),k=P.useMemo(()=>f(`${s2}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`),[m]);return be.jsxs(be.Fragment,{children:[be.jsx(lr,{title:t,open:l,onOpenChange:_,children:be.jsx(dn,{type:"primary",icon:be.jsx(S1,{icon:UE}),shape:e?"default":"circle",onClick:x,children:e})}),be.jsx(xr,{open:i,title:k,onCancel:S,width:"60%",footer:I,destroyOnClose:!0,children:be.jsxs(en,{form:d,layout:"vertical",initialValues:$,onFinish:M,children:[be.jsx(Zs,{fieldName:"idRelease",hidden:!0}),be.jsxs(Sr,{gutter:10,children:[be.jsx(Ln,{span:8,children:be.jsx(xEe,{fieldName:At.App,label:f(`${s2}.FORM.FIELDS.APP`),placeholder:f(`${s2}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:T,rules:v})}),be.jsx(Ln,{span:8,children:be.jsx(x1,{fieldName:At.Version,label:f(`${s2}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:f(`${s2}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:N=>N.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...v,()=>({validator(N,R){var F,V;const A=/[^0-9]$/,D=(V=(F=R==null?void 0:R.split("."))==null?void 0:F.filter(Boolean))==null?void 0:V.length;return A.test(R)?Promise.reject(new Error(f("GENERAL.FORM.ERRORS.VERSION"))):D>3||D<3?Promise.reject(new Error(f("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:8,children:be.jsx(wEe,{fieldName:At.DeployDate,label:f(`${s2}.FORM.FIELDS.DEPLOY_DATE`),format:Zk,rules:v})}),be.jsx(Ln,{span:24,children:be.jsx(co,{styles:{body:{background:p("PrimaryColorBgContainer")}},children:be.jsx(Y$e,{ref:g})})})]})]})})]})},{Title:Q$e,Text:J$e}=za,Z$e=()=>{var M,z;const[e,t]=P.useState(!1),[n,r]=P.useState(!1),[o,a]=P.useState(0),{t:i}=c2(),c=Qs(),l=P.useRef(null),s=P2(Gr.AppId),d=P2(Gr.UserID),{data:f}=RT(),{data:m}=a$e({idApp:s,lastDeployed:!0,userId:d}),p=m==null?void 0:m[0],g=f==null?void 0:f.find(E=>E.id===s);P.useEffect(()=>{if(m!=null&&m.length){const E=m[0],O=!E.readRelease&&!!E.isDeployed;t(O)}},[m]);const v=()=>{const E=m==null?void 0:m[0];n&&(E!=null&&E.isDeployed)&&o$e(E==null?void 0:E.idRelease,d),t(!1)},h=()=>{var E;return(E=l.current)==null?void 0:E.next()},y=()=>{var E;return(E=l.current)==null?void 0:E.prev()},b=E=>a(E),C=o===0,x=o===(((M=p==null?void 0:p.gaReleasePages)==null?void 0:M.length)??0)-1,S=E=>r(E.target.checked),w=be.jsxs(b1,{justify:"space-between",align:"center",children:[be.jsx(n2,{checked:n,onChange:S,children:i("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),be.jsxs(b1,{gap:8,children:[!C&&be.jsx(dn,{onClick:y,children:i("Prev")}),!x&&be.jsx(dn,{type:"primary",onClick:h,children:i("GENERAL.ACTIONS.NEXT")}),x&&be.jsx(dn,{type:"primary",onClick:v,children:i("GENERAL.ACTIONS.CLOSE")})]})]}),L=P.useMemo(()=>i("RELEASE-NOTES.WHATS_NEWS",{app:g==null?void 0:g.appName,version:p==null?void 0:p.version}),[c]);return be.jsx(xr,{open:e,title:L,onCancel:v,width:"70%",footer:w,children:be.jsx(v8,{infinite:!1,ref:l,afterChange:b,children:(z=p==null?void 0:p.gaReleasePages)==null?void 0:z.map(({idFile:E,gaReleasePagesContent:O},I)=>be.jsx("div",{children:be.jsxs(Sr,{gutter:[16,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:E?12:24,children:be.jsx(b1,{gap:16,vertical:!0,children:O.map(({title:_,description:$},T)=>be.jsxs(b1,{vertical:!0,children:[be.jsx(Q$e,{level:5,children:_}),be.jsx(J$e,{style:{opacity:.5},children:$})]},`${I}-${T}`))})}),!!E&&be.jsx(Ln,{span:12,children:be.jsx(b1,{justify:"center",children:be.jsx(co,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(Z0,{src:Kd(E),style:{maxHeight:600,borderRadius:8}})})})})]})},I))})})},tR=new Z7({defaultOptions:{queries:{retry:2}}}),eOe=({showAddBtn:e,...t})=>e?be.jsx(Ud,{children:be.jsx(G3,{client:tR,children:be.jsx(X$e,{...t})})}):be.jsx(Ud,{children:be.jsx(G3,{client:tR,children:be.jsx(Z$e,{})})}),tOe=B3()(eOe);var dr=(e=>(e.FirstName="firstName",e.LastName="lastName",e.Username="username",e.Email="email",e.ProfilePicture="profilePicture",e.Password="password",e.ConfirmPassword="confirmPassword",e.Apps="userRolesApp",e.AppId="idApp",e.RoleId="roleId",e.Tenants="tenantId",e.Active="isActive",e.Private="isPrivate",e.User="userId",e.Hierarchy="hierarchy",e))(dr||{}),b3=(e=>(e.Tab1="PROFILE",e.Tab2="MANAGEMENT",e))(b3||{}),nR=(e=>(e[e.GA_USER_EMPTY=0]="GA_USER_EMPTY",e[e.GA_EMAIL_EMPTY=1]="GA_EMAIL_EMPTY",e[e.GA_USER_ID_EMPTY=2]="GA_USER_ID_EMPTY",e[e.GA_PASS_EMPTY=3]="GA_PASS_EMPTY",e[e.GA_PASS_NOT_MATCH=4]="GA_PASS_NOT_MATCH",e[e.GA_USERNAME_EXISTS=5]="GA_USERNAME_EXISTS",e[e.GA_EMAIL_EXISTS=6]="GA_EMAIL_EXISTS",e[e.GA_NO_ROLES_APP_DEFINED=7]="GA_NO_ROLES_APP_DEFINED",e[e.GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP=8]="GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP",e[e.GA_CANNOT_GET_USER_INFO=9]="GA_CANNOT_GET_USER_INFO",e[e.GA_ERROR_CHAGING_PASS=10]="GA_ERROR_CHAGING_PASS",e[e.GA_NO_TENANTS_ROLES_DEFINDED=11]="GA_NO_TENANTS_ROLES_DEFINDED",e[e.GA_PASS_DOES_NOT_MEET_REQUIREMENTS=12]="GA_PASS_DOES_NOT_MEET_REQUIREMENTS",e))(nR||{});const jt=e=>typeof e=="string",Oc=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},rR=e=>e==null?"":""+e,nOe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},rOe=/###/g,oR=e=>e&&e.indexOf("###")>-1?e.replace(rOe,"."):e,aR=e=>!e||jt(e),Pc=(e,t,n)=>{const r=jt(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(aR(e))return{};const a=oR(r[o]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o}return aR(e)?{}:{obj:e,k:oR(r[o])}},iR=(e,t,n)=>{const{obj:r,k:o}=Pc(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),c=Pc(e,i,Object);for(;c.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),c=Pc(e,i,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},oOe=(e,t,n,r)=>{const{obj:o,k:a}=Pc(e,t,Object);o[a]=o[a]||[],o[a].push(n)},y3=(e,t)=>{const{obj:n,k:r}=Pc(e,t);if(n)return n[r]},aOe=(e,t,n)=>{const r=y3(e,n);return r!==void 0?r:y3(t,n)},cR=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?jt(e[r])||e[r]instanceof String||jt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):cR(e[r],t[r],n):e[r]=t[r]);return e},Aa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var iOe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const cOe=e=>jt(e)?e.replace(/[&<>"'\/]/g,t=>iOe[t]):e;class lOe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const sOe=[" ",",","?","!",";"],uOe=new lOe(20),dOe=(e,t,n)=>{t=t||"",n=n||"";const r=sOe.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=uOe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a},a7=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,c="";for(let l=a;l<r.length;++l)if(l!==a&&(c+=n),c+=r[l],i=o[c],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},C3=e=>e==null?void 0:e.replace("_","-"),fOe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class S3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||fOe,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(jt(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new S3(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new S3(this.logger,t)}}var j1=new S3;class x3{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c.apply(c,[t,...r])})}}class lR extends x3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var s,d;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):jt(r)&&a?c.push(...r.split(a)):c.push(r)));const l=y3(this.data,c);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),l||!i||!jt(r)?l:a7((d=(s=this.data)==null?void 0:s[t])==null?void 0:d[n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),iR(this.data,c,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(jt(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let l=y3(this.data,c)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?cR(l,r,a):l={...l,...r},iR(this.data,c,l),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var sR={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{var i;t=((i=this.processors[a])==null?void 0:i.process(t,n,r,o))??t}),t}};const uR={};class w3 extends x3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),nOe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=j1.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!dOe(t,r,o);if(i&&!c){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:jt(a)?[a]:a};const s=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),t=s.join(o)}return{key:t,namespaces:jt(a)?[a]:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(t[t.length-1],n),l=c[c.length-1],s=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((s==null?void 0:s.toLowerCase())==="cimode"){if(d){const x=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${x}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${x}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let m=f==null?void 0:f.res;const p=(f==null?void 0:f.usedKey)||i,g=(f==null?void 0:f.exactUsedKey)||i,v=Object.prototype.toString.apply(m),h=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,C=!jt(m)&&typeof m!="boolean"&&typeof m!="number";if(b&&m&&C&&h.indexOf(v)<0&&!(jt(y)&&Array.isArray(m))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,m,{...n,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(f.res=x,f.usedParams=this.getUsedParamsDetails(n),f):x}if(a){const x=Array.isArray(m),S=x?[]:{},w=x?g:p;for(const L in m)if(Object.prototype.hasOwnProperty.call(m,L)){const M=`${w}${a}${L}`;S[L]=this.translate(M,{...n,joinArrays:!1,ns:c}),S[L]===M&&(S[L]=m[L])}m=S}}else if(b&&jt(y)&&Array.isArray(m))m=m.join(y),m&&(m=this.extendTranslation(m,t,n,r));else{let x=!1,S=!1;const w=n.count!==void 0&&!jt(n.count),L=w3.hasDefaultValue(n),M=w?this.pluralResolver.getSuffix(s,n.count,n):"",z=n.ordinal&&w?this.pluralResolver.getSuffix(s,n.count,{ordinal:!1}):"",E=w&&!n.ordinal&&n.count===0,O=E&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${z}`]||n.defaultValue;!this.isValidLookup(m)&&L&&(x=!0,m=O),this.isValidLookup(m)||(S=!0,m=i);const _=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:m,$=L&&O!==m&&this.options.updateMissing;if(S||x||$){if(this.logger.log($?"updateKey":"missingKey",s,l,i,$?O:m),a){const R=this.resolve(i,{...n,keySeparator:!1});R&&R.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 T=[];const k=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&k&&k[0])for(let R=0;R<k.length;R++)T.push(k[R]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(n.lng||this.language):T.push(n.lng||this.language);const N=(R,A,D)=>{var V;const F=L&&D!==m?D:_;this.options.missingKeyHandler?this.options.missingKeyHandler(R,l,A,F,$,n):(V=this.backendConnector)!=null&&V.saveMissing&&this.backendConnector.saveMissing(R,l,A,F,$,n),this.emit("missingKey",R,l,A,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(R=>{const A=this.pluralResolver.getSuffixes(R,n);E&&n[`defaultValue${this.options.pluralSeparator}zero`]&&A.indexOf(`${this.options.pluralSeparator}zero`)<0&&A.push(`${this.options.pluralSeparator}zero`),A.forEach(D=>{N([R],i+D,n[`defaultValue${D}`]||O)})}):N(T,i,O))}m=this.extendTranslation(m,t,n,f,r),S&&m===i&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${i}`),(S||x)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,x?m:void 0))}return o?(f.res=m,f.usedParams=this.getUsedParamsDetails(n),f):m}extendTranslation(t,n,r,o,a){var s,d;var i=this;if((s=this.i18nFormat)!=null&&s.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=jt(t)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(f){const g=t.match(this.interpolator.nestingRegexp);m=g&&g.length}let p=r.replace&&!jt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||o.usedLng,r),f){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;m<v&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var g=arguments.length,v=new Array(g),h=0;h<g;h++)v[h]=arguments[h];return(a==null?void 0:a[0])===v[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):i.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,l=jt(c)?[c]:c;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=sR.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,c;return jt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const s=this.extractFromKey(l,n),d=s.key;o=d;let f=s.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!jt(n.count),p=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(jt(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(h=>{var y,b;this.isValidLookup(r)||(c=h,!uR[`${v[0]}-${h}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(c))&&(uR[`${v[0]}-${h}`]=!0,this.logger.warn(`key "${o}" for languages "${v.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(C=>{var w;if(this.isValidLookup(r))return;i=C;const x=[d];if((w=this.i18nFormat)!=null&&w.addLookupKeys)this.i18nFormat.addLookupKeys(x,d,C,h,n);else{let L;m&&(L=this.pluralResolver.getSuffix(C,n.count,n));const M=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(d+L),n.ordinal&&L.indexOf(z)===0&&x.push(d+L.replace(z,this.options.pluralSeparator)),p&&x.push(d+M)),g){const E=`${d}${this.options.contextSeparator}${n.context}`;x.push(E),m&&(x.push(E+L),n.ordinal&&L.indexOf(z)===0&&x.push(E+L.replace(z,this.options.pluralSeparator)),p&&x.push(E+M))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(a=S,r=this.getResource(C,h,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var a;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!jt(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class dR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=j1.create("languageUtils")}getScriptPartFromCode(t){if(t=C3(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=C3(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(jt(t)&&t.indexOf("-")>-1){let n=Intl.getCanonicalLocales(t)[0];return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),jt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return jt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):jt(t)&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const fR={zero:0,one:1,two:2,few:3,many:4,other:5},mR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class mOe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=j1.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=C3(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),mR;if(!t.match(/-|_/))return mR;const l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>fR[o]-fR[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const pR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=aOe(e,t,n);return!a&&o&&jt(n)&&(a=a7(e,n,r),a===void 0&&(a=a7(t,n,r))),a},i7=e=>e.replace(/\$/g,"$$$$");class pOe{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j1.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:c,suffixEscaped:l,formatSeparator:s,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:h,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:cOe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?Aa(a):i||"{{",this.suffix=c?Aa(c):l||"}}",this.formatSeparator=s||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Aa(m):p||Aa("$t("),this.nestingSuffix=g?Aa(g):v||Aa(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){var p;let a,i,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=g=>{if(g.indexOf(this.formatSeparator)<0){const b=pR(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...o,...n,interpolationkey:g}):b}const v=g.split(this.formatSeparator),h=v.shift().trim(),y=v.join(this.formatSeparator).trim();return this.format(pR(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:h})};this.resetRegExp();const d=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=o==null?void 0:o.interpolation)==null?void 0:p.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>i7(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?i7(this.escape(g)):i7(g)}].forEach(g=>{for(c=0;a=g.regex.exec(t);){const v=a[1].trim();if(i=s(v),i===void 0)if(typeof d=="function"){const y=d(t,a,o);i=jt(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,v))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!jt(i)&&!this.useRawValueToEscape&&(i=rR(i));const h=g.safeValue(i);if(t=t.replace(a[0],h),f?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;const c=(l,s)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const p=m.match(/'/g),g=m.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||g.length%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),s&&(i={...s,...i})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];i={...r},i=i.replace&&!jt(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let s=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=d.shift(),l=d,s=!0}if(a=n(c.call(this,o[1].trim(),i),i),a&&o[0]===t&&!jt(a))return a;jt(a)||(a=rR(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),s&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}const gOe=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[c,...l]=i.split(":"),s=l.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();n[d]||(n[d]=s),s==="false"&&(n[d]=!1),s==="true"&&(n[d]=!0),isNaN(s)||(n[d]=parseInt(s,10))}})}return{formatName:t,formatOptions:n}},Fa=e=>{const t={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let c=t[i];return c||(c=e(C3(r),o),t[i]=c),c(n)}};class hOe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j1.create("formatter"),this.options=t,this.formats={number:Fa((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:Fa((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:Fa((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:Fa((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:Fa((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Fa(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,l)=>{var f;const{formatName:s,formatOptions:d}=gOe(l);if(this.formats[s]){let m=c;try{const p=((f=o==null?void 0:o.formatParams)==null?void 0:f[o.interpolationkey])||{},g=p.locale||p.lng||o.locale||o.lng||r;m=this.formats[s](c,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return m}else this.logger.warn(`there was no format function for ${s}`);return c},t)}}const vOe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class bOe extends x3{constructor(t,n,r){var a,i;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=j1.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,o.backend,o)}queueLoad(t,n,r,o){const a={},i={},c={},l={};return t.forEach(s=>{let d=!0;n.forEach(f=>{const m=`${s}|${f}`;!r.reload&&this.store.hasResourceBundle(s,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(c[s]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const c={};this.queue.forEach(l=>{oOe(l.loaded,[a],i),vOe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(s=>{c[s]||(c[s]={});const d=l.loaded[s];d.length&&d.forEach(f=>{c[s][f]===void 0&&(c[s][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const c=(s,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(s&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,i)},a);return}i(s,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const s=l(t,n);s&&typeof s.then=="function"?s.then(d=>c(null,d)).catch(c):c(null,s)}catch(s){c(s)}return}return l(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();jt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),jt(n)&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,c)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&c&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,c),this.loaded(t,i,c)})}saveMissing(t,n,r,o,a){var l,s,d,f,m;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((s=(l=this.services)==null?void 0:l.utils)!=null&&s.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((m=this.backend)!=null&&m.create){const p={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(t,n,r,o,p):v=g(t,n,r,o),v&&typeof v.then=="function"?v.then(h=>c(null,h)).catch(c):c(null,v)}catch(v){c(v)}else g(t,n,r,o,c,p)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const gR=()=>({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 t={};if(typeof e[1]=="object"&&(t=e[1]),jt(e[1])&&(t.defaultValue=e[1]),jt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),hR=e=>{var t,n;return jt(e.ns)&&(e.ns=[e.ns]),jt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),jt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},L3=()=>{},yOe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ic extends x3{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=hR(t),this.services={},this.logger=j1,this.modules={external:[]},yOe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(jt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=gR();this.options={...o,...this.options,...hR(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?j1.init(a(this.modules.logger),this.options):j1.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=hOe;const f=new dR(this.options);this.store=new lR(this.options.resources,this.options);const m=this.services;m.logger=j1,m.resourceStore=this.store,m.languageUtils=f,m.pluralResolver=new mOe(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(m.formatter=a(d),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new pOe(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new bOe(a(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.languageDetector&&(m.languageDetector=a(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=a(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new w3(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=L3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=Oc(),s=()=>{const d=(f,m)=>{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),l.resolve(m),r(f,m)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),l}loadResources(t){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L3;const o=jt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const c=[],l=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(f=>{f!=="cimode"&&c.indexOf(f)<0&&c.push(f)})};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>l(d)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,s=>l(s)),this.services.backendConnector.load(c,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=Oc();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=L3),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&sR.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Oc();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,s)=>{s?(a(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},c=l=>{var d,f;!t&&!l&&this.services.languageDetector&&(l=[]);const s=jt(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);s&&(this.language||a(s),this.translator.language||this.translator.changeLanguage(s),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,s)),this.loadResources(s,m=>{i(m,s)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const a=function(i,c){let l;if(typeof c!="object"){for(var s=arguments.length,d=new Array(s>2?s-2:0),f=2;f<s;f++)d[f-2]=arguments[f];l=o.options.overloadTranslationOptionHandler([i,c].concat(d))}else l={...c};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||a.keyPrefix);const m=o.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(i)?p=i.map(g=>`${l.keyPrefix}${m}${g}`):p=l.keyPrefix?`${l.keyPrefix}${m}${i}`:i,o.t(p,l)};return jt(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.translate(...n)}exists(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(c,l)=>{const s=this.services.backendConnector.state[`${c}|${l}`];return s===-1||s===0||s===2};if(n.precheck){const c=n.precheck(this,i);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=Oc();return this.options.ns?(jt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Oc();jt(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){var o,a;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new dR(gR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ic(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L3;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new Ic(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new lR(this.store.data,o),a.services.resourceStore=a.store),a.translator=new w3(a.services,o),a.translator.on("*",function(c){for(var l=arguments.length,s=new Array(l>1?l-1:0),d=1;d<l;d++)s[d-1]=arguments[d];a.emit(c,...s)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const or=Ic.createInstance();or.createInstance=Ic.createInstance,or.createInstance,or.dir,or.init,or.loadResources,or.reloadResources,or.use,or.changeLanguage,or.getFixedT;const vR=or.t;or.exists,or.setDefaultNamespace,or.hasLoadedNamespace,or.loadNamespaces,or.loadLanguages;const COe=async(e,t)=>{const n="GENERAL.MESSAGES";return e.then(()=>{rc.success(vR(`${n}.SUCCESS.USERS`,{context:"UPDATE"})),t&&t()}).catch(({response:r})=>{const o=nR[r==null?void 0:r.data.code];ac.error({message:vR(`${n}.ERROR.USERS.${o}`),duration:10})})},SOe=window.globalAuthUrl,xOe=async e=>await A2.post(`${SOe}/maintainUser`,e),Ur="USERS",wOe=()=>{const{t:e}=c2(),{requiredField:t}=Js();return be.jsxs(Sr,{gutter:8,children:[be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.FirstName,label:e(`${Ur}.FIRST_NAME`),placeholder:e(`${Ur}.FIRST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.LastName,label:e(`${Ur}.LAST_NAME`),placeholder:e(`${Ur}.LAST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.Username,label:e(`${Ur}.USERNAME`),placeholder:e(`${Ur}.USERNAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.Email,label:e(`${Ur}.EMAIL`),placeholder:e(`${Ur}.EMAIL`,{context:"PLACEHOLDER"}),allowClear:!0,rules:[()=>({validator(n,r){return!(r!=null&&r.match(t_))||r!=null&&r.match(n_)||r!=null&&r.match(r_)?Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.Password,label:e(`${Ur}.PASSWORD`),placeholder:e(`${Ur}.PASSWORD`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,tooltip:be.jsx(WI,{i18nKey:e(`${Ur}.PASSWORD_HINT`),components:{b:be.jsx("b",{}),ul:be.jsx("ul",{}),li:be.jsx("li",{})}})})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.ConfirmPassword,label:e(`${Ur}.PASSWORD-CONFIRM`),placeholder:e(`${Ur}.PASSWORD-CONFIRM`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,rules:[({getFieldValue:n})=>({validator(r,o){return!o||n(dr.Password)===o?Promise.resolve():Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL")))}})]})})]})},M3="USERS",LOe=({user:e,isLoading:t,isOpen:n,onCancel:r})=>{const[o]=en.useForm(),a=Qs(),{t:i}=c2(),c=en.useWatch(dr.ProfilePicture,o);P.useEffect(()=>(e&&o.setFieldsValue({...e,[dr.ProfilePicture]:Kd(e.profilePicture)}),()=>{o.resetFields()}),[e]);const l=p=>{const g={...e,...p,[dr.ProfilePicture]:Lw(p==null?void 0:p[dr.ProfilePicture])};COe(xOe(g),r)},s=p=>{p.stopPropagation(),o.setFieldValue(dr.ProfilePicture,void 0)},d=p=>(ww(p,g=>{o.setFieldValue(dr.ProfilePicture,g)}),!1),f=be.jsxs("div",{children:[be.jsx(T0,{}),be.jsx("div",{style:{marginTop:8},children:i("UPLOAD")})]}),m=P.useMemo(()=>[{label:be.jsxs("span",{children:[be.jsx(S1,{icon:pz,style:{marginRight:5}}),i(`${M3}.${b3.Tab1}`)]}),key:b3.Tab1,children:be.jsx(wOe,{}),forceRender:!0}],[a]);return be.jsx(Rw,{children:be.jsx(xr,{title:i(`${M3}.EDIT`,{context:"USER"}),onOk:()=>o.submit(),onCancel:r,open:n,destroyOnClose:!0,maskClosable:!1,okText:i(`${M3}.SUBMIT`),cancelText:i(`${M3}.CANCEL`),style:{maxWidth:900},okButtonProps:{loading:t},children:be.jsxs(en,{name:"user-management",form:o,onFinish:l,layout:"vertical",children:[be.jsxs(Sr,{children:[be.jsx(x1,{fieldName:dr.User,hidden:!0}),be.jsx(Ln,{span:24,children:be.jsx(Sr,{justify:"center",children:be.jsx(en.Item,{name:dr.ProfilePicture,children:be.jsx(Vd,{listType:"picture-circle",className:"avatar-uploader",beforeUpload:d,maxCount:1,showUploadList:!1,accept:"image/png, image/jpeg",children:c?be.jsxs(Sr,{className:"float-btn-container",children:[be.jsx(Rv,{src:c,size:"small",alt:"userProfile",style:{height:"100%",width:"100%"}}),be.jsx(lr,{title:i("Remove"),placement:"bottom",children:be.jsx(dn,{shape:"circle",size:"small",icon:be.jsx(J8,{}),className:"float-btn",onClick:s})})]}):f})})})})]}),be.jsx(D0,{defaultActiveKey:b3.Tab1,type:"card",size:"small",items:m})]})})})},MOe=B3()(LOe),{slice:zOe,forEach:EOe}=[];function NOe(e){return EOe.call(zOe.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const bR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,$Oe=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!bR.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!bR.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},yR={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=$Oe(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var OOe={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return yR.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&yR.create(n,e,r,o,a)}},POe={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const i=o.substring(1).split("&");for(let c=0;c<i.length;c++){const l=i[c].indexOf("=");l>0&&i[c].substring(0,l)===t&&(n=i[c].substring(l+1))}}return n}};let Tc=null;const CR=()=>{if(Tc!==null)return Tc;try{Tc=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Tc=!1}return Tc};var IOe={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&CR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&CR()&&window.localStorage.setItem(n,e)}};let Rc=null;const SR=()=>{if(Rc!==null)return Rc;try{Rc=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Rc=!1}return Rc};var TOe={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&SR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&SR()&&window.sessionStorage.setItem(n,e)}},ROe={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},kOe={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},_Oe={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},DOe={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function AOe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class xR{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=NOe(n,this.options||{},AOe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(OOe),this.addDetector(POe),this.addDetector(IOe),this.addDetector(TOe),this.addDetector(ROe),this.addDetector(kOe),this.addDetector(_Oe),this.addDetector(DOe)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}xR.type="languageDetector",or.use(xR).use(sEe).init({debug:!1,fallbackLng:"PT",interpolation:{escapeValue:!1}}),Zn.Helpdesk=e$e,Zn.ReleaseNote=tOe,Zn.UserModal=MOe,Zn.i18n=or,Object.defineProperty(Zn,Symbol.toStringTag,{value:"Module"})});
|
|
1075
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:n,firstInputs:a,secondInputs:i,stack:s})}},S$e={inputStabilityCheck:"once",identityFunctionCheck:"once"};function x$e(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function w$e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function L$e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var qT=e=>Array.isArray(e)?e:[e];function M$e(e){const t=Array.isArray(e[0])?e[0]:e;return L$e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function GT(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var z$e=(e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...S$e,...t};return{identityFunctionCheck:{shouldRun:n==="always"||n==="once"&&e,run:y$e},inputStabilityCheck:{shouldRun:r==="always"||r==="once"&&e,run:C$e}}},E$e=class{constructor(e){this.value=e}deref(){return this.value}},N$e=typeof WeakRef<"u"?WeakRef:E$e,$$e=0,YT=1;function h3(){return{s:$$e,v:void 0,o:null,p:null}}function XT(e,t={}){let n=h3();const{resultEqualityCheck:r}=t;let o,a=0;function i(){var f;let c=n;const{length:l}=arguments;for(let m=0,p=l;m<p;m++){const g=arguments[m];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=c.o;v===null&&(c.o=v=new WeakMap);const h=v.get(g);h===void 0?(c=h3(),v.set(g,c)):c=h}else{let v=c.p;v===null&&(c.p=v=new Map);const h=v.get(g);h===void 0?(c=h3(),v.set(g,c)):c=h}}const s=c;let d;if(c.s===YT)d=c.v;else if(d=e.apply(null,arguments),a++,r){const m=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;m!=null&&r(m,d)&&(d=m,a!==0&&a--),o=typeof d=="object"&&d!==null||typeof d=="function"?new N$e(d):d}return s.s=YT,s.v=d,d}return i.clearCache=()=>{n=h3(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function O$e(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let a=0,i=0,c,l={},s=o.pop();typeof s=="object"&&(l=s,s=o.pop()),x$e(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);const d={...n,...l},{memoize:f,memoizeOptions:m=[],argsMemoize:p=XT,argsMemoizeOptions:g=[],devModeChecks:v={}}=d,h=qT(m),y=qT(g),b=M$e(o),C=f(function(){return a++,s.apply(null,arguments)},...h);let x=!0;const S=p(function(){i++;const L=GT(b,arguments);if(c=C.apply(null,L),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:M,inputStabilityCheck:z}=z$e(x,v);if(M.shouldRun&&M.run(s,L,c),z.shouldRun){const E=GT(b,arguments);z.run({inputSelectorResults:L,inputSelectorResultsCopy:E},{memoize:f,memoizeOptions:h},arguments)}x&&(x=!1)}return c},...y);return Object.assign(S,{resultFunc:s,memoizedResultFunc:C,dependencies:b,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var P$e=O$e(XT),I$e=Object.assign((e,t=P$e)=>{w$e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(a=>e[a]);return t(r,(...a)=>a.reduce((i,c,l)=>(i[n[l]]=c,i),{}))},{withTypes:()=>I$e});function QT(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(process.env.NODE_ENV==="production"?rr(0):"prepareAction did not return an object");return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>c$e(r)&&r.type===e,n}function JT(e){return l2(e)?UT(e,()=>{}):e}function ZT(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(process.env.NODE_ENV==="production"?rr(10):"No insert provided for key not already in map");const r=n.insert(t,e);return e.set(t,r),r}function eR(e){const t={},n=[];let r;const o={addCase(a,i){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?rr(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?rr(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const c=typeof a=="string"?a:a.type;if(!c)throw new Error(process.env.NODE_ENV==="production"?rr(28):"`builder.addCase` cannot be called with an empty action type");if(c in t)throw new Error(process.env.NODE_ENV==="production"?rr(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${c}'`);return t[c]=i,o},addMatcher(a,i){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?rr(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:a,reducer:i}),o},addDefaultCase(a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?rr(31):"`builder.addDefaultCase` can only be called once");return r=a,o}};return e(o),[t,n,r]}function T$e(e){return typeof e=="function"}function R$e(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?rr(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,o]=eR(t),a;if(T$e(e))a=()=>JT(e());else{const c=JT(e);a=()=>c}function i(c=a(),l){let s=[n[l.type],...r.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return s.filter(d=>!!d).length===0&&(s=[o]),s.reduce((d,f)=>{if(f)if(wo(d)){const p=f(d,l);return p===void 0?d:p}else{if(l2(d))return UT(d,m=>f(m,l));{const m=f(d,l);if(m===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return d},c)}return i.getInitialState=a,i}var k$e=Symbol.for("rtk-slice-createasyncthunk");function _$e(e,t){return`${e}/${t}`}function D$e({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[k$e];return function(o){const{name:a,reducerPath:i=a}=o;if(!a)throw new Error(process.env.NODE_ENV==="production"?rr(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&o.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const c=(typeof o.reducers=="function"?o.reducers(j$e()):o.reducers)||{},l=Object.keys(c),s={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(C,x){const S=typeof C=="string"?C:C.type;if(!S)throw new Error(process.env.NODE_ENV==="production"?rr(12):"`context.addCase` cannot be called with an empty action type");if(S in s.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?rr(13):"`context.addCase` cannot be called with two reducers for the same action type: "+S);return s.sliceCaseReducersByType[S]=x,d},addMatcher(C,x){return s.sliceMatchers.push({matcher:C,reducer:x}),d},exposeAction(C,x){return s.actionCreators[C]=x,d},exposeCaseReducer(C,x){return s.sliceCaseReducersByName[C]=x,d}};l.forEach(C=>{const x=c[C],S={reducerName:C,type:_$e(a,C),createNotation:typeof o.reducers=="function"};H$e(x)?W$e(S,x,d,t):B$e(S,x,d)});function f(){if(process.env.NODE_ENV!=="production"&&typeof o.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?rr(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[C={},x=[],S=void 0]=typeof o.extraReducers=="function"?eR(o.extraReducers):[o.extraReducers],w={...C,...s.sliceCaseReducersByType};return R$e(o.initialState,L=>{for(let M in w)L.addCase(M,w[M]);for(let M of s.sliceMatchers)L.addMatcher(M.matcher,M.reducer);for(let M of x)L.addMatcher(M.matcher,M.reducer);S&&L.addDefaultCase(S)})}const m=C=>C,p=new Map;let g;function v(C,x){return g||(g=f()),g(C,x)}function h(){return g||(g=f()),g.getInitialState()}function y(C,x=!1){function S(L){let M=L[C];if(typeof M>"u"){if(x)M=h();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?rr(15):"selectSlice returned undefined for an uninjected slice reducer")}return M}function w(L=m){const M=ZT(p,x,{insert:()=>new WeakMap});return ZT(M,L,{insert:()=>{const z={};for(const[E,O]of Object.entries(o.selectors??{}))z[E]=A$e(O,L,h,x);return z}})}return{reducerPath:C,getSelectors:w,get selectors(){return w(S)},selectSlice:S}}const b={name:a,reducer:v,actions:s.actionCreators,caseReducers:s.sliceCaseReducersByName,getInitialState:h,...y(i),injectInto(C,{reducerPath:x,...S}={}){const w=x??i;return C.inject({reducerPath:w,reducer:v},S),{...b,...y(w,!0)}}};return b}}function A$e(e,t,n,r){function o(a,...i){let c=t(a);if(typeof c>"u"){if(r)c=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?rr(16):"selectState returned undefined for an uninjected slice reducer")}return e(c,...i)}return o.unwrapped=e,o}var F$e=D$e();function j$e(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function B$e({type:e,reducerName:t,createNotation:n},r,o){let a,i;if("reducer"in r){if(n&&!V$e(r))throw new Error(process.env.NODE_ENV==="production"?rr(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=r.reducer,i=r.prepare}else a=r;o.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?QT(e,i):QT(e))}function H$e(e){return e._reducerDefinitionType==="asyncThunk"}function V$e(e){return e._reducerDefinitionType==="reducerWithPrepare"}function W$e({type:e,reducerName:t},n,r,o){if(!o)throw new Error(process.env.NODE_ENV==="production"?rr(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:i,pending:c,rejected:l,settled:s,options:d}=n,f=o(e,a,d);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),c&&r.addCase(f.pending,c),l&&r.addCase(f.rejected,l),s&&r.addMatcher(f.settled,s),r.exposeCaseReducer(t,{fulfilled:i||v3,pending:c||v3,rejected:l||v3,settled:s||v3})}function v3(){}function rr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const K$e={theme:qc.Light,currentSlide:0},U$e=F$e({name:"AppState",initialState:K$e,reducers:{updTheme:(e,{payload:t})=>{e.theme=t},updLanguage:(e,{payload:t})=>{e.language=t},updateCurrSlide:(e,{payload:t})=>{e.currentSlide=t}}}),{updTheme:EPe,updLanguage:NPe,updateCurrSlide:q$e}=U$e.actions,G$e=({index:e})=>{const{t}=c2(),{requiredField:n}=Js();return be.jsx(en.List,{name:[e,At.Fields],children:(r,{remove:o})=>be.jsxs(be.Fragment,{children:[be.jsx(Zs,{fieldName:"idReleasePage",hidden:!0}),be.jsx(b1,{gap:16,vertical:!0,children:r.map(({key:a,name:i,...c})=>be.jsxs(b1,{gap:6,align:"center",children:[be.jsxs(b1,{vertical:!0,gap:2,style:{width:"100%"},children:[be.jsx(en.Item,{...c,name:[i,At.Title],rules:n,noStyle:!0,children:be.jsx(O1,{placeholder:t("RELEASE-NOTES.FORM.FIELDS.TITLE"),maxLength:500})}),be.jsx(en.Item,{...c,name:[i,At.Description],rules:n,noStyle:!0,children:be.jsx(I8,{autoSize:{minRows:2},placeholder:t("RELEASE-NOTES.FORM.FIELDS.DESCRIPTION")})})]}),be.jsx(en.Item,{noStyle:!0,children:be.jsx(lr,{title:t("GENERAL.REMOVE"),children:be.jsx(dn,{type:"text",icon:be.jsx(XS,{}),onClick:()=>o(i),disabled:r.length===1})})})]},a))})]})})},Y$e=P.forwardRef((e,t)=>{const[n,r]=P.useState([]),{t:o}=c2(),a=yEe(),i=en.useFormInstance(),c=m=>a(q$e(m)),l=en.useWatch(At.ReleasePages,i),s=m=>({file:p,fileList:g})=>{const v=m[0],h=m[1],y=l[v];r(g),ww(p.originFileObj,b=>{i.setFieldValue(At.ReleasePages,l.toSpliced(v,1,{...y,[h]:b}))})},d=m=>()=>{var y;const p=l==null?void 0:l[m],v=[...((y=l==null?void 0:l[m])==null?void 0:y[At.Fields])??[],{}],h=l.toSpliced(m,1,{...p,[At.Fields]:v});i.setFieldValue(At.ReleasePages,h)},f=be.jsx(Sr,{justify:"center",align:"middle",children:be.jsxs(q0,{direction:"vertical",children:[be.jsx("p",{className:"ant-upload-drag-icon",children:be.jsx(ed,{})}),be.jsx("p",{className:"ant-upload-text",children:o("GENERAL.UPLOAD_LABEL")}),be.jsx("p",{className:"ant-upload-hint",children:o("GENERAL.JPG_PNG_WARNING")})]})});return be.jsx(v8,{infinite:!1,ref:t,beforeChange:(m,p)=>c(p),adaptiveHeight:!0,children:be.jsx(en.List,{name:At.ReleasePages,children:m=>be.jsxs(be.Fragment,{children:[be.jsx(Zs,{fieldName:"idRelease",hidden:!0}),be.jsx(Zs,{fieldName:"idReleasePage",hidden:!0}),m.map(({key:p,name:g,...v})=>{var b,C;const h=(b=l==null?void 0:l[g])==null?void 0:b[At.Image],y=(C=l==null?void 0:l[g])==null?void 0:C[At.NoImage];return be.jsx("div",{children:be.jsxs(Sr,{gutter:[8,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:24,children:be.jsxs(Sr,{gutter:8,children:[be.jsx(Ln,{span:y?24:12,children:be.jsx(G$e,{index:g})}),!y&&be.jsx(Ln,{span:12,children:be.jsx(co,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(en.Item,{...v,name:[g,At.Image],noStyle:!0,children:be.jsx(ys,{listType:"picture",className:"release-notes-image",showUploadList:!1,fileList:n,beforeUpload:tae,onChange:s([g,At.Image]),children:h?be.jsx(Z0,{src:h,preview:!1,style:{maxHeight:600}}):f})})})})]})}),be.jsx(Ln,{span:8,children:be.jsxs(b1,{vertical:!0,children:[be.jsx(en.Item,{children:be.jsx(dn,{type:"dashed",onClick:d(g),icon:be.jsx(T0,{}),block:!0,children:o("RELEASE-NOTES.FORM.ADD_NEW_FIELD")})}),be.jsx(LEe,{fieldName:[g,At.NoImage],label:o("GENERAL.DO_NOT_USE_IMAGE"),onChange:x=>{const S=x.target.checked,w=l.map((L,M)=>({...L,[At.NoImage]:M===g?S:L[At.NoImage],[At.Image]:M===g&&S?void 0:L[At.Image]}));i.setFieldValue(At.ReleasePages,w)}})]})})]})},p)})]})})})}),s2="RELEASE-NOTES",X$e=({addBtnLabel:e,addBtnTooltipText:t,release2edit:n,beforeOpenModal:r,beforeCloseModal:o,afterSubmit:a})=>{const[i,c]=P.useState(!1),[l,s]=P.useState(!1),[d]=en.useForm(),{t:f}=c2(),m=Qs(),{getColor:p}=SEe(),g=P.useRef(null),{requiredField:v}=Js(),h=UI(bEe),{data:y}=RT(),b=en.useWatch(At.ReleasePages,d),C=()=>d.resetFields();P.useEffect(()=>{n&&(c(!0),d.setFieldsValue({...n,[At.ReleasePages]:n[At.ReleasePages].map(N=>({...N,[At.Image]:Kd(N[At.Image])})),[At.DeployDate]:Qn(n[At.DeployDate])}))},[n]);const x=()=>{r?new Promise(N=>N(r())).then(()=>c(!0)):c(!0)},S=()=>{o?new Promise(N=>N(o())).then(()=>c(!1)):c(!1)},w=()=>{var R;d.setFieldValue(At.ReleasePages,[...b,{[At.Fields]:[{}]}]);const N=d.getFieldValue(At.ReleasePages);(R=g.current)==null||R.goTo(N.length-1)},L=()=>{var R;d.setFieldValue(At.ReleasePages,b.filter((A,D)=>D!==h));const N=d.getFieldValue(At.ReleasePages);(R=g.current)==null||R.goTo(N.length-1)},M=N=>{const R={...N,[At.DeployDate]:Qn(N[At.DeployDate]).format(e_),[At.ReleasePages]:N[At.ReleasePages].map((A,D)=>({...A,[At.Image]:Lw(A[At.Image]),order:D,[At.Fields]:A[At.Fields].map((F,V)=>({...F,order:V}))}))};r$e(R).then(()=>{C(),rc.success(f("GENERAL.MESSAGES.SUCCESS.ITEM_CREATE",{item:f(`${s2}.TEXT_SINGULAR`)})),a&&a()}).catch(A=>{var F;const D=((F=A.response)==null?void 0:F.data)??[];ac.error({message:f("GENERAL.ERROR"),description:be.jsx(Y8,{dataSource:D,renderItem:V=>be.jsx(Y8.Item,{children:f(`GENERAL.MESSAGES.ERROR.RELEASE_NOTE.${V.error}`)})})})}).finally(S)},z=h===0,E=h===(b==null?void 0:b.length)-1,O=(b==null?void 0:b.length)<=1,I=be.jsxs(b1,{justify:"flex-end",gap:8,children:[be.jsx(dn,{type:"dashed",icon:be.jsx(S1,{icon:QO}),onClick:()=>{var N;return(N=g.current)==null?void 0:N.prev()},disabled:z,children:f("GENERAL.BACK")}),be.jsx(dn,{type:"dashed",iconPosition:"end",icon:be.jsx(S1,{icon:JO}),onClick:()=>{var N;return(N=g.current)==null?void 0:N.next()},disabled:E,children:f("GENERAL.NEXT")}),be.jsx(dn,{type:"dashed",danger:!0,icon:be.jsx(S1,{icon:JN}),onClick:L,disabled:O,children:f(`${s2}.REMOVE_CURRENT_SLIDE`)}),be.jsx(dn,{type:"dashed",icon:be.jsx(S1,{icon:NP}),onClick:w,children:f(`${s2}.ADD_NEW_SLIDE`)}),be.jsx(dn,{type:"primary",icon:be.jsx(S1,{icon:FN}),onClick:()=>d.submit(),children:f("GENERAL.SAVE")})]}),_=N=>{s(t?N:!1)},$={[At.ReleasePages]:[{[At.Fields]:[{}]}],[At.DeployDate]:Qn()},T=nae(y??[],"appName","id"),k=P.useMemo(()=>f(`${s2}.${n?"UPD_RELEASE_NOTE":"ADD_RELEASE_NOTE"}`),[m]);return be.jsxs(be.Fragment,{children:[be.jsx(lr,{title:t,open:l,onOpenChange:_,children:be.jsx(dn,{type:"primary",icon:be.jsx(S1,{icon:UE}),shape:e?"default":"circle",onClick:x,children:e})}),be.jsx(xr,{open:i,title:k,onCancel:S,width:"60%",footer:I,destroyOnClose:!0,children:be.jsxs(en,{form:d,layout:"vertical",initialValues:$,onFinish:M,children:[be.jsx(Zs,{fieldName:"idRelease",hidden:!0}),be.jsxs(Sr,{gutter:10,children:[be.jsx(Ln,{span:8,children:be.jsx(xEe,{fieldName:At.App,label:f(`${s2}.FORM.FIELDS.APP`),placeholder:f(`${s2}.FORM.FIELDS.APP`,{context:"PLACEHOLDER"}),options:T,rules:v})}),be.jsx(Ln,{span:8,children:be.jsx(x1,{fieldName:At.Version,label:f(`${s2}.FORM.FIELDS.VERSION`),placeholder:"0.0.0",tooltip:f(`${s2}.FORM.FIELDS.VERSION`,{context:"TOOLTIP"}),normalize:N=>N.replace(/\s/,".").replace(/[.]{2}/g,".").replace(/^[^0-9]|[^0-9.\b]/g,""),rules:[...v,()=>({validator(N,R){var F,V;const A=/[^0-9]$/,D=(V=(F=R==null?void 0:R.split("."))==null?void 0:F.filter(Boolean))==null?void 0:V.length;return A.test(R)?Promise.reject(new Error(f("GENERAL.FORM.ERRORS.VERSION"))):D>3||D<3?Promise.reject(new Error(f("GENERAL.FORM.ERRORS.FORMAT"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:8,children:be.jsx(wEe,{fieldName:At.DeployDate,label:f(`${s2}.FORM.FIELDS.DEPLOY_DATE`),format:Zk,rules:v})}),be.jsx(Ln,{span:24,children:be.jsx(co,{styles:{body:{background:p("PrimaryColorBgContainer")}},children:be.jsx(Y$e,{ref:g})})})]})]})})]})},{Title:Q$e,Text:J$e}=za,Z$e=()=>{var M,z;const[e,t]=P.useState(!1),[n,r]=P.useState(!1),[o,a]=P.useState(0),{t:i}=c2(),c=Qs(),l=P.useRef(null),s=P2(Gr.AppId),d=P2(Gr.UserID),{data:f}=RT(),{data:m}=a$e({idApp:s,lastDeployed:!0,userId:d}),p=m==null?void 0:m[0],g=f==null?void 0:f.find(E=>E.id===s);P.useEffect(()=>{if(m!=null&&m.length){const E=m[0],O=!E.readRelease&&!!E.isDeployed;t(O)}},[m]);const v=()=>{const E=m==null?void 0:m[0];n&&(E!=null&&E.isDeployed)&&o$e(E==null?void 0:E.idRelease,d),t(!1)},h=()=>{var E;return(E=l.current)==null?void 0:E.next()},y=()=>{var E;return(E=l.current)==null?void 0:E.prev()},b=E=>a(E),C=o===0,x=o===(((M=p==null?void 0:p.gaReleasePages)==null?void 0:M.length)??0)-1,S=E=>r(E.target.checked),w=be.jsxs(b1,{justify:"space-between",align:"center",children:[be.jsx(n2,{checked:n,onChange:S,children:i("RELEASE-NOTES.FORM.FIELDS.DO_NOT_SHOW_AGAIN")}),be.jsxs(b1,{gap:8,children:[!C&&be.jsx(dn,{onClick:y,children:i("Prev")}),!x&&be.jsx(dn,{type:"primary",onClick:h,children:i("GENERAL.ACTIONS.NEXT")}),x&&be.jsx(dn,{type:"primary",onClick:v,children:i("GENERAL.ACTIONS.CLOSE")})]})]}),L=P.useMemo(()=>i("RELEASE-NOTES.WHATS_NEWS",{app:g==null?void 0:g.appName,version:p==null?void 0:p.version}),[c]);return be.jsx(xr,{open:e,title:L,onCancel:v,width:"70%",footer:w,children:be.jsx(v8,{infinite:!1,ref:l,afterChange:b,children:(z=p==null?void 0:p.gaReleasePages)==null?void 0:z.map(({idFile:E,gaReleasePagesContent:O},I)=>be.jsx("div",{children:be.jsxs(Sr,{gutter:[16,16],style:{marginBottom:35},children:[be.jsx(Ln,{span:E?12:24,children:be.jsx(b1,{gap:16,vertical:!0,children:O.map(({title:_,description:$},T)=>be.jsxs(b1,{vertical:!0,children:[be.jsx(Q$e,{level:5,children:_}),be.jsx(J$e,{style:{opacity:.5},children:$})]},`${I}-${T}`))})}),!!E&&be.jsx(Ln,{span:12,children:be.jsx(b1,{justify:"center",children:be.jsx(co,{bordered:!0,styles:{body:{display:"flex",justifyContent:"center",padding:2}},children:be.jsx(Z0,{src:Kd(E),style:{maxHeight:600,borderRadius:8}})})})})]})},I))})})},tR=new Z7({defaultOptions:{queries:{retry:2}}}),eOe=({showAddBtn:e,...t})=>e?be.jsx(Ud,{children:be.jsx(G3,{client:tR,children:be.jsx(X$e,{...t})})}):be.jsx(Ud,{children:be.jsx(G3,{client:tR,children:be.jsx(Z$e,{})})}),tOe=B3()(eOe);var dr=(e=>(e.FirstName="firstName",e.LastName="lastName",e.Username="username",e.Email="email",e.ProfilePicture="profilePicture",e.Password="password",e.ConfirmPassword="confirmPassword",e.Apps="userRolesApp",e.AppId="idApp",e.RoleId="roleId",e.Tenants="tenantId",e.Active="isActive",e.Private="isPrivate",e.User="userId",e.Hierarchy="hierarchy",e))(dr||{}),b3=(e=>(e.Tab1="PROFILE",e.Tab2="MANAGEMENT",e))(b3||{}),nR=(e=>(e[e.GA_USER_EMPTY=0]="GA_USER_EMPTY",e[e.GA_EMAIL_EMPTY=1]="GA_EMAIL_EMPTY",e[e.GA_USER_ID_EMPTY=2]="GA_USER_ID_EMPTY",e[e.GA_PASS_EMPTY=3]="GA_PASS_EMPTY",e[e.GA_PASS_NOT_MATCH=4]="GA_PASS_NOT_MATCH",e[e.GA_USERNAME_EXISTS=5]="GA_USERNAME_EXISTS",e[e.GA_EMAIL_EXISTS=6]="GA_EMAIL_EXISTS",e[e.GA_NO_ROLES_APP_DEFINED=7]="GA_NO_ROLES_APP_DEFINED",e[e.GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP=8]="GA_DUPLICATED_RECORDS_SAME_TENANT_ROLE_APP",e[e.GA_CANNOT_GET_USER_INFO=9]="GA_CANNOT_GET_USER_INFO",e[e.GA_ERROR_CHAGING_PASS=10]="GA_ERROR_CHAGING_PASS",e[e.GA_NO_TENANTS_ROLES_DEFINDED=11]="GA_NO_TENANTS_ROLES_DEFINDED",e[e.GA_PASS_DOES_NOT_MEET_REQUIREMENTS=12]="GA_PASS_DOES_NOT_MEET_REQUIREMENTS",e))(nR||{});const jt=e=>typeof e=="string",Oc=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},rR=e=>e==null?"":""+e,nOe=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},rOe=/###/g,oR=e=>e&&e.indexOf("###")>-1?e.replace(rOe,"."):e,aR=e=>!e||jt(e),Pc=(e,t,n)=>{const r=jt(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(aR(e))return{};const a=oR(r[o]);!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={},++o}return aR(e)?{}:{obj:e,k:oR(r[o])}},iR=(e,t,n)=>{const{obj:r,k:o}=Pc(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],i=t.slice(0,t.length-1),c=Pc(e,i,Object);for(;c.obj===void 0&&i.length;)a=`${i[i.length-1]}.${a}`,i=i.slice(0,i.length-1),c=Pc(e,i,Object),c!=null&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n},oOe=(e,t,n,r)=>{const{obj:o,k:a}=Pc(e,t,Object);o[a]=o[a]||[],o[a].push(n)},y3=(e,t)=>{const{obj:n,k:r}=Pc(e,t);if(n)return n[r]},aOe=(e,t,n)=>{const r=y3(e,n);return r!==void 0?r:y3(t,n)},cR=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?jt(e[r])||e[r]instanceof String||jt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):cR(e[r],t[r],n):e[r]=t[r]);return e},Aa=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var iOe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const cOe=e=>jt(e)?e.replace(/[&<>"'\/]/g,t=>iOe[t]):e;class lOe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const sOe=[" ",",","?","!",";"],uOe=new lOe(20),dOe=(e,t,n)=>{t=t||"",n=n||"";const r=sOe.filter(i=>t.indexOf(i)<0&&n.indexOf(i)<0);if(r.length===0)return!0;const o=uOe.getRegExp(`(${r.map(i=>i==="?"?"\\?":i).join("|")})`);let a=!o.test(e);if(!a){const i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a},a7=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let i,c="";for(let l=a;l<r.length;++l)if(l!==a&&(c+=n),c+=r[l],i=o[c],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<r.length-1)continue;a+=l-a+1;break}o=i}return o},C3=e=>e==null?void 0:e.replace("_","-"),fOe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,r;(r=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||r.call(n,console,t)}};class S3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||fOe,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(jt(t[0])&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new S3(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new S3(this.logger,t)}}var j1=new S3;class x3{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(i=>{let[c,l]=i;for(let s=0;s<l;s++)c.apply(c,[t,...r])})}}class lR extends x3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){var s,d;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,i=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):jt(r)&&a?c.push(...r.split(a)):c.push(r)));const l=y3(this.data,c);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),l||!i||!jt(r)?l:a7((d=(s=this.data)==null?void 0:s[t])==null?void 0:d[n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const i=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(i?r.split(i):r)),t.indexOf(".")>-1&&(c=t.split("."),o=n,n=c[1]),this.addNamespaces(n),iR(this.data,c,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(jt(r[a])||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),o=r,r=n,n=c[1]),this.addNamespaces(n);let l=y3(this.data,c)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?cR(l,r,a):l={...l,...r},iR(this.data,c,l),i.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var sR={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{var i;t=((i=this.processors[a])==null?void 0:i.process(t,n,r,o))??t}),t}};const uR={};class w3 extends x3{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),nOe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=j1.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return(r==null?void 0:r.res)!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const i=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!dOe(t,r,o);if(i&&!c){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:jt(a)?[a]:a};const s=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(s[0])>-1)&&(a=s.shift()),t=s.join(o)}return{key:t,namespaces:jt(a)?[a]:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:i,namespaces:c}=this.extractFromKey(t[t.length-1],n),l=c[c.length-1],s=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((s==null?void 0:s.toLowerCase())==="cimode"){if(d){const x=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${x}${i}`,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${x}${i}`}return o?{res:i,usedKey:i,exactUsedKey:i,usedLng:s,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:i}const f=this.resolve(t,n);let m=f==null?void 0:f.res;const p=(f==null?void 0:f.usedKey)||i,g=(f==null?void 0:f.exactUsedKey)||i,v=Object.prototype.toString.apply(m),h=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,C=!jt(m)&&typeof m!="boolean"&&typeof m!="number";if(b&&m&&C&&h.indexOf(v)<0&&!(jt(y)&&Array.isArray(m))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,m,{...n,ns:c}):`key '${i} (${this.language})' returned an object instead of string.`;return o?(f.res=x,f.usedParams=this.getUsedParamsDetails(n),f):x}if(a){const x=Array.isArray(m),S=x?[]:{},w=x?g:p;for(const L in m)if(Object.prototype.hasOwnProperty.call(m,L)){const M=`${w}${a}${L}`;S[L]=this.translate(M,{...n,joinArrays:!1,ns:c}),S[L]===M&&(S[L]=m[L])}m=S}}else if(b&&jt(y)&&Array.isArray(m))m=m.join(y),m&&(m=this.extendTranslation(m,t,n,r));else{let x=!1,S=!1;const w=n.count!==void 0&&!jt(n.count),L=w3.hasDefaultValue(n),M=w?this.pluralResolver.getSuffix(s,n.count,n):"",z=n.ordinal&&w?this.pluralResolver.getSuffix(s,n.count,{ordinal:!1}):"",E=w&&!n.ordinal&&n.count===0,O=E&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${z}`]||n.defaultValue;!this.isValidLookup(m)&&L&&(x=!0,m=O),this.isValidLookup(m)||(S=!0,m=i);const _=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:m,$=L&&O!==m&&this.options.updateMissing;if(S||x||$){if(this.logger.log($?"updateKey":"missingKey",s,l,i,$?O:m),a){const R=this.resolve(i,{...n,keySeparator:!1});R&&R.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 T=[];const k=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&k&&k[0])for(let R=0;R<k.length;R++)T.push(k[R]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(n.lng||this.language):T.push(n.lng||this.language);const N=(R,A,D)=>{var V;const F=L&&D!==m?D:_;this.options.missingKeyHandler?this.options.missingKeyHandler(R,l,A,F,$,n):(V=this.backendConnector)!=null&&V.saveMissing&&this.backendConnector.saveMissing(R,l,A,F,$,n),this.emit("missingKey",R,l,A,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?T.forEach(R=>{const A=this.pluralResolver.getSuffixes(R,n);E&&n[`defaultValue${this.options.pluralSeparator}zero`]&&A.indexOf(`${this.options.pluralSeparator}zero`)<0&&A.push(`${this.options.pluralSeparator}zero`),A.forEach(D=>{N([R],i+D,n[`defaultValue${D}`]||O)})}):N(T,i,O))}m=this.extendTranslation(m,t,n,f,r),S&&m===i&&this.options.appendNamespaceToMissingKey&&(m=`${l}:${i}`),(S||x)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${i}`:i,x?m:void 0))}return o?(f.res=m,f.usedParams=this.getUsedParamsDetails(n),f):m}extendTranslation(t,n,r,o,a){var s,d;var i=this;if((s=this.i18nFormat)!=null&&s.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const f=jt(t)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(f){const g=t.match(this.interpolator.nestingRegexp);m=g&&g.length}let p=r.replace&&!jt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),t=this.interpolator.interpolate(t,p,r.lng||this.language||o.usedLng,r),f){const g=t.match(this.interpolator.nestingRegexp),v=g&&g.length;m<v&&(r.nest=!1)}!r.lng&&o&&o.res&&(r.lng=this.language||o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var g=arguments.length,v=new Array(g),h=0;h<g;h++)v[h]=arguments[h];return(a==null?void 0:a[0])===v[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):i.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,l=jt(c)?[c]:c;return t!=null&&(l!=null&&l.length)&&r.applyPostProcessor!==!1&&(t=sR.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,i,c;return jt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const s=this.extractFromKey(l,n),d=s.key;o=d;let f=s.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!jt(n.count),p=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(jt(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(h=>{var y,b;this.isValidLookup(r)||(c=h,!uR[`${v[0]}-${h}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(c))&&(uR[`${v[0]}-${h}`]=!0,this.logger.warn(`key "${o}" for languages "${v.join(", ")}" won't get resolved as namespace "${c}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(C=>{var w;if(this.isValidLookup(r))return;i=C;const x=[d];if((w=this.i18nFormat)!=null&&w.addLookupKeys)this.i18nFormat.addLookupKeys(x,d,C,h,n);else{let L;m&&(L=this.pluralResolver.getSuffix(C,n.count,n));const M=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(x.push(d+L),n.ordinal&&L.indexOf(z)===0&&x.push(d+L.replace(z,this.options.pluralSeparator)),p&&x.push(d+M)),g){const E=`${d}${this.options.contextSeparator}${n.context}`;x.push(E),m&&(x.push(E+L),n.ordinal&&L.indexOf(z)===0&&x.push(E+L.replace(z,this.options.pluralSeparator)),p&&x.push(E+M))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(a=S,r=this.getResource(C,h,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:i,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){var a;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!jt(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class dR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=j1.create("languageUtils")}getScriptPartFromCode(t){if(t=C3(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=C3(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(jt(t)&&t.indexOf("-")>-1){let n=Intl.getCanonicalLocales(t)[0];return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),jt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=i=>{i&&(this.isSupportedCode(i)?o.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return jt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):jt(t)&&a(this.formatLanguageCode(t)),r.forEach(i=>{o.indexOf(i)<0&&a(this.formatLanguageCode(i))}),o}}const fR={zero:0,one:1,two:2,few:3,many:4,other:5},mR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class mOe{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=j1.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=C3(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:r,type:o});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let i;try{i=new Intl.PluralRules(r,{type:o})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),mR;if(!t.match(/-|_/))return mR;const l=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(l,n)}return this.pluralRulesCache[a]=i,i}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((o,a)=>fR[o]-fR[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const pR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=aOe(e,t,n);return!a&&o&&jt(n)&&(a=a7(e,n,r),a===void 0&&(a=a7(t,n,r))),a},i7=e=>e.replace(/\$/g,"$$$$");class pOe{constructor(){var n;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j1.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(r=>r),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:i,suffix:c,suffixEscaped:l,formatSeparator:s,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:v,nestingOptionsSeparator:h,maxReplaces:y,alwaysFormat:b}=t.interpolation;this.escape=n!==void 0?n:cOe,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?Aa(a):i||"{{",this.suffix=c?Aa(c):l||"}}",this.formatSeparator=s||",",this.unescapePrefix=d?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Aa(m):p||Aa("$t("),this.nestingSuffix=g?Aa(g):v||Aa(")"),this.nestingOptionsSeparator=h||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){var p;let a,i,c;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},s=g=>{if(g.indexOf(this.formatSeparator)<0){const b=pR(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,r,{...o,...n,interpolationkey:g}):b}const v=g.split(this.formatSeparator),h=v.shift().trim(),y=v.join(this.formatSeparator).trim();return this.format(pR(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...o,...n,interpolationkey:h})};this.resetRegExp();const d=(o==null?void 0:o.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((p=o==null?void 0:o.interpolation)==null?void 0:p.skipOnVariables)!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>i7(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?i7(this.escape(g)):i7(g)}].forEach(g=>{for(c=0;a=g.regex.exec(t);){const v=a[1].trim();if(i=s(v),i===void 0)if(typeof d=="function"){const y=d(t,a,o);i=jt(y)?y:""}else if(o&&Object.prototype.hasOwnProperty.call(o,v))i="";else if(f){i=a[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${t}`),i="";else!jt(i)&&!this.useRawValueToEscape&&(i=rR(i));const h=g.safeValue(i);if(t=t.replace(a[0],h),f?(g.regex.lastIndex+=i.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,i;const c=(l,s)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,i);const p=m.match(/'/g),g=m.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||g.length%2!==0)&&(m=m.replace(/'/g,'"'));try{i=JSON.parse(m),s&&(i={...s,...i})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${d}${m}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];i={...r},i=i.replace&&!jt(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;let s=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const d=o[1].split(this.formatSeparator).map(f=>f.trim());o[1]=d.shift(),l=d,s=!0}if(a=n(c.call(this,o[1].trim(),i),i),a&&o[0]===t&&!jt(a))return a;jt(a)||(a=rR(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),s&&(a=l.reduce((d,f)=>this.format(d,f,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}const gOe=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(i=>{if(i){const[c,...l]=i.split(":"),s=l.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();n[d]||(n[d]=s),s==="false"&&(n[d]=!1),s==="true"&&(n[d]=!0),isNaN(s)||(n[d]=parseInt(s,10))}})}return{formatName:t,formatOptions:n}},Fa=e=>{const t={};return(n,r,o)=>{let a=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(a={...a,[o.interpolationkey]:void 0});const i=r+JSON.stringify(a);let c=t[i];return c||(c=e(C3(r),o),t[i]=c),c(n)}};class hOe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j1.create("formatter"),this.options=t,this.formats={number:Fa((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:Fa((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:Fa((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:Fa((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:Fa((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=Fa(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(c=>c.indexOf(")")>-1)){const c=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,c)].join(this.formatSeparator)}return a.reduce((c,l)=>{var f;const{formatName:s,formatOptions:d}=gOe(l);if(this.formats[s]){let m=c;try{const p=((f=o==null?void 0:o.formatParams)==null?void 0:f[o.interpolationkey])||{},g=p.locale||p.lng||o.locale||o.lng||r;m=this.formats[s](c,g,{...d,...o,...p})}catch(p){this.logger.warn(p)}return m}else this.logger.warn(`there was no format function for ${s}`);return c},t)}}const vOe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class bOe extends x3{constructor(t,n,r){var a,i;let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=j1.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],(i=(a=this.backend)==null?void 0:a.init)==null||i.call(a,r,o.backend,o)}queueLoad(t,n,r,o){const a={},i={},c={},l={};return t.forEach(s=>{let d=!0;n.forEach(f=>{const m=`${s}|${f}`;!r.reload&&this.store.hasResourceBundle(s,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?i[m]===void 0&&(i[m]=!0):(this.state[m]=1,d=!1,i[m]===void 0&&(i[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(c[s]=!0)}),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),a=o[0],i=o[1];n&&this.emit("failedLoading",a,i,n),!n&&r&&this.store.addResourceBundle(a,i,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const c={};this.queue.forEach(l=>{oOe(l.loaded,[a],i),vOe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(s=>{c[s]||(c[s]={});const d=l.loaded[s];d.length&&d.forEach(f=>{c[s][f]===void 0&&(c[s][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:i});return}this.readingCalls++;const c=(s,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(s&&d&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,i)},a);return}i(s,d)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const s=l(t,n);s&&typeof s.then=="function"?s.then(d=>c(null,d)).catch(c):c(null,s)}catch(s){c(s)}return}return l(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();jt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),jt(n)&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(i=>{this.loadOne(i)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(i,c)=>{i&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,i),!i&&c&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,c),this.loaded(t,i,c)})}saveMissing(t,n,r,o,a){var l,s,d,f,m;let i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((s=(l=this.services)==null?void 0:l.utils)!=null&&s.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((m=this.backend)!=null&&m.create){const p={...i,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(t,n,r,o,p):v=g(t,n,r,o),v&&typeof v.then=="function"?v.then(h=>c(null,h)).catch(c):c(null,v)}catch(v){c(v)}else g(t,n,r,o,c,p)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const gR=()=>({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 t={};if(typeof e[1]=="object"&&(t=e[1]),jt(e[1])&&(t.defaultValue=e[1]),jt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),hR=e=>{var t,n;return jt(e.ns)&&(e.ns=[e.ns]),jt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),jt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),((n=(t=e.supportedLngs)==null?void 0:t.indexOf)==null?void 0:n.call(t,"cimode"))<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e},L3=()=>{},yOe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Ic extends x3{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=hR(t),this.services={},this.logger=j1,this.modules={external:[]},yOe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(jt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=gR();this.options={...o,...this.options,...hR(n)},this.options.interpolation={...o.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const a=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?j1.init(a(this.modules.logger),this.options):j1.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=hOe;const f=new dR(this.options);this.store=new lR(this.options.resources,this.options);const m=this.services;m.logger=j1,m.resourceStore=this.store,m.languageUtils=f,m.pluralResolver=new mOe(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(m.formatter=a(d),m.formatter.init(m,this.options),this.options.interpolation.format=m.formatter.format.bind(m.formatter)),m.interpolator=new pOe(this.options),m.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},m.backendConnector=new bOe(a(this.modules.backend),m.resourceStore,m,this.options),m.backendConnector.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.languageDetector&&(m.languageDetector=a(this.modules.languageDetector),m.languageDetector.init&&m.languageDetector.init(m,this.options.detection,this.options)),this.modules.i18nFormat&&(m.i18nFormat=a(this.modules.i18nFormat),m.i18nFormat.init&&m.i18nFormat.init(this)),this.translator=new w3(this.services,this.options),this.translator.on("*",function(p){for(var g=arguments.length,v=new Array(g>1?g-1:0),h=1;h<g;h++)v[h-1]=arguments[h];t.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=L3),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const l=Oc(),s=()=>{const d=(f,m)=>{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),l.resolve(m),r(f,m)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),l}loadResources(t){var a,i;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L3;const o=jt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if((o==null?void 0:o.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const c=[],l=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(f=>{f!=="cimode"&&c.indexOf(f)<0&&c.push(f)})};o?l(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>l(d)),(i=(a=this.options.preload)==null?void 0:a.forEach)==null||i.call(a,s=>l(s)),this.services.backendConnector.load(c,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=Oc();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=L3),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&sR.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Oc();this.emit("languageChanging",t);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},i=(l,s)=>{s?(a(s),this.translator.changeLanguage(s),this.isLanguageChangingTo=void 0,this.emit("languageChanged",s),this.logger.log("languageChanged",s)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},c=l=>{var d,f;!t&&!l&&this.services.languageDetector&&(l=[]);const s=jt(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);s&&(this.language||a(s),this.translator.language||this.translator.changeLanguage(s),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,s)),this.loadResources(s,m=>{i(m,s)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),o}getFixedT(t,n,r){var o=this;const a=function(i,c){let l;if(typeof c!="object"){for(var s=arguments.length,d=new Array(s>2?s-2:0),f=2;f<s;f++)d[f-2]=arguments[f];l=o.options.overloadTranslationOptionHandler([i,c].concat(d))}else l={...c};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||r||a.keyPrefix);const m=o.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(i)?p=i.map(g=>`${l.keyPrefix}${m}${g}`):p=l.keyPrefix?`${l.keyPrefix}${m}${i}`:i,o.t(p,l)};return jt(t)?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.translate(...n)}exists(){var o;for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(o=this.translator)==null?void 0:o.exists(...n)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const i=(c,l)=>{const s=this.services.backendConnector.state[`${c}|${l}`];return s===-1||s===0||s===2};if(n.precheck){const c=n.precheck(this,i);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(r,t)&&(!o||i(a,t)))}loadNamespaces(t,n){const r=Oc();return this.options.ns?(jt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Oc();jt(t)&&(t=[t]);const o=this.options.preload||[],a=t.filter(i=>o.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return a.length?(this.options.preload=o.concat(a),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}dir(t){var o,a;if(t||(t=this.resolvedLanguage||(((o=this.languages)==null?void 0:o.length)>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((a=this.services)==null?void 0:a.languageUtils)||new dR(gR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Ic(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L3;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new Ic(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new lR(this.store.data,o),a.services.resourceStore=a.store),a.translator=new w3(a.services,o),a.translator.on("*",function(c){for(var l=arguments.length,s=new Array(l>1?l-1:0),d=1;d<l;d++)s[d-1]=arguments[d];a.emit(c,...s)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const or=Ic.createInstance();or.createInstance=Ic.createInstance,or.createInstance,or.dir,or.init,or.loadResources,or.reloadResources,or.use,or.changeLanguage,or.getFixedT;const vR=or.t;or.exists,or.setDefaultNamespace,or.hasLoadedNamespace,or.loadNamespaces,or.loadLanguages;const COe=async(e,t)=>{const n="GENERAL.MESSAGES";return e.then(()=>{rc.success(vR(`${n}.SUCCESS.USERS`,{context:"UPDATE"})),t&&t()}).catch(({response:r})=>{const o=nR[r==null?void 0:r.data.code];ac.error({message:vR(`${n}.ERROR.USERS.${o}`),duration:10})})},SOe=window.globalAuthUrl,xOe=async e=>await A2.post(`${SOe}/maintainUser`,e),Ur="USERS",wOe=()=>{const{t:e}=c2(),{requiredField:t}=Js();return be.jsxs(Sr,{gutter:8,children:[be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.FirstName,label:e(`${Ur}.FIRST_NAME`),placeholder:e(`${Ur}.FIRST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.LastName,label:e(`${Ur}.LAST_NAME`),placeholder:e(`${Ur}.LAST_NAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.Username,label:e(`${Ur}.USERNAME`),placeholder:e(`${Ur}.USERNAME`,{context:"PLACEHOLDER"}),allowClear:!0,rules:t})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.Email,label:e(`${Ur}.EMAIL`),placeholder:e(`${Ur}.EMAIL`,{context:"PLACEHOLDER"}),allowClear:!0,rules:[()=>({validator(n,r){return!(r!=null&&r.match(t_))||r!=null&&r.match(n_)||r!=null&&r.match(r_)?Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL"))):Promise.resolve()}})]})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.Password,label:e(`${Ur}.PASSWORD`),placeholder:e(`${Ur}.PASSWORD`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,tooltip:be.jsx(WI,{i18nKey:e(`${Ur}.PASSWORD_HINT`),components:{b:be.jsx("b",{}),ul:be.jsx("ul",{}),li:be.jsx("li",{})}})})}),be.jsx(Ln,{span:12,children:be.jsx(x1,{fieldName:dr.ConfirmPassword,label:e(`${Ur}.PASSWORD-CONFIRM`),placeholder:e(`${Ur}.PASSWORD-CONFIRM`,{context:"PLACEHOLDER"}),isPassword:!0,allowClear:!0,rules:[({getFieldValue:n})=>({validator(r,o){return!o||n(dr.Password)===o?Promise.resolve():Promise.reject(new Error(e("GENERAL.FORM.ERRORS.EMAIL")))}})]})})]})},M3="USERS",LOe=({user:e,isLoading:t,isOpen:n,onCancel:r})=>{const[o]=en.useForm(),a=Qs(),{t:i}=c2(),c=en.useWatch(dr.ProfilePicture,o);P.useEffect(()=>(e&&o.setFieldsValue({...e,[dr.ProfilePicture]:Kd(e.profilePicture)}),()=>{o.resetFields()}),[e]);const l=p=>{const g={...e,...p,[dr.ProfilePicture]:Lw(p==null?void 0:p[dr.ProfilePicture])};COe(xOe(g),r)},s=p=>{p.stopPropagation(),o.setFieldValue(dr.ProfilePicture,void 0)},d=p=>(ww(p,g=>{o.setFieldValue(dr.ProfilePicture,g)}),!1),f=be.jsxs("div",{children:[be.jsx(T0,{}),be.jsx("div",{style:{marginTop:8},children:i("UPLOAD")})]}),m=P.useMemo(()=>[{label:be.jsxs("span",{children:[be.jsx(S1,{icon:pz,style:{marginRight:5}}),i(`${M3}.${b3.Tab1}`)]}),key:b3.Tab1,children:be.jsx(wOe,{}),forceRender:!0}],[a]);return be.jsx(Rw,{children:be.jsx(xr,{title:i(`${M3}.EDIT`,{context:"USER"}),onOk:()=>o.submit(),onCancel:r,open:n,destroyOnClose:!0,maskClosable:!1,okText:i(`${M3}.SUBMIT`),cancelText:i(`${M3}.CANCEL`),style:{maxWidth:900},okButtonProps:{loading:t},children:be.jsxs(en,{name:"user-management",form:o,onFinish:l,layout:"vertical",children:[be.jsxs(Sr,{children:[be.jsx(x1,{fieldName:dr.User,hidden:!0}),be.jsx(Ln,{span:24,children:be.jsx(Sr,{justify:"center",children:be.jsx(en.Item,{name:dr.ProfilePicture,children:be.jsx(Vd,{listType:"picture-circle",className:"avatar-uploader",beforeUpload:d,maxCount:1,showUploadList:!1,accept:"image/png, image/jpeg",children:c?be.jsxs(Sr,{className:"float-btn-container",children:[be.jsx(Rv,{src:c,size:"small",alt:"userProfile",style:{height:"100%",width:"100%"}}),be.jsx(lr,{title:i("Remove"),placement:"bottom",children:be.jsx(dn,{shape:"circle",size:"small",icon:be.jsx(J8,{}),className:"float-btn",onClick:s})})]}):f})})})})]}),be.jsx(D0,{defaultActiveKey:b3.Tab1,type:"card",size:"small",items:m})]})})})},MOe=B3()(LOe),{slice:zOe,forEach:EOe}=[];function NOe(e){return EOe.call(zOe.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const bR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,$Oe=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const i=r.maxAge-0;if(Number.isNaN(i))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(i)}`}if(r.domain){if(!bR.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!bR.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},yR={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=$Oe(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var OOe={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return yR.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&yR.create(n,e,r,o,a)}},POe={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const i=o.substring(1).split("&");for(let c=0;c<i.length;c++){const l=i[c].indexOf("=");l>0&&i[c].substring(0,l)===t&&(n=i[c].substring(l+1))}}return n}};let Tc=null;const CR=()=>{if(Tc!==null)return Tc;try{Tc=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Tc=!1}return Tc};var IOe={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&CR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&CR()&&window.localStorage.setItem(n,e)}};let Rc=null;const SR=()=>{if(Rc!==null)return Rc;try{Rc=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Rc=!1}return Rc};var TOe={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&SR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&SR()&&window.sessionStorage.setItem(n,e)}},ROe={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},kOe={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},_Oe={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},DOe={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function AOe(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class xR{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=NOe(n,this.options||{},AOe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(OOe),this.addDetector(POe),this.addDetector(IOe),this.addDetector(TOe),this.addDetector(ROe),this.addDetector(kOe),this.addDetector(_Oe),this.addDetector(DOe)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}xR.type="languageDetector",or.use(xR).use(sEe).init({debug:!1,fallbackLng:"PT",interpolation:{escapeValue:!1}}),Zn.Helpdesk=e$e,Zn.ReleaseNote=tOe,Zn.UserModal=MOe,Zn.i18n=or,Object.defineProperty(Zn,Symbol.toStringTag,{value:"Module"})});
|