"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[46876],{8375:function(e,t,n){var r=n(62540),a=n(63703),o=n(62010),l=n(98756),i=n(37793),c=n(75720),s=n(9042),u=n(5898);n(63696),t.A=function(e){var t=e.open,n=e.title,f=e.text,d=e.onClose;return(0,r.jsxs)(o.A,{open:t,onClose:d,children:[n&&(0,r.jsx)(s.A,{children:n}),(0,r.jsx)(i.A,{children:(0,r.jsx)(c.A,{sx:{whiteSpace:"pre-wrap"},children:f})}),(0,r.jsx)(l.A,{children:(0,r.jsx)(a.A,{onClick:d,children:u.Ay.translate("ButtonGotIt")})})]})}},27351:function(e,t,n){n.d(t,{C:function(){return o}}),n(78557),n(90076);var r=n(34789);function a(e){var t,n=document.createElement("textarea");if(n.value=e,document.body.appendChild(n),n.focus(),r.A.iOS&&r.A.iOSVersion<13.4){var a=document.createRange();a.selectNodeContents(n);var o=window.getSelection();o.removeAllRanges(),o.addRange(a),n.setSelectionRange(0,999999)}else n.select();try{t=document.execCommand("copy")?Promise.resolve():Promise.reject()}catch(e){t=Promise.reject()}return document.body.removeChild(n),t}function o(e){return void 0===navigator.clipboard?a(e):navigator.clipboard.writeText(e).catch((function(){return a(e)}))}},38596:function(e,t,n){n.d(t,{n:function(){return h}}),n(29305),n(32733),n(84701),n(81678),n(14382),n(69892),n(44962),n(89336),n(4754),n(94),n(33087),n(36947),n(36457),n(88908),n(83810),n(78557),n(95021),n(73687),n(83994),n(23630),n(82367);var r=n(63696),a=n(427),o=n(52672),l=n(26073),i=n(9790);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=Array(t);n0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=o.next()).done;)l.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return l}((0,b.useState)(!1),2),h=d[0],p=d[1],x=(0,b.useCallback)((function(){p(!1)}),[]),A=(0,b.useCallback)((function(){return e=void 0,t=void 0,r=function(){return function(e,t){var n,r,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(o=0)),o;)try{if(n=1,r&&(a=2&i[0]?r.return:i[0]?r.throw||((a=r.return)&&a.call(r),0):r.next)&&!(a=a.call(r,i[1])).done)return a;switch(r=0,a&&(i=[2&i[0],a.value]),i[0]){case 0:case 1:a=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,r=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!a||i[1]>a[0]&&i[1]0)&&!(r=o.next()).done;)l.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return l}((0,b.useState)(!1),2),o=a[0],l=a[1],i=(0,b.useCallback)((function(){l(!1)}),[]),c=(0,b.useCallback)((function(){l(!0)}),[]),s=(0,b.useCallback)((function(){n(t)}),[t,n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{backup:t,onClose:i,open:o}),(0,r.jsx)(M.Ay,{disablePadding:!0,secondaryAction:(0,r.jsx)(q.A,{disableInteractive:!0,title:y.Ay.translate("LabelRestore"),children:(0,r.jsx)(T.A,{onClick:s,children:(0,r.jsx)(W.A,{})})}),children:(0,r.jsx)(L.A,{onClick:c,children:(0,r.jsx)(F.A,{primary:t.DateCreated,secondary:t.Path,slotProps:{primary:{variant:"h3"},secondary:{variant:"body1"}}})})})]})},V=n(8375),K=function(e){var t=e.open,n=e.onClose,a=e.onConfirm;return(0,r.jsxs)(v.A,{open:t,onClose:n,maxWidth:"xs",fullWidth:!0,children:[(0,r.jsx)(m.A,{children:y.Ay.translate("LabelRestore")}),(0,r.jsx)(C.A,{children:(0,r.jsx)(P.A,{children:y.Ay.translate("MessageRestoreDisclaimer")})}),(0,r.jsxs)(k.A,{children:[(0,r.jsx)(o.A,{onClick:n,variant:"text",children:y.Ay.translate("ButtonCancel")}),(0,r.jsx)(o.A,{onClick:a,children:y.Ay.translate("LabelRestore")})]})]})},Q=function(e){var t=e.open;return(0,r.jsxs)(v.A,{open:t,maxWidth:"xs",fullWidth:!0,children:[(0,r.jsx)(m.A,{children:y.Ay.translate("MessageRestoreInProgress")}),(0,r.jsx)(C.A,{children:(0,r.jsxs)(l.A,{spacing:2,children:[(0,r.jsx)(P.A,{children:y.Ay.translate("MessageWaitingForServer")}),(0,r.jsx)(E.A,{})]})})]})},$=n(48272),_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)l.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return l},J=function(){var e=(0,f.gf)().api,t=h(),n=t.data,u=t.isPending,v=t.isError,m=_((0,b.useState)(!1),2),C=m[0],k=m[1],g=_((0,b.useState)(!1),2),S=g[0],w=g[1],O=_((0,b.useState)(!1),2),P=O[0],E=O[1],T=_((0,b.useState)(!1),2),M=T[0],W=T[1],L=_((0,b.useState)(!1),2),F=L[0],q=L[1],G=_((0,b.useState)(!1),2),H=G[0],N=G[1],z=_((0,b.useState)(null),2),J=z[0],X=z[1],Y=function(){var e=(0,f.gf)().api,t=new s.pi(null==e?void 0:e.configuration,void 0,null==e?void 0:e.axiosInstance);return(0,I.n)({mutationFn:function(e){return t.createBackup({backupOptionsDto:e})},onSuccess:function(){B.q.invalidateQueries({queryKey:[d]})}})}(),Z=function(){var e=(0,f.gf)().api,t=new s.pi(null==e?void 0:e.configuration,void 0,null==e?void 0:e.axiosInstance);return(0,I.n)({mutationFn:function(e){return t.startRestoreBackup({backupRestoreRequestDto:{ArchiveFileName:e}})}})}(),ee=(0,b.useCallback)((function(){k(!0)}),[]),te=(0,b.useCallback)((function(){k(!1)}),[]),ne=(0,b.useCallback)((function(){N(!1)}),[]),re=(0,b.useCallback)((function(){q(!1)}),[]),ae=(0,b.useCallback)((function(){W(!1)}),[]),oe=(0,b.useCallback)((function(e){w(!0),k(!1),Y.mutate(e,{onError:function(){q(!0)},onSettled:function(){w(!1)}})}),[Y]),le=(0,b.useCallback)((function(e){N(!0),X(e)}),[]),ie=(0,b.useCallback)((function(){(null==J?void 0:J.Path)&&Z.mutate(null==J?void 0:J.Path,{onSuccess:function(){E(!0)},onError:function(){q(!0)},onSettled:function(){N(!1)}})}),[J,Z]);return(0,b.useEffect)((function(){if(P){var t=setInterval((function(){(0,$.c)(e).getPublicSystemInfo().then((function(){E(!1),W(!0),clearInterval(t)})).catch((function(){}))}),45e3);return function(){clearInterval(t)}}}),[e,P]),u?(0,r.jsx)(x.A,{}):(0,r.jsxs)(p.A,{id:"backupsPage",title:y.Ay.translate("HeaderBackups"),className:"mainAnimatedPage type-interior",children:[(0,r.jsx)(R,{open:S}),(0,r.jsx)(Q,{open:P}),(0,r.jsx)(D,{open:C,onClose:te,onCreate:oe}),(0,r.jsx)(V.A,{open:F,text:y.Ay.translate("UnknownError"),onClose:re}),(0,r.jsx)(V.A,{open:M,title:y.Ay.translate("Success"),text:y.Ay.translate("MessageRestoreSuccess"),onClose:ae}),(0,r.jsx)(K,{open:H,onClose:ne,onConfirm:ie}),(0,r.jsx)(a.A,{className:"content-primary",children:v?(0,r.jsx)(A.A,{severity:"error",children:y.Ay.translate("BackupsPageLoadError")}):(0,r.jsxs)(l.A,{spacing:3,children:[(0,r.jsx)(i.A,{variant:"h1",children:y.Ay.translate("HeaderBackups")}),(0,r.jsx)(i.A,{children:y.Ay.translate("HeaderBackupsHelp")}),(0,r.jsx)(o.A,{sx:{alignSelf:"flex-start"},startIcon:(0,r.jsx)(c.A,{}),onClick:ee,children:y.Ay.translate("ButtonCreateBackup")}),(0,r.jsx)(a.A,{className:"readOnlyContent",children:n.length>0&&(0,r.jsx)(j.A,{sx:{bgcolor:"background.paper"},children:n.map((function(e){return(0,r.jsx)(U,{backup:e,onRestore:le},e.Path)}))})})]})})]})}}}]);