D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
opt
/
psa
/
admin
/
htdocs
/
modules
/
wp-toolkit
/
js
/
Filename :
app.bundle.js
back
Copy
/*! For license information please see app.bundle.js.LICENSE.txt */ var wptMain;(()=>{var e,t,n,s,i={961:e=>{e.exports={CLS_PREFIX:"pul-wp-toolkit-",Z_INDEX_POPOVER:1035,Z_INDEX_DROPDOWN:1035,Z_INDEX_OVERLAY:1050,Z_INDEX_TOASTER:1055,Z_INDEX_TOOLTIP:1060}},7539:e=>{e.exports={CLS_PREFIX:"pul-wp-toolkit-",Z_INDEX_POPOVER:1035,Z_INDEX_DROPDOWN:1035,Z_INDEX_OVERLAY:1050,Z_INDEX_TOASTER:1055,Z_INDEX_TOOLTIP:1060}},95318:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},15897:(e,t,n)=>{"use strict";t.__esModule=!0;var s=n(67294),i=(r(s),r(n(45697))),a=r(n(47815));function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}r(n(42473));var u=1073741823;function d(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,s){e=n,t.forEach((function(t){return t(e,s)}))}}}t.default=function(e,t){var n,r,p="__create-react-context-"+(0,a.default)()+"__",h=function(e){function n(){var t,s;o(this,n);for(var i=arguments.length,a=Array(i),r=0;r<i;r++)a[r]=arguments[r];return t=s=l(this,e.call.apply(e,[this].concat(a))),s.emitter=d(s.props.value),l(s,t)}return c(n,e),n.prototype.getChildContext=function(){var e;return(e={})[p]=this.emitter,e},n.prototype.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n=this.props.value,s=e.value,i=void 0;((a=n)===(r=s)?0!==a||1/a==1/r:a!=a&&r!=r)?i=0:(i="function"==typeof t?t(n,s):u,0!=(i|=0)&&this.emitter.set(e.value,i))}var a,r},n.prototype.render=function(){return this.props.children},n}(s.Component);h.childContextTypes=((n={})[p]=i.default.object.isRequired,n);var m=function(t){function n(){var e,s;o(this,n);for(var i=arguments.length,a=Array(i),r=0;r<i;r++)a[r]=arguments[r];return e=s=l(this,t.call.apply(t,[this].concat(a))),s.state={value:s.getValue()},s.onUpdate=function(e,t){0!=((0|s.observedBits)&t)&&s.setState({value:s.getValue()})},l(s,e)}return c(n,t),n.prototype.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?u:t},n.prototype.componentDidMount=function(){this.context[p]&&this.context[p].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?u:e},n.prototype.componentWillUnmount=function(){this.context[p]&&this.context[p].off(this.onUpdate)},n.prototype.getValue=function(){return this.context[p]?this.context[p].get():e},n.prototype.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(s.Component);return m.contextTypes=((r={})[p]=i.default.object,r),{Provider:h,Consumer:m}},e.exports=t.default},88740:(e,t,n)=>{"use strict";t.__esModule=!0;var s=a(n(67294)),i=a(n(15897));function a(e){return e&&e.__esModule?e:{default:e}}t.default=s.default.createContext||i.default,e.exports=t.default},44724:(e,t)=>{var n;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var r=i.apply(null,n);r&&e.push(r)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var o in n)s.call(n,o)&&n[o]&&e.push(o)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},25077:(e,t,n)=>{"use strict";var s=n(12616);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,r){if(r!==s){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},61298:(e,t,n)=>{e.exports=n(25077)()},12616:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},78697:(e,t,n)=>{"use strict";var s=n(8838);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,r){if(r!==s){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},35906:(e,t,n)=>{e.exports=n(78697)()},8838:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},70254:e=>{e.exports=function(e){function t(s){if(n[s])return n[s].exports;var i=n[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,s){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:s})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=13)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(4)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var s=n(32)("wks"),i=n(9),a=n(0).Symbol,r="function"==typeof a;(e.exports=function(e){return s[e]||(s[e]=r&&a[e]||(r?a:i)("Symbol."+e))}).store=s},function(e,t,n){var s=n(0),i=n(2),a=n(8),r=n(22),o=n(10),l=function(e,t,n){var c,u,d,p,h=e&l.F,m=e&l.G,f=e&l.S,g=e&l.P,b=e&l.B,v=m?s:f?s[t]||(s[t]={}):(s[t]||{}).prototype,y=m?i:i[t]||(i[t]={}),_=y.prototype||(y.prototype={});for(c in m&&(n=t),n)d=((u=!h&&v&&void 0!==v[c])?v:n)[c],p=b&&u?o(d,s):g&&"function"==typeof d?o(Function.call,d):d,v&&r(v,c,d,e&l.U),y[c]!=d&&a(y,c,p),g&&_[c]!=d&&(_[c]=d)};s.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var s=n(16),i=n(21);e.exports=n(3)?function(e,t,n){return s.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n=0,s=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+s).toString(36))}},function(e,t,n){var s=n(24);e.exports=function(e,t,n){if(s(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,s){return e.call(t,n,s)};case 3:return function(n,s,i){return e.call(t,n,s,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var s=n(28),i=Math.min;e.exports=function(e){return e>0?i(s(e),9007199254740991):0}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),s=e.name||"",i=e.type||"",a=i.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim();return"."===t.charAt(0)?s.toLowerCase().endsWith(t.toLowerCase()):t.endsWith("/*")?a===t.replace(/\/.*$/,""):i===t}))}return!0},n(14),n(34)},function(e,t,n){n(15),e.exports=n(2).Array.some},function(e,t,n){"use strict";var s=n(7),i=n(25)(3);s(s.P+s.F*!n(33)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var s=n(17),i=n(18),a=n(20),r=Object.defineProperty;t.f=n(3)?Object.defineProperty:function(e,t,n){if(s(e),t=a(t,!0),s(n),i)try{return r(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var s=n(1);e.exports=function(e){if(!s(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(3)&&!n(4)((function(){return 7!=Object.defineProperty(n(19)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var s=n(1),i=n(0).document,a=s(i)&&s(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var s=n(1);e.exports=function(e,t){if(!s(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!s(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!s(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!s(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var s=n(0),i=n(8),a=n(23),r=n(9)("src"),o=Function.toString,l=(""+o).split("toString");n(2).inspectSource=function(e){return o.call(e)},(e.exports=function(e,t,n,o){var c="function"==typeof n;c&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(a(n,r)||i(n,r,e[t]?""+e[t]:l.join(String(t)))),e===s?e[t]=n:o?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[r]||o.call(this)}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var s=n(10),i=n(26),a=n(27),r=n(12),o=n(29);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,d=6==e,p=5==e||d,h=t||o;return function(t,o,m){for(var f,g,b=a(t),v=i(b),y=s(o,m,3),_=r(v.length),x=0,S=n?h(t,_):l?h(t,0):void 0;_>x;x++)if((p||x in v)&&(g=y(f=v[x],x,b),e))if(n)S[x]=g;else if(g)switch(e){case 3:return!0;case 5:return f;case 6:return x;case 2:S.push(f)}else if(u)return!1;return d?-1:c||u?u:S}}},function(e,t,n){var s=n(5);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==s(e)?e.split(""):Object(e)}},function(e,t,n){var s=n(11);e.exports=function(e){return Object(s(e))}},function(e,t){var n=Math.ceil,s=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?s:n)(e)}},function(e,t,n){var s=n(30);e.exports=function(e,t){return new(s(e))(t)}},function(e,t,n){var s=n(1),i=n(31),a=n(6)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),s(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){var s=n(5);e.exports=Array.isArray||function(e){return"Array"==s(e)}},function(e,t,n){var s=n(0),i=s["__core-js_shared__"]||(s["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,n){"use strict";var s=n(4);e.exports=function(e,t){return!!e&&s((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){n(35),e.exports=n(2).String.endsWith},function(e,t,n){"use strict";var s=n(7),i=n(12),a=n(36),r="".endsWith;s(s.P+s.F*n(38)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,s=i(t.length),o=void 0===n?s:Math.min(i(n),s),l=String(e);return r?r.call(t,l,o):t.slice(o-l.length,o)===l}})},function(e,t,n){var s=n(37),i=n(11);e.exports=function(e,t,n){if(s(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var s=n(1),i=n(5),a=n(6)("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,n){var s=n(6)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[s]=!1,!"/./"[e](t)}catch(e){}}return!0}}])},9669:(e,t,n)=>{e.exports=n(51609)},55448:(e,t,n)=>{"use strict";var s=n(64867),i=n(36026),a=n(4372),r=n(15327),o=n(94097),l=n(84109),c=n(67985),u=n(85061);e.exports=function(e){return new Promise((function(t,n){var d=e.data,p=e.headers;s.isFormData(d)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(m+":"+f)}var g=o(e.baseURL,e.url);if(h.open(e.method.toUpperCase(),r(g,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,h.onreadystatechange=function(){if(h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var s="getAllResponseHeaders"in h?l(h.getAllResponseHeaders()):null,a={data:e.responseType&&"text"!==e.responseType?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:s,config:e,request:h};i(t,n,a),h=null}},h.onabort=function(){h&&(n(u("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(u("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,"ECONNABORTED",h)),h=null},s.isStandardBrowserEnv()){var b=(e.withCredentials||c(g))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;b&&(p[e.xsrfHeaderName]=b)}if("setRequestHeader"in h&&s.forEach(p,(function(e,t){void 0===d&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)})),s.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),e.responseType)try{h.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),d||(d=null),h.send(d)}))}},51609:(e,t,n)=>{"use strict";var s=n(64867),i=n(91849),a=n(30321),r=n(47185);function o(e){var t=new a(e),n=i(a.prototype.request,t);return s.extend(n,a.prototype,t),s.extend(n,t),n}var l=o(n(45655));l.Axios=a,l.create=function(e){return o(r(l.defaults,e))},l.Cancel=n(65263),l.CancelToken=n(14972),l.isCancel=n(26502),l.all=function(e){return Promise.all(e)},l.spread=n(8713),l.isAxiosError=n(16268),e.exports=l,e.exports.default=l},65263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},14972:(e,t,n)=>{"use strict";var s=n(65263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new s(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},26502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},30321:(e,t,n)=>{"use strict";var s=n(64867),i=n(15327),a=n(80782),r=n(13572),o=n(47185);function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=o(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[r,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=o(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},s.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(o(n||{},{method:e,url:t,data:(n||{}).data}))}})),s.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,s){return this.request(o(s||{},{method:e,url:t,data:n}))}})),e.exports=l},80782:(e,t,n)=>{"use strict";var s=n(64867);function i(){this.handlers=[]}i.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){s.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},94097:(e,t,n)=>{"use strict";var s=n(91793),i=n(7303);e.exports=function(e,t){return e&&!s(t)?i(e,t):t}},85061:(e,t,n)=>{"use strict";var s=n(80481);e.exports=function(e,t,n,i,a){var r=new Error(e);return s(r,t,n,i,a)}},13572:(e,t,n)=>{"use strict";var s=n(64867),i=n(18527),a=n(26502),r=n(45655);function o(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return o(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=s.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),s.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||r.adapter)(e).then((function(t){return o(e),t.data=i(t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(o(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},80481:e=>{"use strict";e.exports=function(e,t,n,s,i){return e.config=t,n&&(e.code=n),e.request=s,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},47185:(e,t,n)=>{"use strict";var s=n(64867);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],r=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function l(e,t){return s.isPlainObject(e)&&s.isPlainObject(t)?s.merge(e,t):s.isPlainObject(t)?s.merge({},t):s.isArray(t)?t.slice():t}function c(i){s.isUndefined(t[i])?s.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(e[i],t[i])}s.forEach(i,(function(e){s.isUndefined(t[e])||(n[e]=l(void 0,t[e]))})),s.forEach(a,c),s.forEach(r,(function(i){s.isUndefined(t[i])?s.isUndefined(e[i])||(n[i]=l(void 0,e[i])):n[i]=l(void 0,t[i])})),s.forEach(o,(function(s){s in t?n[s]=l(e[s],t[s]):s in e&&(n[s]=l(void 0,e[s]))}));var u=i.concat(a).concat(r).concat(o),d=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return s.forEach(d,c),n}},36026:(e,t,n)=>{"use strict";var s=n(85061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(s("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},18527:(e,t,n)=>{"use strict";var s=n(64867);e.exports=function(e,t,n){return s.forEach(n,(function(n){e=n(e,t)})),e}},45655:(e,t,n)=>{"use strict";var s=n(64867),i=n(16016),a={"Content-Type":"application/x-www-form-urlencoded"};function r(e,t){!s.isUndefined(e)&&s.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o,l={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(o=n(55448)),o),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),s.isFormData(e)||s.isArrayBuffer(e)||s.isBuffer(e)||s.isStream(e)||s.isFile(e)||s.isBlob(e)?e:s.isArrayBufferView(e)?e.buffer:s.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):s.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};s.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),s.forEach(["post","put","patch"],(function(e){l.headers[e]=s.merge(a)})),e.exports=l},91849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),s=0;s<n.length;s++)n[s]=arguments[s];return e.apply(t,n)}}},15327:(e,t,n)=>{"use strict";var s=n(64867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(s.isURLSearchParams(t))a=t.toString();else{var r=[];s.forEach(t,(function(e,t){null!=e&&(s.isArray(e)?t+="[]":e=[e],s.forEach(e,(function(e){s.isDate(e)?e=e.toISOString():s.isObject(e)&&(e=JSON.stringify(e)),r.push(i(t)+"="+i(e))})))})),a=r.join("&")}if(a){var o=e.indexOf("#");-1!==o&&(e=e.slice(0,o)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var s=n(64867);e.exports=s.isStandardBrowserEnv()?{write:function(e,t,n,i,a,r){var o=[];o.push(e+"="+encodeURIComponent(t)),s.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),s.isString(i)&&o.push("path="+i),s.isString(a)&&o.push("domain="+a),!0===r&&o.push("secure"),document.cookie=o.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},91793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},16268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},67985:(e,t,n)=>{"use strict";var s=n(64867);e.exports=s.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var s=e;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=s.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},16016:(e,t,n)=>{"use strict";var s=n(64867);e.exports=function(e,t){s.forEach(e,(function(n,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[s])}))}},84109:(e,t,n)=>{"use strict";var s=n(64867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,r={};return e?(s.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=s.trim(e.substr(0,a)).toLowerCase(),n=s.trim(e.substr(a+1)),t){if(r[t]&&i.indexOf(t)>=0)return;r[t]="set-cookie"===t?(r[t]?r[t]:[]).concat([n]):r[t]?r[t]+", "+n:n}})),r):r}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},64867:(e,t,n)=>{"use strict";var s=n(91849),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function r(e){return void 0===e}function o(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!r(e)&&null!==e.constructor&&!r(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:o,isPlainObject:l,isUndefined:r,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return o(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function n(n,s){l(t[s])&&l(n)?t[s]=e(t[s],n):l(n)?t[s]=e({},n):a(n)?t[s]=n.slice():t[s]=n}for(var s=0,i=arguments.length;s<i;s++)u(arguments[s],n);return t},extend:function(e,t,n){return u(t,(function(t,i){e[i]=n&&"function"==typeof t?s(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},21924:(e,t,n)=>{"use strict";var s=n(40210),i=n(55559),a=i(s("String.prototype.indexOf"));e.exports=function(e,t){var n=s(e,!!t);return"function"==typeof n&&a(e,".prototype.")>-1?i(n):n}},55559:(e,t,n)=>{"use strict";var s=n(58612),i=n(40210),a=i("%Function.prototype.apply%"),r=i("%Function.prototype.call%"),o=i("%Reflect.apply%",!0)||s.call(r,a),l=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=o(s,r,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var d=function(){return o(s,a,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d},94184:(e,t)=>{var n;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var r=i.apply(null,n);r&&e.push(r)}}else if("object"===a)if(n.toString===Object.prototype.toString)for(var o in n)s.call(n,o)&&n[o]&&e.push(o);else e.push(n.toString())}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},74247:function(e,t){var n,s;void 0===(s="function"==typeof(n=function(){var e=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function t(e){var t,n,s=e.replace(/^v/,"").replace(/\+.*$/,""),i=(n="-",-1===(t=s).indexOf(n)?t.length:t.indexOf(n)),a=s.substring(0,i).split(".");return a.push(s.substring(i+1)),a}function n(e){return isNaN(Number(e))?e:Number(e)}function s(t){if("string"!=typeof t)throw new TypeError("Invalid argument expected string");if(!e.test(t))throw new Error("Invalid argument not valid semver ('"+t+"' received)")}function i(e,i){[e,i].forEach(s);for(var a=t(e),r=t(i),o=0;o<Math.max(a.length-1,r.length-1);o++){var l=parseInt(a[o]||0,10),c=parseInt(r[o]||0,10);if(l>c)return 1;if(c>l)return-1}var u=a[a.length-1],d=r[r.length-1];if(u&&d){var p=u.split(".").map(n),h=d.split(".").map(n);for(o=0;o<Math.max(p.length,h.length);o++){if(void 0===p[o]||"string"==typeof h[o]&&"number"==typeof p[o])return-1;if(void 0===h[o]||"string"==typeof p[o]&&"number"==typeof h[o])return 1;if(p[o]>h[o])return 1;if(h[o]>p[o])return-1}}else if(u||d)return u?-1:1;return 0}var a=[">",">=","=","<","<="],r={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};return i.validate=function(t){return"string"==typeof t&&e.test(t)},i.compare=function(e,t,n){!function(e){if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===a.indexOf(e))throw new TypeError("Invalid operator, expected one of "+a.join("|"))}(n);var s=i(e,t);return r[n].indexOf(s)>-1},i})?n.apply(t,[]):n)||(e.exports=s)},20640:(e,t,n)=>{"use strict";var s=n(11742),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,r,o,l,c,u=!1;t||(t={}),n=t.debug||!1;try{if(r=s(),o=document.createRange(),l=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(s){if(s.stopPropagation(),t.format)if(s.preventDefault(),void 0===s.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=i[t.format]||i.default;window.clipboardData.setData(a,e)}else s.clipboardData.clearData(),s.clipboardData.setData(t.format,e);t.onCopy&&(s.preventDefault(),t.onCopy(s.clipboardData))})),document.body.appendChild(c),o.selectNodeContents(c),l.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(s){n&&console.error("unable to copy using execCommand: ",s),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(s){n&&console.error("unable to copy using clipboardData: ",s),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(o):l.removeAllRanges()),c&&document.body.removeChild(c),r()}return u}},87377:(e,t,n)=>{n(78783),n(91038),n(79753),n(26572),n(92222),n(50545),n(26541),n(43290),n(57327),n(69826),n(34553),n(84944),n(86535),n(89554),n(26699),n(82772),n(66992),n(69600),n(94986),n(21249),n(85827),n(96644),n(65069),n(47042),n(5212),n(2707),n(38706),n(40561),n(33792),n(99244);var s=n(40857);e.exports=s.Array},85302:(e,t,n)=>{n(69720);var s=n(40857);e.exports=s.Object.entries},24667:(e,t,n)=>{n(26833);var s=n(40857);e.exports=s.Object.values},22954:(e,t,n)=>{n(88674),n(17727);var s=n(2649);e.exports=s("Promise","finally")},88188:(e,t,n)=>{n(70189),n(41539),n(78783),n(33948);var s=n(40857);e.exports=s.Set},44533:(e,t,n)=>{n(32023);var s=n(2649);e.exports=s("String","includes")},83043:(e,t,n)=>{var s=n(87377);n(51532),n(69810),n(84811),n(3048),n(77461),n(8e4),n(46273),n(83475),n(3087),e.exports=s},15634:(e,t,n)=>{var s=n(85302);e.exports=s},81817:(e,t,n)=>{var s=n(24667);e.exports=s},74318:(e,t,n)=>{var s=n(22954);e.exports=s},47834:(e,t,n)=>{var s=n(88188);n(46006),n(69916),n(88921),n(96248),n(11477),n(13599),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),e.exports=s},3573:(e,t,n)=>{var s=n(44533);e.exports=s},61357:(e,t,n)=>{var s=n(38149);e.exports=s},13099:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},96077:(e,t,n)=>{var s=n(70111);e.exports=function(e){if(!s(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},51223:(e,t,n)=>{var s=n(5112),i=n(70030),a=n(3070),r=s("unscopables"),o=Array.prototype;null==o[r]&&a.f(o,r,{configurable:!0,value:i(null)}),e.exports=function(e){o[r][e]=!0}},25787:e=>{e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},19670:(e,t,n)=>{var s=n(70111);e.exports=function(e){if(!s(e))throw TypeError(String(e)+" is not an object");return e}},1048:(e,t,n)=>{"use strict";var s=n(47908),i=n(51400),a=n(17466),r=Math.min;e.exports=[].copyWithin||function(e,t){var n=s(this),o=a(n.length),l=i(e,o),c=i(t,o),u=arguments.length>2?arguments[2]:void 0,d=r((void 0===u?o:i(u,o))-c,o-l),p=1;for(c<l&&l<c+d&&(p=-1,c+=d-1,l+=d-1);d-- >0;)c in n?n[l]=n[c]:delete n[l],l+=p,c+=p;return n}},21285:(e,t,n)=>{"use strict";var s=n(47908),i=n(51400),a=n(17466);e.exports=function(e){for(var t=s(this),n=a(t.length),r=arguments.length,o=i(r>1?arguments[1]:void 0,n),l=r>2?arguments[2]:void 0,c=void 0===l?n:i(l,n);c>o;)t[o++]=e;return t}},18533:(e,t,n)=>{"use strict";var s=n(42092).forEach,i=n(9341)("forEach");e.exports=i?[].forEach:function(e){return s(this,e,arguments.length>1?arguments[1]:void 0)}},48457:(e,t,n)=>{"use strict";var s=n(49974),i=n(47908),a=n(53411),r=n(97659),o=n(17466),l=n(86135),c=n(71246);e.exports=function(e){var t,n,u,d,p,h,m=i(e),f="function"==typeof this?this:Array,g=arguments.length,b=g>1?arguments[1]:void 0,v=void 0!==b,y=c(m),_=0;if(v&&(b=s(b,g>2?arguments[2]:void 0,2)),null==y||f==Array&&r(y))for(n=new f(t=o(m.length));t>_;_++)h=v?b(m[_],_):m[_],l(n,_,h);else for(p=(d=y.call(m)).next,n=new f;!(u=p.call(d)).done;_++)h=v?a(d,b,[u.value,_],!0):u.value,l(n,_,h);return n.length=_,n}},41318:(e,t,n)=>{var s=n(45656),i=n(17466),a=n(51400),r=function(e){return function(t,n,r){var o,l=s(t),c=i(l.length),u=a(r,c);if(e&&n!=n){for(;c>u;)if((o=l[u++])!=o)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:r(!0),indexOf:r(!1)}},9671:(e,t,n)=>{var s=n(49974),i=n(68361),a=n(47908),r=n(17466),o=function(e){var t=6==e;return function(n,o,l){for(var c,u=a(n),d=i(u),p=s(o,l,3),h=r(d.length);h-- >0;)if(p(c=d[h],h,u))switch(e){case 5:return c;case 6:return h}return t?-1:void 0}};e.exports={findLast:o(5),findLastIndex:o(6)}},42092:(e,t,n)=>{var s=n(49974),i=n(68361),a=n(47908),r=n(17466),o=n(65417),l=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,d=6==e,p=7==e,h=5==e||d;return function(m,f,g,b){for(var v,y,_=a(m),x=i(_),S=s(f,g,3),w=r(x.length),k=0,j=b||o,T=t?j(m,w):n||p?j(m,0):void 0;w>k;k++)if((h||k in x)&&(y=S(v=x[k],k,_),e))if(t)T[k]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return k;case 2:l.call(T,v)}else switch(e){case 4:return!1;case 7:l.call(T,v)}return d?-1:c||u?u:T}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},86583:(e,t,n)=>{"use strict";var s=n(45656),i=n(99958),a=n(17466),r=n(9341),o=Math.min,l=[].lastIndexOf,c=!!l&&1/[1].lastIndexOf(1,-0)<0,u=r("lastIndexOf"),d=c||!u;e.exports=d?function(e){if(c)return l.apply(this,arguments)||0;var t=s(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=o(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}:l},81194:(e,t,n)=>{var s=n(47293),i=n(5112),a=n(7392),r=i("species");e.exports=function(e){return a>=51||!s((function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:(e,t,n)=>{"use strict";var s=n(47293);e.exports=function(e,t){var n=[][e];return!!n&&s((function(){n.call(null,t||function(){throw 1},1)}))}},53671:(e,t,n)=>{var s=n(13099),i=n(47908),a=n(68361),r=n(17466),o=function(e){return function(t,n,o,l){s(n);var c=i(t),u=a(c),d=r(c.length),p=e?d-1:0,h=e?-1:1;if(o<2)for(;;){if(p in u){l=u[p],p+=h;break}if(p+=h,e?p<0:d<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:d>p;p+=h)p in u&&(l=n(l,u[p],p,c));return l}};e.exports={left:o(!1),right:o(!0)}},94362:e=>{var t=Math.floor,n=function(e,a){var r=e.length,o=t(r/2);return r<8?s(e,a):i(n(e.slice(0,o),a),n(e.slice(o),a),a)},s=function(e,t){for(var n,s,i=e.length,a=1;a<i;){for(s=a,n=e[a];s&&t(e[s-1],n)>0;)e[s]=e[--s];s!==a++&&(e[s]=n)}return e},i=function(e,t,n){for(var s=e.length,i=t.length,a=0,r=0,o=[];a<s||r<i;)a<s&&r<i?o.push(n(e[a],t[r])<=0?e[a++]:t[r++]):o.push(a<s?e[a++]:t[r++]);return o};e.exports=n},65417:(e,t,n)=>{var s=n(70111),i=n(43157),a=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?s(n)&&null===(n=n[a])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},60956:(e,t,n)=>{"use strict";var s=n(17466),i=n(47908),a=n(35005),r=n(65417),o=[].push;e.exports=function(e){var t,n,l,c,u=i(this),d=s(u.length),p=r(u,0),h=new(a("Map"));if("function"==typeof e)t=e;else{if(null!=e)throw new TypeError("Incorrect resolver!");t=function(e){return e}}for(n=0;n<d;n++)c=t(l=u[n]),h.has(c)||h.set(c,l);return h.forEach((function(e){o.call(p,e)})),p}},53411:(e,t,n)=>{var s=n(19670),i=n(99212);e.exports=function(e,t,n,a){try{return a?t(s(n)[0],n[1]):t(n)}catch(t){throw i(e),t}}},17072:(e,t,n)=>{var s=n(5112)("iterator"),i=!1;try{var a=0,r={next:function(){return{done:!!a++}},return:function(){i=!0}};r[s]=function(){return this},Array.from(r,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a={};a[s]=function(){return{next:function(){return{done:n=!0}}}},e(a)}catch(e){}return n}},84326:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},70648:(e,t,n)=>{var s=n(51694),i=n(84326),a=n(5112)("toStringTag"),r="Arguments"==i(function(){return arguments}());e.exports=s?i:function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),a))?n:r?i(t):"Object"==(s=i(t))&&"function"==typeof t.callee?"Arguments":s}},31501:(e,t,n)=>{"use strict";var s=n(19670),i=n(13099);e.exports=function(){for(var e=s(this),t=i(e.add),n=0,a=arguments.length;n<a;n++)t.call(e,arguments[n]);return e}},34092:(e,t,n)=>{"use strict";var s=n(19670),i=n(13099);e.exports=function(){for(var e,t=s(this),n=i(t.delete),a=!0,r=0,o=arguments.length;r<o;r++)e=n.call(t,arguments[r]),a=a&&e;return!!a}},27296:(e,t,n)=>{"use strict";var s=n(13099),i=n(49974),a=n(20408);e.exports=function(e){var t,n,r,o,l=arguments.length,c=l>1?arguments[1]:void 0;return s(this),(t=void 0!==c)&&s(c),null==e?new this:(n=[],t?(r=0,o=i(c,l>2?arguments[2]:void 0,2),a(e,(function(e){n.push(o(e,r++))}))):a(e,n.push,{that:n}),new this(n))}},82044:e=>{"use strict";e.exports=function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}},95631:(e,t,n)=>{"use strict";var s=n(3070).f,i=n(70030),a=n(12248),r=n(49974),o=n(25787),l=n(20408),c=n(70654),u=n(96340),d=n(19781),p=n(62423).fastKey,h=n(29909),m=h.set,f=h.getterFor;e.exports={getConstructor:function(e,t,n,c){var u=e((function(e,s){o(e,u,t),m(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),d||(e.size=0),null!=s&&l(s,e[c],{that:e,AS_ENTRIES:n})})),h=f(t),g=function(e,t,n){var s,i,a=h(e),r=b(e,t);return r?r.value=n:(a.last=r={index:i=p(t,!0),key:t,value:n,previous:s=a.last,next:void 0,removed:!1},a.first||(a.first=r),s&&(s.next=r),d?a.size++:e.size++,"F"!==i&&(a.index[i]=r)),e},b=function(e,t){var n,s=h(e),i=p(t);if("F"!==i)return s.index[i];for(n=s.first;n;n=n.next)if(n.key==t)return n};return a(u.prototype,{clear:function(){for(var e=h(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,d?e.size=0:this.size=0},delete:function(e){var t=this,n=h(t),s=b(t,e);if(s){var i=s.next,a=s.previous;delete n.index[s.index],s.removed=!0,a&&(a.next=i),i&&(i.previous=a),n.first==s&&(n.first=i),n.last==s&&(n.last=a),d?n.size--:t.size--}return!!s},forEach:function(e){for(var t,n=h(this),s=r(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(s(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),a(u.prototype,n?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&s(u.prototype,"size",{get:function(){return h(this).size}}),u},setStrong:function(e,t,n){var s=t+" Iterator",i=f(t),a=f(s);c(e,t,(function(e,t){m(this,{type:s,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(t)}}},77710:(e,t,n)=>{"use strict";var s=n(82109),i=n(17854),a=n(54705),r=n(31320),o=n(62423),l=n(20408),c=n(25787),u=n(70111),d=n(47293),p=n(17072),h=n(58003),m=n(79587);e.exports=function(e,t,n){var f=-1!==e.indexOf("Map"),g=-1!==e.indexOf("Weak"),b=f?"set":"add",v=i[e],y=v&&v.prototype,_=v,x={},S=function(e){var t=y[e];r(y,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(g&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!u(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(g&&!u(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(a(e,"function"!=typeof v||!(g||y.forEach&&!d((function(){(new v).entries().next()})))))_=n.getConstructor(t,e,f,b),o.REQUIRED=!0;else if(a(e,!0)){var w=new _,k=w[b](g?{}:-0,1)!=w,j=d((function(){w.has(1)})),T=p((function(e){new v(e)})),C=!g&&d((function(){for(var e=new v,t=5;t--;)e[b](t,t);return!e.has(-0)}));T||((_=t((function(t,n){c(t,_,e);var s=m(new v,t,_);return null!=n&&l(n,s[b],{that:s,AS_ENTRIES:f}),s}))).prototype=y,y.constructor=_),(j||C)&&(S("delete"),S("has"),f&&S("get")),(C||k)&&S(b),g&&y.clear&&delete y.clear}return x[e]=_,s({global:!0,forced:_!=v},x),h(_,e),g||n.setStrong(_,e,f),_}},99920:(e,t,n)=>{var s=n(86656),i=n(53887),a=n(31236),r=n(3070);e.exports=function(e,t){for(var n=i(t),o=r.f,l=a.f,c=0;c<n.length;c++){var u=n[c];s(e,u)||o(e,u,l(t,u))}}},84964:(e,t,n)=>{var s=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[s]=!1,"/./"[e](t)}catch(e){}}return!1}},49920:(e,t,n)=>{var s=n(47293);e.exports=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},24994:(e,t,n)=>{"use strict";var s=n(13383).IteratorPrototype,i=n(70030),a=n(79114),r=n(58003),o=n(97497),l=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(s,{next:a(1,n)}),r(e,c,!1,!0),o[c]=l,e}},68880:(e,t,n)=>{var s=n(19781),i=n(3070),a=n(79114);e.exports=s?function(e,t,n){return i.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},79114:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},86135:(e,t,n)=>{"use strict";var s=n(57593),i=n(3070),a=n(79114);e.exports=function(e,t,n){var r=s(t);r in e?i.f(e,r,a(0,n)):e[r]=n}},70654:(e,t,n)=>{"use strict";var s=n(82109),i=n(24994),a=n(79518),r=n(27674),o=n(58003),l=n(68880),c=n(31320),u=n(5112),d=n(31913),p=n(97497),h=n(13383),m=h.IteratorPrototype,f=h.BUGGY_SAFARI_ITERATORS,g=u("iterator"),b="keys",v="values",y="entries",_=function(){return this};e.exports=function(e,t,n,u,h,x,S){i(n,t,u);var w,k,j,T=function(e){if(e===h&&O)return O;if(!f&&e in P)return P[e];switch(e){case b:case v:case y:return function(){return new n(this,e)}}return function(){return new n(this)}},C=t+" Iterator",D=!1,P=e.prototype,I=P[g]||P["@@iterator"]||h&&P[h],O=!f&&I||T(h),L="Array"==t&&P.entries||I;if(L&&(w=a(L.call(new e)),m!==Object.prototype&&w.next&&(d||a(w)===m||(r?r(w,m):"function"!=typeof w[g]&&l(w,g,_)),o(w,C,!0,!0),d&&(p[C]=_))),h==v&&I&&I.name!==v&&(D=!0,O=function(){return I.call(this)}),d&&!S||P[g]===O||l(P,g,O),p[t]=O,h)if(k={values:T(v),keys:x?O:T(b),entries:T(y)},S)for(j in k)(f||D||!(j in P))&&c(P,j,k[j]);else s({target:t,proto:!0,forced:f||D},k);return k}},19781:(e,t,n)=>{var s=n(47293);e.exports=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},80317:(e,t,n)=>{var s=n(17854),i=n(70111),a=s.document,r=i(a)&&i(a.createElement);e.exports=function(e){return r?a.createElement(e):{}}},48324:e=>{e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},68886:(e,t,n)=>{var s=n(88113).match(/firefox\/(\d+)/i);e.exports=!!s&&+s[1]},7871:e=>{e.exports="object"==typeof window},30256:(e,t,n)=>{var s=n(88113);e.exports=/MSIE|Trident/.test(s)},6833:(e,t,n)=>{var s=n(88113);e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(s)},35268:(e,t,n)=>{var s=n(84326),i=n(17854);e.exports="process"==s(i.process)},71036:(e,t,n)=>{var s=n(88113);e.exports=/web0s(?!.*chrome)/i.test(s)},88113:(e,t,n)=>{var s=n(35005);e.exports=s("navigator","userAgent")||""},7392:(e,t,n)=>{var s,i,a=n(17854),r=n(88113),o=a.process,l=o&&o.versions,c=l&&l.v8;c?i=(s=c.split("."))[0]<4?1:s[0]+s[1]:r&&(!(s=r.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=r.match(/Chrome\/(\d+)/))&&(i=s[1]),e.exports=i&&+i},98008:(e,t,n)=>{var s=n(88113).match(/AppleWebKit\/(\d+)\./);e.exports=!!s&&+s[1]},2649:(e,t,n)=>{var s=n(17854),i=n(49974),a=Function.call;e.exports=function(e,t,n){return i(a,s[e].prototype[t],n)}},80748:e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},82109:(e,t,n)=>{var s=n(17854),i=n(31236).f,a=n(68880),r=n(31320),o=n(83505),l=n(99920),c=n(54705);e.exports=function(e,t){var n,u,d,p,h,m=e.target,f=e.global,g=e.stat;if(n=f?s:g?s[m]||o(m,{}):(s[m]||{}).prototype)for(u in t){if(p=t[u],d=e.noTargetGet?(h=i(n,u))&&h.value:n[u],!c(f?u:m+(g?".":"#")+u,e.forced)&&void 0!==d){if(typeof p==typeof d)continue;l(p,d)}(e.sham||d&&d.sham)&&a(p,"sham",!0),r(n,u,p,e)}}},47293:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},6790:(e,t,n)=>{"use strict";var s=n(43157),i=n(17466),a=n(49974),r=function(e,t,n,o,l,c,u,d){for(var p,h=l,m=0,f=!!u&&a(u,d,3);m<o;){if(m in n){if(p=f?f(n[m],m,t):n[m],c>0&&s(p))h=r(e,t,p,i(p.length),h,c-1)-1;else{if(h>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[h]=p}h++}m++}return h};e.exports=r},76677:(e,t,n)=>{var s=n(47293);e.exports=!s((function(){return Object.isExtensible(Object.preventExtensions({}))}))},49974:(e,t,n)=>{var s=n(13099);e.exports=function(e,t,n){if(s(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,s){return e.call(t,n,s)};case 3:return function(n,s,i){return e.call(t,n,s,i)}}return function(){return e.apply(t,arguments)}}},35005:(e,t,n)=>{var s=n(40857),i=n(17854),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(s[e])||a(i[e]):s[e]&&s[e][t]||i[e]&&i[e][t]}},71246:(e,t,n)=>{var s=n(70648),i=n(97497),a=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[a]||e["@@iterator"]||i[s(e)]}},18554:(e,t,n)=>{var s=n(19670),i=n(71246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return s(t.call(e))}},96767:(e,t,n)=>{var s=n(31913),i=n(18554);e.exports=s?i:function(e){return Set.prototype.values.call(e)}},17854:(e,t,n)=>{var s=function(e){return e&&e.Math==Math&&e};e.exports=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},86656:(e,t,n)=>{var s=n(47908),i={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return i.call(s(e),t)}},3501:e=>{e.exports={}},842:(e,t,n)=>{var s=n(17854);e.exports=function(e,t){var n=s.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},60490:(e,t,n)=>{var s=n(35005);e.exports=s("document","documentElement")},64664:(e,t,n)=>{var s=n(19781),i=n(47293),a=n(80317);e.exports=!s&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},68361:(e,t,n)=>{var s=n(47293),i=n(84326),a="".split;e.exports=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},79587:(e,t,n)=>{var s=n(70111),i=n(27674);e.exports=function(e,t,n){var a,r;return i&&"function"==typeof(a=t.constructor)&&a!==n&&s(r=a.prototype)&&r!==n.prototype&&i(e,r),e}},42788:(e,t,n)=>{var s=n(5465),i=Function.toString;"function"!=typeof s.inspectSource&&(s.inspectSource=function(e){return i.call(e)}),e.exports=s.inspectSource},62423:(e,t,n)=>{var s=n(3501),i=n(70111),a=n(86656),r=n(3070).f,o=n(69711),l=n(76677),c=o("meta"),u=0,d=Object.isExtensible||function(){return!0},p=function(e){r(e,c,{value:{objectID:"O"+ ++u,weakData:{}}})},h=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,c)){if(!d(e))return"F";if(!t)return"E";p(e)}return e[c].objectID},getWeakData:function(e,t){if(!a(e,c)){if(!d(e))return!0;if(!t)return!1;p(e)}return e[c].weakData},onFreeze:function(e){return l&&h.REQUIRED&&d(e)&&!a(e,c)&&p(e),e}};s[c]=!0},29909:(e,t,n)=>{var s,i,a,r=n(68536),o=n(17854),l=n(70111),c=n(68880),u=n(86656),d=n(5465),p=n(6200),h=n(3501),m="Object already initialized",f=o.WeakMap;if(r||d.state){var g=d.state||(d.state=new f),b=g.get,v=g.has,y=g.set;s=function(e,t){if(v.call(g,e))throw new TypeError(m);return t.facade=e,y.call(g,e,t),t},i=function(e){return b.call(g,e)||{}},a=function(e){return v.call(g,e)}}else{var _=p("state");h[_]=!0,s=function(e,t){if(u(e,_))throw new TypeError(m);return t.facade=e,c(e,_,t),t},i=function(e){return u(e,_)?e[_]:{}},a=function(e){return u(e,_)}}e.exports={set:s,get:i,has:a,enforce:function(e){return a(e)?i(e):s(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},97659:(e,t,n)=>{var s=n(5112),i=n(97497),a=s("iterator"),r=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||r[a]===e)}},43157:(e,t,n)=>{var s=n(84326);e.exports=Array.isArray||function(e){return"Array"==s(e)}},54705:(e,t,n)=>{var s=n(47293),i=/#|\.prototype\./,a=function(e,t){var n=o[r(e)];return n==c||n!=l&&("function"==typeof t?s(t):!!t)},r=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},o=a.data={},l=a.NATIVE="N",c=a.POLYFILL="P";e.exports=a},70111:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},31913:e=>{e.exports=!1},47850:(e,t,n)=>{var s=n(70111),i=n(84326),a=n(5112)("match");e.exports=function(e){var t;return s(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},20408:(e,t,n)=>{var s=n(19670),i=n(97659),a=n(17466),r=n(49974),o=n(71246),l=n(99212),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var u,d,p,h,m,f,g,b=n&&n.that,v=!(!n||!n.AS_ENTRIES),y=!(!n||!n.IS_ITERATOR),_=!(!n||!n.INTERRUPTED),x=r(t,b,1+v+_),S=function(e){return u&&l(u),new c(!0,e)},w=function(e){return v?(s(e),_?x(e[0],e[1],S):x(e[0],e[1])):_?x(e,S):x(e)};if(y)u=e;else{if("function"!=typeof(d=o(e)))throw TypeError("Target is not iterable");if(i(d)){for(p=0,h=a(e.length);h>p;p++)if((m=w(e[p]))&&m instanceof c)return m;return new c(!1)}u=d.call(e)}for(f=u.next;!(g=f.call(u)).done;){try{m=w(g.value)}catch(e){throw l(u),e}if("object"==typeof m&&m&&m instanceof c)return m}return new c(!1)}},99212:(e,t,n)=>{var s=n(19670);e.exports=function(e){var t=e.return;if(void 0!==t)return s(t.call(e)).value}},13383:(e,t,n)=>{"use strict";var s,i,a,r=n(47293),o=n(79518),l=n(68880),c=n(86656),u=n(5112),d=n(31913),p=u("iterator"),h=!1;[].keys&&("next"in(a=[].keys())?(i=o(o(a)))!==Object.prototype&&(s=i):h=!0);var m=null==s||r((function(){var e={};return s[p].call(e)!==e}));m&&(s={}),d&&!m||c(s,p)||l(s,p,(function(){return this})),e.exports={IteratorPrototype:s,BUGGY_SAFARI_ITERATORS:h}},97497:e=>{e.exports={}},95948:(e,t,n)=>{var s,i,a,r,o,l,c,u,d=n(17854),p=n(31236).f,h=n(20261).set,m=n(6833),f=n(71036),g=n(35268),b=d.MutationObserver||d.WebKitMutationObserver,v=d.document,y=d.process,_=d.Promise,x=p(d,"queueMicrotask"),S=x&&x.value;S||(s=function(){var e,t;for(g&&(e=y.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?r():a=void 0,e}}a=void 0,e&&e.enter()},m||g||f||!b||!v?_&&_.resolve?((c=_.resolve(void 0)).constructor=_,u=c.then,r=function(){u.call(c,s)}):r=g?function(){y.nextTick(s)}:function(){h.call(d,s)}:(o=!0,l=v.createTextNode(""),new b(s).observe(l,{characterData:!0}),r=function(){l.data=o=!o})),e.exports=S||function(e){var t={fn:e,next:void 0};a&&(a.next=t),i||(i=t,r()),a=t}},13366:(e,t,n)=>{var s=n(17854);e.exports=s.Promise},30133:(e,t,n)=>{var s=n(7392),i=n(47293);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},590:(e,t,n)=>{var s=n(47293),i=n(5112),a=n(31913),r=i("iterator");e.exports=!s((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,s){t.delete("b"),n+=s+e})),a&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[r]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},68536:(e,t,n)=>{var s=n(17854),i=n(42788),a=s.WeakMap;e.exports="function"==typeof a&&/native code/.test(i(a))},78523:(e,t,n)=>{"use strict";var s=n(13099),i=function(e){var t,n;this.promise=new e((function(e,s){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=s})),this.resolve=s(t),this.reject=s(n)};e.exports.f=function(e){return new i(e)}},3929:(e,t,n)=>{var s=n(47850);e.exports=function(e){if(s(e))throw TypeError("The method doesn't accept regular expressions");return e}},21574:(e,t,n)=>{"use strict";var s=n(19781),i=n(47293),a=n(81956),r=n(25181),o=n(55296),l=n(47908),c=n(68361),u=Object.assign,d=Object.defineProperty;e.exports=!u||i((function(){if(s&&1!==u({b:1},u(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||a(u({},t)).join("")!=i}))?function(e,t){for(var n=l(e),i=arguments.length,u=1,d=r.f,p=o.f;i>u;)for(var h,m=c(arguments[u++]),f=d?a(m).concat(d(m)):a(m),g=f.length,b=0;g>b;)h=f[b++],s&&!p.call(m,h)||(n[h]=m[h]);return n}:u},70030:(e,t,n)=>{var s,i=n(19670),a=n(36048),r=n(80748),o=n(3501),l=n(60490),c=n(80317),u=n(6200)("IE_PROTO"),d=function(){},p=function(e){return"<script>"+e+"<\/script>"},h=function(){try{s=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=s?function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t}(s):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F);for(var n=r.length;n--;)delete h.prototype[r[n]];return h()};o[u]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(d.prototype=i(e),n=new d,d.prototype=null,n[u]=e):n=h(),void 0===t?n:a(n,t)}},36048:(e,t,n)=>{var s=n(19781),i=n(3070),a=n(19670),r=n(81956);e.exports=s?Object.defineProperties:function(e,t){a(e);for(var n,s=r(t),o=s.length,l=0;o>l;)i.f(e,n=s[l++],t[n]);return e}},3070:(e,t,n)=>{var s=n(19781),i=n(64664),a=n(19670),r=n(57593),o=Object.defineProperty;t.f=s?o:function(e,t,n){if(a(e),t=r(t,!0),a(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},31236:(e,t,n)=>{var s=n(19781),i=n(55296),a=n(79114),r=n(45656),o=n(57593),l=n(86656),c=n(64664),u=Object.getOwnPropertyDescriptor;t.f=s?u:function(e,t){if(e=r(e),t=o(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return a(!i.f.call(e,t),e[t])}},8006:(e,t,n)=>{var s=n(16324),i=n(80748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,i)}},25181:(e,t)=>{t.f=Object.getOwnPropertySymbols},79518:(e,t,n)=>{var s=n(86656),i=n(47908),a=n(6200),r=n(49920),o=a("IE_PROTO"),l=Object.prototype;e.exports=r?Object.getPrototypeOf:function(e){return e=i(e),s(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},16324:(e,t,n)=>{var s=n(86656),i=n(45656),a=n(41318).indexOf,r=n(3501);e.exports=function(e,t){var n,o=i(e),l=0,c=[];for(n in o)!s(r,n)&&s(o,n)&&c.push(n);for(;t.length>l;)s(o,n=t[l++])&&(~a(c,n)||c.push(n));return c}},81956:(e,t,n)=>{var s=n(16324),i=n(80748);e.exports=Object.keys||function(e){return s(e,i)}},55296:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,i=s&&!n.call({1:2},1);t.f=i?function(e){var t=s(this,e);return!!t&&t.enumerable}:n},27674:(e,t,n)=>{var s=n(19670),i=n(96077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,a){return s(n),i(a),t?e.call(n,a):n.__proto__=a,n}}():void 0)},44699:(e,t,n)=>{var s=n(19781),i=n(81956),a=n(45656),r=n(55296).f,o=function(e){return function(t){for(var n,o=a(t),l=i(o),c=l.length,u=0,d=[];c>u;)n=l[u++],s&&!r.call(o,n)||d.push(e?[n,o[n]]:o[n]);return d}};e.exports={entries:o(!0),values:o(!1)}},90288:(e,t,n)=>{"use strict";var s=n(51694),i=n(70648);e.exports=s?{}.toString:function(){return"[object "+i(this)+"]"}},53887:(e,t,n)=>{var s=n(35005),i=n(8006),a=n(25181),r=n(19670);e.exports=s("Reflect","ownKeys")||function(e){var t=i.f(r(e)),n=a.f;return n?t.concat(n(e)):t}},40857:(e,t,n)=>{var s=n(17854);e.exports=s},12534:e=>{e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},69478:(e,t,n)=>{var s=n(19670),i=n(70111),a=n(78523);e.exports=function(e,t){if(s(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},12248:(e,t,n)=>{var s=n(31320);e.exports=function(e,t,n){for(var i in t)s(e,i,t[i],n);return e}},31320:(e,t,n)=>{var s=n(17854),i=n(68880),a=n(86656),r=n(83505),o=n(42788),l=n(29909),c=l.get,u=l.enforce,d=String(String).split("String");(e.exports=function(e,t,n,o){var l,c=!!o&&!!o.unsafe,p=!!o&&!!o.enumerable,h=!!o&&!!o.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||i(n,"name",t),(l=u(n)).source||(l.source=d.join("string"==typeof t?t:""))),e!==s?(c?!h&&e[t]&&(p=!0):delete e[t],p?e[t]=n:i(e,t,n)):p?e[t]=n:r(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||o(this)}))},84488:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},83505:(e,t,n)=>{var s=n(17854),i=n(68880);e.exports=function(e,t){try{i(s,e,t)}catch(n){s[e]=t}return t}},96340:(e,t,n)=>{"use strict";var s=n(35005),i=n(3070),a=n(5112),r=n(19781),o=a("species");e.exports=function(e){var t=s(e),n=i.f;r&&t&&!t[o]&&n(t,o,{configurable:!0,get:function(){return this}})}},58003:(e,t,n)=>{var s=n(3070).f,i=n(86656),a=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&s(e,a,{configurable:!0,value:t})}},6200:(e,t,n)=>{var s=n(72309),i=n(69711),a=s("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},5465:(e,t,n)=>{var s=n(17854),i=n(83505),a="__core-js_shared__",r=s[a]||i(a,{});e.exports=r},72309:(e,t,n)=>{var s=n(31913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.14.0",mode:s?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},36707:(e,t,n)=>{var s=n(19670),i=n(13099),a=n(5112)("species");e.exports=function(e,t){var n,r=s(e).constructor;return void 0===r||null==(n=s(r)[a])?t:i(n)}},28710:(e,t,n)=>{var s=n(99958),i=n(84488),a=function(e){return function(t,n){var a,r,o=String(i(t)),l=s(n),c=o.length;return l<0||l>=c?e?"":void 0:(a=o.charCodeAt(l))<55296||a>56319||l+1===c||(r=o.charCodeAt(l+1))<56320||r>57343?e?o.charAt(l):a:e?o.slice(l,l+2):r-56320+(a-55296<<10)+65536}};e.exports={codeAt:a(!1),charAt:a(!0)}},33197:e=>{"use strict";var t=2147483647,n=/[^\0-\u007E]/,s=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",a=Math.floor,r=String.fromCharCode,o=function(e){return e+22+75*(e<26)},l=function(e,t,n){var s=0;for(e=n?a(e/700):e>>1,e+=a(e/t);e>455;s+=36)e=a(e/35);return a(s+36*e/(e+38))},c=function(e){var n=[];e=function(e){for(var t=[],n=0,s=e.length;n<s;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<s){var a=e.charCodeAt(n++);56320==(64512&a)?t.push(((1023&i)<<10)+(1023&a)+65536):(t.push(i),n--)}else t.push(i)}return t}(e);var s,c,u=e.length,d=128,p=0,h=72;for(s=0;s<e.length;s++)(c=e[s])<128&&n.push(r(c));var m=n.length,f=m;for(m&&n.push("-");f<u;){var g=t;for(s=0;s<e.length;s++)(c=e[s])>=d&&c<g&&(g=c);var b=f+1;if(g-d>a((t-p)/b))throw RangeError(i);for(p+=(g-d)*b,d=g,s=0;s<e.length;s++){if((c=e[s])<d&&++p>t)throw RangeError(i);if(c==d){for(var v=p,y=36;;y+=36){var _=y<=h?1:y>=h+26?26:y-h;if(v<_)break;var x=v-_,S=36-_;n.push(r(o(_+x%S))),v=a(x/S)}n.push(r(o(v))),h=l(p,b,f==m),p=0,++f}}++p,++d}return n.join("")};e.exports=function(e){var t,i,a=[],r=e.toLowerCase().replace(s,".").split(".");for(t=0;t<r.length;t++)i=r[t],a.push(n.test(i)?"xn--"+c(i):i);return a.join(".")}},20261:(e,t,n)=>{var s,i,a,r=n(17854),o=n(47293),l=n(49974),c=n(60490),u=n(80317),d=n(6833),p=n(35268),h=r.location,m=r.setImmediate,f=r.clearImmediate,g=r.process,b=r.MessageChannel,v=r.Dispatch,y=0,_={},x=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},S=function(e){return function(){x(e)}},w=function(e){x(e.data)},k=function(e){r.postMessage(e+"",h.protocol+"//"+h.host)};m&&f||(m=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++y]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},s(y),y},f=function(e){delete _[e]},p?s=function(e){g.nextTick(S(e))}:v&&v.now?s=function(e){v.now(S(e))}:b&&!d?(a=(i=new b).port2,i.port1.onmessage=w,s=l(a.postMessage,a,1)):r.addEventListener&&"function"==typeof postMessage&&!r.importScripts&&h&&"file:"!==h.protocol&&!o(k)?(s=k,r.addEventListener("message",w,!1)):s="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),x(e)}}:function(e){setTimeout(S(e),0)}),e.exports={set:m,clear:f}},51400:(e,t,n)=>{var s=n(99958),i=Math.max,a=Math.min;e.exports=function(e,t){var n=s(e);return n<0?i(n+t,0):a(n,t)}},45656:(e,t,n)=>{var s=n(68361),i=n(84488);e.exports=function(e){return s(i(e))}},99958:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},17466:(e,t,n)=>{var s=n(99958),i=Math.min;e.exports=function(e){return e>0?i(s(e),9007199254740991):0}},47908:(e,t,n)=>{var s=n(84488);e.exports=function(e){return Object(s(e))}},57593:(e,t,n)=>{var s=n(70111);e.exports=function(e,t){if(!s(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!s(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!s(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!s(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},51694:(e,t,n)=>{var s={};s[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(s)},69711:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},43307:(e,t,n)=>{var s=n(30133);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:(e,t,n)=>{var s=n(17854),i=n(72309),a=n(86656),r=n(69711),o=n(30133),l=n(43307),c=i("wks"),u=s.Symbol,d=l?u:u&&u.withoutSetter||r;e.exports=function(e){return a(c,e)&&(o||"string"==typeof c[e])||(o&&a(u,e)?c[e]=u[e]:c[e]=d("Symbol."+e)),c[e]}},92222:(e,t,n)=>{"use strict";var s=n(82109),i=n(47293),a=n(43157),r=n(70111),o=n(47908),l=n(17466),c=n(86135),u=n(65417),d=n(81194),p=n(5112),h=n(7392),m=p("isConcatSpreadable"),f=9007199254740991,g="Maximum allowed index exceeded",b=h>=51||!i((function(){var e=[];return e[m]=!1,e.concat()[0]!==e})),v=d("concat"),y=function(e){if(!r(e))return!1;var t=e[m];return void 0!==t?!!t:a(e)};s({target:"Array",proto:!0,forced:!b||!v},{concat:function(e){var t,n,s,i,a,r=o(this),d=u(r,0),p=0;for(t=-1,s=arguments.length;t<s;t++)if(y(a=-1===t?r:arguments[t])){if(p+(i=l(a.length))>f)throw TypeError(g);for(n=0;n<i;n++,p++)n in a&&c(d,p,a[n])}else{if(p>=f)throw TypeError(g);c(d,p++,a)}return d.length=p,d}})},50545:(e,t,n)=>{var s=n(82109),i=n(1048),a=n(51223);s({target:"Array",proto:!0},{copyWithin:i}),a("copyWithin")},26541:(e,t,n)=>{"use strict";var s=n(82109),i=n(42092).every;s({target:"Array",proto:!0,forced:!n(9341)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},43290:(e,t,n)=>{var s=n(82109),i=n(21285),a=n(51223);s({target:"Array",proto:!0},{fill:i}),a("fill")},57327:(e,t,n)=>{"use strict";var s=n(82109),i=n(42092).filter;s({target:"Array",proto:!0,forced:!n(81194)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},34553:(e,t,n)=>{"use strict";var s=n(82109),i=n(42092).findIndex,a=n(51223),r="findIndex",o=!0;r in[]&&Array(1).findIndex((function(){o=!1})),s({target:"Array",proto:!0,forced:o},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a(r)},69826:(e,t,n)=>{"use strict";var s=n(82109),i=n(42092).find,a=n(51223),r="find",o=!0;r in[]&&Array(1).find((function(){o=!1})),s({target:"Array",proto:!0,forced:o},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a(r)},86535:(e,t,n)=>{"use strict";var s=n(82109),i=n(6790),a=n(47908),r=n(17466),o=n(13099),l=n(65417);s({target:"Array",proto:!0},{flatMap:function(e){var t,n=a(this),s=r(n.length);return o(e),(t=l(n,0)).length=i(t,n,n,s,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},84944:(e,t,n)=>{"use strict";var s=n(82109),i=n(6790),a=n(47908),r=n(17466),o=n(99958),l=n(65417);s({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=a(this),n=r(t.length),s=l(t,0);return s.length=i(s,t,t,n,0,void 0===e?1:o(e)),s}})},89554:(e,t,n)=>{"use strict";var s=n(82109),i=n(18533);s({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},91038:(e,t,n)=>{var s=n(82109),i=n(48457);s({target:"Array",stat:!0,forced:!n(17072)((function(e){Array.from(e)}))},{from:i})},26699:(e,t,n)=>{"use strict";var s=n(82109),i=n(41318).includes,a=n(51223);s({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},82772:(e,t,n)=>{"use strict";var s=n(82109),i=n(41318).indexOf,a=n(9341),r=[].indexOf,o=!!r&&1/[1].indexOf(1,-0)<0,l=a("indexOf");s({target:"Array",proto:!0,forced:o||!l},{indexOf:function(e){return o?r.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},79753:(e,t,n)=>{n(82109)({target:"Array",stat:!0},{isArray:n(43157)})},66992:(e,t,n)=>{"use strict";var s=n(45656),i=n(51223),a=n(97497),r=n(29909),o=n(70654),l="Array Iterator",c=r.set,u=r.getterFor(l);e.exports=o(Array,"Array",(function(e,t){c(this,{type:l,target:s(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,s=e.index++;return!t||s>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:s,done:!1}:"values"==n?{value:t[s],done:!1}:{value:[s,t[s]],done:!1}}),"values"),a.Arguments=a.Array,i("keys"),i("values"),i("entries")},69600:(e,t,n)=>{"use strict";var s=n(82109),i=n(68361),a=n(45656),r=n(9341),o=[].join,l=i!=Object,c=r("join",",");s({target:"Array",proto:!0,forced:l||!c},{join:function(e){return o.call(a(this),void 0===e?",":e)}})},94986:(e,t,n)=>{var s=n(82109),i=n(86583);s({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},21249:(e,t,n)=>{"use strict";var s=n(82109),i=n(42092).map;s({target:"Array",proto:!0,forced:!n(81194)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},26572:(e,t,n)=>{"use strict";var s=n(82109),i=n(47293),a=n(86135);s({target:"Array",stat:!0,forced:i((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)a(n,e,arguments[e++]);return n.length=t,n}})},96644:(e,t,n)=>{"use strict";var s=n(82109),i=n(53671).right,a=n(9341),r=n(7392),o=n(35268);s({target:"Array",proto:!0,forced:!a("reduceRight")||!o&&r>79&&r<83},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},85827:(e,t,n)=>{"use strict";var s=n(82109),i=n(53671).left,a=n(9341),r=n(7392),o=n(35268);s({target:"Array",proto:!0,forced:!a("reduce")||!o&&r>79&&r<83},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},65069:(e,t,n)=>{"use strict";var s=n(82109),i=n(43157),a=[].reverse,r=[1,2];s({target:"Array",proto:!0,forced:String(r)===String(r.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a.call(this)}})},47042:(e,t,n)=>{"use strict";var s=n(82109),i=n(70111),a=n(43157),r=n(51400),o=n(17466),l=n(45656),c=n(86135),u=n(5112),d=n(81194)("slice"),p=u("species"),h=[].slice,m=Math.max;s({target:"Array",proto:!0,forced:!d},{slice:function(e,t){var n,s,u,d=l(this),f=o(d.length),g=r(e,f),b=r(void 0===t?f:t,f);if(a(d)&&("function"!=typeof(n=d.constructor)||n!==Array&&!a(n.prototype)?i(n)&&null===(n=n[p])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(d,g,b);for(s=new(void 0===n?Array:n)(m(b-g,0)),u=0;g<b;g++,u++)g in d&&c(s,u,d[g]);return s.length=u,s}})},5212:(e,t,n)=>{"use strict";var s=n(82109),i=n(42092).some;s({target:"Array",proto:!0,forced:!n(9341)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2707:(e,t,n)=>{"use strict";var s=n(82109),i=n(13099),a=n(47908),r=n(17466),o=n(47293),l=n(94362),c=n(9341),u=n(68886),d=n(30256),p=n(7392),h=n(98008),m=[],f=m.sort,g=o((function(){m.sort(void 0)})),b=o((function(){m.sort(null)})),v=c("sort"),y=!o((function(){if(p)return p<70;if(!(u&&u>3)){if(d)return!0;if(h)return h<603;var e,t,n,s,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(s=0;s<47;s++)m.push({k:t+s,v:n})}for(m.sort((function(e,t){return t.v-e.v})),s=0;s<m.length;s++)t=m[s].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));s({target:"Array",proto:!0,forced:g||!b||!v||!y},{sort:function(e){void 0!==e&&i(e);var t=a(this);if(y)return void 0===e?f.call(t):f.call(t,e);var n,s,o=[],c=r(t.length);for(s=0;s<c;s++)s in t&&o.push(t[s]);for(o=l(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:String(t)>String(n)?1:-1}}(e)),n=o.length,s=0;s<n;)t[s]=o[s++];for(;s<c;)delete t[s++];return t}})},38706:(e,t,n)=>{n(96340)("Array")},40561:(e,t,n)=>{"use strict";var s=n(82109),i=n(51400),a=n(99958),r=n(17466),o=n(47908),l=n(65417),c=n(86135),u=n(81194)("splice"),d=Math.max,p=Math.min,h=9007199254740991,m="Maximum allowed length exceeded";s({target:"Array",proto:!0,forced:!u},{splice:function(e,t){var n,s,u,f,g,b,v=o(this),y=r(v.length),_=i(e,y),x=arguments.length;if(0===x?n=s=0:1===x?(n=0,s=y-_):(n=x-2,s=p(d(a(t),0),y-_)),y+n-s>h)throw TypeError(m);for(u=l(v,s),f=0;f<s;f++)(g=_+f)in v&&c(u,f,v[g]);if(u.length=s,n<s){for(f=_;f<y-s;f++)b=f+n,(g=f+s)in v?v[b]=v[g]:delete v[b];for(f=y;f>y-s+n;f--)delete v[f-1]}else if(n>s)for(f=y-s;f>_;f--)b=f+n-1,(g=f+s-1)in v?v[b]=v[g]:delete v[b];for(f=0;f<n;f++)v[f+_]=arguments[f+2];return v.length=y-s+n,u}})},99244:(e,t,n)=>{n(51223)("flatMap")},33792:(e,t,n)=>{n(51223)("flat")},51532:(e,t,n)=>{"use strict";var s=n(77710),i=n(95631);e.exports=s("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},69720:(e,t,n)=>{var s=n(82109),i=n(44699).entries;s({target:"Object",stat:!0},{entries:function(e){return i(e)}})},41539:(e,t,n)=>{var s=n(51694),i=n(31320),a=n(90288);s||i(Object.prototype,"toString",a,{unsafe:!0})},26833:(e,t,n)=>{var s=n(82109),i=n(44699).values;s({target:"Object",stat:!0},{values:function(e){return i(e)}})},17727:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(13366),r=n(47293),o=n(35005),l=n(36707),c=n(69478),u=n(31320);if(s({target:"Promise",proto:!0,real:!0,forced:!!a&&r((function(){a.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,o("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),!i&&"function"==typeof a){var d=o("Promise").prototype.finally;a.prototype.finally!==d&&u(a.prototype,"finally",d,{unsafe:!0})}},88674:(e,t,n)=>{"use strict";var s,i,a,r,o=n(82109),l=n(31913),c=n(17854),u=n(35005),d=n(13366),p=n(31320),h=n(12248),m=n(27674),f=n(58003),g=n(96340),b=n(70111),v=n(13099),y=n(25787),_=n(42788),x=n(20408),S=n(17072),w=n(36707),k=n(20261).set,j=n(95948),T=n(69478),C=n(842),D=n(78523),P=n(12534),I=n(29909),O=n(54705),L=n(5112),M=n(7871),A=n(35268),E=n(7392),U=L("species"),R="Promise",N=I.get,F=I.set,Y=I.getterFor(R),B=d&&d.prototype,H=d,V=B,$=c.TypeError,W=c.document,z=c.process,q=D.f,G=q,K=!!(W&&W.createEvent&&c.dispatchEvent),X="function"==typeof PromiseRejectionEvent,Z="unhandledrejection",J=!1,Q=O(R,(function(){var e=_(H)!==String(H);if(!e&&66===E)return!0;if(l&&!V.finally)return!0;if(E>=51&&/native code/.test(H))return!1;var t=new H((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(t.constructor={})[U]=n,!(J=t.then((function(){}))instanceof n)||!e&&M&&!X})),ee=Q||!S((function(e){H.all(e).catch((function(){}))})),te=function(e){var t;return!(!b(e)||"function"!=typeof(t=e.then))&&t},ne=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;j((function(){for(var s=e.value,i=1==e.state,a=0;n.length>a;){var r,o,l,c=n[a++],u=i?c.ok:c.fail,d=c.resolve,p=c.reject,h=c.domain;try{u?(i||(2===e.rejection&&re(e),e.rejection=1),!0===u?r=s:(h&&h.enter(),r=u(s),h&&(h.exit(),l=!0)),r===c.promise?p($("Promise-chain cycle")):(o=te(r))?o.call(r,d,p):d(r)):p(s)}catch(e){h&&!l&&h.exit(),p(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ie(e)}))}},se=function(e,t,n){var s,i;K?((s=W.createEvent("Event")).promise=t,s.reason=n,s.initEvent(e,!1,!0),c.dispatchEvent(s)):s={promise:t,reason:n},!X&&(i=c["on"+e])?i(s):e===Z&&C("Unhandled promise rejection",n)},ie=function(e){k.call(c,(function(){var t,n=e.facade,s=e.value;if(ae(e)&&(t=P((function(){A?z.emit("unhandledRejection",s,n):se(Z,n,s)})),e.rejection=A||ae(e)?2:1,t.error))throw t.value}))},ae=function(e){return 1!==e.rejection&&!e.parent},re=function(e){k.call(c,(function(){var t=e.facade;A?z.emit("rejectionHandled",t):se("rejectionhandled",t,e.value)}))},oe=function(e,t,n){return function(s){e(t,s,n)}},le=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,ne(e,!0))},ce=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw $("Promise can't be resolved itself");var s=te(t);s?j((function(){var n={done:!1};try{s.call(t,oe(ce,n,e),oe(le,n,e))}catch(t){le(n,t,e)}})):(e.value=t,e.state=1,ne(e,!1))}catch(t){le({done:!1},t,e)}}};if(Q&&(V=(H=function(e){y(this,H,R),v(e),s.call(this);var t=N(this);try{e(oe(ce,t),oe(le,t))}catch(e){le(t,e)}}).prototype,(s=function(e){F(this,{type:R,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(V,{then:function(e,t){var n=Y(this),s=q(w(this,H));return s.ok="function"!=typeof e||e,s.fail="function"==typeof t&&t,s.domain=A?z.domain:void 0,n.parent=!0,n.reactions.push(s),0!=n.state&&ne(n,!1),s.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new s,t=N(e);this.promise=e,this.resolve=oe(ce,t),this.reject=oe(le,t)},D.f=q=function(e){return e===H||e===a?new i(e):G(e)},!l&&"function"==typeof d&&B!==Object.prototype)){r=B.then,J||(p(B,"then",(function(e,t){var n=this;return new H((function(e,t){r.call(n,e,t)})).then(e,t)}),{unsafe:!0}),p(B,"catch",V.catch,{unsafe:!0}));try{delete B.constructor}catch(e){}m&&m(B,V)}o({global:!0,wrap:!0,forced:Q},{Promise:H}),f(H,R,!1,!0),g(R),a=u(R),o({target:R,stat:!0,forced:Q},{reject:function(e){var t=q(this);return t.reject.call(void 0,e),t.promise}}),o({target:R,stat:!0,forced:l||Q},{resolve:function(e){return T(l&&this===a?H:this,e)}}),o({target:R,stat:!0,forced:ee},{all:function(e){var t=this,n=q(t),s=n.resolve,i=n.reject,a=P((function(){var n=v(t.resolve),a=[],r=0,o=1;x(e,(function(e){var l=r++,c=!1;a.push(void 0),o++,n.call(t,e).then((function(e){c||(c=!0,a[l]=e,--o||s(a))}),i)})),--o||s(a)}));return a.error&&i(a.value),n.promise},race:function(e){var t=this,n=q(t),s=n.reject,i=P((function(){var i=v(t.resolve);x(e,(function(e){i.call(t,e).then(n.resolve,s)}))}));return i.error&&s(i.value),n.promise}})},70189:(e,t,n)=>{"use strict";var s=n(77710),i=n(95631);e.exports=s("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},32023:(e,t,n)=>{"use strict";var s=n(82109),i=n(3929),a=n(84488);s({target:"String",proto:!0,forced:!n(84964)("includes")},{includes:function(e){return!!~String(a(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},78783:(e,t,n)=>{"use strict";var s=n(28710).charAt,i=n(29909),a=n(70654),r="String Iterator",o=i.set,l=i.getterFor(r);a(String,"String",(function(e){o(this,{type:r,string:String(e),index:0})}),(function(){var e,t=l(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=s(n,i),t.index+=e.length,{value:e,done:!1})}))},69810:(e,t,n)=>{"use strict";var s=n(82109),i=n(47908),a=n(17466),r=n(99958),o=n(51223);s({target:"Array",proto:!0},{at:function(e){var t=i(this),n=a(t.length),s=r(e),o=s>=0?s:n+s;return o<0||o>=n?void 0:t[o]}}),o("at")},84811:(e,t,n)=>{"use strict";var s=n(82109),i=n(42092).filterOut,a=n(51223);s({target:"Array",proto:!0},{filterOut:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("filterOut")},77461:(e,t,n)=>{"use strict";var s=n(82109),i=n(9671).findLastIndex,a=n(51223);s({target:"Array",proto:!0},{findLastIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("findLastIndex")},3048:(e,t,n)=>{"use strict";var s=n(82109),i=n(9671).findLast,a=n(51223);s({target:"Array",proto:!0},{findLast:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("findLast")},8e4:(e,t,n)=>{var s=n(82109),i=n(43157),a=Object.isFrozen,r=function(e,t){if(!a||!i(e)||!a(e))return!1;for(var n,s=0,r=e.length;s<r;)if(!("string"==typeof(n=e[s++])||t&&void 0===n))return!1;return 0!==r};s({target:"Array",stat:!0},{isTemplateObject:function(e){if(!r(e,!0))return!1;var t=e.raw;return!(t.length!==e.length||!r(t,!1))}})},83475:(e,t,n)=>{"use strict";var s=n(19781),i=n(51223),a=n(47908),r=n(17466),o=n(3070).f;s&&!("lastIndex"in[])&&(o(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=a(this),t=r(e.length);return 0==t?0:t-1}}),i("lastIndex"))},46273:(e,t,n)=>{"use strict";var s=n(19781),i=n(51223),a=n(47908),r=n(17466),o=n(3070).f;s&&!("lastItem"in[])&&(o(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=a(this),t=r(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=a(this),n=r(t.length);return t[0==n?0:n-1]=e}}),i("lastItem"))},3087:(e,t,n)=>{"use strict";var s=n(82109),i=n(51223);s({target:"Array",proto:!0},{uniqueBy:n(60956)}),i("uniqueBy")},88921:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(31501);s({target:"Set",proto:!0,real:!0,forced:i},{addAll:function(){return a.apply(this,arguments)}})},96248:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(34092);s({target:"Set",proto:!0,real:!0,forced:i},{deleteAll:function(){return a.apply(this,arguments)}})},13599:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(35005),r=n(19670),o=n(13099),l=n(36707),c=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{difference:function(e){var t=r(this),n=new(l(t,a("Set")))(t),s=o(n.delete);return c(e,(function(e){s.call(n,e)})),n}})},11477:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(19670),r=n(49974),o=n(96767),l=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{every:function(e){var t=a(this),n=o(t),s=r(e,arguments.length>1?arguments[1]:void 0,3);return!l(n,(function(e,n){if(!s(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},64362:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(35005),r=n(19670),o=n(13099),l=n(49974),c=n(36707),u=n(96767),d=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{filter:function(e){var t=r(this),n=u(t),s=l(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,a("Set"))),p=o(i.add);return d(n,(function(e){s(e,e,t)&&p.call(i,e)}),{IS_ITERATOR:!0}),i}})},15389:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(19670),r=n(49974),o=n(96767),l=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{find:function(e){var t=a(this),n=o(t),s=r(e,arguments.length>1?arguments[1]:void 0,3);return l(n,(function(e,n){if(s(e,e,t))return n(e)}),{IS_ITERATOR:!0,INTERRUPTED:!0}).result}})},46006:(e,t,n)=>{n(82109)({target:"Set",stat:!0},{from:n(27296)})},90401:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(35005),r=n(19670),o=n(13099),l=n(36707),c=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{intersection:function(e){var t=r(this),n=new(l(t,a("Set"))),s=o(t.has),i=o(n.add);return c(e,(function(e){s.call(t,e)&&i.call(n,e)})),n}})},45164:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(19670),r=n(13099),o=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{isDisjointFrom:function(e){var t=a(this),n=r(t.has);return!o(e,(function(e,s){if(!0===n.call(t,e))return s()}),{INTERRUPTED:!0}).stopped}})},91238:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(35005),r=n(19670),o=n(13099),l=n(18554),c=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{isSubsetOf:function(e){var t=l(this),n=r(e),s=n.has;return"function"!=typeof s&&(n=new(a("Set"))(e),s=o(n.has)),!c(t,(function(e,t){if(!1===s.call(n,e))return t()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},54837:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(19670),r=n(13099),o=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{isSupersetOf:function(e){var t=a(this),n=r(t.has);return!o(e,(function(e,s){if(!1===n.call(t,e))return s()}),{INTERRUPTED:!0}).stopped}})},87485:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(19670),r=n(96767),o=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{join:function(e){var t=a(this),n=r(t),s=void 0===e?",":String(e),i=[];return o(n,i.push,{that:i,IS_ITERATOR:!0}),i.join(s)}})},56767:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(35005),r=n(19670),o=n(13099),l=n(49974),c=n(36707),u=n(96767),d=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{map:function(e){var t=r(this),n=u(t),s=l(e,arguments.length>1?arguments[1]:void 0,3),i=new(c(t,a("Set"))),p=o(i.add);return d(n,(function(e){p.call(i,s(e,e,t))}),{IS_ITERATOR:!0}),i}})},69916:(e,t,n)=>{n(82109)({target:"Set",stat:!0},{of:n(82044)})},76651:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(19670),r=n(13099),o=n(96767),l=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{reduce:function(e){var t=a(this),n=o(t),s=arguments.length<2,i=s?void 0:arguments[1];if(r(e),l(n,(function(n){s?(s=!1,i=n):i=e(i,n,n,t)}),{IS_ITERATOR:!0}),s)throw TypeError("Reduce of empty set with no initial value");return i}})},61437:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(19670),r=n(49974),o=n(96767),l=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{some:function(e){var t=a(this),n=o(t),s=r(e,arguments.length>1?arguments[1]:void 0,3);return l(n,(function(e,n){if(s(e,e,t))return n()}),{IS_ITERATOR:!0,INTERRUPTED:!0}).stopped}})},35285:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(35005),r=n(19670),o=n(13099),l=n(36707),c=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{symmetricDifference:function(e){var t=r(this),n=new(l(t,a("Set")))(t),s=o(n.delete),i=o(n.add);return c(e,(function(e){s.call(n,e)||i.call(n,e)})),n}})},39865:(e,t,n)=>{"use strict";var s=n(82109),i=n(31913),a=n(35005),r=n(19670),o=n(13099),l=n(36707),c=n(20408);s({target:"Set",proto:!0,real:!0,forced:i},{union:function(e){var t=r(this),n=new(l(t,a("Set")))(t);return c(e,o(n.add),{that:n}),n}})},33948:(e,t,n)=>{var s=n(17854),i=n(48324),a=n(66992),r=n(68880),o=n(5112),l=o("iterator"),c=o("toStringTag"),u=a.values;for(var d in i){var p=s[d],h=p&&p.prototype;if(h){if(h[l]!==u)try{r(h,l,u)}catch(e){h[l]=u}if(h[c]||r(h,c,d),i[d])for(var m in a)if(h[m]!==a[m])try{r(h,m,a[m])}catch(e){h[m]=a[m]}}}},41637:(e,t,n)=>{"use strict";n(66992);var s=n(82109),i=n(35005),a=n(590),r=n(31320),o=n(12248),l=n(58003),c=n(24994),u=n(29909),d=n(25787),p=n(86656),h=n(49974),m=n(70648),f=n(19670),g=n(70111),b=n(70030),v=n(79114),y=n(18554),_=n(71246),x=n(5112),S=i("fetch"),w=i("Headers"),k=x("iterator"),j="URLSearchParams",T="URLSearchParamsIterator",C=u.set,D=u.getterFor(j),P=u.getterFor(T),I=/\+/g,O=Array(4),L=function(e){return O[e-1]||(O[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},M=function(e){try{return decodeURIComponent(e)}catch(t){return e}},A=function(e){var t=e.replace(I," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(L(n--),M);return t}},E=/[!'()~]|%20/g,U={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},R=function(e){return U[e]},N=function(e){return encodeURIComponent(e).replace(E,R)},F=function(e,t){if(t)for(var n,s,i=t.split("&"),a=0;a<i.length;)(n=i[a++]).length&&(s=n.split("="),e.push({key:A(s.shift()),value:A(s.join("="))}))},Y=function(e){this.entries.length=0,F(this.entries,e)},B=function(e,t){if(e<t)throw TypeError("Not enough arguments")},H=c((function(e,t){C(this,{type:T,iterator:y(D(e).entries),kind:t})}),"Iterator",(function(){var e=P(this),t=e.kind,n=e.iterator.next(),s=n.value;return n.done||(n.value="keys"===t?s.key:"values"===t?s.value:[s.key,s.value]),n})),V=function(){d(this,V,j);var e,t,n,s,i,a,r,o,l,c=arguments.length>0?arguments[0]:void 0,u=this,h=[];if(C(u,{type:j,entries:h,updateURL:function(){},updateSearchParams:Y}),void 0!==c)if(g(c))if("function"==typeof(e=_(c)))for(n=(t=e.call(c)).next;!(s=n.call(t)).done;){if((r=(a=(i=y(f(s.value))).next).call(i)).done||(o=a.call(i)).done||!a.call(i).done)throw TypeError("Expected sequence with length 2");h.push({key:r.value+"",value:o.value+""})}else for(l in c)p(c,l)&&h.push({key:l,value:c[l]+""});else F(h,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},$=V.prototype;o($,{append:function(e,t){B(arguments.length,2);var n=D(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){B(arguments.length,1);for(var t=D(this),n=t.entries,s=e+"",i=0;i<n.length;)n[i].key===s?n.splice(i,1):i++;t.updateURL()},get:function(e){B(arguments.length,1);for(var t=D(this).entries,n=e+"",s=0;s<t.length;s++)if(t[s].key===n)return t[s].value;return null},getAll:function(e){B(arguments.length,1);for(var t=D(this).entries,n=e+"",s=[],i=0;i<t.length;i++)t[i].key===n&&s.push(t[i].value);return s},has:function(e){B(arguments.length,1);for(var t=D(this).entries,n=e+"",s=0;s<t.length;)if(t[s++].key===n)return!0;return!1},set:function(e,t){B(arguments.length,1);for(var n,s=D(this),i=s.entries,a=!1,r=e+"",o=t+"",l=0;l<i.length;l++)(n=i[l]).key===r&&(a?i.splice(l--,1):(a=!0,n.value=o));a||i.push({key:r,value:o}),s.updateURL()},sort:function(){var e,t,n,s=D(this),i=s.entries,a=i.slice();for(i.length=0,n=0;n<a.length;n++){for(e=a[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}s.updateURL()},forEach:function(e){for(var t,n=D(this).entries,s=h(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)s((t=n[i++]).value,t.key,this)},keys:function(){return new H(this,"keys")},values:function(){return new H(this,"values")},entries:function(){return new H(this,"entries")}},{enumerable:!0}),r($,k,$.entries),r($,"toString",(function(){for(var e,t=D(this).entries,n=[],s=0;s<t.length;)e=t[s++],n.push(N(e.key)+"="+N(e.value));return n.join("&")}),{enumerable:!0}),l(V,j),s({global:!0,forced:!a},{URLSearchParams:V}),a||"function"!=typeof S||"function"!=typeof w||s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,s,i=[e];return arguments.length>1&&(g(t=arguments[1])&&(n=t.body,m(n)===j&&((s=t.headers?new w(t.headers):new w).has("content-type")||s.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=b(t,{body:v(0,String(n)),headers:v(0,s)}))),i.push(t)),S.apply(this,i)}}),e.exports={URLSearchParams:V,getState:D}},60285:(e,t,n)=>{"use strict";n(78783);var s,i=n(82109),a=n(19781),r=n(590),o=n(17854),l=n(36048),c=n(31320),u=n(25787),d=n(86656),p=n(21574),h=n(48457),m=n(28710).codeAt,f=n(33197),g=n(58003),b=n(41637),v=n(29909),y=o.URL,_=b.URLSearchParams,x=b.getState,S=v.set,w=v.getterFor("URL"),k=Math.floor,j=Math.pow,T="Invalid scheme",C="Invalid host",D="Invalid port",P=/[A-Za-z]/,I=/[\d+-.A-Za-z]/,O=/\d/,L=/^(0x|0X)/,M=/^[0-7]+$/,A=/^\d+$/,E=/^[\dA-Fa-f]+$/,U=/[\0\t\n\r #%/:?@[\\]]/,R=/[\0\t\n\r #/:?@[\\]]/,N=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,F=/[\t\n\r]/g,Y=function(e,t){var n,s,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return C;if(!(n=H(t.slice(1,-1))))return C;e.host=n}else if(X(e)){if(t=f(t),U.test(t))return C;if(null===(n=B(t)))return C;e.host=n}else{if(R.test(t))return C;for(n="",s=h(t),i=0;i<s.length;i++)n+=G(s[i],$);e.host=n}},B=function(e){var t,n,s,i,a,r,o,l=e.split(".");if(l.length&&""==l[l.length-1]&&l.pop(),(t=l.length)>4)return e;for(n=[],s=0;s<t;s++){if(""==(i=l[s]))return e;if(a=10,i.length>1&&"0"==i.charAt(0)&&(a=L.test(i)?16:8,i=i.slice(8==a?1:2)),""===i)r=0;else{if(!(10==a?A:8==a?M:E).test(i))return e;r=parseInt(i,a)}n.push(r)}for(s=0;s<t;s++)if(r=n[s],s==t-1){if(r>=j(256,5-t))return null}else if(r>255)return null;for(o=n.pop(),s=0;s<n.length;s++)o+=n[s]*j(256,3-s);return o},H=function(e){var t,n,s,i,a,r,o,l=[0,0,0,0,0,0,0,0],c=0,u=null,d=0,p=function(){return e.charAt(d)};if(":"==p()){if(":"!=e.charAt(1))return;d+=2,u=++c}for(;p();){if(8==c)return;if(":"!=p()){for(t=n=0;n<4&&E.test(p());)t=16*t+parseInt(p(),16),d++,n++;if("."==p()){if(0==n)return;if(d-=n,c>6)return;for(s=0;p();){if(i=null,s>0){if(!("."==p()&&s<4))return;d++}if(!O.test(p()))return;for(;O.test(p());){if(a=parseInt(p(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;d++}l[c]=256*l[c]+i,2!=++s&&4!=s||c++}if(4!=s)return;break}if(":"==p()){if(d++,!p())return}else if(p())return;l[c++]=t}else{if(null!==u)return;d++,u=++c}}if(null!==u)for(r=c-u,c=7;0!=c&&r>0;)o=l[c],l[c--]=l[u+r-1],l[u+--r]=o;else if(8!=c)return;return l},V=function(e){var t,n,s,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",s=function(e){for(var t=null,n=1,s=null,i=0,a=0;a<8;a++)0!==e[a]?(i>n&&(t=s,n=i),s=null,i=0):(null===s&&(s=a),++i);return i>n&&(t=s,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),s===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},$={},W=p({},$,{" ":1,'"':1,"<":1,">":1,"`":1}),z=p({},W,{"#":1,"?":1,"{":1,"}":1}),q=p({},z,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),G=function(e,t){var n=m(e,0);return n>32&&n<127&&!d(t,e)?e:encodeURIComponent(e)},K={ftp:21,file:null,http:80,https:443,ws:80,wss:443},X=function(e){return d(K,e.scheme)},Z=function(e){return""!=e.username||""!=e.password},J=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Q=function(e,t){var n;return 2==e.length&&P.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&Q(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Q(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},se={},ie={},ae={},re={},oe={},le={},ce={},ue={},de={},pe={},he={},me={},fe={},ge={},be={},ve={},ye={},_e={},xe={},Se={},we={},ke=function(e,t,n,i){var a,r,o,l,c,u=n||se,p=0,m="",f=!1,g=!1,b=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(N,"")),t=t.replace(F,""),a=h(t);p<=a.length;){switch(r=a[p],u){case se:if(!r||!P.test(r)){if(n)return T;u=ae;continue}m+=r.toLowerCase(),u=ie;break;case ie:if(r&&(I.test(r)||"+"==r||"-"==r||"."==r))m+=r.toLowerCase();else{if(":"!=r){if(n)return T;m="",u=ae,p=0;continue}if(n&&(X(e)!=d(K,m)||"file"==m&&(Z(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=m,n)return void(X(e)&&K[e.scheme]==e.port&&(e.port=null));m="","file"==e.scheme?u=ge:X(e)&&i&&i.scheme==e.scheme?u=re:X(e)?u=ue:"/"==a[p+1]?(u=oe,p++):(e.cannotBeABaseURL=!0,e.path.push(""),u=xe)}break;case ae:if(!i||i.cannotBeABaseURL&&"#"!=r)return T;if(i.cannotBeABaseURL&&"#"==r){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,u=we;break}u="file"==i.scheme?ge:le;continue;case re:if("/"!=r||"/"!=a[p+1]){u=le;continue}u=de,p++;break;case oe:if("/"==r){u=pe;break}u=_e;continue;case le:if(e.scheme=i.scheme,r==s)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==r||"\\"==r&&X(e))u=ce;else if("?"==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",u=Se;else{if("#"!=r){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),u=_e;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=we}break;case ce:if(!X(e)||"/"!=r&&"\\"!=r){if("/"!=r){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,u=_e;continue}u=pe}else u=de;break;case ue:if(u=de,"/"!=r||"/"!=m.charAt(p+1))continue;p++;break;case de:if("/"!=r&&"\\"!=r){u=pe;continue}break;case pe:if("@"==r){f&&(m="%40"+m),f=!0,o=h(m);for(var v=0;v<o.length;v++){var y=o[v];if(":"!=y||b){var _=G(y,q);b?e.password+=_:e.username+=_}else b=!0}m=""}else if(r==s||"/"==r||"?"==r||"#"==r||"\\"==r&&X(e)){if(f&&""==m)return"Invalid authority";p-=h(m).length+1,m="",u=he}else m+=r;break;case he:case me:if(n&&"file"==e.scheme){u=ve;continue}if(":"!=r||g){if(r==s||"/"==r||"?"==r||"#"==r||"\\"==r&&X(e)){if(X(e)&&""==m)return C;if(n&&""==m&&(Z(e)||null!==e.port))return;if(l=Y(e,m))return l;if(m="",u=ye,n)return;continue}"["==r?g=!0:"]"==r&&(g=!1),m+=r}else{if(""==m)return C;if(l=Y(e,m))return l;if(m="",u=fe,n==me)return}break;case fe:if(!O.test(r)){if(r==s||"/"==r||"?"==r||"#"==r||"\\"==r&&X(e)||n){if(""!=m){var x=parseInt(m,10);if(x>65535)return D;e.port=X(e)&&x===K[e.scheme]?null:x,m=""}if(n)return;u=ye;continue}return D}m+=r;break;case ge:if(e.scheme="file","/"==r||"\\"==r)u=be;else{if(!i||"file"!=i.scheme){u=_e;continue}if(r==s)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==r)e.host=i.host,e.path=i.path.slice(),e.query="",u=Se;else{if("#"!=r){ee(a.slice(p).join(""))||(e.host=i.host,e.path=i.path.slice(),te(e)),u=_e;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",u=we}}break;case be:if("/"==r||"\\"==r){u=ve;break}i&&"file"==i.scheme&&!ee(a.slice(p).join(""))&&(Q(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),u=_e;continue;case ve:if(r==s||"/"==r||"\\"==r||"?"==r||"#"==r){if(!n&&Q(m))u=_e;else if(""==m){if(e.host="",n)return;u=ye}else{if(l=Y(e,m))return l;if("localhost"==e.host&&(e.host=""),n)return;m="",u=ye}continue}m+=r;break;case ye:if(X(e)){if(u=_e,"/"!=r&&"\\"!=r)continue}else if(n||"?"!=r)if(n||"#"!=r){if(r!=s&&(u=_e,"/"!=r))continue}else e.fragment="",u=we;else e.query="",u=Se;break;case _e:if(r==s||"/"==r||"\\"==r&&X(e)||!n&&("?"==r||"#"==r)){if(".."===(c=(c=m).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(te(e),"/"==r||"\\"==r&&X(e)||e.path.push("")):ne(m)?"/"==r||"\\"==r&&X(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Q(m)&&(e.host&&(e.host=""),m=m.charAt(0)+":"),e.path.push(m)),m="","file"==e.scheme&&(r==s||"?"==r||"#"==r))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==r?(e.query="",u=Se):"#"==r&&(e.fragment="",u=we)}else m+=G(r,z);break;case xe:"?"==r?(e.query="",u=Se):"#"==r?(e.fragment="",u=we):r!=s&&(e.path[0]+=G(r,$));break;case Se:n||"#"!=r?r!=s&&("'"==r&&X(e)?e.query+="%27":e.query+="#"==r?"%23":G(r,$)):(e.fragment="",u=we);break;case we:r!=s&&(e.fragment+=G(r,W))}p++}},je=function(e){var t,n,s=u(this,je,"URL"),i=arguments.length>1?arguments[1]:void 0,r=String(e),o=S(s,{type:"URL"});if(void 0!==i)if(i instanceof je)t=w(i);else if(n=ke(t={},String(i)))throw TypeError(n);if(n=ke(o,r,null,t))throw TypeError(n);var l=o.searchParams=new _,c=x(l);c.updateSearchParams(o.query),c.updateURL=function(){o.query=String(l)||null},a||(s.href=Ce.call(s),s.origin=De.call(s),s.protocol=Pe.call(s),s.username=Ie.call(s),s.password=Oe.call(s),s.host=Le.call(s),s.hostname=Me.call(s),s.port=Ae.call(s),s.pathname=Ee.call(s),s.search=Ue.call(s),s.searchParams=Re.call(s),s.hash=Ne.call(s))},Te=je.prototype,Ce=function(){var e=w(this),t=e.scheme,n=e.username,s=e.password,i=e.host,a=e.port,r=e.path,o=e.query,l=e.fragment,c=t+":";return null!==i?(c+="//",Z(e)&&(c+=n+(s?":"+s:"")+"@"),c+=V(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?r[0]:r.length?"/"+r.join("/"):"",null!==o&&(c+="?"+o),null!==l&&(c+="#"+l),c},De=function(){var e=w(this),t=e.scheme,n=e.port;if("blob"==t)try{return new je(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&X(e)?t+"://"+V(e.host)+(null!==n?":"+n:""):"null"},Pe=function(){return w(this).scheme+":"},Ie=function(){return w(this).username},Oe=function(){return w(this).password},Le=function(){var e=w(this),t=e.host,n=e.port;return null===t?"":null===n?V(t):V(t)+":"+n},Me=function(){var e=w(this).host;return null===e?"":V(e)},Ae=function(){var e=w(this).port;return null===e?"":String(e)},Ee=function(){var e=w(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Ue=function(){var e=w(this).query;return e?"?"+e:""},Re=function(){return w(this).searchParams},Ne=function(){var e=w(this).fragment;return e?"#"+e:""},Fe=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(a&&l(Te,{href:Fe(Ce,(function(e){var t=w(this),n=String(e),s=ke(t,n);if(s)throw TypeError(s);x(t.searchParams).updateSearchParams(t.query)})),origin:Fe(De),protocol:Fe(Pe,(function(e){var t=w(this);ke(t,String(e)+":",se)})),username:Fe(Ie,(function(e){var t=w(this),n=h(String(e));if(!J(t)){t.username="";for(var s=0;s<n.length;s++)t.username+=G(n[s],q)}})),password:Fe(Oe,(function(e){var t=w(this),n=h(String(e));if(!J(t)){t.password="";for(var s=0;s<n.length;s++)t.password+=G(n[s],q)}})),host:Fe(Le,(function(e){var t=w(this);t.cannotBeABaseURL||ke(t,String(e),he)})),hostname:Fe(Me,(function(e){var t=w(this);t.cannotBeABaseURL||ke(t,String(e),me)})),port:Fe(Ae,(function(e){var t=w(this);J(t)||(""==(e=String(e))?t.port=null:ke(t,e,fe))})),pathname:Fe(Ee,(function(e){var t=w(this);t.cannotBeABaseURL||(t.path=[],ke(t,e+"",ye))})),search:Fe(Ue,(function(e){var t=w(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",ke(t,e,Se)),x(t.searchParams).updateSearchParams(t.query)})),searchParams:Fe(Re),hash:Fe(Ne,(function(e){var t=w(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ke(t,e,we)):t.fragment=null}))}),c(Te,"toJSON",(function(){return Ce.call(this)}),{enumerable:!0}),c(Te,"toString",(function(){return Ce.call(this)}),{enumerable:!0}),y){var Ye=y.createObjectURL,Be=y.revokeObjectURL;Ye&&c(je,"createObjectURL",(function(e){return Ye.apply(y,arguments)})),Be&&c(je,"revokeObjectURL",(function(e){return Be.apply(y,arguments)}))}g(je,"URL"),i({global:!0,forced:!r,sham:!a},{URL:je})},83753:(e,t,n)=>{"use strict";n(82109)({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},38149:(e,t,n)=>{var s=n(41439);e.exports=s},41439:(e,t,n)=>{n(60285),n(83753),n(41637);var s=n(40857);e.exports=s.URL},97621:(e,t,n)=>{"use strict";function s(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function i(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}n.d(t,{Z:()=>a});const a={p:i,P:function(e,t){var n,a=e.match(/(P+)(p+)?/),r=a[1],o=a[2];if(!o)return s(e,t);switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",s(r,t)).replace("{{time}}",i(o,t))}}},24262:(e,t,n)=>{"use strict";function s(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}n.d(t,{Z:()=>s})},49702:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var s=n(19013),i=n(66979),a=n(7032),r=n(13882);function o(e){(0,r.Z)(1,arguments);var t=(0,a.Z)(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var s=(0,i.Z)(n);return s}var l=6048e5;function c(e){(0,r.Z)(1,arguments);var t=(0,s.default)(e),n=(0,i.Z)(t).getTime()-o(t).getTime();return Math.round(n/l)+1}},7032:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var s=n(19013),i=n(66979),a=n(13882);function r(e){(0,a.Z)(1,arguments);var t=(0,s.default)(e),n=t.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var o=(0,i.Z)(r),l=new Date(0);l.setUTCFullYear(n,0,4),l.setUTCHours(0,0,0,0);var c=(0,i.Z)(l);return t.getTime()>=o.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}},23324:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var s=n(19013),i=n(59025),a=n(83946),r=n(7651),o=n(13882);function l(e,t){(0,o.Z)(1,arguments);var n=t||{},s=n.locale,l=s&&s.options&&s.options.firstWeekContainsDate,c=null==l?1:(0,a.Z)(l),u=null==n.firstWeekContainsDate?c:(0,a.Z)(n.firstWeekContainsDate),d=(0,r.Z)(e,t),p=new Date(0);p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0);var h=(0,i.Z)(p,t);return h}var c=6048e5;function u(e,t){(0,o.Z)(1,arguments);var n=(0,s.default)(e),a=(0,i.Z)(n,t).getTime()-l(n,t).getTime();return Math.round(a/c)+1}},7651:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var s=n(83946),i=n(19013),a=n(59025),r=n(13882);function o(e,t){(0,r.Z)(1,arguments);var n=(0,i.default)(e,t),o=n.getUTCFullYear(),l=t||{},c=l.locale,u=c&&c.options&&c.options.firstWeekContainsDate,d=null==u?1:(0,s.Z)(u),p=null==l.firstWeekContainsDate?d:(0,s.Z)(l.firstWeekContainsDate);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(o+1,0,p),h.setUTCHours(0,0,0,0);var m=(0,a.Z)(h,t),f=new Date(0);f.setUTCFullYear(o,0,p),f.setUTCHours(0,0,0,0);var g=(0,a.Z)(f,t);return n.getTime()>=m.getTime()?o+1:n.getTime()>=g.getTime()?o:o-1}},5267:(e,t,n)=>{"use strict";n.d(t,{Iu:()=>a,Do:()=>r,qp:()=>o});var s=["D","DD"],i=["YY","YYYY"];function a(e){return-1!==s.indexOf(e)}function r(e){return-1!==i.indexOf(e)}function o(e,t,n){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}},13882:(e,t,n)=>{"use strict";function s(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}n.d(t,{Z:()=>s})},66979:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=1,n=(0,s.default)(e),a=n.getUTCDay(),r=(a<t?7:0)+a-t;return n.setUTCDate(n.getUTCDate()-r),n.setUTCHours(0,0,0,0),n}},59025:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(1,arguments);var n=t||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,l=null==o?0:(0,s.Z)(o),c=null==n.weekStartsOn?l:(0,s.Z)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=(0,i.default)(e),d=u.getUTCDay(),p=(d<c?7:0)+d-c;return u.setUTCDate(u.getUTCDate()-p),u.setUTCHours(0,0,0,0),u}},83946:(e,t,n)=>{"use strict";function s(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,{Z:()=>s})},77349:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),r=(0,s.Z)(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}},78343:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var s=n(83946),i=n(51820),a=n(13882),r=36e5;function o(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.Z)(e,n*r)}},51820:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e).getTime(),r=(0,s.Z)(t);return new Date(n+r)}},58545:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(51820),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.Z)(e,6e4*n)}},11640:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),r=(0,s.Z)(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),l=new Date(n.getTime());l.setMonth(n.getMonth()+r+1,0);var c=l.getDate();return o>=c?l:(n.setFullYear(l.getFullYear(),l.getMonth(),o),n)}},63500:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(77349),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t),r=7*n;return(0,i.default)(e,r)}},21593:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(11640),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.default)(e,12*n)}},92300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var s=n(24262),i=n(69119),a=n(13882),r=864e5;function o(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),o=(0,i.default)(t),l=n.getTime()-(0,s.Z)(n),c=o.getTime()-(0,s.Z)(o);return Math.round((l-c)/r)}},84129:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t),r=n.getFullYear()-a.getFullYear(),o=n.getMonth()-a.getMonth();return 12*r+o}},52724:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var s=n(584),i=n(24262),a=n(13882),r=6048e5;function o(e,t,n){(0,a.Z)(2,arguments);var o=(0,s.default)(e,n),l=(0,s.default)(t,n),c=o.getTime()-(0,i.Z)(o),u=l.getTime()-(0,i.Z)(l);return Math.round((c-u)/r)}},91857:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getFullYear()-a.getFullYear()}},83894:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e);return t.setHours(23,59,59,999),t}},4135:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}},67090:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(19013),i=n(83946),a=n(13882);function r(e,t){(0,a.Z)(1,arguments);var n=t||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,l=null==o?0:(0,i.Z)(o),c=null==n.weekStartsOn?l:(0,i.Z)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=(0,s.default)(e),d=u.getDay(),p=6+(d<c?-7:0)-(d-c);return u.setDate(u.getDate()+p),u.setHours(23,59,59,999),u}},49546:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>E});var s=n(12274),i=n(4958),a=n(91218),r=n(19013);function o(e,t){for(var n=e<0?"-":"",s=Math.abs(e).toString();s.length<t;)s="0"+s;return n+s}const l=function(e,t){var n=e.getUTCFullYear(),s=n>0?n:1-n;return o("yy"===t?s%100:s,t.length)},c=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):o(n+1,2)},u=function(e,t){return o(e.getUTCDate(),t.length)},d=function(e,t){return o(e.getUTCHours()%12||12,t.length)},p=function(e,t){return o(e.getUTCHours(),t.length)},h=function(e,t){return o(e.getUTCMinutes(),t.length)},m=function(e,t){return o(e.getUTCSeconds(),t.length)},f=function(e,t){var n=t.length,s=e.getUTCMilliseconds();return o(Math.floor(s*Math.pow(10,n-3)),t.length)};var g=n(13882),b=864e5,v=n(49702),y=n(7032),_=n(23324),x=n(7651);function S(e,t){var n=e>0?"-":"+",s=Math.abs(e),i=Math.floor(s/60),a=s%60;if(0===a)return n+String(i);var r=t||"";return n+String(i)+r+o(a,2)}function w(e,t){return e%60==0?(e>0?"-":"+")+o(Math.abs(e)/60,2):k(e,t)}function k(e,t){var n=t||"",s=e>0?"-":"+",i=Math.abs(e);return s+o(Math.floor(i/60),2)+n+o(i%60,2)}const j={G:function(e,t,n){var s=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(s,{width:"abbreviated"});case"GGGGG":return n.era(s,{width:"narrow"});default:return n.era(s,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var s=e.getUTCFullYear(),i=s>0?s:1-s;return n.ordinalNumber(i,{unit:"year"})}return l(e,t)},Y:function(e,t,n,s){var i=(0,x.Z)(e,s),a=i>0?i:1-i;return"YY"===t?o(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):o(a,t.length)},R:function(e,t){return o((0,y.Z)(e),t.length)},u:function(e,t){return o(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var s=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return o(s,2);case"Qo":return n.ordinalNumber(s,{unit:"quarter"});case"QQQ":return n.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(s,{width:"narrow",context:"formatting"});default:return n.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,n){var s=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return o(s,2);case"qo":return n.ordinalNumber(s,{unit:"quarter"});case"qqq":return n.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(s,{width:"narrow",context:"standalone"});default:return n.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,n){var s=e.getUTCMonth();switch(t){case"M":case"MM":return c(e,t);case"Mo":return n.ordinalNumber(s+1,{unit:"month"});case"MMM":return n.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(s,{width:"narrow",context:"formatting"});default:return n.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,n){var s=e.getUTCMonth();switch(t){case"L":return String(s+1);case"LL":return o(s+1,2);case"Lo":return n.ordinalNumber(s+1,{unit:"month"});case"LLL":return n.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(s,{width:"narrow",context:"standalone"});default:return n.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,n,s){var i=(0,_.Z)(e,s);return"wo"===t?n.ordinalNumber(i,{unit:"week"}):o(i,t.length)},I:function(e,t,n){var s=(0,v.Z)(e);return"Io"===t?n.ordinalNumber(s,{unit:"week"}):o(s,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):u(e,t)},D:function(e,t,n){var s=function(e){(0,g.Z)(1,arguments);var t=(0,r.default)(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var s=t.getTime(),i=n-s;return Math.floor(i/b)+1}(e);return"Do"===t?n.ordinalNumber(s,{unit:"dayOfYear"}):o(s,t.length)},E:function(e,t,n){var s=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,n,s){var i=e.getUTCDay(),a=(i-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return o(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,s){var i=e.getUTCDay(),a=(i-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return o(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var s=e.getUTCDay(),i=0===s?7:s;switch(t){case"i":return String(i);case"ii":return o(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(s,{width:"short",context:"formatting"});default:return n.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,n){var s=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var s,i=e.getUTCHours();switch(s=12===i?"noon":0===i?"midnight":i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var s,i=e.getUTCHours();switch(s=i>=17?"evening":i>=12?"afternoon":i>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var s=e.getUTCHours()%12;return 0===s&&(s=12),n.ordinalNumber(s,{unit:"hour"})}return d(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):p(e,t)},K:function(e,t,n){var s=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(s,{unit:"hour"}):o(s,t.length)},k:function(e,t,n){var s=e.getUTCHours();return 0===s&&(s=24),"ko"===t?n.ordinalNumber(s,{unit:"hour"}):o(s,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):h(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):m(e,t)},S:function(e,t){return f(e,t)},X:function(e,t,n,s){var i=(s._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return w(i);case"XXXX":case"XX":return k(i);default:return k(i,":")}},x:function(e,t,n,s){var i=(s._originalDate||e).getTimezoneOffset();switch(t){case"x":return w(i);case"xxxx":case"xx":return k(i);default:return k(i,":")}},O:function(e,t,n,s){var i=(s._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+S(i,":");default:return"GMT"+k(i,":")}},z:function(e,t,n,s){var i=(s._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+S(i,":");default:return"GMT"+k(i,":")}},t:function(e,t,n,s){var i=s._originalDate||e;return o(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,n,s){return o((s._originalDate||e).getTime(),t.length)}};var T=n(97621),C=n(24262),D=n(5267),P=n(83946),I=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,O=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,L=/^'([^]*?)'?$/,M=/''/g,A=/[a-zA-Z]/;function E(e,t,n){(0,g.Z)(2,arguments);var o=String(t),l=n||{},c=l.locale||i.Z,u=c.options&&c.options.firstWeekContainsDate,d=null==u?1:(0,P.Z)(u),p=null==l.firstWeekContainsDate?d:(0,P.Z)(l.firstWeekContainsDate);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=c.options&&c.options.weekStartsOn,m=null==h?0:(0,P.Z)(h),f=null==l.weekStartsOn?m:(0,P.Z)(l.weekStartsOn);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!c.localize)throw new RangeError("locale must contain localize property");if(!c.formatLong)throw new RangeError("locale must contain formatLong property");var b=(0,r.default)(e);if(!(0,s.default)(b))throw new RangeError("Invalid time value");var v=(0,C.Z)(b),y=(0,a.Z)(b,v),_={firstWeekContainsDate:p,weekStartsOn:f,locale:c,_originalDate:b},x=o.match(O).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,T.Z[t])(e,c.formatLong,_):e})).join("").match(I).map((function(n){if("''"===n)return"'";var s=n[0];if("'"===s)return U(n);var i=j[s];if(i)return!l.useAdditionalWeekYearTokens&&(0,D.Do)(n)&&(0,D.qp)(n,t,e),!l.useAdditionalDayOfYearTokens&&(0,D.Iu)(n)&&(0,D.qp)(n,t,e),i(y,n,c.localize,_);if(s.match(A))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return n})).join("");return x}function U(e){return e.match(L)[1].replace(M,"'")}},55855:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getDate();return n}},20466:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getDay();return n}},85817:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getHours();return n}},9827:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var s=n(19013),i=n(584),a=n(13882);function r(e){return(0,a.Z)(1,arguments),(0,i.default)(e,{weekStartsOn:1})}function o(e){(0,a.Z)(1,arguments);var t=(0,s.default)(e),n=t.getFullYear(),i=new Date(0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);var o=r(i),l=new Date(0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);var c=r(l);return t.getTime()>=o.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function l(e){(0,a.Z)(1,arguments);var t=o(e),n=new Date(0);n.setFullYear(t,0,4),n.setHours(0,0,0,0);var s=r(n);return s}var c=6048e5;function u(e){(0,a.Z)(1,arguments);var t=(0,s.default)(e),n=r(t).getTime()-l(t).getTime();return Math.round(n/c)+1}},39159:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getMinutes();return n}},78966:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getMonth();return n}},56605:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=Math.floor(t.getMonth()/3)+1;return n}},77881:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getSeconds();return n}},28789:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getTime();return n}},95570:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getFullYear();return n}},42699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getTime()>a.getTime()}},313:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getTime()<a.getTime()}},71381:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var s=n(13882);function i(e){return(0,s.Z)(1,arguments),e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}},96843:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getTime()===a.getTime()}},3151:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(69119),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getTime()===a.getTime()}},49160:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}},86117:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(94431),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getTime()===a.getTime()}},60792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e),a=(0,s.default)(t);return n.getFullYear()===a.getFullYear()}},12274:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e);return!isNaN(t)}},24257:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e,t){(0,i.Z)(2,arguments);var n=(0,s.default)(e).getTime(),a=(0,s.default)(t.start).getTime(),r=(0,s.default)(t.end).getTime();if(!(a<=r))throw new RangeError("Invalid interval");return n>=a&&n<=r}},4958:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var s={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function i(e){return function(t){var n=t||{},s=n.width?String(n.width):e.defaultWidth;return e.formats[s]||e.formats[e.defaultWidth]}}var a,r={date:i({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:i({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:i({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},o={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function l(e){return function(t,n){var s,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,r=i.width?String(i.width):a;s=e.formattingValues[r]||e.formattingValues[a]}else{var o=e.defaultWidth,l=i.width?String(i.width):e.defaultWidth;s=e.values[l]||e.values[o]}return s[e.argumentCallback?e.argumentCallback(t):t]}}function c(e){return function(t,n){var s=String(t),i=n||{},a=i.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],o=s.match(r);if(!o)return null;var l,c=o[0],u=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth];return l="[object Array]"===Object.prototype.toString.call(u)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].test(c))return n}(u):function(e,t){for(var n in e)if(e.hasOwnProperty(n)&&e[n].test(c))return n}(u),l=e.valueCallback?e.valueCallback(l):l,{value:l=i.valueCallback?i.valueCallback(l):l,rest:s.slice(c.length)}}}const u={code:"en-US",formatDistance:function(e,t,n){var i;return n=n||{},i="string"==typeof s[e]?s[e]:1===t?s[e].one:s[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+i:i+" ago":i},formatLong:r,formatRelative:function(e,t,n,s){return o[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),s=n%100;if(s>20||s<10)switch(s%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:l({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:l({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:l({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:l({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:l({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e,t){var n=String(e),s=t||{},i=n.match(a.matchPattern);if(!i)return null;var r=i[0],o=n.match(a.parsePattern);if(!o)return null;var l=a.valueCallback?a.valueCallback(o[0]):o[0];return{value:l=s.valueCallback?s.valueCallback(l):l,rest:n.slice(r.length)}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}}},99890:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){var t,n;if((0,i.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!=typeof e||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=(0,s.default)(e);(void 0===n||n<t||isNaN(Number(t)))&&(n=t)})),n||new Date(NaN)}},37950:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){var t,n;if((0,i.Z)(1,arguments),e&&"function"==typeof e.forEach)t=e;else{if("object"!=typeof e||null===e)return new Date(NaN);t=Array.prototype.slice.call(e)}return t.forEach((function(e){var t=(0,s.default)(e);(void 0===n||n>t||isNaN(t.getDate()))&&(n=t)})),n||new Date(NaN)}},45853:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>ae});var s=n(4958),i=n(91218),a=n(19013);function r(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var o=n(97621),l=n(24262),c=n(5267),u=n(83946),d=n(7651),p=n(13882);function h(e,t,n){(0,p.Z)(2,arguments);var s=n||{},i=s.locale,r=i&&i.options&&i.options.weekStartsOn,o=null==r?0:(0,u.Z)(r),l=null==s.weekStartsOn?o:(0,u.Z)(s.weekStartsOn);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var c=(0,a.default)(e),d=(0,u.Z)(t),h=c.getUTCDay(),m=d%7,f=(m+7)%7,g=(f<l?7:0)+d-h;return c.setUTCDate(c.getUTCDate()+g),c}var m=n(49702),f=n(23324),g=n(66979),b=n(59025),v=/^(1[0-2]|0?\d)/,y=/^(3[0-1]|[0-2]?\d)/,_=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,x=/^(5[0-3]|[0-4]?\d)/,S=/^(2[0-3]|[0-1]?\d)/,w=/^(2[0-4]|[0-1]?\d)/,k=/^(1[0-1]|0?\d)/,j=/^(1[0-2]|0?\d)/,T=/^[0-5]?\d/,C=/^[0-5]?\d/,D=/^\d/,P=/^\d{1,2}/,I=/^\d{1,3}/,O=/^\d{1,4}/,L=/^-?\d+/,M=/^-?\d/,A=/^-?\d{1,2}/,E=/^-?\d{1,3}/,U=/^-?\d{1,4}/,R=/^([+-])(\d{2})(\d{2})?|Z/,N=/^([+-])(\d{2})(\d{2})|Z/,F=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Y=/^([+-])(\d{2}):(\d{2})|Z/,B=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function H(e,t,n){var s=t.match(e);if(!s)return null;var i=parseInt(s[0],10);return{value:n?n(i):i,rest:t.slice(s[0].length)}}function V(e,t){var n=t.match(e);return n?"Z"===n[0]?{value:0,rest:t.slice(1)}:{value:("+"===n[1]?1:-1)*(36e5*(n[2]?parseInt(n[2],10):0)+6e4*(n[3]?parseInt(n[3],10):0)+1e3*(n[5]?parseInt(n[5],10):0)),rest:t.slice(n[0].length)}:null}function $(e,t){return H(L,e,t)}function W(e,t,n){switch(e){case 1:return H(D,t,n);case 2:return H(P,t,n);case 3:return H(I,t,n);case 4:return H(O,t,n);default:return H(new RegExp("^\\d{1,"+e+"}"),t,n)}}function z(e,t,n){switch(e){case 1:return H(M,t,n);case 2:return H(A,t,n);case 3:return H(E,t,n);case 4:return H(U,t,n);default:return H(new RegExp("^-?\\d{1,"+e+"}"),t,n)}}function q(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function G(e,t){var n,s=t>0,i=s?t:1-t;if(i<=50)n=e||100;else{var a=i+50;n=e+100*Math.floor(a/100)-(e>=a%100?100:0)}return s?n:1-n}var K=[31,28,31,30,31,30,31,31,30,31,30,31],X=[31,29,31,30,31,30,31,31,30,31,30,31];function Z(e){return e%400==0||e%4==0&&e%100!=0}const J={G:{priority:140,parse:function(e,t,n,s){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}},set:function(e,t,n,s){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["R","u","t","T"]},y:{priority:130,parse:function(e,t,n,s){var i=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return W(4,e,i);case"yo":return n.ordinalNumber(e,{unit:"year",valueCallback:i});default:return W(t.length,e,i)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,s){var i=e.getUTCFullYear();if(n.isTwoDigitYear){var a=G(n.year,i);return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}var r="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(r,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","u","w","I","i","e","c","t","T"]},Y:{priority:130,parse:function(e,t,n,s){var i=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return W(4,e,i);case"Yo":return n.ordinalNumber(e,{unit:"year",valueCallback:i});default:return W(t.length,e,i)}},validate:function(e,t,n){return t.isTwoDigitYear||t.year>0},set:function(e,t,n,s){var i=(0,d.Z)(e,s);if(n.isTwoDigitYear){var a=G(n.year,i);return e.setUTCFullYear(a,0,s.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,b.Z)(e,s)}var r="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(r,0,s.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,b.Z)(e,s)},incompatibleTokens:["y","R","u","Q","q","M","L","I","d","D","i","t","T"]},R:{priority:130,parse:function(e,t,n,s){return z("R"===t?4:t.length,e)},set:function(e,t,n,s){var i=new Date(0);return i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0),(0,g.Z)(i)},incompatibleTokens:["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]},u:{priority:130,parse:function(e,t,n,s){return z("u"===t?4:t.length,e)},set:function(e,t,n,s){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["G","y","Y","R","w","I","i","e","c","t","T"]},Q:{priority:120,parse:function(e,t,n,s){switch(t){case"Q":case"QQ":return W(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,s){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]},q:{priority:120,parse:function(e,t,n,s){switch(t){case"q":case"qq":return W(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=1&&t<=4},set:function(e,t,n,s){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]},M:{priority:110,parse:function(e,t,n,s){var i=function(e){return e-1};switch(t){case"M":return H(v,e,i);case"MM":return W(2,e,i);case"Mo":return n.ordinalNumber(e,{unit:"month",valueCallback:i});case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,s){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]},L:{priority:110,parse:function(e,t,n,s){var i=function(e){return e-1};switch(t){case"L":return H(v,e,i);case"LL":return W(2,e,i);case"Lo":return n.ordinalNumber(e,{unit:"month",valueCallback:i});case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,s){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]},w:{priority:100,parse:function(e,t,n,s){switch(t){case"w":return H(x,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,s){return(0,b.Z)(function(e,t,n){(0,p.Z)(2,arguments);var s=(0,a.default)(e),i=(0,u.Z)(t),r=(0,f.Z)(s,n)-i;return s.setUTCDate(s.getUTCDate()-7*r),s}(e,n,s),s)},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","i","t","T"]},I:{priority:100,parse:function(e,t,n,s){switch(t){case"I":return H(x,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=53},set:function(e,t,n,s){return(0,g.Z)(function(e,t){(0,p.Z)(2,arguments);var n=(0,a.default)(e),s=(0,u.Z)(t),i=(0,m.Z)(n)-s;return n.setUTCDate(n.getUTCDate()-7*i),n}(e,n,s),s)},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]},d:{priority:90,subPriority:1,parse:function(e,t,n,s){switch(t){case"d":return H(y,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}},validate:function(e,t,n){var s=Z(e.getUTCFullYear()),i=e.getUTCMonth();return s?t>=1&&t<=X[i]:t>=1&&t<=K[i]},set:function(e,t,n,s){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","w","I","D","i","e","c","t","T"]},D:{priority:90,subPriority:1,parse:function(e,t,n,s){switch(t){case"D":case"DD":return H(_,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return W(t.length,e)}},validate:function(e,t,n){return Z(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365},set:function(e,t,n,s){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]},E:{priority:90,parse:function(e,t,n,s){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,s){return(e=h(e,n,s)).setUTCHours(0,0,0,0),e},incompatibleTokens:["D","i","e","c","t","T"]},e:{priority:90,parse:function(e,t,n,s){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+s.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return W(t.length,e,i);case"eo":return n.ordinalNumber(e,{unit:"day",valueCallback:i});case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,s){return(e=h(e,n,s)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]},c:{priority:90,parse:function(e,t,n,s){var i=function(e){var t=7*Math.floor((e-1)/7);return(e+s.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return W(t.length,e,i);case"co":return n.ordinalNumber(e,{unit:"day",valueCallback:i});case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}},validate:function(e,t,n){return t>=0&&t<=6},set:function(e,t,n,s){return(e=h(e,n,s)).setUTCHours(0,0,0,0),e},incompatibleTokens:["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]},i:{priority:90,parse:function(e,t,n,s){var i=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return W(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return n.day(e,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiiii":return n.day(e,{width:"narrow",context:"formatting",valueCallback:i});case"iiiiii":return n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i});default:return n.day(e,{width:"wide",context:"formatting",valueCallback:i})||n.day(e,{width:"abbreviated",context:"formatting",valueCallback:i})||n.day(e,{width:"short",context:"formatting",valueCallback:i})||n.day(e,{width:"narrow",context:"formatting",valueCallback:i})}},validate:function(e,t,n){return t>=1&&t<=7},set:function(e,t,n,s){return e=function(e,t){(0,p.Z)(2,arguments);var n=(0,u.Z)(t);n%7==0&&(n-=7);var s=1,i=(0,a.default)(e),r=i.getUTCDay(),o=((n%7+7)%7<s?7:0)+n-r;return i.setUTCDate(i.getUTCDate()+o),i}(e,n,s),e.setUTCHours(0,0,0,0),e},incompatibleTokens:["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]},a:{priority:80,parse:function(e,t,n,s){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,s){return e.setUTCHours(q(n),0,0,0),e},incompatibleTokens:["b","B","H","K","k","t","T"]},b:{priority:80,parse:function(e,t,n,s){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,s){return e.setUTCHours(q(n),0,0,0),e},incompatibleTokens:["a","B","H","K","k","t","T"]},B:{priority:80,parse:function(e,t,n,s){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}},set:function(e,t,n,s){return e.setUTCHours(q(n),0,0,0),e},incompatibleTokens:["a","b","t","T"]},h:{priority:70,parse:function(e,t,n,s){switch(t){case"h":return H(j,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=12},set:function(e,t,n,s){var i=e.getUTCHours()>=12;return i&&n<12?e.setUTCHours(n+12,0,0,0):i||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e},incompatibleTokens:["H","K","k","t","T"]},H:{priority:70,parse:function(e,t,n,s){switch(t){case"H":return H(S,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=23},set:function(e,t,n,s){return e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","K","k","t","T"]},K:{priority:70,parse:function(e,t,n,s){switch(t){case"K":return H(k,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=11},set:function(e,t,n,s){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e},incompatibleTokens:["a","b","h","H","k","t","T"]},k:{priority:70,parse:function(e,t,n,s){switch(t){case"k":return H(w,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=1&&t<=24},set:function(e,t,n,s){var i=n<=24?n%24:n;return e.setUTCHours(i,0,0,0),e},incompatibleTokens:["a","b","h","H","K","t","T"]},m:{priority:60,parse:function(e,t,n,s){switch(t){case"m":return H(T,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,s){return e.setUTCMinutes(n,0,0),e},incompatibleTokens:["t","T"]},s:{priority:50,parse:function(e,t,n,s){switch(t){case"s":return H(C,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return W(t.length,e)}},validate:function(e,t,n){return t>=0&&t<=59},set:function(e,t,n,s){return e.setUTCSeconds(n,0),e},incompatibleTokens:["t","T"]},S:{priority:30,parse:function(e,t,n,s){return W(t.length,e,(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))},set:function(e,t,n,s){return e.setUTCMilliseconds(n),e},incompatibleTokens:["t","T"]},X:{priority:10,parse:function(e,t,n,s){switch(t){case"X":return V(R,e);case"XX":return V(N,e);case"XXXX":return V(F,e);case"XXXXX":return V(B,e);default:return V(Y,e)}},set:function(e,t,n,s){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","x"]},x:{priority:10,parse:function(e,t,n,s){switch(t){case"x":return V(R,e);case"xx":return V(N,e);case"xxxx":return V(F,e);case"xxxxx":return V(B,e);default:return V(Y,e)}},set:function(e,t,n,s){return t.timestampIsSet?e:new Date(e.getTime()-n)},incompatibleTokens:["t","T","X"]},t:{priority:40,parse:function(e,t,n,s){return $(e)},set:function(e,t,n,s){return[new Date(1e3*n),{timestampIsSet:!0}]},incompatibleTokens:"*"},T:{priority:20,parse:function(e,t,n,s){return $(e)},set:function(e,t,n,s){return[new Date(n),{timestampIsSet:!0}]},incompatibleTokens:"*"}};var Q=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,te=/^'([^]*?)'?$/,ne=/''/g,se=/\S/,ie=/[a-zA-Z]/;function ae(e,t,n,d){(0,p.Z)(3,arguments);var h=String(e),m=String(t),f=d||{},g=f.locale||s.Z;if(!g.match)throw new RangeError("locale must contain match property");var b=g.options&&g.options.firstWeekContainsDate,v=null==b?1:(0,u.Z)(b),y=null==f.firstWeekContainsDate?v:(0,u.Z)(f.firstWeekContainsDate);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=g.options&&g.options.weekStartsOn,x=null==_?0:(0,u.Z)(_),S=null==f.weekStartsOn?x:(0,u.Z)(f.weekStartsOn);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===m)return""===h?(0,a.default)(n):new Date(NaN);var w,k={firstWeekContainsDate:y,weekStartsOn:S,locale:g},j=[{priority:10,subPriority:-1,set:re,index:0}],T=m.match(ee).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,o.Z[t])(e,g.formatLong,k):e})).join("").match(Q),C=[];for(w=0;w<T.length;w++){var D=T[w];!f.useAdditionalWeekYearTokens&&(0,c.Do)(D)&&(0,c.qp)(D,m,e),!f.useAdditionalDayOfYearTokens&&(0,c.Iu)(D)&&(0,c.qp)(D,m,e);var P=D[0],I=J[P];if(I){var O=I.incompatibleTokens;if(Array.isArray(O)){for(var L=void 0,M=0;M<C.length;M++){var A=C[M].token;if(-1!==O.indexOf(A)||A===P){L=C[M];break}}if(L)throw new RangeError("The format string mustn't contain `".concat(L.fullToken,"` and `").concat(D,"` at the same time"))}else if("*"===I.incompatibleTokens&&C.length)throw new RangeError("The format string mustn't contain `".concat(D,"` and any other token at the same time"));C.push({token:P,fullToken:D});var E=I.parse(h,D,g.match,k);if(!E)return new Date(NaN);j.push({priority:I.priority,subPriority:I.subPriority||0,set:I.set,validate:I.validate,value:E.value,index:j.length}),h=E.rest}else{if(P.match(ie))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");if("''"===D?D="'":"'"===P&&(D=oe(D)),0!==h.indexOf(D))return new Date(NaN);h=h.slice(D.length)}}if(h.length>0&&se.test(h))return new Date(NaN);var U=j.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return j.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),R=(0,a.default)(n);if(isNaN(R))return new Date(NaN);var N=(0,i.Z)(R,(0,l.Z)(R)),F={};for(w=0;w<U.length;w++){var Y=U[w];if(Y.validate&&!Y.validate(N,Y.value,k))return new Date(NaN);var B=Y.set(N,F,Y.value,k);B[0]?(N=B[0],r(F,B[1])):N=B}return N}function re(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}function oe(e){return e.match(te)[1].replace(ne,"'")}},23855:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var s=n(83946),i=n(13882),a=36e5,r={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},o=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,l=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,c=/^([+-])(\d{2})(?::?(\d{2}))?$/;function u(e,t){(0,i.Z)(1,arguments);var n=t||{},a=null==n.additionalDigits?2:(0,s.Z)(n.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var r,o=d(e);if(o.date){var l=p(o.date,a);r=h(l.restDateString,l.year)}if(isNaN(r)||!r)return new Date(NaN);var c,u=r.getTime(),m=0;if(o.time&&(m=f(o.time),isNaN(m)||null===m))return new Date(NaN);if(!o.timezone){var g=new Date(u+m),v=new Date(0);return v.setFullYear(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()),v.setHours(g.getUTCHours(),g.getUTCMinutes(),g.getUTCSeconds(),g.getUTCMilliseconds()),v}return c=b(o.timezone),isNaN(c)?new Date(NaN):new Date(u+m+c)}function d(e){var t,n={},s=e.split(r.dateTimeDelimiter);if(s.length>2)return n;if(/:/.test(s[0])?(n.date=null,t=s[0]):(n.date=s[0],t=s[1],r.timeZoneDelimiter.test(n.date)&&(n.date=e.split(r.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var i=r.timezone.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}function p(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),s=e.match(n);if(!s)return{year:null};var i=s[1]&&parseInt(s[1]),a=s[2]&&parseInt(s[2]);return{year:null==a?i:100*a,restDateString:e.slice((s[1]||s[2]).length)}}function h(e,t){if(null===t)return null;var n=e.match(o);if(!n)return null;var s=!!n[4],i=m(n[1]),a=m(n[2])-1,r=m(n[3]),l=m(n[4]),c=m(n[5])-1;if(s)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,l,c)?function(e,t,n){var s=new Date(0);s.setUTCFullYear(e,0,4);var i=7*(t-1)+n+1-(s.getUTCDay()||7);return s.setUTCDate(s.getUTCDate()+i),s}(t,l,c):new Date(NaN);var u=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(v[t]||(y(e)?29:28))}(t,a,r)&&function(e,t){return t>=1&&t<=(y(e)?366:365)}(t,i)?(u.setUTCFullYear(t,a,Math.max(i,r)),u):new Date(NaN)}function m(e){return e?parseInt(e):1}function f(e){var t=e.match(l);if(!t)return null;var n=g(t[1]),s=g(t[2]),i=g(t[3]);return function(e,t,n){return 24===e?0===t&&0===n:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,s,i)?n*a+6e4*s+1e3*i:NaN}function g(e){return e&&parseFloat(e.replace(",","."))||0}function b(e){if("Z"===e)return 0;var t=e.match(c);if(!t)return 0;var n="+"===t[1]?-1:1,s=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,i)?n*(s*a+6e4*i):NaN}var v=[31,null,31,30,31,30,31,31,30,31,30,31];function y(e){return e%400==0||e%4==0&&e%100}},37042:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),r=(0,s.Z)(t);return n.setHours(r),n}},4543:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),r=(0,s.Z)(t);return n.setMinutes(r),n}},62225:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var s=n(83946),i=n(19013),a=n(13882);function r(e){(0,a.Z)(1,arguments);var t=(0,i.default)(e),n=t.getFullYear(),s=t.getMonth(),r=new Date(0);return r.setFullYear(n,s+1,0),r.setHours(0,0,0,0),r.getDate()}function o(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),o=(0,s.Z)(t),l=n.getFullYear(),c=n.getDate(),u=new Date(0);u.setFullYear(l,o,15),u.setHours(0,0,0,0);var d=r(u);return n.setMonth(o,Math.min(c,d)),n}},11503:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var s=n(83946),i=n(19013),a=n(62225),r=n(13882);function o(e,t){(0,r.Z)(2,arguments);var n=(0,i.default)(e),o=(0,s.Z)(t),l=Math.floor(n.getMonth()/3)+1,c=o-l;return(0,a.default)(n,n.getMonth()+3*c)}},39880:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),r=(0,s.Z)(t);return n.setSeconds(r),n}},44749:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(19013),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,i.default)(e),r=(0,s.Z)(t);return isNaN(n.getTime())?new Date(NaN):(n.setFullYear(r),n)}},69119:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e);return t.setHours(0,0,0,0),t}},43703:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e);return t.setDate(1),t.setHours(0,0,0,0),t}},94431:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}},584:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(19013),i=n(83946),a=n(13882);function r(e,t){(0,a.Z)(1,arguments);var n=t||{},r=n.locale,o=r&&r.options&&r.options.weekStartsOn,l=null==o?0:(0,i.Z)(o),c=null==n.weekStartsOn?l:(0,i.Z)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=(0,s.default)(e),d=u.getDay(),p=(d<c?7:0)+d-c;return u.setDate(u.getDate()-p),u.setHours(0,0,0,0),u}},38148:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var s=n(19013),i=n(13882);function a(e){(0,i.Z)(1,arguments);var t=(0,s.default)(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},7069:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(77349),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.default)(e,-n)}},88330:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(78343),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.default)(e,-n)}},91218:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});var s=n(83946),i=n(51820),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.Z)(e,-n)}},1784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(58545),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.default)(e,-n)}},54559:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(11640),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.default)(e,-n)}},77982:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(63500),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.default)(e,-n)}},59319:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var s=n(83946),i=n(21593),a=n(13882);function r(e,t){(0,a.Z)(2,arguments);var n=(0,s.Z)(t);return(0,i.default)(e,-n)}},19013:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var s=n(13882);function i(e){(0,s.Z)(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},20296:e=>{function t(e,t,n){var s,i,a,r,o;function l(){var c=Date.now()-r;c<t&&c>=0?s=setTimeout(l,t-c):(s=null,n||(o=e.apply(a,i),a=i=null))}null==t&&(t=100);var c=function(){a=this,i=arguments,r=Date.now();var c=n&&!s;return s||(s=setTimeout(l,t)),c&&(o=e.apply(a,i),a=i=null),o};return c.clear=function(){s&&(clearTimeout(s),s=null)},c.flush=function(){s&&(o=e.apply(a,i),a=i=null,clearTimeout(s),s=null)},c}t.debounce=t,e.exports=t},10251:(e,t,n)=>{var s=n(82215),i=n(82584),a=n(20609),r=n(98420),o=n(2847),l=n(18923),c=Date.prototype.getTime;function u(e){return null==e}function d(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}e.exports=function e(t,n,p){var h=p||{};return!!(h.strict?a(t,n):t===n)||(!t||!n||"object"!=typeof t&&"object"!=typeof n?h.strict?a(t,n):t==n:function(t,n,a){var p,h;if(typeof t!=typeof n)return!1;if(u(t)||u(n))return!1;if(t.prototype!==n.prototype)return!1;if(i(t)!==i(n))return!1;var m=r(t),f=r(n);if(m!==f)return!1;if(m||f)return t.source===n.source&&o(t)===o(n);if(l(t)&&l(n))return c.call(t)===c.call(n);var g=d(t),b=d(n);if(g!==b)return!1;if(g||b){if(t.length!==n.length)return!1;for(p=0;p<t.length;p++)if(t[p]!==n[p])return!1;return!0}if(typeof t!=typeof n)return!1;try{var v=s(t),y=s(n)}catch(e){return!1}if(v.length!==y.length)return!1;for(v.sort(),y.sort(),p=v.length-1;p>=0;p--)if(v[p]!=y[p])return!1;for(p=v.length-1;p>=0;p--)if(!e(t[h=v[p]],n[h],a))return!1;return!0}(t,n,h))}},9996:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)},n="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function i(e,t,n){return e.concat(t).map((function(e){return s(e,n)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function r(e,t){try{return t in e}catch(e){return!1}}function o(e,n,l){(l=l||{}).arrayMerge=l.arrayMerge||i,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=s;var c=Array.isArray(n);return c===Array.isArray(e)?c?l.arrayMerge(e,n,l):function(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach((function(t){i[t]=s(e[t],n)})),a(t).forEach((function(a){(function(e,t){return r(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(r(e,a)&&n.isMergeableObject(t[a])?i[a]=function(e,t){if(!t.customMerge)return o;var n=t.customMerge(e);return"function"==typeof n?n:o}(a,n)(e[a],t[a],n):i[a]=s(t[a],n))})),i}(e,n,l):s(n,l)}o.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return o(e,n,t)}),{})};var l=o;e.exports=l},4289:(e,t,n)=>{"use strict";var s=n(82215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,r=Array.prototype.concat,o=Object.defineProperty,l=o&&function(){var e={};try{for(var t in o(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),c=function(e,t,n,s){var i;(!(t in e)||"function"==typeof(i=s)&&"[object Function]"===a.call(i)&&s())&&(l?o(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},u=function(e,t){var n=arguments.length>2?arguments[2]:{},a=s(t);i&&(a=r.call(a,Object.getOwnPropertySymbols(t)));for(var o=0;o<a.length;o+=1)c(e,a[o],t[a[o]],n[a[o]])};u.supportsDescriptors=!!l,e.exports=u},98141:(e,t,n)=>{"use strict";var s=n(95318);t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,i.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var i=s(n(90404));e.exports=t.default},90404:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default},10602:e=>{"use strict";function t(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}e.exports=function(e,n){e.classList?e.classList.remove(n):"string"==typeof e.className?e.className=t(e.className,n):e.setAttribute("class",t(e.className&&e.className.baseVal||"",n))}},17837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),t.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},97220:function(e,t,n){"use strict";var s=this&&this.__assign||function(){return s=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(99960)),l=n(45863),c=n(17837),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),d=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function p(e,t){void 0===t&&(t={});for(var n=("length"in e?e:[e]),s="",i=0;i<n.length;i++)s+=h(n[i],t);return s}function h(e,t){switch(e.type){case o.Root:return p(e.children,t);case o.Directive:case o.Doctype:return"<"+e.data+">";case o.Comment:return"\x3c!--"+e.data+"--\x3e";case o.CDATA:return function(e){return"<![CDATA["+e.children[0].data+"]]>"}(e);case o.Script:case o.Style:case o.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=c.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&m.has(e.parent.name)&&(t=s(s({},t),{xmlMode:!1}))),!t.xmlMode&&f.has(e.name)&&(t=s(s({},t),{xmlMode:"foreign"}));var i="<"+e.name,a=function(e,t){if(e)return Object.keys(e).map((function(n){var s,i,a=null!==(s=e[n])&&void 0!==s?s:"";return"foreign"===t.xmlMode&&(n=null!==(i=c.attributeNames.get(n))&&void 0!==i?i:n),t.emptyAttrs||t.xmlMode||""!==a?n+'="'+(!1!==t.decodeEntities?l.encodeXML(a):a.replace(/"/g,"""))+'"':n})).join(" ")}(e.attribs,t);return a&&(i+=" "+a),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=p(e.children,t)),!t.xmlMode&&d.has(e.name)||(i+="</"+e.name+">")),i}(e,t);case o.Text:return function(e,t){var n=e.data||"";return!1===t.decodeEntities||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=l.encodeXML(n)),n}(e,t)}}t.default=p;var m=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),f=new Set(["svg","math"])},99960:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},47915:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(99960),r=n(97790);i(n(97790),t);var o=/\s+/g,l={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1},c=function(){function e(e,t,n){this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=l),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:l,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){var e;this.dom=[],this.root=new r.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null!==(e=this.parser)&&void 0!==e?e:null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,s=new r.Element(e,t,void 0,n);this.addNode(s),this.tagStack.push(s)},e.prototype.ontext=function(e){var t=this.options.normalizeWhitespace,n=this.lastNode;if(n&&n.type===a.ElementType.Text)t?n.data=(n.data+e).replace(o," "):n.data+=e;else{t&&(e=e.replace(o," "));var s=new r.Text(e);this.addNode(s),this.lastNode=s}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new r.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new r.Text(""),t=new r.NodeWithChildren(a.ElementType.CDATA,[e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new r.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},97790:function(e,t,n){"use strict";var s,i=this&&this.__extends||(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var r=n(99960),o=new Map([[r.ElementType.Tag,1],[r.ElementType.Script,1],[r.ElementType.Style,1],[r.ElementType.Directive,1],[r.ElementType.Text,3],[r.ElementType.CDATA,4],[r.ElementType.Comment,8],[r.ElementType.Root,9]]),l=function(){function e(e){this.type=e,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"nodeType",{get:function(){var e;return null!==(e=o.get(this.type))&&void 0!==e?e:1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),S(this,e)},e}();t.Node=l;var c=function(e){function t(t,n){var s=e.call(this,t)||this;return s.data=n,s}return i(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(l);t.DataNode=c;var u=function(e){function t(t){return e.call(this,r.ElementType.Text,t)||this}return i(t,e),t}(c);t.Text=u;var d=function(e){function t(t){return e.call(this,r.ElementType.Comment,t)||this}return i(t,e),t}(c);t.Comment=d;var p=function(e){function t(t,n){var s=e.call(this,r.ElementType.Directive,n)||this;return s.name=t,s}return i(t,e),t}(c);t.ProcessingInstruction=p;var h=function(e){function t(t,n){var s=e.call(this,t)||this;return s.children=n,s}return i(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(l);t.NodeWithChildren=h;var m=function(e){function t(t){return e.call(this,r.ElementType.Root,t)||this}return i(t,e),t}(h);t.Document=m;var f=function(e){function t(t,n,s,i){void 0===s&&(s=[]),void 0===i&&(i="script"===t?r.ElementType.Script:"style"===t?r.ElementType.Style:r.ElementType.Tag);var a=e.call(this,i,s)||this;return a.name=t,a.attribs=n,a}return i(t,e),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,s;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(s=e["x-attribsPrefix"])||void 0===s?void 0:s[t]}}))},enumerable:!1,configurable:!0}),t}(h);function g(e){return r.isTag(e)}function b(e){return e.type===r.ElementType.CDATA}function v(e){return e.type===r.ElementType.Text}function y(e){return e.type===r.ElementType.Comment}function _(e){return e.type===r.ElementType.Directive}function x(e){return e.type===r.ElementType.Root}function S(e,t){var n;if(void 0===t&&(t=!1),v(e))n=new u(e.data);else if(y(e))n=new d(e.data);else if(g(e)){var s=t?w(e.children):[],i=new f(e.name,a({},e.attribs),s);s.forEach((function(e){return e.parent=i})),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=i}else if(b(e)){s=t?w(e.children):[];var o=new h(r.ElementType.CDATA,s);s.forEach((function(e){return e.parent=o})),n=o}else if(x(e)){s=t?w(e.children):[];var l=new m(s);s.forEach((function(e){return e.parent=l})),e["x-mode"]&&(l["x-mode"]=e["x-mode"]),n=l}else{if(!_(e))throw new Error("Not implemented yet: "+e.type);var c=new p(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),n=c}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,n}function w(e){for(var t=e.map((function(e){return S(e,!0)})),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=f,t.isTag=g,t.isCDATA=b,t.isText=v,t.isComment=y,t.isDirective=_,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=S},74975:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.removeSubsets=void 0;var s=n(47915);function i(e,t){var n=[],i=[];if(e===t)return 0;for(var a=s.hasChildren(e)?e:e.parent;a;)n.unshift(a),a=a.parent;for(a=s.hasChildren(t)?t:t.parent;a;)i.unshift(a),a=a.parent;for(var r=Math.min(n.length,i.length),o=0;o<r&&n[o]===i[o];)o++;if(0===o)return 1;var l=n[o-1],c=l.children,u=n[o],d=i[o];return c.indexOf(u)>c.indexOf(d)?l===t?20:4:l===e?10:2}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var s=n.parent;s;s=s.parent)if(e.includes(s)){e.splice(t,1);break}}return e},t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,t){var n=i(e,t);return 2&n?-1:4&n?1:0})),e}},89432:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(n(43346),t),i(n(85010),t),i(n(26765),t),i(n(98043),t),i(n(23905),t),i(n(74975),t);var a=n(47915);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return a.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return a.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return a.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return a.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return a.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return a.hasChildren}})},23905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var s=n(47915),i=n(98043),a={tag_name:function(e){return"function"==typeof e?function(t){return s.isTag(t)&&e(t.name)}:"*"===e?s.isTag:function(t){return s.isTag(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return s.isText(t)&&e(t.data)}:function(t){return s.isText(t)&&t.data===e}}};function r(e,t){return"function"==typeof t?function(n){return s.isTag(n)&&t(n.attribs[e])}:function(n){return s.isTag(n)&&n.attribs[e]===t}}function o(e,t){return function(n){return e(n)||t(n)}}function l(e){var t=Object.keys(e).map((function(t){var n=e[t];return t in a?a[t](n):r(t,n)}));return 0===t.length?null:t.reduce(o)}t.testElement=function(e,t){var n=l(e);return!n||n(t)},t.getElements=function(e,t,n,s){void 0===s&&(s=1/0);var a=l(e);return a?i.filter(a,t,n,s):[]},t.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),i.findOne(r("id",e),t,n)},t.getElementsByTagName=function(e,t,n,s){return void 0===n&&(n=!0),void 0===s&&(s=1/0),i.filter(a.tag_name(e),t,n,s)},t.getElementsByTagType=function(e,t,n,s){return void 0===n&&(n=!0),void 0===s&&(s=1/0),i.filter(a.tag_type(e),t,n,s)}},26765:(e,t)=>{"use strict";function n(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=n,t.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var s=t.next=e.next;s&&(s.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t}},t.appendChild=function(e,t){if(n(t),t.next=null,t.parent=e,e.children.push(t)>1){var s=e.children[e.children.length-2];s.next=t,t.prev=s}else t.prev=null},t.append=function(e,t){n(t);var s=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=s,i){if(i.prev=t,s){var a=s.children;a.splice(a.lastIndexOf(i),0,t)}}else s&&s.children.push(t)},t.prependChild=function(e,t){if(n(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var s=e.children[1];s.prev=t,t.next=s}else t.next=null},t.prepend=function(e,t){n(t);var s=e.parent;if(s){var i=s.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=s,t.prev=e.prev,t.next=e,e.prev=t}},98043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var s=n(47915);function i(e,t,n,a){for(var r=[],o=0,l=t;o<l.length;o++){var c=l[o];if(e(c)&&(r.push(c),--a<=0))break;if(n&&s.hasChildren(c)&&c.children.length>0){var u=i(e,c.children,n,a);if(r.push.apply(r,u),(a-=u.length)<=0)break}}return r}t.filter=function(e,t,n,s){return void 0===n&&(n=!0),void 0===s&&(s=1/0),Array.isArray(t)||(t=[t]),i(e,t,n,s)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,n,i){void 0===i&&(i=!0);for(var a=null,r=0;r<n.length&&!a;r++){var o=n[r];s.isTag(o)&&(t(o)?a=o:i&&o.children.length>0&&(a=e(t,o.children)))}return a},t.existsOne=function e(t,n){return n.some((function(n){return s.isTag(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},t.findAll=function(e,t){for(var n,i,a=[],r=t.filter(s.isTag);i=r.shift();){var o=null===(n=i.children)||void 0===n?void 0:n.filter(s.isTag);o&&o.length>0&&r.unshift.apply(r,o),e(i)&&a.push(i)}return a}},43346:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=n(47915),a=s(n(97220)),r=n(99960);function o(e,t){return a.default(e,t)}t.getOuterHTML=o,t.getInnerHTML=function(e,t){return i.hasChildren(e)?e.children.map((function(e){return o(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):i.isTag(t)?"br"===t.name?"\n":e(t.children):i.isCDATA(t)?e(t.children):i.isText(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):i.isTag(t)||i.isCDATA(t)?e(t.children):i.isText(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):i.hasChildren(t)&&t.type===r.ElementType.Tag||i.isCDATA(t)?e(t.children):i.isText(t)?t.data:""}},85010:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var s=n(47915),i=[];function a(e){var t;return null!==(t=e.children)&&void 0!==t?t:i}function r(e){return e.parent||null}t.getChildren=a,t.getParent=r,t.getSiblings=function(e){var t=r(e);if(null!=t)return a(t);for(var n=[e],s=e.prev,i=e.next;null!=s;)n.unshift(s),s=s.prev;for(;null!=i;)n.push(i),i=i.next;return n},t.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!s.isTag(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!s.isTag(t);)t=t.prev;return t}},44076:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeHTML=t.decodeHTMLStrict=t.decodeXML=void 0;var i=s(n(59323)),a=s(n(29591)),r=s(n(2586)),o=s(n(26)),l=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;function c(e){var t=d(e);return function(e){return String(e).replace(l,t)}}t.decodeXML=c(r.default),t.decodeHTMLStrict=c(i.default);var u=function(e,t){return e<t?1:-1};function d(e){return function(t){if("#"===t.charAt(1)){var n=t.charAt(2);return"X"===n||"x"===n?o.default(parseInt(t.substr(3),16)):o.default(parseInt(t.substr(2),10))}return e[t.slice(1,-1)]||t}}t.decodeHTML=function(){for(var e=Object.keys(a.default).sort(u),t=Object.keys(i.default).sort(u),n=0,s=0;n<t.length;n++)e[s]===t[n]?(t[n]+=";?",s++):t[n]+=";";var r=new RegExp("&(?:"+t.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),o=d(i.default);function l(e){return";"!==e.substr(-1)&&(e+=";"),o(e)}return function(e){return String(e).replace(r,l)}}()},26:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(33600)),a=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)};t.default=function(e){return e>=55296&&e<=57343||e>1114111?"�":(e in i.default&&(e=i.default[e]),a(e))}},87322:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=void 0;var i=u(s(n(2586)).default),a=d(i);t.encodeXML=g(i);var r,o,l=u(s(n(59323)).default),c=d(l);function u(e){return Object.keys(e).sort().reduce((function(t,n){return t[e[n]]="&"+n+";",t}),{})}function d(e){for(var t=[],n=[],s=0,i=Object.keys(e);s<i.length;s++){var a=i[s];1===a.length?t.push("\\"+a):n.push(a)}t.sort();for(var r=0;r<t.length-1;r++){for(var o=r;o<t.length-1&&t[o].charCodeAt(1)+1===t[o+1].charCodeAt(1);)o+=1;var l=1+o-r;l<3||t.splice(r,l,t[r]+"-"+t[o])}return n.unshift("["+t.join("")+"]"),new RegExp(n.join("|"),"g")}t.encodeHTML=(r=l,o=c,function(e){return e.replace(o,(function(e){return r[e]})).replace(p,m)}),t.encodeNonAsciiHTML=g(l);var p=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,h=null!=String.prototype.codePointAt?function(e){return e.codePointAt(0)}:function(e){return 1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)-56320+65536};function m(e){return"&#x"+(e.length>1?h(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}var f=new RegExp(a.source+"|"+p.source,"g");function g(e){return function(t){return t.replace(f,(function(t){return e[t]||m(t)}))}}t.escape=function(e){return e.replace(f,m)},t.escapeUTF8=function(e){return e.replace(a,m)}},45863:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.encodeHTML5=t.encodeHTML4=t.escapeUTF8=t.escape=t.encodeNonAsciiHTML=t.encodeHTML=t.encodeXML=t.encode=t.decodeStrict=t.decode=void 0;var s=n(44076),i=n(87322);t.decode=function(e,t){return(!t||t<=0?s.decodeXML:s.decodeHTML)(e)},t.decodeStrict=function(e,t){return(!t||t<=0?s.decodeXML:s.decodeHTMLStrict)(e)},t.encode=function(e,t){return(!t||t<=0?i.encodeXML:i.encodeHTML)(e)};var a=n(87322);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return a.encodeXML}}),Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return a.encodeNonAsciiHTML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return a.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return a.escapeUTF8}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return a.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return a.encodeHTML}});var r=n(44076);Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return r.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return r.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return r.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return r.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return r.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return r.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return r.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return r.decodeXML}})},17648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,s=Object.prototype.toString,i="[object Function]";e.exports=function(e){var a=this;if("function"!=typeof a||s.call(a)!==i)throw new TypeError(t+a);for(var r,o=n.call(arguments,1),l=function(){if(this instanceof r){var t=a.apply(this,o.concat(n.call(arguments)));return Object(t)===t?t:this}return a.apply(e,o.concat(n.call(arguments)))},c=Math.max(0,a.length-o.length),u=[],d=0;d<c;d++)u.push("$"+d);if(r=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(l),a.prototype){var p=function(){};p.prototype=a.prototype,r.prototype=new p,p.prototype=null}return r}},58612:(e,t,n)=>{"use strict";var s=n(17648);e.exports=Function.prototype.bind||s},40210:(e,t,n)=>{"use strict";var s,i=SyntaxError,a=Function,r=TypeError,o=function(e){try{return a('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new r},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,d=n(41405)(),p=Object.getPrototypeOf||function(e){return e.__proto__},h={},m="undefined"==typeof Uint8Array?s:p(Uint8Array),f={"%AggregateError%":"undefined"==typeof AggregateError?s:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?s:ArrayBuffer,"%ArrayIteratorPrototype%":d?p([][Symbol.iterator]()):s,"%AsyncFromSyncIteratorPrototype%":s,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?s:Atomics,"%BigInt%":"undefined"==typeof BigInt?s:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?s:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?s:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?s:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?s:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?s:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?s:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?s:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?p(p([][Symbol.iterator]())):s,"%JSON%":"object"==typeof JSON?JSON:s,"%Map%":"undefined"==typeof Map?s:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d?p((new Map)[Symbol.iterator]()):s,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?s:Promise,"%Proxy%":"undefined"==typeof Proxy?s:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?s:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?s:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d?p((new Set)[Symbol.iterator]()):s,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?s:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?p(""[Symbol.iterator]()):s,"%Symbol%":d?Symbol:s,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":r,"%Uint8Array%":"undefined"==typeof Uint8Array?s:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?s:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?s:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?s:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?s:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?s:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?s:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=o("async function () {}");else if("%GeneratorFunction%"===t)n=o("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=o("async function* () {}");else if("%AsyncGenerator%"===t){var s=e("%AsyncGeneratorFunction%");s&&(n=s.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=p(i.prototype))}return f[t]=n,n},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},v=n(58612),y=n(17642),_=v.call(Function.call,Array.prototype.concat),x=v.call(Function.apply,Array.prototype.splice),S=v.call(Function.call,String.prototype.replace),w=v.call(Function.call,String.prototype.slice),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,T=function(e){var t=w(e,0,1),n=w(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var s=[];return S(e,k,(function(e,t,n,i){s[s.length]=n?S(i,j,"$1"):t||e})),s},C=function(e,t){var n,s=e;if(y(b,s)&&(s="%"+(n=b[s])[0]+"%"),y(f,s)){var a=f[s];if(a===h&&(a=g(s)),void 0===a&&!t)throw new r("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:s,value:a}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new r("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new r('"allowMissing" argument must be a boolean');var n=T(e),s=n.length>0?n[0]:"",a=C("%"+s+"%",t),o=a.name,c=a.value,u=!1,d=a.alias;d&&(s=d[0],x(n,_([0,1],d)));for(var p=1,h=!0;p<n.length;p+=1){var m=n[p],g=w(m,0,1),b=w(m,-1);if(('"'===g||"'"===g||"`"===g||'"'===b||"'"===b||"`"===b)&&g!==b)throw new i("property names with quotes must have matching quotes");if("constructor"!==m&&h||(u=!0),y(f,o="%"+(s+="."+m)+"%"))c=f[o];else if(null!=c){if(!(m in c)){if(!t)throw new r("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&p+1>=n.length){var v=l(c,m);c=(h=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[m]}else h=y(c,m),c=c[m];h&&!u&&(f[o]=c)}}return c}},47815:(e,t,n)=>{"use strict";var s="__global_unique_id__";e.exports=function(){return n.g[s]=(n.g[s]||0)+1}},41405:(e,t,n)=>{"use strict";var s="undefined"!=typeof Symbol&&Symbol,i=n(55419);e.exports=function(){return"function"==typeof s&&"function"==typeof Symbol&&"symbol"==typeof s("foo")&&"symbol"==typeof Symbol("bar")&&i()}},55419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var s=Object.getOwnPropertySymbols(e);if(1!==s.length||s[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},17642:(e,t,n)=>{"use strict";var s=n(58612);e.exports=s.call(Function.call,Object.prototype.hasOwnProperty)},8679:(e,t,n)=>{"use strict";var s=n(59864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function l(e){return s.isMemo(e)?r:o[e.$$typeof]||i}o[s.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[s.Memo]=r;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,s){if("string"!=typeof n){if(m){var i=h(n);i&&i!==m&&e(t,i,s)}var r=u(n);d&&(r=r.concat(d(n)));for(var o=l(t),f=l(n),g=0;g<r.length;++g){var b=r[g];if(!(a[b]||s&&s[b]||f&&f[b]||o&&o[b])){var v=p(n,b);try{c(t,b,v)}catch(e){}}}}return t}},63870:function(e,t,n){"use strict";var s,i=this&&this.__extends||(s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},s(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&a(t,e,n);return r(t,e),t},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseFeed=t.FeedHandler=void 0;var c,u,d=l(n(47915)),p=o(n(89432)),h=n(50763);!function(e){e[e.image=0]="image",e[e.audio=1]="audio",e[e.video=2]="video",e[e.document=3]="document",e[e.executable=4]="executable"}(c||(c={})),function(e){e[e.sample=0]="sample",e[e.full=1]="full",e[e.nonstop=2]="nonstop"}(u||(u={}));var m=function(e){function t(t,n){return"object"==typeof t&&(n=t=void 0),e.call(this,t,n)||this}return i(t,e),t.prototype.onend=function(){var e,t,n=b(x,this.dom);if(n){var s={};if("feed"===n.name){var i=n.children;s.type="atom",_(s,"id","id",i),_(s,"title","title",i);var a=y("href",b("link",i));a&&(s.link=a),_(s,"description","subtitle",i),(r=v("updated",i))&&(s.updated=new Date(r)),_(s,"author","email",i,!0),s.items=g("entry",i).map((function(e){var t={},n=e.children;_(t,"id","id",n),_(t,"title","title",n);var s=y("href",b("link",n));s&&(t.link=s);var i=v("summary",n)||v("content",n);i&&(t.description=i);var a=v("updated",n);return a&&(t.pubDate=new Date(a)),t.media=f(n),t}))}else{var r;i=null!==(t=null===(e=b("channel",n.children))||void 0===e?void 0:e.children)&&void 0!==t?t:[],s.type=n.name.substr(0,3),s.id="",_(s,"title","title",i),_(s,"link","link",i),_(s,"description","description",i),(r=v("lastBuildDate",i))&&(s.updated=new Date(r)),_(s,"author","managingEditor",i,!0),s.items=g("item",n.children).map((function(e){var t={},n=e.children;_(t,"id","guid",n),_(t,"title","title",n),_(t,"link","link",n),_(t,"description","description",n);var s=v("pubDate",n);return s&&(t.pubDate=new Date(s)),t.media=f(n),t}))}this.feed=s,this.handleCallback(null)}else this.handleCallback(new Error("couldn't find root of feed"))},t}(d.default);function f(e){return g("media:content",e).map((function(e){var t={medium:e.attribs.medium,isDefault:!!e.attribs.isDefault};return e.attribs.url&&(t.url=e.attribs.url),e.attribs.fileSize&&(t.fileSize=parseInt(e.attribs.fileSize,10)),e.attribs.type&&(t.type=e.attribs.type),e.attribs.expression&&(t.expression=e.attribs.expression),e.attribs.bitrate&&(t.bitrate=parseInt(e.attribs.bitrate,10)),e.attribs.framerate&&(t.framerate=parseInt(e.attribs.framerate,10)),e.attribs.samplingrate&&(t.samplingrate=parseInt(e.attribs.samplingrate,10)),e.attribs.channels&&(t.channels=parseInt(e.attribs.channels,10)),e.attribs.duration&&(t.duration=parseInt(e.attribs.duration,10)),e.attribs.height&&(t.height=parseInt(e.attribs.height,10)),e.attribs.width&&(t.width=parseInt(e.attribs.width,10)),e.attribs.lang&&(t.lang=e.attribs.lang),t}))}function g(e,t){return p.getElementsByTagName(e,t,!0)}function b(e,t){return p.getElementsByTagName(e,t,!0,1)[0]}function v(e,t,n){return void 0===n&&(n=!1),p.getText(p.getElementsByTagName(e,t,n,1)).trim()}function y(e,t){return t?t.attribs[e]:null}function _(e,t,n,s,i){void 0===i&&(i=!1);var a=v(n,s,i);a&&(e[t]=a)}function x(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}t.FeedHandler=m,t.parseFeed=function(e,t){void 0===t&&(t={xmlMode:!0});var n=new m(t);return new h.Parser(n,t).end(e),n.feed}},50763:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var i=s(n(39889)),a=new Set(["input","option","optgroup","select","button","datalist","textarea"]),r=new Set(["p"]),o={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:r,h1:r,h2:r,h3:r,h4:r,h5:r,h6:r,select:a,input:a,output:a,button:a,datalist:a,textarea:a,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:r,article:r,aside:r,blockquote:r,details:r,div:r,dl:r,fieldset:r,figcaption:r,figure:r,footer:r,form:r,header:r,hr:r,main:r,nav:r,ol:r,pre:r,section:r,table:r,ul:r,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},l=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),c=new Set(["math","svg"]),u=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\s|\//,p=function(){function e(e,t){var n,s,a,r,o;void 0===t&&(t={}),this.startIndex=0,this.endIndex=null,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.options=t,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(n=t.lowerCaseTags)&&void 0!==n?n:!t.xmlMode,this.lowerCaseAttributeNames=null!==(s=t.lowerCaseAttributeNames)&&void 0!==s?s:!t.xmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:i.default)(this.options,this),null===(o=(r=this.cbs).onparserinit)||void 0===o||o.call(r,this)}return e.prototype.updatePosition=function(e){null===this.endIndex?this.tokenizer.sectionStart<=e?this.startIndex=0:this.startIndex=this.tokenizer.sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this.tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(e){var t,n;this.updatePosition(1),this.endIndex--,null===(n=(t=this.cbs).ontext)||void 0===n||n.call(t,e)},e.prototype.onopentagname=function(e){var t,n;if(this.lowerCaseTagNames&&(e=e.toLowerCase()),this.tagname=e,!this.options.xmlMode&&Object.prototype.hasOwnProperty.call(o,e))for(var s=void 0;this.stack.length>0&&o[e].has(s=this.stack[this.stack.length-1]);)this.onclosetag(s);!this.options.xmlMode&&l.has(e)||(this.stack.push(e),c.has(e)?this.foreignContext.push(!0):u.has(e)&&this.foreignContext.push(!1)),null===(n=(t=this.cbs).onopentagname)||void 0===n||n.call(t,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.onopentagend=function(){var e,t;this.updatePosition(1),this.attribs&&(null===(t=(e=this.cbs).onopentag)||void 0===t||t.call(e,this.tagname,this.attribs),this.attribs=null),!this.options.xmlMode&&this.cbs.onclosetag&&l.has(this.tagname)&&this.cbs.onclosetag(this.tagname),this.tagname=""},e.prototype.onclosetag=function(e){if(this.updatePosition(1),this.lowerCaseTagNames&&(e=e.toLowerCase()),(c.has(e)||u.has(e))&&this.foreignContext.pop(),!this.stack.length||!this.options.xmlMode&&l.has(e))this.options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this.closeCurrentTag());else{var t=this.stack.lastIndexOf(e);if(-1!==t)if(this.cbs.onclosetag)for(t=this.stack.length-t;t--;)this.cbs.onclosetag(this.stack.pop());else this.stack.length=t;else"p"!==e||this.options.xmlMode||(this.onopentagname(e),this.closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?this.closeCurrentTag():this.onopentagend()},e.prototype.closeCurrentTag=function(){var e,t,n=this.tagname;this.onopentagend(),this.stack[this.stack.length-1]===n&&(null===(t=(e=this.cbs).onclosetag)||void 0===t||t.call(e,n),this.stack.pop())},e.prototype.onattribname=function(e){this.lowerCaseAttributeNames&&(e=e.toLowerCase()),this.attribname=e},e.prototype.onattribdata=function(e){this.attribvalue+=e},e.prototype.onattribend=function(e){var t,n;null===(n=(t=this.cbs).onattribute)||void 0===n||n.call(t,this.attribname,this.attribvalue,e),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribname="",this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(d),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("!"+t,"!"+e)}},e.prototype.onprocessinginstruction=function(e){if(this.cbs.onprocessinginstruction){var t=this.getInstructionName(e);this.cbs.onprocessinginstruction("?"+t,"?"+e)}},e.prototype.oncomment=function(e){var t,n,s,i;this.updatePosition(4),null===(n=(t=this.cbs).oncomment)||void 0===n||n.call(t,e),null===(i=(s=this.cbs).oncommentend)||void 0===i||i.call(s)},e.prototype.oncdata=function(e){var t,n,s,i,a,r;this.updatePosition(1),this.options.xmlMode||this.options.recognizeCDATA?(null===(n=(t=this.cbs).oncdatastart)||void 0===n||n.call(t),null===(i=(s=this.cbs).ontext)||void 0===i||i.call(s,e),null===(r=(a=this.cbs).oncdataend)||void 0===r||r.call(a)):this.oncomment("[CDATA["+e+"]]")},e.prototype.onerror=function(e){var t,n;null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,e)},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag)for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n]));null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,s;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack=[],null===(s=(n=this.cbs).onparserinit)||void 0===s||s.call(n,this)},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.write=function(e){this.tokenizer.write(e)},e.prototype.end=function(e){this.tokenizer.end(e)},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){this.tokenizer.resume()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=p},39889:function(e,t,n){"use strict";var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=s(n(26)),a=s(n(59323)),r=s(n(29591)),o=s(n(2586));function l(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function c(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"}function u(e,t,n){var s=e.toLowerCase();return e===s?function(e,i){i===s?e._state=t:(e._state=n,e._index--)}:function(i,a){a===s||a===e?i._state=t:(i._state=n,i._index--)}}function d(e,t){var n=e.toLowerCase();return function(s,i){i===n||i===e?s._state=t:(s._state=3,s._index--)}}var p=u("C",24,16),h=u("D",25,16),m=u("A",26,16),f=u("T",27,16),g=u("A",28,16),b=d("R",35),v=d("I",36),y=d("P",37),_=d("T",38),x=u("R",40,1),S=u("I",41,1),w=u("P",42,1),k=u("T",43,1),j=d("Y",45),T=d("L",46),C=d("E",47),D=u("Y",49,1),P=u("L",50,1),I=u("E",51,1),O=d("I",54),L=d("T",55),M=d("L",56),A=d("E",57),E=u("I",58,1),U=u("T",59,1),R=u("L",60,1),N=u("E",61,1),F=u("#",63,64),Y=u("X",66,65),B=function(){function e(e,t){var n;this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1,this.cbs=t,this.xmlMode=!!(null==e?void 0:e.xmlMode),this.decodeEntities=null===(n=null==e?void 0:e.decodeEntities)||void 0===n||n}return e.prototype.reset=function(){this._state=1,this.buffer="",this.sectionStart=0,this._index=0,this.bufferOffset=0,this.baseState=1,this.special=1,this.running=!0,this.ended=!1},e.prototype.write=function(e){this.ended&&this.cbs.onerror(Error(".write() after done!")),this.buffer+=e,this.parse()},e.prototype.end=function(e){this.ended&&this.cbs.onerror(Error(".end() after done!")),e&&this.write(e),this.ended=!0,this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this._index<this.buffer.length&&this.parse(),this.ended&&this.finish()},e.prototype.getAbsoluteIndex=function(){return this.bufferOffset+this._index},e.prototype.stateText=function(e){"<"===e?(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this._state=2,this.sectionStart=this._index):!this.decodeEntities||"&"!==e||1!==this.special&&4!==this.special||(this._index>this.sectionStart&&this.cbs.ontext(this.getSection()),this.baseState=1,this._state=62,this.sectionStart=this._index)},e.prototype.isTagStartChar=function(e){return c(e)||this.xmlMode&&!l(e)&&"/"!==e&&">"!==e},e.prototype.stateBeforeTagName=function(e){"/"===e?this._state=5:"<"===e?(this.cbs.ontext(this.getSection()),this.sectionStart=this._index):">"===e||1!==this.special||l(e)?this._state=1:"!"===e?(this._state=15,this.sectionStart=this._index+1):"?"===e?(this._state=17,this.sectionStart=this._index+1):this.isTagStartChar(e)?(this._state=this.xmlMode||"s"!==e&&"S"!==e?this.xmlMode||"t"!==e&&"T"!==e?3:52:32,this.sectionStart=this._index):this._state=1},e.prototype.stateInTagName=function(e){("/"===e||">"===e||l(e))&&(this.emitToken("onopentagname"),this._state=8,this._index--)},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(">"===e?this._state=1:1!==this.special?4===this.special||"s"!==e&&"S"!==e?4!==this.special||"t"!==e&&"T"!==e?(this._state=1,this._index--):this._state=53:this._state=33:this.isTagStartChar(e)?(this._state=6,this.sectionStart=this._index):(this._state=20,this.sectionStart=this._index))},e.prototype.stateInClosingTagName=function(e){(">"===e||l(e))&&(this.emitToken("onclosetag"),this._state=7,this._index--)},e.prototype.stateAfterClosingTagName=function(e){">"===e&&(this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeAttributeName=function(e){">"===e?(this.cbs.onopentagend(),this._state=1,this.sectionStart=this._index+1):"/"===e?this._state=4:l(e)||(this._state=9,this.sectionStart=this._index)},e.prototype.stateInSelfClosingTag=function(e){">"===e?(this.cbs.onselfclosingtag(),this._state=1,this.sectionStart=this._index+1,this.special=1):l(e)||(this._state=8,this._index--)},e.prototype.stateInAttributeName=function(e){("="===e||"/"===e||">"===e||l(e))&&(this.cbs.onattribname(this.getSection()),this.sectionStart=-1,this._state=10,this._index--)},e.prototype.stateAfterAttributeName=function(e){"="===e?this._state=11:"/"===e||">"===e?(this.cbs.onattribend(void 0),this._state=8,this._index--):l(e)||(this.cbs.onattribend(void 0),this._state=9,this.sectionStart=this._index)},e.prototype.stateBeforeAttributeValue=function(e){'"'===e?(this._state=12,this.sectionStart=this._index+1):"'"===e?(this._state=13,this.sectionStart=this._index+1):l(e)||(this._state=14,this.sectionStart=this._index,this._index--)},e.prototype.handleInAttributeValue=function(e,t){e===t?(this.emitToken("onattribdata"),this.cbs.onattribend(t),this._state=8):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,'"')},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,"'")},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||">"===e?(this.emitToken("onattribdata"),this.cbs.onattribend(null),this._state=8,this._index--):this.decodeEntities&&"&"===e&&(this.emitToken("onattribdata"),this.baseState=this._state,this._state=62,this.sectionStart=this._index)},e.prototype.stateBeforeDeclaration=function(e){this._state="["===e?23:"-"===e?18:16},e.prototype.stateInDeclaration=function(e){">"===e&&(this.cbs.ondeclaration(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateInProcessingInstruction=function(e){">"===e&&(this.cbs.onprocessinginstruction(this.getSection()),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateBeforeComment=function(e){"-"===e?(this._state=19,this.sectionStart=this._index+1):this._state=16},e.prototype.stateInComment=function(e){"-"===e&&(this._state=21)},e.prototype.stateInSpecialComment=function(e){">"===e&&(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index)),this._state=1,this.sectionStart=this._index+1)},e.prototype.stateAfterComment1=function(e){this._state="-"===e?22:19},e.prototype.stateAfterComment2=function(e){">"===e?(this.cbs.oncomment(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"-"!==e&&(this._state=19)},e.prototype.stateBeforeCdata6=function(e){"["===e?(this._state=29,this.sectionStart=this._index+1):(this._state=16,this._index--)},e.prototype.stateInCdata=function(e){"]"===e&&(this._state=30)},e.prototype.stateAfterCdata1=function(e){this._state="]"===e?31:29},e.prototype.stateAfterCdata2=function(e){">"===e?(this.cbs.oncdata(this.buffer.substring(this.sectionStart,this._index-2)),this._state=1,this.sectionStart=this._index+1):"]"!==e&&(this._state=29)},e.prototype.stateBeforeSpecialS=function(e){"c"===e||"C"===e?this._state=34:"t"===e||"T"===e?this._state=44:(this._state=3,this._index--)},e.prototype.stateBeforeSpecialSEnd=function(e){2!==this.special||"c"!==e&&"C"!==e?3!==this.special||"t"!==e&&"T"!==e?this._state=1:this._state=48:this._state=39},e.prototype.stateBeforeSpecialLast=function(e,t){("/"===e||">"===e||l(e))&&(this.special=t),this._state=3,this._index--},e.prototype.stateAfterSpecialLast=function(e,t){">"===e||l(e)?(this.special=1,this._state=6,this.sectionStart=this._index-t,this._index--):this._state=1},e.prototype.parseFixedEntity=function(e){if(void 0===e&&(e=this.xmlMode?o.default:a.default),this.sectionStart+1<this._index){var t=this.buffer.substring(this.sectionStart+1,this._index);Object.prototype.hasOwnProperty.call(e,t)&&(this.emitPartial(e[t]),this.sectionStart=this._index+1)}},e.prototype.parseLegacyEntity=function(){for(var e=this.sectionStart+1,t=Math.min(this._index-e,6);t>=2;){var n=this.buffer.substr(e,t);if(Object.prototype.hasOwnProperty.call(r.default,n))return this.emitPartial(r.default[n]),void(this.sectionStart+=t+1);t--}},e.prototype.stateInNamedEntity=function(e){";"===e?(this.parseFixedEntity(),1===this.baseState&&this.sectionStart+1<this._index&&!this.xmlMode&&this.parseLegacyEntity(),this._state=this.baseState):(e<"0"||e>"9")&&!c(e)&&(this.xmlMode||this.sectionStart+1===this._index||(1!==this.baseState?"="!==e&&this.parseFixedEntity(r.default):this.parseLegacyEntity()),this._state=this.baseState,this._index--)},e.prototype.decodeNumericEntity=function(e,t,n){var s=this.sectionStart+e;if(s!==this._index){var a=this.buffer.substring(s,this._index),r=parseInt(a,t);this.emitPartial(i.default(r)),this.sectionStart=n?this._index+1:this._index}this._state=this.baseState},e.prototype.stateInNumericEntity=function(e){";"===e?this.decodeNumericEntity(2,10,!0):(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(2,10,!1),this._index--)},e.prototype.stateInHexEntity=function(e){";"===e?this.decodeNumericEntity(3,16,!0):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this.xmlMode?this._state=this.baseState:this.decodeNumericEntity(3,16,!1),this._index--)},e.prototype.cleanup=function(){this.sectionStart<0?(this.buffer="",this.bufferOffset+=this._index,this._index=0):this.running&&(1===this._state?(this.sectionStart!==this._index&&this.cbs.ontext(this.buffer.substr(this.sectionStart)),this.buffer="",this.bufferOffset+=this._index,this._index=0):this.sectionStart===this._index?(this.buffer="",this.bufferOffset+=this._index,this._index=0):(this.buffer=this.buffer.substr(this.sectionStart),this._index-=this.sectionStart,this.bufferOffset+=this.sectionStart),this.sectionStart=0)},e.prototype.parse=function(){for(;this._index<this.buffer.length&&this.running;){var e=this.buffer.charAt(this._index);1===this._state?this.stateText(e):12===this._state?this.stateInAttributeValueDoubleQuotes(e):9===this._state?this.stateInAttributeName(e):19===this._state?this.stateInComment(e):20===this._state?this.stateInSpecialComment(e):8===this._state?this.stateBeforeAttributeName(e):3===this._state?this.stateInTagName(e):6===this._state?this.stateInClosingTagName(e):2===this._state?this.stateBeforeTagName(e):10===this._state?this.stateAfterAttributeName(e):13===this._state?this.stateInAttributeValueSingleQuotes(e):11===this._state?this.stateBeforeAttributeValue(e):5===this._state?this.stateBeforeClosingTagName(e):7===this._state?this.stateAfterClosingTagName(e):32===this._state?this.stateBeforeSpecialS(e):21===this._state?this.stateAfterComment1(e):14===this._state?this.stateInAttributeValueNoQuotes(e):4===this._state?this.stateInSelfClosingTag(e):16===this._state?this.stateInDeclaration(e):15===this._state?this.stateBeforeDeclaration(e):22===this._state?this.stateAfterComment2(e):18===this._state?this.stateBeforeComment(e):33===this._state?this.stateBeforeSpecialSEnd(e):53===this._state?E(this,e):39===this._state?x(this,e):40===this._state?S(this,e):41===this._state?w(this,e):34===this._state?b(this,e):35===this._state?v(this,e):36===this._state?y(this,e):37===this._state?_(this,e):38===this._state?this.stateBeforeSpecialLast(e,2):42===this._state?k(this,e):43===this._state?this.stateAfterSpecialLast(e,6):44===this._state?j(this,e):29===this._state?this.stateInCdata(e):45===this._state?T(this,e):46===this._state?C(this,e):47===this._state?this.stateBeforeSpecialLast(e,3):48===this._state?D(this,e):49===this._state?P(this,e):50===this._state?I(this,e):51===this._state?this.stateAfterSpecialLast(e,5):52===this._state?O(this,e):54===this._state?L(this,e):55===this._state?M(this,e):56===this._state?A(this,e):57===this._state?this.stateBeforeSpecialLast(e,4):58===this._state?U(this,e):59===this._state?R(this,e):60===this._state?N(this,e):61===this._state?this.stateAfterSpecialLast(e,5):17===this._state?this.stateInProcessingInstruction(e):64===this._state?this.stateInNamedEntity(e):23===this._state?p(this,e):62===this._state?F(this,e):24===this._state?h(this,e):25===this._state?m(this,e):30===this._state?this.stateAfterCdata1(e):31===this._state?this.stateAfterCdata2(e):26===this._state?f(this,e):27===this._state?g(this,e):28===this._state?this.stateBeforeCdata6(e):66===this._state?this.stateInHexEntity(e):65===this._state?this.stateInNumericEntity(e):63===this._state?Y(this,e):this.cbs.onerror(Error("unknown _state"),this._state),this._index++}this.cleanup()},e.prototype.finish=function(){this.sectionStart<this._index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.substr(this.sectionStart);29===this._state||30===this._state||31===this._state?this.cbs.oncdata(e):19===this._state||21===this._state||22===this._state?this.cbs.oncomment(e):64!==this._state||this.xmlMode?65!==this._state||this.xmlMode?66!==this._state||this.xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this.cbs.ontext(e):(this.decodeNumericEntity(3,16,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.decodeNumericEntity(2,10,!1),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData())):(this.parseLegacyEntity(),this.sectionStart<this._index&&(this._state=this.baseState,this.handleTrailingData()))},e.prototype.getSection=function(){return this.buffer.substring(this.sectionStart,this._index)},e.prototype.emitToken=function(e){this.cbs[e](this.getSection()),this.sectionStart=-1},e.prototype.emitPartial=function(e){1!==this.baseState?this.cbs.onattribdata(e):this.cbs.ontext(e)},e}();t.default=B},23719:function(e,t,n){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,n,s){void 0===s&&(s=n),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,s){void 0===s&&(s=n),e[s]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return i(t,e),t},r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||s(t,e,n)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RssHandler=t.DefaultHandler=t.DomUtils=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DomHandler=t.Parser=void 0;var l=n(50763);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=n(47915);function u(e,t){var n=new c.DomHandler(void 0,t);return new l.Parser(n,t).end(e),n.root}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return c.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return c.DomHandler}}),t.parseDocument=u,t.parseDOM=function(e,t){return u(e,t).children},t.createDomStream=function(e,t,n){var s=new c.DomHandler(e,t,n);return new l.Parser(s,t)};var d=n(39889);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return o(d).default}});var p=a(n(99960));t.ElementType=p,r(n(63870),t),t.DomUtils=a(n(89432));var h=n(63870);Object.defineProperty(t,"RssHandler",{enumerable:!0,get:function(){return h.FeedHandler}})},82584:(e,t,n)=>{"use strict";var s="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,i=n(21924)("Object.prototype.toString"),a=function(e){return!(s&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},r=function(e){return!!a(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},o=function(){return a(arguments)}();a.isLegacyArguments=r,e.exports=o?a:r},18923:e=>{"use strict";var t=Date.prototype.getDay,n=Object.prototype.toString,s="function"==typeof Symbol&&!!Symbol.toStringTag;e.exports=function(e){return"object"==typeof e&&null!==e&&(s?function(e){try{return t.call(e),!0}catch(e){return!1}}(e):"[object Date]"===n.call(e))}},98420:(e,t,n)=>{"use strict";var s,i,a,r,o=n(21924),l=n(55419)()&&!!Symbol.toStringTag;if(l){s=o("Object.prototype.hasOwnProperty"),i=o("RegExp.prototype.exec"),a={};var c=function(){throw a};r={toString:c,valueOf:c},"symbol"==typeof Symbol.toPrimitive&&(r[Symbol.toPrimitive]=c)}var u=o("Object.prototype.toString"),d=Object.getOwnPropertyDescriptor;e.exports=l?function(e){if(!e||"object"!=typeof e)return!1;var t=d(e,"lastIndex");if(!t||!s(t,"value"))return!1;try{i(e,r)}catch(e){return e===a}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===u(e)}},23059:(e,t)=>{t.klona=function e(t){if("object"!=typeof t)return t;var n,s,i=Object.prototype.toString.call(t);if("[object Object]"===i){if(t.constructor!==Object&&"function"==typeof t.constructor)for(n in s=new t.constructor,t)s.hasOwnProperty(n)&&s[n]!==t[n]&&(s[n]=e(t[n]));else for(n in s={},t)"__proto__"===n?Object.defineProperty(s,n,{value:e(t[n]),configurable:!0,enumerable:!0,writable:!0}):s[n]=e(t[n]);return s}if("[object Array]"===i){for(n=t.length,s=Array(n);n--;)s[n]=e(t[n]);return s}return"[object Set]"===i?(s=new Set,t.forEach((function(t){s.add(e(t))})),s):"[object Map]"===i?(s=new Map,t.forEach((function(t,n){s.set(e(n),e(t))})),s):"[object Date]"===i?new Date(+t):"[object RegExp]"===i?((s=new RegExp(t.source,t.flags)).lastIndex=t.lastIndex,s):"[object DataView]"===i?new t.constructor(e(t.buffer)):"[object ArrayBuffer]"===i?t.slice(0):"Array]"===i.slice(-6)?new t.constructor(t):t}},5559:(e,t,n)=>{e=n.nmd(e);var s="__lodash_hash_undefined__",i=9007199254740991,a="[object Arguments]",r="[object Array]",o="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",d="[object Map]",p="[object Number]",h="[object Object]",m="[object Promise]",f="[object RegExp]",g="[object Set]",b="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",_="[object DataView]",x=/^\[object .+?Constructor\]$/,S=/^(?:0|[1-9]\d*)$/,w={};w["[object Float32Array]"]=w["[object Float64Array]"]=w["[object Int8Array]"]=w["[object Int16Array]"]=w["[object Int32Array]"]=w["[object Uint8Array]"]=w["[object Uint8ClampedArray]"]=w["[object Uint16Array]"]=w["[object Uint32Array]"]=!0,w[a]=w[r]=w[y]=w[o]=w[_]=w[l]=w[c]=w[u]=w[d]=w[p]=w[h]=w[f]=w[g]=w[b]=w[v]=!1;var k="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,j="object"==typeof self&&self&&self.Object===Object&&self,T=k||j||Function("return this")(),C=t&&!t.nodeType&&t,D=C&&e&&!e.nodeType&&e,P=D&&D.exports===C&&k.process,I=function(){try{return P&&P.binding("util")}catch(e){}}(),O=I&&I.isTypedArray;function L(e,t){for(var n=-1,s=e?e.length:0;++n<s;)if(t(e[n],n,e))return!0;return!1}function M(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function A(e){var t=-1,n=Array(e.size);return e.forEach((function(e,s){n[++t]=[s,e]})),n}function E(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var U,R,N,F=Array.prototype,Y=Function.prototype,B=Object.prototype,H=T["__core-js_shared__"],V=(U=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+U:"",$=Y.toString,W=B.hasOwnProperty,z=B.toString,q=RegExp("^"+$.call(W).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),G=T.Symbol,K=T.Uint8Array,X=B.propertyIsEnumerable,Z=F.splice,J=(R=Object.keys,N=Object,function(e){return R(N(e))}),Q=xe(T,"DataView"),ee=xe(T,"Map"),te=xe(T,"Promise"),ne=xe(T,"Set"),se=xe(T,"WeakMap"),ie=xe(Object,"create"),ae=ke(Q),re=ke(ee),oe=ke(te),le=ke(ne),ce=ke(se),ue=G?G.prototype:void 0,de=ue?ue.valueOf:void 0;function pe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function he(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function me(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function fe(e){var t=-1,n=e?e.length:0;for(this.__data__=new me;++t<n;)this.add(e[t])}function ge(e){this.__data__=new he(e)}function be(e,t){for(var n=e.length;n--;)if(je(e[n][0],t))return n;return-1}function ve(e,t,n,s,i){return e===t||(null==e||null==t||!Ie(e)&&!Oe(t)?e!=e&&t!=t:function(e,t,n,s,i,u){var m=Te(e),v=Te(t),x=r,S=r;m||(x=(x=Se(e))==a?h:x),v||(S=(S=Se(t))==a?h:S);var w=x==h&&!M(e),k=S==h&&!M(t),j=x==S;if(j&&!w)return u||(u=new ge),m||Le(e)?ye(e,t,n,s,i,u):function(e,t,n,s,i,a,r){switch(n){case _:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!s(new K(e),new K(t)));case o:case l:case p:return je(+e,+t);case c:return e.name==t.name&&e.message==t.message;case f:case b:return e==t+"";case d:var u=A;case g:var h=2&a;if(u||(u=E),e.size!=t.size&&!h)return!1;var m=r.get(e);if(m)return m==t;a|=1,r.set(e,t);var v=ye(u(e),u(t),s,i,a,r);return r.delete(e),v;case"[object Symbol]":if(de)return de.call(e)==de.call(t)}return!1}(e,t,x,n,s,i,u);if(!(2&i)){var T=w&&W.call(e,"__wrapped__"),C=k&&W.call(t,"__wrapped__");if(T||C){var D=T?e.value():e,P=C?t.value():t;return u||(u=new ge),n(D,P,s,i,u)}}return!!j&&(u||(u=new ge),function(e,t,n,s,i,a){var r=2&i,o=Me(e),l=o.length;if(l!=Me(t).length&&!r)return!1;for(var c=l;c--;){var u=o[c];if(!(r?u in t:W.call(t,u)))return!1}var d=a.get(e);if(d&&a.get(t))return d==t;var p=!0;a.set(e,t),a.set(t,e);for(var h=r;++c<l;){var m=e[u=o[c]],f=t[u];if(s)var g=r?s(f,m,u,t,e,a):s(m,f,u,e,t,a);if(!(void 0===g?m===f||n(m,f,s,i,a):g)){p=!1;break}h||(h="constructor"==u)}if(p&&!h){var b=e.constructor,v=t.constructor;b==v||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof v&&v instanceof v||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,s,i,u))}(e,t,ve,n,s,i))}function ye(e,t,n,s,i,a){var r=2&i,o=e.length,l=t.length;if(o!=l&&!(r&&l>o))return!1;var c=a.get(e);if(c&&a.get(t))return c==t;var u=-1,d=!0,p=1&i?new fe:void 0;for(a.set(e,t),a.set(t,e);++u<o;){var h=e[u],m=t[u];if(s)var f=r?s(m,h,u,t,e,a):s(h,m,u,e,t,a);if(void 0!==f){if(f)continue;d=!1;break}if(p){if(!L(t,(function(e,t){if(!p.has(t)&&(h===e||n(h,e,s,i,a)))return p.add(t)}))){d=!1;break}}else if(h!==m&&!n(h,m,s,i,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function _e(e,t){var n,s,i=e.__data__;return("string"==(s=typeof(n=t))||"number"==s||"symbol"==s||"boolean"==s?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function xe(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ie(e)||function(e){return!!V&&V in e}(e))&&(De(e)||M(e)?q:x).test(ke(e))}(n)?n:void 0}pe.prototype.clear=function(){this.__data__=ie?ie(null):{}},pe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},pe.prototype.get=function(e){var t=this.__data__;if(ie){var n=t[e];return n===s?void 0:n}return W.call(t,e)?t[e]:void 0},pe.prototype.has=function(e){var t=this.__data__;return ie?void 0!==t[e]:W.call(t,e)},pe.prototype.set=function(e,t){return this.__data__[e]=ie&&void 0===t?s:t,this},he.prototype.clear=function(){this.__data__=[]},he.prototype.delete=function(e){var t=this.__data__,n=be(t,e);return!(n<0||(n==t.length-1?t.pop():Z.call(t,n,1),0))},he.prototype.get=function(e){var t=this.__data__,n=be(t,e);return n<0?void 0:t[n][1]},he.prototype.has=function(e){return be(this.__data__,e)>-1},he.prototype.set=function(e,t){var n=this.__data__,s=be(n,e);return s<0?n.push([e,t]):n[s][1]=t,this},me.prototype.clear=function(){this.__data__={hash:new pe,map:new(ee||he),string:new pe}},me.prototype.delete=function(e){return _e(this,e).delete(e)},me.prototype.get=function(e){return _e(this,e).get(e)},me.prototype.has=function(e){return _e(this,e).has(e)},me.prototype.set=function(e,t){return _e(this,e).set(e,t),this},fe.prototype.add=fe.prototype.push=function(e){return this.__data__.set(e,s),this},fe.prototype.has=function(e){return this.__data__.has(e)},ge.prototype.clear=function(){this.__data__=new he},ge.prototype.delete=function(e){return this.__data__.delete(e)},ge.prototype.get=function(e){return this.__data__.get(e)},ge.prototype.has=function(e){return this.__data__.has(e)},ge.prototype.set=function(e,t){var n=this.__data__;if(n instanceof he){var s=n.__data__;if(!ee||s.length<199)return s.push([e,t]),this;n=this.__data__=new me(s)}return n.set(e,t),this};var Se=function(e){return z.call(e)};function we(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||S.test(e))&&e>-1&&e%1==0&&e<t}function ke(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function je(e,t){return e===t||e!=e&&t!=t}(Q&&Se(new Q(new ArrayBuffer(1)))!=_||ee&&Se(new ee)!=d||te&&Se(te.resolve())!=m||ne&&Se(new ne)!=g||se&&Se(new se)!=v)&&(Se=function(e){var t=z.call(e),n=t==h?e.constructor:void 0,s=n?ke(n):void 0;if(s)switch(s){case ae:return _;case re:return d;case oe:return m;case le:return g;case ce:return v}return t});var Te=Array.isArray;function Ce(e){return null!=e&&Pe(e.length)&&!De(e)}function De(e){var t=Ie(e)?z.call(e):"";return t==u||"[object GeneratorFunction]"==t}function Pe(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function Ie(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Oe(e){return!!e&&"object"==typeof e}var Le=O?function(e){return function(t){return e(t)}}(O):function(e){return Oe(e)&&Pe(e.length)&&!!w[z.call(e)]};function Me(e){return Ce(e)?function(e,t){var n=Te(e)||function(e){return function(e){return Oe(e)&&Ce(e)}(e)&&W.call(e,"callee")&&(!X.call(e,"callee")||z.call(e)==a)}(e)?function(e,t){for(var n=-1,s=Array(e);++n<e;)s[n]=t(n);return s}(e.length,String):[],s=n.length,i=!!s;for(var r in e)!t&&!W.call(e,r)||i&&("length"==r||we(r,s))||n.push(r);return n}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||B))return J(e);var t,n,s=[];for(var i in Object(e))W.call(e,i)&&"constructor"!=i&&s.push(i);return s}(e)}e.exports=function(e,t,n){var s=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===s?ve(e,t,n):!!s}},70942:function(e,t,n){"use strict";const s=n(49727),{hasOwnProperty:i}=Object.prototype,{propertyIsEnumerable:a}=Object,r=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}),o=this,l={concatArrays:!1,ignoreUndefined:!1},c=e=>{const t=[];for(const n in e)i.call(e,n)&&t.push(n);if(Object.getOwnPropertySymbols){const n=Object.getOwnPropertySymbols(e);for(const s of n)a.call(e,s)&&t.push(s)}return t};function u(e){return Array.isArray(e)?function(e){const t=e.slice(0,0);return c(e).forEach((n=>{r(t,n,u(e[n]))})),t}(e):s(e)?function(e){const t=null===Object.getPrototypeOf(e)?Object.create(null):{};return c(e).forEach((n=>{r(t,n,u(e[n]))})),t}(e):e}const d=(e,t,n,s)=>(n.forEach((n=>{void 0===t[n]&&s.ignoreUndefined||(n in e&&e[n]!==Object.getPrototypeOf(e)?r(e,n,p(e[n],t[n],s)):r(e,n,u(t[n])))})),e);function p(e,t,n){return n.concatArrays&&Array.isArray(e)&&Array.isArray(t)?((e,t,n)=>{let s=e.slice(0,0),a=0;return[e,t].forEach((t=>{const o=[];for(let n=0;n<t.length;n++)i.call(t,n)&&(o.push(String(n)),r(s,a++,t===e?t[n]:u(t[n])));s=d(s,t,c(t).filter((e=>!o.includes(e))),n)})),s})(e,t,n):s(t)&&s(e)?d(e,t,c(t),n):u(t)}e.exports=function(...e){const t=p(u(l),this!==o&&this||{},l);let n={_:{}};for(const i of e)if(void 0!==i){if(!s(i))throw new TypeError("`"+i+"` is not an Option Object");n=p(n,{_:i},t)}return n._}},49727:e=>{"use strict";e.exports=e=>{if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}},42786:function(e,t,n){!function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(30381))},14130:function(e,t,n){!function(e){"use strict";var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(s,i,a,r){var o=t(s),l=n[e][t(s)];return 2===o&&(l=l[i?0:1]),l.replace(/%d/i,s)}},i=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(n(30381))},96135:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(n(30381))},56440:function(e,t,n){!function(e){"use strict";var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},s={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,a,r){var o=n(t),l=s[e][n(t)];return 2===o&&(l=l[i?0:1]),l.replace(/%d/i,t)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(30381))},47702:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(30381))},16040:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(n(30381))},37100:function(e,t,n){!function(e){"use strict";e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(n(30381))},30867:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,n,a,r){var o=s(t),l=i[e][s(t)];return 2===o&&(l=l[n?0:1]),l.replace(/%d/i,t)}},r=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(30381))},31083:function(e,t,n){!function(e){"use strict";var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(30381))},9808:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(s=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),s%10==1&&s%100!=11?i[0]:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?i[1]:i[2]);var s,i}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(n(30381))},68338:function(e,t,n){!function(e){"use strict";e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(30381))},67438:function(e,t,n){!function(e){"use strict";e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(n(30381))},76225:function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})}(n(30381))},8905:function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(n(30381))},11560:function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(n(30381))},1278:function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){return e>9?n(e%10):e}var s=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],i=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,a=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:a,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:a,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(n(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}})}(n(30381))},80622:function(e,t,n){!function(e){"use strict";function t(e,t,n){var s=e+" ";switch(n){case"ss":return s+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return s+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return s+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return s+(1===e?"dan":"dana");case"MM":return s+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return s+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},2468:function(e,t,n){!function(e){"use strict";e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(30381))},5822:function(e,t,n){!function(e){"use strict";var t="leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),s=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function a(e){return e>1&&e<5&&1!=~~(e/10)}function r(e,t,n,s){var i=e+" ";switch(n){case"s":return t||s?"pár sekund":"pár sekundami";case"ss":return t||s?i+(a(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":s?"minutu":"minutou";case"mm":return t||s?i+(a(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":s?"hodinu":"hodinou";case"hh":return t||s?i+(a(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||s?"den":"dnem";case"dd":return t||s?i+(a(e)?"dny":"dní"):i+"dny";case"M":return t||s?"měsíc":"měsícem";case"MM":return t||s?i+(a(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||s?"rok":"rokem";case"yy":return t||s?i+(a(e)?"roky":"let"):i+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},50877:function(e,t,n){!function(e){"use strict";e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(n(30381))},47373:function(e,t,n){!function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n(30381))},24780:function(e,t,n){!function(e){"use strict";e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},60217:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},60894:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},59740:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},5300:function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(n(30381))},50837:function(e,t,n){!function(e){"use strict";e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){return 6===this.day()?"[το προηγούμενο] dddd [{}] LT":"[την προηγούμενη] dddd [{}] LT"},sameElse:"L"},calendar:function(e,t){var n,s=this._calendarEl[e],i=t&&t.hours();return n=s,("undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(s=s.apply(t)),s.replace("{}",i%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(n(30381))},78348:function(e,t,n){!function(e){"use strict";e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n(30381))},77925:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(30381))},22243:function(e,t,n){!function(e){"use strict";e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(30381))},46436:function(e,t,n){!function(e){"use strict";e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(30381))},47207:function(e,t,n){!function(e){"use strict";e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(30381))},44175:function(e,t,n){!function(e){"use strict";e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n(30381))},76319:function(e,t,n){!function(e){"use strict";e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(30381))},31662:function(e,t,n){!function(e){"use strict";e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(30381))},92915:function(e,t,n){!function(e){"use strict";e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(n(30381))},55251:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(30381))},96112:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(n(30381))},71146:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(n(30381))},55655:function(e,t,n){!function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(n(30381))},5603:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:s?i[n][0]:i[n][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},77763:function(e,t,n){!function(e){"use strict";e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},76959:function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(n(30381))},11897:function(e,t,n){!function(e){"use strict";var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function s(e,s,i,a){var r="";switch(i){case"s":return a?"muutaman sekunnin":"muutama sekunti";case"ss":r=a?"sekunnin":"sekuntia";break;case"m":return a?"minuutin":"minuutti";case"mm":r=a?"minuutin":"minuuttia";break;case"h":return a?"tunnin":"tunti";case"hh":r=a?"tunnin":"tuntia";break;case"d":return a?"päivän":"päivä";case"dd":r=a?"päivän":"päivää";break;case"M":return a?"kuukauden":"kuukausi";case"MM":r=a?"kuukauden":"kuukautta";break;case"y":return a?"vuoden":"vuosi";case"yy":r=a?"vuoden":"vuotta"}return function(e,s){return e<10?s?n[e]:t[e]:e}(e,a)+" "+r}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},42549:function(e,t,n){!function(e){"use strict";e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(30381))},94694:function(e,t,n){!function(e){"use strict";e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},63049:function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(n(30381))},52330:function(e,t,n){!function(e){"use strict";e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(30381))},94470:function(e,t,n){!function(e){"use strict";var t=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(n(30381))},5044:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(30381))},29295:function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(30381))},2101:function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(30381))},38794:function(e,t,n){!function(e){"use strict";e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(30381))},27884:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return s?i[n][0]:i[n][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){return"D"===t?e+"वेर":e},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(n(30381))},23168:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return s?i[n][0]:i[n][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){return"D"===t?e+"er":e},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(n(30381))},95349:function(e,t,n){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(n(30381))},24206:function(e,t,n){!function(e){"use strict";e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(30381))},30094:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},s=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i];e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:s,longMonthsParse:s,shortMonthsParse:[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(n(30381))},30316:function(e,t,n){!function(e){"use strict";function t(e,t,n){var s=e+" ";switch(n){case"ss":return s+(1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi");case"m":return t?"jedna minuta":"jedne minute";case"mm":return s+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return s+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return s+(1===e?"dan":"dana");case"MM":return s+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return s+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},22138:function(e,t,n){!function(e){"use strict";var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,s){var i=e;switch(n){case"s":return s||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(s||t)?" másodperc":" másodperce";case"m":return"egy"+(s||t?" perc":" perce");case"mm":return i+(s||t?" perc":" perce");case"h":return"egy"+(s||t?" óra":" órája");case"hh":return i+(s||t?" óra":" órája");case"d":return"egy"+(s||t?" nap":" napja");case"dd":return i+(s||t?" nap":" napja");case"M":return"egy"+(s||t?" hónap":" hónapja");case"MM":return i+(s||t?" hónap":" hónapja");case"y":return"egy"+(s||t?" év":" éve");case"yy":return i+(s||t?" év":" éve")}return""}function s(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return s.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return s.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},11423:function(e,t,n){!function(e){"use strict";e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(n(30381))},29218:function(e,t,n){!function(e){"use strict";e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(n(30381))},90135:function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,s,i){var a=e+" ";switch(s){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?a+(n||i?"sekúndur":"sekúndum"):a+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?a+(n||i?"mínútur":"mínútum"):n?a+"mínúta":a+"mínútu";case"hh":return t(e)?a+(n||i?"klukkustundir":"klukkustundum"):a+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?a+"dagar":a+(i?"daga":"dögum"):n?a+"dagur":a+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?a+"mánuðir":a+(i?"mánuði":"mánuðum"):n?a+"mánuður":a+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?a+(n||i?"ár":"árum"):a+(n||i?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},10150:function(e,t,n){!function(e){"use strict";e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[lo scorso] dddd [alle] LT"},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(30381))},90626:function(e,t,n){!function(e){"use strict";e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(30381))},39183:function(e,t,n){!function(e){"use strict";e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(n(30381))},24286:function(e,t,n){!function(e){"use strict";e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(n(30381))},12105:function(e,t,n){!function(e){"use strict";e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(n(30381))},47772:function(e,t,n){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(30381))},18758:function(e,t,n){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(30381))},79282:function(e,t,n){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(n(30381))},33730:function(e,t,n){!function(e){"use strict";e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}})}(n(30381))},1408:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},s=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:s,monthsShort:s,weekdays:"یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه".split("_"),weekdaysShort:"یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره|بهیانی/,isPM:function(e){return/ئێواره/.test(e)},meridiem:function(e,t,n){return e<12?"بهیانی":"ئێواره"},calendar:{sameDay:"[ئهمرۆ كاتژمێر] LT",nextDay:"[بهیانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له %s",past:"%s",s:"چهند چركهیهك",ss:"چركه %d",m:"یهك خولهك",mm:"%d خولهك",h:"یهك كاتژمێر",hh:"%d كاتژمێر",d:"یهك ڕۆژ",dd:"%d ڕۆژ",M:"یهك مانگ",MM:"%d مانگ",y:"یهك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(n(30381))},33291:function(e,t,n){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(30381))},36841:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},55466:function(e,t,n){!function(e){"use strict";e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(n(30381))},57010:function(e,t,n){!function(e){"use strict";var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,s){return t?i(n)[0]:s?i(n)[1]:i(n)[2]}function s(e){return e%10==0||e>10&&e<20}function i(e){return t[e].split("_")}function a(e,t,a,r){var o=e+" ";return 1===e?o+n(0,t,a[0],r):t?o+(s(e)?i(a)[1]:i(a)[0]):r?o+i(a)[1]:o+(s(e)?i(a)[1]:i(a)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,n,s){return t?"kelios sekundės":s?"kelių sekundžių":"kelias sekundes"},ss:a,m:n,mm:a,h:n,hh:a,d:n,dd:a,M:n,MM:a,y:n,yy:a},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(30381))},37595:function(e,t,n){!function(e){"use strict";var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function s(e,s,i){return e+" "+n(t[i],e,s)}function i(e,s,i){return n(t[i],e,s)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:s,m:i,mm:s,h:i,hh:s,d:i,dd:s,M:i,MM:s,y:i,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},39861:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,s){var i=t.words[s];return 1===s.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},35493:function(e,t,n){!function(e){"use strict";e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(30381))},95966:function(e,t,n){!function(e){"use strict";e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(n(30381))},87341:function(e,t,n){!function(e){"use strict";e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(n(30381))},5115:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(n(30381))},10370:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function s(e,t,n,s){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे"}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां"}return i.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(n(30381))},41237:function(e,t,n){!function(e){"use strict";e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(30381))},9847:function(e,t,n){!function(e){"use strict";e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(n(30381))},72126:function(e,t,n){!function(e){"use strict";e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(30381))},56165:function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(n(30381))},64924:function(e,t,n){!function(e){"use strict";e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},16744:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(n(30381))},59814:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(30381))},93901:function(e,t,n){!function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(n(30381))},83877:function(e,t,n){!function(e){"use strict";e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},92135:function(e,t,n){!function(e){"use strict";e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}})}(n(30381))},15858:function(e,t,n){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(n(30381))},64495:function(e,t,n){!function(e){"use strict";var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),s=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function a(e,t,n){var s=e+" ";switch(n){case"ss":return s+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return s+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return s+(i(e)?"godziny":"godzin");case"ww":return s+(i(e)?"tygodnie":"tygodni");case"MM":return s+(i(e)?"miesiące":"miesięcy");case"yy":return s+(i(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,s){return e?/D MMMM/.test(s)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:a,m:a,mm:a,h:a,hh:a,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:a,M:"miesiąc",MM:a,y:"rok",yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},57971:function(e,t,n){!function(e){"use strict";e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(n(30381))},89520:function(e,t,n){!function(e){"use strict";e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(n(30381))},96459:function(e,t,n){!function(e){"use strict";function t(e,t,n){var s=" ";return(e%100>=20||e>=100&&e%100==0)&&(s=" de "),e+s+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[n]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(n(30381))},21793:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"минута":"минуту":e+" "+(s=+e,i={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),s%10==1&&s%100!=11?i[0]:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?i[1]:i[2]);var s,i}var n=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(n(30381))},40950:function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(30381))},10490:function(e,t,n){!function(e){"use strict";e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},90124:function(e,t,n){!function(e){"use strict";e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}})}(n(30381))},64249:function(e,t,n){!function(e){"use strict";var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function s(e){return e>1&&e<5}function i(e,t,n,i){var a=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?a+(s(e)?"sekundy":"sekúnd"):a+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?a+(s(e)?"minúty":"minút"):a+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?a+(s(e)?"hodiny":"hodín"):a+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?a+(s(e)?"dni":"dní"):a+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?a+(s(e)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?a+(s(e)?"roky":"rokov"):a+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:case 4:case 5:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},14985:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i=e+" ";switch(n){case"s":return t||s?"nekaj sekund":"nekaj sekundami";case"ss":return i+(1===e?t?"sekundo":"sekundi":2===e?t||s?"sekundi":"sekundah":e<5?t||s?"sekunde":"sekundah":"sekund");case"m":return t?"ena minuta":"eno minuto";case"mm":return i+(1===e?t?"minuta":"minuto":2===e?t||s?"minuti":"minutama":e<5?t||s?"minute":"minutami":t||s?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return i+(1===e?t?"ura":"uro":2===e?t||s?"uri":"urama":e<5?t||s?"ure":"urami":t||s?"ur":"urami");case"d":return t||s?"en dan":"enim dnem";case"dd":return i+(1===e?t||s?"dan":"dnem":2===e?t||s?"dni":"dnevoma":t||s?"dni":"dnevi");case"M":return t||s?"en mesec":"enim mesecem";case"MM":return i+(1===e?t||s?"mesec":"mesecem":2===e?t||s?"meseca":"mesecema":e<5?t||s?"mesece":"meseci":t||s?"mesecev":"meseci");case"y":return t||s?"eno leto":"enim letom";case"yy":return i+(1===e?t||s?"leto":"letom":2===e?t||s?"leti":"letoma":e<5?t||s?"leta":"leti":t||s?"let":"leti")}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},51104:function(e,t,n){!function(e){"use strict";e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},79915:function(e,t,n){!function(e){"use strict";var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,s){var i=t.words[s];return 1===s.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"дан",dd:t.translate,M:"месец",MM:t.translate,y:"годину",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},49131:function(e,t,n){!function(e){"use strict";var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,s){var i=t.words[s];return 1===s.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(n(30381))},95606:function(e,t,n){!function(e){"use strict";e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(n(30381))},98760:function(e,t,n){!function(e){"use strict";e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n(30381))},91172:function(e,t,n){!function(e){"use strict";e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(n(30381))},27333:function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(n(30381))},23110:function(e,t,n){!function(e){"use strict";e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(n(30381))},52095:function(e,t,n){!function(e){"use strict";e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(30381))},27321:function(e,t,n){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(30381))},9041:function(e,t,n){!function(e){"use strict";e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(n(30381))},19005:function(e,t,n){!function(e){"use strict";var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var s=e%10;return e+(t[s]||t[e%100-s]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(30381))},75768:function(e,t,n){!function(e){"use strict";e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(30381))},89444:function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,s,i){var a=function(e){var n=Math.floor(e%1e3/100),s=Math.floor(e%100/10),i=e%10,a="";return n>0&&(a+=t[n]+"vatlh"),s>0&&(a+=(""!==a?" ":"")+t[s]+"maH"),i>0&&(a+=(""!==a?" ":"")+t[i]),""===a?"pagh":a}(e);switch(s){case"ss":return a+" lup";case"mm":return a+" tup";case"hh":return a+" rep";case"dd":return a+" jaj";case"MM":return a+" jar";case"yy":return a+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},72397:function(e,t,n){!function(e){"use strict";var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var s=e%10;return e+(t[s]||t[e%100-s]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(30381))},28254:function(e,t,n){!function(e){"use strict";function t(e,t,n,s){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return s||t?i[n][0]:i[n][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(30381))},30699:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(n(30381))},51106:function(e,t,n){!function(e){"use strict";e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(n(30381))},9288:function(e,t,n){!function(e){"use strict";e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var s=100*e+t;return s<600?"يېرىم كېچە":s<900?"سەھەر":s<1130?"چۈشتىن بۇرۇن":s<1230?"چۈش":s<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(n(30381))},67691:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(s=+e,i={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),s%10==1&&s%100!=11?i[0]:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?i[1]:i[2]);var s,i}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(n(30381))},13795:function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(n(30381))},60588:function(e,t,n){!function(e){"use strict";e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(n(30381))},6791:function(e,t,n){!function(e){"use strict";e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(n(30381))},65666:function(e,t,n){!function(e){"use strict";e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(n(30381))},14378:function(e,t,n){!function(e){"use strict";e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(30381))},75805:function(e,t,n){!function(e){"use strict";e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(n(30381))},83839:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(n(30381))},55726:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1200?"上午":1200===s?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(30381))},99807:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(30381))},74152:function(e,t,n){!function(e){"use strict";e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var s=100*e+t;return s<600?"凌晨":s<900?"早上":s<1130?"上午":s<1230?"中午":s<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(n(30381))},46700:(e,t,n)=>{var s={"./af":42786,"./af.js":42786,"./ar":30867,"./ar-dz":14130,"./ar-dz.js":14130,"./ar-kw":96135,"./ar-kw.js":96135,"./ar-ly":56440,"./ar-ly.js":56440,"./ar-ma":47702,"./ar-ma.js":47702,"./ar-sa":16040,"./ar-sa.js":16040,"./ar-tn":37100,"./ar-tn.js":37100,"./ar.js":30867,"./az":31083,"./az.js":31083,"./be":9808,"./be.js":9808,"./bg":68338,"./bg.js":68338,"./bm":67438,"./bm.js":67438,"./bn":8905,"./bn-bd":76225,"./bn-bd.js":76225,"./bn.js":8905,"./bo":11560,"./bo.js":11560,"./br":1278,"./br.js":1278,"./bs":80622,"./bs.js":80622,"./ca":2468,"./ca.js":2468,"./cs":5822,"./cs.js":5822,"./cv":50877,"./cv.js":50877,"./cy":47373,"./cy.js":47373,"./da":24780,"./da.js":24780,"./de":59740,"./de-at":60217,"./de-at.js":60217,"./de-ch":60894,"./de-ch.js":60894,"./de.js":59740,"./dv":5300,"./dv.js":5300,"./el":50837,"./el.js":50837,"./en-au":78348,"./en-au.js":78348,"./en-ca":77925,"./en-ca.js":77925,"./en-gb":22243,"./en-gb.js":22243,"./en-ie":46436,"./en-ie.js":46436,"./en-il":47207,"./en-il.js":47207,"./en-in":44175,"./en-in.js":44175,"./en-nz":76319,"./en-nz.js":76319,"./en-sg":31662,"./en-sg.js":31662,"./eo":92915,"./eo.js":92915,"./es":55655,"./es-do":55251,"./es-do.js":55251,"./es-mx":96112,"./es-mx.js":96112,"./es-us":71146,"./es-us.js":71146,"./es.js":55655,"./et":5603,"./et.js":5603,"./eu":77763,"./eu.js":77763,"./fa":76959,"./fa.js":76959,"./fi":11897,"./fi.js":11897,"./fil":42549,"./fil.js":42549,"./fo":94694,"./fo.js":94694,"./fr":94470,"./fr-ca":63049,"./fr-ca.js":63049,"./fr-ch":52330,"./fr-ch.js":52330,"./fr.js":94470,"./fy":5044,"./fy.js":5044,"./ga":29295,"./ga.js":29295,"./gd":2101,"./gd.js":2101,"./gl":38794,"./gl.js":38794,"./gom-deva":27884,"./gom-deva.js":27884,"./gom-latn":23168,"./gom-latn.js":23168,"./gu":95349,"./gu.js":95349,"./he":24206,"./he.js":24206,"./hi":30094,"./hi.js":30094,"./hr":30316,"./hr.js":30316,"./hu":22138,"./hu.js":22138,"./hy-am":11423,"./hy-am.js":11423,"./id":29218,"./id.js":29218,"./is":90135,"./is.js":90135,"./it":90626,"./it-ch":10150,"./it-ch.js":10150,"./it.js":90626,"./ja":39183,"./ja.js":39183,"./jv":24286,"./jv.js":24286,"./ka":12105,"./ka.js":12105,"./kk":47772,"./kk.js":47772,"./km":18758,"./km.js":18758,"./kn":79282,"./kn.js":79282,"./ko":33730,"./ko.js":33730,"./ku":1408,"./ku.js":1408,"./ky":33291,"./ky.js":33291,"./lb":36841,"./lb.js":36841,"./lo":55466,"./lo.js":55466,"./lt":57010,"./lt.js":57010,"./lv":37595,"./lv.js":37595,"./me":39861,"./me.js":39861,"./mi":35493,"./mi.js":35493,"./mk":95966,"./mk.js":95966,"./ml":87341,"./ml.js":87341,"./mn":5115,"./mn.js":5115,"./mr":10370,"./mr.js":10370,"./ms":9847,"./ms-my":41237,"./ms-my.js":41237,"./ms.js":9847,"./mt":72126,"./mt.js":72126,"./my":56165,"./my.js":56165,"./nb":64924,"./nb.js":64924,"./ne":16744,"./ne.js":16744,"./nl":93901,"./nl-be":59814,"./nl-be.js":59814,"./nl.js":93901,"./nn":83877,"./nn.js":83877,"./oc-lnc":92135,"./oc-lnc.js":92135,"./pa-in":15858,"./pa-in.js":15858,"./pl":64495,"./pl.js":64495,"./pt":89520,"./pt-br":57971,"./pt-br.js":57971,"./pt.js":89520,"./ro":96459,"./ro.js":96459,"./ru":21793,"./ru.js":21793,"./sd":40950,"./sd.js":40950,"./se":10490,"./se.js":10490,"./si":90124,"./si.js":90124,"./sk":64249,"./sk.js":64249,"./sl":14985,"./sl.js":14985,"./sq":51104,"./sq.js":51104,"./sr":49131,"./sr-cyrl":79915,"./sr-cyrl.js":79915,"./sr.js":49131,"./ss":95606,"./ss.js":95606,"./sv":98760,"./sv.js":98760,"./sw":91172,"./sw.js":91172,"./ta":27333,"./ta.js":27333,"./te":23110,"./te.js":23110,"./tet":52095,"./tet.js":52095,"./tg":27321,"./tg.js":27321,"./th":9041,"./th.js":9041,"./tk":19005,"./tk.js":19005,"./tl-ph":75768,"./tl-ph.js":75768,"./tlh":89444,"./tlh.js":89444,"./tr":72397,"./tr.js":72397,"./tzl":28254,"./tzl.js":28254,"./tzm":51106,"./tzm-latn":30699,"./tzm-latn.js":30699,"./tzm.js":51106,"./ug-cn":9288,"./ug-cn.js":9288,"./uk":67691,"./uk.js":67691,"./ur":13795,"./ur.js":13795,"./uz":6791,"./uz-latn":60588,"./uz-latn.js":60588,"./uz.js":6791,"./vi":65666,"./vi.js":65666,"./x-pseudo":14378,"./x-pseudo.js":14378,"./yo":75805,"./yo.js":75805,"./zh-cn":83839,"./zh-cn.js":83839,"./zh-hk":55726,"./zh-hk.js":55726,"./zh-mo":99807,"./zh-mo.js":99807,"./zh-tw":74152,"./zh-tw.js":74152};function i(e){var t=a(e);return n(t)}function a(e){if(!n.o(s,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return s[e]}i.keys=function(){return Object.keys(s)},i.resolve=a,e.exports=i,i.id=46700},30381:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,s;function i(){return t.apply(null,arguments)}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,s=[];for(n=0;n<e.length;++n)s.push(t(e[n],n));return s}function h(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,s){return jt(e,t,n,s,!0).utc()}function f(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=f(e),n=s.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i}return e._isValid}function b(e){var t=m(NaN);return null!=e?h(f(t),e):f(t).userInvalidated=!0,t}s=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),s=n.length>>>0;for(t=0;t<s;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=i.momentProperties=[],y=!1;function _(e,t){var n,s,i;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=f(t)),c(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)c(i=t[s=v[n]])||(e[s]=i);return e}function x(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function S(e){return e instanceof x||null!=e&&null!=e._isAMomentObject}function w(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function k(e,t){var n=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var s,a,r,l=[];for(a=0;a<arguments.length;a++){if(s="","object"==typeof arguments[a]){for(r in s+="\n["+a+"] ",arguments[0])o(arguments[0],r)&&(s+=r+": "+arguments[0][r]+", ");s=s.slice(0,-2)}else s=arguments[a];l.push(s)}w(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var j,T={};function C(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),T[e]||(w(t),T[e]=!0)}function D(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function P(e,t){var n,s=h({},e);for(n in t)o(t,n)&&(r(e[n])&&r(t[n])?(s[n]={},h(s[n],e[n]),h(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)o(e,n)&&!o(t,n)&&r(e[n])&&(s[n]=h({},s[n]));return s}function I(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,j=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};function O(e,t,n){var s=""+Math.abs(e),i=t-s.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var L=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,M=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,A={},E={};function U(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(E[e]=i),t&&(E[t[0]]=function(){return O(i.apply(this,arguments),t[1],t[2])}),n&&(E[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function R(e,t){return e.isValid()?(t=N(t,e.localeData()),A[t]=A[t]||function(e){var t,n,s,i=e.match(L);for(t=0,n=i.length;t<n;t++)E[i[t]]?i[t]=E[i[t]]:i[t]=(s=i[t]).match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"");return function(t){var s,a="";for(s=0;s<n;s++)a+=D(i[s])?i[s].call(t,e):i[s];return a}}(t),A[t](e)):e.localeData().invalidDate()}function N(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(M.lastIndex=0;n>=0&&M.test(e);)e=e.replace(M,s),M.lastIndex=0,n-=1;return e}var F={};function Y(e,t){var n=e.toLowerCase();F[n]=F[n+"s"]=F[t]=e}function B(e){return"string"==typeof e?F[e]||F[e.toLowerCase()]:void 0}function H(e){var t,n,s={};for(n in e)o(e,n)&&(t=B(n))&&(s[t]=e[n]);return s}var V={};function $(e,t){V[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function z(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function q(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=z(t)),n}function G(e,t){return function(n){return null!=n?(X(this,e,n),i.updateOffset(this,t),this):K(this,e)}}function K(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function X(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(n=q(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Se(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var Z,J=/\d/,Q=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,se=/\d\d?/,ie=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,re=/\d{1,3}/,oe=/\d{1,4}/,le=/[+-]?\d{1,6}/,ce=/\d+/,ue=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,pe=/Z|[+-]\d\d(?::?\d\d)?/gi,he=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function me(e,t,n){Z[e]=D(t)?t:function(e,s){return e&&n?n:t}}function fe(e,t){return o(Z,e)?Z[e](t._strict,t._locale):new RegExp(ge(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,s,i){return t||n||s||i}))))}function ge(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Z={};var be={};function ve(e,t){var n,s=t;for("string"==typeof e&&(e=[e]),u(t)&&(s=function(e,n){n[t]=q(e)}),n=0;n<e.length;n++)be[e[n]]=s}function ye(e,t){ve(e,(function(e,n,s,i){s._w=s._w||{},t(e,s._w,s,i)}))}function _e(e,t,n){null!=t&&o(be,e)&&be[e](t,n._a,n,e)}var xe;function Se(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?W(e)?29:28:31-s%7%2}xe=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},U("M",["MM",2],"Mo",(function(){return this.month()+1})),U("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),U("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Y("month","M"),$("month",8),me("M",se),me("MM",se,Q),me("MMM",(function(e,t){return t.monthsShortRegex(e)})),me("MMMM",(function(e,t){return t.monthsRegex(e)})),ve(["M","MM"],(function(e,t){t[1]=q(e)-1})),ve(["MMM","MMMM"],(function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[1]=i:f(n).invalidMonth=e}));var we="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ke="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),je=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Te=he,Ce=he;function De(e,t,n){var s,i,a,r=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)a=m([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=xe.call(this._shortMonthsParse,r))?i:null:-1!==(i=xe.call(this._longMonthsParse,r))?i:null:"MMM"===t?-1!==(i=xe.call(this._shortMonthsParse,r))||-1!==(i=xe.call(this._longMonthsParse,r))?i:null:-1!==(i=xe.call(this._longMonthsParse,r))||-1!==(i=xe.call(this._shortMonthsParse,r))?i:null}function Pe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=q(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Se(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ie(e){return null!=e?(Pe(this,e),i.updateOffset(this,!0),this):K(this,"Month")}function Oe(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],a=[];for(t=0;t<12;t++)n=m([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),a.sort(e),t=0;t<12;t++)s[t]=ge(s[t]),i[t]=ge(i[t]);for(t=0;t<24;t++)a[t]=ge(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Le(e){return W(e)?366:365}U("Y",0,0,(function(){var e=this.year();return e<=9999?O(e,4):"+"+e})),U(0,["YY",2],0,(function(){return this.year()%100})),U(0,["YYYY",4],0,"year"),U(0,["YYYYY",5],0,"year"),U(0,["YYYYYY",6,!0],0,"year"),Y("year","y"),$("year",1),me("Y",ue),me("YY",se,Q),me("YYYY",oe,te),me("YYYYY",le,ne),me("YYYYYY",le,ne),ve(["YYYYY","YYYYYY"],0),ve("YYYY",(function(e,t){t[0]=2===e.length?i.parseTwoDigitYear(e):q(e)})),ve("YY",(function(e,t){t[0]=i.parseTwoDigitYear(e)})),ve("Y",(function(e,t){t[0]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return q(e)+(q(e)>68?1900:2e3)};var Me=G("FullYear",!0);function Ae(e,t,n,s,i,a,r){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,s,i,a,r),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,a,r),o}function Ee(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ue(e,t,n){var s=7+t-n;return-(7+Ee(e,0,s).getUTCDay()-t)%7+s-1}function Re(e,t,n,s,i){var a,r,o=1+7*(t-1)+(7+n-s)%7+Ue(e,s,i);return o<=0?r=Le(a=e-1)+o:o>Le(e)?(a=e+1,r=o-Le(e)):(a=e,r=o),{year:a,dayOfYear:r}}function Ne(e,t,n){var s,i,a=Ue(e.year(),t,n),r=Math.floor((e.dayOfYear()-a-1)/7)+1;return r<1?s=r+Fe(i=e.year()-1,t,n):r>Fe(e.year(),t,n)?(s=r-Fe(e.year(),t,n),i=e.year()+1):(i=e.year(),s=r),{week:s,year:i}}function Fe(e,t,n){var s=Ue(e,t,n),i=Ue(e+1,t,n);return(Le(e)-s+i)/7}U("w",["ww",2],"wo","week"),U("W",["WW",2],"Wo","isoWeek"),Y("week","w"),Y("isoWeek","W"),$("week",5),$("isoWeek",5),me("w",se),me("ww",se,Q),me("W",se),me("WW",se,Q),ye(["w","ww","W","WW"],(function(e,t,n,s){t[s.substr(0,1)]=q(e)}));function Ye(e,t){return e.slice(t,7).concat(e.slice(0,t))}U("d",0,"do","day"),U("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),U("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),U("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),U("e",0,0,"weekday"),U("E",0,0,"isoWeekday"),Y("day","d"),Y("weekday","e"),Y("isoWeekday","E"),$("day",11),$("weekday",11),$("isoWeekday",11),me("d",se),me("e",se),me("E",se),me("dd",(function(e,t){return t.weekdaysMinRegex(e)})),me("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),me("dddd",(function(e,t){return t.weekdaysRegex(e)})),ye(["dd","ddd","dddd"],(function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:f(n).invalidWeekday=e})),ye(["d","e","E"],(function(e,t,n,s){t[s]=q(e)}));var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),He="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ve="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$e=he,We=he,ze=he;function qe(e,t,n){var s,i,a,r=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)a=m([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=xe.call(this._weekdaysParse,r))?i:null:"ddd"===t?-1!==(i=xe.call(this._shortWeekdaysParse,r))?i:null:-1!==(i=xe.call(this._minWeekdaysParse,r))?i:null:"dddd"===t?-1!==(i=xe.call(this._weekdaysParse,r))||-1!==(i=xe.call(this._shortWeekdaysParse,r))||-1!==(i=xe.call(this._minWeekdaysParse,r))?i:null:"ddd"===t?-1!==(i=xe.call(this._shortWeekdaysParse,r))||-1!==(i=xe.call(this._weekdaysParse,r))||-1!==(i=xe.call(this._minWeekdaysParse,r))?i:null:-1!==(i=xe.call(this._minWeekdaysParse,r))||-1!==(i=xe.call(this._weekdaysParse,r))||-1!==(i=xe.call(this._shortWeekdaysParse,r))?i:null}function Ge(){function e(e,t){return t.length-e.length}var t,n,s,i,a,r=[],o=[],l=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),s=ge(this.weekdaysMin(n,"")),i=ge(this.weekdaysShort(n,"")),a=ge(this.weekdays(n,"")),r.push(s),o.push(i),l.push(a),c.push(s),c.push(i),c.push(a);r.sort(e),o.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Xe(e,t){U(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ze(e,t){return t._meridiemParse}U("H",["HH",2],0,"hour"),U("h",["hh",2],0,Ke),U("k",["kk",2],0,(function(){return this.hours()||24})),U("hmm",0,0,(function(){return""+Ke.apply(this)+O(this.minutes(),2)})),U("hmmss",0,0,(function(){return""+Ke.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)})),U("Hmm",0,0,(function(){return""+this.hours()+O(this.minutes(),2)})),U("Hmmss",0,0,(function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)})),Xe("a",!0),Xe("A",!1),Y("hour","h"),$("hour",13),me("a",Ze),me("A",Ze),me("H",se),me("h",se),me("k",se),me("HH",se,Q),me("hh",se,Q),me("kk",se,Q),me("hmm",ie),me("hmmss",ae),me("Hmm",ie),me("Hmmss",ae),ve(["H","HH"],3),ve(["k","kk"],(function(e,t,n){var s=q(e);t[3]=24===s?0:s})),ve(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),ve(["h","hh"],(function(e,t,n){t[3]=q(e),f(n).bigHour=!0})),ve("hmm",(function(e,t,n){var s=e.length-2;t[3]=q(e.substr(0,s)),t[4]=q(e.substr(s)),f(n).bigHour=!0})),ve("hmmss",(function(e,t,n){var s=e.length-4,i=e.length-2;t[3]=q(e.substr(0,s)),t[4]=q(e.substr(s,2)),t[5]=q(e.substr(i)),f(n).bigHour=!0})),ve("Hmm",(function(e,t,n){var s=e.length-2;t[3]=q(e.substr(0,s)),t[4]=q(e.substr(s))})),ve("Hmmss",(function(e,t,n){var s=e.length-4,i=e.length-2;t[3]=q(e.substr(0,s)),t[4]=q(e.substr(s,2)),t[5]=q(e.substr(i))}));var Je=G("Hours",!0);var Qe,et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:we,monthsShort:ke,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:Ve,weekdaysShort:He,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function st(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n<s;n+=1)if(e[n]!==t[n])return n;return s}function it(e){return e?e.toLowerCase().replace("_","-"):e}function at(t){var s=null;if(void 0===tt[t]&&e&&e.exports)try{s=Qe._abbr,n(46700)("./"+t),rt(s)}catch(e){tt[t]=null}return tt[t]}function rt(e,t){var n;return e&&((n=c(t)?lt(e):ot(e,t))?Qe=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Qe._abbr}function ot(e,t){if(null!==t){var n,s=et;if(t.abbr=e,null!=tt[e])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])s=tt[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return tt[e]=new I(P(s,t)),nt[e]&&nt[e].forEach((function(e){ot(e.name,e.config)})),rt(e),tt[e]}return delete tt[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Qe;if(!a(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,s,i,a=0;a<e.length;){for(t=(i=it(e[a]).split("-")).length,n=(n=it(e[a+1]))?n.split("-"):null;t>0;){if(s=at(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&st(i,n)>=t-1)break;t--}a++}return Qe}(e)}function ct(e){var t,n=e._a;return n&&-2===f(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>Se(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,f(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),f(e)._overflowWeeks&&-1===t&&(t=7),f(e)._overflowWeekday&&-1===t&&(t=8),f(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pt=/Z|[+-]\d\d(?::?\d\d)?/,ht=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ft=/^\/?Date\((-?\d+)/i,gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,bt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,n,s,i,a,r,o=e._i,l=ut.exec(o)||dt.exec(o);if(l){for(f(e).iso=!0,t=0,n=ht.length;t<n;t++)if(ht[t][1].exec(l[1])){i=ht[t][0],s=!1!==ht[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=mt.length;t<n;t++)if(mt[t][1].exec(l[3])){a=(l[2]||" ")+mt[t][0];break}if(null==a)return void(e._isValid=!1)}if(!s&&null!=a)return void(e._isValid=!1);if(l[4]){if(!pt.exec(l[4]))return void(e._isValid=!1);r="Z"}e._f=i+(a||"")+(r||""),wt(e)}else e._isValid=!1}function yt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function _t(e){var t,n,s,i,a,r,o,l,c=gt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(c){if(n=c[4],s=c[3],i=c[2],a=c[5],r=c[6],o=c[7],l=[yt(n),ke.indexOf(s),parseInt(i,10),parseInt(a,10),parseInt(r,10)],o&&l.push(parseInt(o,10)),t=l,!function(e,t,n){return!e||He.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(c[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return bt[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return(s-i)/100*60+i}(c[8],c[9],c[10]),e._d=Ee.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function xt(e,t,n){return null!=e?e:null!=t?t:n}function St(e){var t,n,s,a,r,o=[];if(!e._d){for(s=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,s,i,a,r,o,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,r=4,n=xt(t.GG,e._a[0],Ne(Tt(),1,4).year),s=xt(t.W,1),((i=xt(t.E,1))<1||i>7)&&(l=!0)):(a=e._locale._week.dow,r=e._locale._week.doy,c=Ne(Tt(),a,r),n=xt(t.gg,e._a[0],c.year),s=xt(t.w,c.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+a,(t.e<0||t.e>6)&&(l=!0)):i=a),s<1||s>Fe(n,a,r)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(o=Re(n,s,i,a,r),e._a[0]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=xt(e._a[0],s[0]),(e._dayOfYear>Le(r)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=Ee(r,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=s[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Ee:Ae).apply(null,o),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(f(e).weekdayMismatch=!0)}}function wt(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],f(e).empty=!0;var t,n,s,a,r,o,l=""+e._i,c=l.length,u=0;for(s=N(e._f,e._locale).match(L)||[],t=0;t<s.length;t++)a=s[t],(n=(l.match(fe(a,e))||[])[0])&&((r=l.substr(0,l.indexOf(n))).length>0&&f(e).unusedInput.push(r),l=l.slice(l.indexOf(n)+n.length),u+=n.length),E[a]?(n?f(e).empty=!1:f(e).unusedTokens.push(a),_e(a,n,e)):e._strict&&!n&&f(e).unusedTokens.push(a);f(e).charsLeftOver=c-u,l.length>0&&f(e).unusedInput.push(l),e._a[3]<=12&&!0===f(e).bigHour&&e._a[3]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var s;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(o=f(e).era)&&(e._a[0]=e._locale.erasConvertYear(o,e._a[0])),St(e),ct(e)}else _t(e);else vt(e)}function kt(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?b({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new x(ct(t)):(d(t)?e._d=t:a(n)?function(e){var t,n,s,i,a,r,o=!1;if(0===e._f.length)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<e._f.length;i++)a=0,r=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],wt(t),g(t)&&(r=!0),a+=f(t).charsLeftOver,a+=10*f(t).unusedTokens.length,f(t).score=a,o?a<s&&(s=a,n=t):(null==s||a<s||r)&&(s=a,n=t,r&&(o=!0));h(e,n||t)}(e):n?wt(e):function(e){var t=e._i;c(t)?e._d=new Date(i.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=ft.exec(e._i);null===t?(vt(e),!1===e._isValid&&(delete e._isValid,_t(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):a(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),St(e)):r(t)?function(e){if(!e._d){var t=H(e._i),n=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),St(e)}}(e):u(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function jt(e,t,n,s,i){var o,c={};return!0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(r(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=e,c._f=t,c._strict=s,(o=new x(ct(kt(c))))._nextDay&&(o.add(1,"d"),o._nextDay=void 0),o}function Tt(e,t,n,s){return jt(e,t,n,s,!1)}i.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Ct=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:b()})),Dt=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Tt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:b()}));function Pt(e,t){var n,s;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Tt();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var It=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ot(e){var t=H(e),n=t.year||0,s=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,r=t.day||0,l=t.hour||0,c=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,s=!1;for(t in e)if(o(e,t)&&(-1===xe.call(It,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<It.length;++n)if(e[It[n]]){if(s)return!1;parseFloat(e[It[n]])!==q(e[It[n]])&&(s=!0)}return!0}(t),this._milliseconds=+d+1e3*u+6e4*c+1e3*l*60*60,this._days=+r+7*a,this._months=+i+3*s+12*n,this._data={},this._locale=lt(),this._bubble()}function Lt(e){return e instanceof Ot}function Mt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function At(e,t){U(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+O(~~(e/60),2)+t+O(~~e%60,2)}))}At("Z",":"),At("ZZ",""),me("Z",pe),me("ZZ",pe),ve(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Ut(pe,e)}));var Et=/([\+\-]|\d\d)/gi;function Ut(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=60*(n=((i[i.length-1]||[])+"").match(Et)||["-",0,0])[1]+q(n[2]))?0:"+"===n[0]?s:-s}function Rt(e,t){var n,s;return t._isUTC?(n=t.clone(),s=(S(e)||d(e)?e.valueOf():Tt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+s),i.updateOffset(n,!1),n):Tt(e).local()}function Nt(e){return-Math.round(e._d.getTimezoneOffset())}function Ft(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Yt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Bt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ht(e,t){var n,s,i,a,r,l,c=e,d=null;return Lt(e)?c={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(c={},t?c[t]=+e:c.milliseconds=+e):(d=Yt.exec(e))?(n="-"===d[1]?-1:1,c={y:0,d:q(d[2])*n,h:q(d[3])*n,m:q(d[4])*n,s:q(d[5])*n,ms:q(Mt(1e3*d[6]))*n}):(d=Bt.exec(e))?(n="-"===d[1]?-1:1,c={y:Vt(d[2],n),M:Vt(d[3],n),w:Vt(d[4],n),d:Vt(d[5],n),h:Vt(d[6],n),m:Vt(d[7],n),s:Vt(d[8],n)}):null==c?c={}:"object"==typeof c&&("from"in c||"to"in c)&&(a=Tt(c.from),r=Tt(c.to),i=a.isValid()&&r.isValid()?(r=Rt(r,a),a.isBefore(r)?l=$t(a,r):((l=$t(r,a)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(c={}).ms=i.milliseconds,c.M=i.months),s=new Ot(c),Lt(e)&&o(e,"_locale")&&(s._locale=e._locale),Lt(e)&&o(e,"_isValid")&&(s._isValid=e._isValid),s}function Vt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function $t(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Wt(e,t){return function(n,s){var i;return null===s||isNaN(+s)||(C(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),zt(this,Ht(n,s),e),this}}function zt(e,t,n,s){var a=t._milliseconds,r=Mt(t._days),o=Mt(t._months);e.isValid()&&(s=null==s||s,o&&Pe(e,K(e,"Month")+o*n),r&&X(e,"Date",K(e,"Date")+r*n),a&&e._d.setTime(e._d.valueOf()+a*n),s&&i.updateOffset(e,r||o))}Ht.fn=Ot.prototype,Ht.invalid=function(){return Ht(NaN)};var qt=Wt(1,"add"),Gt=Wt(-1,"subtract");function Kt(e){return"string"==typeof e||e instanceof String}function Xt(e){return S(e)||d(e)||Kt(e)||u(e)||function(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Kt(e)})).length),t&&n}(e)||function(e){var t,n,s=r(e)&&!l(e),i=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<a.length;t+=1)n=a[t],i=i||o(e,n);return s&&i}(e)||null==e}function Zt(e){var t,n=r(e)&&!l(e),s=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)s=s||o(e,i[t]);return n&&s}function Jt(e,t){if(e.date()<t.date())return-Jt(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return-(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function Qt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function tn(){return this._locale}var nn=1e3,sn=6e4,an=36e5,rn=126227808e5;function on(e,t){return(e%t+t)%t}function ln(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-rn:new Date(e,t,n).valueOf()}function cn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-rn:Date.UTC(e,t,n)}function un(e,t){return t.erasAbbrRegex(e)}function dn(){var e,t,n=[],s=[],i=[],a=[],r=this.eras();for(e=0,t=r.length;e<t;++e)s.push(ge(r[e].name)),n.push(ge(r[e].abbr)),i.push(ge(r[e].narrow)),a.push(ge(r[e].name)),a.push(ge(r[e].abbr)),a.push(ge(r[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i")}function pn(e,t){U(0,[e,e.length],0,t)}function hn(e,t,n,s,i){var a;return null==e?Ne(this,s,i).year:(t>(a=Fe(e,s,i))&&(t=a),mn.call(this,e,t,n,s,i))}function mn(e,t,n,s,i){var a=Re(e,t,n,s,i),r=Ee(a.year,0,a.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}U("N",0,0,"eraAbbr"),U("NN",0,0,"eraAbbr"),U("NNN",0,0,"eraAbbr"),U("NNNN",0,0,"eraName"),U("NNNNN",0,0,"eraNarrow"),U("y",["y",1],"yo","eraYear"),U("y",["yy",2],0,"eraYear"),U("y",["yyy",3],0,"eraYear"),U("y",["yyyy",4],0,"eraYear"),me("N",un),me("NN",un),me("NNN",un),me("NNNN",(function(e,t){return t.erasNameRegex(e)})),me("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ve(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?f(n).era=i:f(n).invalidEra=e})),me("y",ce),me("yy",ce),me("yyy",ce),me("yyyy",ce),me("yo",(function(e,t){return t._eraYearOrdinalRegex||ce})),ve(["y","yy","yyy","yyyy"],0),ve(["yo"],(function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,i):t[0]=parseInt(e,10)})),U(0,["gg",2],0,(function(){return this.weekYear()%100})),U(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),pn("gggg","weekYear"),pn("ggggg","weekYear"),pn("GGGG","isoWeekYear"),pn("GGGGG","isoWeekYear"),Y("weekYear","gg"),Y("isoWeekYear","GG"),$("weekYear",1),$("isoWeekYear",1),me("G",ue),me("g",ue),me("GG",se,Q),me("gg",se,Q),me("GGGG",oe,te),me("gggg",oe,te),me("GGGGG",le,ne),me("ggggg",le,ne),ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,s){t[s.substr(0,2)]=q(e)})),ye(["gg","GG"],(function(e,t,n,s){t[s]=i.parseTwoDigitYear(e)})),U("Q",0,"Qo","quarter"),Y("quarter","Q"),$("quarter",7),me("Q",J),ve("Q",(function(e,t){t[1]=3*(q(e)-1)})),U("D",["DD",2],"Do","date"),Y("date","D"),$("date",9),me("D",se),me("DD",se,Q),me("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ve(["D","DD"],2),ve("Do",(function(e,t){t[2]=q(e.match(se)[0])}));var fn=G("Date",!0);U("DDD",["DDDD",3],"DDDo","dayOfYear"),Y("dayOfYear","DDD"),$("dayOfYear",4),me("DDD",re),me("DDDD",ee),ve(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=q(e)})),U("m",["mm",2],0,"minute"),Y("minute","m"),$("minute",14),me("m",se),me("mm",se,Q),ve(["m","mm"],4);var gn=G("Minutes",!1);U("s",["ss",2],0,"second"),Y("second","s"),$("second",15),me("s",se),me("ss",se,Q),ve(["s","ss"],5);var bn,vn,yn=G("Seconds",!1);for(U("S",0,0,(function(){return~~(this.millisecond()/100)})),U(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),U(0,["SSS",3],0,"millisecond"),U(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),U(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),U(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),U(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),U(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),U(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Y("millisecond","ms"),$("millisecond",16),me("S",re,J),me("SS",re,Q),me("SSS",re,ee),bn="SSSS";bn.length<=9;bn+="S")me(bn,ce);function _n(e,t){t[6]=q(1e3*("0."+e))}for(bn="S";bn.length<=9;bn+="S")ve(bn,_n);vn=G("Milliseconds",!1),U("z",0,0,"zoneAbbr"),U("zz",0,0,"zoneName");var xn=x.prototype;function Sn(e){return e}xn.add=qt,xn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Xt(arguments[0])?(e=arguments[0],t=void 0):Zt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Tt(),s=Rt(n,this).startOf("day"),a=i.calendarFormat(this,s)||"sameElse",r=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(r||this.localeData().calendar(a,this,Tt(n)))},xn.clone=function(){return new x(this)},xn.diff=function(e,t,n){var s,i,a;if(!this.isValid())return NaN;if(!(s=Rt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=B(t)){case"year":a=Jt(this,s)/12;break;case"month":a=Jt(this,s);break;case"quarter":a=Jt(this,s)/3;break;case"second":a=(this-s)/1e3;break;case"minute":a=(this-s)/6e4;break;case"hour":a=(this-s)/36e5;break;case"day":a=(this-s-i)/864e5;break;case"week":a=(this-s-i)/6048e5;break;default:a=this-s}return n?a:z(a)},xn.endOf=function(e){var t,n;if(void 0===(e=B(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?cn:ln,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=an-on(t+(this._isUTC?0:this.utcOffset()*sn),an)-1;break;case"minute":t=this._d.valueOf(),t+=sn-on(t,sn)-1;break;case"second":t=this._d.valueOf(),t+=nn-on(t,nn)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},xn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=R(this,e);return this.localeData().postformat(t)},xn.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?Ht({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},xn.fromNow=function(e){return this.from(Tt(),e)},xn.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Tt(e).isValid())?Ht({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},xn.toNow=function(e){return this.to(Tt(),e)},xn.get=function(e){return D(this[e=B(e)])?this[e]():this},xn.invalidAt=function(){return f(this).overflow},xn.isAfter=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=B(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},xn.isBefore=function(e,t){var n=S(e)?e:Tt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=B(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},xn.isBetween=function(e,t,n,s){var i=S(e)?e:Tt(e),a=S(t)?t:Tt(t);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(a,n):!this.isAfter(a,n))},xn.isSame=function(e,t){var n,s=S(e)?e:Tt(e);return!(!this.isValid()||!s.isValid())&&("millisecond"===(t=B(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},xn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},xn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},xn.isValid=function(){return g(this)},xn.lang=en,xn.locale=Qt,xn.localeData=tn,xn.max=Dt,xn.min=Ct,xn.parsingFlags=function(){return h({},f(this))},xn.set=function(e,t){if("object"==typeof e){var n,s=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:V[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=H(e));for(n=0;n<s.length;n++)this[s[n].unit](e[s[n].unit])}else if(D(this[e=B(e)]))return this[e](t);return this},xn.startOf=function(e){var t,n;if(void 0===(e=B(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?cn:ln,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=on(t+(this._isUTC?0:this.utcOffset()*sn),an);break;case"minute":t=this._d.valueOf(),t-=on(t,sn);break;case"second":t=this._d.valueOf(),t-=on(t,nn)}return this._d.setTime(t),i.updateOffset(this,!0),this},xn.subtract=Gt,xn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},xn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},xn.toDate=function(){return new Date(this.valueOf())},xn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?R(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",R(n,"Z")):R(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},xn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,s="moment",i="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY","-MM-DD[T]HH:mm:ss.SSS",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(xn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),xn.toJSON=function(){return this.isValid()?this.toISOString():null},xn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},xn.unix=function(){return Math.floor(this.valueOf()/1e3)},xn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},xn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},xn.eraName=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].name;if(s[e].until<=n&&n<=s[e].since)return s[e].name}return""},xn.eraNarrow=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].narrow;if(s[e].until<=n&&n<=s[e].since)return s[e].narrow}return""},xn.eraAbbr=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].abbr;if(s[e].until<=n&&n<=s[e].since)return s[e].abbr}return""},xn.eraYear=function(){var e,t,n,s,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,s=this.clone().startOf("day").valueOf(),a[e].since<=s&&s<=a[e].until||a[e].until<=s&&s<=a[e].since)return(this.year()-i(a[e].since).year())*n+a[e].offset;return this.year()},xn.year=Me,xn.isLeapYear=function(){return W(this.year())},xn.weekYear=function(e){return hn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},xn.isoWeekYear=function(e){return hn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},xn.quarter=xn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},xn.month=Ie,xn.daysInMonth=function(){return Se(this.year(),this.month())},xn.week=xn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},xn.isoWeek=xn.isoWeeks=function(e){var t=Ne(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},xn.weeksInYear=function(){var e=this.localeData()._week;return Fe(this.year(),e.dow,e.doy)},xn.weeksInWeekYear=function(){var e=this.localeData()._week;return Fe(this.weekYear(),e.dow,e.doy)},xn.isoWeeksInYear=function(){return Fe(this.year(),1,4)},xn.isoWeeksInISOWeekYear=function(){return Fe(this.isoWeekYear(),1,4)},xn.date=fn,xn.day=xn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},xn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},xn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},xn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},xn.hour=xn.hours=Je,xn.minute=xn.minutes=gn,xn.second=xn.seconds=yn,xn.millisecond=xn.milliseconds=vn,xn.utcOffset=function(e,t,n){var s,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Ut(pe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(s=Nt(this)),this._offset=e,this._isUTC=!0,null!=s&&this.add(s,"m"),a!==e&&(!t||this._changeInProgress?zt(this,Ht(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Nt(this)},xn.utc=function(e){return this.utcOffset(0,e)},xn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Nt(this),"m")),this},xn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Ut(de,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},xn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Tt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},xn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},xn.isLocal=function(){return!!this.isValid()&&!this._isUTC},xn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},xn.isUtc=Ft,xn.isUTC=Ft,xn.zoneAbbr=function(){return this._isUTC?"UTC":""},xn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},xn.dates=k("dates accessor is deprecated. Use date instead.",fn),xn.months=k("months accessor is deprecated. Use month instead",Ie),xn.years=k("years accessor is deprecated. Use year instead",Me),xn.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),xn.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=kt(t))._a?(e=t._isUTC?m(t._a):Tt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var s,i=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),r=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&q(e[s])!==q(t[s]))&&r++;return r+a}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var wn=I.prototype;function kn(e,t,n,s){var i=lt(),a=m().set(s,t);return i[n](a,e)}function jn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return kn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=kn(e,s,n,"month");return i}function Tn(e,t,n,s){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var i,a=lt(),r=e?a._week.dow:0,o=[];if(null!=n)return kn(t,(n+r)%7,s,"day");for(i=0;i<7;i++)o[i]=kn(t,(i+r)%7,s,"day");return o}wn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return D(s)?s.call(t,n):s},wn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(L).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},wn.invalidDate=function(){return this._invalidDate},wn.ordinal=function(e){return this._ordinal.replace("%d",e)},wn.preparse=Sn,wn.postformat=Sn,wn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return D(i)?i(e,t,n,s):i.replace(/%d/i,e)},wn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)},wn.set=function(e){var t,n;for(n in e)o(e,n)&&(D(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},wn.eras=function(e,t){var n,s,a,r=this._eras||lt("en")._eras;for(n=0,s=r.length;n<s;++n)switch("string"==typeof r[n].since&&(a=i(r[n].since).startOf("day"),r[n].since=a.valueOf()),typeof r[n].until){case"undefined":r[n].until=1/0;break;case"string":a=i(r[n].until).startOf("day").valueOf(),r[n].until=a.valueOf()}return r},wn.erasParse=function(e,t,n){var s,i,a,r,o,l=this.eras();for(e=e.toUpperCase(),s=0,i=l.length;s<i;++s)if(a=l[s].name.toUpperCase(),r=l[s].abbr.toUpperCase(),o=l[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(r===e)return l[s];break;case"NNNN":if(a===e)return l[s];break;case"NNNNN":if(o===e)return l[s]}else if([a,r,o].indexOf(e)>=0)return l[s]},wn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n},wn.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||dn.call(this),e?this._erasAbbrRegex:this._erasRegex},wn.erasNameRegex=function(e){return o(this,"_erasNameRegex")||dn.call(this),e?this._erasNameRegex:this._erasRegex},wn.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||dn.call(this),e?this._erasNarrowRegex:this._erasRegex},wn.months=function(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||je).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone},wn.monthsShort=function(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[je.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},wn.monthsParse=function(e,t,n){var s,i,a;if(this._monthsParseExact)return De.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=m([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},wn.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Oe.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=Ce),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},wn.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Oe.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Te),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},wn.week=function(e){return Ne(e,this._week.dow,this._week.doy).week},wn.firstDayOfYear=function(){return this._week.doy},wn.firstDayOfWeek=function(){return this._week.dow},wn.weekdays=function(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ye(n,this._week.dow):e?n[e.day()]:n},wn.weekdaysMin=function(e){return!0===e?Ye(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},wn.weekdaysShort=function(e){return!0===e?Ye(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},wn.weekdaysParse=function(e,t,n){var s,i,a;if(this._weekdaysParseExact)return qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=m([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},wn.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},wn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=We),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},wn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ge.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ze),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},wn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},wn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},rt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=k("moment.lang is deprecated. Use moment.locale instead.",rt),i.langData=k("moment.langData is deprecated. Use moment.localeData instead.",lt);var Cn=Math.abs;function Dn(e,t,n,s){var i=Ht(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function Pn(e){return e<0?Math.floor(e):Math.ceil(e)}function In(e){return 4800*e/146097}function On(e){return 146097*e/4800}function Ln(e){return function(){return this.as(e)}}var Mn=Ln("ms"),An=Ln("s"),En=Ln("m"),Un=Ln("h"),Rn=Ln("d"),Nn=Ln("w"),Fn=Ln("M"),Yn=Ln("Q"),Bn=Ln("y");function Hn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Vn=Hn("milliseconds"),$n=Hn("seconds"),Wn=Hn("minutes"),zn=Hn("hours"),qn=Hn("days"),Gn=Hn("months"),Kn=Hn("years");var Xn=Math.round,Zn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Jn(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}var Qn=Math.abs;function es(e){return(e>0)-(e<0)||+e}function ts(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,a,r,o,l=Qn(this._milliseconds)/1e3,c=Qn(this._days),u=Qn(this._months),d=this.asSeconds();return d?(e=z(l/60),t=z(e/60),l%=60,e%=60,n=z(u/12),u%=12,s=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",a=es(this._months)!==es(d)?"-":"",r=es(this._days)!==es(d)?"-":"",o=es(this._milliseconds)!==es(d)?"-":"",i+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?r+c+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+s+"S":"")):"P0D"}var ns=Ot.prototype;return ns.isValid=function(){return this._isValid},ns.abs=function(){var e=this._data;return this._milliseconds=Cn(this._milliseconds),this._days=Cn(this._days),this._months=Cn(this._months),e.milliseconds=Cn(e.milliseconds),e.seconds=Cn(e.seconds),e.minutes=Cn(e.minutes),e.hours=Cn(e.hours),e.months=Cn(e.months),e.years=Cn(e.years),this},ns.add=function(e,t){return Dn(this,e,t,1)},ns.subtract=function(e,t){return Dn(this,e,t,-1)},ns.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=B(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+In(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(On(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},ns.asMilliseconds=Mn,ns.asSeconds=An,ns.asMinutes=En,ns.asHours=Un,ns.asDays=Rn,ns.asWeeks=Nn,ns.asMonths=Fn,ns.asQuarters=Yn,ns.asYears=Bn,ns.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},ns._bubble=function(){var e,t,n,s,i,a=this._milliseconds,r=this._days,o=this._months,l=this._data;return a>=0&&r>=0&&o>=0||a<=0&&r<=0&&o<=0||(a+=864e5*Pn(On(o)+r),r=0,o=0),l.milliseconds=a%1e3,e=z(a/1e3),l.seconds=e%60,t=z(e/60),l.minutes=t%60,n=z(t/60),l.hours=n%24,r+=z(n/24),o+=i=z(In(r)),r-=Pn(On(i)),s=z(o/12),o%=12,l.days=r,l.months=o,l.years=s,this},ns.clone=function(){return Ht(this)},ns.get=function(e){return e=B(e),this.isValid()?this[e+"s"]():NaN},ns.milliseconds=Vn,ns.seconds=$n,ns.minutes=Wn,ns.hours=zn,ns.days=qn,ns.weeks=function(){return z(this.days()/7)},ns.months=Gn,ns.years=Kn,ns.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,a=Zn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(a=Object.assign({},Zn,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),s=function(e,t,n,s){var i=Ht(e).abs(),a=Xn(i.as("s")),r=Xn(i.as("m")),o=Xn(i.as("h")),l=Xn(i.as("d")),c=Xn(i.as("M")),u=Xn(i.as("w")),d=Xn(i.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||r<=1&&["m"]||r<n.m&&["mm",r]||o<=1&&["h"]||o<n.h&&["hh",o]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(p=p||u<=1&&["w"]||u<n.w&&["ww",u]),(p=p||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,p[3]=+e>0,p[4]=s,Jn.apply(null,p)}(this,!i,a,n=this.localeData()),i&&(s=n.pastFuture(+this,s)),n.postformat(s)},ns.toISOString=ts,ns.toString=ts,ns.toJSON=ts,ns.locale=Qt,ns.localeData=tn,ns.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ts),ns.lang=en,U("X",0,0,"unix"),U("x",0,0,"valueOf"),me("x",ue),me("X",/[+-]?\d+(\.\d{1,3})?/),ve("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),ve("x",(function(e,t,n){n._d=new Date(q(e))})),i.version="2.29.1",t=Tt,i.fn=xn,i.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},i.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=m,i.unix=function(e){return Tt(1e3*e)},i.months=function(e,t){return jn(e,t,"months")},i.isDate=d,i.locale=rt,i.invalid=b,i.duration=Ht,i.isMoment=S,i.weekdays=function(e,t,n){return Tn(e,t,n,"weekdays")},i.parseZone=function(){return Tt.apply(null,arguments).parseZone()},i.localeData=lt,i.isDuration=Lt,i.monthsShort=function(e,t){return jn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return Tn(e,t,n,"weekdaysMin")},i.defineLocale=ot,i.updateLocale=function(e,t){if(null!=t){var n,s,i=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(P(tt[e]._config,t)):(null!=(s=at(e))&&(i=s._config),t=P(i,t),null==s&&(t.abbr=e),(n=new I(t)).parentLocale=tt[e],tt[e]=n),rt(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===rt()&&rt(e)):null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return j(tt)},i.weekdaysShort=function(e,t,n){return Tn(e,t,n,"weekdaysShort")},i.normalizeUnits=B,i.relativeTimeRounding=function(e){return void 0===e?Xn:"function"==typeof e&&(Xn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==Zn[e]&&(void 0===t?Zn[e]:(Zn[e]=t,"s"===e&&(Zn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=xn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()},27418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach((function(e){s[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},s)).join("")}catch(e){return!1}}()?Object.assign:function(e,a){for(var r,o,l=i(e),c=1;c<arguments.length;c++){for(var u in r=Object(arguments[c]))n.call(r,u)&&(l[u]=r[u]);if(t){o=t(r);for(var d=0;d<o.length;d++)s.call(r,o[d])&&(l[o[d]]=r[o[d]])}}return l}},70631:(e,t,n)=>{var s="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,a=s&&i&&"function"==typeof i.get?i.get:null,r=s&&Map.prototype.forEach,o="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=o&&l&&"function"==typeof l.get?l.get:null,u=o&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,f=Object.prototype.toString,g=Function.prototype.toString,b=String.prototype.match,v="function"==typeof BigInt?BigInt.prototype.valueOf:null,y=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,x="function"==typeof Symbol&&"object"==typeof Symbol.iterator,S=Object.prototype.propertyIsEnumerable,w=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),k=n(24654).custom,j=k&&I(k)?k:null,T="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function C(e,t,n){var s="double"===(n.quoteStyle||t)?'"':"'";return s+e+s}function D(e){return String(e).replace(/"/g,""")}function P(e){return!("[object Array]"!==M(e)||T&&"object"==typeof e&&T in e)}function I(e){if(x)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!_)return!1;try{return _.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,s,i){var o=n||{};if(L(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(L(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!L(o,"customInspect")||o.customInspect;if("boolean"!=typeof l)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(L(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return E(t,o);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var f=void 0===o.depth?5:o.depth;if(void 0===s&&(s=0),s>=f&&f>0&&"object"==typeof t)return P(t)?"[Array]":"[Object]";var y,S=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=Array(e.indent+1).join(" ")}return{base:n,prev:Array(t+1).join(n)}}(o,s);if(void 0===i)i=[];else if(A(i,t)>=0)return"[Circular]";function k(t,n,a){if(n&&(i=i.slice()).push(n),a){var r={depth:o.depth};return L(o,"quoteStyle")&&(r.quoteStyle=o.quoteStyle),e(t,r,s+1,i)}return e(t,o,s+1,i)}if("function"==typeof t){var O=function(e){if(e.name)return e.name;var t=b.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),U=B(t,k);return"[Function"+(O?": "+O:" (anonymous)")+"]"+(U.length>0?" { "+U.join(", ")+" }":"")}if(I(t)){var H=x?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(t);return"object"!=typeof t||x?H:R(H)}if((y=t)&&"object"==typeof y&&("undefined"!=typeof HTMLElement&&y instanceof HTMLElement||"string"==typeof y.nodeName&&"function"==typeof y.getAttribute)){for(var V="<"+String(t.nodeName).toLowerCase(),$=t.attributes||[],W=0;W<$.length;W++)V+=" "+$[W].name+"="+C(D($[W].value),"double",o);return V+=">",t.childNodes&&t.childNodes.length&&(V+="..."),V+"</"+String(t.nodeName).toLowerCase()+">"}if(P(t)){if(0===t.length)return"[]";var z=B(t,k);return S&&!function(e){for(var t=0;t<e.length;t++)if(A(e[t],"\n")>=0)return!1;return!0}(z)?"["+Y(z,S)+"]":"[ "+z.join(", ")+" ]"}if(function(e){return!("[object Error]"!==M(e)||T&&"object"==typeof e&&T in e)}(t)){var q=B(t,k);return 0===q.length?"["+String(t)+"]":"{ ["+String(t)+"] "+q.join(", ")+" }"}if("object"==typeof t&&l){if(j&&"function"==typeof t[j])return t[j]();if("function"==typeof t.inspect)return t.inspect()}if(function(e){if(!a||!e||"object"!=typeof e)return!1;try{a.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var G=[];return r.call(t,(function(e,n){G.push(k(n,t,!0)+" => "+k(e,t))})),F("Map",a.call(t),G,S)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{a.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var K=[];return u.call(t,(function(e){K.push(k(e,t))})),F("Set",c.call(t),K,S)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return N("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return N("WeakSet");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{return h.call(e),!0}catch(e){}return!1}(t))return N("WeakRef");if(function(e){return!("[object Number]"!==M(e)||T&&"object"==typeof e&&T in e)}(t))return R(k(Number(t)));if(function(e){if(!e||"object"!=typeof e||!v)return!1;try{return v.call(e),!0}catch(e){}return!1}(t))return R(k(v.call(t)));if(function(e){return!("[object Boolean]"!==M(e)||T&&"object"==typeof e&&T in e)}(t))return R(m.call(t));if(function(e){return!("[object String]"!==M(e)||T&&"object"==typeof e&&T in e)}(t))return R(k(String(t)));if(!function(e){return!("[object Date]"!==M(e)||T&&"object"==typeof e&&T in e)}(t)&&!function(e){return!("[object RegExp]"!==M(e)||T&&"object"==typeof e&&T in e)}(t)){var X=B(t,k),Z=w?w(t)===Object.prototype:t instanceof Object||t.constructor===Object,J=t instanceof Object?"":"null prototype",Q=!Z&&T&&Object(t)===t&&T in t?M(t).slice(8,-1):J?"Object":"",ee=(Z||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(Q||J?"["+[].concat(Q||[],J||[]).join(": ")+"] ":"");return 0===X.length?ee+"{}":S?ee+"{"+Y(X,S)+"}":ee+"{ "+X.join(", ")+" }"}return String(t)};var O=Object.prototype.hasOwnProperty||function(e){return e in this};function L(e,t){return O.call(e,t)}function M(e){return f.call(e)}function A(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,s=e.length;n<s;n++)if(e[n]===t)return n;return-1}function E(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,s="... "+n+" more character"+(n>1?"s":"");return E(e.slice(0,t.maxStringLength),t)+s}return C(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,U),"single",t)}function U(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function R(e){return"Object("+e+")"}function N(e){return e+" { ? }"}function F(e,t,n,s){return e+" ("+t+") {"+(s?Y(n,s):n.join(", "))+"}"}function Y(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+e.join(","+n)+"\n"+t.prev}function B(e,t){var n=P(e),s=[];if(n){s.length=e.length;for(var i=0;i<e.length;i++)s[i]=L(e,i)?t(e[i],e):""}var a,r="function"==typeof y?y(e):[];if(x){a={};for(var o=0;o<r.length;o++)a["$"+r[o]]=r[o]}for(var l in e)L(e,l)&&(n&&String(Number(l))===l&&l<e.length||x&&a["$"+l]instanceof Symbol||(/[^\w$]/.test(l)?s.push(t(l,e)+": "+t(e[l],e)):s.push(l+": "+t(e[l],e))));if("function"==typeof y)for(var c=0;c<r.length;c++)S.call(e,r[c])&&s.push("["+t(r[c])+"]: "+t(e[r[c]],e));return s}},24244:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,n){return 0===e&&0===n?1/e==1/n:e===n||!(!t(e)||!t(n))}},20609:(e,t,n)=>{"use strict";var s=n(4289),i=n(55559),a=n(24244),r=n(75624),o=n(52281),l=i(r(),Object);s(l,{getPolyfill:r,implementation:a,shim:o}),e.exports=l},75624:(e,t,n)=>{"use strict";var s=n(24244);e.exports=function(){return"function"==typeof Object.is?Object.is:s}},52281:(e,t,n)=>{"use strict";var s=n(75624),i=n(4289);e.exports=function(){var e=s();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},18987:(e,t,n)=>{"use strict";var s;if(!Object.keys){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,r=n(21414),o=Object.prototype.propertyIsEnumerable,l=!o.call({toString:null},"toString"),c=o.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{d(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();s=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===a.call(e),s=r(e),o=t&&"[object String]"===a.call(e),p=[];if(!t&&!n&&!s)throw new TypeError("Object.keys called on a non-object");var m=c&&n;if(o&&e.length>0&&!i.call(e,0))for(var f=0;f<e.length;++f)p.push(String(f));if(s&&e.length>0)for(var g=0;g<e.length;++g)p.push(String(g));else for(var b in e)m&&"prototype"===b||!i.call(e,b)||p.push(String(b));if(l)for(var v=function(e){if("undefined"==typeof window||!h)return d(e);try{return d(e)}catch(e){return!1}}(e),y=0;y<u.length;++y)v&&"constructor"===u[y]||!i.call(e,u[y])||p.push(u[y]);return p}}e.exports=s},82215:(e,t,n)=>{"use strict";var s=Array.prototype.slice,i=n(21414),a=Object.keys,r=a?function(e){return a(e)}:n(18987),o=Object.keys;r.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?o(s.call(e)):o(e)})}else Object.keys=r;return Object.keys||r},e.exports=r},21414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),s="[object Arguments]"===n;return s||(s="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),s}},79430:function(e,t){var n,s;void 0===(s="function"==typeof(n=function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){var n,s=t.exec(e.substring(f));if(s)return n=s[0],f+=n.length,n}for(var s,i,a,r,o,l=e.length,c=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,p=/[,]+$/,h=/^\d+$/,m=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,f=0,g=[];;){if(n(u),f>=l)return g;s=n(d),i=[],","===s.slice(-1)?(s=s.replace(p,""),v()):b()}function b(){for(n(c),a="",r="in descriptor";;){if(o=e.charAt(f),"in descriptor"===r)if(t(o))a&&(i.push(a),a="",r="after descriptor");else{if(","===o)return f+=1,a&&i.push(a),void v();if("("===o)a+=o,r="in parens";else{if(""===o)return a&&i.push(a),void v();a+=o}}else if("in parens"===r)if(")"===o)a+=o,r="in descriptor";else{if(""===o)return i.push(a),void v();a+=o}else if("after descriptor"===r)if(t(o));else{if(""===o)return void v();r="in descriptor",f-=1}f+=1}}function v(){var t,n,a,r,o,l,c,u,d,p=!1,f={};for(r=0;r<i.length;r++)l=(o=i[r])[o.length-1],c=o.substring(0,o.length-1),u=parseInt(c,10),d=parseFloat(c),h.test(c)&&"w"===l?((t||n)&&(p=!0),0===u?p=!0:t=u):m.test(c)&&"x"===l?((t||n||a)&&(p=!0),d<0?p=!0:n=d):h.test(c)&&"h"===l?((a||n)&&(p=!0),0===u?p=!0:a=u):p=!0;p?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+o+"'."):(f.url=s,t&&(f.w=t),n&&(f.d=n),a&&(f.h=a),g.push(f))}}})?n.apply(t,[]):n)||(e.exports=s)},75:function(e){(function(){var t,n,s,i,a,r;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-a)/1e6},n=process.hrtime,i=(t=function(){var e;return 1e9*(e=n())[0]+e[1]})(),r=1e9*process.uptime(),a=i-r):Date.now?(e.exports=function(){return Date.now()-s},s=Date.now()):(e.exports=function(){return(new Date).getTime()-s},s=(new Date).getTime())}).call(this)},28981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>ae});var s="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,i=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(s&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}(),a=s&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),i))}};function r(e){return e&&"[object Function]"==={}.toString.call(e)}function o(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function l(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function c(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=o(e),n=t.overflow,s=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+s)?e:c(l(e))}function u(e){return e&&e.referenceNode?e.referenceNode:e}var d=s&&!(!window.MSInputMethodContext||!document.documentMode),p=s&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?d:10===e?p:d||p}function m(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var s=n&&n.nodeName;return s&&"BODY"!==s&&"HTML"!==s?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===o(n,"position")?m(n):n:e?e.ownerDocument.documentElement:document.documentElement}function f(e){return null!==e.parentNode?f(e.parentNode):e}function g(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,s=n?e:t,i=n?t:e,a=document.createRange();a.setStart(s,0),a.setEnd(i,0);var r,o,l=a.commonAncestorContainer;if(e!==l&&t!==l||s.contains(i))return"BODY"===(o=(r=l).nodeName)||"HTML"!==o&&m(r.firstElementChild)!==r?m(l):l;var c=f(e);return c.host?g(c.host,t):g(e,f(t).host)}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",s=e.nodeName;if("BODY"===s||"HTML"===s){var i=e.ownerDocument.documentElement,a=e.ownerDocument.scrollingElement||i;return a[n]}return e[n]}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=b(t,"top"),i=b(t,"left"),a=n?-1:1;return e.top+=s*a,e.bottom+=s*a,e.left+=i*a,e.right+=i*a,e}function y(e,t){var n="x"===t?"Left":"Top",s="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+s+"Width"])}function _(e,t,n,s){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],h(10)?parseInt(n["offset"+e])+parseInt(s["margin"+("Height"===e?"Top":"Left")])+parseInt(s["margin"+("Height"===e?"Bottom":"Right")]):0)}function x(e){var t=e.body,n=e.documentElement,s=h(10)&&getComputedStyle(n);return{height:_("Height",t,n,s),width:_("Width",t,n,s)}}var S=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},w=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}(),k=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e};function T(e){return j({},e,{right:e.left+e.width,bottom:e.top+e.height})}function C(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var n=b(e,"top"),s=b(e,"left");t.top+=n,t.left+=s,t.bottom+=n,t.right+=s}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?x(e.ownerDocument):{},r=a.width||e.clientWidth||i.width,l=a.height||e.clientHeight||i.height,c=e.offsetWidth-r,u=e.offsetHeight-l;if(c||u){var d=o(e);c-=y(d,"x"),u-=y(d,"y"),i.width-=c,i.height-=u}return T(i)}function D(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=h(10),i="HTML"===t.nodeName,a=C(e),r=C(t),l=c(e),u=o(t),d=parseFloat(u.borderTopWidth),p=parseFloat(u.borderLeftWidth);n&&i&&(r.top=Math.max(r.top,0),r.left=Math.max(r.left,0));var m=T({top:a.top-r.top-d,left:a.left-r.left-p,width:a.width,height:a.height});if(m.marginTop=0,m.marginLeft=0,!s&&i){var f=parseFloat(u.marginTop),g=parseFloat(u.marginLeft);m.top-=d-f,m.bottom-=d-f,m.left-=p-g,m.right-=p-g,m.marginTop=f,m.marginLeft=g}return(s&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(m=v(m,t)),m}function P(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,s=D(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),a=Math.max(n.clientHeight,window.innerHeight||0),r=t?0:b(n),o=t?0:b(n,"left"),l={top:r-s.top+s.marginTop,left:o-s.left+s.marginLeft,width:i,height:a};return T(l)}function I(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===o(e,"position"))return!0;var n=l(e);return!!n&&I(n)}function O(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===o(t,"transform");)t=t.parentElement;return t||document.documentElement}function L(e,t,n,s){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a={top:0,left:0},r=i?O(e):g(e,u(t));if("viewport"===s)a=P(r,i);else{var o=void 0;"scrollParent"===s?"BODY"===(o=c(l(t))).nodeName&&(o=e.ownerDocument.documentElement):o="window"===s?e.ownerDocument.documentElement:s;var d=D(o,r,i);if("HTML"!==o.nodeName||I(r))a=d;else{var p=x(e.ownerDocument),h=p.height,m=p.width;a.top+=d.top-d.marginTop,a.bottom=h+d.top,a.left+=d.left-d.marginLeft,a.right=m+d.left}}var f="number"==typeof(n=n||0);return a.left+=f?n:n.left||0,a.top+=f?n:n.top||0,a.right-=f?n:n.right||0,a.bottom-=f?n:n.bottom||0,a}function M(e){return e.width*e.height}function A(e,t,n,s,i){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var r=L(n,s,a,i),o={top:{width:r.width,height:t.top-r.top},right:{width:r.right-t.right,height:r.height},bottom:{width:r.width,height:r.bottom-t.bottom},left:{width:t.left-r.left,height:r.height}},l=Object.keys(o).map((function(e){return j({key:e},o[e],{area:M(o[e])})})).sort((function(e,t){return t.area-e.area})),c=l.filter((function(e){var t=e.width,s=e.height;return t>=n.clientWidth&&s>=n.clientHeight})),u=c.length>0?c[0].key:l[0].key,d=e.split("-")[1];return u+(d?"-"+d:"")}function E(e,t,n){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=s?O(t):g(t,u(n));return D(n,i,s)}function U(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),s=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+s,height:e.offsetHeight+n}}function R(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function N(e,t,n){n=n.split("-")[0];var s=U(e),i={width:s.width,height:s.height},a=-1!==["right","left"].indexOf(n),r=a?"top":"left",o=a?"left":"top",l=a?"height":"width",c=a?"width":"height";return i[r]=t[r]+t[l]/2-s[l]/2,i[o]=n===o?t[o]-s[c]:t[R(o)],i}function F(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function Y(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e.name===n}));var s=F(e,(function(e){return e.name===n}));return e.indexOf(s)}(e,0,n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&r(n)&&(t.offsets.popper=T(t.offsets.popper),t.offsets.reference=T(t.offsets.reference),t=n(t,e))})),t}function B(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=E(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=A(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=N(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Y(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function H(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function V(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),s=0;s<t.length;s++){var i=t[s],a=i?""+i+n:e;if(void 0!==document.body.style[a])return a}return null}function $(){return this.state.isDestroyed=!0,H(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[V("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function W(e){var t=e.ownerDocument;return t?t.defaultView:window}function z(e,t,n,s){var i="BODY"===e.nodeName,a=i?e.ownerDocument.defaultView:e;a.addEventListener(t,n,{passive:!0}),i||z(c(a.parentNode),t,n,s),s.push(a)}function q(e,t,n,s){n.updateBound=s,W(e).addEventListener("resize",n.updateBound,{passive:!0});var i=c(e);return z(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function G(){this.state.eventsEnabled||(this.state=q(this.reference,this.options,this.state,this.scheduleUpdate))}function K(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,W(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function X(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function Z(e,t){Object.keys(t).forEach((function(n){var s="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&X(t[n])&&(s="px"),e.style[n]=t[n]+s}))}var J=s&&/Firefox/i.test(navigator.userAgent);function Q(e,t,n){var s=F(e,(function(e){return e.name===t})),i=!!s&&e.some((function(e){return e.name===n&&e.enabled&&e.order<s.order}));if(!i){var a="`"+t+"`",r="`"+n+"`";console.warn(r+" modifier is required by "+a+" modifier in order to work, be sure to include it before "+a+"!")}return i}var ee=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],te=ee.slice(3);function ne(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=te.indexOf(e),s=te.slice(n+1).concat(te.slice(0,n));return t?s.reverse():s}var se={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],s=t.split("-")[1];if(s){var i=e.offsets,a=i.reference,r=i.popper,o=-1!==["bottom","top"].indexOf(n),l=o?"left":"top",c=o?"width":"height",u={start:k({},l,a[l]),end:k({},l,a[l]+a[c]-r[c])};e.offsets.popper=j({},r,u[s])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n,s=t.offset,i=e.placement,a=e.offsets,r=a.popper,o=a.reference,l=i.split("-")[0];return n=X(+s)?[+s,0]:function(e,t,n,s){var i=[0,0],a=-1!==["right","left"].indexOf(s),r=e.split(/(\+|\-)/).map((function(e){return e.trim()})),o=r.indexOf(F(r,(function(e){return-1!==e.search(/,|\s/)})));r[o]&&-1===r[o].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,c=-1!==o?[r.slice(0,o).concat([r[o].split(l)[0]]),[r[o].split(l)[1]].concat(r.slice(o+1))]:[r];return c=c.map((function(e,s){var i=(1===s?!a:a)?"height":"width",r=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,r=!0,e):r?(e[e.length-1]+=t,r=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,s){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),a=+i[1],r=i[2];return a?0===r.indexOf("%")?T("%p"===r?n:s)[t]/100*a:"vh"===r||"vw"===r?("vh"===r?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*a:a:e}(e,i,t,n)}))})),c.forEach((function(e,t){e.forEach((function(n,s){X(n)&&(i[t]+=n*("-"===e[s-1]?-1:1))}))})),i}(s,r,o,l),"left"===l?(r.top+=n[0],r.left-=n[1]):"right"===l?(r.top+=n[0],r.left+=n[1]):"top"===l?(r.left+=n[0],r.top-=n[1]):"bottom"===l&&(r.left+=n[0],r.top+=n[1]),e.popper=r,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||m(e.instance.popper);e.instance.reference===n&&(n=m(n));var s=V("transform"),i=e.instance.popper.style,a=i.top,r=i.left,o=i[s];i.top="",i.left="",i[s]="";var l=L(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=a,i.left=r,i[s]=o,t.boundaries=l;var c=t.priority,u=e.offsets.popper,d={primary:function(e){var n=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(n=Math.max(u[e],l[e])),k({},e,n)},secondary:function(e){var n="right"===e?"left":"top",s=u[n];return u[e]>l[e]&&!t.escapeWithReference&&(s=Math.min(u[n],l[e]-("right"===e?u.width:u.height))),k({},n,s)}};return c.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=j({},u,d[t](e))})),e.offsets.popper=u,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,s=t.reference,i=e.placement.split("-")[0],a=Math.floor,r=-1!==["top","bottom"].indexOf(i),o=r?"right":"bottom",l=r?"left":"top",c=r?"width":"height";return n[o]<a(s[l])&&(e.offsets.popper[l]=a(s[l])-n[c]),n[l]>a(s[o])&&(e.offsets.popper[l]=a(s[o])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var s=t.element;if("string"==typeof s){if(!(s=e.instance.popper.querySelector(s)))return e}else if(!e.instance.popper.contains(s))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],a=e.offsets,r=a.popper,l=a.reference,c=-1!==["left","right"].indexOf(i),u=c?"height":"width",d=c?"Top":"Left",p=d.toLowerCase(),h=c?"left":"top",m=c?"bottom":"right",f=U(s)[u];l[m]-f<r[p]&&(e.offsets.popper[p]-=r[p]-(l[m]-f)),l[p]+f>r[m]&&(e.offsets.popper[p]+=l[p]+f-r[m]),e.offsets.popper=T(e.offsets.popper);var g=l[p]+l[u]/2-f/2,b=o(e.instance.popper),v=parseFloat(b["margin"+d]),y=parseFloat(b["border"+d+"Width"]),_=g-e.offsets.popper[p]-v-y;return _=Math.max(Math.min(r[u]-f,_),0),e.arrowElement=s,e.offsets.arrow=(k(n={},p,Math.round(_)),k(n,h,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(H(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=L(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),s=e.placement.split("-")[0],i=R(s),a=e.placement.split("-")[1]||"",r=[];switch(t.behavior){case"flip":r=[s,i];break;case"clockwise":r=ne(s);break;case"counterclockwise":r=ne(s,!0);break;default:r=t.behavior}return r.forEach((function(o,l){if(s!==o||r.length===l+1)return e;s=e.placement.split("-")[0],i=R(s);var c=e.offsets.popper,u=e.offsets.reference,d=Math.floor,p="left"===s&&d(c.right)>d(u.left)||"right"===s&&d(c.left)<d(u.right)||"top"===s&&d(c.bottom)>d(u.top)||"bottom"===s&&d(c.top)<d(u.bottom),h=d(c.left)<d(n.left),m=d(c.right)>d(n.right),f=d(c.top)<d(n.top),g=d(c.bottom)>d(n.bottom),b="left"===s&&h||"right"===s&&m||"top"===s&&f||"bottom"===s&&g,v=-1!==["top","bottom"].indexOf(s),y=!!t.flipVariations&&(v&&"start"===a&&h||v&&"end"===a&&m||!v&&"start"===a&&f||!v&&"end"===a&&g),_=!!t.flipVariationsByContent&&(v&&"start"===a&&m||v&&"end"===a&&h||!v&&"start"===a&&g||!v&&"end"===a&&f),x=y||_;(p||b||x)&&(e.flipped=!0,(p||b)&&(s=r[l+1]),x&&(a=function(e){return"end"===e?"start":"start"===e?"end":e}(a)),e.placement=s+(a?"-"+a:""),e.offsets.popper=j({},e.offsets.popper,N(e.instance.popper,e.offsets.reference,e.placement)),e=Y(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],s=e.offsets,i=s.popper,a=s.reference,r=-1!==["left","right"].indexOf(n),o=-1===["top","left"].indexOf(n);return i[r?"left":"top"]=a[n]-(o?i[r?"width":"height"]:0),e.placement=R(t),e.offsets.popper=T(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=F(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,s=t.y,i=e.offsets.popper,a=F(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==a&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var r,o,l=void 0!==a?a:t.gpuAcceleration,c=m(e.instance.popper),u=C(c),d={position:i.position},p=function(e,t){var n=e.offsets,s=n.popper,i=n.reference,a=Math.round,r=Math.floor,o=function(e){return e},l=a(i.width),c=a(s.width),u=-1!==["left","right"].indexOf(e.placement),d=-1!==e.placement.indexOf("-"),p=t?u||d||l%2==c%2?a:r:o,h=t?a:o;return{left:p(l%2==1&&c%2==1&&!d&&t?s.left-1:s.left),top:h(s.top),bottom:h(s.bottom),right:p(s.right)}}(e,window.devicePixelRatio<2||!J),h="bottom"===n?"top":"bottom",f="right"===s?"left":"right",g=V("transform");if(o="bottom"===h?"HTML"===c.nodeName?-c.clientHeight+p.bottom:-u.height+p.bottom:p.top,r="right"===f?"HTML"===c.nodeName?-c.clientWidth+p.right:-u.width+p.right:p.left,l&&g)d[g]="translate3d("+r+"px, "+o+"px, 0)",d[h]=0,d[f]=0,d.willChange="transform";else{var b="bottom"===h?-1:1,v="right"===f?-1:1;d[h]=o*b,d[f]=r*v,d.willChange=h+", "+f}var y={"x-placement":e.placement};return e.attributes=j({},y,e.attributes),e.styles=j({},d,e.styles),e.arrowStyles=j({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return Z(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&Z(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,s,i){var a=E(i,t,e,n.positionFixed),r=A(n.placement,a,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",r),Z(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ie=function(){function e(t,n){var s=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};S(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(s.update)},this.update=a(this.update.bind(this)),this.options=j({},e.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(j({},e.Defaults.modifiers,i.modifiers)).forEach((function(t){s.options.modifiers[t]=j({},e.Defaults.modifiers[t]||{},i.modifiers?i.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return j({name:e},s.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&r(e.onLoad)&&e.onLoad(s.reference,s.popper,s.options,e,s.state)})),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return w(e,[{key:"update",value:function(){return B.call(this)}},{key:"destroy",value:function(){return $.call(this)}},{key:"enableEventListeners",value:function(){return G.call(this)}},{key:"disableEventListeners",value:function(){return K.call(this)}}]),e}();ie.Utils=("undefined"!=typeof window?window:n.g).PopperUtils,ie.placements=ee,ie.Defaults=se;const ae=ie},92703:(e,t,n)=>{"use strict";var s=n(50414);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,r){if(r!==s){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},45697:(e,t,n)=>{e.exports=n(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},3689:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ucs2decode:()=>h,ucs2encode:()=>m,decode:()=>b,encode:()=>v,toASCII:()=>_,toUnicode:()=>y,default:()=>x});const s=2147483647,i=36,a=/^xn--/,r=/[^\0-\x7E]/,o=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},c=Math.floor,u=String.fromCharCode;function d(e){throw new RangeError(l[e])}function p(e,t){const n=e.split("@");let s="";n.length>1&&(s=n[0]+"@",e=n[1]);const i=function(e,t){const n=[];let s=e.length;for(;s--;)n[s]=t(e[s]);return n}((e=e.replace(o,".")).split("."),t).join(".");return s+i}function h(e){const t=[];let n=0;const s=e.length;for(;n<s;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<s){const s=e.charCodeAt(n++);56320==(64512&s)?t.push(((1023&i)<<10)+(1023&s)+65536):(t.push(i),n--)}else t.push(i)}return t}const m=e=>String.fromCodePoint(...e),f=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},g=function(e,t,n){let s=0;for(e=n?c(e/700):e>>1,e+=c(e/t);e>455;s+=i)e=c(e/35);return c(s+36*e/(e+38))},b=function(e){const t=[],n=e.length;let a=0,r=128,o=72,l=e.lastIndexOf("-");l<0&&(l=0);for(let n=0;n<l;++n)e.charCodeAt(n)>=128&&d("not-basic"),t.push(e.charCodeAt(n));for(let p=l>0?l+1:0;p<n;){let l=a;for(let t=1,r=i;;r+=i){p>=n&&d("invalid-input");const l=(u=e.charCodeAt(p++))-48<10?u-22:u-65<26?u-65:u-97<26?u-97:i;(l>=i||l>c((s-a)/t))&&d("overflow"),a+=l*t;const h=r<=o?1:r>=o+26?26:r-o;if(l<h)break;const m=i-h;t>c(s/m)&&d("overflow"),t*=m}const h=t.length+1;o=g(a-l,h,0==l),c(a/h)>s-r&&d("overflow"),r+=c(a/h),a%=h,t.splice(a++,0,r)}var u;return String.fromCodePoint(...t)},v=function(e){const t=[];let n=(e=h(e)).length,a=128,r=0,o=72;for(const n of e)n<128&&t.push(u(n));let l=t.length,p=l;for(l&&t.push("-");p<n;){let n=s;for(const t of e)t>=a&&t<n&&(n=t);const h=p+1;n-a>c((s-r)/h)&&d("overflow"),r+=(n-a)*h,a=n;for(const n of e)if(n<a&&++r>s&&d("overflow"),n==a){let e=r;for(let n=i;;n+=i){const s=n<=o?1:n>=o+26?26:n-o;if(e<s)break;const a=e-s,r=i-s;t.push(u(f(s+a%r,0))),e=c(a/r)}t.push(u(f(e,0))),o=g(r,h,p==l),r=0,++p}++r,++a}return t.join("")},y=function(e){return p(e,(function(e){return a.test(e)?b(e.slice(4).toLowerCase()):e}))},_=function(e){return p(e,(function(e){return r.test(e)?"xn--"+v(e):e}))},x={version:"2.1.0",ucs2:{decode:h,encode:m},decode:b,encode:v,toASCII:_,toUnicode:y}},55798:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,s="RFC3986";e.exports={default:s,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:s}},80129:(e,t,n)=>{"use strict";var s=n(58261),i=n(55235),a=n(55798);e.exports={formats:a,parse:i,stringify:s}},55235:(e,t,n)=>{"use strict";var s=n(12769),i=Object.prototype.hasOwnProperty,a=Array.isArray,r={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:s.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,s){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,r=/(\[[^[\]]*])/g,o=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=o?a.slice(0,o.index):a,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var d=0;n.depth>0&&null!==(o=r.exec(a))&&d<n.depth;){if(d+=1,!n.plainObjects&&i.call(Object.prototype,o[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(o[1])}return o&&u.push("["+a.slice(o.index)+"]"),function(e,t,n,s){for(var i=s?t:l(t,n),a=e.length-1;a>=0;--a){var r,o=e[a];if("[]"===o&&n.parseArrays)r=[].concat(i);else{r=n.plainObjects?Object.create(null):{};var c="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&o!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(r=[])[u]=i:r[c]=i:r={0:i}}i=r}return i}(u,t,n,s)}};e.exports=function(e,t){var n=function(e){if(!e)return r;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?r.charset:e.charset;return{allowDots:void 0===e.allowDots?r.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:r.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:r.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:r.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:r.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:r.comma,decoder:"function"==typeof e.decoder?e.decoder:r.decoder,delimiter:"string"==typeof e.delimiter||s.isRegExp(e.delimiter)?e.delimiter:r.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:r.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:r.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:r.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:r.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,p=u.split(t.delimiter,d),h=-1,m=t.charset;if(t.charsetSentinel)for(n=0;n<p.length;++n)0===p[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[n]?m="utf-8":"utf8=%26%2310003%3B"===p[n]&&(m="iso-8859-1"),h=n,n=p.length);for(n=0;n<p.length;++n)if(n!==h){var f,g,b=p[n],v=b.indexOf("]="),y=-1===v?b.indexOf("="):v+1;-1===y?(f=t.decoder(b,r.decoder,m,"key"),g=t.strictNullHandling?null:""):(f=t.decoder(b.slice(0,y),r.decoder,m,"key"),g=s.maybeMap(l(b.slice(y+1),t),(function(e){return t.decoder(e,r.decoder,m,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===m&&(g=o(g)),b.indexOf("[]=")>-1&&(g=a(g)?[g]:g),i.call(c,f)?c[f]=s.combine(c[f],g):c[f]=g}return c}(e,n):e,d=n.plainObjects?Object.create(null):{},p=Object.keys(u),h=0;h<p.length;++h){var m=p[h],f=c(m,u[m],n,"string"==typeof e);d=s.merge(d,f,n)}return!0===n.allowSparse?d:s.compact(d)}},58261:(e,t,n)=>{"use strict";var s=n(37478),i=n(12769),a=n(55798),r=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},d=Date.prototype.toISOString,p=a.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:p,formatter:a.formatters[p],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},m=function e(t,n,a,r,o,c,d,p,m,f,g,b,v,y,_){var x,S=t;if(_.has(t))throw new RangeError("Cyclic object value");if("function"==typeof d?S=d(n,S):S instanceof Date?S=f(S):"comma"===a&&l(S)&&(S=i.maybeMap(S,(function(e){return e instanceof Date?f(e):e}))),null===S){if(r)return c&&!v?c(n,h.encoder,y,"key",g):n;S=""}if("string"==typeof(x=S)||"number"==typeof x||"boolean"==typeof x||"symbol"==typeof x||"bigint"==typeof x||i.isBuffer(S))return c?[b(v?n:c(n,h.encoder,y,"key",g))+"="+b(c(S,h.encoder,y,"value",g))]:[b(n)+"="+b(String(S))];var w,k=[];if(void 0===S)return k;if("comma"===a&&l(S))w=[{value:S.length>0?S.join(",")||null:void 0}];else if(l(d))w=d;else{var j=Object.keys(S);w=p?j.sort(p):j}for(var T=0;T<w.length;++T){var C=w[T],D="object"==typeof C&&void 0!==C.value?C.value:S[C];if(!o||null!==D){var P=l(S)?"function"==typeof a?a(n,C):n:n+(m?"."+C:"["+C+"]");_.set(t,!0);var I=s();u(k,e(D,P,a,r,o,c,d,p,m,f,g,b,v,y,I))}}return k};e.exports=function(e,t){var n,i=e,c=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=a.default;if(void 0!==e.format){if(!r.call(a.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var s=a.formatters[n],i=h.filter;return("function"==typeof e.filter||l(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:i,format:n,formatter:s,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof c.filter?i=(0,c.filter)("",i):l(c.filter)&&(n=c.filter);var d,p=[];if("object"!=typeof i||null===i)return"";d=t&&t.arrayFormat in o?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=o[d];n||(n=Object.keys(i)),c.sort&&n.sort(c.sort);for(var g=s(),b=0;b<n.length;++b){var v=n[b];c.skipNulls&&null===i[v]||u(p,m(i[v],v,f,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var y=p.join(c.delimiter),_=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),y.length>0?_+y:""}},12769:(e,t,n)=>{"use strict";var s=n(55798),i=Object.prototype.hasOwnProperty,a=Array.isArray,r=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},s=0;s<e.length;++s)void 0!==e[s]&&(n[s]=e[s]);return n};e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],s=0;s<t.length;++s)for(var i=t[s],r=i.obj[i.prop],o=Object.keys(r),l=0;l<o.length;++l){var c=o[l],u=r[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:r,prop:c}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var s=[],i=0;i<n.length;++i)void 0!==n[i]&&s.push(n[i]);t.obj[t.prop]=s}}}(t),e},decode:function(e,t,n){var s=e.replace(/\+/g," ");if("iso-8859-1"===n)return s.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(s)}catch(e){return s}},encode:function(e,t,n,i,a){if(0===e.length)return e;var o=e;if("symbol"==typeof e?o=Symbol.prototype.toString.call(e):"string"!=typeof e&&(o=String(e)),"iso-8859-1"===n)return escape(o).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",c=0;c<o.length;++c){var u=o.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===s.RFC1738&&(40===u||41===u)?l+=o.charAt(c):u<128?l+=r[u]:u<2048?l+=r[192|u>>6]+r[128|63&u]:u<55296||u>=57344?l+=r[224|u>>12]+r[128|u>>6&63]+r[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&o.charCodeAt(c)),l+=r[240|u>>18]+r[128|u>>12&63]+r[128|u>>6&63]+r[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],s=0;s<e.length;s+=1)n.push(t(e[s]));return n}return t(e)},merge:function e(t,n,s){if(!n)return t;if("object"!=typeof n){if(a(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(s&&(s.plainObjects||s.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var r=t;return a(t)&&!a(n)&&(r=o(t,s)),a(t)&&a(n)?(n.forEach((function(n,a){if(i.call(t,a)){var r=t[a];r&&"object"==typeof r&&n&&"object"==typeof n?t[a]=e(r,n,s):t.push(n)}else t[a]=n})),t):Object.keys(n).reduce((function(t,a){var r=n[a];return i.call(t,a)?t[a]=e(t[a],r,s):t[a]=r,t}),r)}}},54087:(e,t,n)=>{for(var s=n(75),i="undefined"==typeof window?n.g:window,a=["moz","webkit"],r="AnimationFrame",o=i["request"+r],l=i["cancel"+r]||i["cancelRequest"+r],c=0;!o&&c<a.length;c++)o=i[a[c]+"Request"+r],l=i[a[c]+"Cancel"+r]||i[a[c]+"CancelRequest"+r];if(!o||!l){var u=0,d=0,p=[];o=function(e){if(0===p.length){var t=s(),n=Math.max(0,16.666666666666668-(t-u));u=n+t,setTimeout((function(){var e=p.slice(0);p.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(u)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))}return p.push({handle:++d,callback:e,cancelled:!1}),d},l=function(e){for(var t=0;t<p.length;t++)p[t].handle===e&&(p[t].cancelled=!0)}}e.exports=function(e){return o.call(i,e)},e.exports.cancel=function(){l.apply(i,arguments)},e.exports.polyfill=function(e){e||(e=i),e.requestAnimationFrame=o,e.cancelAnimationFrame=l}},74300:(e,t,n)=>{"use strict";function s(e){return s="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},s(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var i=o(n(67294)),a=o(n(20640)),r=["text","onCopy","options","children"];function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function h(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return m(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(b,e);var t,n,s,o,l=(s=b,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(s);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function b(){var e;u(this,b);for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return g(m(e=l.call.apply(l,[this].concat(n))),"onClick",(function(t){var n=e.props,s=n.text,r=n.onCopy,o=n.children,l=n.options,c=i.default.Children.only(o),u=(0,a.default)(s,l);r&&r(s,u),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(t)})),e}return t=b,(n=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=function(e,t){if(null==e)return{};var n,s,i=function(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,r),s=i.default.Children.only(t);return i.default.cloneElement(s,c(c({},n),{},{onClick:this.onClick}))}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(i.default.PureComponent);t.CopyToClipboard=b,g(b,"defaultProps",{onCopy:void 0,options:void 0})},74855:(e,t,n)=>{"use strict";var s=n(74300).CopyToClipboard;s.CopyToClipboard=s,e.exports=s},9198:function(e,t,n){!function(e,t,s,i,a,r,o,l,c,u,d,p,h,m,f,g,b,v,y,_,x,S,w,k,j,T,C,D,P,I,O,L,M,A,E,U,R,N,F,Y,B,H,V,$,W,z,q,G,K,X,Z,J,Q,ee,te,ne,se,ie,ae,re,oe,le,ce){"use strict";function ue(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var de=ue(t),pe=ue(i),he=ue(a),me=ue(r),fe=ue(o),ge=ue(l),be=ue(c),ve=ue(u),ye=ue(d),_e=ue(p),xe=ue(h),Se=ue(g),we=ue(b),ke=ue(v),je=ue(y),Te=ue(_),Ce=ue(x),De=ue(S),Pe=ue(w),Ie=ue(k),Oe=ue(j),Le=ue(T),Me=ue(C),Ae=ue(D),Ee=ue(P),Ue=ue(I),Re=ue(O),Ne=ue(L),Fe=ue(M),Ye=ue(A),Be=ue(E),He=ue(U),Ve=ue(R),$e=ue(N),We=ue(F),ze=ue(B),qe=ue(H),Ge=ue(V),Ke=ue($),Xe=ue(W),Ze=ue(z),Je=ue(q),Qe=ue(X),et=ue(Z),tt=ue(J),nt=ue(Q),st=ue(ee),it=ue(te),at=ue(ne),rt=ue(se),ot=ue(ie),lt=ue(ae),ct=ue(re),ut=ue(oe),dt=ue(ce);function pt(e){return(pt="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})(e)}function ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mt(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function ft(e,t,n){return t&&mt(e.prototype,t),n&&mt(e,n),e}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bt(){return(bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function vt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(n),!0).forEach((function(t){gt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _t(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&St(e,t)}function xt(e){return(xt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?wt(e):t}function jt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,s=xt(e);if(t){var i=xt(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.apply(this,arguments);return kt(this,n)}}function Tt(e){return function(e){if(Array.isArray(e))return Ct(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function Dt(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}}function Pt(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}}var It={p:Pt,P:function(e,t){var n,s=e.match(/(P+)(p+)?/),i=s[1],a=s[2];if(!a)return Dt(e,t);switch(i){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Dt(i,t)).replace("{{time}}",Pt(a,t))}},Ot=12,Lt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function Mt(e){var t=e?"string"==typeof e||e instanceof String?ct.default(e):ot.default(e):new Date;return Et(t)?t:null}function At(e,t,n,s){var i=null,a=Jt(n)||Jt(Zt()),r=!0;return Array.isArray(t)?(t.forEach((function(t){var n=lt.default(e,t,new Date,{locale:a});s&&(r=Et(n)&&e===fe.default(n,t,{awareOfUnicodeTokens:!0})),Et(n)&&r&&(i=n)})),i):(i=lt.default(e,t,new Date,{locale:a}),s?r=Et(i)&&e===fe.default(i,t,{awareOfUnicodeTokens:!0}):Et(i)||(t=t.match(Lt).map((function(e){var t=e[0];return"p"===t||"P"===t?a?(0,It[t])(e,a.formatLong):t:e})).join(""),e.length>0&&(i=lt.default(e,t.slice(0,e.length),new Date)),Et(i)||(i=new Date(e))),Et(i)&&r?i:null)}function Et(e){return me.default(e)&&it.default(e,new Date("1/1/1000"))}function Ut(e,t,n){if("en"===n)return fe.default(e,t,{awareOfUnicodeTokens:!0});var s=Jt(n);return n&&!s&&console.warn('A locale object was not found for the provided string ["'.concat(n,'"].')),!s&&Zt()&&Jt(Zt())&&(s=Jt(Zt())),fe.default(e,t,{locale:s||null,awareOfUnicodeTokens:!0})}function Rt(e,t){var n=t.hour,s=void 0===n?0:n,i=t.minute,a=void 0===i?0:i,r=t.second,o=void 0===r?0:r;return Ne.default(Re.default(Ue.default(e,o),a),s)}function Nt(e,t){var n=t&&Jt(t)||Zt()&&Jt(Zt());return Oe.default(e,n?{locale:n}:null)}function Ft(e,t){return Ut(e,"ddd",t)}function Yt(e){return qe.default(e)}function Bt(e,t){var n=Jt(t||Zt());return Ge.default(e,{locale:n})}function Ht(e){return Ke.default(e)}function Vt(e){return Ze.default(e)}function $t(e){return Xe.default(e)}function Wt(e,t){return e&&t?nt.default(e,t):!e&&!t}function zt(e,t){return e&&t?tt.default(e,t):!e&&!t}function qt(e,t){return e&&t?st.default(e,t):!e&&!t}function Gt(e,t){return e&&t?et.default(e,t):!e&&!t}function Kt(e,t){return e&&t?Qe.default(e,t):!e&&!t}function Xt(e,t,n){var s,i=qe.default(t),a=Je.default(n);try{s=rt.default(e,{start:i,end:a})}catch(e){s=!1}return s}function Zt(){return("undefined"!=typeof window?window:n.g).__localeId__}function Jt(e){if("string"==typeof e){var t="undefined"!=typeof window?window:n.g;return t.__localeData__?t.__localeData__[e]:null}return e}function Qt(e,t){return Ut(Fe.default(Mt(),e),"LLLL",t)}function en(e,t){return Ut(Fe.default(Mt(),e),"LLL",t)}function tn(e,t){return Ut(Ye.default(Mt(),e),"QQQ",t)}function nn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.maxDate,i=t.excludeDates,a=t.includeDates,r=t.filterDate;return un(e,{minDate:n,maxDate:s})||i&&i.some((function(t){return Gt(e,t)}))||a&&!a.some((function(t){return Gt(e,t)}))||r&&!r(Mt(e))||!1}function sn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).excludeDates;return t&&t.some((function(t){return Gt(e,t)}))||!1}function an(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.maxDate,i=t.excludeDates,a=t.includeDates,r=t.filterDate;return un(e,{minDate:n,maxDate:s})||i&&i.some((function(t){return zt(e,t)}))||a&&!a.some((function(t){return zt(e,t)}))||r&&!r(Mt(e))||!1}function rn(e,t,n,s){var i=Ae.default(e),a=Le.default(e),r=Ae.default(t),o=Le.default(t),l=Ae.default(s);return i===r&&i===l?a<=n&&n<=o:i<r?l===i&&a<=n||l===r&&o>=n||l<r&&l>i:void 0}function on(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.maxDate,i=t.excludeDates,a=t.includeDates,r=t.filterDate;return un(e,{minDate:n,maxDate:s})||i&&i.some((function(t){return qt(e,t)}))||a&&!a.some((function(t){return qt(e,t)}))||r&&!r(Mt(e))||!1}function ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.maxDate;return un(new Date(e,0,1),{minDate:n,maxDate:s})||!1}function cn(e,t,n,s){var i=Ae.default(e),a=Me.default(e),r=Ae.default(t),o=Me.default(t),l=Ae.default(s);return i===r&&i===l?a<=n&&n<=o:i<r?l===i&&a<=n||l===r&&o>=n||l<r&&l>i:void 0}function un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.maxDate;return n&&$e.default(e,n)<0||s&&$e.default(e,s)>0}function dn(e,t){return t.some((function(t){return De.default(t)===De.default(e)&&Ce.default(t)===Ce.default(e)}))}function pn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.excludeTimes,s=t.includeTimes,i=t.filterTime;return n&&dn(e,n)||s&&!dn(e,s)||i&&!i(e)||!1}function hn(e,t){var n=t.minTime,s=t.maxTime;if(!n||!s)throw new Error("Both minTime and maxTime props required");var i,a=Mt(),r=Ne.default(Re.default(a,Ce.default(e)),De.default(e)),o=Ne.default(Re.default(a,Ce.default(n)),De.default(n)),l=Ne.default(Re.default(a,Ce.default(s)),De.default(s));try{i=!rt.default(r,{start:o,end:l})}catch(e){i=!1}return i}function mn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.includeDates,i=ke.default(e,1);return n&&We.default(n,i)>0||s&&s.every((function(e){return We.default(e,i)>0}))||!1}function fn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,s=t.includeDates,i=_e.default(e,1);return n&&We.default(i,n)>0||s&&s.every((function(e){return We.default(i,e)>0}))||!1}function gn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.includeDates,i=je.default(e,1);return n&&ze.default(n,i)>0||s&&s.every((function(e){return ze.default(e,i)>0}))||!1}function bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,s=t.includeDates,i=xe.default(e,1);return n&&ze.default(i,n)>0||s&&s.every((function(e){return ze.default(i,e)>0}))||!1}function vn(e){var t=e.minDate,n=e.includeDates;if(n&&t){var s=n.filter((function(e){return $e.default(e,t)>=0}));return He.default(s)}return n?He.default(n):t}function yn(e){var t=e.maxDate,n=e.includeDates;if(n&&t){var s=n.filter((function(e){return $e.default(e,t)<=0}));return Ve.default(s)}return n?Ve.default(n):t}function _n(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"react-datepicker__day--highlighted",n=new Map,s=0,i=e.length;s<i;s++){var a=e[s];if(he.default(a)){var r=Ut(a,"MM.dd.yyyy"),o=n.get(r)||[];o.includes(t)||(o.push(t),n.set(r,o))}else if("object"===pt(a)){var l=Object.keys(a),c=l[0],u=a[l[0]];if("string"==typeof c&&u.constructor===Array)for(var d=0,p=u.length;d<p;d++){var h=Ut(u[d],"MM.dd.yyyy"),m=n.get(h)||[];m.includes(c)||(m.push(c),n.set(h,m))}}}return n}function xn(e,t,n,s,i){for(var a=i.length,r=[],o=0;o<a;o++){var l=ge.default(be.default(e,De.default(i[o])),Ce.default(i[o])),c=ge.default(e,(n+1)*s);it.default(l,t)&&at.default(l,c)&&r.push(i[o])}return r}function Sn(e){return e<10?"0".concat(e):"".concat(e)}function wn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ot,n=Math.ceil(Ae.default(e)/t)*t;return{startPeriod:n-(t-1),endPeriod:n}}function kn(e,t,n,s){for(var i=[],a=0;a<2*t+1;a++){var r=e+t-a,o=!0;n&&(o=Ae.default(n)<=r),s&&o&&(o=Ae.default(s)>=r),o&&i.push(r)}return i}var jn=function(e){_t(n,e);var t=jt(n);function n(e){var s;ht(this,n),gt(wt(s=t.call(this,e)),"renderOptions",(function(){var e=s.props.year,t=s.state.yearsList.map((function(t){return de.default.createElement("div",{className:e===t?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:t,onClick:s.onChange.bind(wt(s),t)},e===t?de.default.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",t)})),n=s.props.minDate?Ae.default(s.props.minDate):null,i=s.props.maxDate?Ae.default(s.props.maxDate):null;return i&&s.state.yearsList.find((function(e){return e===i}))||t.unshift(de.default.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:s.incrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),n&&s.state.yearsList.find((function(e){return e===n}))||t.push(de.default.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:s.decrementYears},de.default.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),t})),gt(wt(s),"onChange",(function(e){s.props.onChange(e)})),gt(wt(s),"handleClickOutside",(function(){s.props.onCancel()})),gt(wt(s),"shiftYears",(function(e){var t=s.state.yearsList.map((function(t){return t+e}));s.setState({yearsList:t})})),gt(wt(s),"incrementYears",(function(){return s.shiftYears(1)})),gt(wt(s),"decrementYears",(function(){return s.shiftYears(-1)}));var i=e.yearDropdownItemNumber,a=e.scrollableYearDropdown,r=i||(a?10:5);return s.state={yearsList:kn(s.props.year,r,s.props.minDate,s.props.maxDate)},s}return ft(n,[{key:"render",value:function(){var e=pe.default({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return de.default.createElement("div",{className:e},this.renderOptions())}}]),n}(de.default.Component),Tn=ut.default(jn),Cn=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{dropdownVisible:!1}),gt(wt(e),"renderSelectOptions",(function(){for(var t=e.props.minDate?Ae.default(e.props.minDate):1900,n=e.props.maxDate?Ae.default(e.props.maxDate):2100,s=[],i=t;i<=n;i++)s.push(de.default.createElement("option",{key:i,value:i},i));return s})),gt(wt(e),"onSelectChange",(function(t){e.onChange(t.target.value)})),gt(wt(e),"renderSelectMode",(function(){return de.default.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())})),gt(wt(e),"renderReadView",(function(t){return de.default.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:function(t){return e.toggleDropdown(t)}},de.default.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),de.default.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))})),gt(wt(e),"renderDropdown",(function(){return de.default.createElement(Tn,{key:"dropdown",year:e.props.year,onChange:e.onChange,onCancel:e.toggleDropdown,minDate:e.props.minDate,maxDate:e.props.maxDate,scrollableYearDropdown:e.props.scrollableYearDropdown,yearDropdownItemNumber:e.props.yearDropdownItemNumber})})),gt(wt(e),"renderScrollMode",(function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n})),gt(wt(e),"onChange",(function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)})),gt(wt(e),"toggleDropdown",(function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},(function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)}))})),gt(wt(e),"handleYearChange",(function(t,n){e.onSelect(t,n),e.setOpen()})),gt(wt(e),"onSelect",(function(t,n){e.props.onSelect&&e.props.onSelect(t,n)})),gt(wt(e),"setOpen",(function(){e.props.setOpen&&e.props.setOpen(!0)})),e}return ft(n,[{key:"render",value:function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode()}return de.default.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),n}(de.default.Component),Dn=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"renderOptions",(function(){return e.props.monthNames.map((function(t,n){return de.default.createElement("div",{className:e.props.month===n?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(wt(e),n)},e.props.month===n?de.default.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)}))})),gt(wt(e),"onChange",(function(t){return e.props.onChange(t)})),gt(wt(e),"handleClickOutside",(function(){return e.props.onCancel()})),e}return ft(n,[{key:"render",value:function(){return de.default.createElement("div",{className:"react-datepicker__month-dropdown"},this.renderOptions())}}]),n}(de.default.Component),Pn=ut.default(Dn),In=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{dropdownVisible:!1}),gt(wt(e),"renderSelectOptions",(function(e){return e.map((function(e,t){return de.default.createElement("option",{key:t,value:t},e)}))})),gt(wt(e),"renderSelectMode",(function(t){return de.default.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(t){return e.onChange(t.target.value)}},e.renderSelectOptions(t))})),gt(wt(e),"renderReadView",(function(t,n){return de.default.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},de.default.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),de.default.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},n[e.props.month]))})),gt(wt(e),"renderDropdown",(function(t){return de.default.createElement(Pn,{key:"dropdown",month:e.props.month,monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown})})),gt(wt(e),"renderScrollMode",(function(t){var n=e.state.dropdownVisible,s=[e.renderReadView(!n,t)];return n&&s.unshift(e.renderDropdown(t)),s})),gt(wt(e),"onChange",(function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)})),gt(wt(e),"toggleDropdown",(function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})})),e}return ft(n,[{key:"render",value:function(){var e,t=this,n=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(e){return en(e,t.props.locale)}:function(e){return Qt(e,t.props.locale)});switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode(n);break;case"select":e=this.renderSelectMode(n)}return de.default.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),n}(de.default.Component);function On(e,t){for(var n=[],s=Ht(e),i=Ht(t);!it.default(s,i);)n.push(Mt(s)),s=_e.default(s,1);return n}var Ln=function(e){_t(n,e);var t=jt(n);function n(e){var s;return ht(this,n),gt(wt(s=t.call(this,e)),"renderOptions",(function(){return s.state.monthYearsList.map((function(e){var t=Ee.default(e),n=Wt(s.props.date,e)&&zt(s.props.date,e);return de.default.createElement("div",{className:n?"react-datepicker__month-year-option --selected_month-year":"react-datepicker__month-year-option",key:t,onClick:s.onChange.bind(wt(s),t)},n?de.default.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",Ut(e,s.props.dateFormat,s.props.locale))}))})),gt(wt(s),"onChange",(function(e){return s.props.onChange(e)})),gt(wt(s),"handleClickOutside",(function(){s.props.onCancel()})),s.state={monthYearsList:On(s.props.minDate,s.props.maxDate)},s}return ft(n,[{key:"render",value:function(){var e=pe.default({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return de.default.createElement("div",{className:e},this.renderOptions())}}]),n}(de.default.Component),Mn=ut.default(Ln),An=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{dropdownVisible:!1}),gt(wt(e),"renderSelectOptions",(function(){for(var t=Ht(e.props.minDate),n=Ht(e.props.maxDate),s=[];!it.default(t,n);){var i=Ee.default(t);s.push(de.default.createElement("option",{key:i,value:i},Ut(t,e.props.dateFormat,e.props.locale))),t=_e.default(t,1)}return s})),gt(wt(e),"onSelectChange",(function(t){e.onChange(t.target.value)})),gt(wt(e),"renderSelectMode",(function(){return de.default.createElement("select",{value:Ee.default(Ht(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())})),gt(wt(e),"renderReadView",(function(t){var n=Ut(e.props.date,e.props.dateFormat,e.props.locale);return de.default.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:function(t){return e.toggleDropdown(t)}},de.default.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),de.default.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},n))})),gt(wt(e),"renderDropdown",(function(){return de.default.createElement(Mn,{key:"dropdown",date:e.props.date,dateFormat:e.props.dateFormat,onChange:e.onChange,onCancel:e.toggleDropdown,minDate:e.props.minDate,maxDate:e.props.maxDate,scrollableMonthYearDropdown:e.props.scrollableMonthYearDropdown,locale:e.props.locale})})),gt(wt(e),"renderScrollMode",(function(){var t=e.state.dropdownVisible,n=[e.renderReadView(!t)];return t&&n.unshift(e.renderDropdown()),n})),gt(wt(e),"onChange",(function(t){e.toggleDropdown();var n=Mt(parseInt(t));Wt(e.props.date,n)&&zt(e.props.date,n)||e.props.onChange(n)})),gt(wt(e),"toggleDropdown",(function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})})),e}return ft(n,[{key:"render",value:function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode()}return de.default.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)}}]),n}(de.default.Component),En=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"dayEl",de.default.createRef()),gt(wt(e),"handleClick",(function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)})),gt(wt(e),"handleMouseEnter",(function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)})),gt(wt(e),"handleOnKeyDown",(function(t){" "===t.key&&(t.preventDefault(),t.key="Enter"),e.props.handleOnKeyDown(t)})),gt(wt(e),"isSameDay",(function(t){return Gt(e.props.day,t)})),gt(wt(e),"isKeyboardSelected",(function(){return!e.props.disabledKeyboardNavigation&&!e.isSameDay(e.props.selected)&&e.isSameDay(e.props.preSelection)})),gt(wt(e),"isDisabled",(function(){return nn(e.props.day,e.props)})),gt(wt(e),"isExcluded",(function(){return sn(e.props.day,e.props)})),gt(wt(e),"getHighLightedClass",(function(t){var n=e.props,s=n.day,i=n.highlightDates;if(!i)return!1;var a=Ut(s,"MM.dd.yyyy");return i.get(a)})),gt(wt(e),"isInRange",(function(){var t=e.props,n=t.day,s=t.startDate,i=t.endDate;return!(!s||!i)&&Xt(n,s,i)})),gt(wt(e),"isInSelectingRange",(function(){var t=e.props,n=t.day,s=t.selectsStart,i=t.selectsEnd,a=t.selectsRange,r=t.selectingDate,o=t.startDate,l=t.endDate;return!(!(s||i||a)||!r||e.isDisabled())&&(s&&l&&(at.default(r,l)||Kt(r,l))?Xt(n,r,l):(i&&o&&(it.default(r,o)||Kt(r,o))||!(!a||!o||l||!it.default(r,o)&&!Kt(r,o)))&&Xt(n,o,r))})),gt(wt(e),"isSelectingRangeStart",(function(){if(!e.isInSelectingRange())return!1;var t=e.props,n=t.day,s=t.selectingDate,i=t.startDate;return Gt(n,t.selectsStart?s:i)})),gt(wt(e),"isSelectingRangeEnd",(function(){if(!e.isInSelectingRange())return!1;var t=e.props,n=t.day,s=t.selectingDate,i=t.endDate;return Gt(n,t.selectsEnd?s:i)})),gt(wt(e),"isRangeStart",(function(){var t=e.props,n=t.day,s=t.startDate,i=t.endDate;return!(!s||!i)&&Gt(s,n)})),gt(wt(e),"isRangeEnd",(function(){var t=e.props,n=t.day,s=t.startDate,i=t.endDate;return!(!s||!i)&&Gt(i,n)})),gt(wt(e),"isWeekend",(function(){var t=Pe.default(e.props.day);return 0===t||6===t})),gt(wt(e),"isOutsideMonth",(function(){return void 0!==e.props.month&&e.props.month!==Le.default(e.props.day)})),gt(wt(e),"getClassNames",(function(t){var n=e.props.dayClassName?e.props.dayClassName(t):void 0;return pe.default("react-datepicker__day",n,"react-datepicker__day--"+Ft(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSameDay(e.props.selected),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isSameDay(Mt()),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isOutsideMonth()},e.getHighLightedClass("react-datepicker__day--highlighted"))})),gt(wt(e),"getAriaLabel",(function(){var t=e.props,n=t.day,s=t.ariaLabelPrefixWhenEnabled,i=void 0===s?"Choose":s,a=t.ariaLabelPrefixWhenDisabled,r=void 0===a?"Not available":a,o=e.isDisabled()||e.isExcluded()?r:i;return"".concat(o," ").concat(Ut(n,"PPPP"))})),gt(wt(e),"getTabIndex",(function(t,n){var s=t||e.props.selected,i=n||e.props.preSelection;return e.isKeyboardSelected()||e.isSameDay(s)&&Gt(i,s)?0:-1})),gt(wt(e),"handleFocusDay",(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=!1;0===e.getTabIndex()&&!t.isInputFocused&&e.isSameDay(e.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||(n=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(n=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(n=!0)),n&&e.dayEl.current.focus({preventScroll:!0})})),gt(wt(e),"renderDayContents",(function(){if(e.isOutsideMonth()){if(e.props.monthShowsDuplicateDaysEnd&&Ie.default(e.props.day)<10)return null;if(e.props.monthShowsDuplicateDaysStart&&Ie.default(e.props.day)>20)return null}return e.props.renderDayContents?e.props.renderDayContents(Ie.default(e.props.day),e.props.day):Ie.default(e.props.day)})),gt(wt(e),"render",(function(){return de.default.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.handleMouseEnter,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"button","aria-disabled":e.isDisabled()},e.renderDayContents())})),e}return ft(n,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(e){this.handleFocusDay(e)}}]),n}(de.default.Component),Un=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"handleClick",(function(t){e.props.onClick&&e.props.onClick(t)})),e}return ft(n,[{key:"render",value:function(){var e=this.props,t=e.weekNumber,n=e.ariaLabelPrefix,s=void 0===n?"week ":n,i={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!e.onClick};return de.default.createElement("div",{className:pe.default(i),"aria-label":"".concat(s," ").concat(this.props.weekNumber),onClick:this.handleClick},t)}}]),n}(de.default.Component),Rn=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"handleDayClick",(function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n)})),gt(wt(e),"handleDayMouseEnter",(function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)})),gt(wt(e),"handleWeekClick",(function(t,n,s){"function"==typeof e.props.onWeekSelect&&e.props.onWeekSelect(t,n,s),e.props.shouldCloseOnSelect&&e.props.setOpen(!1)})),gt(wt(e),"formatWeekNumber",(function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):Nt(t)})),gt(wt(e),"renderDays",(function(){var t=Bt(e.props.day,e.props.locale),n=[],s=e.formatWeekNumber(t);if(e.props.showWeekNumber){var i=e.props.onWeekSelect?e.handleWeekClick.bind(wt(e),t,s):void 0;n.push(de.default.createElement(Un,{key:"W",weekNumber:s,onClick:i,ariaLabelPrefix:e.props.ariaLabelPrefix}))}return n.concat([0,1,2,3,4,5,6].map((function(n){var s=ve.default(t,n);return de.default.createElement(En,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:s.valueOf(),day:s,month:e.props.month,onClick:e.handleDayClick.bind(wt(e),s),onMouseEnter:e.handleDayMouseEnter.bind(wt(e),s),minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,highlightDates:e.props.highlightDates,selectingDate:e.props.selectingDate,filterDate:e.props.filterDate,preSelection:e.props.preSelection,selected:e.props.selected,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,selectsRange:e.props.selectsRange,startDate:e.props.startDate,endDate:e.props.endDate,dayClassName:e.props.dayClassName,renderDayContents:e.props.renderDayContents,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,handleOnKeyDown:e.props.handleOnKeyDown,isInputFocused:e.props.isInputFocused,containerRef:e.props.containerRef,inline:e.props.inline,shouldFocusDayInline:e.props.shouldFocusDayInline,monthShowsDuplicateDaysEnd:e.props.monthShowsDuplicateDaysEnd,monthShowsDuplicateDaysStart:e.props.monthShowsDuplicateDaysStart})})))})),e}return ft(n,[{key:"render",value:function(){return de.default.createElement("div",{className:"react-datepicker__week"},this.renderDays())}}],[{key:"defaultProps",get:function(){return{shouldCloseOnSelect:!0}}}]),n}(de.default.Component),Nn=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"MONTH_REFS",Tt(Array(12)).map((function(){return de.default.createRef()}))),gt(wt(e),"isDisabled",(function(t){return nn(t,e.props)})),gt(wt(e),"isExcluded",(function(t){return sn(t,e.props)})),gt(wt(e),"handleDayClick",(function(t,n){e.props.onDayClick&&e.props.onDayClick(t,n,e.props.orderInDisplay)})),gt(wt(e),"handleDayMouseEnter",(function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)})),gt(wt(e),"handleMouseLeave",(function(){e.props.onMouseLeave&&e.props.onMouseLeave()})),gt(wt(e),"isRangeStartMonth",(function(t){var n=e.props,s=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&zt(Fe.default(s,t),i)})),gt(wt(e),"isRangeStartQuarter",(function(t){var n=e.props,s=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&qt(Ye.default(s,t),i)})),gt(wt(e),"isRangeEndMonth",(function(t){var n=e.props,s=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&zt(Fe.default(s,t),a)})),gt(wt(e),"isRangeEndQuarter",(function(t){var n=e.props,s=n.day,i=n.startDate,a=n.endDate;return!(!i||!a)&&qt(Ye.default(s,t),a)})),gt(wt(e),"isWeekInMonth",(function(t){var n=e.props.day,s=ve.default(t,6);return zt(t,n)||zt(s,n)})),gt(wt(e),"renderWeeks",(function(){for(var t=[],n=e.props.fixedHeight,s=Bt(Ht(e.props.day),e.props.locale),i=0,a=!1;t.push(de.default.createElement(Rn,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,chooseDayAriaLabelPrefix:e.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:e.props.disabledDayAriaLabelPrefix,key:i,day:s,month:Le.default(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,onWeekSelect:e.props.onWeekSelect,formatWeekNumber:e.props.formatWeekNumber,locale:e.props.locale,minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,includeDates:e.props.includeDates,inline:e.props.inline,shouldFocusDayInline:e.props.shouldFocusDayInline,highlightDates:e.props.highlightDates,selectingDate:e.props.selectingDate,filterDate:e.props.filterDate,preSelection:e.props.preSelection,selected:e.props.selected,selectsStart:e.props.selectsStart,selectsEnd:e.props.selectsEnd,selectsRange:e.props.selectsRange,showWeekNumber:e.props.showWeekNumbers,startDate:e.props.startDate,endDate:e.props.endDate,dayClassName:e.props.dayClassName,setOpen:e.props.setOpen,shouldCloseOnSelect:e.props.shouldCloseOnSelect,disabledKeyboardNavigation:e.props.disabledKeyboardNavigation,renderDayContents:e.props.renderDayContents,handleOnKeyDown:e.props.handleOnKeyDown,isInputFocused:e.props.isInputFocused,containerRef:e.props.containerRef,monthShowsDuplicateDaysEnd:e.props.monthShowsDuplicateDaysEnd,monthShowsDuplicateDaysStart:e.props.monthShowsDuplicateDaysStart})),!a;){i++,s=ye.default(s,1);var r=n&&i>=6,o=!n&&!e.isWeekInMonth(s);if(r||o){if(!e.props.peekNextMonth)break;a=!0}}return t})),gt(wt(e),"onMonthClick",(function(t,n){e.handleDayClick(Ht(Fe.default(e.props.day,n)),t)})),gt(wt(e),"handleMonthNavigation",(function(t,n){e.isDisabled(n)||e.isExcluded(n)||(e.props.setPreSelection(n),e.MONTH_REFS[t].current&&e.MONTH_REFS[t].current.focus())})),gt(wt(e),"onMonthKeyDown",(function(t,n){var s=t.key;if(!e.props.disabledKeyboardNavigation)switch(s){case"Enter":e.onMonthClick(t,n),e.props.setPreSelection(e.props.selected);break;case"ArrowRight":e.handleMonthNavigation(11===n?0:n+1,_e.default(e.props.preSelection,1));break;case"ArrowLeft":e.handleMonthNavigation(0===n?11:n-1,ke.default(e.props.preSelection,1))}})),gt(wt(e),"onQuarterClick",(function(t,n){e.handleDayClick($t(Ye.default(e.props.day,n)),t)})),gt(wt(e),"getMonthClassNames",(function(t){var n=e.props,s=n.day,i=n.startDate,a=n.endDate,r=n.selected,o=n.minDate,l=n.maxDate,c=n.preSelection,u=n.monthClassName,d=u?u(s):void 0;return pe.default("react-datepicker__month-text","react-datepicker__month-".concat(t),d,{"react-datepicker__month--disabled":(o||l)&&an(Fe.default(s,t),e.props),"react-datepicker__month--selected":Le.default(s)===t&&Ae.default(s)===Ae.default(r),"react-datepicker__month-text--keyboard-selected":Le.default(c)===t,"react-datepicker__month--in-range":rn(i,a,t,s),"react-datepicker__month--range-start":e.isRangeStartMonth(t),"react-datepicker__month--range-end":e.isRangeEndMonth(t)})})),gt(wt(e),"getTabIndex",(function(t){var n=Le.default(e.props.preSelection);return e.props.disabledKeyboardNavigation||t!==n?"-1":"0"})),gt(wt(e),"getAriaLabel",(function(t){var n=e.props,s=n.ariaLabelPrefix,i=void 0===s?"Choose":s,a=n.disabledDayAriaLabelPrefix,r=void 0===a?"Not available":a,o=n.day,l=Fe.default(o,t),c=e.isDisabled(l)||e.isExcluded(l)?r:i;return"".concat(c," ").concat(Ut(l,"MMMM yyyy"))})),gt(wt(e),"getQuarterClassNames",(function(t){var n=e.props,s=n.day,i=n.startDate,a=n.endDate,r=n.selected,o=n.minDate,l=n.maxDate;return pe.default("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter--disabled":(o||l)&&on(Ye.default(s,t),e.props),"react-datepicker__quarter--selected":Me.default(s)===t&&Ae.default(s)===Ae.default(r),"react-datepicker__quarter--in-range":cn(i,a,t,s),"react-datepicker__quarter--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter--range-end":e.isRangeEndQuarter(t)})})),gt(wt(e),"renderMonths",(function(){var t=e.props,n=t.showFullMonthYearPicker,s=t.showTwoColumnMonthYearPicker,i=t.showFourColumnMonthYearPicker,a=t.locale;return(i?[[0,1,2,3],[4,5,6,7],[8,9,10,11]]:s?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map((function(t,s){return de.default.createElement("div",{className:"react-datepicker__month-wrapper",key:s},t.map((function(t,s){return de.default.createElement("div",{ref:e.MONTH_REFS[t],key:s,onClick:function(n){e.onMonthClick(n,t)},onKeyDown:function(n){e.onMonthKeyDown(n,t)},tabIndex:e.getTabIndex(t),className:e.getMonthClassNames(t),role:"button","aria-label":e.getAriaLabel(t)},n?Qt(t,a):en(t,a))})))}))})),gt(wt(e),"renderQuarters",(function(){return de.default.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map((function(t,n){return de.default.createElement("div",{key:n,onClick:function(n){e.onQuarterClick(n,t)},className:e.getQuarterClassNames(t)},tn(t,e.props.locale))})))})),gt(wt(e),"getClassNames",(function(){var t=e.props;t.day;var n=t.selectingDate,s=t.selectsStart,i=t.selectsEnd,a=t.showMonthYearPicker,r=t.showQuarterYearPicker;return pe.default("react-datepicker__month",{"react-datepicker__month--selecting-range":n&&(s||i)},{"react-datepicker__monthPicker":a},{"react-datepicker__quarterPicker":r})})),e}return ft(n,[{key:"render",value:function(){var e=this.props,t=e.showMonthYearPicker,n=e.showQuarterYearPicker,s=e.day,i=e.ariaLabelPrefix,a=void 0===i?"month ":i;return de.default.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(a," ").concat(Ut(s,"yyyy-MM"))},t?this.renderMonths():n?this.renderQuarters():this.renderWeeks())}}]),n}(de.default.Component),Fn=function(e){_t(n,e);var t=jt(n);function n(){var e;ht(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return gt(wt(e=t.call.apply(t,[this].concat(i))),"state",{height:null}),gt(wt(e),"handleClick",(function(t){(e.props.minTime||e.props.maxTime)&&hn(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&pn(t,e.props)||e.props.onChange(t)})),gt(wt(e),"liClasses",(function(t,n,s){var i=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t,n,s):void 0];return e.props.selected&&n===De.default(t)&&s===Ce.default(t)&&i.push("react-datepicker__time-list-item--selected"),((e.props.minTime||e.props.maxTime)&&hn(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&pn(t,e.props))&&i.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(60*De.default(t)+Ce.default(t))%e.props.intervals!=0&&i.push("react-datepicker__time-list-item--injected"),i.join(" ")})),gt(wt(e),"renderTimes",(function(){for(var t=[],n=e.props.format?e.props.format:"p",s=e.props.intervals,i=Yt(Mt(e.props.selected)),a=1440/s,r=e.props.injectTimes&&e.props.injectTimes.sort((function(e,t){return e-t})),o=e.props.selected||e.props.openToDate||Mt(),l=De.default(o),c=Ce.default(o),u=Ne.default(Re.default(i,c),l),d=0;d<a;d++){var p=ge.default(i,d*s);if(t.push(p),r){var h=xn(i,p,d,s,r);t=t.concat(h)}}return t.map((function(t,s){return de.default.createElement("li",{key:s,onClick:e.handleClick.bind(wt(e),t),className:e.liClasses(t,l,c),ref:function(n){(at.default(t,u)||Kt(t,u))&&(e.centerLi=n)},tabIndex:"0"},Ut(t,n,e.props.locale))}))})),e}return ft(n,[{key:"componentDidMount",value:function(){this.list.scrollTop=n.calcCenterPosition(this.props.monthRef?this.props.monthRef.clientHeight-this.header.clientHeight:this.list.clientHeight,this.centerLi),this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})}},{key:"render",value:function(){var e=this,t=this.state.height;return de.default.createElement("div",{className:"react-datepicker__time-container ".concat(this.props.todayButton?"react-datepicker__time-container--with-today-button":"")},de.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(this.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},de.default.createElement("div",{className:"react-datepicker-time__header"},this.props.timeCaption)),de.default.createElement("div",{className:"react-datepicker__time"},de.default.createElement("div",{className:"react-datepicker__time-box"},de.default.createElement("ul",{className:"react-datepicker__time-list",ref:function(t){e.list=t},style:t?{height:t}:{},tabIndex:"0"},this.renderTimes()))))}}],[{key:"defaultProps",get:function(){return{intervals:30,onTimeChange:function(){},todayButton:null,timeCaption:"Time"}}}]),n}(de.default.Component);gt(Fn,"calcCenterPosition",(function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)}));var Yn=function(e){_t(n,e);var t=jt(n);function n(e){var s;return ht(this,n),gt(wt(s=t.call(this,e)),"handleYearClick",(function(e,t){s.props.onDayClick&&s.props.onDayClick(e,t)})),gt(wt(s),"isSameDay",(function(e,t){return Gt(e,t)})),gt(wt(s),"isKeyboardSelected",(function(e){var t=Vt(Be.default(s.props.date,e));return!s.props.disabledKeyboardNavigation&&!s.props.inline&&!Gt(t,Vt(s.props.selected))&&Gt(t,Vt(s.props.preSelection))})),gt(wt(s),"onYearClick",(function(e,t){var n=s.props.date;s.handleYearClick(Vt(Be.default(n,t)),e)})),gt(wt(s),"getYearClassNames",(function(e){var t=s.props,n=t.minDate,i=t.maxDate,a=t.selected;return pe.default("react-datepicker__year-text",{"react-datepicker__year-text--selected":e===Ae.default(a),"react-datepicker__year-text--disabled":(n||i)&&ln(e,s.props),"react-datepicker__year-text--keyboard-selected":s.isKeyboardSelected(e),"react-datepicker__year-text--today":e===Ae.default(Mt())})})),s}return ft(n,[{key:"render",value:function(){for(var e=this,t=[],n=this.props,s=wn(n.date,n.yearItemNumber),i=s.startPeriod,a=s.endPeriod,r=function(n){t.push(de.default.createElement("div",{onClick:function(t){e.onYearClick(t,n)},className:e.getYearClassNames(n),key:n},n))},o=i;o<=a;o++)r(o);return de.default.createElement("div",{className:"react-datepicker__year"},de.default.createElement("div",{className:"react-datepicker__year-wrapper"},t))}}]),n}(de.default.Component),Bn=function(e){_t(n,e);var t=jt(n);function n(e){var s;return ht(this,n),gt(wt(s=t.call(this,e)),"onTimeChange",(function(e){s.setState({time:e});var t=new Date;t.setHours(e.split(":")[0]),t.setMinutes(e.split(":")[1]),s.props.onChange(t)})),gt(wt(s),"renderTimeInput",(function(){var e=s.state.time,t=s.props,n=t.date,i=t.timeString,a=t.customTimeInput;return a?de.default.cloneElement(a,{date:n,value:e,onChange:s.onTimeChange}):de.default.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",required:!0,value:e,onChange:function(e){s.onTimeChange(e.target.value||i)}})})),s.state={time:s.props.timeString},s}return ft(n,[{key:"render",value:function(){return de.default.createElement("div",{className:"react-datepicker__input-time-container"},de.default.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),de.default.createElement("div",{className:"react-datepicker-time__input-container"},de.default.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.timeString!==t.time?{time:e.timeString}:null}}]),n}(de.default.Component);function Hn(e){var t=e.className,n=e.children,s=e.showPopperArrow,i=e.arrowProps,a=void 0===i?{}:i;return de.default.createElement("div",{className:t},s&&de.default.createElement("div",bt({className:"react-datepicker__triangle"},a)),n)}var Vn=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],$n=function(e){_t(n,e);var t=jt(n);function n(e){var s;return ht(this,n),gt(wt(s=t.call(this,e)),"handleClickOutside",(function(e){s.props.onClickOutside(e)})),gt(wt(s),"setClickOutsideRef",(function(){return s.containerRef.current})),gt(wt(s),"handleDropdownFocus",(function(e){(function(){var e=((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).className||"").split(/\s+/);return Vn.some((function(t){return e.indexOf(t)>=0}))})(e.target)&&s.props.onDropdownFocus()})),gt(wt(s),"getDateInView",(function(){var e=s.props,t=e.preSelection,n=e.selected,i=e.openToDate,a=vn(s.props),r=yn(s.props),o=Mt();return i||n||t||(a&&at.default(o,a)?a:r&&it.default(o,r)?r:o)})),gt(wt(s),"increaseMonth",(function(){s.setState((function(e){var t=e.date;return{date:_e.default(t,1)}}),(function(){return s.handleMonthChange(s.state.date)}))})),gt(wt(s),"decreaseMonth",(function(){s.setState((function(e){var t=e.date;return{date:ke.default(t,1)}}),(function(){return s.handleMonthChange(s.state.date)}))})),gt(wt(s),"handleDayClick",(function(e,t,n){s.props.onSelect(e,t,n),s.props.setPreSelection&&s.props.setPreSelection(e)})),gt(wt(s),"handleDayMouseEnter",(function(e){s.setState({selectingDate:e}),s.props.onDayMouseEnter&&s.props.onDayMouseEnter(e)})),gt(wt(s),"handleMonthMouseLeave",(function(){s.setState({selectingDate:null}),s.props.onMonthMouseLeave&&s.props.onMonthMouseLeave()})),gt(wt(s),"handleYearChange",(function(e){s.props.onYearChange&&s.props.onYearChange(e),s.props.adjustDateOnChange&&(s.props.onSelect&&s.props.onSelect(e),s.props.setOpen&&s.props.setOpen(!0)),s.props.setPreSelection&&s.props.setPreSelection(e)})),gt(wt(s),"handleMonthChange",(function(e){s.props.onMonthChange&&s.props.onMonthChange(e),s.props.adjustDateOnChange&&(s.props.onSelect&&s.props.onSelect(e),s.props.setOpen&&s.props.setOpen(!0)),s.props.setPreSelection&&s.props.setPreSelection(e)})),gt(wt(s),"handleMonthYearChange",(function(e){s.handleYearChange(e),s.handleMonthChange(e)})),gt(wt(s),"changeYear",(function(e){s.setState((function(t){var n=t.date;return{date:Be.default(n,e)}}),(function(){return s.handleYearChange(s.state.date)}))})),gt(wt(s),"changeMonth",(function(e){s.setState((function(t){var n=t.date;return{date:Fe.default(n,e)}}),(function(){return s.handleMonthChange(s.state.date)}))})),gt(wt(s),"changeMonthYear",(function(e){s.setState((function(t){var n=t.date;return{date:Be.default(Fe.default(n,Le.default(e)),Ae.default(e))}}),(function(){return s.handleMonthYearChange(s.state.date)}))})),gt(wt(s),"header",(function(){var e=Bt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.state.date,s.props.locale),t=[];return s.props.showWeekNumbers&&t.push(de.default.createElement("div",{key:"W",className:"react-datepicker__day-name"},s.props.weekLabel||"#")),t.concat([0,1,2,3,4,5,6].map((function(t){var n=ve.default(e,t),i=s.formatWeekday(n,s.props.locale),a=s.props.weekDayClassName?s.props.weekDayClassName(n):void 0;return de.default.createElement("div",{key:t,className:pe.default("react-datepicker__day-name",a)},i)})))})),gt(wt(s),"formatWeekday",(function(e,t){return s.props.formatWeekDay?function(e,t,n){return t(Ut(e,"EEEE",n))}(e,s.props.formatWeekDay,t):s.props.useWeekdaysShort?function(e,t){return Ut(e,"EEE",t)}(e,t):function(e,t){return Ut(e,"EEEEEE",t)}(e,t)})),gt(wt(s),"decreaseYear",(function(){s.setState((function(e){var t=e.date;return{date:je.default(t,s.props.showYearPicker?s.props.yearItemNumber:1)}}),(function(){return s.handleYearChange(s.state.date)}))})),gt(wt(s),"renderPreviousButton",(function(){if(!s.props.renderCustomHeader){var e;switch(!0){case s.props.showMonthYearPicker:e=gn(s.state.date,s.props);break;case s.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.minDate,s=t.yearItemNumber,i=void 0===s?Ot:s,a=wn(Vt(je.default(e,i)),i).endPeriod,r=n&&Ae.default(n);return r&&r>a||!1}(s.state.date,s.props);break;default:e=mn(s.state.date,s.props)}if((s.props.forceShowMonthNavigation||s.props.showDisabledMonthNavigation||!e)&&!s.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--previous"],n=s.decreaseMonth;(s.props.showMonthYearPicker||s.props.showQuarterYearPicker||s.props.showYearPicker)&&(n=s.decreaseYear),e&&s.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--previous--disabled"),n=null);var i=s.props.showMonthYearPicker||s.props.showQuarterYearPicker||s.props.showYearPicker,a=s.props,r=a.previousMonthAriaLabel,o=void 0===r?"Previous Month":r,l=a.previousYearAriaLabel,c=void 0===l?"Previous Year":l;return de.default.createElement("button",{type:"button",className:t.join(" "),onClick:n,"aria-label":i?c:o},i?s.props.previousYearButtonLabel:s.props.previousMonthButtonLabel)}}})),gt(wt(s),"increaseYear",(function(){s.setState((function(e){var t=e.date;return{date:xe.default(t,s.props.showYearPicker?s.props.yearItemNumber:1)}}),(function(){return s.handleYearChange(s.state.date)}))})),gt(wt(s),"renderNextButton",(function(){if(!s.props.renderCustomHeader){var e;switch(!0){case s.props.showMonthYearPicker:e=bn(s.state.date,s.props);break;case s.props.showYearPicker:e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.maxDate,s=t.yearItemNumber,i=void 0===s?Ot:s,a=wn(xe.default(e,i),i).startPeriod,r=n&&Ae.default(n);return r&&r<a||!1}(s.state.date,s.props);break;default:e=fn(s.state.date,s.props)}if((s.props.forceShowMonthNavigation||s.props.showDisabledMonthNavigation||!e)&&!s.props.showTimeSelectOnly){var t=["react-datepicker__navigation","react-datepicker__navigation--next"];s.props.showTimeSelect&&t.push("react-datepicker__navigation--next--with-time"),s.props.todayButton&&t.push("react-datepicker__navigation--next--with-today-button");var n=s.increaseMonth;(s.props.showMonthYearPicker||s.props.showQuarterYearPicker||s.props.showYearPicker)&&(n=s.increaseYear),e&&s.props.showDisabledMonthNavigation&&(t.push("react-datepicker__navigation--next--disabled"),n=null);var i=s.props.showMonthYearPicker||s.props.showQuarterYearPicker||s.props.showYearPicker,a=s.props,r=a.nextMonthAriaLabel,o=void 0===r?"Next Month":r,l=a.nextYearAriaLabel,c=void 0===l?"Next Year":l;return de.default.createElement("button",{type:"button",className:t.join(" "),onClick:n,"aria-label":i?c:o},i?s.props.nextYearButtonLabel:s.props.nextMonthButtonLabel)}}})),gt(wt(s),"renderCurrentMonth",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.state.date,t=["react-datepicker__current-month"];return s.props.showYearDropdown&&t.push("react-datepicker__current-month--hasYearDropdown"),s.props.showMonthDropdown&&t.push("react-datepicker__current-month--hasMonthDropdown"),s.props.showMonthYearDropdown&&t.push("react-datepicker__current-month--hasMonthYearDropdown"),de.default.createElement("div",{className:t.join(" ")},Ut(e,s.props.dateFormat,s.props.locale))})),gt(wt(s),"renderYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(s.props.showYearDropdown&&!e)return de.default.createElement(Cn,{adjustDateOnChange:s.props.adjustDateOnChange,date:s.state.date,onSelect:s.props.onSelect,setOpen:s.props.setOpen,dropdownMode:s.props.dropdownMode,onChange:s.changeYear,minDate:s.props.minDate,maxDate:s.props.maxDate,year:Ae.default(s.state.date),scrollableYearDropdown:s.props.scrollableYearDropdown,yearDropdownItemNumber:s.props.yearDropdownItemNumber})})),gt(wt(s),"renderMonthDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(s.props.showMonthDropdown&&!e)return de.default.createElement(In,{dropdownMode:s.props.dropdownMode,locale:s.props.locale,onChange:s.changeMonth,month:Le.default(s.state.date),useShortMonthInDropdown:s.props.useShortMonthInDropdown})})),gt(wt(s),"renderMonthYearDropdown",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(s.props.showMonthYearDropdown&&!e)return de.default.createElement(An,{dropdownMode:s.props.dropdownMode,locale:s.props.locale,dateFormat:s.props.dateFormat,onChange:s.changeMonthYear,minDate:s.props.minDate,maxDate:s.props.maxDate,date:s.state.date,scrollableMonthYearDropdown:s.props.scrollableMonthYearDropdown})})),gt(wt(s),"renderTodayButton",(function(){if(s.props.todayButton&&!s.props.showTimeSelectOnly)return de.default.createElement("div",{className:"react-datepicker__today-button",onClick:function(e){return s.props.onSelect(qe.default(Mt()),e)}},s.props.todayButton)})),gt(wt(s),"renderDefaultHeader",(function(e){var t=e.monthDate,n=e.i;return de.default.createElement("div",{className:"react-datepicker__header ".concat(s.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},s.renderCurrentMonth(t),de.default.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(s.props.dropdownMode),onFocus:s.handleDropdownFocus},s.renderMonthDropdown(0!==n),s.renderMonthYearDropdown(0!==n),s.renderYearDropdown(0!==n)),de.default.createElement("div",{className:"react-datepicker__day-names"},s.header(t)))})),gt(wt(s),"renderCustomHeader",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.monthDate,n=e.i;if(s.props.showTimeSelect&&!s.state.monthContainer||s.props.showTimeSelectOnly)return null;var i=mn(s.state.date,s.props),a=fn(s.state.date,s.props),r=gn(s.state.date,s.props),o=bn(s.state.date,s.props),l=!s.props.showMonthYearPicker&&!s.props.showQuarterYearPicker&&!s.props.showYearPicker;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:s.props.onDropdownFocus},s.props.renderCustomHeader(yt(yt({},s.state),{},{customHeaderCount:n,changeMonth:s.changeMonth,changeYear:s.changeYear,decreaseMonth:s.decreaseMonth,increaseMonth:s.increaseMonth,decreaseYear:s.decreaseYear,increaseYear:s.increaseYear,prevMonthButtonDisabled:i,nextMonthButtonDisabled:a,prevYearButtonDisabled:r,nextYearButtonDisabled:o})),l&&de.default.createElement("div",{className:"react-datepicker__day-names"},s.header(t)))})),gt(wt(s),"renderYearHeader",(function(){var e=s.state.date,t=s.props,n=t.showYearPicker,i=wn(e,t.yearItemNumber),a=i.startPeriod,r=i.endPeriod;return de.default.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},n?"".concat(a," - ").concat(r):Ae.default(e))})),gt(wt(s),"renderHeader",(function(e){switch(!0){case void 0!==s.props.renderCustomHeader:return s.renderCustomHeader(e);case s.props.showMonthYearPicker||s.props.showQuarterYearPicker||s.props.showYearPicker:return s.renderYearHeader(e);default:return s.renderDefaultHeader(e)}})),gt(wt(s),"renderMonths",(function(){if(!s.props.showTimeSelectOnly&&!s.props.showYearPicker){for(var e=[],t=s.props.showPreviousMonths?s.props.monthsShown-1:0,n=ke.default(s.state.date,t),i=0;i<s.props.monthsShown;++i){var a=i-s.props.monthSelectedIn,r=_e.default(n,a),o="month-".concat(i),l=i<s.props.monthsShown-1,c=i>0;e.push(de.default.createElement("div",{key:o,ref:function(e){s.monthContainer=e},className:"react-datepicker__month-container"},s.renderHeader({monthDate:r,i}),de.default.createElement(Nn,{chooseDayAriaLabelPrefix:s.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:s.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:s.props.weekAriaLabelPrefix,onChange:s.changeMonthYear,day:r,dayClassName:s.props.dayClassName,monthClassName:s.props.monthClassName,onDayClick:s.handleDayClick,handleOnKeyDown:s.props.handleOnKeyDown,onDayMouseEnter:s.handleDayMouseEnter,onMouseLeave:s.handleMonthMouseLeave,onWeekSelect:s.props.onWeekSelect,orderInDisplay:i,formatWeekNumber:s.props.formatWeekNumber,locale:s.props.locale,minDate:s.props.minDate,maxDate:s.props.maxDate,excludeDates:s.props.excludeDates,highlightDates:s.props.highlightDates,selectingDate:s.state.selectingDate,includeDates:s.props.includeDates,inline:s.props.inline,shouldFocusDayInline:s.props.shouldFocusDayInline,fixedHeight:s.props.fixedHeight,filterDate:s.props.filterDate,preSelection:s.props.preSelection,setPreSelection:s.props.setPreSelection,selected:s.props.selected,selectsStart:s.props.selectsStart,selectsEnd:s.props.selectsEnd,selectsRange:s.props.selectsRange,showWeekNumbers:s.props.showWeekNumbers,startDate:s.props.startDate,endDate:s.props.endDate,peekNextMonth:s.props.peekNextMonth,setOpen:s.props.setOpen,shouldCloseOnSelect:s.props.shouldCloseOnSelect,renderDayContents:s.props.renderDayContents,disabledKeyboardNavigation:s.props.disabledKeyboardNavigation,showMonthYearPicker:s.props.showMonthYearPicker,showFullMonthYearPicker:s.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:s.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:s.props.showFourColumnMonthYearPicker,showYearPicker:s.props.showYearPicker,showQuarterYearPicker:s.props.showQuarterYearPicker,isInputFocused:s.props.isInputFocused,containerRef:s.containerRef,monthShowsDuplicateDaysEnd:l,monthShowsDuplicateDaysStart:c})))}return e}})),gt(wt(s),"renderYears",(function(){if(!s.props.showTimeSelectOnly)return s.props.showYearPicker?de.default.createElement("div",{className:"react-datepicker__year--container"},s.renderHeader(),de.default.createElement(Yn,bt({onDayClick:s.handleDayClick,date:s.state.date},s.props))):void 0})),gt(wt(s),"renderTimeSection",(function(){if(s.props.showTimeSelect&&(s.state.monthContainer||s.props.showTimeSelectOnly))return de.default.createElement(Fn,{selected:s.props.selected,openToDate:s.props.openToDate,onChange:s.props.onTimeChange,timeClassName:s.props.timeClassName,format:s.props.timeFormat,includeTimes:s.props.includeTimes,intervals:s.props.timeIntervals,minTime:s.props.minTime,maxTime:s.props.maxTime,excludeTimes:s.props.excludeTimes,filterTime:s.props.filterTime,timeCaption:s.props.timeCaption,todayButton:s.props.todayButton,showMonthDropdown:s.props.showMonthDropdown,showMonthYearDropdown:s.props.showMonthYearDropdown,showYearDropdown:s.props.showYearDropdown,withPortal:s.props.withPortal,monthRef:s.state.monthContainer,injectTimes:s.props.injectTimes,locale:s.props.locale,showTimeSelectOnly:s.props.showTimeSelectOnly})})),gt(wt(s),"renderInputTimeSection",(function(){var e=new Date(s.props.selected),t=Et(e)&&Boolean(s.props.selected)?"".concat(Sn(e.getHours()),":").concat(Sn(e.getMinutes())):"";if(s.props.showTimeInput)return de.default.createElement(Bn,{date:e,timeString:t,timeInputLabel:s.props.timeInputLabel,onChange:s.props.onTimeChange,customTimeInput:s.props.customTimeInput})})),s.containerRef=de.default.createRef(),s.state={date:s.getDateInView(),selectingDate:null,monthContainer:null},s}return ft(n,[{key:"componentDidMount",value:function(){this.props.showTimeSelect&&(this.assignMonthContainer=void this.setState({monthContainer:this.monthContainer}))}},{key:"componentDidUpdate",value:function(e){this.props.preSelection&&!Gt(this.props.preSelection,e.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!Gt(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var e=this.props.container||Hn;return de.default.createElement("div",{ref:this.containerRef},de.default.createElement(e,{className:pe.default("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}],[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:Ot}}}]),n}(de.default.Component),Wn=function(e){return!e.disabled&&-1!==e.tabIndex},zn=function(e){_t(n,e);var t=jt(n);function n(e){var s;return ht(this,n),gt(wt(s=t.call(this,e)),"getTabChildren",(function(){return Array.prototype.slice.call(s.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Wn)})),gt(wt(s),"handleFocusStart",(function(e){var t=s.getTabChildren();t&&t.length>1&&t[t.length-1].focus()})),gt(wt(s),"handleFocusEnd",(function(e){var t=s.getTabChildren();t&&t.length>1&&t[0].focus()})),s.tabLoopRef=de.default.createRef(),s}return ft(n,[{key:"render",value:function(){return this.props.enableTabLoop?de.default.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},de.default.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,de.default.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}],[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),n}(de.default.Component),qn=function(e){_t(n,e);var t=jt(n);function n(e){var s;return ht(this,n),(s=t.call(this,e)).el=document.createElement("div"),s}return ft(n,[{key:"componentDidMount",value:function(){this.portalRoot=document.getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),document.body.appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return dt.default.createPortal(this.props.children,this.el)}}]),n}(de.default.Component),Gn=function(e){_t(n,e);var t=jt(n);function n(){return ht(this,n),t.apply(this,arguments)}return ft(n,[{key:"render",value:function(){var e,t=this.props,n=t.className,s=t.wrapperClassName,i=t.hidePopper,a=t.popperComponent,r=t.popperModifiers,o=t.popperPlacement,l=t.popperProps,c=t.targetComponent,u=t.enableTabLoop,d=t.popperOnKeyDown,p=t.portalId;if(!i){var h=pe.default("react-datepicker-popper",n);e=de.default.createElement(le.Popper,bt({modifiers:r,placement:o},l),(function(e){var t=e.ref,n=e.style,s=e.placement,i=e.arrowProps;return de.default.createElement(zn,{enableTabLoop:u},de.default.createElement("div",{ref:t,style:n,className:h,"data-placement":s,onKeyDown:d},de.default.cloneElement(a,{arrowProps:i})))}))}this.props.popperContainer&&(e=de.default.createElement(this.props.popperContainer,{},e)),p&&!i&&(e=de.default.createElement(qn,{portalId:p},e));var m=pe.default("react-datepicker-wrapper",s);return de.default.createElement(le.Manager,{className:"react-datepicker-manager"},de.default.createElement(le.Reference,null,(function(e){var t=e.ref;return de.default.createElement("div",{ref:t,className:m},c)})),e)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:"viewport"}},popperProps:{},popperPlacement:"bottom-start"}}}]),n}(de.default.Component),Kn="react-datepicker-ignore-onclickoutside",Xn=ut.default($n),Zn="Date input not valid.",Jn=function(e){_t(n,e);var t=jt(n);function n(e){var s;return ht(this,n),gt(wt(s=t.call(this,e)),"getPreSelection",(function(){return s.props.openToDate?s.props.openToDate:s.props.selectsEnd&&s.props.startDate?s.props.startDate:s.props.selectsStart&&s.props.endDate?s.props.endDate:Mt()})),gt(wt(s),"calcInitialState",(function(){var e=s.getPreSelection(),t=vn(s.props),n=yn(s.props),i=t&&at.default(e,qe.default(t))?t:n&&it.default(e,Je.default(n))?n:e;return{open:s.props.startOpen||!1,preventFocus:!1,preSelection:s.props.selected?s.props.selected:i,highlightDates:_n(s.props.highlightDates),focused:!1,shouldFocusDayInline:!1}})),gt(wt(s),"clearPreventFocusTimeout",(function(){s.preventFocusTimeout&&clearTimeout(s.preventFocusTimeout)})),gt(wt(s),"setFocus",(function(){s.input&&s.input.focus&&s.input.focus({preventScroll:!0})})),gt(wt(s),"setBlur",(function(){s.input&&s.input.blur&&s.input.blur(),s.cancelFocusInput()})),gt(wt(s),"setOpen",(function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s.setState({open:e,preSelection:e&&s.state.open?s.state.preSelection:s.calcInitialState().preSelection,lastPreSelectChange:es},(function(){e||s.setState((function(e){return{focused:!!t&&e.focused}}),(function(){!t&&s.setBlur(),s.setState({inputValue:null})}))}))})),gt(wt(s),"inputOk",(function(){return he.default(s.state.preSelection)})),gt(wt(s),"isCalendarOpen",(function(){return void 0===s.props.open?s.state.open&&!s.props.disabled&&!s.props.readOnly:s.props.open})),gt(wt(s),"handleFocus",(function(e){s.state.preventFocus||(s.props.onFocus(e),s.props.preventOpenOnFocus||s.props.readOnly||s.setOpen(!0)),s.setState({focused:!0})})),gt(wt(s),"cancelFocusInput",(function(){clearTimeout(s.inputFocusTimeout),s.inputFocusTimeout=null})),gt(wt(s),"deferFocusInput",(function(){s.cancelFocusInput(),s.inputFocusTimeout=setTimeout((function(){return s.setFocus()}),1)})),gt(wt(s),"handleDropdownFocus",(function(){s.cancelFocusInput()})),gt(wt(s),"handleBlur",(function(e){(!s.state.open||s.props.withPortal||s.props.showTimeInput)&&s.props.onBlur(e),s.setState({focused:!1})})),gt(wt(s),"handleCalendarClickOutside",(function(e){s.props.inline||s.setOpen(!1),s.props.onClickOutside(e),s.props.withPortal&&e.preventDefault()})),gt(wt(s),"handleChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0];if(!s.props.onChangeRaw||(s.props.onChangeRaw.apply(wt(s),t),"function"==typeof i.isDefaultPrevented&&!i.isDefaultPrevented())){s.setState({inputValue:i.target.value,lastPreSelectChange:Qn});var a=At(i.target.value,s.props.dateFormat,s.props.locale,s.props.strictParsing);!a&&i.target.value||s.setSelected(a,i,!0)}})),gt(wt(s),"handleSelect",(function(e,t,n){s.setState({preventFocus:!0},(function(){return s.preventFocusTimeout=setTimeout((function(){return s.setState({preventFocus:!1})}),50),s.preventFocusTimeout})),s.props.onChangeRaw&&s.props.onChangeRaw(t),s.setSelected(e,t,!1,n),!s.props.shouldCloseOnSelect||s.props.showTimeSelect?s.setPreSelection(e):s.props.inline||s.setOpen(!1)})),gt(wt(s),"setSelected",(function(e,t,n,i){var a=e;if(null===a||!nn(a,s.props)){var r=s.props,o=r.onChange,l=r.selectsRange,c=r.startDate,u=r.endDate;if(!Kt(s.props.selected,a)||s.props.allowSameDay||l)if(null!==a&&(!s.props.selected||n&&(s.props.showTimeSelect||s.props.showTimeSelectOnly||s.props.showTimeInput)||(a=Rt(a,{hour:De.default(s.props.selected),minute:Ce.default(s.props.selected),second:Te.default(s.props.selected)})),s.props.inline||s.setState({preSelection:a}),s.props.focusSelectedMonth||s.setState({monthSelectedIn:i})),l){var d=c&&u;c||u?c&&!u&&(at.default(a,c)?o([a,null],t):o([c,a],t)):o([a,null],t),d&&o([a,null],t)}else o(a,t);n||(s.props.onSelect(a,t),s.setState({inputValue:null}))}})),gt(wt(s),"setPreSelection",(function(e){var t=void 0!==s.props.minDate,n=void 0!==s.props.maxDate,i=!0;if(e){var a=qe.default(e);if(t&&n)i=Xt(e,s.props.minDate,s.props.maxDate);else if(t){var r=qe.default(s.props.minDate);i=it.default(e,r)||Kt(a,r)}else if(n){var o=Je.default(s.props.maxDate);i=at.default(e,o)||Kt(a,o)}}i&&s.setState({preSelection:e})})),gt(wt(s),"handleTimeChange",(function(e){var t=Rt(s.props.selected?s.props.selected:s.getPreSelection(),{hour:De.default(e),minute:Ce.default(e)});s.setState({preSelection:t}),s.props.onChange(t),s.props.shouldCloseOnSelect&&s.setOpen(!1),s.props.showTimeInput&&s.setOpen(!0),s.setState({inputValue:null})})),gt(wt(s),"onInputClick",(function(){s.props.disabled||s.props.readOnly||s.setOpen(!0),s.props.onInputClick()})),gt(wt(s),"onInputKeyDown",(function(e){s.props.onKeyDown(e);var t=e.key;if(s.state.open||s.props.inline||s.props.preventOpenOnFocus){if(s.state.open){if("ArrowDown"===t||"ArrowUp"===t){e.preventDefault();var n=s.calendar.componentNode&&s.calendar.componentNode.querySelector('.react-datepicker__day[tabindex="0"]');return void(n&&n.focus({preventScroll:!0}))}var i=Mt(s.state.preSelection);"Enter"===t?(e.preventDefault(),s.inputOk()&&s.state.lastPreSelectChange===es?(s.handleSelect(i,e),!s.props.shouldCloseOnSelect&&s.setPreSelection(i)):s.setOpen(!1)):"Escape"===t&&(e.preventDefault(),s.setOpen(!1)),s.inputOk()||s.props.onInputError({code:1,msg:Zn})}}else"ArrowDown"!==t&&"ArrowUp"!==t&&"Enter"!==t||s.onInputClick()})),gt(wt(s),"onDayKeyDown",(function(e){s.props.onKeyDown(e);var t=e.key,n=Mt(s.state.preSelection);if("Enter"===t)e.preventDefault(),s.handleSelect(n,e),!s.props.shouldCloseOnSelect&&s.setPreSelection(n);else if("Escape"===t)e.preventDefault(),s.setOpen(!1),s.inputOk()||s.props.onInputError({code:1,msg:Zn});else if(!s.props.disabledKeyboardNavigation){var i;switch(t){case"ArrowLeft":i=Se.default(n,1);break;case"ArrowRight":i=ve.default(n,1);break;case"ArrowUp":i=we.default(n,1);break;case"ArrowDown":i=ye.default(n,1);break;case"PageUp":i=ke.default(n,1);break;case"PageDown":i=_e.default(n,1);break;case"Home":i=je.default(n,1);break;case"End":i=xe.default(n,1)}if(!i)return void(s.props.onInputError&&s.props.onInputError({code:1,msg:Zn}));if(e.preventDefault(),s.setState({lastPreSelectChange:es}),s.props.adjustDateOnChange&&s.setSelected(i),s.setPreSelection(i),s.props.inline){var a=Le.default(n),r=Le.default(i),o=Ae.default(n),l=Ae.default(i);a!==r||o!==l?s.setState({shouldFocusDayInline:!0}):s.setState({shouldFocusDayInline:!1})}}})),gt(wt(s),"onPopperKeyDown",(function(e){"Escape"===e.key&&(e.preventDefault(),s.setState({preventFocus:!0},(function(){s.setOpen(!1),setTimeout((function(){s.setFocus(),s.setState({preventFocus:!1})}))})))})),gt(wt(s),"onClearClick",(function(e){e&&e.preventDefault&&e.preventDefault(),s.props.onChange(null,e),s.setState({inputValue:null})})),gt(wt(s),"clear",(function(){s.onClearClick()})),gt(wt(s),"onScroll",(function(e){"boolean"==typeof s.props.closeOnScroll&&s.props.closeOnScroll?e.target!==document&&e.target!==document.documentElement&&e.target!==document.body||s.setOpen(!1):"function"==typeof s.props.closeOnScroll&&s.props.closeOnScroll(e)&&s.setOpen(!1)})),gt(wt(s),"renderCalendar",(function(){return s.props.inline||s.isCalendarOpen()?de.default.createElement(Xn,{ref:function(e){s.calendar=e},locale:s.props.locale,chooseDayAriaLabelPrefix:s.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:s.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:s.props.weekAriaLabelPrefix,adjustDateOnChange:s.props.adjustDateOnChange,setOpen:s.setOpen,shouldCloseOnSelect:s.props.shouldCloseOnSelect,dateFormat:s.props.dateFormatCalendar,useWeekdaysShort:s.props.useWeekdaysShort,formatWeekDay:s.props.formatWeekDay,dropdownMode:s.props.dropdownMode,selected:s.props.selected,preSelection:s.state.preSelection,onSelect:s.handleSelect,onWeekSelect:s.props.onWeekSelect,openToDate:s.props.openToDate,minDate:s.props.minDate,maxDate:s.props.maxDate,selectsStart:s.props.selectsStart,selectsEnd:s.props.selectsEnd,selectsRange:s.props.selectsRange,startDate:s.props.startDate,endDate:s.props.endDate,excludeDates:s.props.excludeDates,filterDate:s.props.filterDate,onClickOutside:s.handleCalendarClickOutside,formatWeekNumber:s.props.formatWeekNumber,highlightDates:s.state.highlightDates,includeDates:s.props.includeDates,includeTimes:s.props.includeTimes,injectTimes:s.props.injectTimes,inline:s.props.inline,shouldFocusDayInline:s.state.shouldFocusDayInline,peekNextMonth:s.props.peekNextMonth,showMonthDropdown:s.props.showMonthDropdown,showPreviousMonths:s.props.showPreviousMonths,useShortMonthInDropdown:s.props.useShortMonthInDropdown,showMonthYearDropdown:s.props.showMonthYearDropdown,showWeekNumbers:s.props.showWeekNumbers,showYearDropdown:s.props.showYearDropdown,withPortal:s.props.withPortal,forceShowMonthNavigation:s.props.forceShowMonthNavigation,showDisabledMonthNavigation:s.props.showDisabledMonthNavigation,scrollableYearDropdown:s.props.scrollableYearDropdown,scrollableMonthYearDropdown:s.props.scrollableMonthYearDropdown,todayButton:s.props.todayButton,weekLabel:s.props.weekLabel,outsideClickIgnoreClass:Kn,fixedHeight:s.props.fixedHeight,monthsShown:s.props.monthsShown,monthSelectedIn:s.state.monthSelectedIn,onDropdownFocus:s.handleDropdownFocus,onMonthChange:s.props.onMonthChange,onYearChange:s.props.onYearChange,dayClassName:s.props.dayClassName,weekDayClassName:s.props.weekDayClassName,monthClassName:s.props.monthClassName,timeClassName:s.props.timeClassName,showTimeSelect:s.props.showTimeSelect,showTimeSelectOnly:s.props.showTimeSelectOnly,onTimeChange:s.handleTimeChange,timeFormat:s.props.timeFormat,timeIntervals:s.props.timeIntervals,minTime:s.props.minTime,maxTime:s.props.maxTime,excludeTimes:s.props.excludeTimes,filterTime:s.props.filterTime,timeCaption:s.props.timeCaption,className:s.props.calendarClassName,container:s.props.calendarContainer,yearItemNumber:s.props.yearItemNumber,yearDropdownItemNumber:s.props.yearDropdownItemNumber,previousMonthButtonLabel:s.props.previousMonthButtonLabel,nextMonthButtonLabel:s.props.nextMonthButtonLabel,previousYearButtonLabel:s.props.previousYearButtonLabel,nextYearButtonLabel:s.props.nextYearButtonLabel,timeInputLabel:s.props.timeInputLabel,disabledKeyboardNavigation:s.props.disabledKeyboardNavigation,renderCustomHeader:s.props.renderCustomHeader,popperProps:s.props.popperProps,renderDayContents:s.props.renderDayContents,onDayMouseEnter:s.props.onDayMouseEnter,onMonthMouseLeave:s.props.onMonthMouseLeave,showTimeInput:s.props.showTimeInput,showMonthYearPicker:s.props.showMonthYearPicker,showFullMonthYearPicker:s.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:s.props.showTwoColumnMonthYearPicker,showFourColumnMonthYearPicker:s.props.showFourColumnMonthYearPicker,showYearPicker:s.props.showYearPicker,showQuarterYearPicker:s.props.showQuarterYearPicker,showPopperArrow:s.props.showPopperArrow,excludeScrollbar:s.props.excludeScrollbar,handleOnKeyDown:s.onDayKeyDown,isInputFocused:s.state.focused,customTimeInput:s.props.customTimeInput,setPreSelection:s.setPreSelection},s.props.children):null})),gt(wt(s),"renderDateInput",(function(){var e,t,n,i,a,r=pe.default(s.props.className,gt({},Kn,s.state.open)),o=s.props.customInput||de.default.createElement("input",{type:"text"}),l=s.props.customInputRef||"ref",c="string"==typeof s.props.value?s.props.value:"string"==typeof s.state.inputValue?s.state.inputValue:(t=s.props.selected,i=(n=s.props).dateFormat,a=n.locale,t&&Ut(t,Array.isArray(i)?i[0]:i,a)||"");return de.default.cloneElement(o,(gt(e={},l,(function(e){s.input=e})),gt(e,"value",c),gt(e,"onBlur",s.handleBlur),gt(e,"onChange",s.handleChange),gt(e,"onClick",s.onInputClick),gt(e,"onFocus",s.handleFocus),gt(e,"onKeyDown",s.onInputKeyDown),gt(e,"id",s.props.id),gt(e,"name",s.props.name),gt(e,"autoFocus",s.props.autoFocus),gt(e,"placeholder",s.props.placeholderText),gt(e,"disabled",s.props.disabled),gt(e,"autoComplete",s.props.autoComplete),gt(e,"className",pe.default(o.props.className,r)),gt(e,"title",s.props.title),gt(e,"readOnly",s.props.readOnly),gt(e,"required",s.props.required),gt(e,"tabIndex",s.props.tabIndex),gt(e,"aria-describedby",s.props.ariaDescribedBy),gt(e,"aria-invalid",s.props.ariaInvalid),gt(e,"aria-labelledby",s.props.ariaLabelledBy),gt(e,"aria-required",s.props.ariaRequired),e))})),gt(wt(s),"renderClearButton",(function(){var e=s.props,t=e.isClearable,n=e.selected,i=e.clearButtonTitle,a=e.clearButtonClassName,r=e.ariaLabelClose,o=void 0===r?"Close":r;return t&&null!=n?de.default.createElement("button",{type:"button",className:"react-datepicker__close-icon ".concat(a),"aria-label":o,onClick:s.onClearClick,title:i,tabIndex:-1}):null})),s.state=s.calcInitialState(),s}return ft(n,[{key:"componentDidMount",value:function(){window.addEventListener("scroll",this.onScroll,!0)}},{key:"componentDidUpdate",value:function(e,t){var n,s;e.inline&&(n=e.selected,s=this.props.selected,n&&s?Le.default(n)!==Le.default(s)||Ae.default(n)!==Ae.default(s):n!==s)&&this.setPreSelection(this.props.selected),void 0!==this.state.monthSelectedIn&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:_n(this.props.highlightDates)}),t.focused||Kt(e.selected,this.props.selected)||this.setState({inputValue:null}),t.open!==this.state.open&&(!1===t.open&&!0===this.state.open&&this.props.onCalendarOpen(),!0===t.open&&!1===this.state.open&&this.props.onCalendarClose())}},{key:"componentWillUnmount",value:function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0)}},{key:"render",value:function(){var e=this.renderCalendar();return this.props.inline&&!this.props.withPortal?e:this.props.withPortal?de.default.createElement("div",null,this.props.inline?null:de.default.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),this.state.open||this.props.inline?de.default.createElement("div",{className:"react-datepicker__portal"},e):null):de.default.createElement(Gn,{className:this.props.popperClassName,wrapperClassName:this.props.wrapperClassName,hidePopper:!this.isCalendarOpen(),portalId:this.props.portalId,popperModifiers:this.props.popperModifiers,targetComponent:de.default.createElement("div",{className:"react-datepicker__input-container"},this.renderDateInput(),this.renderClearButton()),popperContainer:this.props.popperContainer,popperComponent:e,popperPlacement:this.props.popperPlacement,popperProps:this.props.popperProps,popperOnKeyDown:this.onPopperKeyDown,enableTabLoop:this.props.enableTabLoop})}}],[{key:"defaultProps",get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",onChange:function(){},disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onInputClick:function(){},onSelect:function(){},onClickOutside:function(){},onMonthChange:function(){},onCalendarOpen:function(){},onCalendarClose:function(){},preventOpenOnFocus:!1,onYearChange:function(){},onInputError:function(){},monthsShown:1,readOnly:!1,withPortal:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,strictParsing:!1,timeIntervals:30,timeCaption:"Time",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Ot,renderDayContents:function(e){return e},focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null}}}]),n}(de.default.Component),Qn="input",es="navigate";e.CalendarContainer=Hn,e.default=Jn,e.getDefaultLocale=Zt,e.registerLocale=function(e,t){var s="undefined"!=typeof window?window:n.g;s.__localeData__||(s.__localeData__={}),s.__localeData__[e]=t},e.setDefaultLocale=function(e){("undefined"!=typeof window?window:n.g).__localeId__=e},Object.defineProperty(e,"__esModule",{value:!0})}(t,n(67294),n(45697),n(71108),n(71381),n(12274),n(49546),n(58545),n(78343),n(77349),n(63500),n(11640),n(21593),n(1784),n(88330),n(7069),n(77982),n(54559),n(59319),n(77881),n(39159),n(85817),n(20466),n(55855),n(9827),n(78966),n(56605),n(95570),n(28789),n(39880),n(4543),n(37042),n(62225),n(11503),n(44749),n(37950),n(99890),n(92300),n(84129),n(52724),n(91857),n(69119),n(584),n(43703),n(94431),n(38148),n(83894),n(67090),n(4135),n(96843),n(3151),n(49160),n(60792),n(86117),n(42699),n(313),n(24257),n(19013),n(45853),n(23855),n(58949),n(19504),n(73935))},71108:(e,t)=>{var n;!function(){"use strict";var s={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var r=i.apply(null,n);r&&e.push(r)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var o in n)s.call(n,o)&&n[o]&&e.push(o)}}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(n=function(){return i}.apply(t,[]))||(e.exports=n)}()},64448:(e,t,n)=>{"use strict";var s=n(67294),i=n(27418),a=n(63840);function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!s)throw Error(r(227));function o(e,t,n,s,i,a,r,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var l=!1,c=null,u=!1,d=null,p={onError:function(e){l=!0,c=e}};function h(e,t,n,s,i,a,r,u,d){l=!1,c=null,o.apply(p,arguments)}var m=null,f=null,g=null;function b(e,t,n){var s=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,s,i,a,o,p,m){if(h.apply(this,arguments),l){if(!l)throw Error(r(198));var f=c;l=!1,c=null,u||(u=!0,d=f)}}(s,t,void 0,e),e.currentTarget=null}var v=null,y={};function _(){if(v)for(var e in y){var t=y[e],n=v.indexOf(e);if(!(-1<n))throw Error(r(96,e));if(!S[n]){if(!t.extractEvents)throw Error(r(97,e));for(var s in S[n]=t,n=t.eventTypes){var i=void 0,a=n[s],o=t,l=s;if(w.hasOwnProperty(l))throw Error(r(99,l));w[l]=a;var c=a.phasedRegistrationNames;if(c){for(i in c)c.hasOwnProperty(i)&&x(c[i],o,l);i=!0}else a.registrationName?(x(a.registrationName,o,l),i=!0):i=!1;if(!i)throw Error(r(98,s,e))}}}}function x(e,t,n){if(k[e])throw Error(r(100,e));k[e]=t,j[e]=t.eventTypes[n].dependencies}var S=[],w={},k={},j={};function T(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var s=e[t];if(!y.hasOwnProperty(t)||y[t]!==s){if(y[t])throw Error(r(102,t));y[t]=s,n=!0}}n&&_()}var C=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),D=null,P=null,I=null;function O(e){if(e=f(e)){if("function"!=typeof D)throw Error(r(280));var t=e.stateNode;t&&(t=m(t),D(e.stateNode,e.type,t))}}function L(e){P?I?I.push(e):I=[e]:P=e}function M(){if(P){var e=P,t=I;if(I=P=null,O(e),t)for(e=0;e<t.length;e++)O(t[e])}}function A(e,t){return e(t)}function E(e,t,n,s,i){return e(t,n,s,i)}function U(){}var R=A,N=!1,F=!1;function Y(){null===P&&null===I||(U(),M())}function B(e,t,n){if(F)return e(t,n);F=!0;try{return R(e,t,n)}finally{F=!1,Y()}}var H=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,V=Object.prototype.hasOwnProperty,$={},W={};function z(e,t,n,s,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=s,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){q[e]=new z(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];q[t]=new z(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){q[e]=new z(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){q[e]=new z(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){q[e]=new z(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){q[e]=new z(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){q[e]=new z(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){q[e]=new z(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){q[e]=new z(e,5,!1,e.toLowerCase(),null,!1)}));var G=/[\-:]([a-z])/g;function K(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(G,K);q[t]=new z(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(G,K);q[t]=new z(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(G,K);q[t]=new z(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){q[e]=new z(e,1,!1,e.toLowerCase(),null,!1)})),q.xlinkHref=new z("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){q[e]=new z(e,1,!1,e.toLowerCase(),null,!0)}));var X=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Z(e,t,n,s){var i=q.hasOwnProperty(t)?q[t]:null;(null!==i?0===i.type:!s&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,s){if(null==t||function(e,t,n,s){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!s&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,s))return!0;if(s)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,s)&&(n=null),s||null===i?function(e){return!!V.call(W,e)||!V.call($,e)&&(H.test(e)?W[e]=!0:($[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,s=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,s?e.setAttributeNS(s,t,n):e.setAttribute(t,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var J=/^(.*)[\\\/]/,Q="function"==typeof Symbol&&Symbol.for,ee=Q?Symbol.for("react.element"):60103,te=Q?Symbol.for("react.portal"):60106,ne=Q?Symbol.for("react.fragment"):60107,se=Q?Symbol.for("react.strict_mode"):60108,ie=Q?Symbol.for("react.profiler"):60114,ae=Q?Symbol.for("react.provider"):60109,re=Q?Symbol.for("react.context"):60110,oe=Q?Symbol.for("react.concurrent_mode"):60111,le=Q?Symbol.for("react.forward_ref"):60112,ce=Q?Symbol.for("react.suspense"):60113,ue=Q?Symbol.for("react.suspense_list"):60120,de=Q?Symbol.for("react.memo"):60115,pe=Q?Symbol.for("react.lazy"):60116,he=Q?Symbol.for("react.block"):60121,me="function"==typeof Symbol&&Symbol.iterator;function fe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=me&&e[me]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case ie:return"Profiler";case se:return"StrictMode";case ce:return"Suspense";case ue:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case re:return"Context.Consumer";case ae:return"Context.Provider";case le:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case de:return ge(e.type);case he:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function be(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var s=e._debugOwner,i=e._debugSource,a=ge(e.type);n=null,s&&(n=ge(s.type)),s=a,a="",i?a=" (at "+i.fileName.replace(J,"")+":"+i.lineNumber+")":n&&(a=" (created by "+n+")"),n="\n in "+(s||"Unknown")+a}t+=n,e=e.return}while(e);return t}function ve(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function ye(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function _e(e){e._valueTracker||(e._valueTracker=function(e){var t=ye(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){s=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return s},setValue:function(e){s=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=ye(e)?e.checked?"true":"false":e.value),(e=s)!==n&&(t.setValue(e),!0)}function Se(e,t){var n=t.checked;return i({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function we(e,t){var n=null==t.defaultValue?"":t.defaultValue,s=null!=t.checked?t.checked:t.defaultChecked;n=ve(null!=t.value?t.value:n),e._wrapperState={initialChecked:s,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function ke(e,t){null!=(t=t.checked)&&Z(e,"checked",t,!1)}function je(e,t){ke(e,t);var n=ve(t.value),s=t.type;if(null!=n)"number"===s?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===s||"reset"===s)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ce(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ce(e,t.type,ve(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Te(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!("submit"!==s&&"reset"!==s||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ce(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function De(e,t){return e=i({children:void 0},t),(t=function(e){var t="";return s.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Pe(e,t,n,s){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&s&&(e[n].defaultSelected=!0)}else{for(n=""+ve(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(s&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function Ie(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(r(91));return i({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(r(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(r(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ve(n)}}function Le(e,t){var n=ve(t.value),s=ve(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=s&&(e.defaultValue=""+s)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function Ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ee(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Ue,Re,Ne=(Re=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((Ue=Ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,s){MSApp.execUnsafeLocalFunction((function(){return Re(e,t)}))}:Re);function Fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ye(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Ye("Animation","AnimationEnd"),animationiteration:Ye("Animation","AnimationIteration"),animationstart:Ye("Animation","AnimationStart"),transitionend:Ye("Transition","TransitionEnd")},He={},Ve={};function $e(e){if(He[e])return He[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ve)return He[e]=n[t];return e}C&&(Ve=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var We=$e("animationend"),ze=$e("animationiteration"),qe=$e("animationstart"),Ge=$e("transitionend"),Ke="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xe=new("function"==typeof WeakMap?WeakMap:Map);function Ze(e){var t=Xe.get(e);return void 0===t&&(t=new Map,Xe.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Qe(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function et(e){if(Je(e)!==e)throw Error(r(188))}function tt(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(r(188));return t!==e?null:e}for(var n=e,s=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(s=i.return)){n=s;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return et(i),e;if(a===s)return et(i),t;a=a.sibling}throw Error(r(188))}if(n.return!==s.return)n=i,s=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,s=a;break}if(l===s){o=!0,s=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,s=i;break}if(l===s){o=!0,s=a,n=i;break}l=l.sibling}if(!o)throw Error(r(189))}}if(n.alternate!==s)throw Error(r(190))}if(3!==n.tag)throw Error(r(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function nt(e,t){if(null==t)throw Error(r(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function st(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var s=0;s<t.length&&!e.isPropagationStopped();s++)b(e,t[s],n[s]);else t&&b(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function rt(e){if(null!==e&&(it=nt(it,e)),e=it,it=null,e){if(st(e,at),it)throw Error(r(95));if(u)throw e=d,u=!1,d=null,e}}function ot(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function lt(e){if(!C)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function ut(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function dt(e,t,n,s){if(ct.length){var i=ct.pop();return i.topLevelType=e,i.eventSystemFlags=s,i.nativeEvent=t,i.targetInst=n,i}return{topLevelType:e,eventSystemFlags:s,nativeEvent:t,targetInst:n,ancestors:[]}}function pt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var s=n;if(3===s.tag)s=s.stateNode.containerInfo;else{for(;s.return;)s=s.return;s=3!==s.tag?null:s.stateNode.containerInfo}if(!s)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Pn(s)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var i=ot(e.nativeEvent);s=e.topLevelType;var a=e.nativeEvent,r=e.eventSystemFlags;0===n&&(r|=64);for(var o=null,l=0;l<S.length;l++){var c=S[l];c&&(c=c.extractEvents(s,t,a,i,r))&&(o=nt(o,c))}rt(o)}}function ht(e,t,n){if(!n.has(e)){switch(e){case"scroll":qt(t,"scroll",!0);break;case"focus":case"blur":qt(t,"focus",!0),qt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":lt(e)&&qt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Ke.indexOf(e)&&zt(e,t)}n.set(e,null)}}var mt,ft,gt,bt=!1,vt=[],yt=null,_t=null,xt=null,St=new Map,wt=new Map,kt=[],jt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Tt="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Ct(e,t,n,s,i){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:i,container:s}}function Dt(e,t){switch(e){case"focus":case"blur":yt=null;break;case"dragenter":case"dragleave":_t=null;break;case"mouseover":case"mouseout":xt=null;break;case"pointerover":case"pointerout":St.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wt.delete(t.pointerId)}}function Pt(e,t,n,s,i,a){return null===e||e.nativeEvent!==a?(e=Ct(t,n,s,i,a),null!==t&&null!==(t=In(t))&&ft(t),e):(e.eventSystemFlags|=s,e)}function It(e){var t=Pn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Qe(n)))return e.blockedOn=t,void a.unstable_runWithPriority(e.priority,(function(){gt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Ot(e){if(null!==e.blockedOn)return!1;var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=In(t);return null!==n&&ft(n),e.blockedOn=t,!1}return!0}function Lt(e,t,n){Ot(e)&&n.delete(t)}function Mt(){for(bt=!1;0<vt.length;){var e=vt[0];if(null!==e.blockedOn){null!==(e=In(e.blockedOn))&&mt(e);break}var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:vt.shift()}null!==yt&&Ot(yt)&&(yt=null),null!==_t&&Ot(_t)&&(_t=null),null!==xt&&Ot(xt)&&(xt=null),St.forEach(Lt),wt.forEach(Lt)}function At(e,t){e.blockedOn===t&&(e.blockedOn=null,bt||(bt=!0,a.unstable_scheduleCallback(a.unstable_NormalPriority,Mt)))}function Et(e){function t(t){return At(t,e)}if(0<vt.length){At(vt[0],e);for(var n=1;n<vt.length;n++){var s=vt[n];s.blockedOn===e&&(s.blockedOn=null)}}for(null!==yt&&At(yt,e),null!==_t&&At(_t,e),null!==xt&&At(xt,e),St.forEach(t),wt.forEach(t),n=0;n<kt.length;n++)(s=kt[n]).blockedOn===e&&(s.blockedOn=null);for(;0<kt.length&&null===(n=kt[0]).blockedOn;)It(n),null===n.blockedOn&&kt.shift()}var Ut={},Rt=new Map,Nt=new Map,Ft=["abort","abort",We,"animationEnd",ze,"animationIteration",qe,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Ge,"transitionEnd","waiting","waiting"];function Yt(e,t){for(var n=0;n<e.length;n+=2){var s=e[n],i=e[n+1],a="on"+(i[0].toUpperCase()+i.slice(1));a={phasedRegistrationNames:{bubbled:a,captured:a+"Capture"},dependencies:[s],eventPriority:t},Nt.set(s,t),Rt.set(s,a),Ut[i]=a}}Yt("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Yt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Yt(Ft,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ht=0;Ht<Bt.length;Ht++)Nt.set(Bt[Ht],0);var Vt=a.unstable_UserBlockingPriority,$t=a.unstable_runWithPriority,Wt=!0;function zt(e,t){qt(t,e,!1)}function qt(e,t,n){var s=Nt.get(t);switch(void 0===s?2:s){case 0:s=Gt.bind(null,t,1,e);break;case 1:s=Kt.bind(null,t,1,e);break;default:s=Xt.bind(null,t,1,e)}n?e.addEventListener(t,s,!0):e.addEventListener(t,s,!1)}function Gt(e,t,n,s){N||U();var i=Xt,a=N;N=!0;try{E(i,e,t,n,s)}finally{(N=a)||Y()}}function Kt(e,t,n,s){$t(Vt,Xt.bind(null,e,t,n,s))}function Xt(e,t,n,s){if(Wt)if(0<vt.length&&-1<jt.indexOf(e))e=Ct(null,e,t,n,s),vt.push(e);else{var i=Zt(e,t,n,s);if(null===i)Dt(e,s);else if(-1<jt.indexOf(e))e=Ct(i,e,t,n,s),vt.push(e);else if(!function(e,t,n,s,i){switch(t){case"focus":return yt=Pt(yt,e,t,n,s,i),!0;case"dragenter":return _t=Pt(_t,e,t,n,s,i),!0;case"mouseover":return xt=Pt(xt,e,t,n,s,i),!0;case"pointerover":var a=i.pointerId;return St.set(a,Pt(St.get(a)||null,e,t,n,s,i)),!0;case"gotpointercapture":return a=i.pointerId,wt.set(a,Pt(wt.get(a)||null,e,t,n,s,i)),!0}return!1}(i,e,t,n,s)){Dt(e,s),e=dt(e,s,null,t);try{B(pt,e)}finally{ut(e)}}}}function Zt(e,t,n,s){if(null!==(n=Pn(n=ot(s)))){var i=Je(n);if(null===i)n=null;else{var a=i.tag;if(13===a){if(null!==(n=Qe(i)))return n;n=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}e=dt(e,s,n,t);try{B(pt,e)}finally{ut(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qt=["Webkit","ms","Moz","O"];function en(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function tn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var s=0===n.indexOf("--"),i=en(n,t[n],s);"float"===n&&(n="cssFloat"),s?e.setProperty(n,i):e[n]=i}}Object.keys(Jt).forEach((function(e){Qt.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var nn=i({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sn(e,t){if(t){if(nn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(r(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var rn="http://www.w3.org/1999/xhtml";function on(e,t){var n=Ze(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=j[t];for(var s=0;s<t.length;s++)ht(t[s],e,n)}function ln(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function un(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function dn(e,t){var n,s=un(e);for(e=0;s;){if(3===s.nodeType){if(n=e+s.textContent.length,e<=t&&n>=t)return{node:s,offset:t-e};e=n}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=un(s)}}function pn(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pn(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function hn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var fn="$?",gn="$!",bn=null,vn=null;function yn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function _n(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var xn="function"==typeof setTimeout?setTimeout:void 0,Sn="function"==typeof clearTimeout?clearTimeout:void 0;function wn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function kn(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||n===gn||n===fn){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var jn=Math.random().toString(36).slice(2),Tn="__reactInternalInstance$"+jn,Cn="__reactEventHandlers$"+jn,Dn="__reactContainere$"+jn;function Pn(e){var t=e[Tn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Dn]||n[Tn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=kn(e);null!==e;){if(n=e[Tn])return n;e=kn(e)}return t}n=(e=n).parentNode}return null}function In(e){return!(e=e[Tn]||e[Dn])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function On(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(r(33))}function Ln(e){return e[Cn]||null}function Mn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function An(e,t){var n=e.stateNode;if(!n)return null;var s=m(n);if(!s)return null;n=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(s=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!s;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(r(231,t,typeof n));return n}function En(e,t,n){(t=An(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Un(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Mn(t);for(t=n.length;0<t--;)En(n[t],"captured",e);for(t=0;t<n.length;t++)En(n[t],"bubbled",e)}}function Rn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=An(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=nt(n._dispatchListeners,t),n._dispatchInstances=nt(n._dispatchInstances,e))}function Nn(e){e&&e.dispatchConfig.registrationName&&Rn(e._targetInst,null,e)}function Fn(e){st(e,Un)}var Yn=null,Bn=null,Hn=null;function Vn(){if(Hn)return Hn;var e,t,n=Bn,s=n.length,i="value"in Yn?Yn.value:Yn.textContent,a=i.length;for(e=0;e<s&&n[e]===i[e];e++);var r=s-e;for(t=1;t<=r&&n[s-t]===i[a-t];t++);return Hn=i.slice(e,1<t?1-t:void 0)}function $n(){return!0}function Wn(){return!1}function zn(e,t,n,s){for(var i in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(i)&&((t=e[i])?this[i]=t(n):"target"===i?this.target=s:this[i]=n[i]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?$n:Wn,this.isPropagationStopped=Wn,this}function qn(e,t,n,s){if(this.eventPool.length){var i=this.eventPool.pop();return this.call(i,e,t,n,s),i}return new this(e,t,n,s)}function Gn(e){if(!(e instanceof this))throw Error(r(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Kn(e){e.eventPool=[],e.getPooled=qn,e.release=Gn}i(zn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=$n)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=$n)},persist:function(){this.isPersistent=$n},isPersistent:Wn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Wn,this._dispatchInstances=this._dispatchListeners=null}}),zn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},zn.extend=function(e){function t(){}function n(){return s.apply(this,arguments)}var s=this;t.prototype=s.prototype;var a=new t;return i(a,n.prototype),n.prototype=a,n.prototype.constructor=n,n.Interface=i({},s.Interface,e),n.extend=s.extend,Kn(n),n},Kn(zn);var Xn=zn.extend({data:null}),Zn=zn.extend({data:null}),Jn=[9,13,27,32],Qn=C&&"CompositionEvent"in window,es=null;C&&"documentMode"in document&&(es=document.documentMode);var ts=C&&"TextEvent"in window&&!es,ns=C&&(!Qn||es&&8<es&&11>=es),ss=String.fromCharCode(32),is={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},as=!1;function rs(e,t){switch(e){case"keyup":return-1!==Jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function os(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ls=!1,cs={eventTypes:is,extractEvents:function(e,t,n,s){var i;if(Qn)e:{switch(e){case"compositionstart":var a=is.compositionStart;break e;case"compositionend":a=is.compositionEnd;break e;case"compositionupdate":a=is.compositionUpdate;break e}a=void 0}else ls?rs(e,n)&&(a=is.compositionEnd):"keydown"===e&&229===n.keyCode&&(a=is.compositionStart);return a?(ns&&"ko"!==n.locale&&(ls||a!==is.compositionStart?a===is.compositionEnd&&ls&&(i=Vn()):(Bn="value"in(Yn=s)?Yn.value:Yn.textContent,ls=!0)),a=Xn.getPooled(a,t,n,s),(i||null!==(i=os(n)))&&(a.data=i),Fn(a),i=a):i=null,(e=ts?function(e,t){switch(e){case"compositionend":return os(t);case"keypress":return 32!==t.which?null:(as=!0,ss);case"textInput":return(e=t.data)===ss&&as?null:e;default:return null}}(e,n):function(e,t){if(ls)return"compositionend"===e||!Qn&&rs(e,t)?(e=Vn(),Hn=Bn=Yn=null,ls=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ns&&"ko"!==t.locale?null:t.data}}(e,n))?((t=Zn.getPooled(is.beforeInput,t,n,s)).data=e,Fn(t)):t=null,null===i?t:null===t?i:[i,t]}},us={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ds(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!us[e.type]:"textarea"===t}var ps={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function hs(e,t,n){return(e=zn.getPooled(ps.change,e,t,n)).type="change",L(n),Fn(e),e}var ms=null,fs=null;function gs(e){rt(e)}function bs(e){if(xe(On(e)))return e}function vs(e,t){if("change"===e)return t}var ys=!1;function _s(){ms&&(ms.detachEvent("onpropertychange",xs),fs=ms=null)}function xs(e){if("value"===e.propertyName&&bs(fs))if(e=hs(fs,e,ot(e)),N)rt(e);else{N=!0;try{A(gs,e)}finally{N=!1,Y()}}}function Ss(e,t,n){"focus"===e?(_s(),fs=n,(ms=t).attachEvent("onpropertychange",xs)):"blur"===e&&_s()}function ws(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return bs(fs)}function ks(e,t){if("click"===e)return bs(t)}function js(e,t){if("input"===e||"change"===e)return bs(t)}C&&(ys=lt("input")&&(!document.documentMode||9<document.documentMode));var Ts={eventTypes:ps,_isInputEventSupported:ys,extractEvents:function(e,t,n,s){var i=t?On(t):window,a=i.nodeName&&i.nodeName.toLowerCase();if("select"===a||"input"===a&&"file"===i.type)var r=vs;else if(ds(i))if(ys)r=js;else{r=ws;var o=Ss}else(a=i.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===i.type||"radio"===i.type)&&(r=ks);if(r&&(r=r(e,t)))return hs(r,n,s);o&&o(e,i,t),"blur"===e&&(e=i._wrapperState)&&e.controlled&&"number"===i.type&&Ce(i,"number",i.value)}},Cs=zn.extend({view:null,detail:null}),Ds={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ps(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Ds[e])&&!!t[e]}function Is(){return Ps}var Os=0,Ls=0,Ms=!1,As=!1,Es=Cs.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Is,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Os;return Os=e.screenX,Ms?"mousemove"===e.type?e.screenX-t:0:(Ms=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ls;return Ls=e.screenY,As?"mousemove"===e.type?e.screenY-t:0:(As=!0,0)}}),Us=Es.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),Rs={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Ns={eventTypes:Rs,extractEvents:function(e,t,n,s,i){var a="mouseover"===e||"pointerover"===e,r="mouseout"===e||"pointerout"===e;if(a&&0==(32&i)&&(n.relatedTarget||n.fromElement)||!r&&!a)return null;if(a=s.window===s?s:(a=s.ownerDocument)?a.defaultView||a.parentWindow:window,r?(r=t,null!==(t=(t=n.relatedTarget||n.toElement)?Pn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):r=null,r===t)return null;if("mouseout"===e||"mouseover"===e)var o=Es,l=Rs.mouseLeave,c=Rs.mouseEnter,u="mouse";else"pointerout"!==e&&"pointerover"!==e||(o=Us,l=Rs.pointerLeave,c=Rs.pointerEnter,u="pointer");if(e=null==r?a:On(r),a=null==t?a:On(t),(l=o.getPooled(l,r,n,s)).type=u+"leave",l.target=e,l.relatedTarget=a,(n=o.getPooled(c,t,n,s)).type=u+"enter",n.target=a,n.relatedTarget=e,u=t,(s=r)&&u)e:{for(c=u,r=0,e=o=s;e;e=Mn(e))r++;for(e=0,t=c;t;t=Mn(t))e++;for(;0<r-e;)o=Mn(o),r--;for(;0<e-r;)c=Mn(c),e--;for(;r--;){if(o===c||o===c.alternate)break e;o=Mn(o),c=Mn(c)}o=null}else o=null;for(c=o,o=[];s&&s!==c&&(null===(r=s.alternate)||r!==c);)o.push(s),s=Mn(s);for(s=[];u&&u!==c&&(null===(r=u.alternate)||r!==c);)s.push(u),u=Mn(u);for(u=0;u<o.length;u++)Rn(o[u],"bubbled",l);for(u=s.length;0<u--;)Rn(s[u],"captured",n);return 0==(64&i)?[l]:[l,n]}},Fs="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Ys=Object.prototype.hasOwnProperty;function Bs(e,t){if(Fs(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++)if(!Ys.call(t,n[s])||!Fs(e[n[s]],t[n[s]]))return!1;return!0}var Hs=C&&"documentMode"in document&&11>=document.documentMode,Vs={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},$s=null,Ws=null,zs=null,qs=!1;function Gs(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return qs||null==$s||$s!==cn(n)?null:(n="selectionStart"in(n=$s)&&mn(n)?{start:n.selectionStart,end:n.selectionEnd}:{anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},zs&&Bs(zs,n)?null:(zs=n,(e=zn.getPooled(Vs.select,Ws,e,t)).type="select",e.target=$s,Fn(e),e))}var Ks={eventTypes:Vs,extractEvents:function(e,t,n,s,i,a){if(!(a=!(i=a||(s.window===s?s.document:9===s.nodeType?s:s.ownerDocument)))){e:{i=Ze(i),a=j.onSelect;for(var r=0;r<a.length;r++)if(!i.has(a[r])){i=!1;break e}i=!0}a=!i}if(a)return null;switch(i=t?On(t):window,e){case"focus":(ds(i)||"true"===i.contentEditable)&&($s=i,Ws=t,zs=null);break;case"blur":zs=Ws=$s=null;break;case"mousedown":qs=!0;break;case"contextmenu":case"mouseup":case"dragend":return qs=!1,Gs(n,s);case"selectionchange":if(Hs)break;case"keydown":case"keyup":return Gs(n,s)}return null}},Xs=zn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Zs=zn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Js=Cs.extend({relatedTarget:null});function Qs(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var ei={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ti={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ni=Cs.extend({key:function(e){if(e.key){var t=ei[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qs(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?ti[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Is,charCode:function(e){return"keypress"===e.type?Qs(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qs(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),si=Es.extend({dataTransfer:null}),ii=Cs.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Is}),ai=zn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),ri=Es.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),oi={eventTypes:Ut,extractEvents:function(e,t,n,s){var i=Rt.get(e);if(!i)return null;switch(e){case"keypress":if(0===Qs(n))return null;case"keydown":case"keyup":e=ni;break;case"blur":case"focus":e=Js;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Es;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=si;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=ii;break;case We:case ze:case qe:e=Xs;break;case Ge:e=ai;break;case"scroll":e=Cs;break;case"wheel":e=ri;break;case"copy":case"cut":case"paste":e=Zs;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Us;break;default:e=zn}return Fn(t=e.getPooled(i,t,n,s)),t}};if(v)throw Error(r(101));v=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),_(),m=Ln,f=In,g=On,T({SimpleEventPlugin:oi,EnterLeaveEventPlugin:Ns,ChangeEventPlugin:Ts,SelectEventPlugin:Ks,BeforeInputEventPlugin:cs});var li=[],ci=-1;function ui(e){0>ci||(e.current=li[ci],li[ci]=null,ci--)}function di(e,t){ci++,li[ci]=e.current,e.current=t}var pi={},hi={current:pi},mi={current:!1},fi=pi;function gi(e,t){var n=e.type.contextTypes;if(!n)return pi;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return s&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function bi(e){return null!=e.childContextTypes}function vi(){ui(mi),ui(hi)}function yi(e,t,n){if(hi.current!==pi)throw Error(r(168));di(hi,t),di(mi,n)}function _i(e,t,n){var s=e.stateNode;if(e=t.childContextTypes,"function"!=typeof s.getChildContext)return n;for(var a in s=s.getChildContext())if(!(a in e))throw Error(r(108,ge(t)||"Unknown",a));return i({},n,{},s)}function xi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pi,fi=hi.current,di(hi,e),di(mi,mi.current),!0}function Si(e,t,n){var s=e.stateNode;if(!s)throw Error(r(169));n?(e=_i(e,t,fi),s.__reactInternalMemoizedMergedChildContext=e,ui(mi),ui(hi),di(hi,e)):ui(mi),di(mi,n)}var wi=a.unstable_runWithPriority,ki=a.unstable_scheduleCallback,ji=a.unstable_cancelCallback,Ti=a.unstable_requestPaint,Ci=a.unstable_now,Di=a.unstable_getCurrentPriorityLevel,Pi=a.unstable_ImmediatePriority,Ii=a.unstable_UserBlockingPriority,Oi=a.unstable_NormalPriority,Li=a.unstable_LowPriority,Mi=a.unstable_IdlePriority,Ai={},Ei=a.unstable_shouldYield,Ui=void 0!==Ti?Ti:function(){},Ri=null,Ni=null,Fi=!1,Yi=Ci(),Bi=1e4>Yi?Ci:function(){return Ci()-Yi};function Hi(){switch(Di()){case Pi:return 99;case Ii:return 98;case Oi:return 97;case Li:return 96;case Mi:return 95;default:throw Error(r(332))}}function Vi(e){switch(e){case 99:return Pi;case 98:return Ii;case 97:return Oi;case 96:return Li;case 95:return Mi;default:throw Error(r(332))}}function $i(e,t){return e=Vi(e),wi(e,t)}function Wi(e,t,n){return e=Vi(e),ki(e,t,n)}function zi(e){return null===Ri?(Ri=[e],Ni=ki(Pi,Gi)):Ri.push(e),Ai}function qi(){if(null!==Ni){var e=Ni;Ni=null,ji(e)}Gi()}function Gi(){if(!Fi&&null!==Ri){Fi=!0;var e=0;try{var t=Ri;$i(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Ri=null}catch(t){throw null!==Ri&&(Ri=Ri.slice(e+1)),ki(Pi,qi),t}finally{Fi=!1}}}function Ki(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Xi(e,t){if(e&&e.defaultProps)for(var n in t=i({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Zi={current:null},Ji=null,Qi=null,ea=null;function ta(){ea=Qi=Ji=null}function na(e){var t=Zi.current;ui(Zi),e.type._context._currentValue=t}function sa(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ia(e,t){Ji=e,ea=Qi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Or=!0),e.firstContext=null)}function aa(e,t){if(ea!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ea=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Qi){if(null===Ji)throw Error(r(308));Qi=t,Ji.dependencies={expirationTime:0,firstContext:t,responders:null}}else Qi=Qi.next=t;return e._currentValue}var ra=!1;function oa(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function la(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function ca(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function ua(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function da(e,t){var n=e.alternate;null!==n&&la(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function pa(e,t,n,s){var a=e.updateQueue;ra=!1;var r=a.baseQueue,o=a.shared.pending;if(null!==o){if(null!==r){var l=r.next;r.next=o.next,o.next=l}r=o,a.shared.pending=null,null!==(l=e.alternate)&&null!==(l=l.updateQueue)&&(l.baseQueue=o)}if(null!==r){l=r.next;var c=a.baseState,u=0,d=null,p=null,h=null;if(null!==l)for(var m=l;;){if((o=m.expirationTime)<s){var f={expirationTime:m.expirationTime,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null};null===h?(p=h=f,d=c):h=h.next=f,o>u&&(u=o)}else{null!==h&&(h=h.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null}),cl(o,m.suspenseConfig);e:{var g=e,b=m;switch(o=t,f=n,b.tag){case 1:if("function"==typeof(g=b.payload)){c=g.call(f,c,o);break e}c=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(o="function"==typeof(g=b.payload)?g.call(f,c,o):g))break e;c=i({},c,o);break e;case 2:ra=!0}}null!==m.callback&&(e.effectTag|=32,null===(o=a.effects)?a.effects=[m]:o.push(m))}if(null===(m=m.next)||m===l){if(null===(o=a.shared.pending))break;m=r.next=o.next,o.next=l,a.baseQueue=r=o,a.shared.pending=null}}null===h?d=c:h.next=p,a.baseState=d,a.baseQueue=h,ul(u),e.expirationTime=u,e.memoizedState=c}}function ha(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var s=e[t],i=s.callback;if(null!==i){if(s.callback=null,s=i,i=n,"function"!=typeof s)throw Error(r(191,s));s.call(i)}}}var ma=X.ReactCurrentBatchConfig,fa=(new s.Component).refs;function ga(e,t,n,s){n=null==(n=n(s,t=e.memoizedState))?t:i({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var ba={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var s=Xo(),i=ma.suspense;(i=ca(s=Zo(s,e,i),i)).payload=t,null!=n&&(i.callback=n),ua(e,i),Jo(e,s)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var s=Xo(),i=ma.suspense;(i=ca(s=Zo(s,e,i),i)).tag=1,i.payload=t,null!=n&&(i.callback=n),ua(e,i),Jo(e,s)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Xo(),s=ma.suspense;(s=ca(n=Zo(n,e,s),s)).tag=2,null!=t&&(s.callback=t),ua(e,s),Jo(e,n)}};function va(e,t,n,s,i,a,r){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(s,a,r):!(t.prototype&&t.prototype.isPureReactComponent&&Bs(n,s)&&Bs(i,a))}function ya(e,t,n){var s=!1,i=pi,a=t.contextType;return"object"==typeof a&&null!==a?a=aa(a):(i=bi(t)?fi:hi.current,a=(s=null!=(s=t.contextTypes))?gi(e,i):pi),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ba,e.stateNode=t,t._reactInternalFiber=e,s&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function _a(e,t,n,s){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,s),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&ba.enqueueReplaceState(t,t.state,null)}function xa(e,t,n,s){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=fa,oa(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=aa(a):(a=bi(t)?fi:hi.current,i.context=gi(e,a)),pa(e,n,i,s),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(ga(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ba.enqueueReplaceState(i,i.state,null),pa(e,n,i,s),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.effectTag|=4)}var Sa=Array.isArray;function wa(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(r(309));var s=n.stateNode}if(!s)throw Error(r(147,e));var i=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===i?t.ref:(t=function(e){var t=s.refs;t===fa&&(t=s.refs={}),null===e?delete t[i]:t[i]=e},t._stringRef=i,t)}if("string"!=typeof e)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function ka(e,t){if("textarea"!==e.type)throw Error(r(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function ja(e){function t(t,n){if(e){var s=t.lastEffect;null!==s?(s.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,s){if(!e)return null;for(;null!==s;)t(n,s),s=s.sibling;return null}function s(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Il(e,t)).index=0,e.sibling=null,e}function a(t,n,s){return t.index=s,e?null!==(s=t.alternate)?(s=s.index)<n?(t.effectTag=2,n):s:(t.effectTag=2,n):n}function o(t){return e&&null===t.alternate&&(t.effectTag=2),t}function l(e,t,n,s){return null===t||6!==t.tag?((t=Ml(n,e.mode,s)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,s){return null!==t&&t.elementType===n.type?((s=i(t,n.props)).ref=wa(e,t,n),s.return=e,s):((s=Ol(n.type,n.key,n.props,null,e.mode,s)).ref=wa(e,t,n),s.return=e,s)}function u(e,t,n,s){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Al(n,e.mode,s)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,s,a){return null===t||7!==t.tag?((t=Ll(n,e.mode,s,a)).return=e,t):((t=i(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ml(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Ol(t.type,t.key,t.props,null,e.mode,n)).ref=wa(e,null,t),n.return=e,n;case te:return(t=Al(t,e.mode,n)).return=e,t}if(Sa(t)||fe(t))return(t=Ll(t,e.mode,n,null)).return=e,t;ka(e,t)}return null}function h(e,t,n,s){var i=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==i?null:l(e,t,""+n,s);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===i?n.type===ne?d(e,t,n.props.children,s,i):c(e,t,n,s):null;case te:return n.key===i?u(e,t,n,s):null}if(Sa(n)||fe(n))return null!==i?null:d(e,t,n,s,null);ka(e,n)}return null}function m(e,t,n,s,i){if("string"==typeof s||"number"==typeof s)return l(t,e=e.get(n)||null,""+s,i);if("object"==typeof s&&null!==s){switch(s.$$typeof){case ee:return e=e.get(null===s.key?n:s.key)||null,s.type===ne?d(t,e,s.props.children,i,s.key):c(t,e,s,i);case te:return u(t,e=e.get(null===s.key?n:s.key)||null,s,i)}if(Sa(s)||fe(s))return d(t,e=e.get(n)||null,s,i,null);ka(t,s)}return null}function f(i,r,o,l){for(var c=null,u=null,d=r,f=r=0,g=null;null!==d&&f<o.length;f++){d.index>f?(g=d,d=null):g=d.sibling;var b=h(i,d,o[f],l);if(null===b){null===d&&(d=g);break}e&&d&&null===b.alternate&&t(i,d),r=a(b,r,f),null===u?c=b:u.sibling=b,u=b,d=g}if(f===o.length)return n(i,d),c;if(null===d){for(;f<o.length;f++)null!==(d=p(i,o[f],l))&&(r=a(d,r,f),null===u?c=d:u.sibling=d,u=d);return c}for(d=s(i,d);f<o.length;f++)null!==(g=m(d,i,f,o[f],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?f:g.key),r=a(g,r,f),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),c}function g(i,o,l,c){var u=fe(l);if("function"!=typeof u)throw Error(r(150));if(null==(l=u.call(l)))throw Error(r(151));for(var d=u=null,f=o,g=o=0,b=null,v=l.next();null!==f&&!v.done;g++,v=l.next()){f.index>g?(b=f,f=null):b=f.sibling;var y=h(i,f,v.value,c);if(null===y){null===f&&(f=b);break}e&&f&&null===y.alternate&&t(i,f),o=a(y,o,g),null===d?u=y:d.sibling=y,d=y,f=b}if(v.done)return n(i,f),u;if(null===f){for(;!v.done;g++,v=l.next())null!==(v=p(i,v.value,c))&&(o=a(v,o,g),null===d?u=v:d.sibling=v,d=v);return u}for(f=s(i,f);!v.done;g++,v=l.next())null!==(v=m(f,i,g,v.value,c))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),o=a(v,o,g),null===d?u=v:d.sibling=v,d=v);return e&&f.forEach((function(e){return t(i,e)})),u}return function(e,s,a,l){var c="object"==typeof a&&null!==a&&a.type===ne&&null===a.key;c&&(a=a.props.children);var u="object"==typeof a&&null!==a;if(u)switch(a.$$typeof){case ee:e:{for(u=a.key,c=s;null!==c;){if(c.key===u){if(7===c.tag){if(a.type===ne){n(e,c.sibling),(s=i(c,a.props.children)).return=e,e=s;break e}}else if(c.elementType===a.type){n(e,c.sibling),(s=i(c,a.props)).ref=wa(e,c,a),s.return=e,e=s;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===ne?((s=Ll(a.props.children,e.mode,l,a.key)).return=e,e=s):((l=Ol(a.type,a.key,a.props,null,e.mode,l)).ref=wa(e,s,a),l.return=e,e=l)}return o(e);case te:e:{for(c=a.key;null!==s;){if(s.key===c){if(4===s.tag&&s.stateNode.containerInfo===a.containerInfo&&s.stateNode.implementation===a.implementation){n(e,s.sibling),(s=i(s,a.children||[])).return=e,e=s;break e}n(e,s);break}t(e,s),s=s.sibling}(s=Al(a,e.mode,l)).return=e,e=s}return o(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==s&&6===s.tag?(n(e,s.sibling),(s=i(s,a)).return=e,e=s):(n(e,s),(s=Ml(a,e.mode,l)).return=e,e=s),o(e);if(Sa(a))return f(e,s,a,l);if(fe(a))return g(e,s,a,l);if(u&&ka(e,a),void 0===a&&!c)switch(e.tag){case 1:case 0:throw e=e.type,Error(r(152,e.displayName||e.name||"Component"))}return n(e,s)}}var Ta=ja(!0),Ca=ja(!1),Da={},Pa={current:Da},Ia={current:Da},Oa={current:Da};function La(e){if(e===Da)throw Error(r(174));return e}function Ma(e,t){switch(di(Oa,t),di(Ia,e),di(Pa,Da),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ee(null,"");break;default:t=Ee(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}ui(Pa),di(Pa,t)}function Aa(){ui(Pa),ui(Ia),ui(Oa)}function Ea(e){La(Oa.current);var t=La(Pa.current),n=Ee(t,e.type);t!==n&&(di(Ia,e),di(Pa,n))}function Ua(e){Ia.current===e&&(ui(Pa),ui(Ia))}var Ra={current:0};function Na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||n.data===fn||n.data===gn))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Fa(e,t){return{responder:e,props:t}}var Ya=X.ReactCurrentDispatcher,Ba=X.ReactCurrentBatchConfig,Ha=0,Va=null,$a=null,Wa=null,za=!1;function qa(){throw Error(r(321))}function Ga(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fs(e[n],t[n]))return!1;return!0}function Ka(e,t,n,s,i,a){if(Ha=a,Va=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,Ya.current=null===e||null===e.memoizedState?vr:yr,e=n(s,i),t.expirationTime===Ha){a=0;do{if(t.expirationTime=0,!(25>a))throw Error(r(301));a+=1,Wa=$a=null,t.updateQueue=null,Ya.current=_r,e=n(s,i)}while(t.expirationTime===Ha)}if(Ya.current=br,t=null!==$a&&null!==$a.next,Ha=0,Wa=$a=Va=null,za=!1,t)throw Error(r(300));return e}function Xa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wa?Va.memoizedState=Wa=e:Wa=Wa.next=e,Wa}function Za(){if(null===$a){var e=Va.alternate;e=null!==e?e.memoizedState:null}else e=$a.next;var t=null===Wa?Va.memoizedState:Wa.next;if(null!==t)Wa=t,$a=e;else{if(null===e)throw Error(r(310));e={memoizedState:($a=e).memoizedState,baseState:$a.baseState,baseQueue:$a.baseQueue,queue:$a.queue,next:null},null===Wa?Va.memoizedState=Wa=e:Wa=Wa.next=e}return Wa}function Ja(e,t){return"function"==typeof t?t(e):t}function Qa(e){var t=Za(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var s=$a,i=s.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}s.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,s=s.baseState;var l=o=a=null,c=i;do{var u=c.expirationTime;if(u<Ha){var d={expirationTime:c.expirationTime,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null};null===l?(o=l=d,a=s):l=l.next=d,u>Va.expirationTime&&(Va.expirationTime=u,ul(u))}else null!==l&&(l=l.next={expirationTime:1073741823,suspenseConfig:c.suspenseConfig,action:c.action,eagerReducer:c.eagerReducer,eagerState:c.eagerState,next:null}),cl(u,c.suspenseConfig),s=c.eagerReducer===e?c.eagerState:e(s,c.action);c=c.next}while(null!==c&&c!==i);null===l?a=s:l.next=o,Fs(s,t.memoizedState)||(Or=!0),t.memoizedState=s,t.baseState=a,t.baseQueue=l,n.lastRenderedState=s}return[t.memoizedState,n.dispatch]}function er(e){var t=Za(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var s=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=e(a,o.action),o=o.next}while(o!==i);Fs(a,t.memoizedState)||(Or=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,s]}function tr(e){var t=Xa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:e}).dispatch=gr.bind(null,Va,e),[t.memoizedState,e]}function nr(e,t,n,s){return e={tag:e,create:t,destroy:n,deps:s,next:null},null===(t=Va.updateQueue)?(t={lastEffect:null},Va.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e),e}function sr(){return Za().memoizedState}function ir(e,t,n,s){var i=Xa();Va.effectTag|=e,i.memoizedState=nr(1|t,n,void 0,void 0===s?null:s)}function ar(e,t,n,s){var i=Za();s=void 0===s?null:s;var a=void 0;if(null!==$a){var r=$a.memoizedState;if(a=r.destroy,null!==s&&Ga(s,r.deps))return void nr(t,n,a,s)}Va.effectTag|=e,i.memoizedState=nr(1|t,n,a,s)}function rr(e,t){return ir(516,4,e,t)}function or(e,t){return ar(516,4,e,t)}function lr(e,t){return ar(4,2,e,t)}function cr(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ur(e,t,n){return n=null!=n?n.concat([e]):null,ar(4,2,cr.bind(null,t,e),n)}function dr(){}function pr(e,t){return Xa().memoizedState=[e,void 0===t?null:t],e}function hr(e,t){var n=Za();t=void 0===t?null:t;var s=n.memoizedState;return null!==s&&null!==t&&Ga(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function mr(e,t){var n=Za();t=void 0===t?null:t;var s=n.memoizedState;return null!==s&&null!==t&&Ga(t,s[1])?s[0]:(e=e(),n.memoizedState=[e,t],e)}function fr(e,t,n){var s=Hi();$i(98>s?98:s,(function(){e(!0)})),$i(97<s?97:s,(function(){var s=Ba.suspense;Ba.suspense=void 0===t?null:t;try{e(!1),n()}finally{Ba.suspense=s}}))}function gr(e,t,n){var s=Xo(),i=ma.suspense;i={expirationTime:s=Zo(s,e,i),suspenseConfig:i,action:n,eagerReducer:null,eagerState:null,next:null};var a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===Va||null!==a&&a===Va)za=!0,i.expirationTime=Ha,Va.expirationTime=Ha;else{if(0===e.expirationTime&&(null===a||0===a.expirationTime)&&null!==(a=t.lastRenderedReducer))try{var r=t.lastRenderedState,o=a(r,n);if(i.eagerReducer=a,i.eagerState=o,Fs(o,r))return}catch(e){}Jo(e,s)}}var br={readContext:aa,useCallback:qa,useContext:qa,useEffect:qa,useImperativeHandle:qa,useLayoutEffect:qa,useMemo:qa,useReducer:qa,useRef:qa,useState:qa,useDebugValue:qa,useResponder:qa,useDeferredValue:qa,useTransition:qa},vr={readContext:aa,useCallback:pr,useContext:aa,useEffect:rr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ir(4,2,cr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ir(4,2,e,t)},useMemo:function(e,t){var n=Xa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var s=Xa();return t=void 0!==n?n(t):t,s.memoizedState=s.baseState=t,e=(e=s.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=gr.bind(null,Va,e),[s.memoizedState,e]},useRef:function(e){return e={current:e},Xa().memoizedState=e},useState:tr,useDebugValue:dr,useResponder:Fa,useDeferredValue:function(e,t){var n=tr(e),s=n[0],i=n[1];return rr((function(){var n=Ba.suspense;Ba.suspense=void 0===t?null:t;try{i(e)}finally{Ba.suspense=n}}),[e,t]),s},useTransition:function(e){var t=tr(!1),n=t[0];return t=t[1],[pr(fr.bind(null,t,e),[t,e]),n]}},yr={readContext:aa,useCallback:hr,useContext:aa,useEffect:or,useImperativeHandle:ur,useLayoutEffect:lr,useMemo:mr,useReducer:Qa,useRef:sr,useState:function(){return Qa(Ja)},useDebugValue:dr,useResponder:Fa,useDeferredValue:function(e,t){var n=Qa(Ja),s=n[0],i=n[1];return or((function(){var n=Ba.suspense;Ba.suspense=void 0===t?null:t;try{i(e)}finally{Ba.suspense=n}}),[e,t]),s},useTransition:function(e){var t=Qa(Ja),n=t[0];return t=t[1],[hr(fr.bind(null,t,e),[t,e]),n]}},_r={readContext:aa,useCallback:hr,useContext:aa,useEffect:or,useImperativeHandle:ur,useLayoutEffect:lr,useMemo:mr,useReducer:er,useRef:sr,useState:function(){return er(Ja)},useDebugValue:dr,useResponder:Fa,useDeferredValue:function(e,t){var n=er(Ja),s=n[0],i=n[1];return or((function(){var n=Ba.suspense;Ba.suspense=void 0===t?null:t;try{i(e)}finally{Ba.suspense=n}}),[e,t]),s},useTransition:function(e){var t=er(Ja),n=t[0];return t=t[1],[hr(fr.bind(null,t,e),[t,e]),n]}},xr=null,Sr=null,wr=!1;function kr(e,t){var n=Dl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function jr(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Tr(e){if(wr){var t=Sr;if(t){var n=t;if(!jr(e,t)){if(!(t=wn(n.nextSibling))||!jr(e,t))return e.effectTag=-1025&e.effectTag|2,wr=!1,void(xr=e);kr(xr,n)}xr=e,Sr=wn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,wr=!1,xr=e}}function Cr(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;xr=e}function Dr(e){if(e!==xr)return!1;if(!wr)return Cr(e),wr=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!_n(t,e.memoizedProps))for(t=Sr;t;)kr(e,t),t=wn(t.nextSibling);if(Cr(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Sr=wn(e.nextSibling);break e}t--}else"$"!==n&&n!==gn&&n!==fn||t++}e=e.nextSibling}Sr=null}}else Sr=xr?wn(e.stateNode.nextSibling):null;return!0}function Pr(){Sr=xr=null,wr=!1}var Ir=X.ReactCurrentOwner,Or=!1;function Lr(e,t,n,s){t.child=null===e?Ca(t,null,n,s):Ta(t,e.child,n,s)}function Mr(e,t,n,s,i){n=n.render;var a=t.ref;return ia(t,i),s=Ka(e,t,n,s,a,i),null===e||Or?(t.effectTag|=1,Lr(e,t,s,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Kr(e,t,i))}function Ar(e,t,n,s,i,a){if(null===e){var r=n.type;return"function"!=typeof r||Pl(r)||void 0!==r.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ol(n.type,null,s,null,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=r,Er(e,t,r,s,i,a))}return r=e.child,i<a&&(i=r.memoizedProps,(n=null!==(n=n.compare)?n:Bs)(i,s)&&e.ref===t.ref)?Kr(e,t,a):(t.effectTag|=1,(e=Il(r,s)).ref=t.ref,e.return=t,t.child=e)}function Er(e,t,n,s,i,a){return null!==e&&Bs(e.memoizedProps,s)&&e.ref===t.ref&&(Or=!1,i<a)?(t.expirationTime=e.expirationTime,Kr(e,t,a)):Rr(e,t,n,s,a)}function Ur(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Rr(e,t,n,s,i){var a=bi(n)?fi:hi.current;return a=gi(t,a),ia(t,i),n=Ka(e,t,n,s,a,i),null===e||Or?(t.effectTag|=1,Lr(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=i&&(e.expirationTime=0),Kr(e,t,i))}function Nr(e,t,n,s,i){if(bi(n)){var a=!0;xi(t)}else a=!1;if(ia(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),ya(t,n,s),xa(t,n,s,i),s=!0;else if(null===e){var r=t.stateNode,o=t.memoizedProps;r.props=o;var l=r.context,c=n.contextType;c="object"==typeof c&&null!==c?aa(c):gi(t,c=bi(n)?fi:hi.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof r.getSnapshotBeforeUpdate;d||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(o!==s||l!==c)&&_a(t,r,s,c),ra=!1;var p=t.memoizedState;r.state=p,pa(t,s,r,i),l=t.memoizedState,o!==s||p!==l||mi.current||ra?("function"==typeof u&&(ga(t,n,u,s),l=t.memoizedState),(o=ra||va(t,n,o,s,p,l,c))?(d||"function"!=typeof r.UNSAFE_componentWillMount&&"function"!=typeof r.componentWillMount||("function"==typeof r.componentWillMount&&r.componentWillMount(),"function"==typeof r.UNSAFE_componentWillMount&&r.UNSAFE_componentWillMount()),"function"==typeof r.componentDidMount&&(t.effectTag|=4)):("function"==typeof r.componentDidMount&&(t.effectTag|=4),t.memoizedProps=s,t.memoizedState=l),r.props=s,r.state=l,r.context=c,s=o):("function"==typeof r.componentDidMount&&(t.effectTag|=4),s=!1)}else r=t.stateNode,la(e,t),o=t.memoizedProps,r.props=t.type===t.elementType?o:Xi(t.type,o),l=r.context,c="object"==typeof(c=n.contextType)&&null!==c?aa(c):gi(t,c=bi(n)?fi:hi.current),(d="function"==typeof(u=n.getDerivedStateFromProps)||"function"==typeof r.getSnapshotBeforeUpdate)||"function"!=typeof r.UNSAFE_componentWillReceiveProps&&"function"!=typeof r.componentWillReceiveProps||(o!==s||l!==c)&&_a(t,r,s,c),ra=!1,l=t.memoizedState,r.state=l,pa(t,s,r,i),p=t.memoizedState,o!==s||l!==p||mi.current||ra?("function"==typeof u&&(ga(t,n,u,s),p=t.memoizedState),(u=ra||va(t,n,o,s,l,p,c))?(d||"function"!=typeof r.UNSAFE_componentWillUpdate&&"function"!=typeof r.componentWillUpdate||("function"==typeof r.componentWillUpdate&&r.componentWillUpdate(s,p,c),"function"==typeof r.UNSAFE_componentWillUpdate&&r.UNSAFE_componentWillUpdate(s,p,c)),"function"==typeof r.componentDidUpdate&&(t.effectTag|=4),"function"==typeof r.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof r.componentDidUpdate||o===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),t.memoizedProps=s,t.memoizedState=p),r.props=s,r.state=p,r.context=c,s=u):("function"!=typeof r.componentDidUpdate||o===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=4),"function"!=typeof r.getSnapshotBeforeUpdate||o===e.memoizedProps&&l===e.memoizedState||(t.effectTag|=256),s=!1);return Fr(e,t,n,s,a,i)}function Fr(e,t,n,s,i,a){Ur(e,t);var r=0!=(64&t.effectTag);if(!s&&!r)return i&&Si(t,n,!1),Kr(e,t,a);s=t.stateNode,Ir.current=t;var o=r&&"function"!=typeof n.getDerivedStateFromError?null:s.render();return t.effectTag|=1,null!==e&&r?(t.child=Ta(t,e.child,null,a),t.child=Ta(t,null,o,a)):Lr(e,t,o,a),t.memoizedState=s.state,i&&Si(t,n,!0),t.child}function Yr(e){var t=e.stateNode;t.pendingContext?yi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yi(0,t.context,!1),Ma(e,t.containerInfo)}var Br,Hr,Vr,$r={dehydrated:null,retryTime:0};function Wr(e,t,n){var s,i=t.mode,a=t.pendingProps,r=Ra.current,o=!1;if((s=0!=(64&t.effectTag))||(s=0!=(2&r)&&(null===e||null!==e.memoizedState)),s?(o=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===a.fallback||!0===a.unstable_avoidThisFallback||(r|=1),di(Ra,1&r),null===e){if(void 0!==a.fallback&&Tr(t),o){if(o=a.fallback,(a=Ll(null,i,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(n=Ll(o,i,n,null)).return=t,a.sibling=n,t.memoizedState=$r,t.child=a,n}return i=a.children,t.memoizedState=null,t.child=Ca(t,null,i,n)}if(null!==e.memoizedState){if(i=(e=e.child).sibling,o){if(a=a.fallback,(n=Il(e,e.pendingProps)).return=t,0==(2&t.mode)&&(o=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=o;null!==o;)o.return=n,o=o.sibling;return(i=Il(i,a)).return=t,n.sibling=i,n.childExpirationTime=0,t.memoizedState=$r,t.child=n,i}return n=Ta(t,e.child,a.children,n),t.memoizedState=null,t.child=n}if(e=e.child,o){if(o=a.fallback,(a=Ll(null,i,0,null)).return=t,a.child=e,null!==e&&(e.return=a),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,a.child=e;null!==e;)e.return=a,e=e.sibling;return(n=Ll(o,i,n,null)).return=t,a.sibling=n,n.effectTag|=2,a.childExpirationTime=0,t.memoizedState=$r,t.child=a,n}return t.memoizedState=null,t.child=Ta(t,e,a.children,n)}function zr(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),sa(e.return,t)}function qr(e,t,n,s,i,a){var r=e.memoizedState;null===r?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailExpiration:0,tailMode:i,lastEffect:a}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=s,r.tail=n,r.tailExpiration=0,r.tailMode=i,r.lastEffect=a)}function Gr(e,t,n){var s=t.pendingProps,i=s.revealOrder,a=s.tail;if(Lr(e,t,s.children,n),0!=(2&(s=Ra.current)))s=1&s|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zr(e,n);else if(19===e.tag)zr(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(di(Ra,s),0==(2&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===Na(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),qr(t,!1,i,n,a,t.lastEffect);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===Na(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}qr(t,!0,n,null,a,t.lastEffect);break;case"together":qr(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Kr(e,t,n){null!==e&&(t.dependencies=e.dependencies);var s=t.expirationTime;if(0!==s&&ul(s),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(r(153));if(null!==t.child){for(n=Il(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Il(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Xr(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var s=null;null!==n;)null!==n.alternate&&(s=n),n=n.sibling;null===s?t||null===e.tail?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Zr(e,t,n){var s=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return bi(t.type)&&vi(),null;case 3:return Aa(),ui(mi),ui(hi),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Dr(t)||(t.effectTag|=4),null;case 5:Ua(t),n=La(Oa.current);var a=t.type;if(null!==e&&null!=t.stateNode)Hr(e,t,a,s,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!s){if(null===t.stateNode)throw Error(r(166));return null}if(e=La(Pa.current),Dr(t)){s=t.stateNode,a=t.type;var o=t.memoizedProps;switch(s[Tn]=t,s[Cn]=o,a){case"iframe":case"object":case"embed":zt("load",s);break;case"video":case"audio":for(e=0;e<Ke.length;e++)zt(Ke[e],s);break;case"source":zt("error",s);break;case"img":case"image":case"link":zt("error",s),zt("load",s);break;case"form":zt("reset",s),zt("submit",s);break;case"details":zt("toggle",s);break;case"input":we(s,o),zt("invalid",s),on(n,"onChange");break;case"select":s._wrapperState={wasMultiple:!!o.multiple},zt("invalid",s),on(n,"onChange");break;case"textarea":Oe(s,o),zt("invalid",s),on(n,"onChange")}for(var l in sn(a,o),e=null,o)if(o.hasOwnProperty(l)){var c=o[l];"children"===l?"string"==typeof c?s.textContent!==c&&(e=["children",c]):"number"==typeof c&&s.textContent!==""+c&&(e=["children",""+c]):k.hasOwnProperty(l)&&null!=c&&on(n,l)}switch(a){case"input":_e(s),Te(s,o,!0);break;case"textarea":_e(s),Me(s);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(s.onclick=ln)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(l=9===n.nodeType?n:n.ownerDocument,e===rn&&(e=Ae(a)),e===rn?"script"===a?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof s.is?e=l.createElement(a,{is:s.is}):(e=l.createElement(a),"select"===a&&(l=e,s.multiple?l.multiple=!0:s.size&&(l.size=s.size))):e=l.createElementNS(e,a),e[Tn]=t,e[Cn]=s,Br(e,t),t.stateNode=e,l=an(a,s),a){case"iframe":case"object":case"embed":zt("load",e),c=s;break;case"video":case"audio":for(c=0;c<Ke.length;c++)zt(Ke[c],e);c=s;break;case"source":zt("error",e),c=s;break;case"img":case"image":case"link":zt("error",e),zt("load",e),c=s;break;case"form":zt("reset",e),zt("submit",e),c=s;break;case"details":zt("toggle",e),c=s;break;case"input":we(e,s),c=Se(e,s),zt("invalid",e),on(n,"onChange");break;case"option":c=De(e,s);break;case"select":e._wrapperState={wasMultiple:!!s.multiple},c=i({},s,{value:void 0}),zt("invalid",e),on(n,"onChange");break;case"textarea":Oe(e,s),c=Ie(e,s),zt("invalid",e),on(n,"onChange");break;default:c=s}sn(a,c);var u=c;for(o in u)if(u.hasOwnProperty(o)){var d=u[o];"style"===o?tn(e,d):"dangerouslySetInnerHTML"===o?null!=(d=d?d.__html:void 0)&&Ne(e,d):"children"===o?"string"==typeof d?("textarea"!==a||""!==d)&&Fe(e,d):"number"==typeof d&&Fe(e,""+d):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(k.hasOwnProperty(o)?null!=d&&on(n,o):null!=d&&Z(e,o,d,l))}switch(a){case"input":_e(e),Te(e,s,!1);break;case"textarea":_e(e),Me(e);break;case"option":null!=s.value&&e.setAttribute("value",""+ve(s.value));break;case"select":e.multiple=!!s.multiple,null!=(n=s.value)?Pe(e,!!s.multiple,n,!1):null!=s.defaultValue&&Pe(e,!!s.multiple,s.defaultValue,!0);break;default:"function"==typeof c.onClick&&(e.onclick=ln)}yn(a,s)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Vr(0,t,e.memoizedProps,s);else{if("string"!=typeof s&&null===t.stateNode)throw Error(r(166));n=La(Oa.current),La(Pa.current),Dr(t)?(n=t.stateNode,s=t.memoizedProps,n[Tn]=t,n.nodeValue!==s&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(s))[Tn]=t,t.stateNode=n)}return null;case 13:return ui(Ra),s=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==s,s=!1,null===e?void 0!==t.memoizedProps.fallback&&Dr(t):(s=null!==(a=e.memoizedState),n||null===a||null!==(a=e.child.sibling)&&(null!==(o=t.firstEffect)?(t.firstEffect=a,a.nextEffect=o):(t.firstEffect=t.lastEffect=a,a.nextEffect=null),a.effectTag=8)),n&&!s&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ra.current)?Oo===ko&&(Oo=jo):(Oo!==ko&&Oo!==jo||(Oo=To),0!==Uo&&null!==Do&&(Rl(Do,Io),Nl(Do,Uo)))),(n||s)&&(t.effectTag|=4),null);case 4:return Aa(),null;case 10:return na(t),null;case 19:if(ui(Ra),null===(s=t.memoizedState))return null;if(a=0!=(64&t.effectTag),null===(o=s.rendering)){if(a)Xr(s,!1);else if(Oo!==ko||null!==e&&0!=(64&e.effectTag))for(o=t.child;null!==o;){if(null!==(e=Na(o))){for(t.effectTag|=64,Xr(s,!1),null!==(a=e.updateQueue)&&(t.updateQueue=a,t.effectTag|=4),null===s.lastEffect&&(t.firstEffect=null),t.lastEffect=s.lastEffect,s=t.child;null!==s;)o=n,(a=s).effectTag&=2,a.nextEffect=null,a.firstEffect=null,a.lastEffect=null,null===(e=a.alternate)?(a.childExpirationTime=0,a.expirationTime=o,a.child=null,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null):(a.childExpirationTime=e.childExpirationTime,a.expirationTime=e.expirationTime,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,o=e.dependencies,a.dependencies=null===o?null:{expirationTime:o.expirationTime,firstContext:o.firstContext,responders:o.responders}),s=s.sibling;return di(Ra,1&Ra.current|2),t.child}o=o.sibling}}else{if(!a)if(null!==(e=Na(o))){if(t.effectTag|=64,a=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Xr(s,!0),null===s.tail&&"hidden"===s.tailMode&&!o.alternate)return null!==(t=t.lastEffect=s.lastEffect)&&(t.nextEffect=null),null}else 2*Bi()-s.renderingStartTime>s.tailExpiration&&1<n&&(t.effectTag|=64,a=!0,Xr(s,!1),t.expirationTime=t.childExpirationTime=n-1);s.isBackwards?(o.sibling=t.child,t.child=o):(null!==(n=s.last)?n.sibling=o:t.child=o,s.last=o)}return null!==s.tail?(0===s.tailExpiration&&(s.tailExpiration=Bi()+500),n=s.tail,s.rendering=n,s.tail=n.sibling,s.lastEffect=t.lastEffect,s.renderingStartTime=Bi(),n.sibling=null,t=Ra.current,di(Ra,a?1&t|2:1&t),n):null}throw Error(r(156,t.tag))}function Jr(e){switch(e.tag){case 1:bi(e.type)&&vi();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Aa(),ui(mi),ui(hi),0!=(64&(t=e.effectTag)))throw Error(r(285));return e.effectTag=-4097&t|64,e;case 5:return Ua(e),null;case 13:return ui(Ra),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return ui(Ra),null;case 4:return Aa(),null;case 10:return na(e),null;default:return null}}function Qr(e,t){return{value:e,source:t,stack:be(t)}}Br=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Hr=function(e,t,n,s,a){var r=e.memoizedProps;if(r!==s){var o,l,c=t.stateNode;switch(La(Pa.current),e=null,n){case"input":r=Se(c,r),s=Se(c,s),e=[];break;case"option":r=De(c,r),s=De(c,s),e=[];break;case"select":r=i({},r,{value:void 0}),s=i({},s,{value:void 0}),e=[];break;case"textarea":r=Ie(c,r),s=Ie(c,s),e=[];break;default:"function"!=typeof r.onClick&&"function"==typeof s.onClick&&(c.onclick=ln)}for(o in sn(n,s),n=null,r)if(!s.hasOwnProperty(o)&&r.hasOwnProperty(o)&&null!=r[o])if("style"===o)for(l in c=r[o])c.hasOwnProperty(l)&&(n||(n={}),n[l]="");else"dangerouslySetInnerHTML"!==o&&"children"!==o&&"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(k.hasOwnProperty(o)?e||(e=[]):(e=e||[]).push(o,null));for(o in s){var u=s[o];if(c=null!=r?r[o]:void 0,s.hasOwnProperty(o)&&u!==c&&(null!=u||null!=c))if("style"===o)if(c){for(l in c)!c.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&c[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(e||(e=[]),e.push(o,n)),n=u;else"dangerouslySetInnerHTML"===o?(u=u?u.__html:void 0,c=c?c.__html:void 0,null!=u&&c!==u&&(e=e||[]).push(o,u)):"children"===o?c===u||"string"!=typeof u&&"number"!=typeof u||(e=e||[]).push(o,""+u):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&(k.hasOwnProperty(o)?(null!=u&&on(a,o),e||c===u||(e=[])):(e=e||[]).push(o,u))}n&&(e=e||[]).push("style",n),a=e,(t.updateQueue=a)&&(t.effectTag|=4)}},Vr=function(e,t,n,s){n!==s&&(t.effectTag|=4)};var eo="function"==typeof WeakSet?WeakSet:Set;function to(e,t){var n=t.source,s=t.stack;null===s&&null!==n&&(s=be(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(e){setTimeout((function(){throw e}))}}function no(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Sl(e,t)}else t.current=null}function so(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 3:case 5:case 6:case 4:case 17:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,s=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Xi(t.type,n),s),e.__reactInternalSnapshotBeforeUpdate=t}return}throw Error(r(163))}function io(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var s=n.destroy;n.destroy=void 0,void 0!==s&&s()}n=n.next}while(n!==t)}}function ao(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var s=n.create;n.destroy=s()}n=n.next}while(n!==t)}}function ro(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ao(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var s=n.elementType===n.type?t.memoizedProps:Xi(n.type,t.memoizedProps);e.componentDidUpdate(s,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&ha(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}ha(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&yn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Et(n)))))}throw Error(r(163))}function oo(e,t,n){switch("function"==typeof Tl&&Tl(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var s=e.next;$i(97<n?97:n,(function(){var e=s;do{var n=e.destroy;if(void 0!==n){var i=t;try{n()}catch(e){Sl(i,e)}}e=e.next}while(e!==s)}))}break;case 1:no(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(t){Sl(e,t)}}(t,n);break;case 5:no(t);break;case 4:mo(e,t,n)}}function lo(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&lo(t)}function co(e){return 5===e.tag||3===e.tag||4===e.tag}function uo(e){e:{for(var t=e.return;null!==t;){if(co(t)){var n=t;break e}t=t.return}throw Error(r(160))}switch(t=n.stateNode,n.tag){case 5:var s=!1;break;case 3:case 4:t=t.containerInfo,s=!0;break;default:throw Error(r(161))}16&n.effectTag&&(Fe(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||co(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}s?po(e,n,t):ho(e,n,t)}function po(e,t,n){var s=e.tag,i=5===s||6===s;if(i)e=i?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=ln));else if(4!==s&&null!==(e=e.child))for(po(e,t,n),e=e.sibling;null!==e;)po(e,t,n),e=e.sibling}function ho(e,t,n){var s=e.tag,i=5===s||6===s;if(i)e=i?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==s&&null!==(e=e.child))for(ho(e,t,n),e=e.sibling;null!==e;)ho(e,t,n),e=e.sibling}function mo(e,t,n){for(var s,i,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(r(160));switch(s=o.stateNode,o.tag){case 5:i=!1;break e;case 3:case 4:s=s.containerInfo,i=!0;break e}o=o.return}o=!0}if(5===a.tag||6===a.tag){e:for(var l=e,c=a,u=n,d=c;;)if(oo(l,d,u),null!==d.child&&4!==d.tag)d.child.return=d,d=d.child;else{if(d===c)break e;for(;null===d.sibling;){if(null===d.return||d.return===c)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}i?(l=s,c=a.stateNode,8===l.nodeType?l.parentNode.removeChild(c):l.removeChild(c)):s.removeChild(a.stateNode)}else if(4===a.tag){if(null!==a.child){s=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(oo(e,a,n),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function fo(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void io(3,t);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var s=t.memoizedProps,i=null!==e?e.memoizedProps:s;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Cn]=s,"input"===e&&"radio"===s.type&&null!=s.name&&ke(n,s),an(e,i),t=an(e,s),i=0;i<a.length;i+=2){var o=a[i],l=a[i+1];"style"===o?tn(n,l):"dangerouslySetInnerHTML"===o?Ne(n,l):"children"===o?Fe(n,l):Z(n,o,l,t)}switch(e){case"input":je(n,s);break;case"textarea":Le(n,s);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!s.multiple,null!=(e=s.value)?Pe(n,!!s.multiple,e,!1):t!==!!s.multiple&&(null!=s.defaultValue?Pe(n,!!s.multiple,s.defaultValue,!0):Pe(n,!!s.multiple,s.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(r(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Et(t.containerInfo)));case 13:if(n=t,null===t.memoizedState?s=!1:(s=!0,n=t.child,No=Bi()),null!==n)e:for(e=n;;){if(5===e.tag)a=e.stateNode,s?"function"==typeof(a=a.style).setProperty?a.setProperty("display","none","important"):a.display="none":(a=e.stateNode,i=null!=(i=e.memoizedProps.style)&&i.hasOwnProperty("display")?i.display:null,a.style.display=en("display",i));else if(6===e.tag)e.stateNode.nodeValue=s?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(a=e.child.sibling).return=e,e=a;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void go(t);case 19:return void go(t)}throw Error(r(163))}function go(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new eo),t.forEach((function(t){var s=kl.bind(null,e,t);n.has(t)||(n.add(t),t.then(s,s))}))}}var bo="function"==typeof WeakMap?WeakMap:Map;function vo(e,t,n){(n=ca(n,null)).tag=3,n.payload={element:null};var s=t.value;return n.callback=function(){Yo||(Yo=!0,Bo=s),to(e,t)},n}function yo(e,t,n){(n=ca(n,null)).tag=3;var s=e.type.getDerivedStateFromError;if("function"==typeof s){var i=t.value;n.payload=function(){return to(e,t),s(i)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){"function"!=typeof s&&(null===Ho?Ho=new Set([this]):Ho.add(this),to(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var _o,xo=Math.ceil,So=X.ReactCurrentDispatcher,wo=X.ReactCurrentOwner,ko=0,jo=3,To=4,Co=0,Do=null,Po=null,Io=0,Oo=ko,Lo=null,Mo=1073741823,Ao=1073741823,Eo=null,Uo=0,Ro=!1,No=0,Fo=null,Yo=!1,Bo=null,Ho=null,Vo=!1,$o=null,Wo=90,zo=null,qo=0,Go=null,Ko=0;function Xo(){return 0!=(48&Co)?1073741821-(Bi()/10|0):0!==Ko?Ko:Ko=1073741821-(Bi()/10|0)}function Zo(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var s=Hi();if(0==(4&t))return 99===s?1073741823:1073741822;if(0!=(16&Co))return Io;if(null!==n)e=Ki(e,0|n.timeoutMs||5e3,250);else switch(s){case 99:e=1073741823;break;case 98:e=Ki(e,150,100);break;case 97:case 96:e=Ki(e,5e3,250);break;case 95:e=2;break;default:throw Error(r(326))}return null!==Do&&e===Io&&--e,e}function Jo(e,t){if(50<qo)throw qo=0,Go=null,Error(r(185));if(null!==(e=Qo(e,t))){var n=Hi();1073741823===t?0!=(8&Co)&&0==(48&Co)?sl(e):(tl(e),0===Co&&qi()):tl(e),0==(4&Co)||98!==n&&99!==n||(null===zo?zo=new Map([[e,t]]):(void 0===(n=zo.get(e))||n>t)&&zo.set(e,t))}}function Qo(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var s=e.return,i=null;if(null===s&&3===e.tag)i=e.stateNode;else for(;null!==s;){if(n=s.alternate,s.childExpirationTime<t&&(s.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===s.return&&3===s.tag){i=s.stateNode;break}s=s.return}return null!==i&&(Do===i&&(ul(t),Oo===To&&Rl(i,Io)),Nl(i,t)),i}function el(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Ul(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function tl(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=zi(sl.bind(null,e));else{var t=el(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var s=Xo();if(s=1073741823===t?99:1===t||2===t?95:0>=(s=10*(1073741821-t)-10*(1073741821-s))?99:250>=s?98:5250>=s?97:95,null!==n){var i=e.callbackPriority;if(e.callbackExpirationTime===t&&i>=s)return;n!==Ai&&ji(n)}e.callbackExpirationTime=t,e.callbackPriority=s,t=1073741823===t?zi(sl.bind(null,e)):Wi(s,nl.bind(null,e),{timeout:10*(1073741821-t)-Bi()}),e.callbackNode=t}}}function nl(e,t){if(Ko=0,t)return Fl(e,t=Xo()),tl(e),null;var n=el(e);if(0!==n){if(t=e.callbackNode,0!=(48&Co))throw Error(r(327));if(yl(),e===Do&&n===Io||rl(e,n),null!==Po){var s=Co;Co|=16;for(var i=ll();;)try{pl();break}catch(t){ol(e,t)}if(ta(),Co=s,So.current=i,1===Oo)throw t=Lo,rl(e,n),Rl(e,n),tl(e),t;if(null===Po)switch(i=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,s=Oo,Do=null,s){case ko:case 1:throw Error(r(345));case 2:Fl(e,2<n?2:n);break;case jo:if(Rl(e,n),n===(s=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fl(i)),1073741823===Mo&&10<(i=No+500-Bi())){if(Ro){var a=e.lastPingedTime;if(0===a||a>=n){e.lastPingedTime=n,rl(e,n);break}}if(0!==(a=el(e))&&a!==n)break;if(0!==s&&s!==n){e.lastPingedTime=s;break}e.timeoutHandle=xn(gl.bind(null,e),i);break}gl(e);break;case To:if(Rl(e,n),n===(s=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fl(i)),Ro&&(0===(i=e.lastPingedTime)||i>=n)){e.lastPingedTime=n,rl(e,n);break}if(0!==(i=el(e))&&i!==n)break;if(0!==s&&s!==n){e.lastPingedTime=s;break}if(1073741823!==Ao?s=10*(1073741821-Ao)-Bi():1073741823===Mo?s=0:(s=10*(1073741821-Mo)-5e3,0>(s=(i=Bi())-s)&&(s=0),(n=10*(1073741821-n)-i)<(s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*xo(s/1960))-s)&&(s=n)),10<s){e.timeoutHandle=xn(gl.bind(null,e),s);break}gl(e);break;case 5:if(1073741823!==Mo&&null!==Eo){a=Mo;var o=Eo;if(0>=(s=0|o.busyMinDurationMs)?s=0:(i=0|o.busyDelayMs,s=(a=Bi()-(10*(1073741821-a)-(0|o.timeoutMs||5e3)))<=i?0:i+s-a),10<s){Rl(e,n),e.timeoutHandle=xn(gl.bind(null,e),s);break}}gl(e);break;default:throw Error(r(329))}if(tl(e),e.callbackNode===t)return nl.bind(null,e)}}return null}function sl(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&Co))throw Error(r(327));if(yl(),e===Do&&t===Io||rl(e,t),null!==Po){var n=Co;Co|=16;for(var s=ll();;)try{dl();break}catch(t){ol(e,t)}if(ta(),Co=n,So.current=s,1===Oo)throw n=Lo,rl(e,t),Rl(e,t),tl(e),n;if(null!==Po)throw Error(r(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Do=null,gl(e),tl(e)}return null}function il(e,t){var n=Co;Co|=1;try{return e(t)}finally{0===(Co=n)&&qi()}}function al(e,t){var n=Co;Co&=-2,Co|=8;try{return e(t)}finally{0===(Co=n)&&qi()}}function rl(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Sn(n)),null!==Po)for(n=Po.return;null!==n;){var s=n;switch(s.tag){case 1:null!=(s=s.type.childContextTypes)&&vi();break;case 3:Aa(),ui(mi),ui(hi);break;case 5:Ua(s);break;case 4:Aa();break;case 13:case 19:ui(Ra);break;case 10:na(s)}n=n.return}Do=e,Po=Il(e.current,null),Io=t,Oo=ko,Lo=null,Ao=Mo=1073741823,Eo=null,Uo=0,Ro=!1}function ol(e,t){for(;;){try{if(ta(),Ya.current=br,za)for(var n=Va.memoizedState;null!==n;){var s=n.queue;null!==s&&(s.pending=null),n=n.next}if(Ha=0,Wa=$a=Va=null,za=!1,null===Po||null===Po.return)return Oo=1,Lo=t,Po=null;e:{var i=e,a=Po.return,r=Po,o=t;if(t=Io,r.effectTag|=2048,r.firstEffect=r.lastEffect=null,null!==o&&"object"==typeof o&&"function"==typeof o.then){var l=o;if(0==(2&r.mode)){var c=r.alternate;c?(r.updateQueue=c.updateQueue,r.memoizedState=c.memoizedState,r.expirationTime=c.expirationTime):(r.updateQueue=null,r.memoizedState=null)}var u=0!=(1&Ra.current),d=a;do{var p;if(p=13===d.tag){var h=d.memoizedState;if(null!==h)p=null!==h.dehydrated;else{var m=d.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!u)}}if(p){var f=d.updateQueue;if(null===f){var g=new Set;g.add(l),d.updateQueue=g}else f.add(l);if(0==(2&d.mode)){if(d.effectTag|=64,r.effectTag&=-2981,1===r.tag)if(null===r.alternate)r.tag=17;else{var b=ca(1073741823,null);b.tag=2,ua(r,b)}r.expirationTime=1073741823;break e}o=void 0,r=t;var v=i.pingCache;if(null===v?(v=i.pingCache=new bo,o=new Set,v.set(l,o)):void 0===(o=v.get(l))&&(o=new Set,v.set(l,o)),!o.has(r)){o.add(r);var y=wl.bind(null,i,l,r);l.then(y,y)}d.effectTag|=4096,d.expirationTime=t;break e}d=d.return}while(null!==d);o=Error((ge(r.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+be(r))}5!==Oo&&(Oo=2),o=Qr(o,r),d=a;do{switch(d.tag){case 3:l=o,d.effectTag|=4096,d.expirationTime=t,da(d,vo(d,l,t));break e;case 1:l=o;var _=d.type,x=d.stateNode;if(0==(64&d.effectTag)&&("function"==typeof _.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===Ho||!Ho.has(x)))){d.effectTag|=4096,d.expirationTime=t,da(d,yo(d,l,t));break e}}d=d.return}while(null!==d)}Po=ml(Po)}catch(e){t=e;continue}break}}function ll(){var e=So.current;return So.current=br,null===e?br:e}function cl(e,t){e<Mo&&2<e&&(Mo=e),null!==t&&e<Ao&&2<e&&(Ao=e,Eo=t)}function ul(e){e>Uo&&(Uo=e)}function dl(){for(;null!==Po;)Po=hl(Po)}function pl(){for(;null!==Po&&!Ei();)Po=hl(Po)}function hl(e){var t=_o(e.alternate,e,Io);return e.memoizedProps=e.pendingProps,null===t&&(t=ml(e)),wo.current=null,t}function ml(e){Po=e;do{var t=Po.alternate;if(e=Po.return,0==(2048&Po.effectTag)){if(t=Zr(t,Po,Io),1===Io||1!==Po.childExpirationTime){for(var n=0,s=Po.child;null!==s;){var i=s.expirationTime,a=s.childExpirationTime;i>n&&(n=i),a>n&&(n=a),s=s.sibling}Po.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Po.firstEffect),null!==Po.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Po.firstEffect),e.lastEffect=Po.lastEffect),1<Po.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Po:e.firstEffect=Po,e.lastEffect=Po))}else{if(null!==(t=Jr(Po)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Po.sibling))return t;Po=e}while(null!==Po);return Oo===ko&&(Oo=5),null}function fl(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function gl(e){var t=Hi();return $i(99,bl.bind(null,e,t)),null}function bl(e,t){do{yl()}while(null!==$o);if(0!=(48&Co))throw Error(r(327));var n=e.finishedWork,s=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var i=fl(n);if(e.firstPendingTime=i,s<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:s<=e.firstSuspendedTime&&(e.firstSuspendedTime=s-1),s<=e.lastPingedTime&&(e.lastPingedTime=0),s<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Do&&(Po=Do=null,Io=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,i=n.firstEffect):i=n:i=n.firstEffect,null!==i){var a=Co;Co|=32,wo.current=null,bn=Wt;var o=hn();if(mn(o)){if("selectionStart"in o)var l={start:o.selectionStart,end:o.selectionEnd};else e:{var c=(l=(l=o.ownerDocument)&&l.defaultView||window).getSelection&&l.getSelection();if(c&&0!==c.rangeCount){l=c.anchorNode;var u=c.anchorOffset,d=c.focusNode;c=c.focusOffset;try{l.nodeType,d.nodeType}catch(e){l=null;break e}var p=0,h=-1,m=-1,f=0,g=0,b=o,v=null;t:for(;;){for(var y;b!==l||0!==u&&3!==b.nodeType||(h=p+u),b!==d||0!==c&&3!==b.nodeType||(m=p+c),3===b.nodeType&&(p+=b.nodeValue.length),null!==(y=b.firstChild);)v=b,b=y;for(;;){if(b===o)break t;if(v===l&&++f===u&&(h=p),v===d&&++g===c&&(m=p),null!==(y=b.nextSibling))break;v=(b=v).parentNode}b=y}l=-1===h||-1===m?null:{start:h,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;vn={activeElementDetached:null,focusedElem:o,selectionRange:l},Wt=!1,Fo=i;do{try{vl()}catch(e){if(null===Fo)throw Error(r(330));Sl(Fo,e),Fo=Fo.nextEffect}}while(null!==Fo);Fo=i;do{try{for(o=e,l=t;null!==Fo;){var _=Fo.effectTag;if(16&_&&Fe(Fo.stateNode,""),128&_){var x=Fo.alternate;if(null!==x){var S=x.ref;null!==S&&("function"==typeof S?S(null):S.current=null)}}switch(1038&_){case 2:uo(Fo),Fo.effectTag&=-3;break;case 6:uo(Fo),Fo.effectTag&=-3,fo(Fo.alternate,Fo);break;case 1024:Fo.effectTag&=-1025;break;case 1028:Fo.effectTag&=-1025,fo(Fo.alternate,Fo);break;case 4:fo(Fo.alternate,Fo);break;case 8:mo(o,u=Fo,l),lo(u)}Fo=Fo.nextEffect}}catch(e){if(null===Fo)throw Error(r(330));Sl(Fo,e),Fo=Fo.nextEffect}}while(null!==Fo);if(S=vn,x=hn(),_=S.focusedElem,l=S.selectionRange,x!==_&&_&&_.ownerDocument&&pn(_.ownerDocument.documentElement,_)){null!==l&&mn(_)&&(x=l.start,void 0===(S=l.end)&&(S=x),"selectionStart"in _?(_.selectionStart=x,_.selectionEnd=Math.min(S,_.value.length)):(S=(x=_.ownerDocument||document)&&x.defaultView||window).getSelection&&(S=S.getSelection(),u=_.textContent.length,o=Math.min(l.start,u),l=void 0===l.end?o:Math.min(l.end,u),!S.extend&&o>l&&(u=l,l=o,o=u),u=dn(_,o),d=dn(_,l),u&&d&&(1!==S.rangeCount||S.anchorNode!==u.node||S.anchorOffset!==u.offset||S.focusNode!==d.node||S.focusOffset!==d.offset)&&((x=x.createRange()).setStart(u.node,u.offset),S.removeAllRanges(),o>l?(S.addRange(x),S.extend(d.node,d.offset)):(x.setEnd(d.node,d.offset),S.addRange(x))))),x=[];for(S=_;S=S.parentNode;)1===S.nodeType&&x.push({element:S,left:S.scrollLeft,top:S.scrollTop});for("function"==typeof _.focus&&_.focus(),_=0;_<x.length;_++)(S=x[_]).element.scrollLeft=S.left,S.element.scrollTop=S.top}Wt=!!bn,vn=bn=null,e.current=n,Fo=i;do{try{for(_=e;null!==Fo;){var w=Fo.effectTag;if(36&w&&ro(_,Fo.alternate,Fo),128&w){x=void 0;var k=Fo.ref;if(null!==k){var j=Fo.stateNode;Fo.tag,x=j,"function"==typeof k?k(x):k.current=x}}Fo=Fo.nextEffect}}catch(e){if(null===Fo)throw Error(r(330));Sl(Fo,e),Fo=Fo.nextEffect}}while(null!==Fo);Fo=null,Ui(),Co=a}else e.current=n;if(Vo)Vo=!1,$o=e,Wo=t;else for(Fo=i;null!==Fo;)t=Fo.nextEffect,Fo.nextEffect=null,Fo=t;if(0===(t=e.firstPendingTime)&&(Ho=null),1073741823===t?e===Go?qo++:(qo=0,Go=e):qo=0,"function"==typeof jl&&jl(n.stateNode,s),tl(e),Yo)throw Yo=!1,e=Bo,Bo=null,e;return 0!=(8&Co)||qi(),null}function vl(){for(;null!==Fo;){var e=Fo.effectTag;0!=(256&e)&&so(Fo.alternate,Fo),0==(512&e)||Vo||(Vo=!0,Wi(97,(function(){return yl(),null}))),Fo=Fo.nextEffect}}function yl(){if(90!==Wo){var e=97<Wo?97:Wo;return Wo=90,$i(e,_l)}}function _l(){if(null===$o)return!1;var e=$o;if($o=null,0!=(48&Co))throw Error(r(331));var t=Co;for(Co|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:io(5,n),ao(5,n)}}catch(t){if(null===e)throw Error(r(330));Sl(e,t)}n=e.nextEffect,e.nextEffect=null,e=n}return Co=t,qi(),!0}function xl(e,t,n){ua(e,t=vo(e,t=Qr(n,t),1073741823)),null!==(e=Qo(e,1073741823))&&tl(e)}function Sl(e,t){if(3===e.tag)xl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){xl(n,e,t);break}if(1===n.tag){var s=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof s.componentDidCatch&&(null===Ho||!Ho.has(s))){ua(n,e=yo(n,e=Qr(t,e),1073741823)),null!==(n=Qo(n,1073741823))&&tl(n);break}}n=n.return}}function wl(e,t,n){var s=e.pingCache;null!==s&&s.delete(t),Do===e&&Io===n?Oo===To||Oo===jo&&1073741823===Mo&&Bi()-No<500?rl(e,Io):Ro=!0:Ul(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,tl(e)))}function kl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(t=Zo(t=Xo(),e,null)),null!==(e=Qo(e,t))&&tl(e)}_o=function(e,t,n){var s=t.expirationTime;if(null!==e){var i=t.pendingProps;if(e.memoizedProps!==i||mi.current)Or=!0;else{if(s<n){switch(Or=!1,t.tag){case 3:Yr(t),Pr();break;case 5:if(Ea(t),4&t.mode&&1!==n&&i.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:bi(t.type)&&xi(t);break;case 4:Ma(t,t.stateNode.containerInfo);break;case 10:s=t.memoizedProps.value,i=t.type._context,di(Zi,i._currentValue),i._currentValue=s;break;case 13:if(null!==t.memoizedState)return 0!==(s=t.child.childExpirationTime)&&s>=n?Wr(e,t,n):(di(Ra,1&Ra.current),null!==(t=Kr(e,t,n))?t.sibling:null);di(Ra,1&Ra.current);break;case 19:if(s=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(s)return Gr(e,t,n);t.effectTag|=64}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null),di(Ra,Ra.current),!s)return null}return Kr(e,t,n)}Or=!1}}else Or=!1;switch(t.expirationTime=0,t.tag){case 2:if(s=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,i=gi(t,hi.current),ia(t,n),i=Ka(null,t,s,e,i,n),t.effectTag|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,bi(s)){var a=!0;xi(t)}else a=!1;t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,oa(t);var o=s.getDerivedStateFromProps;"function"==typeof o&&ga(t,s,o,e),i.updater=ba,t.stateNode=i,i._reactInternalFiber=t,xa(t,s,e,n),t=Fr(null,t,s,!0,a,n)}else t.tag=0,Lr(null,t,i,n),t=t.child;return t;case 16:e:{if(i=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(i),1!==i._status)throw i._result;switch(i=i._result,t.type=i,a=t.tag=function(e){if("function"==typeof e)return Pl(e)?1:0;if(null!=e){if((e=e.$$typeof)===le)return 11;if(e===de)return 14}return 2}(i),e=Xi(i,e),a){case 0:t=Rr(null,t,i,e,n);break e;case 1:t=Nr(null,t,i,e,n);break e;case 11:t=Mr(null,t,i,e,n);break e;case 14:t=Ar(null,t,i,Xi(i.type,e),s,n);break e}throw Error(r(306,i,""))}return t;case 0:return s=t.type,i=t.pendingProps,Rr(e,t,s,i=t.elementType===s?i:Xi(s,i),n);case 1:return s=t.type,i=t.pendingProps,Nr(e,t,s,i=t.elementType===s?i:Xi(s,i),n);case 3:if(Yr(t),s=t.updateQueue,null===e||null===s)throw Error(r(282));if(s=t.pendingProps,i=null!==(i=t.memoizedState)?i.element:null,la(e,t),pa(t,s,null,n),(s=t.memoizedState.element)===i)Pr(),t=Kr(e,t,n);else{if((i=t.stateNode.hydrate)&&(Sr=wn(t.stateNode.containerInfo.firstChild),xr=t,i=wr=!0),i)for(n=Ca(t,null,s,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Lr(e,t,s,n),Pr();t=t.child}return t;case 5:return Ea(t),null===e&&Tr(t),s=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,_n(s,i)?o=null:null!==a&&_n(s,a)&&(t.effectTag|=16),Ur(e,t),4&t.mode&&1!==n&&i.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Lr(e,t,o,n),t=t.child),t;case 6:return null===e&&Tr(t),null;case 13:return Wr(e,t,n);case 4:return Ma(t,t.stateNode.containerInfo),s=t.pendingProps,null===e?t.child=Ta(t,null,s,n):Lr(e,t,s,n),t.child;case 11:return s=t.type,i=t.pendingProps,Mr(e,t,s,i=t.elementType===s?i:Xi(s,i),n);case 7:return Lr(e,t,t.pendingProps,n),t.child;case 8:case 12:return Lr(e,t,t.pendingProps.children,n),t.child;case 10:e:{s=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value;var l=t.type._context;if(di(Zi,l._currentValue),l._currentValue=a,null!==o)if(l=o.value,0==(a=Fs(l,a)?0:0|("function"==typeof s._calculateChangedBits?s._calculateChangedBits(l,a):1073741823))){if(o.children===i.children&&!mi.current){t=Kr(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var c=l.dependencies;if(null!==c){o=l.child;for(var u=c.firstContext;null!==u;){if(u.context===s&&0!=(u.observedBits&a)){1===l.tag&&((u=ca(n,null)).tag=2,ua(l,u)),l.expirationTime<n&&(l.expirationTime=n),null!==(u=l.alternate)&&u.expirationTime<n&&(u.expirationTime=n),sa(l.return,n),c.expirationTime<n&&(c.expirationTime=n);break}u=u.next}}else o=10===l.tag&&l.type===t.type?null:l.child;if(null!==o)o.return=l;else for(o=l;null!==o;){if(o===t){o=null;break}if(null!==(l=o.sibling)){l.return=o.return,o=l;break}o=o.return}l=o}Lr(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,s=(a=t.pendingProps).children,ia(t,n),s=s(i=aa(i,a.unstable_observedBits)),t.effectTag|=1,Lr(e,t,s,n),t.child;case 14:return a=Xi(i=t.type,t.pendingProps),Ar(e,t,i,a=Xi(i.type,a),s,n);case 15:return Er(e,t,t.type,t.pendingProps,s,n);case 17:return s=t.type,i=t.pendingProps,i=t.elementType===s?i:Xi(s,i),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,bi(s)?(e=!0,xi(t)):e=!1,ia(t,n),ya(t,s,i),xa(t,s,i,n),Fr(null,t,s,!0,e,n);case 19:return Gr(e,t,n)}throw Error(r(156,t.tag))};var jl=null,Tl=null;function Cl(e,t,n,s){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Dl(e,t,n,s){return new Cl(e,t,n,s)}function Pl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Il(e,t){var n=e.alternate;return null===n?((n=Dl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ol(e,t,n,s,i,a){var o=2;if(s=e,"function"==typeof e)Pl(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case ne:return Ll(n.children,i,a,t);case oe:o=8,i|=7;break;case se:o=8,i|=1;break;case ie:return(e=Dl(12,n,t,8|i)).elementType=ie,e.type=ie,e.expirationTime=a,e;case ce:return(e=Dl(13,n,t,i)).type=ce,e.elementType=ce,e.expirationTime=a,e;case ue:return(e=Dl(19,n,t,i)).elementType=ue,e.expirationTime=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ae:o=10;break e;case re:o=9;break e;case le:o=11;break e;case de:o=14;break e;case pe:o=16,s=null;break e;case he:o=22;break e}throw Error(r(130,null==e?e:typeof e,""))}return(t=Dl(o,n,t,i)).elementType=e,t.type=s,t.expirationTime=a,t}function Ll(e,t,n,s){return(e=Dl(7,e,s,t)).expirationTime=n,e}function Ml(e,t,n){return(e=Dl(6,e,null,t)).expirationTime=n,e}function Al(e,t,n){return(t=Dl(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function El(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Ul(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Rl(e,t){var n=e.firstSuspendedTime,s=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(s>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Nl(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function Fl(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Yl(e,t,n,s){var i=t.current,a=Xo(),o=ma.suspense;a=Zo(a,i,o);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(r(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(bi(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(r(171))}if(1===n.tag){var c=n.type;if(bi(c)){n=_i(n,c,l);break e}}n=l}else n=pi;return null===t.context?t.context=n:t.pendingContext=n,(t=ca(a,o)).payload={element:e},null!==(s=void 0===s?null:s)&&(t.callback=s),ua(i,t),Jo(i,a),a}function Bl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Hl(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function Vl(e,t){Hl(e,t),(e=e.alternate)&&Hl(e,t)}function $l(e,t,n){var s=new El(e,t,n=null!=n&&!0===n.hydrate),i=Dl(3,null,null,2===t?7:1===t?3:0);s.current=i,i.stateNode=s,oa(i),e[Dn]=s.current,n&&0!==t&&function(e,t){var n=Ze(t);jt.forEach((function(e){ht(e,t,n)})),Tt.forEach((function(e){ht(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=s}function Wl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function zl(e,t,n,s,i){var a=n._reactRootContainer;if(a){var r=a._internalRoot;if("function"==typeof i){var o=i;i=function(){var e=Bl(r);o.call(e)}}Yl(t,r,e,i)}else{if(a=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new $l(e,0,t?{hydrate:!0}:void 0)}(n,s),r=a._internalRoot,"function"==typeof i){var l=i;i=function(){var e=Bl(r);l.call(e)}}al((function(){Yl(t,r,e,i)}))}return Bl(r)}function ql(e,t,n){var s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==s?null:""+s,children:e,containerInfo:t,implementation:n}}function Gl(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Wl(t))throw Error(r(200));return ql(e,t,null,n)}$l.prototype.render=function(e){Yl(e,this._internalRoot,null,null)},$l.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Yl(null,e,null,(function(){t[Dn]=null}))},mt=function(e){if(13===e.tag){var t=Ki(Xo(),150,100);Jo(e,t),Vl(e,t)}},ft=function(e){13===e.tag&&(Jo(e,3),Vl(e,3))},gt=function(e){if(13===e.tag){var t=Xo();Jo(e,t=Zo(t,e,null)),Vl(e,t)}},D=function(e,t,n){switch(t){case"input":if(je(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var i=Ln(s);if(!i)throw Error(r(90));xe(s),je(s,i)}}}break;case"textarea":Le(e,n);break;case"select":null!=(t=n.value)&&Pe(e,!!n.multiple,t,!1)}},A=il,E=function(e,t,n,s,i){var a=Co;Co|=4;try{return $i(98,e.bind(null,t,n,s,i))}finally{0===(Co=a)&&qi()}},U=function(){0==(49&Co)&&(function(){if(null!==zo){var e=zo;zo=null,e.forEach((function(e,t){Fl(t,e),tl(t)})),qi()}}(),yl())},R=function(e,t){var n=Co;Co|=2;try{return e(t)}finally{0===(Co=n)&&qi()}};var Kl={Events:[In,On,Ln,T,w,Fn,function(e){st(e,Nn)},L,M,Xt,rt,yl,{current:!1}]};!function(e){var t=e.findFiberByHostInstance;!function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);jl=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(e){}},Tl=function(e){try{t.onCommitFiberUnmount(n,e)}catch(e){}}}catch(e){}}(i({},e,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=tt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return t?t(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))}({findFiberByHostInstance:Pn,bundleType:0,version:"16.14.0",rendererPackageName:"react-dom"}),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Kl,t.createPortal=Gl,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(r(188));throw Error(r(268,Object.keys(e)))}return null===(e=tt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&Co))throw Error(r(187));var n=Co;Co|=1;try{return $i(99,e.bind(null,t))}finally{Co=n,qi()}},t.hydrate=function(e,t,n){if(!Wl(t))throw Error(r(200));return zl(null,e,t,!0,n)},t.render=function(e,t,n){if(!Wl(t))throw Error(r(200));return zl(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Wl(e))throw Error(r(40));return!!e._reactRootContainer&&(al((function(){zl(null,null,e,!1,(function(){e._reactRootContainer=null,e[Dn]=null}))})),!0)},t.unstable_batchedUpdates=il,t.unstable_createPortal=function(e,t){return Gl(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,s){if(!Wl(n))throw Error(r(200));if(null==e||void 0===e._reactInternalFiber)throw Error(r(38));return zl(e,t,n,!1,s)},t.version="16.14.0"},73935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(64448)},35639:(e,t,n)=>{"use strict";var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}(),a=n(67294),r=l(a),o=l(n(45697));function l(e){return e&&e.__esModule?e:{default:e}}var c={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},u=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],d=function(e,t){t.style.fontSize=e.fontSize,t.style.fontFamily=e.fontFamily,t.style.fontWeight=e.fontWeight,t.style.fontStyle=e.fontStyle,t.style.letterSpacing=e.letterSpacing,t.style.textTransform=e.textTransform},p=!("undefined"==typeof window||!window.navigator)&&/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent),h=function(){return p?"_"+Math.random().toString(36).substr(2,12):void 0},m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.inputRef=function(e){n.input=e,"function"==typeof n.props.inputRef&&n.props.inputRef(e)},n.placeHolderSizerRef=function(e){n.placeHolderSizer=e},n.sizerRef=function(e){n.sizer=e},n.state={inputWidth:e.minWidth,inputId:e.id||h()},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=e.id;t!==this.props.id&&this.setState({inputId:t||h()})}},{key:"componentDidUpdate",value:function(e,t){t.inputWidth!==this.state.inputWidth&&"function"==typeof this.props.onAutosize&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(this.mounted&&window.getComputedStyle){var e=this.input&&window.getComputedStyle(this.input);e&&(d(e,this.sizer),this.placeHolderSizer&&d(e,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(this.mounted&&this.sizer&&void 0!==this.sizer.scrollWidth){var e=void 0;e=this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:this.sizer.scrollWidth+2,(e+="number"===this.props.type&&void 0===this.props.extraWidth?16:parseInt(this.props.extraWidth)||0)<this.props.minWidth&&(e=this.props.minWidth),e!==this.state.inputWidth&&this.setState({inputWidth:e})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var e=this.props.injectStyles;return p&&e?r.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var e=[this.props.defaultValue,this.props.value,""].reduce((function(e,t){return null!=e?e:t})),t=s({},this.props.style);t.display||(t.display="inline-block");var n=s({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),i=function(e,t){var n={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}(this.props,[]);return function(e){u.forEach((function(t){return delete e[t]}))}(i),i.className=this.props.inputClassName,i.id=this.state.inputId,i.style=n,r.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),r.default.createElement("input",s({},i,{ref:this.inputRef})),r.default.createElement("div",{ref:this.sizerRef,style:c},e),this.props.placeholder?r.default.createElement("div",{ref:this.placeHolderSizerRef,style:c},this.props.placeholder):null)}}]),t}(a.Component);m.propTypes={className:o.default.string,defaultValue:o.default.any,extraWidth:o.default.oneOfType([o.default.number,o.default.string]),id:o.default.string,injectStyles:o.default.bool,inputClassName:o.default.string,inputRef:o.default.func,inputStyle:o.default.object,minWidth:o.default.oneOfType([o.default.number,o.default.string]),onAutosize:o.default.func,onChange:o.default.func,placeholder:o.default.string,placeholderIsMinWidth:o.default.bool,style:o.default.object,value:o.default.any},m.defaultProps={minWidth:1,injectStyles:!0},t.Z=m},69921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,s=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,r=n?Symbol.for("react.strict_mode"):60108,o=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,p=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,y=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case s:switch(e=e.type){case u:case d:case a:case o:case r:case h:return e;default:switch(e=e&&e.$$typeof){case c:case p:case g:case f:case l:return e;default:return t}}case i:return t}}}function S(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=s,t.ForwardRef=p,t.Fragment=a,t.Lazy=g,t.Memo=f,t.Portal=i,t.Profiler=o,t.StrictMode=r,t.Suspense=h,t.isAsyncMode=function(e){return S(e)||x(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===s},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===f},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===o},t.isStrictMode=function(e){return x(e)===r},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===o||e===r||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===c||e.$$typeof===p||e.$$typeof===v||e.$$typeof===y||e.$$typeof===_||e.$$typeof===b)},t.typeOf=x},59864:(e,t,n)=>{"use strict";e.exports=n(69921)},46871:(e,t,n)=>{"use strict";function s(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function a(e,t){try{var n=this.props,s=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,s)}finally{this.props=n,this.state=s}}function r(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,r=null,o=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?r="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(r="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?o="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(o="UNSAFE_componentWillUpdate"),null!==n||null!==r||null!==o){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==r?"\n "+r:"")+(null!==o?"\n "+o:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=s,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=a;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var s=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,s)}}return e}n.r(t),n.d(t,{polyfill:()=>r}),s.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,a.__suppressDeprecationWarning=!0},58949:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,IGNORE_CLASS_NAME:()=>m});var s=n(67294),i=n(73935);function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return e===t||(e.correspondingElement?e.correspondingElement.classList.contains(n):e.classList.contains(n))}var l,c,u=(void 0===l&&(l=0),function(){return++l}),d={},p={},h=["touchstart","touchmove"],m="ignore-react-onclickoutside";function f(e,t){var n=null;return-1!==h.indexOf(t)&&c&&(n={passive:!e.props.preventDefault}),n}const g=function(e,t){var n,l,h=e.displayName||e.name||"Component";return l=n=function(n){var l,m;function g(e){var s;return(s=n.call(this,e)||this).__outsideClickHandler=function(e){if("function"!=typeof s.__clickOutsideHandlerProp){var t=s.getInstance();if("function"!=typeof t.props.handleClickOutside){if("function"!=typeof t.handleClickOutside)throw new Error("WrappedComponent: "+h+" lacks a handleClickOutside(event) function for processing outside click events.");t.handleClickOutside(e)}else t.props.handleClickOutside(e)}else s.__clickOutsideHandlerProp(e)},s.__getComponentNode=function(){var e=s.getInstance();return t&&"function"==typeof t.setClickOutsideRef?t.setClickOutsideRef()(e):"function"==typeof e.setClickOutsideRef?e.setClickOutsideRef():(0,i.findDOMNode)(e)},s.enableOnClickOutside=function(){if("undefined"!=typeof document&&!p[s._uid]){void 0===c&&(c=function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t),e}}()),p[s._uid]=!0;var e=s.props.eventTypes;e.forEach||(e=[e]),d[s._uid]=function(e){var t;null!==s.componentNode&&(s.props.preventDefault&&e.preventDefault(),s.props.stopPropagation&&e.stopPropagation(),s.props.excludeScrollbar&&(t=e,document.documentElement.clientWidth<=t.clientX||document.documentElement.clientHeight<=t.clientY)||function(e,t,n){if(e===t)return!0;for(;e.parentNode;){if(o(e,t,n))return!0;e=e.parentNode}return e}(e.target,s.componentNode,s.props.outsideClickIgnoreClass)===document&&s.__outsideClickHandler(e))},e.forEach((function(e){document.addEventListener(e,d[s._uid],f(r(s),e))}))}},s.disableOnClickOutside=function(){delete p[s._uid];var e=d[s._uid];if(e&&"undefined"!=typeof document){var t=s.props.eventTypes;t.forEach||(t=[t]),t.forEach((function(t){return document.removeEventListener(t,e,f(r(s),t))})),delete d[s._uid]}},s.getRef=function(e){return s.instanceRef=e},s._uid=u(),s}m=n,(l=g).prototype=Object.create(m.prototype),l.prototype.constructor=l,a(l,m);var b=g.prototype;return b.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var t=this.instanceRef;return t.getInstance?t.getInstance():t},b.componentDidMount=function(){if("undefined"!=typeof document&&document.createElement){var e=this.getInstance();if(t&&"function"==typeof t.handleClickOutside&&(this.__clickOutsideHandlerProp=t.handleClickOutside(e),"function"!=typeof this.__clickOutsideHandlerProp))throw new Error("WrappedComponent: "+h+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),this.props.disableOnClickOutside||this.enableOnClickOutside()}},b.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},b.componentWillUnmount=function(){this.disableOnClickOutside()},b.render=function(){var t=this.props;t.excludeScrollbar;var n=function(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?n.ref=this.getRef:n.wrappedRef=this.getRef,n.disableOnClickOutside=this.disableOnClickOutside,n.enableOnClickOutside=this.enableOnClickOutside,(0,s.createElement)(e,n)},g}(s.Component),n.displayName="OnClickOutside("+h+")",n.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:m,preventDefault:!1,stopPropagation:!1},n.getClass=function(){return e.getClass?e.getClass():e},l}},19504:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Manager:()=>g,Popper:()=>k,Reference:()=>D,placements:()=>w});var s=n(63366),i=n(87462),a=n(51721);function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var o=n(4942),l=n(10251),c=n.n(l),u=n(67294),d=n(28981),p=n(88740),h=n.n(p),m=h()(),f=h()(),g=function(e){function t(){for(var t,n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return t=e.call.apply(e,[this].concat(s))||this,(0,o.Z)(r(r(t)),"referenceNode",void 0),(0,o.Z)(r(r(t)),"setReferenceNode",(function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())})),t}(0,a.Z)(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.referenceNode=null},n.render=function(){return u.createElement(m.Provider,{value:this.referenceNode},u.createElement(f.Provider,{value:this.setReferenceNode},this.props.children))},t}(u.Component),b=function(e){return Array.isArray(e)?e[0]:e},v=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];return e.apply(void 0,n)}},y=function(e,t){if("function"==typeof e)return v(e,t);null!=e&&(e.current=t)},_={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},x={},S=function(e){function t(){for(var t,n=arguments.length,s=new Array(n),a=0;a<n;a++)s[a]=arguments[a];return t=e.call.apply(e,[this].concat(s))||this,(0,o.Z)(r(r(t)),"state",{data:void 0,placement:void 0}),(0,o.Z)(r(r(t)),"popperInstance",void 0),(0,o.Z)(r(r(t)),"popperNode",null),(0,o.Z)(r(r(t)),"arrowNode",null),(0,o.Z)(r(r(t)),"setPopperNode",(function(e){e&&t.popperNode!==e&&(y(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),(0,o.Z)(r(r(t)),"setArrowNode",(function(e){t.arrowNode=e})),(0,o.Z)(r(r(t)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),(0,o.Z)(r(r(t)),"getOptions",(function(){return{placement:t.props.placement,eventsEnabled:t.props.eventsEnabled,positionFixed:t.props.positionFixed,modifiers:(0,i.Z)({},t.props.modifiers,{arrow:(0,i.Z)({},t.props.modifiers&&t.props.modifiers.arrow,{enabled:!!t.arrowNode,element:t.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:t.updateStateModifier})}})),(0,o.Z)(r(r(t)),"getPopperStyle",(function(){return t.popperNode&&t.state.data?(0,i.Z)({position:t.state.data.offsets.popper.position},t.state.data.styles):_})),(0,o.Z)(r(r(t)),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),(0,o.Z)(r(r(t)),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:x})),(0,o.Z)(r(r(t)),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),(0,o.Z)(r(r(t)),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),(0,o.Z)(r(r(t)),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=r(r(t)).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new d.Z(n,e,t.getOptions()))})),(0,o.Z)(r(r(t)),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}(0,a.Z)(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&c()(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},n.componentWillUnmount=function(){y(this.props.innerRef,null),this.destroyPopperInstance()},n.render=function(){return b(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},t}(u.Component);(0,o.Z)(S,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});var w=d.Z.placements;function k(e){var t=e.referenceElement,n=(0,s.Z)(e,["referenceElement"]);return u.createElement(m.Consumer,null,(function(e){return u.createElement(S,(0,i.Z)({referenceElement:void 0!==t?t:e},n))}))}var j=n(42473),T=n.n(j),C=function(e){function t(){for(var t,n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return t=e.call.apply(e,[this].concat(s))||this,(0,o.Z)(r(r(t)),"refHandler",(function(e){y(t.props.innerRef,e),v(t.props.setReferenceNode,e)})),t}(0,a.Z)(t,e);var n=t.prototype;return n.componentWillUnmount=function(){y(this.props.innerRef,null)},n.render=function(){return T()(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),b(this.props.children)({ref:this.refHandler})},t}(u.Component);function D(e){return u.createElement(f.Consumer,null,(function(t){return u.createElement(C,(0,i.Z)({setReferenceNode:t},e))}))}},14494:(e,t,n)=>{"use strict";n.d(t,{zt:()=>u,ET:()=>i,$j:()=>F});var s=n(67294),i=(n(45697),s.createContext(null)),a=function(e){e()},r=function(){return a},o={notify:function(){}},l=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=o,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=r(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var s=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){s&&null!==t&&(s=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=o)},e}(),c="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?s.useLayoutEffect:s.useEffect;const u=function(e){var t=e.store,n=e.context,a=e.children,r=(0,s.useMemo)((function(){var e=new l(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),o=(0,s.useMemo)((function(){return t.getState()}),[t]);c((function(){var e=r.subscription;return e.trySubscribe(),o!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[r,o]);var u=n||i;return s.createElement(u.Provider,{value:r},a)};var d=n(87462),p=n(63366),h=n(8679),m=n.n(h),f=n(59864),g=[],b=[null,null];function v(e,t){var n=e[1];return[t.payload,n+1]}function y(e,t,n){c((function(){return e.apply(void 0,t)}),n)}function _(e,t,n,s,i,a,r){e.current=s,t.current=i,n.current=!1,a.current&&(a.current=null,r())}function x(e,t,n,s,i,a,r,o,l,c){if(e){var u=!1,d=null,p=function(){if(!u){var e,n,p=t.getState();try{e=s(p,i.current)}catch(e){n=e,d=e}n||(d=null),e===a.current?r.current||l():(a.current=e,o.current=e,r.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=p,n.trySubscribe(),p(),function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var S=function(){return[null,0]};function w(e,t){void 0===t&&(t={});var n=t,a=n.getDisplayName,r=void 0===a?function(e){return"ConnectAdvanced("+e+")"}:a,o=n.methodName,c=void 0===o?"connectAdvanced":o,u=n.renderCountProp,h=void 0===u?void 0:u,w=n.shouldHandleStateChanges,k=void 0===w||w,j=n.storeKey,T=void 0===j?"store":j,C=(n.withRef,n.forwardRef),D=void 0!==C&&C,P=n.context,I=void 0===P?i:P,O=(0,p.Z)(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),L=I;return function(t){var n=t.displayName||t.name||"Component",i=r(n),a=(0,d.Z)({},O,{getDisplayName:r,methodName:c,renderCountProp:h,shouldHandleStateChanges:k,storeKey:T,displayName:i,wrappedComponentName:n,WrappedComponent:t}),o=O.pure,u=o?s.useMemo:function(e){return e()};function w(n){var i=(0,s.useMemo)((function(){var e=n.reactReduxForwardedRef,t=(0,p.Z)(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),r=i[0],o=i[1],c=i[2],h=(0,s.useMemo)((function(){return r&&r.Consumer&&(0,f.isContextConsumer)(s.createElement(r.Consumer,null))?r:L}),[r,L]),m=(0,s.useContext)(h),w=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(m)&&Boolean(m.store);var j=w?n.store:m.store,T=(0,s.useMemo)((function(){return function(t){return e(t.dispatch,a)}(j)}),[j]),C=(0,s.useMemo)((function(){if(!k)return b;var e=new l(j,w?null:m.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[j,w,m]),D=C[0],P=C[1],I=(0,s.useMemo)((function(){return w?m:(0,d.Z)({},m,{subscription:D})}),[w,m,D]),O=(0,s.useReducer)(v,g,S),M=O[0][0],A=O[1];if(M&&M.error)throw M.error;var E=(0,s.useRef)(),U=(0,s.useRef)(c),R=(0,s.useRef)(),N=(0,s.useRef)(!1),F=u((function(){return R.current&&c===U.current?R.current:T(j.getState(),c)}),[j,M,c]);y(_,[U,E,N,c,F,R,P]),y(x,[k,j,D,T,U,E,N,R,P,A],[j,D,T]);var Y=(0,s.useMemo)((function(){return s.createElement(t,(0,d.Z)({},F,{ref:o}))}),[o,t,F]);return(0,s.useMemo)((function(){return k?s.createElement(h.Provider,{value:I},Y):Y}),[h,Y,I])}var j=o?s.memo(w):w;if(j.WrappedComponent=t,j.displayName=w.displayName=i,D){var C=s.forwardRef((function(e,t){return s.createElement(j,(0,d.Z)({},e,{reactReduxForwardedRef:t}))}));return C.displayName=i,C.WrappedComponent=t,m()(C,t)}return m()(j,t)}}function k(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function j(e,t){if(k(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!k(e[n[i]],t[n[i]]))return!1;return!0}function T(e){return function(t,n){var s=e(t,n);function i(){return s}return i.dependsOnOwnProps=!1,i}}function C(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function D(e,t){return function(t,n){n.displayName;var s=function(e,t){return s.dependsOnOwnProps?s.mapToProps(e,t):s.mapToProps(e)};return s.dependsOnOwnProps=!0,s.mapToProps=function(t,n){s.mapToProps=e,s.dependsOnOwnProps=C(e);var i=s(t,n);return"function"==typeof i&&(s.mapToProps=i,s.dependsOnOwnProps=C(i),i=s(t,n)),i},s}}const P=[function(e){return"function"==typeof e?D(e):void 0},function(e){return e?void 0:T((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?T((function(t){return function(e,t){var n={},s=function(s){var i=e[s];"function"==typeof i&&(n[s]=function(){return t(i.apply(void 0,arguments))})};for(var i in e)s(i);return n}(e,t)})):void 0}],I=[function(e){return"function"==typeof e?D(e):void 0},function(e){return e?void 0:T((function(){return{}}))}];function O(e,t,n){return(0,d.Z)({},n,e,t)}const L=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var s,i=n.pure,a=n.areMergedPropsEqual,r=!1;return function(t,n,o){var l=e(t,n,o);return r?i&&a(l,s)||(s=l):(r=!0,s=l),s}}}(e):void 0},function(e){return e?void 0:function(){return O}}];function M(e,t,n,s){return function(i,a){return n(e(i,a),t(s,a),a)}}function A(e,t,n,s,i){var a,r,o,l,c,u=i.areStatesEqual,d=i.areOwnPropsEqual,p=i.areStatePropsEqual,h=!1;return function(i,m){return h?function(i,h){var m,f,g=!d(h,r),b=!u(i,a);return a=i,r=h,g&&b?(o=e(a,r),t.dependsOnOwnProps&&(l=t(s,r)),c=n(o,l,r)):g?(e.dependsOnOwnProps&&(o=e(a,r)),t.dependsOnOwnProps&&(l=t(s,r)),c=n(o,l,r)):b?(m=e(a,r),f=!p(m,o),o=m,f&&(c=n(o,l,r)),c):c}(i,m):(o=e(a=i,r=m),l=t(s,r),c=n(o,l,r),h=!0,c)}}function E(e,t){var n=t.initMapStateToProps,s=t.initMapDispatchToProps,i=t.initMergeProps,a=(0,p.Z)(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),r=n(e,a),o=s(e,a),l=i(e,a);return(a.pure?A:M)(r,o,l,e,a)}function U(e,t,n){for(var s=t.length-1;s>=0;s--){var i=t[s](e);if(i)return i}return function(t,s){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+s.wrappedComponentName+".")}}function R(e,t){return e===t}function N(e){var t=void 0===e?{}:e,n=t.connectHOC,s=void 0===n?w:n,i=t.mapStateToPropsFactories,a=void 0===i?I:i,r=t.mapDispatchToPropsFactories,o=void 0===r?P:r,l=t.mergePropsFactories,c=void 0===l?L:l,u=t.selectorFactory,h=void 0===u?E:u;return function(e,t,n,i){void 0===i&&(i={});var r=i,l=r.pure,u=void 0===l||l,m=r.areStatesEqual,f=void 0===m?R:m,g=r.areOwnPropsEqual,b=void 0===g?j:g,v=r.areStatePropsEqual,y=void 0===v?j:v,_=r.areMergedPropsEqual,x=void 0===_?j:_,S=(0,p.Z)(r,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),w=U(e,a,"mapStateToProps"),k=U(t,o,"mapDispatchToProps"),T=U(n,c,"mergeProps");return s(h,(0,d.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:w,initMapDispatchToProps:k,initMergeProps:T,pure:u,areStatesEqual:f,areOwnPropsEqual:b,areStatePropsEqual:y,areMergedPropsEqual:x},S))}}const F=N();var Y;Y=n(73935).unstable_batchedUpdates,a=Y},76585:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},39658:(e,t,n)=>{var s=n(76585);e.exports=function e(t,n,i){return s(n)||(i=n||i,n=[]),i=i||{},t instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var s=0;s<n.length;s++)t.push({name:s,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return u(e,t)}(t,n):s(t)?function(t,n,s){for(var i=[],a=0;a<t.length;a++)i.push(e(t[a],n,s).source);return u(new RegExp("(?:"+i.join("|")+")",d(s)),n)}(t,n,i):function(e,t,n){return p(a(e,n),t,n)}(t,n,i)},e.exports.parse=a,e.exports.compile=function(e,t){return o(a(e,t),t)},e.exports.tokensToFunction=o,e.exports.tokensToRegExp=p;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,s=[],a=0,r=0,o="",u=t&&t.delimiter||"/";null!=(n=i.exec(e));){var d=n[0],p=n[1],h=n.index;if(o+=e.slice(r,h),r=h+d.length,p)o+=p[1];else{var m=e[r],f=n[2],g=n[3],b=n[4],v=n[5],y=n[6],_=n[7];o&&(s.push(o),o="");var x=null!=f&&null!=m&&m!==f,S="+"===y||"*"===y,w="?"===y||"*"===y,k=n[2]||u,j=b||v;s.push({name:g||a++,prefix:f||"",delimiter:k,optional:w,repeat:S,partial:x,asterisk:!!_,pattern:j?c(j):_?".*":"[^"+l(k)+"]+?"})}}return r<e.length&&(o+=e.substr(r)),o&&s.push(o),s}function r(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function o(e,t){for(var n=new Array(e.length),i=0;i<e.length;i++)"object"==typeof e[i]&&(n[i]=new RegExp("^(?:"+e[i].pattern+")$",d(t)));return function(t,i){for(var a="",o=t||{},l=(i||{}).pretty?r:encodeURIComponent,c=0;c<e.length;c++){var u=e[c];if("string"!=typeof u){var d,p=o[u.name];if(null==p){if(u.optional){u.partial&&(a+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(s(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var h=0;h<p.length;h++){if(d=l(p[h]),!n[c].test(d))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(d)+"`");a+=(0===h?u.prefix:u.delimiter)+d}}else{if(d=u.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):l(p),!n[c].test(d))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+d+'"');a+=u.prefix+d}}else a+=u}return a}}function l(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function c(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function u(e,t){return e.keys=t,e}function d(e){return e&&e.sensitive?"":"i"}function p(e,t,n){s(t)||(n=t||n,t=[]);for(var i=(n=n||{}).strict,a=!1!==n.end,r="",o=0;o<e.length;o++){var c=e[o];if("string"==typeof c)r+=l(c);else{var p=l(c.prefix),h="(?:"+c.pattern+")";t.push(c),c.repeat&&(h+="(?:"+p+h+")*"),r+=h=c.optional?c.partial?p+"("+h+")?":"(?:"+p+"("+h+"))?":p+"("+h+")"}}var m=l(n.delimiter||"/"),f=r.slice(-m.length)===m;return i||(r=(f?r.slice(0,-m.length):r)+"(?:"+m+"(?=$))?"),r+=a?"$":i&&f?"":"(?="+m+"|$)",u(new RegExp("^"+r,d(n)),t)}},80047:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};s.get||s.set?Object.defineProperty(t,n,s):t[n]=e[n]}t.default=e}(n(45697));var s=o(n(98141)),i=o(n(10602)),a=o(n(67294)),r=o(n(60644));function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},l.apply(this,arguments)}n(54726);var c=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,s.default)(e,t)}))},u=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return(0,i.default)(e,t)}))},d=function(e){var t,n;function s(){for(var t,n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(t=e.call.apply(e,[this].concat(s))||this).onEnter=function(e,n){var s=t.getClassNames(n?"appear":"enter").className;t.removeClasses(e,"exit"),c(e,s),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var s=t.getClassNames(n?"appear":"enter").activeClassName;t.reflowAndAddClass(e,s),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var s=t.getClassNames("appear").doneClassName,i=t.getClassNames("enter").doneClassName,a=n?s+" "+i:i;t.removeClasses(e,n?"appear":"enter"),c(e,a),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.getClassNames("exit").className;t.removeClasses(e,"appear"),t.removeClasses(e,"enter"),c(e,n),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.getClassNames("exit").activeClassName;t.reflowAndAddClass(e,n),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.getClassNames("exit").doneClassName;t.removeClasses(e,"exit"),c(e,n),t.props.onExited&&t.props.onExited(e)},t.getClassNames=function(e){var n=t.props.classNames,s="string"==typeof n,i=s?(s&&n?n+"-":"")+e:n[e];return{className:i,activeClassName:s?i+"-active":n[e+"Active"],doneClassName:s?i+"-done":n[e+"Done"]}},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=s.prototype;return i.removeClasses=function(e,t){var n=this.getClassNames(t),s=n.className,i=n.activeClassName,a=n.doneClassName;s&&u(e,s),i&&u(e,i),a&&u(e,a)},i.reflowAndAddClass=function(e,t){t&&(e&&e.scrollTop,c(e,t))},i.render=function(){var e=l({},this.props);return delete e.classNames,a.default.createElement(r.default,l({},e,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},s}(a.default.Component);d.defaultProps={classNames:""},d.propTypes={};var p=d;t.default=p,e.exports=t.default},26093:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0,r(n(45697));var s=r(n(67294)),i=n(73935),a=r(n(92381));function r(e){return e&&e.__esModule?e:{default:e}}var o=function(e){var t,n;function r(){for(var t,n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(t=e.call.apply(e,[this].concat(s))||this).handleEnter=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.handleLifecycle("onEnter",0,n)},t.handleEntering=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.handleLifecycle("onEntering",0,n)},t.handleEntered=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.handleLifecycle("onEntered",0,n)},t.handleExit=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.handleLifecycle("onExit",1,n)},t.handleExiting=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.handleLifecycle("onExiting",1,n)},t.handleExited=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return t.handleLifecycle("onExited",1,n)},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.handleLifecycle=function(e,t,n){var a,r=this.props.children,o=s.default.Children.toArray(r)[t];o.props[e]&&(a=o.props)[e].apply(a,n),this.props[e]&&this.props[e]((0,i.findDOMNode)(this))},o.render=function(){var e=this.props,t=e.children,n=e.in,i=function(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["children","in"]),r=s.default.Children.toArray(t),o=r[0],l=r[1];return delete i.onEnter,delete i.onEntering,delete i.onEntered,delete i.onExit,delete i.onExiting,delete i.onExited,s.default.createElement(a.default,i,n?s.default.cloneElement(o,{key:"first",onEnter:this.handleEnter,onEntering:this.handleEntering,onEntered:this.handleEntered}):s.default.cloneElement(l,{key:"second",onEnter:this.handleExit,onEntering:this.handleExiting,onEntered:this.handleExited}))},r}(s.default.Component);o.propTypes={};var l=o;t.default=l,e.exports=t.default},60644:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};s.get||s.set?Object.defineProperty(t,n,s):t[n]=e[n]}return t.default=e,t}(n(45697)),i=o(n(67294)),a=o(n(73935)),r=n(46871);function o(e){return e&&e.__esModule?e:{default:e}}n(54726);var l="unmounted";t.UNMOUNTED=l;var c="exited";t.EXITED=c;var u="entering";t.ENTERING=u;var d="entered";t.ENTERED=d;var p="exiting";t.EXITING=p;var h=function(e){var t,n;function s(t,n){var s;s=e.call(this,t,n)||this;var i,a=n.transitionGroup,r=a&&!a.isMounting?t.enter:t.appear;return s.appearStatus=null,t.in?r?(i=c,s.appearStatus=u):i=d:i=t.unmountOnExit||t.mountOnEnter?l:c,s.state={status:i},s.nextCallback=null,s}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=s.prototype;return r.getChildContext=function(){return{transitionGroup:null}},s.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:c}:null},r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==u&&n!==d&&(t=u):n!==u&&n!==d||(t=p)}this.updateStatus(!1,t)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var e,t,n,s=this.props.timeout;return e=t=n=s,null!=s&&"number"!=typeof s&&(e=s.exit,t=s.enter,n=void 0!==s.appear?s.appear:t),{exit:e,enter:t,appear:n}},r.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=a.default.findDOMNode(this);t===u?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===c&&this.setState({status:l})},r.performEnter=function(e,t){var n=this,s=this.props.enter,i=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,a=this.getTimeouts(),r=i?a.appear:a.enter;t||s?(this.props.onEnter(e,i),this.safeSetState({status:u},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,r,(function(){n.safeSetState({status:d},(function(){n.props.onEntered(e,i)}))}))}))):this.safeSetState({status:d},(function(){n.props.onEntered(e)}))},r.performExit=function(e){var t=this,n=this.props.exit,s=this.getTimeouts();n?(this.props.onExit(e),this.safeSetState({status:p},(function(){t.props.onExiting(e),t.onTransitionEnd(e,s.exit,(function(){t.safeSetState({status:c},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:c},(function(){t.props.onExited(e)}))},r.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},r.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(s){n&&(n=!1,t.nextCallback=null,e(s))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},r.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var s=null==t&&!this.props.addEndListener;e&&!s?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},r.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,s=function(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["children"]);if(delete s.in,delete s.mountOnEnter,delete s.unmountOnExit,delete s.appear,delete s.enter,delete s.exit,delete s.timeout,delete s.addEndListener,delete s.onEnter,delete s.onEntering,delete s.onEntered,delete s.onExit,delete s.onExiting,delete s.onExited,"function"==typeof n)return n(e,s);var a=i.default.Children.only(n);return i.default.cloneElement(a,s)},s}(i.default.Component);function m(){}h.contextTypes={transitionGroup:s.object},h.childContextTypes={transitionGroup:function(){}},h.propTypes={},h.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:m,onEntering:m,onEntered:m,onExit:m,onExiting:m,onExited:m},h.UNMOUNTED=0,h.EXITED=1,h.ENTERING=2,h.ENTERED=3,h.EXITING=4;var f=(0,r.polyfill)(h);t.default=f},92381:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var s=o(n(45697)),i=o(n(67294)),a=n(46871),r=n(40537);function o(e){return e&&e.__esModule?e:{default:e}}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},l.apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},d=function(e){var t,n;function s(t,n){var s,i=(s=e.call(this,t,n)||this).handleExited.bind(c(c(s)));return s.state={handleExited:i,firstRender:!0},s}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=s.prototype;return a.getChildContext=function(){return{transitionGroup:{isMounting:!this.appeared}}},a.componentDidMount=function(){this.appeared=!0,this.mounted=!0},a.componentWillUnmount=function(){this.mounted=!1},s.getDerivedStateFromProps=function(e,t){var n=t.children,s=t.handleExited;return{children:t.firstRender?(0,r.getInitialChildMapping)(e,s):(0,r.getNextChildMapping)(e,n,s),firstRender:!1}},a.handleExited=function(e,t){var n=(0,r.getChildMapping)(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=l({},t.children);return delete n[e.key],{children:n}})))},a.render=function(){var e=this.props,t=e.component,n=e.childFactory,s=function(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["component","childFactory"]),a=u(this.state.children).map(n);return delete s.appear,delete s.enter,delete s.exit,null===t?a:i.default.createElement(t,s,a)},s}(i.default.Component);d.childContextTypes={transitionGroup:s.default.object.isRequired},d.propTypes={},d.defaultProps={component:"div",childFactory:function(e){return e}};var p=(0,a.polyfill)(d);t.default=p,e.exports=t.default},64317:(e,t,n)=>{"use strict";var s=o(n(80047)),i=o(n(26093)),a=o(n(92381)),r=o(n(60644));function o(e){return e&&e.__esModule?e:{default:e}}e.exports={Transition:r.default,TransitionGroup:a.default,ReplaceTransition:i.default,CSSTransition:s.default}},40537:(e,t,n)=>{"use strict";t.__esModule=!0,t.getChildMapping=i,t.mergeChildMappings=a,t.getInitialChildMapping=function(e,t){return i(e.children,(function(n){return(0,s.cloneElement)(n,{onExited:t.bind(null,n),in:!0,appear:r(n,"appear",e),enter:r(n,"enter",e),exit:r(n,"exit",e)})}))},t.getNextChildMapping=function(e,t,n){var o=i(e.children),l=a(t,o);return Object.keys(l).forEach((function(i){var a=l[i];if((0,s.isValidElement)(a)){var c=i in t,u=i in o,d=t[i],p=(0,s.isValidElement)(d)&&!d.props.in;!u||c&&!p?u||!c||p?u&&c&&(0,s.isValidElement)(d)&&(l[i]=(0,s.cloneElement)(a,{onExited:n.bind(null,a),in:d.props.in,exit:r(a,"exit",e),enter:r(a,"enter",e)})):l[i]=(0,s.cloneElement)(a,{in:!1}):l[i]=(0,s.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:r(a,"exit",e),enter:r(a,"enter",e)})}})),l};var s=n(67294);function i(e,t){var n=Object.create(null);return e&&s.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,s.isValidElement)(e)?t(e):e}(e)})),n}function a(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var s,i=Object.create(null),a=[];for(var r in e)r in t?a.length&&(i[r]=a,a=[]):a.push(r);var o={};for(var l in t){if(i[l])for(s=0;s<i[l].length;s++){var c=i[l][s];o[i[l][s]]=n(c)}o[l]=n(l)}for(s=0;s<a.length;s++)o[a[s]]=n(a[s]);return o}function r(e,t,n){return null!=n[t]?n[t]:e.props[t]}},54726:(e,t,n)=>{"use strict";var s;t.__esModule=!0,t.classNamesShape=t.timeoutsShape=void 0,(s=n(45697))&&s.__esModule,t.timeoutsShape=null,t.classNamesShape=null},75251:(e,t,n)=>{"use strict";var s=n(67294),i=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;i=a("react.element"),t.Fragment=a("react.fragment")}var r=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o=Object.prototype.hasOwnProperty,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var s,a={},c=null,u=null;for(s in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)o.call(t,s)&&!l.hasOwnProperty(s)&&(a[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps)void 0===a[s]&&(a[s]=t[s]);return{$$typeof:i,type:e,key:c,ref:u,props:a,_owner:r.current}}t.jsx=c,t.jsxs=c},72408:(e,t,n)=>{"use strict";var s=n(27418),i="function"==typeof Symbol&&Symbol.for,a=i?Symbol.for("react.element"):60103,r=i?Symbol.for("react.portal"):60106,o=i?Symbol.for("react.fragment"):60107,l=i?Symbol.for("react.strict_mode"):60108,c=i?Symbol.for("react.profiler"):60114,u=i?Symbol.for("react.provider"):60109,d=i?Symbol.for("react.context"):60110,p=i?Symbol.for("react.forward_ref"):60112,h=i?Symbol.for("react.suspense"):60113,m=i?Symbol.for("react.memo"):60115,f=i?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function b(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function _(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||v}function x(){}function S(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||v}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(b(85));this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=_.prototype;var w=S.prototype=new x;w.constructor=S,s(w,_.prototype),w.isPureReactComponent=!0;var k={current:null},j=Object.prototype.hasOwnProperty,T={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var s,i={},r=null,o=null;if(null!=t)for(s in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(r=""+t.key),t)j.call(t,s)&&!T.hasOwnProperty(s)&&(i[s]=t[s]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(s in l=e.defaultProps)void 0===i[s]&&(i[s]=l[s]);return{$$typeof:a,type:e,key:r,ref:o,props:i,_owner:k.current}}function D(e){return"object"==typeof e&&null!==e&&e.$$typeof===a}var P=/\/+/g,I=[];function O(e,t,n,s){if(I.length){var i=I.pop();return i.result=e,i.keyPrefix=t,i.func=n,i.context=s,i.count=0,i}return{result:e,keyPrefix:t,func:n,context:s,count:0}}function L(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>I.length&&I.push(e)}function M(e,t,n,s){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var o=!1;if(null===e)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case a:case r:o=!0}}if(o)return n(s,e,""===t?"."+E(e,0):t),1;if(o=0,t=""===t?".":t+":",Array.isArray(e))for(var l=0;l<e.length;l++){var c=t+E(i=e[l],l);o+=M(i,c,n,s)}else if("function"==typeof(c=null===e||"object"!=typeof e?null:"function"==typeof(c=g&&e[g]||e["@@iterator"])?c:null))for(e=c.call(e),l=0;!(i=e.next()).done;)o+=M(i=i.value,c=t+E(i,l++),n,s);else if("object"===i)throw n=""+e,Error(b(31,"[object Object]"===n?"object with keys {"+Object.keys(e).join(", ")+"}":n,""));return o}function A(e,t,n){return null==e?0:M(e,"",t,n)}function E(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function U(e,t){e.func.call(e.context,t,e.count++)}function R(e,t,n){var s=e.result,i=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?N(e,s,n,(function(e){return e})):null!=e&&(D(e)&&(e=function(e,t){return{$$typeof:a,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,i+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),s.push(e))}function N(e,t,n,s,i){var a="";null!=n&&(a=(""+n).replace(P,"$&/")+"/"),A(e,R,t=O(t,a,s,i)),L(t)}var F={current:null};function Y(){var e=F.current;if(null===e)throw Error(b(321));return e}var B={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:k,IsSomeRendererActing:{current:!1},assign:s};t.Children={map:function(e,t,n){if(null==e)return e;var s=[];return N(e,s,null,t,n),s},forEach:function(e,t,n){if(null==e)return e;A(e,U,t=O(null,null,t,n)),L(t)},count:function(e){return A(e,(function(){return null}),null)},toArray:function(e){var t=[];return N(e,t,null,(function(e){return e})),t},only:function(e){if(!D(e))throw Error(b(143));return e}},t.Component=_,t.Fragment=o,t.Profiler=c,t.PureComponent=S,t.StrictMode=l,t.Suspense=h,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,t.cloneElement=function(e,t,n){if(null==e)throw Error(b(267,e));var i=s({},e.props),r=e.key,o=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,l=k.current),void 0!==t.key&&(r=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(u in t)j.call(t,u)&&!T.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==c?c[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=n;else if(1<u){c=Array(u);for(var d=0;d<u;d++)c[d]=arguments[d+2];i.children=c}return{$$typeof:a,type:e.type,key:r,ref:o,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:d,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:u,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=D,t.lazy=function(e){return{$$typeof:f,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return Y().useCallback(e,t)},t.useContext=function(e,t){return Y().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return Y().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return Y().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return Y().useLayoutEffect(e,t)},t.useMemo=function(e,t){return Y().useMemo(e,t)},t.useReducer=function(e,t,n){return Y().useReducer(e,t,n)},t.useRef=function(e){return Y().useRef(e)},t.useState=function(e){return Y().useState(e)},t.version="16.14.0"},67294:(e,t,n)=>{"use strict";e.exports=n(72408)},85893:(e,t,n)=>{"use strict";e.exports=n(75251)},53697:e=>{"use strict";var t=Object,n=TypeError;e.exports=function(){if(null!=this&&this!==t(this))throw new n("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},2847:(e,t,n)=>{"use strict";var s=n(4289),i=n(55559),a=n(53697),r=n(71721),o=n(32753),l=i(a);s(l,{getPolyfill:r,implementation:a,shim:o}),e.exports=l},71721:(e,t,n)=>{"use strict";var s=n(53697),i=n(4289).supportsDescriptors,a=Object.getOwnPropertyDescriptor,r=TypeError;e.exports=function(){if(!i)throw new r("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=a(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return s}},32753:(e,t,n)=>{"use strict";var s=n(4289).supportsDescriptors,i=n(71721),a=Object.getOwnPropertyDescriptor,r=Object.defineProperty,o=TypeError,l=Object.getPrototypeOf,c=/a/;e.exports=function(){if(!s||!l)throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=i(),t=l(c),n=a(t,"flags");return n&&n.get===e||r(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}},91036:(e,t,n)=>{const s=n(23719),i=n(22997),{klona:a}=n(23059),{isPlainObject:r}=n(10977),o=n(9996),l=n(79430),{parse:c}=n(13200),u=["img","audio","video","picture","svg","object","map","iframe","embed"],d=["script","style"];function p(e,t){e&&Object.keys(e).forEach((function(n){t(e[n],n)}))}function h(e,t){return{}.hasOwnProperty.call(e,t)}function m(e,t){const n=[];return p(e,(function(e){t(e)&&n.push(e)})),n}e.exports=g;const f=/^[^\0\t\n\f\r /<=>]+$/;function g(e,t,n){let v="",y="";function _(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=v.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){P.length&&(P[P.length-1].text+=n.text)},this.updateParentNodeMediaChildren=function(){P.length&&u.includes(this.tag)&&P[P.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},g.defaults,t)).parser=Object.assign({},b,t.parser),d.forEach((function(e){t.allowedTags&&t.allowedTags.indexOf(e)>-1&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const x=t.nonTextTags||["script","style","textarea","option"];let S,w;t.allowedAttributes&&(S={},w={},p(t.allowedAttributes,(function(e,t){S[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):S[t].push(e)})),n.length&&(w[t]=new RegExp("^("+n.join("|")+")$"))})));const k={},j={};p(t.allowedClasses,(function(e,t){S&&(h(S,t)||(S[t]=[]),S[t].push("class")),k[t]=[];const n=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(i(e).replace(/\\\*/g,".*")):k[t].push(e)})),n.length&&(j[t]=new RegExp("^("+n.join("|")+")$"))}));const T={};let C,D,P,I,O,L,M;p(t.transformTags,(function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=g.simpleTransform(e)),"*"===t?C=n:T[t]=n}));let A=!1;U();const E=new s.Parser({onopentag:function(e,n){if(t.enforceHtmlBoundary&&"html"===e&&U(),L)return void M++;const s=new _(e,n);P.push(s);let i=!1;const u=!!s.text;let d;if(h(T,e)&&(d=T[e](e,n),s.attribs=n=d.attribs,void 0!==d.text&&(s.innerText=d.text),e!==d.tagName&&(s.name=e=d.tagName,O[D]=d.tagName)),C&&(d=C(e,n),s.attribs=n=d.attribs,e!==d.tagName&&(s.name=e=d.tagName,O[D]=d.tagName)),(t.allowedTags&&-1===t.allowedTags.indexOf(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(h(e,t))return!1;return!0}(I)||null!=t.nestingLimit&&D>=t.nestingLimit)&&(i=!0,I[D]=!0,"discard"===t.disallowedTagsMode&&-1!==x.indexOf(e)&&(L=!0,M=1),I[D]=!0),D++,i){if("discard"===t.disallowedTagsMode)return;y=v,v=""}v+="<"+e,(!S||h(S,e)||S["*"])&&p(n,(function(n,i){if(!f.test(i))return void delete s.attribs[i];let u,d=!1;if(!S||h(S,e)&&-1!==S[e].indexOf(i)||S["*"]&&-1!==S["*"].indexOf(i)||h(w,e)&&w[e].test(i)||w["*"]&&w["*"].test(i))d=!0;else if(S&&S[e])for(const t of S[e])if(r(t)&&t.name&&t.name===i){d=!0;let e="";if(!0===t.multiple){const s=n.split(" ");for(const n of s)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(d){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(i)&&N(e,n))return void delete s.attribs[i];if("iframe"===e&&"src"===i){let e=!0;try{if((n=n.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let s="relative://relative-site";for(let e=0;e<100;e++)s+=`/${e}`;const i=new URL(n,s);if(i&&"relative-site"===i.hostname&&"relative:"===i.protocol)e=h(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find((function(e){return e===i.hostname})),s=(t.allowedIframeDomains||[]).find((function(e){return i.hostname===e||i.hostname.endsWith(`.${e}`)}));e=n||s}}catch(t){e=!1}if(!e)return void delete s.attribs[i]}if("srcset"===i)try{if(u=l(n),u.forEach((function(e){N("srcset",e.url)&&(e.evil=!0)})),u=m(u,(function(e){return!e.evil})),!u.length)return void delete s.attribs[i];n=m(u,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),s.attribs[i]=n}catch(e){return void delete s.attribs[i]}if("class"===i){const t=k[e],a=k["*"],r=[j[e],j["*"]].filter((function(e){return e}));if(!(p=n,g=t&&a?o(t,a):t||a,b=r,n=g?(p=p.split(/\s+/)).filter((function(e){return-1!==g.indexOf(e)||b.some((function(t){return t.test(e)}))})).join(" "):p).length)return void delete s.attribs[i]}if("style"===i)try{if(0===(n=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(t.prop+":"+t.value),e}),[]).join(";")}(function(e,t){if(!t)return e;const n=a(e),s=e.nodes[0];let i;return i=t[s.selector]&&t["*"]?o(t[s.selector],t["*"]):t[s.selector]||t["*"],i&&(n.nodes[0].nodes=s.nodes.reduce(function(e){return function(t,n){return h(e,n.prop)&&e[n.prop].some((function(e){return e.test(n.value)}))&&t.push(n),t}}(i),[])),n}(c(e+" {"+n+"}"),t.allowedStyles))).length)return void delete s.attribs[i]}catch(e){return void delete s.attribs[i]}v+=" "+i,n&&n.length&&(v+='="'+R(n,!0)+'"')}else delete s.attribs[i];var p,g,b})),-1!==t.selfClosing.indexOf(e)?v+=" />":(v+=">",!s.innerText||u||t.textFilter||(v+=R(s.innerText),A=!0)),i&&(v=y+R(v),y="")},ontext:function(e){if(L)return;const n=P[P.length-1];let s;if(n&&(s=n.tag,e=void 0!==n.innerText?n.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==s&&"style"!==s){const n=R(e,!1);t.textFilter&&!A?v+=t.textFilter(n,s):A||(v+=n)}else v+=e;P.length&&(P[P.length-1].text+=e)},onclosetag:function(e){if(L){if(M--,M)return;L=!1}const n=P.pop();if(!n)return;L=!!t.enforceHtmlBoundary&&"html"===e,D--;const s=I[D];if(s){if(delete I[D],"discard"===t.disallowedTagsMode)return void n.updateParentNodeText();y=v,v=""}O[D]&&(e=O[D],delete O[D]),t.exclusiveFilter&&t.exclusiveFilter(n)?v=v.substr(0,n.tagPosition):(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1===t.selfClosing.indexOf(e)?(v+="</"+e+">",s&&(v=y+R(v),y="")):s&&(v=y,y=""))}},t.parser);return E.write(e),E.end(),v;function U(){v="",D=0,P=[],I={},O={},L=!1,M=0}function R(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,"""))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&").replace(/</g,"<").replace(/>/g,">"),n&&(e=e.replace(/"/g,""")),e}function N(e,n){const s=(n=(n=n.replace(/[\x00-\x20]+/g,"")).replace(/<!--.*?-->/g,"")).match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!s)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const i=s[1].toLowerCase();return h(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(i):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(i)}}const b={decodeEntities:!0};g.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},g.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(s,i){let a;if(n)for(a in t)i[a]=t[a];else i=t;return{tagName:e,attribs:i}}}},22997:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},10977:(e,t)=>{"use strict";function n(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,s;return!1!==n(e)&&(void 0===(t=e.constructor)||!1!==n(s=t.prototype)&&!1!==s.hasOwnProperty("isPrototypeOf"))}},12650:(e,t,n)=>{"use strict";let s=n(66808);class i extends s{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=i,i.default=i,s.registerAtRule(i)},91569:(e,t,n)=>{"use strict";let s=n(83454);class i extends s{constructor(e){super(e),this.type="comment"}}e.exports=i,i.default=i},66808:(e,t,n)=>{"use strict";let s,i,a,r=n(85232),{isClean:o}=n(58999),l=n(91569),c=n(83454);function u(e){return e.map((e=>(e.nodes&&(e.nodes=u(e.nodes)),delete e.source,e)))}function d(e){if(e[o]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)d(t)}function p(e){"atrule"===e.type?Object.setPrototypeOf(e,a.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,r.prototype):"comment"===e.type&&Object.setPrototypeOf(e,l.prototype),e.nodes&&e.nodes.forEach((e=>{p(e)}))}class h extends c{push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}each(e){if(!this.proxyOf.nodes)return;let t,n,s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[s]+=1;return delete this.indexes[s],n}walk(e){return this.each(((t,n)=>{let s;try{s=e(t,n)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((n,s)=>{if("decl"===n.type&&e.test(n.prop))return t(n,s)})):this.walk(((n,s)=>{if("decl"===n.type&&n.prop===e)return t(n,s)})):(t=e,this.walk(((e,n)=>{if("decl"===e.type)return t(e,n)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((n,s)=>{if("rule"===n.type&&e.test(n.selector))return t(n,s)})):this.walk(((n,s)=>{if("rule"===n.type&&n.selector===e)return t(n,s)})):(t=e,this.walk(((e,n)=>{if("rule"===e.type)return t(e,n)})))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((n,s)=>{if("atrule"===n.type&&e.test(n.name))return t(n,s)})):this.walk(((n,s)=>{if("atrule"===n.type&&n.name===e)return t(n,s)})):(t=e,this.walk(((e,n)=>{if("atrule"===e.type)return t(e,n)})))}walkComments(e){return this.walk(((t,n)=>{if("comment"===t.type)return e(t,n)}))}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}insertBefore(e,t){let n,s=0===(e=this.index(e))&&"prepend",i=this.normalize(t,this.proxyOf.nodes[e],s).reverse();for(let t of i)this.proxyOf.nodes.splice(e,0,t);for(let t in this.indexes)n=this.indexes[t],e<=n&&(this.indexes[t]=n+i.length);return this.markDirty(),this}insertAfter(e,t){e=this.index(e);let n,s=this.normalize(t,this.proxyOf.nodes[e]).reverse();for(let t of s)this.proxyOf.nodes.splice(e+1,0,t);for(let t in this.indexes)n=this.indexes[t],e<n&&(this.indexes[t]=n+s.length);return this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls((s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,n))})),this.markDirty(),this}every(e){return this.nodes.every(e)}some(e){return this.nodes.some(e)}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}normalize(e,t){if("string"==typeof e)e=u(s(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new r(e)]}else if(e.selector)e=[new i(e)];else if(e.name)e=[new a(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new l(e)]}return e.map((e=>("function"!=typeof e.markDirty&&p(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[o]&&d(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this,e)))}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map((e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e))):"every"===t||"some"===t?n=>e[t](((e,...t)=>n(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]}}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}}h.registerParse=e=>{s=e},h.registerRule=e=>{i=e},h.registerAtRule=e=>{a=e},e.exports=h,h.default=h},95373:(e,t,n)=>{"use strict";let{red:s,bold:i,gray:a,options:r}=n(36648),o=n(75347);class l extends Error{constructor(e,t,n,s,i,a){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),s&&(this.source=s),a&&(this.plugin=a),void 0!==t&&void 0!==n&&(this.line=t,this.column=n),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,l)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=r.enabled),o&&e&&(t=o(t));let n,l,c=t.split(/\r?\n/),u=Math.max(this.line-3,0),d=Math.min(this.line+2,c.length),p=String(d).length;return e?(n=e=>i(s(e)),l=e=>a(e)):n=l=e=>e,c.slice(u,d).map(((e,t)=>{let s=u+1+t,i=" "+(" "+s).slice(-p)+" | ";if(s===this.line){let t=l(i.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+l(i)+e+"\n "+t+n("^")}return" "+l(i)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=l,l.default=l},85232:(e,t,n)=>{"use strict";let s=n(83454);class i extends s{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=i,i.default=i},5991:(e,t,n)=>{"use strict";let s,i,a=n(66808);class r extends a{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new s(new i,this,e).stringify()}}r.registerLazyResult=e=>{s=e},r.registerProcessor=e=>{i=e},e.exports=r,r.default=r},38853:(e,t,n)=>{"use strict";let s=n(85232),i=n(49470),a=n(91569),r=n(12650),o=n(62627),l=n(71283),c=n(4485);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:n,...d}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:o.prototype};n.map&&(n.map={...n.map,__proto__:i.prototype}),t.push(n)}}if(d.nodes&&(d.nodes=e.nodes.map((e=>u(e,t)))),d.source){let{inputId:e,...n}=d.source;d.source=n,null!=e&&(d.source.input=t[e])}if("root"===d.type)return new l(d);if("decl"===d.type)return new s(d);if("rule"===d.type)return new c(d);if("comment"===d.type)return new a(d);if("atrule"===d.type)return new r(d);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},62627:(e,t,n)=>{"use strict";let{SourceMapConsumer:s,SourceMapGenerator:i}=n(59905),{fileURLToPath:a,pathToFileURL:r}=n(64604),{resolve:o,isAbsolute:l}=n(34017),{nanoid:c}=n(68610),u=n(75347),d=n(95373),p=n(49470),h=Symbol("fromOffset cache"),m=Boolean(s&&i),f=Boolean(o&&l);class g{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!f||/^\w+:\/\//.test(t.from)||l(t.from)?this.file=t.from:this.file=o(t.from)),f&&m){let e=new p(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}fromOffset(e){let t,n;if(this[h])n=this[h];else{let e=this.css.split("\n");n=new Array(e.length);let t=0;for(let s=0,i=e.length;s<i;s++)n[s]=t,t+=e[s].length+1;this[h]=n}t=n[n.length-1];let s=0;if(e>=t)s=n.length-1;else{let t,i=n.length-2;for(;s<i;)if(t=s+(i-s>>1),e<n[t])i=t-1;else{if(!(e>=n[t+1])){s=t;break}s=t+1}}return{line:s+1,col:e-n[s]+1}}error(e,t,n,s={}){let i;if(!n){let e=this.fromOffset(t);t=e.line,n=e.col}let a=this.origin(t,n);return i=a?new d(e,a.line,a.column,a.source,a.file,s.plugin):new d(e,t,n,this.css,this.file,s.plugin),i.input={line:t,column:n,source:this.css},this.file&&(r&&(i.input.url=r(this.file).toString()),i.input.file=this.file),i}origin(e,t){if(!this.map)return!1;let n,s=this.map.consumer(),i=s.originalPositionFor({line:e,column:t});if(!i.source)return!1;n=l(i.source)?r(i.source):new URL(i.source,this.map.consumer().sourceRoot||r(this.map.mapFile));let o={url:n.toString(),line:i.line,column:i.column};if("file:"===n.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");o.file=a(n)}let c=s.sourceContentFor(i.source);return c&&(o.source=c),o}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}get from(){return this.file||this.id}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}}e.exports=g,g.default=g,u&&u.registerInput&&u.registerInput(g)},75673:(e,t,n)=>{"use strict";let s=n(40429),{isClean:i}=n(58999),a=n(23179),r=(n(84133),n(96641)),o=n(11665),l=n(71283),c=n(5991);const u={document:"Document",root:"Root",atrule:"AtRule",rule:"Rule",decl:"Declaration",comment:"Comment"},d={postcssPlugin:!0,prepare:!0,Once:!0,Document:!0,Root:!0,Declaration:!0,Rule:!0,AtRule:!0,Comment:!0,DeclarationExit:!0,RuleExit:!0,AtRuleExit:!0,CommentExit:!0,RootExit:!0,DocumentExit:!0,OnceExit:!0},p={postcssPlugin:!0,prepare:!0,Once:!0};function h(e){return"object"==typeof e&&"function"==typeof e.then}function m(e){let t=!1,n=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function f(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:m(e),{node:e,events:t,eventIndex:0,visitors:[],visitorIndex:0,iterator:0}}function g(e){return e[i]=!1,e.nodes&&e.nodes.forEach((e=>g(e))),e}let b={};class v{constructor(e,t,n){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof v||t instanceof r)s=g(t.root),t.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=o;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{s=e(t,n)}catch(e){this.processed=!0,this.error=e}}else s=g(t);this.result=new r(e,s,n),this.helpers={...b,result:this.result,postcss:b},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}get[Symbol.toStringTag](){return"LazyResult"}get processor(){return this.result.processor}get opts(){return this.result.opts}get css(){return this.stringify().css}get content(){return this.stringify().content}get map(){return this.stringify().map}get root(){return this.sync().root}get messages(){return this.sync().messages}warnings(){return this.sync().warnings()}toString(){return this.css}then(e,t){return this.async().then(e,t)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(h(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[i];)e[i]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=a;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new s(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}walkSync(e){e[i]=!0;let t=m(e);for(let n of t)if(0===n)e.nodes&&e.each((e=>{e[i]||this.walkSync(e)}));else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}visitSync(e,t){for(let[n,s]of e){let e;this.result.lastPlugin=n;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(h(e))throw this.getAsyncError()}}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return h(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],n=this.runOnRoot(t);if(h(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[i];){e[i]=!0;let t=[f(e)];for(;t.length>0;){let e=this.visitTick(t);if(h(e))try{await e}catch(e){let n=t[t.length-1].node;throw this.handleError(e,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>n(e,this.helpers)));await Promise.all(t)}else await n(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!d[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!p[n])if("object"==typeof t[n])for(let s in t[n])e(t,"*"===s?n:n+"-"+s.toLowerCase(),t[n][s]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}visitTick(e){let t=e[e.length-1],{node:n,visitors:s}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,i]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==t.iterator){let s,a=t.iterator;for(;s=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!s[i])return s[i]=!0,void e.push(f(s));t.iterator=0,delete n.indexes[a]}let a=t.events;for(;t.eventIndex<a.length;){let e=a[t.eventIndex];if(t.eventIndex+=1,0===e)return void(n.nodes&&n.nodes.length&&(n[i]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}}v.registerPostcss=e=>{b=e},e.exports=v,v.default=v,l.registerLazyResult(v),c.registerLazyResult(v)},30416:e=>{"use strict";let t={split(e,t,n){let s=[],i="",a=!1,r=0,o=!1,l=!1;for(let n of e)l?l=!1:"\\"===n?l=!0:o?n===o&&(o=!1):'"'===n||"'"===n?o=n:"("===n?r+=1:")"===n?r>0&&(r-=1):0===r&&t.includes(n)&&(a=!0),a?(""!==i&&s.push(i.trim()),i="",a=!1):i+=n;return(n||""!==i)&&s.push(i.trim()),s},space:e=>t.split(e,[" ","\n","\t"]),comma:e=>t.split(e,[","],!0)};e.exports=t,t.default=t},40429:(e,t,n)=>{"use strict";let{SourceMapConsumer:s,SourceMapGenerator:i}=n(59905),{dirname:a,resolve:r,relative:o,sep:l}=n(34017),{pathToFileURL:c}=n(64604),u=Boolean(s&&i),d=Boolean(a&&r&&o&&l);e.exports=class{constructor(e,t,n){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}previous(){return this.previousMaps||(this.previousMaps=[],this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}))),this.previousMaps}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}clearAnnotation(){if(!1===this.mapOpts.annotation)return;let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}setSourcesContent(){let e={};this.root.walk((t=>{if(t.source){let n=t.source.input.from;n&&!e[n]&&(e[n]=!0,this.map.setSourceContent(this.toUrl(this.path(n)),t.source.input.css))}}))}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),i=e.root||a(e.file);!1===this.mapOpts.sourcesContent?(t=new s(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(i)))}}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}generateMap(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}path(e){if(0===e.indexOf("<"))return e;if(/^\w+:\/\//.test(e))return e;if(this.mapOpts.absolute)return e;let t=this.opts.to?a(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(t=a(r(t,this.mapOpts.annotation))),o(t,e)}toUrl(e){return"\\"===l&&(e=e.replace(/\\/g,"/")),encodeURI(e).replace(/[#?]/g,encodeURIComponent)}sourcePath(e){if(this.mapOpts.from)return this.toUrl(this.mapOpts.from);if(this.mapOpts.absolute){if(c)return c(e.source.input.from).toString();throw new Error("`map.absolute` option is not available in this PostCSS build")}return this.toUrl(this.path(e.source.input.from))}generateString(){this.css="",this.map=new i({file:this.outputFile()});let e,t,n=1,s=1,a="<no source>",r={source:"",generated:{line:0,column:0},original:{line:0,column:0}};this.stringify(this.root,((i,o,l)=>{if(this.css+=i,o&&"end"!==l&&(r.generated.line=n,r.generated.column=s-1,o.source&&o.source.start?(r.source=this.sourcePath(o),r.original.line=o.source.start.line,r.original.column=o.source.start.column-1,this.map.addMapping(r)):(r.source=a,r.original.line=1,r.original.column=0,this.map.addMapping(r))),e=i.match(/\n/g),e?(n+=e.length,t=i.lastIndexOf("\n"),s=i.length-t):s+=i.length,o&&"start"!==l){let e=o.parent||{raws:{}};("decl"!==o.type||o!==e.last||e.raws.semicolon)&&(o.source&&o.source.end?(r.source=this.sourcePath(o),r.original.line=o.source.end.line,r.original.column=o.source.end.column-1,r.generated.line=n,r.generated.column=s-2,this.map.addMapping(r)):(r.source=a,r.original.line=1,r.original.column=0,r.generated.line=n,r.generated.column=s-1,this.map.addMapping(r)))}}))}generate(){if(this.clearAnnotation(),d&&u&&this.isMap())return this.generateMap();let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}},83454:(e,t,n)=>{"use strict";let s=n(95373),i=n(7843),{isClean:a}=n(58999),r=n(23179);function o(e,t){let n=new e.constructor;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;if("proxyCache"===s)continue;let i=e[s],a=typeof i;"parent"===s&&"object"===a?t&&(n[s]=t):"source"===s?n[s]=i:Array.isArray(i)?n[s]=i.map((e=>o(e,n))):("object"===a&&null!==i&&(i=o(i)),n[s]=i)}return n}class l{constructor(e={}){this.raws={},this[a]=!1;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}error(e,t={}){if(this.source){let n=this.positionBy(t);return this.source.input.error(e,n.line,n.column,t)}return new s(e)}warn(e,t,n){let s={node:this};for(let e in n)s[e]=n[e];return e.warn(t,s)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}toString(e=r){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}assign(e={}){for(let t in e)this[t]=e[t];return this}clone(e={}){let t=o(this);for(let n in e)t[n]=e[n];return t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let s of e)s===this?n=!0:n?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);n||this.remove()}return this}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}before(e){return this.parent.insertBefore(this,e),this}after(e){return this.parent.insertAfter(this,e),this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}raw(e,t){return(new i).raw(this,e,t)}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}toJSON(e,t){let n={},s=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let s=this[e];if(Array.isArray(s))n[e]=s.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof s&&s.toJSON)n[e]=s.toJSON(null,t);else if("source"===e){let a=t.get(s.input);null==a&&(a=i,t.set(s.input,i),i++),n[e]={inputId:a,start:s.start,end:s.end}}else n[e]=s}return s&&(n.inputs=[...t.keys()].map((e=>e.toJSON()))),n}positionInside(e){let t=this.toString(),n=this.source.start.column,s=this.source.start.line;for(let i=0;i<e;i++)"\n"===t[i]?(n=1,s+=1):n+=1;return{line:s,column:n}}positionBy(e){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n=this.toString().indexOf(e.word);-1!==n&&(t=this.positionInside(n))}return t}getProxyProcessor(){return{set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0),get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t]}}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}markDirty(){if(this[a]){this[a]=!1;let e=this;for(;e=e.parent;)e[a]=!1}}get proxyOf(){return this}}e.exports=l,l.default=l},11665:(e,t,n)=>{"use strict";let s=n(66808),i=n(92972),a=n(62627);function r(e,t){let n=new a(e,t),s=new i(n);try{s.parse()}catch(e){throw e}return s.root}e.exports=r,r.default=r,s.registerParse(r)},92972:(e,t,n)=>{"use strict";let s=n(85232),i=n(53240),a=n(91569),r=n(12650),o=n(71283),l=n(4485);e.exports=class{constructor(e){this.input=e,this.root=new o,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{offset:0,line:1,column:1}}}createTokenizer(){this.tokenizer=i(this.input)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}comment(e){let t=new a;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]);let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}other(e){let t=!1,n=null,s=!1,i=null,a=[],r=e[1].startsWith("--"),o=[],l=e;for(;l;){if(n=l[0],o.push(l),"("===n||"["===n)i||(i=l),a.push("("===n?")":"]");else if(r&&s&&"{"===n)i||(i=l),a.push("}");else if(0===a.length){if(";"===n){if(s)return void this.decl(o,r);break}if("{"===n)return void this.rule(o);if("}"===n){this.tokenizer.back(o.pop()),t=!0;break}":"===n&&(s=!0)}else n===a[a.length-1]&&(a.pop(),0===a.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(i),t&&s){for(;o.length&&(l=o[o.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(o.pop());this.decl(o,r)}else this.unknownWord(o)}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}decl(e,t){let n=new s;this.init(n,e[0][2]);let i,a=e[e.length-1];for(";"===a[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(a[3]||a[2]);"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(i=e.shift(),":"===i[0]){n.raws.between+=i[1];break}"word"===i[0]&&/\w/.test(i[1])&&this.unknownWord([i]),n.raws.between+=i[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let r=this.spacesAndCommentsFromStart(e);this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(i=e[t],"!important"===i[1].toLowerCase()){n.important=!0;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s," !important"!==s&&(n.raws.important=s);break}if("important"===i[1].toLowerCase()){let s=e.slice(0),i="";for(let e=t;e>0;e--){let t=s[e][0];if(0===i.trim().indexOf("!")&&"space"!==t)break;i=s.pop()[1]+i}0===i.trim().indexOf("!")&&(n.important=!0,n.raws.important=i,e=s)}if("space"!==i[0]&&"comment"!==i[0])break}let o=e.some((e=>"space"!==e[0]&&"comment"!==e[0]));this.raw(n,"value",e),o?n.raws.between+=r:n.value=r+n.value,n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}atrule(e){let t,n,s,i=new r;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let a=!1,o=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){i.source.end=this.getPosition(e[2]),this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(l.length>0){for(s=l.length-1,n=l[s];n&&"space"===n[0];)n=l[--s];n&&(i.source.end=this.getPosition(n[3]||n[2]))}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(i.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(i,"params",l),a&&(e=l[l.length-1],i.source.end=this.getPosition(e[3]||e[2]),this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{offset:e,line:t.line,column:t.col}}init(e,t){this.current.push(e),e.source={start:this.getPosition(t),input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}raw(e,t,n){let s,i,a,r,o=n.length,l="",c=!0,u=/^([#.|])?(\w)+/i;for(let t=0;t<o;t+=1)s=n[t],i=s[0],"comment"!==i||"rule"!==e.type?"comment"===i||"space"===i&&t===o-1?c=!1:l+=s[1]:(r=n[t-1],a=n[t+1],"space"!==r[0]&&"space"!==a[0]&&u.test(r[1])&&u.test(a[1])?l+=s[1]:c=!1);if(!c){let s=n.reduce(((e,t)=>e+t[1]),"");e.raws[t]={value:l,raw:s}}e[t]=l}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let s=t;s<e.length;s++)n+=e[s][1];return e.splice(t,e.length-t),n}colon(e){let t,n,s,i=0;for(let[a,r]of e.entries()){if(t=r,n=t[0],"("===n&&(i+=1),")"===n&&(i-=1),0===i&&":"===n){if(s){if("word"===s[0]&&"progid"===s[1])continue;return a}this.doubleColon(t)}s=t}return!1}unclosedBracket(e){throw this.input.error("Unclosed bracket",e[2])}unknownWord(e){throw this.input.error("Unknown word",e[0][2])}unexpectedClose(e){throw this.input.error("Unexpected }",e[2])}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}doubleColon(e){throw this.input.error("Double colon",e[2])}unnamedAtrule(e,t){throw this.input.error("At-rule without name",t[2])}precheckMissedSemicolon(){}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,s=0;for(let i=t-1;i>=0&&(n=e[i],"space"===n[0]||(s+=1,2!==s));i--);throw this.input.error("Missed semicolon",n[2])}}},13200:(e,t,n)=>{"use strict";let s=n(95373),i=n(85232),a=n(75673),r=n(66808),o=n(46580),l=n(23179),c=n(38853),u=n(5991),d=n(3061),p=n(91569),h=n(12650),m=n(96641),f=n(62627),g=n(11665),b=n(30416),v=n(4485),y=n(71283),_=n(83454);function x(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new o(e)}x.plugin=function(e,t){function n(...n){let s=t(...n);return s.postcssPlugin=e,s.postcssVersion=(new o).version,s}let s;return console&&console.warn&&(console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226")),Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return x([n(s)]).process(e,t)},n},x.stringify=l,x.parse=g,x.fromJSON=c,x.list=b,x.comment=e=>new p(e),x.atRule=e=>new h(e),x.decl=e=>new i(e),x.rule=e=>new v(e),x.root=e=>new y(e),x.document=e=>new u(e),x.CssSyntaxError=s,x.Declaration=i,x.Container=r,x.Document=u,x.Comment=p,x.Warning=d,x.AtRule=h,x.Result=m,x.Input=f,x.Rule=v,x.Root=y,x.Node=_,a.registerPostcss(x),e.exports=x,x.default=x},49470:(e,t,n)=>{"use strict";let{existsSync:s,readFileSync:i}=n(31777),{dirname:a,join:r}=n(34017),{SourceMapConsumer:o,SourceMapGenerator:l}=n(59905);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let n=t.map?t.map.prev:void 0,s=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=a(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new o(this.text)),this.consumerCache}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}startWith(e,t){return!!e&&e.substr(0,t.length)===t}getAnnotationURL(e){return e.match(/\/\*\s*# sourceMappingURL=((?:(?!sourceMappingURL=).)*)\*\//)[1].trim()}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=(?:(?!sourceMappingURL=).)*\*\//gm);if(t&&t.length>0){let e=t[t.length-1];e&&(this.annotation=this.getAnnotationURL(e))}}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}loadFile(e){if(this.root=a(e),s(e))return this.mapFile=e,i(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof o)return l.fromSourceMap(t).toString();if(t instanceof l)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=r(a(e),t)),this.loadFile(t)}}}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}}e.exports=c,c.default=c},46580:(e,t,n)=>{"use strict";let s=n(75673),i=n(71283),a=n(5991);class r{constructor(e=[]){this.version="8.3.0",this.plugins=this.normalize(e)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}process(e,t={}){return 0!==this.plugins.length||t.parser!==t.stringifier||t.hideNothingWarning,new s(this,e,t)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");return t}}e.exports=r,r.default=r,i.registerProcessor(r),a.registerProcessor(r)},96641:(e,t,n)=>{"use strict";let s=n(3061);class i{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new s(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=i,i.default=i},71283:(e,t,n)=>{"use strict";let s,i,a=n(66808);class r extends a{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}normalize(e,t,n){let s=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of s)e.raws.before=t.raws.before;return s}toResult(e={}){return new s(new i,this,e).stringify()}}r.registerLazyResult=e=>{s=e},r.registerProcessor=e=>{i=e},e.exports=r,r.default=r},4485:(e,t,n)=>{"use strict";let s=n(66808),i=n(30416);class a extends s{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}e.exports=a,a.default=a,s.registerRule(a)},7843:e=>{"use strict";const t={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1};e.exports=class{constructor(e){this.builder=e}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}document(e){this.body(e)}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),s=e.prop+n+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}atrule(e,t){let n="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:s&&(n+=" "),e.nodes)this.block(e,n+s);else{let i=(e.raws.between||"")+(t?";":"");this.builder(n+s+i,e)}}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let i=e.nodes[s],a=this.raw(i,"before");a&&this.builder(a),this.stringify(i,t!==s||n)}}block(e,t){let n,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")}raw(e,n,s){let i;if(s||(s=n),n&&(i=e.raws[n],void 0!==i))return i;let a=e.parent;if("before"===s){if(!a||"root"===a.type&&a.first===e)return"";if(a&&"document"===a.type)return""}if(!a)return t[s];let r=e.root();if(r.rawCache||(r.rawCache={}),void 0!==r.rawCache[s])return r.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let t="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[t]?i=this[t](r,e):r.walk((e=>{if(i=e.raws[n],void 0!==i)return!1}))}var o;return void 0===i&&(i=t[s]),r.rawCache[s]=i,i}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((n=>{let s=n.parent;if(s&&s!==e&&s.parent&&s.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawBeforeComment(e,t){let n;return e.walkComments((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls((e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1})),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeRule(e){let t;return e.walk((n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}beforeAfter(e,t){let n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let s=e.parent,i=0;for(;s&&"root"!==s.type;)i+=1,s=s.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)n+=t}return n}rawValue(e,t){let n=e[t],s=e.raws[t];return s&&s.value===n?s.raw:n}}},23179:(e,t,n)=>{"use strict";let s=n(7843);function i(e,t){new s(t).stringify(e)}e.exports=i,i.default=i},58999:e=>{"use strict";e.exports.isClean=Symbol("isClean")},53240:e=>{"use strict";const t="'".charCodeAt(0),n='"'.charCodeAt(0),s="\\".charCodeAt(0),i="/".charCodeAt(0),a="\n".charCodeAt(0),r=" ".charCodeAt(0),o="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),d="]".charCodeAt(0),p="(".charCodeAt(0),h=")".charCodeAt(0),m="{".charCodeAt(0),f="}".charCodeAt(0),g=";".charCodeAt(0),b="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),_=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\n"'(/\\]/,w=/[\da-f]/i;e.exports=function(e,k={}){let j,T,C,D,P,I,O,L,M,A,E=e.css.valueOf(),U=k.ignoreErrors,R=E.length,N=0,F=[],Y=[];function B(t){throw e.error("Unclosed "+t,N)}return{back:function(e){Y.push(e)},nextToken:function(e){if(Y.length)return Y.pop();if(N>=R)return;let k=!!e&&e.ignoreUnclosed;switch(j=E.charCodeAt(N),j){case a:case r:case l:case c:case o:T=N;do{T+=1,j=E.charCodeAt(T)}while(j===r||j===a||j===l||j===c||j===o);A=["space",E.slice(N,T)],N=T-1;break;case u:case d:case m:case f:case v:case g:case h:{let e=String.fromCharCode(j);A=[e,e,N];break}case p:if(L=F.length?F.pop()[1]:"",M=E.charCodeAt(N+1),"url"===L&&M!==t&&M!==n&&M!==r&&M!==a&&M!==l&&M!==o&&M!==c){T=N;do{if(I=!1,T=E.indexOf(")",T+1),-1===T){if(U||k){T=N;break}B("bracket")}for(O=T;E.charCodeAt(O-1)===s;)O-=1,I=!I}while(I);A=["brackets",E.slice(N,T+1),N,T],N=T}else T=E.indexOf(")",N+1),D=E.slice(N,T+1),-1===T||S.test(D)?A=["(","(",N]:(A=["brackets",D,N,T],N=T);break;case t:case n:C=j===t?"'":'"',T=N;do{if(I=!1,T=E.indexOf(C,T+1),-1===T){if(U||k){T=N+1;break}B("string")}for(O=T;E.charCodeAt(O-1)===s;)O-=1,I=!I}while(I);A=["string",E.slice(N,T+1),N,T],N=T;break;case y:_.lastIndex=N+1,_.test(E),T=0===_.lastIndex?E.length-1:_.lastIndex-2,A=["at-word",E.slice(N,T+1),N,T],N=T;break;case s:for(T=N,P=!0;E.charCodeAt(T+1)===s;)T+=1,P=!P;if(j=E.charCodeAt(T+1),P&&j!==i&&j!==r&&j!==a&&j!==l&&j!==c&&j!==o&&(T+=1,w.test(E.charAt(T)))){for(;w.test(E.charAt(T+1));)T+=1;E.charCodeAt(T+1)===r&&(T+=1)}A=["word",E.slice(N,T+1),N,T],N=T;break;default:j===i&&E.charCodeAt(N+1)===b?(T=E.indexOf("*/",N+2)+1,0===T&&(U||k?T=E.length:B("comment")),A=["comment",E.slice(N,T+1),N,T],N=T):(x.lastIndex=N+1,x.test(E),T=0===x.lastIndex?E.length-1:x.lastIndex-2,A=["word",E.slice(N,T+1),N,T],F.push(A),N=T)}return N++,A},endOfFile:function(){return 0===Y.length&&N>=R},position:function(){return N}}}},84133:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},3061:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.positionBy(t);this.line=e.line,this.column=e.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},60053:(e,t)=>{"use strict";var n,s,i,a,r;if("undefined"==typeof window||"function"!=typeof MessageChannel){var o=null,l=null,c=function(){if(null!==o)try{var e=t.unstable_now();o(!0,e),o=null}catch(e){throw setTimeout(c,0),e}},u=Date.now();t.unstable_now=function(){return Date.now()-u},n=function(e){null!==o?setTimeout(n,0,e):(o=e,setTimeout(c,0))},s=function(e,t){l=setTimeout(e,t)},i=function(){clearTimeout(l)},a=function(){return!1},r=t.unstable_forceFrameRate=function(){}}else{var d=window.performance,p=window.Date,h=window.setTimeout,m=window.clearTimeout;if("undefined"!=typeof console){var f=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof d&&"function"==typeof d.now)t.unstable_now=function(){return d.now()};else{var g=p.now();t.unstable_now=function(){return p.now()-g}}var b=!1,v=null,y=-1,_=5,x=0;a=function(){return t.unstable_now()>=x},r=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):_=0<e?Math.floor(1e3/e):5};var S=new MessageChannel,w=S.port2;S.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();x=e+_;try{v(!0,e)?w.postMessage(null):(b=!1,v=null)}catch(e){throw w.postMessage(null),e}}else b=!1},n=function(e){v=e,b||(b=!0,w.postMessage(null))},s=function(e,n){y=h((function(){e(t.unstable_now())}),n)},i=function(){m(y),y=-1}}function k(e,t){var n=e.length;e.push(t);e:for(;;){var s=n-1>>>1,i=e[s];if(!(void 0!==i&&0<C(i,t)))break e;e[s]=t,e[n]=i,n=s}}function j(e){return void 0===(e=e[0])?null:e}function T(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var s=0,i=e.length;s<i;){var a=2*(s+1)-1,r=e[a],o=a+1,l=e[o];if(void 0!==r&&0>C(r,n))void 0!==l&&0>C(l,r)?(e[s]=l,e[o]=n,s=o):(e[s]=r,e[a]=n,s=a);else{if(!(void 0!==l&&0>C(l,n)))break e;e[s]=l,e[o]=n,s=o}}}return t}return null}function C(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var D=[],P=[],I=1,O=null,L=3,M=!1,A=!1,E=!1;function U(e){for(var t=j(P);null!==t;){if(null===t.callback)T(P);else{if(!(t.startTime<=e))break;T(P),t.sortIndex=t.expirationTime,k(D,t)}t=j(P)}}function R(e){if(E=!1,U(e),!A)if(null!==j(D))A=!0,n(N);else{var t=j(P);null!==t&&s(R,t.startTime-e)}}function N(e,n){A=!1,E&&(E=!1,i()),M=!0;var r=L;try{for(U(n),O=j(D);null!==O&&(!(O.expirationTime>n)||e&&!a());){var o=O.callback;if(null!==o){O.callback=null,L=O.priorityLevel;var l=o(O.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?O.callback=l:O===j(D)&&T(D),U(n)}else T(D);O=j(D)}if(null!==O)var c=!0;else{var u=j(P);null!==u&&s(R,u.startTime-n),c=!1}return c}finally{O=null,L=r,M=!1}}function F(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Y=r;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){A||M||(A=!0,n(N))},t.unstable_getCurrentPriorityLevel=function(){return L},t.unstable_getFirstCallbackNode=function(){return j(D)},t.unstable_next=function(e){switch(L){case 1:case 2:case 3:var t=3;break;default:t=L}var n=L;L=t;try{return e()}finally{L=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=Y,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=L;L=e;try{return t()}finally{L=n}},t.unstable_scheduleCallback=function(e,a,r){var o=t.unstable_now();if("object"==typeof r&&null!==r){var l=r.delay;l="number"==typeof l&&0<l?o+l:o,r="number"==typeof r.timeout?r.timeout:F(e)}else r=F(e),l=o;return e={id:I++,callback:a,priorityLevel:e,startTime:l,expirationTime:r=l+r,sortIndex:-1},l>o?(e.sortIndex=l,k(P,e),null===j(D)&&e===j(P)&&(E?i():E=!0,s(R,l-o))):(e.sortIndex=r,k(D,e),A||M||(A=!0,n(N))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();U(e);var n=j(D);return n!==O&&null!==O&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<O.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=L;return function(){var n=L;L=t;try{return e.apply(this,arguments)}finally{L=n}}}},63840:(e,t,n)=>{"use strict";e.exports=n(60053)},37478:(e,t,n)=>{"use strict";var s=n(40210),i=n(21924),a=n(70631),r=s("%TypeError%"),o=s("%WeakMap%",!0),l=s("%Map%",!0),c=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),d=i("WeakMap.prototype.has",!0),p=i("Map.prototype.get",!0),h=i("Map.prototype.set",!0),m=i("Map.prototype.has",!0),f=function(e,t){for(var n,s=e;null!==(n=s.next);s=n)if(n.key===t)return s.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,s={assert:function(e){if(!s.has(e))throw new r("Side channel does not contain "+a(e))},get:function(s){if(o&&s&&("object"==typeof s||"function"==typeof s)){if(e)return c(e,s)}else if(l){if(t)return p(t,s)}else if(n)return function(e,t){var n=f(e,t);return n&&n.value}(n,s)},has:function(s){if(o&&s&&("object"==typeof s||"function"==typeof s)){if(e)return d(e,s)}else if(l){if(t)return m(t,s)}else if(n)return function(e,t){return!!f(e,t)}(n,s);return!1},set:function(s,i){o&&s&&("object"==typeof s||"function"==typeof s)?(e||(e=new o),u(e,s,i)):l?(t||(t=new l),h(t,s,i)):(n||(n={key:{},next:null}),function(e,t,n){var s=f(e,t);s?s.value=n:e.next={key:t,next:e.next,value:n}}(n,s,i))}};return s}},71427:e=>{e.exports=function(){"use strict";return function(e){var t="/*|*/";function n(t){if(t)try{e(t+"}")}catch(e){}}return function(s,i,a,r,o,l,c,u,d,p){switch(s){case 1:if(0===d&&64===i.charCodeAt(0))return e(i+";"),"";break;case 2:if(0===u)return i+t;break;case 3:switch(u){case 102:case 112:return e(a[0]+i),"";default:return i+(0===p?t:"")}case-2:i.split("/*|*/}").forEach(n)}}}}()},11440:function(e,t){var n,s;s=this,void 0===(n=function(){return s.svg4everybody=function(){function e(e,t,n){if(n){var s=document.createDocumentFragment(),i=!t.hasAttribute("viewBox")&&n.getAttribute("viewBox");i&&t.setAttribute("viewBox",i);for(var a=n.cloneNode(!0);a.childNodes.length;)s.appendChild(a.firstChild);e.appendChild(s)}}function t(t){t.onreadystatechange=function(){if(4===t.readyState){var n=t._cachedDocument;n||((n=t._cachedDocument=document.implementation.createHTMLDocument("")).body.innerHTML=t.responseText,t._cachedTarget={}),t._embeds.splice(0).map((function(s){var i=t._cachedTarget[s.id];i||(i=t._cachedTarget[s.id]=n.getElementById(s.id)),e(s.parent,s.svg,i)}))}},t.onreadystatechange()}function n(e){for(var t=e;"svg"!==t.nodeName.toLowerCase()&&(t=t.parentNode););return t}return function(s){var i,a=Object(s),r=window.top!==window.self;i="polyfill"in a?a.polyfill:/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/.test(navigator.userAgent)||(navigator.userAgent.match(/\bEdge\/12\.(\d+)\b/)||[])[1]<10547||(navigator.userAgent.match(/\bAppleWebKit\/(\d+)\b/)||[])[1]<537||/\bEdge\/.(\d+)\b/.test(navigator.userAgent)&&r;var o={},l=window.requestAnimationFrame||setTimeout,c=document.getElementsByTagName("use"),u=0;i&&function s(){for(var r=0;r<c.length;){var d=c[r],p=d.parentNode,h=n(p),m=d.getAttribute("xlink:href")||d.getAttribute("href");if(!m&&a.attributeName&&(m=d.getAttribute(a.attributeName)),h&&m){if(i)if(!a.validate||a.validate(m,h,d)){p.removeChild(d);var f=m.split("#"),g=f.shift(),b=f.join("#");if(g.length){var v=o[g];v||((v=o[g]=new XMLHttpRequest).open("GET",g),v.send(),v._embeds=[]),v._embeds.push({parent:p,svg:h,id:b}),t(v)}else e(p,h,document.getElementById(b))}else++r,++u}else++r}(!c.length||c.length-u>0)&&l(s,67)}()}}()}.apply(t,[]))||(e.exports=n)},11742:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],s=0;s<e.rangeCount;s++)n.push(e.getRangeAt(s));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},38087:(e,t)=>{"use strict";t.Q=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var s={},a=t||{},o=e.split(i),l=a.decode||n,c=0;c<o.length;c++){var u=o[c],d=u.indexOf("=");if(!(d<0)){var p=u.substr(0,d).trim(),h=u.substr(++d,u.length).trim();'"'==h[0]&&(h=h.slice(1,-1)),null==s[p]&&(s[p]=r(h,l))}}return s},t.q=function(e,t,n){var i=n||{},r=i.encode||s;if("function"!=typeof r)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var o=r(t);if(o&&!a.test(o))throw new TypeError("argument val is invalid");var l=e+"="+o;if(null!=i.maxAge){var c=i.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(c)}if(i.domain){if(!a.test(i.domain))throw new TypeError("option domain is invalid");l+="; Domain="+i.domain}if(i.path){if(!a.test(i.path))throw new TypeError("option path is invalid");l+="; Path="+i.path}if(i.expires){if("function"!=typeof i.expires.toUTCString)throw new TypeError("option expires is invalid");l+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(l+="; HttpOnly"),i.secure&&(l+="; Secure"),i.sameSite)switch("string"==typeof i.sameSite?i.sameSite.toLowerCase():i.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return l};var n=decodeURIComponent,s=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function r(e,t){try{return t(e)}catch(t){return e}}},2251:function(e,t,n){var s,i;!function(a,r){"use strict";e.exports?e.exports=r():void 0===(i="function"==typeof(s=r)?s.call(t,n,t,e):s)||(e.exports=i)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,n,s=e.toLowerCase().split(":"),i=s.length,a=8;for(""===s[0]&&""===s[1]&&""===s[2]?(s.shift(),s.shift()):""===s[0]&&""===s[1]?s.shift():""===s[i-1]&&""===s[i-2]&&s.pop(),-1!==s[(i=s.length)-1].indexOf(".")&&(a=7),t=0;t<i&&""!==s[t];t++);if(t<a)for(s.splice(t,1,"0000");s.length<a;)s.splice(t,0,"0000");for(var r=0;r<a;r++){n=s[r].split("");for(var o=0;o<3&&"0"===n[0]&&n.length>1;o++)n.splice(0,1);s[r]=n.join("")}var l=-1,c=0,u=0,d=-1,p=!1;for(r=0;r<a;r++)p?"0"===s[r]?u+=1:(p=!1,u>c&&(l=d,c=u)):"0"===s[r]&&(p=!0,d=r,u=1);u>c&&(l=d,c=u),c>1&&s.splice(l,c,""),i=s.length;var h="";for(""===s[0]&&(h=":"),r=0;r<i&&(h+=s[r],r!==i-1);r++)h+=":";return""===s[i-1]&&(h+=":"),h},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}))},76106:function(e,t,n){var s,i;!function(a,r){"use strict";e.exports?e.exports=r():void 0===(i="function"==typeof(s=r)?s.call(t,n,t,e):s)||(e.exports=i)}(0,(function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var s=e.lastIndexOf(".",t-1);if(s<=0||s>=t-1)return!1;var i=n.list[e.slice(t+1)];return!!i&&i.indexOf(" "+e.slice(s+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var s=n.list[e.slice(t+1)];return!!s&&s.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var s=e.lastIndexOf(".",t-1);if(s<=0||s>=t-1)return null;var i=n.list[e.slice(t+1)];return i?i.indexOf(" "+e.slice(s+1,t)+" ")<0?null:e.slice(s+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n}))},54998:function(e,t,n){var s,i,a;!function(r,o){"use strict";e.exports?e.exports=o(n(33132),n(2251),n(76106)):(i=[n(33132),n(2251),n(76106)],void 0===(a="function"==typeof(s=o)?s.apply(t,i):s)||(e.exports=a))}(0,(function(e,t,n,s){"use strict";var i=s&&s.URI;function a(e,t){var n=arguments.length>=1,s=arguments.length>=2;if(!(this instanceof a))return n?s?new a(e,t):new a(e):new a;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}a.version="1.19.11";var r=a.prototype,o=Object.prototype.hasOwnProperty;function l(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===c(e)}function d(e,t){var n,s,i={};if("RegExp"===c(t))i=null;else if(u(t))for(n=0,s=t.length;n<s;n++)i[t[n]]=!0;else i[t]=!0;for(n=0,s=e.length;n<s;n++)(i&&void 0!==i[e[n]]||!i&&t.test(e[n]))&&(e.splice(n,1),s--,n--);return e}function p(e,t){var n,s;if(u(t)){for(n=0,s=t.length;n<s;n++)if(!p(e,t[n]))return!1;return!0}var i=c(t);for(n=0,s=e.length;n<s;n++)if("RegExp"===i){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function h(e,t){if(!u(e)||!u(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var n=0,s=e.length;n<s;n++)if(e[n]!==t[n])return!1;return!0}function m(e){return e.replace(/^\/+|\/+$/g,"")}function f(e){return escape(e)}function g(e){return encodeURIComponent(e).replace(/[!'()*]/g,f).replace(/\*/g,"%2A")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,a.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},a.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return a.domAttributes[t]}},a.encode=g,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=g,a.decode=decodeURIComponent},a.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},a.encodeQuery=function(e,t){var n=a.encode(e+"");return void 0===t&&(t=a.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},a.decodeQuery=function(e,t){e+="",void 0===t&&(t=a.escapeQuerySpace);try{return a.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var b,v={encode:"encode",decode:"decode"},y=function(e,t){return function(n){try{return a[t](n+"").replace(a.characters[e][t].expression,(function(n){return a.characters[e][t].map[n]}))}catch(e){return n}}};for(b in v)a[b+"PathSegment"]=y("pathname",v[b]),a[b+"UrnPathSegment"]=y("urnpath",v[b]);var _=function(e,t,n){return function(s){var i;i=n?function(e){return a[t](a[n](e))}:a[t];for(var r=(s+"").split(e),o=0,l=r.length;o<l;o++)r[o]=i(r[o]);return r.join(e)}};function x(e){return function(t,n){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!n),this)}}function S(e,t){return function(n,s){return void 0===n?this._parts[e]||"":(null!==n&&(n+="").charAt(0)===t&&(n=n.substring(1)),this._parts[e]=n,this.build(!s),this)}}a.decodePath=_("/","decodePathSegment"),a.decodeUrnPath=_(":","decodeUrnPathSegment"),a.recodePath=_("/","encodePathSegment","decode"),a.recodeUrnPath=_(":","encodeUrnPathSegment","decode"),a.encodeReserved=y("reserved","encode"),a.parse=function(e,t){var n;return t||(t={preventInvalidHostname:a.preventInvalidHostname}),(n=(e=(e=e.replace(a.leading_whitespace_expression,"")).replace(a.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),(n=e.indexOf("?"))>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=a.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(a.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3).replace(/\\/g,"/")?(e=e.substring(n+3),e=a.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},a.parseHost=function(e,t){e||(e="");var n,s,i=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,i)||null,"/"===t.port&&(t.port=null);else{var r=e.indexOf(":"),o=e.indexOf("/"),l=e.indexOf(":",r+1);-1!==l&&(-1===o||l<o)?(t.hostname=e.substring(0,i)||null,t.port=null):(s=e.substring(0,i).split(":"),t.hostname=s[0]||null,t.port=s[1]||null)}return t.hostname&&"/"!==e.substring(i).charAt(0)&&(i++,e="/"+e),t.preventInvalidHostname&&a.ensureValidHostname(t.hostname,t.protocol),t.port&&a.ensureValidPort(t.port),e.substring(i)||"/"},a.parseAuthority=function(e,t){return e=a.parseUserinfo(e,t),a.parseHost(e,t)},a.parseUserinfo=function(e,t){var n=e;-1!==e.indexOf("\\")&&(e=e.replace(/\\/g,"/"));var s,i=e.indexOf("/"),r=e.lastIndexOf("@",i>-1?i:e.length-1);return r>-1&&(-1===i||r<i)?(s=e.substring(0,r).split(":"),t.username=s[0]?a.decode(s[0]):null,s.shift(),t.password=s[0]?a.decode(s.join(":")):null,e=n.substring(r+1)):(t.username=null,t.password=null),e},a.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var n,s,i,r={},l=e.split("&"),c=l.length,u=0;u<c;u++)n=l[u].split("="),s=a.decodeQuery(n.shift(),t),i=n.length?a.decodeQuery(n.join("="),t):null,"__proto__"!==s&&(o.call(r,s)?("string"!=typeof r[s]&&null!==r[s]||(r[s]=[r[s]]),r[s].push(i)):r[s]=i);return r},a.build=function(e){var t="",n=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",n=!0),t+=a.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&n&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},a.buildHost=function(e){var t="";return e.hostname?(a.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},a.buildAuthority=function(e){return a.buildUserinfo(e)+a.buildHost(e)},a.buildUserinfo=function(e){var t="";return e.username&&(t+=a.encode(e.username)),e.password&&(t+=":"+a.encode(e.password)),t&&(t+="@"),t},a.buildQuery=function(e,t,n){var s,i,r,l,c="";for(i in e)if("__proto__"!==i&&o.call(e,i))if(u(e[i]))for(s={},r=0,l=e[i].length;r<l;r++)void 0!==e[i][r]&&void 0===s[e[i][r]+""]&&(c+="&"+a.buildQueryParameter(i,e[i][r],n),!0!==t&&(s[e[i][r]+""]=!0));else void 0!==e[i]&&(c+="&"+a.buildQueryParameter(i,e[i],n));return c.substring(1)},a.buildQueryParameter=function(e,t,n){return a.encodeQuery(e,n)+(null!==t?"="+a.encodeQuery(t,n):"")},a.addQuery=function(e,t,n){if("object"==typeof t)for(var s in t)o.call(t,s)&&a.addQuery(e,s,t[s]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=n);"string"==typeof e[t]&&(e[t]=[e[t]]),u(n)||(n=[n]),e[t]=(e[t]||[]).concat(n)}},a.setQuery=function(e,t,n){if("object"==typeof t)for(var s in t)o.call(t,s)&&a.setQuery(e,s,t[s]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===n?null:n}},a.removeQuery=function(e,t,n){var s,i,r;if(u(t))for(s=0,i=t.length;s<i;s++)e[t[s]]=void 0;else if("RegExp"===c(t))for(r in e)t.test(r)&&(e[r]=void 0);else if("object"==typeof t)for(r in t)o.call(t,r)&&a.removeQuery(e,r,t[r]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===c(n)?!u(e[t])&&n.test(e[t])?e[t]=void 0:e[t]=d(e[t],n):e[t]!==String(n)||u(n)&&1!==n.length?u(e[t])&&(e[t]=d(e[t],n)):e[t]=void 0:e[t]=void 0}},a.hasQuery=function(e,t,n,s){switch(c(t)){case"String":break;case"RegExp":for(var i in e)if(o.call(e,i)&&t.test(i)&&(void 0===n||a.hasQuery(e,i,n)))return!0;return!1;case"Object":for(var r in t)if(o.call(t,r)&&!a.hasQuery(e,r,t[r]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(n)){case"Undefined":return t in e;case"Boolean":return n===Boolean(u(e[t])?e[t].length:e[t]);case"Function":return!!n(e[t],t,e);case"Array":return!!u(e[t])&&(s?p:h)(e[t],n);case"RegExp":return u(e[t])?!!s&&p(e[t],n):Boolean(e[t]&&e[t].match(n));case"Number":n=String(n);case"String":return u(e[t])?!!s&&p(e[t],n):e[t]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var e=[],t=[],n=0,s=0;s<arguments.length;s++){var i=new a(arguments[s]);e.push(i);for(var r=i.segment(),o=0;o<r.length;o++)"string"==typeof r[o]&&t.push(r[o]),r[o]&&n++}if(!t.length||!n)return new a("");var l=new a("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||l.path("/"+l.path()),l.normalize()},a.commonPath=function(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n<s;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return n<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(n)&&"/"===t.charAt(n)||(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},a.withinString=function(e,t,n){n||(n={});var s=n.start||a.findUri.start,i=n.end||a.findUri.end,r=n.trim||a.findUri.trim,o=n.parens||a.findUri.parens,l=/[a-z0-9-]=["']?$/i;for(s.lastIndex=0;;){var c=s.exec(e);if(!c)break;var u=c.index;if(n.ignoreHtml){var d=e.slice(Math.max(u-3,0),u);if(d&&l.test(d))continue}for(var p=u+e.slice(u).search(i),h=e.slice(u,p),m=-1;;){var f=o.exec(h);if(!f)break;var g=f.index+f[0].length;m=Math.max(m,g)}if(!((h=m>-1?h.slice(0,m)+h.slice(m).replace(r,""):h.replace(r,"")).length<=c[0].length||n.ignore&&n.ignore.test(h))){var b=t(h,u,p=u+h.length,e);void 0!==b?(b=String(b),e=e.slice(0,u)+b+e.slice(p),s.lastIndex=u+b.length):s.lastIndex=p}}return s.lastIndex=0,e},a.ensureValidHostname=function(t,n){var s=!!t,i=!1;if(!!n&&(i=p(a.hostProtocols,n)),i&&!s)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(t&&t.match(a.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},a.noConflict=function(e){if(e){var t={URI:this.noConflict()};return s.URITemplate&&"function"==typeof s.URITemplate.noConflict&&(t.URITemplate=s.URITemplate.noConflict()),s.IPv6&&"function"==typeof s.IPv6.noConflict&&(t.IPv6=s.IPv6.noConflict()),s.SecondLevelDomains&&"function"==typeof s.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=s.SecondLevelDomains.noConflict()),t}return s.URI===this&&(s.URI=i),this},r.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},r.clone=function(){return new a(this)},r.valueOf=r.toString=function(){return this.build(!1)._string},r.protocol=x("protocol"),r.username=x("username"),r.password=x("password"),r.hostname=x("hostname"),r.port=x("port"),r.query=S("query","?"),r.fragment=S("fragment","#"),r.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},r.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},r.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?a.decodeUrnPath:a.decodePath)(n):n}return this._parts.urn?this._parts.path=e?a.recodeUrnPath(e):"":this._parts.path=e?a.recodePath(e):"/",this.build(!t),this},r.path=r.pathname,r.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=a._parts();var s=e instanceof a,i="object"==typeof e&&(e.hostname||e.path||e.pathname);if(e.nodeName&&(e=e[a.getDomAttribute(e)]||"",i=!1),!s&&i&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=a.parse(String(e),this._parts);else{if(!s&&!i)throw new TypeError("invalid input");var r=s?e._parts:e;for(n in r)"query"!==n&&o.call(this._parts,n)&&(this._parts[n]=r[n]);r.query&&this.query(r.query,!1)}return this.build(!t),this},r.is=function(e){var t=!1,s=!1,i=!1,r=!1,o=!1,l=!1,c=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,s=a.ip4_expression.test(this._parts.hostname),i=a.ip6_expression.test(this._parts.hostname),o=(r=!(t=s||i))&&n&&n.has(this._parts.hostname),l=r&&a.idn_expression.test(this._parts.hostname),c=r&&a.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return r;case"sld":return o;case"ip":return t;case"ip4":case"ipv4":case"inet4":return s;case"ip6":case"ipv6":case"inet6":return i;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var w=r.protocol,k=r.port,j=r.hostname;r.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(a.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return w.call(this,e,t)},r.scheme=r.protocol,r.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),a.ensureValidPort(e))),k.call(this,e,t))},r.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==a.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(e,this._parts.protocol)}return j.call(this,e,t)},r.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var s=a(e);return this.protocol(s.protocol()).authority(s.authority()).build(!t),this},r.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildHost(this._parts):"";if("/"!==a.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},r.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?a.buildAuthority(this._parts):"";if("/"!==a.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},r.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=a.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),a.parseUserinfo(e,this._parts),this.build(!t),this},r.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=a.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},r.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var s=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,s),r=new RegExp("^"+l(i));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&a.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(r,e),this.build(!t),this},r.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var s=this._parts.hostname.length-this.tld(t).length-1;return s=this._parts.hostname.lastIndexOf(".",s-1)+1,this._parts.hostname.substring(s)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var i=new RegExp(l(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},r.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var s=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(s+1);return!0!==t&&n&&n.list[i.toLowerCase()]&&n.get(this._parts.hostname)||i}var a;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');a=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");a=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},r.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,s=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?a.decodePath(s):s}var i=this._parts.path.length-this.filename().length,r=this._parts.path.substring(0,i),o=new RegExp("^"+l(r));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=a.recodePath(e),this._parts.path=this._parts.path.replace(o,e),this.build(!t),this},r.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),s=this._parts.path.substring(n+1);return e?a.decodePathSegment(s):s}var i=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(i=!0);var r=new RegExp(l(this.filename())+"$");return e=a.recodePath(e),this._parts.path=this._parts.path.replace(r,e),i?this.normalizePath(t):this.build(!t),this},r.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n,s,i=this.filename(),r=i.lastIndexOf(".");return-1===r?"":(n=i.substring(r+1),s=/^[a-z0-9%]+$/i.test(n)?n:"",e?a.decodePathSegment(s):s)}"."===e.charAt(0)&&(e=e.substring(1));var o,c=this.suffix();if(c)o=e?new RegExp(l(c)+"$"):new RegExp(l("."+c)+"$");else{if(!e)return this;this._parts.path+="."+a.recodePath(e)}return o&&(e=a.recodePath(e),this._parts.path=this._parts.path.replace(o,e)),this.build(!t),this},r.segment=function(e,t,n){var s=this._parts.urn?":":"/",i=this.path(),a="/"===i.substring(0,1),r=i.split(s);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(a&&r.shift(),e<0&&(e=Math.max(r.length+e,0)),void 0===t)return void 0===e?r:r[e];if(null===e||void 0===r[e])if(u(t)){r=[];for(var o=0,l=t.length;o<l;o++)(t[o].length||r.length&&r[r.length-1].length)&&(r.length&&!r[r.length-1].length&&r.pop(),r.push(m(t[o])))}else(t||"string"==typeof t)&&(t=m(t),""===r[r.length-1]?r[r.length-1]=t:r.push(t));else t?r[e]=m(t):r.splice(e,1);return a&&r.unshift(""),this.path(r.join(s),n)},r.segmentCoded=function(e,t,n){var s,i,r;if("number"!=typeof e&&(n=t,t=e,e=void 0),void 0===t){if(u(s=this.segment(e,t,n)))for(i=0,r=s.length;i<r;i++)s[i]=a.decode(s[i]);else s=void 0!==s?a.decode(s):void 0;return s}if(u(t))for(i=0,r=t.length;i<r;i++)t[i]=a.encode(t[i]);else t="string"==typeof t||t instanceof String?a.encode(t):t;return this.segment(e,t,n)};var T=r.query;return r.query=function(e,t){if(!0===e)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var n=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),s=e.call(this,n);return this._parts.query=a.buildQuery(s||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=a.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):T.call(this,e,t)},r.setQuery=function(e,t,n){var s=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)s[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in e)o.call(e,i)&&(s[i]=e[i])}return this._parts.query=a.buildQuery(s,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},r.addQuery=function(e,t,n){var s=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(s,e,void 0===t?null:t),this._parts.query=a.buildQuery(s,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},r.removeQuery=function(e,t,n){var s=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(s,e,t),this._parts.query=a.buildQuery(s,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},r.hasQuery=function(e,t,n){var s=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(s,e,t,n)},r.setSearch=r.setQuery,r.addSearch=r.addQuery,r.removeSearch=r.removeQuery,r.hasSearch=r.hasQuery,r.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},r.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},r.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},r.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},r.normalizePath=function(e){var t,n=this._parts.path;if(!n)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var s,i,r="";for("/"!==(n=a.recodePath(n)).charAt(0)&&(t=!0,n="/"+n),"/.."!==n.slice(-3)&&"/."!==n.slice(-2)||(n+="/"),n=n.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(r=n.substring(1).match(/^(\.\.\/)+/)||"")&&(r=r[0]);-1!==(s=n.search(/\/\.\.(\/|$)/));)0!==s?(-1===(i=n.substring(0,s).lastIndexOf("/"))&&(i=s),n=n.substring(0,i)+n.substring(s+3)):n=n.substring(3);return t&&this.is("relative")&&(n=r+n.substring(1)),this._parts.path=n,this.build(!e),this},r.normalizePathname=r.normalizePath,r.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},r.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},r.normalizeSearch=r.normalizeQuery,r.normalizeHash=r.normalizeFragment,r.iso8859=function(){var e=a.encode,t=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=e,a.decode=t}return this},r.unicode=function(){var e=a.encode,t=a.decode;a.encode=g,a.decode=unescape;try{this.normalize()}finally{a.encode=e,a.decode=t}return this},r.readable=function(){var t=this.clone();t.username("").password("").normalize();var n="";if(t._parts.protocol&&(n+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(n+=e.toUnicode(t._parts.hostname),t._parts.port&&(n+=":"+t._parts.port)):n+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(n+="/"),n+=t.path(!0),t._parts.query){for(var s="",i=0,r=t._parts.query.split("&"),o=r.length;i<o;i++){var l=(r[i]||"").split("=");s+="&"+a.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==l[1]&&(s+="="+a.decodeQuery(l[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+s.substring(1)}return n+a.decodeQuery(t.hash(),!0)},r.absoluteTo=function(e){var t,n,s,i=this.clone(),r=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof a||(e=new a(e)),i._parts.protocol)return i;if(i._parts.protocol=e._parts.protocol,this._parts.hostname)return i;for(n=0;s=r[n];n++)i._parts[s]=e._parts[s];return i._parts.path?(".."===i._parts.path.substring(-2)&&(i._parts.path+="/"),"/"!==i.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),i._parts.path=(t?t+"/":"")+i._parts.path,i.normalizePath())):(i._parts.path=e._parts.path,i._parts.query||(i._parts.query=e._parts.query)),i.build(),i},r.relativeTo=function(e){var t,n,s,i,r,o=this.clone().normalize();if(o._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new a(e).normalize(),t=o._parts,n=e._parts,i=o.path(),r=e.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==r.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===n.protocol&&(t.protocol=null),t.username!==n.username||t.password!==n.password)return o.build();if(null!==t.protocol||null!==t.username||null!==t.password)return o.build();if(t.hostname!==n.hostname||t.port!==n.port)return o.build();if(t.hostname=null,t.port=null,i===r)return t.path="",o.build();if(!(s=a.commonPath(i,r)))return o.build();var l=n.path.substring(s.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=l+t.path.substring(s.length)||"./",o.build()},r.equals=function(e){var t,n,s,i,r,l=this.clone(),c=new a(e),d={};if(l.normalize(),c.normalize(),l.toString()===c.toString())return!0;if(s=l.query(),i=c.query(),l.query(""),c.query(""),l.toString()!==c.toString())return!1;if(s.length!==i.length)return!1;for(r in t=a.parseQuery(s,this._parts.escapeQuerySpace),n=a.parseQuery(i,this._parts.escapeQuerySpace),t)if(o.call(t,r)){if(u(t[r])){if(!h(t[r],n[r]))return!1}else if(t[r]!==n[r])return!1;d[r]=!0}for(r in n)if(o.call(n,r)&&!d[r])return!1;return!0},r.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},r.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},r.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},a}))},33132:function(e,t,n){var s;e=n.nmd(e),function(i){t&&t.nodeType,e&&e.nodeType;var a="object"==typeof n.g&&n.g;a.global!==a&&a.window!==a&&a.self;var r,o=2147483647,l=36,c=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,m=String.fromCharCode;function f(e){throw new RangeError(p[e])}function g(e,t){for(var n=e.length,s=[];n--;)s[n]=t(e[n]);return s}function b(e,t){var n=e.split("@"),s="";return n.length>1&&(s=n[0]+"@",e=n[1]),s+g((e=e.replace(d,".")).split("."),t).join(".")}function v(e){for(var t,n,s=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(n=e.charCodeAt(i++)))?s.push(((1023&t)<<10)+(1023&n)+65536):(s.push(t),i--):s.push(t);return s}function y(e){return g(e,(function(e){var t="";return e>65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+m(e)})).join("")}function _(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function x(e,t,n){var s=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;s+=l)e=h(e/35);return h(s+36*e/(e+38))}function S(e){var t,n,s,i,a,r,c,u,d,p,m,g=[],b=e.length,v=0,_=128,S=72;for((n=e.lastIndexOf("-"))<0&&(n=0),s=0;s<n;++s)e.charCodeAt(s)>=128&&f("not-basic"),g.push(e.charCodeAt(s));for(i=n>0?n+1:0;i<b;){for(a=v,r=1,c=l;i>=b&&f("invalid-input"),((u=(m=e.charCodeAt(i++))-48<10?m-22:m-65<26?m-65:m-97<26?m-97:l)>=l||u>h((o-v)/r))&&f("overflow"),v+=u*r,!(u<(d=c<=S?1:c>=S+26?26:c-S));c+=l)r>h(o/(p=l-d))&&f("overflow"),r*=p;S=x(v-a,t=g.length+1,0==a),h(v/t)>o-_&&f("overflow"),_+=h(v/t),v%=t,g.splice(v++,0,_)}return y(g)}function w(e){var t,n,s,i,a,r,c,u,d,p,g,b,y,S,w,k=[];for(b=(e=v(e)).length,t=128,n=0,a=72,r=0;r<b;++r)(g=e[r])<128&&k.push(m(g));for(s=i=k.length,i&&k.push("-");s<b;){for(c=o,r=0;r<b;++r)(g=e[r])>=t&&g<c&&(c=g);for(c-t>h((o-n)/(y=s+1))&&f("overflow"),n+=(c-t)*y,t=c,r=0;r<b;++r)if((g=e[r])<t&&++n>o&&f("overflow"),g==t){for(u=n,d=l;!(u<(p=d<=a?1:d>=a+26?26:d-a));d+=l)w=u-p,S=l-p,k.push(m(_(p+w%S,0))),u=h(w/S);k.push(m(_(u,0))),a=x(n,y,s==i),n=0,++s}++n,++t}return k.join("")}r={version:"1.3.2",ucs2:{decode:v,encode:y},decode:S,encode:w,toASCII:function(e){return b(e,(function(e){return u.test(e)?"xn--"+w(e):e}))},toUnicode:function(e){return b(e,(function(e){return c.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(s=function(){return r}.call(t,n,t,e))||(e.exports=s)}()},42473:e=>{"use strict";e.exports=function(){}},24654:()=>{},75347:()=>{},36648:()=>{},31777:()=>{},34017:()=>{},59905:()=>{},64604:()=>{},68610:e=>{e.exports={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let n="",s=t;for(;s--;)n+=e[Math.random()*e.length|0];return n}}},4942:(e,t,n)=>{"use strict";function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>s})},87462:(e,t,n)=>{"use strict";function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},s.apply(this,arguments)}n.d(t,{Z:()=>s})},51721:(e,t,n)=>{"use strict";function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)}n.d(t,{Z:()=>i})},1413:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var s=n(4942);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,s.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},63366:(e,t,n)=>{"use strict";function s(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,{Z:()=>s})},33600:e=>{"use strict";e.exports=JSON.parse('{"0":65533,"128":8364,"130":8218,"131":402,"132":8222,"133":8230,"134":8224,"135":8225,"136":710,"137":8240,"138":352,"139":8249,"140":338,"142":381,"145":8216,"146":8217,"147":8220,"148":8221,"149":8226,"150":8211,"151":8212,"152":732,"153":8482,"154":353,"155":8250,"156":339,"158":382,"159":376}')},59323:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Abreve":"Ă","abreve":"ă","ac":"∾","acd":"∿","acE":"∾̳","Acirc":"Â","acirc":"â","acute":"´","Acy":"А","acy":"а","AElig":"Æ","aelig":"æ","af":"","Afr":"𝔄","afr":"𝔞","Agrave":"À","agrave":"à","alefsym":"ℵ","aleph":"ℵ","Alpha":"Α","alpha":"α","Amacr":"Ā","amacr":"ā","amalg":"⨿","amp":"&","AMP":"&","andand":"⩕","And":"⩓","and":"∧","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angmsd":"∡","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","Aogon":"Ą","aogon":"ą","Aopf":"𝔸","aopf":"𝕒","apacir":"⩯","ap":"≈","apE":"⩰","ape":"≊","apid":"≋","apos":"\'","ApplyFunction":"","approx":"≈","approxeq":"≊","Aring":"Å","aring":"å","Ascr":"𝒜","ascr":"𝒶","Assign":"≔","ast":"*","asymp":"≈","asympeq":"≍","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","awconint":"∳","awint":"⨑","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","Backslash":"∖","Barv":"⫧","barvee":"⊽","barwed":"⌅","Barwed":"⌆","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","Bcy":"Б","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","Because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","Bernoullis":"ℬ","Beta":"Β","beta":"β","beth":"ℶ","between":"≬","Bfr":"𝔅","bfr":"𝔟","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bNot":"⫭","bnot":"⌐","Bopf":"𝔹","bopf":"𝕓","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxbox":"⧉","boxdl":"┐","boxdL":"╕","boxDl":"╖","boxDL":"╗","boxdr":"┌","boxdR":"╒","boxDr":"╓","boxDR":"╔","boxh":"─","boxH":"═","boxhd":"┬","boxHd":"╤","boxhD":"╥","boxHD":"╦","boxhu":"┴","boxHu":"╧","boxhU":"╨","boxHU":"╩","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxul":"┘","boxuL":"╛","boxUl":"╜","boxUL":"╝","boxur":"└","boxuR":"╘","boxUr":"╙","boxUR":"╚","boxv":"│","boxV":"║","boxvh":"┼","boxvH":"╪","boxVh":"╫","boxVH":"╬","boxvl":"┤","boxvL":"╡","boxVl":"╢","boxVL":"╣","boxvr":"├","boxvR":"╞","boxVr":"╟","boxVR":"╠","bprime":"‵","breve":"˘","Breve":"˘","brvbar":"¦","bscr":"𝒷","Bscr":"ℬ","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsolb":"⧅","bsol":"\\\\","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","Bumpeq":"≎","bumpeq":"≏","Cacute":"Ć","cacute":"ć","capand":"⩄","capbrcup":"⩉","capcap":"⩋","cap":"∩","Cap":"⋒","capcup":"⩇","capdot":"⩀","CapitalDifferentialD":"ⅅ","caps":"∩︀","caret":"⁁","caron":"ˇ","Cayleys":"ℭ","ccaps":"⩍","Ccaron":"Č","ccaron":"č","Ccedil":"Ç","ccedil":"ç","Ccirc":"Ĉ","ccirc":"ĉ","Cconint":"∰","ccups":"⩌","ccupssm":"⩐","Cdot":"Ċ","cdot":"ċ","cedil":"¸","Cedilla":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","CenterDot":"·","cfr":"𝔠","Cfr":"ℭ","CHcy":"Ч","chcy":"ч","check":"✓","checkmark":"✓","Chi":"Χ","chi":"χ","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","CircleDot":"⊙","circledR":"®","circledS":"Ⓢ","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","cir":"○","cirE":"⧃","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","clubs":"♣","clubsuit":"♣","colon":":","Colon":"∷","Colone":"⩴","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","Congruent":"≡","conint":"∮","Conint":"∯","ContourIntegral":"∮","copf":"𝕔","Copf":"ℂ","coprod":"∐","Coproduct":"∐","copy":"©","COPY":"©","copysr":"℗","CounterClockwiseContourIntegral":"∳","crarr":"↵","cross":"✗","Cross":"⨯","Cscr":"𝒞","cscr":"𝒸","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cupbrcap":"⩈","cupcap":"⩆","CupCap":"≍","cup":"∪","Cup":"⋓","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dagger":"†","Dagger":"‡","daleth":"ℸ","darr":"↓","Darr":"↡","dArr":"⇓","dash":"‐","Dashv":"⫤","dashv":"⊣","dbkarow":"⤏","dblac":"˝","Dcaron":"Ď","dcaron":"ď","Dcy":"Д","dcy":"д","ddagger":"‡","ddarr":"⇊","DD":"ⅅ","dd":"ⅆ","DDotrahd":"⤑","ddotseq":"⩷","deg":"°","Del":"∇","Delta":"Δ","delta":"δ","demptyv":"⦱","dfisht":"⥿","Dfr":"𝔇","dfr":"𝔡","dHar":"⥥","dharl":"⇃","dharr":"⇂","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","diam":"⋄","diamond":"⋄","Diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","DifferentialD":"ⅆ","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","DJcy":"Ђ","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","Dopf":"𝔻","dopf":"𝕕","Dot":"¨","dot":"˙","DotDot":"⃜","doteq":"≐","doteqdot":"≑","DotEqual":"≐","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrowBar":"⤓","downarrow":"↓","DownArrow":"↓","Downarrow":"⇓","DownArrowUpArrow":"⇵","DownBreve":"̑","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVectorBar":"⥖","DownLeftVector":"↽","DownRightTeeVector":"⥟","DownRightVectorBar":"⥗","DownRightVector":"⇁","DownTeeArrow":"↧","DownTee":"⊤","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","Dscr":"𝒟","dscr":"𝒹","DScy":"Ѕ","dscy":"ѕ","dsol":"⧶","Dstrok":"Đ","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","DZcy":"Џ","dzcy":"џ","dzigrarr":"⟿","Eacute":"É","eacute":"é","easter":"⩮","Ecaron":"Ě","ecaron":"ě","Ecirc":"Ê","ecirc":"ê","ecir":"≖","ecolon":"≕","Ecy":"Э","ecy":"э","eDDot":"⩷","Edot":"Ė","edot":"ė","eDot":"≑","ee":"ⅇ","efDot":"≒","Efr":"𝔈","efr":"𝔢","eg":"⪚","Egrave":"È","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","Element":"∈","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","Emacr":"Ē","emacr":"ē","empty":"∅","emptyset":"∅","EmptySmallSquare":"◻","emptyv":"∅","EmptyVerySmallSquare":"▫","emsp13":" ","emsp14":" ","emsp":" ","ENG":"Ŋ","eng":"ŋ","ensp":" ","Eogon":"Ę","eogon":"ę","Eopf":"𝔼","eopf":"𝕖","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","Epsilon":"Ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","Equal":"⩵","equals":"=","EqualTilde":"≂","equest":"≟","Equilibrium":"⇌","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erarr":"⥱","erDot":"≓","escr":"ℯ","Escr":"ℰ","esdot":"≐","Esim":"⩳","esim":"≂","Eta":"Η","eta":"η","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","euro":"€","excl":"!","exist":"∃","Exists":"∃","expectation":"ℰ","exponentiale":"ⅇ","ExponentialE":"ⅇ","fallingdotseq":"≒","Fcy":"Ф","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","Ffr":"𝔉","ffr":"𝔣","filig":"fi","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","Fopf":"𝔽","fopf":"𝕗","forall":"∀","ForAll":"∀","fork":"⋔","forkv":"⫙","Fouriertrf":"ℱ","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"𝒻","Fscr":"ℱ","gacute":"ǵ","Gamma":"Γ","gamma":"γ","Gammad":"Ϝ","gammad":"ϝ","gap":"⪆","Gbreve":"Ğ","gbreve":"ğ","Gcedil":"Ģ","Gcirc":"Ĝ","gcirc":"ĝ","Gcy":"Г","gcy":"г","Gdot":"Ġ","gdot":"ġ","ge":"≥","gE":"≧","gEl":"⪌","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","gescc":"⪩","ges":"⩾","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","Gfr":"𝔊","gfr":"𝔤","gg":"≫","Gg":"⋙","ggg":"⋙","gimel":"ℷ","GJcy":"Ѓ","gjcy":"ѓ","gla":"⪥","gl":"≷","glE":"⪒","glj":"⪤","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gnE":"≩","gneq":"⪈","gneqq":"≩","gnsim":"⋧","Gopf":"𝔾","gopf":"𝕘","grave":"`","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"𝒢","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gtcc":"⪧","gtcir":"⩺","gt":">","GT":">","Gt":"≫","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","Hacek":"ˇ","hairsp":" ","half":"½","hamilt":"ℋ","HARDcy":"Ъ","hardcy":"ъ","harrcir":"⥈","harr":"↔","hArr":"⇔","harrw":"↭","Hat":"^","hbar":"ℏ","Hcirc":"Ĥ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"𝔥","Hfr":"ℌ","HilbertSpace":"ℋ","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"𝕙","Hopf":"ℍ","horbar":"―","HorizontalLine":"─","hscr":"𝒽","Hscr":"ℋ","hslash":"ℏ","Hstrok":"Ħ","hstrok":"ħ","HumpDownHump":"≎","HumpEqual":"≏","hybull":"⁃","hyphen":"‐","Iacute":"Í","iacute":"í","ic":"","Icirc":"Î","icirc":"î","Icy":"И","icy":"и","Idot":"İ","IEcy":"Е","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"𝔦","Ifr":"ℑ","Igrave":"Ì","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","IJlig":"IJ","ijlig":"ij","Imacr":"Ī","imacr":"ī","image":"ℑ","ImaginaryI":"ⅈ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","Im":"ℑ","imof":"⊷","imped":"Ƶ","Implies":"⇒","incare":"℅","in":"∈","infin":"∞","infintie":"⧝","inodot":"ı","intcal":"⊺","int":"∫","Int":"∬","integers":"ℤ","Integral":"∫","intercal":"⊺","Intersection":"⋂","intlarhk":"⨗","intprod":"⨼","InvisibleComma":"","InvisibleTimes":"","IOcy":"Ё","iocy":"ё","Iogon":"Į","iogon":"į","Iopf":"𝕀","iopf":"𝕚","Iota":"Ι","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"𝒾","Iscr":"ℐ","isin":"∈","isindot":"⋵","isinE":"⋹","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"","Itilde":"Ĩ","itilde":"ĩ","Iukcy":"І","iukcy":"і","Iuml":"Ï","iuml":"ï","Jcirc":"Ĵ","jcirc":"ĵ","Jcy":"Й","jcy":"й","Jfr":"𝔍","jfr":"𝔧","jmath":"ȷ","Jopf":"𝕁","jopf":"𝕛","Jscr":"𝒥","jscr":"𝒿","Jsercy":"Ј","jsercy":"ј","Jukcy":"Є","jukcy":"є","Kappa":"Κ","kappa":"κ","kappav":"ϰ","Kcedil":"Ķ","kcedil":"ķ","Kcy":"К","kcy":"к","Kfr":"𝔎","kfr":"𝔨","kgreen":"ĸ","KHcy":"Х","khcy":"х","KJcy":"Ќ","kjcy":"ќ","Kopf":"𝕂","kopf":"𝕜","Kscr":"𝒦","kscr":"𝓀","lAarr":"⇚","Lacute":"Ĺ","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","Lambda":"Λ","lambda":"λ","lang":"⟨","Lang":"⟪","langd":"⦑","langle":"⟨","lap":"⪅","Laplacetrf":"ℒ","laquo":"«","larrb":"⇤","larrbfs":"⤟","larr":"←","Larr":"↞","lArr":"⇐","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","latail":"⤙","lAtail":"⤛","lat":"⪫","late":"⪭","lates":"⪭︀","lbarr":"⤌","lBarr":"⤎","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","Lcaron":"Ľ","lcaron":"ľ","Lcedil":"Ļ","lcedil":"ļ","lceil":"⌈","lcub":"{","Lcy":"Л","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","lE":"≦","LeftAngleBracket":"⟨","LeftArrowBar":"⇤","leftarrow":"←","LeftArrow":"←","Leftarrow":"⇐","LeftArrowRightArrow":"⇆","leftarrowtail":"↢","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVectorBar":"⥙","LeftDownVector":"⇃","LeftFloor":"⌊","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","LeftRightArrow":"↔","Leftrightarrow":"⇔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","LeftRightVector":"⥎","LeftTeeArrow":"↤","LeftTee":"⊣","LeftTeeVector":"⥚","leftthreetimes":"⋋","LeftTriangleBar":"⧏","LeftTriangle":"⊲","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVectorBar":"⥘","LeftUpVector":"↿","LeftVectorBar":"⥒","LeftVector":"↼","lEg":"⪋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","lescc":"⪨","les":"⩽","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","lessgtr":"≶","LessLess":"⪡","lesssim":"≲","LessSlantEqual":"⩽","LessTilde":"≲","lfisht":"⥼","lfloor":"⌊","Lfr":"𝔏","lfr":"𝔩","lg":"≶","lgE":"⪑","lHar":"⥢","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","LJcy":"Љ","ljcy":"љ","llarr":"⇇","ll":"≪","Ll":"⋘","llcorner":"⌞","Lleftarrow":"⇚","llhard":"⥫","lltri":"◺","Lmidot":"Ŀ","lmidot":"ŀ","lmoustache":"⎰","lmoust":"⎰","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lnE":"≨","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","LongLeftArrow":"⟵","Longleftarrow":"⟸","longleftrightarrow":"⟷","LongLeftRightArrow":"⟷","Longleftrightarrow":"⟺","longmapsto":"⟼","longrightarrow":"⟶","LongRightArrow":"⟶","Longrightarrow":"⟹","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","Lopf":"𝕃","lopf":"𝕝","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","LowerLeftArrow":"↙","LowerRightArrow":"↘","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"","lrtri":"⊿","lsaquo":"‹","lscr":"𝓁","Lscr":"ℒ","lsh":"↰","Lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","Lstrok":"Ł","lstrok":"ł","ltcc":"⪦","ltcir":"⩹","lt":"<","LT":"<","Lt":"≪","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltri":"◃","ltrie":"⊴","ltrif":"◂","ltrPar":"⦖","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","macr":"¯","male":"♂","malt":"✠","maltese":"✠","Map":"⤅","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","Mcy":"М","mcy":"м","mdash":"—","mDDot":"∺","measuredangle":"∡","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"𝔐","mfr":"𝔪","mho":"℧","micro":"µ","midast":"*","midcir":"⫰","mid":"∣","middot":"·","minusb":"⊟","minus":"−","minusd":"∸","minusdu":"⨪","MinusPlus":"∓","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","Mopf":"𝕄","mopf":"𝕞","mp":"∓","mscr":"𝓂","Mscr":"ℳ","mstpos":"∾","Mu":"Μ","mu":"μ","multimap":"⊸","mumap":"⊸","nabla":"∇","Nacute":"Ń","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natural":"♮","naturals":"ℕ","natur":"♮","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","Ncaron":"Ň","ncaron":"ň","Ncedil":"Ņ","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","Ncy":"Н","ncy":"н","ndash":"–","nearhk":"⤤","nearr":"↗","neArr":"⇗","nearrow":"↗","ne":"≠","nedot":"≐̸","NegativeMediumSpace":"","NegativeThickSpace":"","NegativeThinSpace":"","NegativeVeryThinSpace":"","nequiv":"≢","nesear":"⤨","nesim":"≂̸","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","nexist":"∄","nexists":"∄","Nfr":"𝔑","nfr":"𝔫","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","nGg":"⋙̸","ngsim":"≵","nGt":"≫⃒","ngt":"≯","ngtr":"≯","nGtv":"≫̸","nharr":"↮","nhArr":"⇎","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","NJcy":"Њ","njcy":"њ","nlarr":"↚","nlArr":"⇍","nldr":"‥","nlE":"≦̸","nle":"≰","nleftarrow":"↚","nLeftarrow":"⇍","nleftrightarrow":"↮","nLeftrightarrow":"⇎","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nLl":"⋘̸","nlsim":"≴","nLt":"≪⃒","nlt":"≮","nltri":"⋪","nltrie":"⋬","nLtv":"≪̸","nmid":"∤","NoBreak":"","NonBreakingSpace":" ","nopf":"𝕟","Nopf":"ℕ","Not":"⫬","not":"¬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","notin":"∉","notindot":"⋵̸","notinE":"⋹̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","NotLeftTriangleBar":"⧏̸","NotLeftTriangle":"⋪","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangleBar":"⧐̸","NotRightTriangle":"⋫","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","nparallel":"∦","npar":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","nprec":"⊀","npreceq":"⪯̸","npre":"⪯̸","nrarrc":"⤳̸","nrarr":"↛","nrArr":"⇏","nrarrw":"↝̸","nrightarrow":"↛","nRightarrow":"⇏","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","Nscr":"𝒩","nscr":"𝓃","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","Ntilde":"Ñ","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","Nu":"Ν","nu":"ν","num":"#","numero":"№","numsp":" ","nvap":"≍⃒","nvdash":"⊬","nvDash":"⊭","nVdash":"⊮","nVDash":"⊯","nvge":"≥⃒","nvgt":">⃒","nvHarr":"⤄","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwarhk":"⤣","nwarr":"↖","nwArr":"⇖","nwarrow":"↖","nwnear":"⤧","Oacute":"Ó","oacute":"ó","oast":"⊛","Ocirc":"Ô","ocirc":"ô","ocir":"⊚","Ocy":"О","ocy":"о","odash":"⊝","Odblac":"Ő","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","OElig":"Œ","oelig":"œ","ofcir":"⦿","Ofr":"𝔒","ofr":"𝔬","ogon":"˛","Ograve":"Ò","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","Omacr":"Ō","omacr":"ō","Omega":"Ω","omega":"ω","Omicron":"Ο","omicron":"ο","omid":"⦶","ominus":"⊖","Oopf":"𝕆","oopf":"𝕠","opar":"⦷","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","operp":"⦹","oplus":"⊕","orarr":"↻","Or":"⩔","or":"∨","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oS":"Ⓢ","Oscr":"𝒪","oscr":"ℴ","Oslash":"Ø","oslash":"ø","osol":"⊘","Otilde":"Õ","otilde":"õ","otimesas":"⨶","Otimes":"⨷","otimes":"⊗","Ouml":"Ö","ouml":"ö","ovbar":"⌽","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","para":"¶","parallel":"∥","par":"∥","parsim":"⫳","parsl":"⫽","part":"∂","PartialD":"∂","Pcy":"П","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","Pfr":"𝔓","pfr":"𝔭","Phi":"Φ","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","Pi":"Π","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plus":"+","plusdo":"∔","plusdu":"⨥","pluse":"⩲","PlusMinus":"±","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","Poincareplane":"ℌ","pointint":"⨕","popf":"𝕡","Popf":"ℙ","pound":"£","prap":"⪷","Pr":"⪻","pr":"≺","prcue":"≼","precapprox":"⪷","prec":"≺","preccurlyeq":"≼","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","pre":"⪯","prE":"⪳","precsim":"≾","prime":"′","Prime":"″","primes":"ℙ","prnap":"⪹","prnE":"⪵","prnsim":"⋨","prod":"∏","Product":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","Proportional":"∝","Proportion":"∷","propto":"∝","prsim":"≾","prurel":"⊰","Pscr":"𝒫","pscr":"𝓅","Psi":"Ψ","psi":"ψ","puncsp":" ","Qfr":"𝔔","qfr":"𝔮","qint":"⨌","qopf":"𝕢","Qopf":"ℚ","qprime":"⁗","Qscr":"𝒬","qscr":"𝓆","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","QUOT":"\\"","rAarr":"⇛","race":"∽̱","Racute":"Ŕ","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","Rang":"⟫","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarr":"→","Rarr":"↠","rArr":"⇒","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","Rarrtl":"⤖","rarrtl":"↣","rarrw":"↝","ratail":"⤚","rAtail":"⤜","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rBarr":"⤏","RBarr":"⤐","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","Rcaron":"Ř","rcaron":"ř","Rcedil":"Ŗ","rcedil":"ŗ","rceil":"⌉","rcub":"}","Rcy":"Р","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","Re":"ℜ","rect":"▭","reg":"®","REG":"®","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","rfisht":"⥽","rfloor":"⌋","rfr":"𝔯","Rfr":"ℜ","rHar":"⥤","rhard":"⇁","rharu":"⇀","rharul":"⥬","Rho":"Ρ","rho":"ρ","rhov":"ϱ","RightAngleBracket":"⟩","RightArrowBar":"⇥","rightarrow":"→","RightArrow":"→","Rightarrow":"⇒","RightArrowLeftArrow":"⇄","rightarrowtail":"↣","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVectorBar":"⥕","RightDownVector":"⇂","RightFloor":"⌋","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","RightTeeArrow":"↦","RightTee":"⊢","RightTeeVector":"⥛","rightthreetimes":"⋌","RightTriangleBar":"⧐","RightTriangle":"⊳","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVectorBar":"⥔","RightUpVector":"↾","RightVectorBar":"⥓","RightVector":"⇀","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"","rmoustache":"⎱","rmoust":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"𝕣","Ropf":"ℝ","roplus":"⨮","rotimes":"⨵","RoundImplies":"⥰","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","Rrightarrow":"⇛","rsaquo":"›","rscr":"𝓇","Rscr":"ℛ","rsh":"↱","Rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","RuleDelayed":"⧴","ruluhar":"⥨","rx":"℞","Sacute":"Ś","sacute":"ś","sbquo":"‚","scap":"⪸","Scaron":"Š","scaron":"š","Sc":"⪼","sc":"≻","sccue":"≽","sce":"⪰","scE":"⪴","Scedil":"Ş","scedil":"ş","Scirc":"Ŝ","scirc":"ŝ","scnap":"⪺","scnE":"⪶","scnsim":"⋩","scpolint":"⨓","scsim":"≿","Scy":"С","scy":"с","sdotb":"⊡","sdot":"⋅","sdote":"⩦","searhk":"⤥","searr":"↘","seArr":"⇘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","Sfr":"𝔖","sfr":"𝔰","sfrown":"⌢","sharp":"♯","SHCHcy":"Щ","shchcy":"щ","SHcy":"Ш","shcy":"ш","ShortDownArrow":"↓","ShortLeftArrow":"←","shortmid":"∣","shortparallel":"∥","ShortRightArrow":"→","ShortUpArrow":"↑","shy":"","Sigma":"Σ","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","SmallCircle":"∘","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","SOFTcy":"Ь","softcy":"ь","solbar":"⌿","solb":"⧄","sol":"/","Sopf":"𝕊","sopf":"𝕤","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","Sqrt":"√","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","square":"□","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","squarf":"▪","squ":"□","squf":"▪","srarr":"→","Sscr":"𝒮","sscr":"𝓈","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","Star":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","Sub":"⋐","subdot":"⪽","subE":"⫅","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","Subset":"⋐","subseteq":"⊆","subseteqq":"⫅","SubsetEqual":"⊆","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succapprox":"⪸","succ":"≻","succcurlyeq":"≽","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","SuchThat":"∋","sum":"∑","Sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","Sup":"⋑","supdot":"⪾","supdsub":"⫘","supE":"⫆","supe":"⊇","supedot":"⫄","Superset":"⊃","SupersetEqual":"⊇","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","Supset":"⋑","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swarhk":"⤦","swarr":"↙","swArr":"⇙","swarrow":"↙","swnwar":"⤪","szlig":"ß","Tab":"\\t","target":"⌖","Tau":"Τ","tau":"τ","tbrk":"⎴","Tcaron":"Ť","tcaron":"ť","Tcedil":"Ţ","tcedil":"ţ","Tcy":"Т","tcy":"т","tdot":"⃛","telrec":"⌕","Tfr":"𝔗","tfr":"𝔱","there4":"∴","therefore":"∴","Therefore":"∴","Theta":"Θ","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","ThickSpace":" ","ThinSpace":" ","thinsp":" ","thkap":"≈","thksim":"∼","THORN":"Þ","thorn":"þ","tilde":"˜","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","timesbar":"⨱","timesb":"⊠","times":"×","timesd":"⨰","tint":"∭","toea":"⤨","topbot":"⌶","topcir":"⫱","top":"⊤","Topf":"𝕋","topf":"𝕥","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","TRADE":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","TripleDot":"⃛","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","Tscr":"𝒯","tscr":"𝓉","TScy":"Ц","tscy":"ц","TSHcy":"Ћ","tshcy":"ћ","Tstrok":"Ŧ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","Uacute":"Ú","uacute":"ú","uarr":"↑","Uarr":"↟","uArr":"⇑","Uarrocir":"⥉","Ubrcy":"Ў","ubrcy":"ў","Ubreve":"Ŭ","ubreve":"ŭ","Ucirc":"Û","ucirc":"û","Ucy":"У","ucy":"у","udarr":"⇅","Udblac":"Ű","udblac":"ű","udhar":"⥮","ufisht":"⥾","Ufr":"𝔘","ufr":"𝔲","Ugrave":"Ù","ugrave":"ù","uHar":"⥣","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","Umacr":"Ū","umacr":"ū","uml":"¨","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","uogon":"ų","Uopf":"𝕌","uopf":"𝕦","UpArrowBar":"⤒","uparrow":"↑","UpArrow":"↑","Uparrow":"⇑","UpArrowDownArrow":"⇅","updownarrow":"↕","UpDownArrow":"↕","Updownarrow":"⇕","UpEquilibrium":"⥮","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","UpperLeftArrow":"↖","UpperRightArrow":"↗","upsi":"υ","Upsi":"ϒ","upsih":"ϒ","Upsilon":"Υ","upsilon":"υ","UpTeeArrow":"↥","UpTee":"⊥","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","Uring":"Ů","uring":"ů","urtri":"◹","Uscr":"𝒰","uscr":"𝓊","utdot":"⋰","Utilde":"Ũ","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","Uuml":"Ü","uuml":"ü","uwangle":"⦧","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","vArr":"⇕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vBar":"⫨","Vbar":"⫫","vBarv":"⫩","Vcy":"В","vcy":"в","vdash":"⊢","vDash":"⊨","Vdash":"⊩","VDash":"⊫","Vdashl":"⫦","veebar":"⊻","vee":"∨","Vee":"⋁","veeeq":"≚","vellip":"⋮","verbar":"|","Verbar":"‖","vert":"|","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"𝔙","vfr":"𝔳","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","Vopf":"𝕍","vopf":"𝕧","vprop":"∝","vrtri":"⊳","Vscr":"𝒱","vscr":"𝓋","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","Vvdash":"⊪","vzigzag":"⦚","Wcirc":"Ŵ","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","Wedge":"⋀","wedgeq":"≙","weierp":"℘","Wfr":"𝔚","wfr":"𝔴","Wopf":"𝕎","wopf":"𝕨","wp":"℘","wr":"≀","wreath":"≀","Wscr":"𝒲","wscr":"𝓌","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","Xfr":"𝔛","xfr":"𝔵","xharr":"⟷","xhArr":"⟺","Xi":"Ξ","xi":"ξ","xlarr":"⟵","xlArr":"⟸","xmap":"⟼","xnis":"⋻","xodot":"⨀","Xopf":"𝕏","xopf":"𝕩","xoplus":"⨁","xotime":"⨂","xrarr":"⟶","xrArr":"⟹","Xscr":"𝒳","xscr":"𝓍","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","Yacute":"Ý","yacute":"ý","YAcy":"Я","yacy":"я","Ycirc":"Ŷ","ycirc":"ŷ","Ycy":"Ы","ycy":"ы","yen":"¥","Yfr":"𝔜","yfr":"𝔶","YIcy":"Ї","yicy":"ї","Yopf":"𝕐","yopf":"𝕪","Yscr":"𝒴","yscr":"𝓎","YUcy":"Ю","yucy":"ю","yuml":"ÿ","Yuml":"Ÿ","Zacute":"Ź","zacute":"ź","Zcaron":"Ž","zcaron":"ž","Zcy":"З","zcy":"з","Zdot":"Ż","zdot":"ż","zeetrf":"ℨ","ZeroWidthSpace":"","Zeta":"Ζ","zeta":"ζ","zfr":"𝔷","Zfr":"ℨ","ZHcy":"Ж","zhcy":"ж","zigrarr":"⇝","zopf":"𝕫","Zopf":"ℤ","Zscr":"𝒵","zscr":"𝓏","zwj":"","zwnj":""}')},29591:e=>{"use strict";e.exports=JSON.parse('{"Aacute":"Á","aacute":"á","Acirc":"Â","acirc":"â","acute":"´","AElig":"Æ","aelig":"æ","Agrave":"À","agrave":"à","amp":"&","AMP":"&","Aring":"Å","aring":"å","Atilde":"Ã","atilde":"ã","Auml":"Ä","auml":"ä","brvbar":"¦","Ccedil":"Ç","ccedil":"ç","cedil":"¸","cent":"¢","copy":"©","COPY":"©","curren":"¤","deg":"°","divide":"÷","Eacute":"É","eacute":"é","Ecirc":"Ê","ecirc":"ê","Egrave":"È","egrave":"è","ETH":"Ð","eth":"ð","Euml":"Ë","euml":"ë","frac12":"½","frac14":"¼","frac34":"¾","gt":">","GT":">","Iacute":"Í","iacute":"í","Icirc":"Î","icirc":"î","iexcl":"¡","Igrave":"Ì","igrave":"ì","iquest":"¿","Iuml":"Ï","iuml":"ï","laquo":"«","lt":"<","LT":"<","macr":"¯","micro":"µ","middot":"·","nbsp":" ","not":"¬","Ntilde":"Ñ","ntilde":"ñ","Oacute":"Ó","oacute":"ó","Ocirc":"Ô","ocirc":"ô","Ograve":"Ò","ograve":"ò","ordf":"ª","ordm":"º","Oslash":"Ø","oslash":"ø","Otilde":"Õ","otilde":"õ","Ouml":"Ö","ouml":"ö","para":"¶","plusmn":"±","pound":"£","quot":"\\"","QUOT":"\\"","raquo":"»","reg":"®","REG":"®","sect":"§","shy":"","sup1":"¹","sup2":"²","sup3":"³","szlig":"ß","THORN":"Þ","thorn":"þ","times":"×","Uacute":"Ú","uacute":"ú","Ucirc":"Û","ucirc":"û","Ugrave":"Ù","ugrave":"ù","uml":"¨","Uuml":"Ü","uuml":"ü","Yacute":"Ý","yacute":"ý","yen":"¥","yuml":"ÿ"}')},2586:e=>{"use strict";e.exports=JSON.parse('{"amp":"&","apos":"\'","gt":">","lt":"<","quot":"\\""}')}},a={};function r(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}r.m=i,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}var i=Object.create(null);r.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var o=2&s&&n;"object"==typeof o&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,r.d(i,a),i},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"js/"+e+".app.bundle.js",r.miniCssF=e=>"styles/main.css",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},s="wptMain:",r.l=(e,t,i,a)=>{if(n[e])n[e].push(t);else{var o,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==s+i){o=d;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",o.timeout=120,r.nc&&o.setAttribute("nonce",r.nc),o.setAttribute("data-webpack",s+i),o.src=e),n[e]=[t];var p=(t,s)=>{o.onerror=o.onload=null,clearTimeout(h);var i=n[e];if(delete n[e],o.parentNode&&o.parentNode.removeChild(o),i&&i.forEach((e=>e(s))),t)return t(s)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=p.bind(null,o.onerror),o.onload=p.bind(null,o.onload),l&&document.head.appendChild(o)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/modules/wp-toolkit/",(()=>{var e={179:0};r.f.j=(t,n)=>{var s=r.o(e,t)?e[t]:void 0;if(0!==s)if(s)n.push(s[2]);else{var i=new Promise(((n,i)=>s=e[t]=[n,i]));n.push(s[2]=i);var a=r.p+r.u(t),o=new Error;r.l(a,(n=>{if(r.o(e,t)&&(0!==(s=e[t])&&(e[t]=void 0),s)){var i=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",o.name="ChunkLoadError",o.type=i,o.request=a,s[1](o)}}),"chunk-"+t,t)}};var t=(t,n)=>{var s,i,[a,o,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in o)r.o(o,s)&&(r.m[s]=o[s]);l&&l(r)}for(t&&t(n);c<a.length;c++)i=a[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=self.webpackChunkwptMain=self.webpackChunkwptMain||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o={};(()=>{"use strict";r(83043),r(81817),r(15634),r(74318),r(47834),r(61357),r(3573),function(e){var t=e.Element.prototype;"function"!=typeof t.matches&&(t.matches=t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),s=0;n[s]&&n[s]!==t;)++s;return Boolean(n[s])}),"function"!=typeof t.closest&&(t.closest=function(e){for(var t=this;t&&1===t.nodeType;){if(t.matches(e))return t;t=t.parentNode}return null})}(window)})(),(()=>{"use strict";r.r(o),r.d(o,{default:()=>wH,withoutInitialData:()=>jH,wpMode:()=>kH});var e={};r.r(e),r.d(e,{addAppMessage:()=>Cp,addErrorMessage:()=>jp,addInfoMessage:()=>kp,addSuccessMessage:()=>wp,addWarningMessage:()=>Tp,checkSession:()=>Sp,clearAppMessage:()=>Dp,closeFlashMessage:()=>Ep,closeGlobalAlert:()=>Up,disableSmartUpdatePromoForInstances:()=>Op,disableSmartUpdatePromoForMultipleSitesUpdatesScreen:()=>Mp,disableSmartUpdatePromoForUpdatesScreen:()=>Lp,displayErrorMessageFromMeta:()=>_p,displayErrorMessagesFromFormErrors:()=>yp,fetchInitialData:()=>Wp,getInitialOptions:()=>Ap,getLicenseInfo:()=>Vp,getPremiumUsers:()=>Fp,getWhmcsUpsellLink:()=>Yp,loadChangelog:()=>Rp,parseResponseMessages:()=>xp,sendMainPagePerfStat:()=>qp,setSearch:()=>Pp,upVoteForFeature:()=>Hp,updateLicenseInfo:()=>$p});var t={};r.r(t),r.d(t,{closeDrawer:()=>bh,loadSettings:()=>mh,loadSettingsIfFirstOpen:()=>hh,openDrawer:()=>gh,settingsLoaded:()=>yh,settingsLoadingError:()=>_h,settingsRequested:()=>vh,settingsSubmitted:()=>xh,settingsUpdateError:()=>wh,settingsUpdated:()=>Sh,updateSettings:()=>fh});var n={};r.r(n),r.d(n,{activateOrDeactivatePlugin:()=>Jg,getInstallationPlugins:()=>tb,getPluginInfo:()=>nb,remove:()=>Qg,setPluginsAutoUpdates:()=>eb});var s={};r.r(s),r.d(s,{activateTheme:()=>cb,getInstallationThemes:()=>pb,remove:()=>ub,setThemesAutoUpdates:()=>db});var i={};r.r(i),r.d(i,{acceptSmartPhpUpdate:()=>ov,activateVirtualPatchesSubscription:()=>Hy,appendDomainInstallationsIds:()=>Zv,applySmartUpdate:()=>hv,calculateVulnerabilityProtectionUsageStatistics:()=>$y,checkExpiredExpandedInstanceIds:()=>ey,checkInstallationsVulnerability:()=>jy,checkUpdates:()=>zb,cleanUpUpdatesStore:()=>Gb,createInstallation:()=>Wv,createMaintenancePreview:()=>Sb,deleteSnapshot:()=>Jb,detach:()=>jb,detachVirtualPatchesSubscription:()=>Vy,discardSmartPhpUpdate:()=>lv,discardSmartUpdate:()=>mv,fetchAvailableUpdates:()=>qb,forgetExpandedInstanceId:()=>Qv,getAdminSettings:()=>gv,getAutoUpdateSettings:()=>Cv,getAvailablePhpHandlers:()=>_b,getDbSettings:()=>sv,getHotlinkProtectionSettingsMeta:()=>Lb,getInstallationData:()=>ev,getInstallationLabelsMeta:()=>cy,getInstallationStub:()=>Sy,getInstallationsRemoveConfiguration:()=>Bb,getInstancesData:()=>nv,getMaintenanceSettings:()=>yy,getMaintenanceTemplateCustomizationUrl:()=>kb,getPasswordProtection:()=>Fv,getRemoteAgentInstallationProperties:()=>Ey,getRemoteServerInstallationProperties:()=>Ay,getSetDetails:()=>wy,getSmartPhpUpdateResult:()=>rv,getSmartPhpUpdateStub:()=>av,getSmartUpdateResult:()=>fv,getSynchronizeSiteUrlParams:()=>by,getVirtualPatchesSubscriptionGuid:()=>Fy,getVirtualPatchesSubscriptionInfo:()=>Ny,getVirtualPatchesSubscriptionPurchaseUrlAndGuid:()=>Yy,getWordPressDebugSettings:()=>ky,getWpCredentials:()=>vy,getWpCronTakeoverMeta:()=>Ib,getWpUser:()=>yv,installationStarted:()=>$v,instanceUpdateFailed:()=>sy,instanceUpdateFinished:()=>ny,instancesCheckUpdatesFailed:()=>oy,instancesCheckUpdatesFinished:()=>ry,instancesDetachFinished:()=>Tb,instancesMassUpdateFailed:()=>ay,instancesMassUpdateFinished:()=>iy,keepExpandedInstanceId:()=>Jv,loadInstancesList:()=>Gv,loginToInstance:()=>dy,loginToInstancePerformed:()=>py,recordHireDeveloperTransition:()=>Uy,redetectRemoteInstanceProperties:()=>Uv,redetectRemoteInstancePropertiesFinished:()=>Av,redetectRemoteInstancePropertiesFinishedWithError:()=>Ev,refresh:()=>vb,refreshScreenshot:()=>Nb,remove:()=>xb,resetInstancesList:()=>qv,restoreMaintenanceTemplate:()=>uv,restoreSnapshot:()=>Kb,restoreSnapshotFinished:()=>Zb,runSmartPhpUpdate:()=>Ty,saveRemoteAgentInstancePropertiesFinished:()=>Iv,saveRemoteAgentInstancePropertiesFinishedWithError:()=>Ov,saveRemoteInstancePropertiesFinished:()=>Dv,saveRemoteInstancePropertiesFinishedWithError:()=>Pv,scan:()=>Vb,scanFinished:()=>Wb,setAdminSettings:()=>bv,setAdminSettingsFinished:()=>vv,setDbSettings:()=>iv,setDebugSettings:()=>wv,setExpandedInstanceId:()=>Xv,setHotlinkProtectionSettings:()=>Mb,setIndexingStatus:()=>Cb,setInstallationAfterInstallStarted:()=>zv,setInstallationLabels:()=>uy,setInstallationPhpHandler:()=>Cy,setInstanceActiveTab:()=>ly,setInstanceName:()=>Rv,setInstancesFilter:()=>dv,setIsNeedToUpdateInstancesFilter:()=>Vv,setIsNeedToUpdateInstancesList:()=>Hv,setLastInstalledInstanceId:()=>ty,setMaintenanceFullMode:()=>wb,setNginxCachingStatus:()=>Sv,setSelectedInstanceId:()=>Kv,setSmartUpdatesStatus:()=>Rb,setWpUser:()=>_v,smartPhpUpdateFinished:()=>Iy,smartPhpUpdateResultApplied:()=>Oy,smartPhpUpdateResultDiscarded:()=>Ly,smartPhpUpdateStarted:()=>Dy,smartPhpUpdateStubLoaded:()=>My,smartPhpUpdateTaskStatusUpdated:()=>Py,switchPhpHandler:()=>yb,synchronizeSiteUrl:()=>hy,synchronizeSiteUrlFinished:()=>gy,synchronizeSiteUrlStarted:()=>fy,synchronizeSiteUrlSync:()=>my,toggleDebug:()=>kv,toggleHotlinkProtection:()=>Ob,togglePasswordProtectionStatus:()=>Bv,toggleWpCronTakeoverStatus:()=>Db,toggleWpCronTakeoverTaskStatus:()=>Pb,updateAutoUpdateSettings:()=>jv,updateInstallationsAutoUpdatesSettings:()=>Tv,updateItems:()=>pv,updateMaintenanceSettings:()=>cv,updateMaintenanceStatus:()=>Eb,updatePasswordProtection:()=>Yv,updateRemoteAgentInstanceProperties:()=>Mv,updateRemoteInstanceProperties:()=>Lv,updateVirtualPatchingSubscriptionInfo:()=>By,updateVulnerabilityFilteringSettings:()=>Ry,validateInstallationPath:()=>xy,vulnerabilityCheckerStatsUpdate:()=>_y});var a={};r.r(a),r.d(a,{activatePlugins:()=>z_,activatePluginsFinished:()=>W_,deactivatePlugins:()=>K_,deactivatePluginsFinished:()=>G_,getPluginsList:()=>I_,installPlugins:()=>N_,installPluginsFinished:()=>R_,reloadPlugins:()=>M_,reloadPluginsFinished:()=>L_,removePlugins:()=>tx,removePluginsFinished:()=>ex,resetPluginsList:()=>O_,searchPlugins:()=>E_,searchPluginsFinished:()=>A_,uninstallPlugins:()=>J_,uninstallPluginsFinished:()=>Z_,updatePlugins:()=>ix,updatePluginsFinished:()=>sx,uploadAndInstallPlugin:()=>V_,uploadAndInstallPluginTaskFinished:()=>B_,uploadAndInstallPluginTaskStarted:()=>H_,uploadPluginToStorage:()=>Y_,uploadPluginToStorageFinished:()=>F_});var l={};r.r(l),r.d(l,{createInstanceBackup:()=>NT,instanceBackupCreationFinished:()=>BT,instanceBackupCreationFinishedWithError:()=>YT,instanceBackupCreationStarted:()=>FT,instanceBackupRestoringFinished:()=>WT,instanceBackupRestoringFinishedWithError:()=>$T,instanceBackupRestoringStarted:()=>VT,loadInstanceBackupsMetaData:()=>ET,removeInstanceBackups:()=>RT,resetInstanceBackupList:()=>UT,restoreInstanceBackup:()=>HT});var c={};r.r(c),r.d(c,{INSTANCE_TYPE_LOCAL_CPANEL:()=>zT,INSTANCE_TYPE_LOCAL_PLESK_LINUX:()=>GT,INSTANCE_TYPE_LOCAL_PLESK_WINDOWS:()=>KT,INSTANCE_TYPE_MANAGED_BY_PLUGIN:()=>ZT,INSTANCE_TYPE_REMOTE_CPANEL:()=>qT,INSTANCE_TYPE_REMOTE_GENERIC:()=>XT});var u={};r.r(u),r.d(u,{activateThemeOnAllInstances:()=>gP,activateThemeOnAllInstancesFinished:()=>fP,getThemesList:()=>WD,installThemes:()=>QD,installThemesFinished:()=>JD,reloadThemes:()=>GD,reloadThemesFinished:()=>qD,removeThemes:()=>uP,removeThemesOnAllInstancesFinished:()=>cP,resetThemesList:()=>zD,searchThemes:()=>XD,searchThemesFinished:()=>KD,uninstallThemes:()=>oP,uninstallThemesOnAllInstancesFinished:()=>rP,updateThemes:()=>hP,updateThemesOnAllInstancesFinished:()=>pP,uploadAndInstallTheme:()=>iP,uploadAndInstallThemeTaskFinished:()=>nP,uploadAndInstallThemeTaskStarted:()=>sP,uploadThemeToStorage:()=>tP,uploadThemeToStorageFinished:()=>eP});var d={};r.r(d),r.d(d,{addPluginsToSet:()=>qP,addSet:()=>BP,addThemesToSet:()=>tI,getPluginDescription:()=>SI,getPluginDescriptionFinished:()=>xI,getSetsList:()=>NP,getThemeDescription:()=>kI,getThemeDescriptionFinished:()=>wI,installSetFinished:()=>jI,installSetInto:()=>uI,removeAllPluginsFromSet:()=>vI,removeAllPluginsFromSetFinished:()=>bI,removeAllThemesFromSet:()=>_I,removeAllThemesFromSetFinished:()=>yI,removePluginFromSet:()=>sI,removePluginFromSetFinished:()=>nI,removeSet:()=>gI,removeSetFinished:()=>fI,removeSets:()=>VP,removeThemeFromSet:()=>aI,removeThemeFromSetFinished:()=>iI,renameSet:()=>WP,resetSetsList:()=>FP,searchPlugins:()=>pI,searchPluginsFinished:()=>dI,searchThemes:()=>mI,searchThemesFinished:()=>hI,setPluginActivationState:()=>JP,setThemeActivationState:()=>QP,uploadPlugin:()=>oI,uploadPluginFinished:()=>rI,uploadTheme:()=>cI,uploadThemeFinished:()=>lI});var p={};r.r(p),r.d(p,{acceptFingerprint:()=>XI,addServer:()=>eO,addServerFinished:()=>iO,addServerFinishedWithError:()=>aO,addServerStarted:()=>tO,addServerToList:()=>nO,detachServers:()=>GI,disableBetaDialog:()=>lO,getServer:()=>KI,getServersList:()=>oO,refreshInstancesLog:()=>uO,resetInstancesLog:()=>pO,resetServersList:()=>rO,scanServers:()=>ZI,scanServersFinished:()=>QI,setInstancesLog:()=>dO,updateServerInList:()=>sO});var h={};r.r(h),r.d(h,{getAvailable:()=>GL,install:()=>XL,uploadAndInstallAssetToSingleInstance:()=>QL,uploadAndInstallAssetToSingleInstanceFinished:()=>nM,uploadAndInstallAssetToSingleInstanceFinishedWithError:()=>tM,uploadAndInstallAssetToSingleInstanceStarted:()=>eM});var m={};r.r(m),r.d(m,{loadInstanceActionLogRecords:()=>GE,loadLogRotationSettings:()=>ZE,onEnableRealTimeUpdates:()=>XE,onOpenActionLogBrowser:()=>KE,saveLogRotationSettings:()=>JE});var f={};r.r(f),r.d(f,{coreReinstallationFinished:()=>PU,coreReinstallationFinishedWithErrors:()=>IU,coreReinstallationStarted:()=>DU,getIntegrity:()=>OU,reinstallCore:()=>CU,verifyChecksums:()=>TU});var g={};r.r(g),r.d(g,{getSyncSettings:()=>UU,syncFinished:()=>FU,syncInstance:()=>NU,syncStarted:()=>RU});var b={};r.r(b),r.d(b,{cloneFinished:()=>dF,cloneInstallation:()=>uF,cloneStarted:()=>cF,getCloneStub:()=>pF,validateClonePath:()=>lF});var v={};r.r(v),r.d(v,{connectRemoteAgentInstance:()=>TY,connectRemoteAgentInstanceFailed:()=>PY,connectRemoteAgentInstanceFinished:()=>DY,connectRemoteAgentInstanceStarted:()=>CY,loadInstanceToList:()=>IY});var y=r(87462);function _(e){return"/"===e.charAt(0)}function x(e,t){for(var n=t,s=n+1,i=e.length;s<i;n+=1,s+=1)e[n]=e[s];e.pop()}const S=function(e,t){if(!e)throw new Error("Invariant failed")};function w(e){var t=e.pathname,n=e.search,s=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),s&&"#"!==s&&(i+="#"===s.charAt(0)?s:"#"+s),i}function k(e,t,n,s){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",s="",i=t.indexOf("#");-1!==i&&(s=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===s?"":s}}(e),i.state=t):(void 0===(i=(0,y.Z)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),s?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=function(e,t){void 0===t&&(t="");var n,s=e&&e.split("/")||[],i=t&&t.split("/")||[],a=e&&_(e),r=t&&_(t),o=a||r;if(e&&_(e)?i=s:s.length&&(i.pop(),i=i.concat(s)),!i.length)return"/";if(i.length){var l=i[i.length-1];n="."===l||".."===l||""===l}else n=!1;for(var c=0,u=i.length;u>=0;u--){var d=i[u];"."===d?x(i,u):".."===d?(x(i,u),c++):c&&(x(i,u),c--)}if(!o)for(;c--;c)i.unshift("..");!o||""===i[0]||i[0]&&_(i[0])||i.unshift("");var p=i.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p}(i.pathname,s.pathname)):i.pathname=s.pathname:i.pathname||(i.pathname="/"),i}function j(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,s,i){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof s?s(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0;function s(){n&&e.apply(void 0,arguments)}return t.push(s),function(){n=!1,t=t.filter((function(e){return e!==s}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];t.forEach((function(e){return e.apply(void 0,n)}))}}}var T=!("undefined"==typeof window||!window.document||!window.document.createElement);function C(e,t){t(window.confirm(e))}var D="popstate",P="hashchange";function I(){try{return window.history.state||{}}catch(e){return{}}}function O(e){void 0===e&&(e={}),T||S(!1);var t,n,s=window.history,i=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),r=e,o=r.forceRefresh,l=void 0!==o&&o,c=r.getUserConfirmation,u=void 0===c?C:c,d=r.keyLength,p=void 0===d?6:d,h=e.basename?function(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}("/"===(n=e.basename).charAt(0)?n:"/"+n):"";function m(e){var t=e||{},n=t.key,s=t.state,i=window.location,a=i.pathname+i.search+i.hash;return h&&(a=function(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}(a,h)),k(a,s,n)}function f(){return Math.random().toString(36).substr(2,p)}var g=j();function b(e){(0,y.Z)(F,e),F.length=s.length,g.notifyListeners(F.location,F.action)}function v(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||O(m(e.state))}function _(){O(m(I()))}var x=!1;function O(e){x?(x=!1,b()):g.confirmTransitionTo(e,"POP",u,(function(t){t?b({action:"POP",location:e}):function(e){var t=F.location,n=M.indexOf(t.key);-1===n&&(n=0);var s=M.indexOf(e.key);-1===s&&(s=0);var i=n-s;i&&(x=!0,E(i))}(e)}))}var L=m(I()),M=[L.key];function A(e){return h+w(e)}function E(e){s.go(e)}var U=0;function R(e){1===(U+=e)&&1===e?(window.addEventListener(D,v),a&&window.addEventListener(P,_)):0===U&&(window.removeEventListener(D,v),a&&window.removeEventListener(P,_))}var N=!1,F={length:s.length,action:"POP",location:L,createHref:A,push:function(e,t){var n="PUSH",a=k(e,t,f(),F.location);g.confirmTransitionTo(a,n,u,(function(e){if(e){var t=A(a),r=a.key,o=a.state;if(i)if(s.pushState({key:r,state:o},null,t),l)window.location.href=t;else{var c=M.indexOf(F.location.key),u=M.slice(0,c+1);u.push(a.key),M=u,b({action:n,location:a})}else window.location.href=t}}))},replace:function(e,t){var n="REPLACE",a=k(e,t,f(),F.location);g.confirmTransitionTo(a,n,u,(function(e){if(e){var t=A(a),r=a.key,o=a.state;if(i)if(s.replaceState({key:r,state:o},null,t),l)window.location.replace(t);else{var c=M.indexOf(F.location.key);-1!==c&&(M[c]=a.key),b({action:n,location:a})}else window.location.replace(t)}}))},go:E,goBack:function(){E(-1)},goForward:function(){E(1)},block:function(e){void 0===e&&(e=!1);var t=g.setPrompt(e);return N||(R(1),N=!0),function(){return N&&(N=!1,R(-1)),t()}},listen:function(e){var t=g.appendListener(e);return R(1),function(){R(-1),t()}}};return F}var L=r(85893),M=r(73935),A=r(11440),E=r.n(A),U=r(67294),R=r(44724),N=r.n(R),F=r(7539);function Y(e){return Y="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},Y(e)}function B(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=Y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t);if("object"!=Y(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==Y(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function V(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function $(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return V(n.overflowY,t)||V(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function W(e,t,n,s,i,a,r,o){return a<e&&r>t||a>e&&r<t?0:a<=e&&o<=n||r>=t&&o>=n?a-e-s:r>t&&o<n||a<e&&o>n?r-t+i:0}var z=function(e,t){var n=window,s=t.scrollMode,i=t.block,a=t.inline,r=t.boundary,o=t.skipOverflowHiddenElements,l="function"==typeof r?r:function(e){return e!==r};if(!H(e))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,p=[],h=e;H(h)&&l(h);){if((h=null==(u=(c=h).parentElement)?c.getRootNode().host||null:u)===d){p.push(h);break}null!=h&&h===document.body&&$(h)&&!$(document.documentElement)||null!=h&&$(h,o)&&p.push(h)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,f=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,b=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),y=v.height,_=v.width,x=v.top,S=v.right,w=v.bottom,k=v.left,j="start"===i||"nearest"===i?x:"end"===i?w:x+y/2,T="center"===a?k+_/2:"end"===a?S:k,C=[],D=0;D<p.length;D++){var P=p[D],I=P.getBoundingClientRect(),O=I.height,L=I.width,M=I.top,A=I.right,E=I.bottom,U=I.left;if("if-needed"===s&&x>=0&&k>=0&&w<=f&&S<=m&&x>=M&&w<=E&&k>=U&&S<=A)return C;var R=getComputedStyle(P),N=parseInt(R.borderLeftWidth,10),F=parseInt(R.borderTopWidth,10),Y=parseInt(R.borderRightWidth,10),B=parseInt(R.borderBottomWidth,10),V=0,z=0,q="offsetWidth"in P?P.offsetWidth-P.clientWidth-N-Y:0,G="offsetHeight"in P?P.offsetHeight-P.clientHeight-F-B:0,K="offsetWidth"in P?0===P.offsetWidth?0:L/P.offsetWidth:0,X="offsetHeight"in P?0===P.offsetHeight?0:O/P.offsetHeight:0;if(d===P)V="start"===i?j:"end"===i?j-f:"nearest"===i?W(b,b+f,f,F,B,b+j,b+j+y,y):j-f/2,z="start"===a?T:"center"===a?T-m/2:"end"===a?T-m:W(g,g+m,m,N,Y,g+T,g+T+_,_),V=Math.max(0,V+b),z=Math.max(0,z+g);else{V="start"===i?j-M-F:"end"===i?j-E+B+G:"nearest"===i?W(M,E,O,F,B+G,j,j+y,y):j-(M+O/2)+G/2,z="start"===a?T-U-N:"center"===a?T-(U+L/2)+q/2:"end"===a?T-A+Y+q:W(U,A,L,N,Y+q,T,T+_,_);var Z=P.scrollLeft,J=P.scrollTop;j+=J-(V=Math.max(0,Math.min(J+V/X,P.scrollHeight-O/X+G))),T+=Z-(z=Math.max(0,Math.min(Z+z/K,P.scrollWidth-L/K+q)))}C.push({el:P,top:V,left:z})}return C};function q(e){return e===Object(e)&&0!==Object.keys(e).length}const G=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];e(...n)}},K=(e,t)=>function(){for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];G(e,...s),G(t,...s)},X=e=>{const{target:t,currentTarget:n}=e;if(!1===(t instanceof HTMLElement&&n.contains(t)))return!0;if(t instanceof HTMLElement&&t.hasAttribute("disabled"))return!1;let s=t;for(;s&&s!==n;){if(!(s instanceof HTMLElement))return!0;switch(s.nodeName){case"A":case"INPUT":case"BUTTON":case"LABEL":return!0}if("button"===s.getAttribute("role"))return!0;s=s.parentNode}return!1},Z=e=>{const t=t=>e(t);return(0,L.jsx)(t,{})},J=(e,t)=>function(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(q(t)&&"function"==typeof t.behavior)return t.behavior(n?z(e,t):[]);if(n){var s=function(e){return!1===e?{block:"end",inline:"nearest"}:q(e)?e:{block:"start",inline:"nearest"}}(t);return function(e,t){void 0===t&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach((function(e){var s=e.el,i=e.top,a=e.left;s.scroll&&n?s.scroll({top:i,left:a,behavior:t}):(s.scrollTop=i,s.scrollLeft=a)}))}(z(e,s),s.behavior)}}(e,{block:"center",behavior:"smooth",...t});class Q{constructor(){B(this,"listeners",{})}on(e,t){void 0===this.listeners[e]&&(this.listeners[e]=[]),this.listeners[e].push(t)}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];const i=this.listeners[e];i&&i.forEach((e=>{"function"==typeof e&&e(...n)}))}}const ee=()=>({getNext:(e,t)=>{const n=e.children,s=Array.prototype.indexOf.call(n,t);if(-1!==s)return n[s+1]},getPrev:(e,t)=>{const n=e.children,s=Array.prototype.indexOf.call(n,t);if(-1!==s)return n[s-1]},getFirst:e=>e.firstElementChild,getLast:e=>e.lastElementChild}),te=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ee();const s=e=>!!(t(e)&&e instanceof HTMLElement)&&(e.focus(),!0),i=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.activeElement,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e.current)return!1;const o=n.getNext(e.current,t);return!(!o||!s(o)&&!i(o,a))||r(a+1)},a=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.activeElement,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e.current)return!1;const r=n.getPrev(e.current,t);return!(!r||!s(r)&&!a(r,i))||o(i+1)},r=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(t>1)return!1;if(!e.current)return!1;const a=n.getFirst(e.current);return!(!a||!s(a)&&!i(a,t))},o=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(t>1)return!1;if(!e.current)return!1;const i=n.getLast(e.current);return!(!i||!s(i)&&!a(i,t))};return{focusNext:i,focusPrev:a,focusFirst:r,focusLast:o}},ne=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach((t=>{"function"==typeof t?t(e):t&&(t.current=e)}))}},se=e=>String(Number(e))===String(e)?`${e}px`:e,ie={"i-filter-02":"filter","i-filter-check-mark":"filter-check-mark","i-sliders":"sliders","i-two-sheets-blank":"copy","i-server-refresh":"backup","i-two-arrows-refresh-04":"refresh","i-circle-check-mark":"check-mark-circle","i-check-mark":"check-mark","i-three-dots":"three-dots-horizontal","tree-dots-horizontal":"three-dots-horizontal","i-square-arrow-up-04":"arrow-up-in","i-square-arrow-down-04":"arrow-down-in","i-shield-star":"shield","i-menu":"menu","i-folder-blank-closed-02":"folder-closed","i-arrow-refresh-02":"reload","i-eye-03":"eye-closed","i-www-site-picture-text":"site-page","i-broken-chain":"chain-broken","i-eye-02":"eye","i-arrows-looping-06":"arrows-loop","i-circle-question-mark-02":"question-mark-circle-filled","i-circle-check-mark-02":"check-mark-circle-filled","i-circle-info-02":"info-circle-filled","i-circle-exclamation-mark-02":"exclamation-mark-circle-filled","i-magnifying-glass":"search","i-circle-exclamation-mark":"exclamation-mark-circle","i-cross-mark":"cross-mark","i-plus":"plus","i-circle-question-mark":"question-mark-circle","i-arrow-up-07":"chevron-down","i-arrow-down-07":"chevron-up","i-arrow-right-07":"chevron-right","i-arrow-left-07":"chevron-left","i-arrow-up-06":"arrow-up-tray","i-arrow-down-06":"arrow-down-tray","i-trashcan":"remove","i-four-squares":"four-squares","i-shopping-cart-02":"shopping-cart","i-chain":"chain","i-gear":"gear","i-list":"list","i-pencil":"pencil","i-circle-cross-mark":"clean","i-circle-minus":"minus-circle","i-circle-info":"info-circle","i-folder-blank-open":"folder-open",world:"globe","circle-check-mark":"check-mark-circle","circle-check-mark-filled":"check-mark-circle-filled","circle-exclamation-mark":"exclamation-mark-circle","circle-exclamation-mark-filled":"exclamation-mark-circle-filled","circle-info":"info-circle","circle-info-filled":"info-circle-filled","circle-minus":"minus-circle","circle-question-mark":"question-mark-circle","circle-question-mark-filled":"question-mark-circle-filled",sertificate:"ribbon"},ae=["archive","arrow-back","arrow-diagonal-out","arrow-down","arrow-down-circle-filled","arrow-down-in","arrow-down-out","arrow-down-tray","arrow-left","arrow-left-circle-filled","arrow-right","arrow-right-circle-filled","arrow-right-in","arrow-right-out","arrow-up","arrow-up-circle","arrow-up-circle-filled","arrow-up-in","arrow-up-in-cloud","arrow-up-out","arrow-up-tray","arrows-four-directions","arrows-inward","arrows-loop","arrows-opposite","arrows-outward","backup","backup2","bar-chart-vertical","bar-chart-vertical-arrow-up","bar-chart-vertical-lock","bell","book-email","boundary","box-diagonal-bottom-in","box-diagonal-top-in","brush","bug","calendar","calendar-clock","camera","card","card-ribbon","card-row","card-tile","cd","cd-up-in-cloud","chain","chain-broken","chat","check-list","check-mark","check-mark-circle","check-mark-circle-filled","chevron-double-down","chevron-double-up","chevron-down","chevron-left","chevron-right","chevron-up","circle-diagonal","clean","clip","clock","clone","cloud","cloud-checkmark","cloud-crossed","cloud-graph","code","connection","console","console-filled","copy","copy-indicator","cpu","crane","credit-cards","cross-mark","cross-mark-circle","cross-mark-circle-filled","crown-transfer","dashboard","database","database-box","database-filled","database-plus","deploy","docker-filled","dollar","dollar-filled","dot","dot-big","emoticon-confused","emoticon-dead","emoticon-excited","emoticon-happy","emoticon-neutral","emoticon-sad","emoticon-smile","enter","exclamation-mark-circle","exclamation-mark-circle-filled","eye","eye-closed","facebook","facebook-filled","feedback","filter","filter-check-mark","fire","flag","flag-filled","flag-globe","floppy-disk","folder-closed","folder-key","folder-network","folder-open","folders-tree","forward-circle-filled","four-squares","gear","git","github","globe","hard-drive","hard-drive-key","hat","hexagons","home","info-circle","info-circle-filled","ip-addresses","joomla","kebab","key","label","label-plus","laravel","lifebuoy","lightbulb","limit","linux","list","list-check-mark","location","lock-closed","lock-closed-check","lock-closed-filled","lock-open","lock-open-cross","lock-open-filled","mail","mail-circle-filled","mail-settings","megaphone","menu","menu-thin","microsoft","minimize","minus","minus-circle","minus-circle-filled","monitoring","monitoring-off","my-little-admin","net","nine-dots","node-js","package","panel","panel-check","panel-eye","panel-key","panel-settings","panels","pause-circle","pencil","pencil-dialog","php","phpmyadmin","pin","pipette","plans","plugins","plus","plus-circle","plus-circle-filled","power","projects","puzzle","python","question-mark-circle","question-mark-circle-filled","ram","react-js","recycle","redirect-circle-filled","refresh","reload","remove","reset","resource","ribbon","rocket","ruby","sand-clock","scan","screen","search","security-check","send","server","servers","share","shield","shield-attention-filled","shield-chain","shield-filled","shopping-cart","sidebar-right-hide","sidebar-right-show","signal-light","site-page","sleep","sliders","square-with-circles","star","star-circle-filled","star-filled","star-half-filled","start","start-circle","start-filled","stop","stop-circle","storage","themes","three-dots-horizontal","three-dots-vertical","tools","transfer","triangle-exclamation-mark","triangle-exclamation-mark-filled","unarchive","user","volume","web","web-plus","web-settings","windows","woocommerce","wordpress","wordpress-minus","zero-circle-filled"],re=["archive","arrow-back","arrow-diagonal-out","arrow-down","arrow-down-circle-filled","arrow-down-in","arrow-down-out","arrow-down-tray","arrow-left","arrow-left-circle-filled","arrow-right","arrow-right-circle-filled","arrow-right-in","arrow-right-out","arrow-up","arrow-up-circle","arrow-up-circle-filled","arrow-up-in","arrow-up-in-cloud","arrow-up-out","arrow-up-tray","arrows-four-directions","arrows-inward","arrows-loop","arrows-opposite","arrows-outward","backup","backup2","bar-chart-vertical","bar-chart-vertical-arrow-up","bar-chart-vertical-lock","bell","book-email","boundary","box-diagonal-bottom-in","box-diagonal-top-in","brush","bug","calendar","calendar-clock","camera","card","card-ribbon","card-row","card-tile","cd","cd-up-in-cloud","chain","chain-broken","chat","check-list","check-mark","check-mark-circle","check-mark-circle-filled","chevron-double-down","chevron-double-up","chevron-down","chevron-left","chevron-right","chevron-up","circle-diagonal","clean","clip","clock","clone","cloud","cloud-checkmark","cloud-crossed","cloud-graph","code","connection","console","console-filled","copy","copy-indicator","cpu","crane","credit-cards","cross-mark","cross-mark-circle","cross-mark-circle-filled","crown-transfer","dashboard","database","database-box","database-filled","database-plus","deploy","docker-filled","dollar","dollar-filled","dot","dot-big","emoticon-confused","emoticon-dead","emoticon-excited","emoticon-happy","emoticon-neutral","emoticon-sad","emoticon-smile","enter","exclamation-mark-circle","exclamation-mark-circle-filled","eye","eye-closed","facebook","facebook-filled","feedback","filter","filter-check-mark","fire","flag","flag-filled","flag-globe","floppy-disk","folder-closed","folder-key","folder-network","folder-open","folders-tree","forward-circle-filled","four-squares","gear","git","github","globe","hard-drive","hard-drive-key","hat","hexagons","home","info-circle","info-circle-filled","ip-addresses","joomla","kebab","key","label","label-plus","laravel","lifebuoy","lightbulb","limit","linux","list","list-check-mark","location","lock-closed","lock-closed-check","lock-closed-filled","lock-open","lock-open-cross","lock-open-filled","mail","mail-circle-filled","mail-settings","megaphone","menu","menu-thin","microsoft","minimize","minus","minus-circle","minus-circle-filled","monitoring","monitoring-off","my-little-admin","net","nine-dots","node-js","package","panel","panel-check","panel-eye","panel-key","panel-settings","panels","pause-circle","pencil","pencil-dialog","php","phpmyadmin","pin","pipette","plans","plugins","plus","plus-circle","plus-circle-filled","power","projects","puzzle","python","question-mark-circle","question-mark-circle-filled","ram","react-js","recycle","redirect-circle-filled","refresh","reload","remove","reset","resource","ribbon","rocket","ruby","sand-clock","scan","screen","search","security-check","send","server","servers","share","shield","shield-attention-filled","shield-chain","shield-filled","shopping-cart","sidebar-right-hide","sidebar-right-show","signal-light","site-page","sleep","sliders","square-with-circles","star","star-circle-filled","star-filled","star-half-filled","start","start-circle","start-filled","stop","stop-circle","storage","themes","three-dots-horizontal","three-dots-vertical","tools","transfer","triangle-exclamation-mark","triangle-exclamation-mark-filled","unarchive","user","volume","web","web-plus","web-settings","windows","woocommerce","wordpress","wordpress-minus","zero-circle-filled"],oe=(0,U.createContext)(!1),le="16",ce="32",ue={sm:le,md:ce,lg:"48",xl:"64",xxl:"96"},de=(e,t)=>{let n="16";return"12"!==t&&"24"!==t||-1===ae.indexOf(e)||(n="12"),`/modules/wp-toolkit/images/symbols.svg#${e}:${n}`},pe=e=>{let{baseClassName:t=`${F.CLS_PREFIX}icon`,className:n,name:s,src:i,size:a,intent:r,animation:o,rotate:l,flipHorizontal:c=!1,flipVertical:u=!1,children:d,alt:p="",...h}=e;const m=a&&ue[a]||a,f=s?ie[s]||s:null;return(0,L.jsx)("span",{className:N()(t,{[`${t}--size-${m}`]:m,[`${t}--intent ${t}--${r}`]:r,[`${t}--animation-${o}`]:o,[`${t}--rotate-${l}`]:l,[`${t}--flip-horizontal`]:c,[`${t}--flip-vertical`]:u,[`${t}--on-dark`]:(0,U.useContext)(oe)},n),...h,children:f?(0,L.jsx)("svg",{focusable:"false",children:(0,L.jsx)("use",{href:de(f,m)})}):i&&(0,L.jsx)("img",{src:i,alt:p})||d})};pe.create=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return e;if((0,U.isValidElement)(e)){const{className:n,...s}=e.props,i={...t};return Object.keys(s).forEach((e=>{null!==s[e]&&void 0!==s[e]&&(i[e]=s[e])})),(t.className||n)&&(i.className=N()(t.className,n)),(0,U.cloneElement)(e,i)}if("object"==typeof e){const{className:n,...s}=e;return(0,L.jsx)(he,{...t,className:t.className||n?N()(t.className,n):null,...s})}return(0,L.jsx)(he,{...t,name:e})};const he=pe,me=e=>{let{baseClassName:t=`${F.CLS_PREFIX}spinner`,className:n,...s}=e;return(0,L.jsx)("svg",{className:N()(t,n),...s,viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",children:(0,L.jsx)("circle",{className:`${t}__path`,fill:"none",strokeWidth:"6",strokeLinecap:"round",cx:"24",cy:"24",r:"21"})})},fe=e=>{let{baseClassName:t=`${F.CLS_PREFIX}action`,component:n="a",icon:s,onClick:i,rightAddon:a,bottomAddon:r,children:o,progress:l=!1,primary:c=!1,nowrap:u=!1,outerProps:d={},...p}=e;const{className:h,component:m="span",...f}=d;s=he.create(s,{className:`${t}__icon`,size:le});let g=le;(0,U.isValidElement)(s)&&s.props.size&&({size:g}=s.props);const b={...p,onClick:i,className:N()(p.className,`${t}__content`)||void 0};return l&&(s=(0,L.jsx)(he,{size:g,className:`${t}__icon`,children:(0,L.jsx)(me,{})}),b.onClick=e=>e.preventDefault(),b.tabIndex=-1),i&&(b.tabIndex=b.tabIndex||0,b.onKeyDown=K(b.onKeyDown,(e=>{"Enter"===e.key&&(e.preventDefault(),e.currentTarget.click())}))),(0,L.jsxs)(m,{className:N()(t,{[`${t}--size-${g}`]:s||l,[`${t}--progress`]:l,[`${t}--primary`]:c,[`${t}--nowrap`]:u,[`${t}--icon`]:!U.Children.toArray(o).length&&!a&&!r},h),...f,children:[(0,L.jsxs)(n,{...b,children:[s,o]}),a?(0,L.jsx)("span",{className:`${t}__right-addon`,children:a}):null,r?(0,L.jsx)("span",{className:`${t}__bottom-addon`,children:r}):null]})},ge=e=>{let{baseClassName:t=`${F.CLS_PREFIX}alert`,className:n,intent:s,children:i,onClose:a,...r}=e;return(0,L.jsxs)("div",{className:N()(t,{[`${t}--${s}`]:s},n),...r,children:[a&&(0,L.jsx)("span",{className:"close",onClick:a}),i]})},be=e=>{let{baseClassName:t=`${F.CLS_PREFIX}auxiliary-actions`,className:n,separator:s=(0,L.jsx)("span",{className:`${t}__separator`,children:" | "}),children:i,...a}=e;return(0,L.jsx)("span",{className:N()(t,n),...a,children:U.Children.toArray(i).reduce(((e,t,n)=>0===e.length?[t]:[...e,(0,U.isValidElement)(s)?(0,U.cloneElement)(s,{key:n}):s,t]),[])})},ve="span",ye=e=>{let{baseClassName:t=`${F.CLS_PREFIX}label`,children:n,className:s,component:i=ve,icon:a,intent:r="inactive",view:o,size:l,caps:c,...u}=e;a=he.create(a,{className:`${t}__icon`,size:"lg"===l?"16":"12"}),void 0!==c||l&&"sm"!==l||(c=!0);let d=i;d===ve&&u.onClick&&(d="button");const p={};return"button"===d&&(p.type="button"),(0,L.jsxs)(d,{className:N()(t,{[`${t}--${o}`]:o,[`${t}--${l}`]:l,[`${t}--${r}`]:r,[`${t}--caps`]:c},s),...p,...u,children:[a,n&&(0,L.jsx)("span",{className:`${t}__content`,children:n})]})},_e=e=>{let{baseClassName:t=`${F.CLS_PREFIX}badge`,className:n,children:s,label:i,intent:a,hidden:r,...o}=e;const l=!i;if(U.Children.toArray(s).length&&!r){if((0,U.isValidElement)(i)||(i=(0,L.jsx)(ye,{intent:"danger",children:i})),(0,U.isValidElement)(i)){const e={className:N()(`${t}__value`,{[`${t}__value--dot`]:l},i.props.className)};!a||i.type!==ye&&i.type!==he||(e.intent=a),i=(0,U.cloneElement)(i,e)}}else i=null;return(0,L.jsxs)("div",{className:N()(t,n),...o,children:[s,i]})},xe=(0,U.createContext)(0),Se=(0,U.createContext)(void 0),we=e=>{let{baseClassName:t=`${F.CLS_PREFIX}layer`,className:n,children:s,innerRef:i,level:a=0,...r}=e;const o=(0,U.useContext)(xe),l=(0,U.useContext)(Se)||document.body;return(0,M.createPortal)((0,L.jsx)(xe.Provider,{value:o+a,children:(0,L.jsx)("div",{className:N()(t,n),ref:i,...r,children:(0,U.isValidElement)(s)?(0,U.cloneElement)(s,{style:{...s.props.style,zIndex:o+a}}):s})}),l)};class ke extends U.Component{constructor(){super(...arguments),B(this,"state",{left:0,top:0,ready:!1,visible:!1}),B(this,"timer",null),B(this,"tooltipRef",(0,U.createRef)()),B(this,"clearTimer",(()=>{this.timer&&(clearTimeout(this.timer),this.timer=null)})),B(this,"handleShow",(()=>{this.clearTimer(),this.setState({visible:!0})})),B(this,"handleHide",(()=>{this.clearTimer(),this.setState({visible:!1,ready:!1})})),B(this,"handleMouseEnter",(()=>{this.timer||(this.setState({ready:!0}),this.timer=setTimeout((()=>this.handleShow()),this.props.delay))})),B(this,"handleMouseMove",(e=>{if(this.tooltipRef.current){const t=e.currentTarget.getBoundingClientRect(),{width:n,height:s}=this.tooltipRef.current.getBoundingClientRect(),i=(e=>{let{clientX:t,clientY:n,tooltipWidth:s,tooltipHeight:i,targetRect:a}=e;const r=((e,t)=>(n,s)=>({top:s,left:n,right:n+e,bottom:s+t}))(s,i),o={top:0,left:0,right:document.documentElement.clientWidth,bottom:document.documentElement.clientHeight},l=[()=>({left:t+8,top:n+16}),()=>({left:t-s-8,top:n+16}),()=>({left:a.left+(a.right-a.left)/2-s/2,top:n+16}),()=>({left:t+8,top:n-i-8}),()=>({left:t-s-8,top:n-i-8}),()=>({left:a.left+(a.right-a.left)/2-s/2,top:n-i-16})];for(let e=0;e<l.length;e++){const t=l[e],{left:n,top:s}=t();if(u=o,(c=r(n,s)).left>=u.left&&c.right<=u.right&&c.top>=u.top&&c.bottom<=u.bottom)return{left:n+window.pageXOffset,top:s+window.pageYOffset}}var c,u;return{top:a.top+16,left:a.left+8}})({clientX:e.clientX,clientY:e.clientY,tooltipWidth:n,tooltipHeight:s,targetRect:t});this.setState({...i})}}))}componentWillUnmount(){this.clearTimer()}renderTooltip(){const{left:e,top:t,visible:n}=this.state,{baseClassName:s,className:i,children:a,title:r,style:o,delay:l,...c}=this.props;return(0,L.jsx)(we,{level:F.Z_INDEX_TOOLTIP,children:(0,L.jsx)("span",{ref:this.tooltipRef,className:N()(s,i),style:{...o,transform:`translate(${e}px, ${t}px)`,visibility:n?"visible":"hidden"},role:"tooltip",...c,children:r})})}render(){const{ready:e}=this.state,{children:t}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,U.cloneElement)(t,{onMouseEnter:K(t.props.onMouseEnter,this.handleMouseEnter),onMouseMove:K(t.props.onMouseMove,this.handleMouseMove),onMouseLeave:K(t.props.onMouseLeave,this.handleHide),onMouseDown:K(t.props.onMouseDown,this.handleHide)}),e&&this.renderTooltip()]})}}B(ke,"defaultProps",{delay:550,style:void 0,className:void 0,baseClassName:`${F.CLS_PREFIX}tooltip`});const je=ke,Te=(0,U.createContext)(void 0);Te.displayName="ResponsiveContext";const Ce=Te,De={defaultProps:{size:void 0}},Pe=(0,U.createContext)(De),Ie=e=>({...De,...e,defaultProps:{...De.defaultProps,...e.defaultProps||{}}}),Oe=Pe,Le={"customize-order":"arrows-four-directions",download:"arrow-down-tray",edit:"pencil",folder:"folder-closed","globe-alt":"globe",import:"arrow-down-in",invisible:"eye-closed",link:"chain",lock:"lock-closed","ok-circle":"check-mark-circle","question-circle":"question-mark-circle","security-scan":"shield",settings:"sliders",suspend:"sleep",unlock:"lock-open",upload:"arrow-up-tray",visible:"eye"},Me=e=>{let{baseClassName:t,icon:n,size:s,empty:i}=e;return he.create(Le[n]||n,{className:`${t}__icon`,size:"lg"===s||i?"16":"12"})},Ae=e=>{let t,{baseClassName:n,size:s,caret:i}=e;return t="boolean"==typeof i&&i?(0,L.jsx)(he,{name:"chevron-down",size:"lg"===s?"16":"12"}):i,(0,U.isValidElement)(t)&&(t=(0,U.cloneElement)(t,{className:N()(`${n}__caret`,t.props.className)})),t},Ee=(0,U.forwardRef)(((e,t)=>{let{baseClassName:n=`${F.CLS_PREFIX}button`,className:s,component:i,size:a,intent:r,ghost:o=!1,selected:l,onToggle:c,state:u,icon:d,caret:p,fill:h=!1,tooltip:m,children:f,arrow:g,disabled:b=!1,...v}=e;const y=i||"button",[_,x]=(0,U.useState)(!1),S=(0,U.useContext)(Ce),w=(0,U.useContext)(Oe),k=a||w.defaultProps.size,j={};"button"===y?j.type="button":"a"===y&&(j.role="button",j.tabIndex=0,b&&(v.href=void 0)),v.onClick&&b&&(v.onClick=e=>{e.preventDefault()});let T=f,C=m;S&&d&&f&&(T=null,m||(C=f)),!v.onClick&&c&&(v.onClick=e=>{e.preventDefault(),c((x(!_),!_))});const D=void 0===l?_:l;(void 0!==l||c)&&(j["aria-pressed"]=`${D}`);const P="forward"===g||"backward"===g,I="button"===y&&b&&m;let O=(0,L.jsxs)(y,{ref:t,className:N()(n,{[`${n}--${k}`]:k,[`${n}--${r}`]:r&&!o,[`${n}--ghost`]:o,[`${n}--${u}`]:u,[`${n}--selected`]:D,[`${n}--disabled`]:b,[`${n}--empty`]:!T,[`${n}--caret`]:p,[`${n}--fill`]:h,[`${n}--arrow ${n}--arrow-${g}`]:P&&!o,[`${n}--on-dark`]:(0,U.useContext)(oe)},s),disabled:I?void 0:b,"aria-disabled":I?"true":void 0,...j,...v,children:[(0,L.jsxs)("span",{className:`${n}__inner`,children:["loading"===u?(0,L.jsx)(me,{className:`${n}__spinner`}):Me({baseClassName:n,icon:d,size:k,empty:!T}),(0,L.jsx)("span",{children:T}),Ae({baseClassName:n,size:k,caret:p})]}),P&&!o&&(0,L.jsx)("span",{className:`${n}__arrow`})]});return C&&(O=(0,L.jsx)(je,{title:C,children:O})),O}));Ee.displayName="Button",Ee.defaultProps={size:void 0,intent:void 0,ghost:!1,selected:void 0,onToggle:void 0,state:void 0,disabled:!1,tooltip:void 0,icon:void 0,caret:void 0,fill:!1,children:void 0,component:"button",className:void 0,baseClassName:`${F.CLS_PREFIX}button`,arrow:void 0,onClick:void 0};const Ue=Ee,Re=e=>{let{baseClassName:t=`${F.CLS_PREFIX}button-group`,className:n,children:s,innerRef:i,...a}=e;return(0,L.jsx)("div",{className:N()(t,n),ref:i,...a,children:s})};var Ne=r(61298),Fe=r.n(Ne);function Ye(){return Ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Ye.apply(this,arguments)}function Be(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}function He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}function Ve(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,He(e,t)}function $e(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}r(35906);const We=U.createContext(null);var ze=function(e){return e.scrollTop},qe="unmounted",Ge="exited",Ke="entering",Xe="entered",Ze="exiting",Je=function(e){function t(t,n){var s;s=e.call(this,t,n)||this;var i,a=n&&!n.isMounting?t.enter:t.appear;return s.appearStatus=null,t.in?a?(i=Ge,s.appearStatus=Ke):i=Xe:i=t.unmountOnExit||t.mountOnEnter?qe:Ge,s.state={status:i},s.nextCallback=null,s}Ve(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===qe?{status:Ge}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==Ke&&n!==Xe&&(t=Ke):n!==Ke&&n!==Xe||(t=Ze)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,s=this.props.timeout;return e=t=n=s,null!=s&&"number"!=typeof s&&(e=s.exit,t=s.enter,n=void 0!==s.appear?s.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===Ke){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:M.findDOMNode(this);n&&ze(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ge&&this.setState({status:qe})},n.performEnter=function(e){var t=this,n=this.props.enter,s=this.context?this.context.isMounting:e,i=this.props.nodeRef?[s]:[M.findDOMNode(this),s],a=i[0],r=i[1],o=this.getTimeouts(),l=s?o.appear:o.enter;e||n?(this.props.onEnter(a,r),this.safeSetState({status:Ke},(function(){t.props.onEntering(a,r),t.onTransitionEnd(l,(function(){t.safeSetState({status:Xe},(function(){t.props.onEntered(a,r)}))}))}))):this.safeSetState({status:Xe},(function(){t.props.onEntered(a)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),s=this.props.nodeRef?void 0:M.findDOMNode(this);t?(this.props.onExit(s),this.safeSetState({status:Ze},(function(){e.props.onExiting(s),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:Ge},(function(){e.props.onExited(s)}))}))}))):this.safeSetState({status:Ge},(function(){e.props.onExited(s)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(s){n&&(n=!1,t.nextCallback=null,e(s))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:M.findDOMNode(this),s=null==e&&!this.props.addEndListener;if(n&&!s){if(this.props.addEndListener){var i=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],a=i[0],r=i[1];this.props.addEndListener(a,r)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===qe)return null;var t=this.props,n=t.children,s=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,Be(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return U.createElement(We.Provider,{value:null},"function"==typeof n?n(e,s):U.cloneElement(U.Children.only(n),s))},t}(U.Component);function Qe(){}Je.contextType=We,Je.propTypes={},Je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Qe,onEntering:Qe,onEntered:Qe,onExit:Qe,onExiting:Qe,onExited:Qe},Je.UNMOUNTED=qe,Je.EXITED=Ge,Je.ENTERING=Ke,Je.ENTERED=Xe,Je.EXITING=Ze;const et=Je;var tt=function(e,t){return e&&t&&t.split(" ").forEach((function(t){return s=t,void((n=e).classList?n.classList.remove(s):"string"==typeof n.className?n.className=$e(n.className,s):n.setAttribute("class",$e(n.className&&n.className.baseVal||"",s)));var n,s}))},nt=function(e){function t(){for(var t,n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(t=e.call.apply(e,[this].concat(s))||this).appliedClasses={appear:{},enter:{},exit:{}},t.onEnter=function(e,n){var s=t.resolveArguments(e,n),i=s[0],a=s[1];t.removeClasses(i,"exit"),t.addClass(i,a?"appear":"enter","base"),t.props.onEnter&&t.props.onEnter(e,n)},t.onEntering=function(e,n){var s=t.resolveArguments(e,n),i=s[0],a=s[1]?"appear":"enter";t.addClass(i,a,"active"),t.props.onEntering&&t.props.onEntering(e,n)},t.onEntered=function(e,n){var s=t.resolveArguments(e,n),i=s[0],a=s[1]?"appear":"enter";t.removeClasses(i,a),t.addClass(i,a,"done"),t.props.onEntered&&t.props.onEntered(e,n)},t.onExit=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"appear"),t.removeClasses(n,"enter"),t.addClass(n,"exit","base"),t.props.onExit&&t.props.onExit(e)},t.onExiting=function(e){var n=t.resolveArguments(e)[0];t.addClass(n,"exit","active"),t.props.onExiting&&t.props.onExiting(e)},t.onExited=function(e){var n=t.resolveArguments(e)[0];t.removeClasses(n,"exit"),t.addClass(n,"exit","done"),t.props.onExited&&t.props.onExited(e)},t.resolveArguments=function(e,n){return t.props.nodeRef?[t.props.nodeRef.current,e]:[e,n]},t.getClassNames=function(e){var n=t.props.classNames,s="string"==typeof n,i=s?(s&&n?n+"-":"")+e:n[e];return{baseClassName:i,activeClassName:s?i+"-active":n[e+"Active"],doneClassName:s?i+"-done":n[e+"Done"]}},t}Ve(t,e);var n=t.prototype;return n.addClass=function(e,t,n){var s=this.getClassNames(t)[n+"ClassName"],i=this.getClassNames("enter").doneClassName;"appear"===t&&"done"===n&&i&&(s+=" "+i),"active"===n&&e&&ze(e),s&&(this.appliedClasses[t][n]=s,function(e,t){e&&t&&t.split(" ").forEach((function(t){return s=t,void((n=e).classList?n.classList.add(s):function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")}(n,s)||("string"==typeof n.className?n.className=n.className+" "+s:n.setAttribute("class",(n.className&&n.className.baseVal||"")+" "+s)));var n,s}))}(e,s))},n.removeClasses=function(e,t){var n=this.appliedClasses[t],s=n.base,i=n.active,a=n.done;this.appliedClasses[t]={},s&&tt(e,s),i&&tt(e,i),a&&tt(e,a)},n.render=function(){var e=this.props,t=(e.classNames,Be(e,["classNames"]));return U.createElement(et,Ye({},t,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(U.Component);nt.defaultProps={classNames:""},nt.propTypes={};const st=nt,it=e=>{let{baseClassName:t=`${F.CLS_PREFIX}checkbox`,className:n,children:s,onChange:i,tooltip:a,checked:r,defaultChecked:o,disabled:l=!1,name:c,indeterminate:u=!1,inputProps:d,rightAddon:p,...h}=e,m=(0,L.jsxs)("div",{className:N()(t,{[`${t}--disabled`]:l,[`${t}--indeterminate`]:u},n),...h,children:[(0,L.jsxs)("label",{className:`${t}__label`,children:[(0,L.jsx)("input",{className:`${t}__input`,type:"checkbox",onChange:e=>{!l&&i&&i(e.target.checked)},checked:!u&&r,defaultChecked:o,disabled:l,name:c,...d}),(0,L.jsx)("span",{className:`${t}__indicator`}),s?(0,L.jsx)("span",{className:`${t}__text`,children:s}):null]}),p||null]});return a&&(m=(0,L.jsx)(je,{title:a,children:m})),m},at=()=>"rtl"===getComputedStyle(document.documentElement).direction;let rt=!0;const ot=(0,U.createContext)(null);class lt extends U.Component{constructor(){super(...arguments),B(this,"context",void 0),B(this,"children",[]),B(this,"addChild",(e=>{this.children.push(e)})),B(this,"removeChild",(e=>{this.children=this.children.filter((t=>t!==e))})),B(this,"getIgnoreNodes",(()=>{const{ignoreNodes:e}=this.props,t="function"==typeof e?e():[];return t.push(this),this.children.forEach((e=>e.getIgnoreNodes().forEach((e=>t.push(e))))),t})),B(this,"onOutsideClick",(e=>{const t=e.target;this.getIgnoreNodes().map((e=>e instanceof lt&&e.props.nodeRef&&e.props.nodeRef.current?e.props.nodeRef.current:e instanceof U.Component?(0,M.findDOMNode)(e):e instanceof Node?e:e&&e.current instanceof Node?e.current:null)).some((e=>Boolean(e&&t instanceof Node&&e.contains(t))))||this.props.onClose&&this.props.onClose()}))}componentDidMount(){document.body.addEventListener("click",this.onOutsideClick,{capture:!0}),this.context&&this.context.addChild(this)}componentWillUnmount(){document.body.removeEventListener("click",this.onOutsideClick,{capture:!0}),this.context&&this.context.removeChild(this)}render(){return(0,L.jsx)(ot.Provider,{value:this,children:U.Children.only(this.props.children)})}}lt.contextType=ot;const ct=lt;var ut=r(28981);class dt extends U.Component{constructor(){super(...arguments),B(this,"state",{popperStyle:null,arrowStyle:null,actualPlacement:this.props.placement}),B(this,"popper",null),B(this,"contentRef",(0,U.createRef)()),B(this,"arrowRef",null),B(this,"extractStyles",(e=>{const{onUpdate:t}=this.props,n={popperStyle:{...e.hide?{visibility:"hidden",pointerEvents:"none"}:void 0,...e.styles,position:e.offsets.popper.position},actualPlacement:e.placement,arrowStyle:e.arrowStyles};this.setState(n),t?.(n)}))}componentDidMount(){this.updatePopper(this.props)}componentDidUpdate(e){const{show:t,boundariesElement:n,placement:s,offset:i,behavior:a,arrow:r,children:o}=this.props;e.show===t&&e.boundariesElement===n&&e.placement===s&&e.offset===i&&e.behavior===a&&e.arrow===r&&e.children===o||setTimeout((()=>{this.updatePopper(this.props)}),0)}componentWillUnmount(){this.popper&&this.popper.destroy()}updatePopper(e){let{show:t,boundariesElement:n,placement:s,offset:i,behavior:a,arrow:r,targetRef:o}=e;if(this.popper&&this.popper.destroy(),!this.contentRef.current||!t)return;const l={placement:s,modifiers:{applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.extractStyles,order:900},preventOverflow:{enabled:!0,boundariesElement:n},hide:{enabled:!0},offset:{enabled:!0,offset:i},flip:{enabled:!0,padding:0,behavior:a},arrow:r&&this.arrowRef?{enabled:!0,element:this.arrowRef}:void 0}};let c;c=o&&o.current?o.current:(0,M.findDOMNode)(this),this.popper=new ut.Z(c,this.contentRef.current,l)}render(){const{baseClassName:e,className:t,children:n,target:s,targetRef:i,arrow:a,placement:r,behavior:o,offset:l,onUpdate:c,zIndex:u,show:d,boundariesElement:p,style:h,...m}=this.props,{popperStyle:f}=this.state,{arrowStyle:g,actualPlacement:b}=this.state,v=a&&(0,U.cloneElement)(a,{ref:e=>this.arrowRef=e,style:g});return(0,L.jsxs)(U.Fragment,{children:[s,d?(0,L.jsx)(we,{level:u,children:(0,L.jsxs)("div",{ref:this.contentRef,className:N()(e,t,`${e}--placement-${b}`),style:{...h,...f||{position:"fixed",opacity:0}},...m,children:[n,v]})}):null]})}}B(dt,"defaultProps",{show:!0,children:null,arrow:null,placement:"bottom-start",behavior:"flip",offset:"0, 0",onUpdate:null,className:null,baseClassName:`${F.CLS_PREFIX}popper`,zIndex:null,boundariesElement:"window",style:void 0,targetRef:void 0});const pt=dt,ht=e=>{let{className:t,baseClassName:n=`${F.CLS_PREFIX}menu__divider`,...s}=e;return(0,L.jsx)("div",{className:N()(n,t),role:"separator",...s})},mt=e=>{let{className:t,children:n,icon:s,label:i,component:a="div",baseClassName:r=`${F.CLS_PREFIX}menu__base-item`,...o}=e;return(0,L.jsxs)(a,{className:N()(r,t),...o,children:[(0,L.jsx)("div",{className:`${r}-icon`,children:he.create(s,{size:le})}),(0,L.jsx)("div",{className:`${r}-content`,children:n}),(0,L.jsx)("div",{className:`${r}-label`,children:i})]})},ft=e=>{let{className:t,children:n,onClick:s,icon:i,label:a,tooltip:r,baseClassName:o=`${F.CLS_PREFIX}menu__item`,disabled:l=!1,active:c=!1,...u}=e;const d=(0,L.jsx)(mt,{className:N()(o,t,{[`${o}--active`]:c,[`${o}--disabled`]:l}),onClick:e=>{s&&!l&&s(e)},role:"menuitem","aria-disabled":l?"true":void 0,tabIndex:l?-1:0,icon:i,label:a,...u,children:n});return r?Z((e=>(0,L.jsx)(je,{title:r,children:(0,U.cloneElement)(d,e)}))):d},gt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=[];let s,i=!1;for(;s=e.match(/%%(\w+)%%/);){const{index:a=0}=s;a>0&&n.push(e.substr(0,a));const r=t[s[1]];void 0===r?n.push(s[0]):"object"==typeof r&&(0,U.isValidElement)(r)?(n.push((0,U.cloneElement)(r,{key:s[1]})),i=!0):n.push(r),e=e.substr(a+s[0].length)}return""!==e&&n.push(e),i?n:n.join("")},bt=(e,t)=>{const[n,...s]=e.split("."),i=t[n];return"object"==typeof i&&s.length?bt(s.join("."),i):t[e]},vt=e=>function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;if("string"!=typeof t)return"";let i=bt(t,e);return"string"!=typeof i&&(i="string"==typeof s?s:`[${t}]`),gt(i,n)},yt=(0,U.createContext)(void 0),_t=e=>{const t=(0,U.useContext)(yt);return(0,U.useCallback)(((n,s,i)=>{if(t){const{locale:{lmsg:a}}=t;return a(e?`${e}.${n}`:n,s,i)}return"string"==typeof i?gt(i,s):`[${n}]`}),[t,e])};class xt extends U.PureComponent{getChildContext(){const{messages:e}=this.props;return{locale:{lmsg:vt(e)}}}render(){const{children:e}=this.props;return(0,L.jsx)(yt.Provider,{value:this.getChildContext(),children:e})}}B(xt,"childContextTypes",{locale:Fe().object});const St=xt,wt=e=>{let{component:t,content:n,children:s,params:i,unsafe:a,fallback:r,namespace:o,translators:l,...c}=e;const u=t||"span",d=_t(o),p=n||s||"",h=l&&l[p];if(h)return"function"==typeof h?h(i):h;const m=d(p,i,r),f={...c};return a?f.dangerouslySetInnerHTML={__html:m}:f.children=m,(0,L.jsx)(u,{...f})},kt=e=>{const[t,n]=e.split("-");return n&&at()&&-1!==["top","bottom"].indexOf(t)?`${t}-${"start"===n?"end":"start"}`:e},jt=e=>{let{baseClassName:t,className:n,children:s,menu:i,menuPlacement:a,overlay:r,locale:o,...l}=e;const[c,u]=(0,U.useState)(!1),[d,p]=(0,U.useState)(!1),h=(0,U.useRef)();(0,U.useEffect)((()=>()=>{clearTimeout(h.current)}),[]);const m=()=>{h.current=setTimeout((()=>{u(!1)}),0)},{enhancedMenu:f,menuRef:g}=((e,t)=>{let{baseClassName:n,onClose:s,overlay:i,locale:a,autoFocus:r}=t;const o=(0,U.useRef)(),l=(0,U.useRef)();(0,U.useEffect)((()=>{o.current&&!i&&(l.current=document.activeElement,setTimeout((()=>{o.current&&o.current.focus()})))}));const c=()=>{l.current&&l.current.focus(),s()};let{children:u}=e.props;i&&(u=[...e.props.children,(0,L.jsx)(ht,{className:`${n}__overlay-menu-divider`},"divider"),(0,L.jsx)(ft,{onClick:c,children:(0,L.jsx)(wt,{namespace:"Dropdown",content:"close",translators:a,fallback:"Close"})},"close")]);const d=(0,U.cloneElement)(e,{onItemClick:K(e.props.onItemClick,c),className:N()(`${n}__menu`,e.props.className),overlay:i,ref:o,children:u,onKeyDown:e=>{switch(e.stopPropagation(),e.key){case"Enter":e.preventDefault(),document.activeElement.click();break;case"Escape":e.preventDefault(),c();break;case"Tab":c()}},autoFocus:r});return{enhancedMenu:d,menuRef:o}})(i,{baseClassName:t,onClose:m,overlay:r,locale:o,autoFocus:d}),b=(0,U.useRef)(),v=((e,t)=>{let{onToggle:n,targetRef:s}=t;(0,U.isValidElement)(e)&&e.type!==wt||(e=(0,L.jsx)(Ue,{caret:!0,children:e}));let i=!1;return(0,U.cloneElement)(e,{onKeyDown:K(e.props.onKeyDown,(e=>{i=" "===e.key||"Enter"===e.key})),onClick:K(e.props.onClick,(e=>{s.current=e.currentTarget,n(i),i=!1})),"aria-haspopup":!0})})(s,{onToggle:e=>{p(e),u(!0)},targetRef:b});return(0,L.jsx)("div",{className:N()(t,{[`${t}--opened`]:c},n),...l,children:r?(0,L.jsxs)(L.Fragment,{children:[v,c&&(0,L.jsx)(we,{level:F.Z_INDEX_OVERLAY,children:(0,L.jsx)("div",{className:`${t}__overlay`,children:(0,L.jsx)(ct,{onClose:m,nodeRef:g,children:(0,L.jsx)("div",{className:`${t}__overlay-menu`,children:f})})})})]}):(0,L.jsx)(pt,{target:v,targetRef:b,placement:kt(a),show:c,className:`${t}__popper`,zIndex:F.Z_INDEX_DROPDOWN,children:(0,L.jsx)(ct,{onClose:m,nodeRef:g,children:f})})})};jt.defaultProps={menuPlacement:"bottom-start",children:void 0,overlay:!1,className:void 0,baseClassName:`${F.CLS_PREFIX}dropdown`,locale:void 0};const Tt=jt,Ct=["clock","emoticon-smile","rocket","sand-clock","sleep","web","star"],Dt=(e,t,n)=>{const s=(0,U.useRef)(null),[i,a]=(0,U.useState)(t);return(0,U.useEffect)((()=>{const t=s.current,i=()=>{n()&&a((t=>(t+2)%e.length))};return t&&t.addEventListener("animationiteration",i),()=>{t&&t.removeEventListener("animationiteration",i)}}),[e]),[e[i],s]},Pt=e=>{let{baseClassName:t=`${F.CLS_PREFIX}icons-loader`,className:n,icons:s,size:i,style:a,...r}=e;const o=(0,U.useRef)("icon1");s?.length?1===s.length&&(s=[s[0],s[0]]):s=Ct;const[l,c]=Dt(s,0,(()=>"icon1"===o.current&&(o.current="icon2",!0))),[u,d]=Dt(s,1,(()=>"icon2"===o.current&&(o.current="icon1",!0)));return(0,L.jsxs)("div",{className:N()(t,n),style:{...a,"--icons-loader-size":i||void 0},...r,children:[(0,L.jsx)("div",{className:N()(`${t}__icon`,`${t}__icon--1`),ref:c,children:he.create(l,{size:i||"64"})}),(0,L.jsx)("div",{className:N()(`${t}__icon`,`${t}__icon--2`),ref:d,children:he.create(u,{size:i||"64"})})]})},It=e=>{let{baseClassName:t=`${F.CLS_PREFIX}content-loader`,className:n,text:s,overlay:i=!1,children:a,backdrop:r=!1,blur:o=!1,loading:l=!0,loader:c="spinner",spinner:u,...d}=e;if(!l)return a;U.Children.toArray(a).length&&i&&(a=(0,L.jsx)("div",{className:N()(`${t}__content`,o&&`${t}__content--blur`),children:a}));const{loaderType:p,loaderProps:h}=(e=>{let t,n={};return"object"==typeof e&&({type:t,...n}=e),"string"==typeof e&&(t=e),{loaderType:t,loaderProps:n}})(c);return h.className=N()(`${t}__indicator`,{[`${t}__indicator--sm`]:"spinner"===p&&u&&"sm"===u.size}),(0,L.jsxs)("div",{className:N()(t,!U.Children.toArray(a).length&&i&&`${t}--overlay`,n),...d,children:[a,(0,L.jsx)("div",{className:N()(`${t}__container`,i&&`${t}__overlay`,r&&`${t}__backdrop`),children:(0,L.jsxs)("div",{className:N()(`${t}__loader`,`${t}__loader--${p}`),children:["spinner"===p&&(0,L.jsx)(me,{...h}),"icons"===p&&(0,L.jsx)(Pt,{...h}),s&&(0,L.jsx)("div",{className:`${t}__text`,children:s})]})})]})},Ot=e=>{let{icon:t,...n}=e;return(0,L.jsx)(Ue,{icon:he.create(t),...n})};Ot.propTypes={baseClassName:Fe().string,icon:Fe().oneOfType([Fe().string,Fe().object,Fe().element]).isRequired},Ot.defaultProps={baseClassName:`${F.CLS_PREFIX}card-button`};const Lt=Ot,Mt="/modules/wp-toolkit/images/no-image.svg",At=e=>{let{background:t,image:n,padding:s=0,alt:i,children:a,className:r,baseClassName:o=`${F.CLS_PREFIX}preview-panel`,html:l,...c}=e;const u=(e=>{let{image:t,background:n}=e;return t?{url:t,type:"image"}:n?{url:n,type:"background"}:{url:Mt,type:"noImage"}})({image:n,background:t}),[d,p]=(0,U.useState)("noImage"===u.type?"success":"loading");return(0,U.useEffect)((()=>{let e=p;const t=()=>{e=()=>{}};return"noImage"===u.type?(e("success"),t):(p("loading"),((e,t)=>{let{onSuccess:n,onFailure:s}=t;const i=new Image;i.onload=n,i.onerror=s,i.src=e})(u.url,{onSuccess:()=>e("success"),onFailure:()=>e("failure")}),t)}),[u.type,u.url]),(0,L.jsxs)("div",{className:N()(o,{[`${o}--background`]:"background"===u.type},`${o}--${d}`,r),...c,...(()=>{if("background"!==u.type)return null;let e;switch(d){case"success":e=u.url;break;case"failure":e=Mt;break;default:return null}return{style:{...c.style,backgroundImage:`url("${e}")`}}})(),children:["loading"===d?(0,L.jsx)("div",{className:`${o}__loader`,children:(0,L.jsx)(It,{})}):null,(()=>{if("image"!==u.type&&"noImage"!==u.type)return null;let e;switch(d){case"success":e=u.url;break;case"failure":e=Mt}const t={};return"loading"!==d&&(t.src=e,i&&(t.alt=i)),s&&(t.style={padding:`${s instanceof Array?s.join("px "):s}px`}),(0,L.jsx)("img",{className:`${o}__image`,...t})})(),(0,L.jsx)("div",{className:N()(`${o}__content`,{[`${o}__content--empty`]:!a}),children:(0,L.jsx)("div",{className:`${o}__content-inner`,children:a})})]})},Et="tile",Ut="extended",Rt="row";class Nt extends U.Component{constructor(){super(...arguments),B(this,"state",{}),B(this,"rootRef",(0,U.createRef)()),B(this,"handleToggleView",(()=>{const{view:e}=this.state;this.setState({view:e===Ut?Rt:Ut})}))}static getDerivedStateFromProps(e,t){const{view:n}=e,{prevView:s}=t,i={};return n!==s&&(i.view=n),i.prevView=n,i}renderSelection(){const{baseClassName:e,selection:t}=this.props;if(!t)return null;const{isSelected:n,onSelectionChange:s}=t;return(0,L.jsx)("div",{className:`${e}__selection`,children:(0,L.jsx)(it,{checked:n,onChange:e=>s({isSelected:e}),children:this.isExtended()?(0,L.jsx)(wt,{content:"Card.select",fallback:"Select"}):null})})}renderTitle(){const{baseClassName:e,title:t,titleLink:n}=this.props,s="string"==typeof n?{href:n}:n;return(0,L.jsxs)("div",{className:`${e}__title`,children:[(0,L.jsx)("span",{className:`${e}__title-text`,children:t}),s&&(0,L.jsx)(Lt,{component:"a",icon:"chain",tooltip:(0,L.jsx)(wt,{content:"Card.titleLinkTooltip",fallback:"Go to page"}),...s}),this.isExtended()&&this.renderTitleLabels()]})}renderTitleLabels(){const{baseClassName:e,titleLabels:t}=this.props;return 0===t.length?null:(0,L.jsx)("div",{className:`${e}__title-labels`,children:U.Children.map(t,(t=>(0,U.cloneElement)(t,{className:N()(`${e}__label`,t.props.className)})))})}renderLabels(){const{baseClassName:e,labels:t}=this.props;return 0===t.length?null:(0,L.jsx)("div",{className:`${e}__labels`,children:U.Children.map(t,(t=>(0,U.cloneElement)(t,{className:N()(`${e}__label`,t.props.className)})))})}renderHeader(){const{baseClassName:e}=this.props;return(0,L.jsxs)("div",{className:`${e}__header`,children:[this.renderSelection(),this.renderTitle(),this.isExtended()&&this.renderLabels(),this.renderButtons()]})}renderRowHeader(){const{baseClassName:e,subtitle:t}=this.props;return(0,L.jsxs)("div",{className:`${e}__header`,children:[t&&(0,L.jsx)("div",{className:`${e}__subtitle`,children:t}),this.renderTitle()]})}renderContent(){const{baseClassName:e,children:t}=this.props;return(0,L.jsx)("div",{className:`${e}__main`,children:(0,L.jsx)("div",{className:`${e}__main-content`,children:t})})}isExtended(){const{view:e}=this.state;return!this.isTile()&&e===Ut}isTile(){const{view:e}=this.state;return e===Et}isRow(){const{view:e}=this.state;return!this.isTile()&&e===Rt}renderButtons(){const{baseClassName:e,rowContent:t,menu:n,buttons:s}=this.props,i=[];return this.isRow()||s.forEach(((e,t)=>{i.push((0,L.jsx)(Lt,{...e},e.key||t))})),n&&i.push((0,L.jsx)(Tt,{menu:n,menuPlacement:"bottom-end",children:(0,L.jsx)(Lt,{icon:"menu"})},"menu")),t&&!this.isTile()&&i.push((0,L.jsx)(Lt,{icon:{name:"chevron-down",flipVertical:this.isExtended()},onClick:this.handleToggleView,tooltip:this.isExtended()?(0,L.jsx)(wt,{content:"Card.collapseCardTooltip",fallback:"Collapse the card"}):(0,L.jsx)(wt,{content:"Card.expandCardTooltip",fallback:"Expand the card"})},"toggleView")),0===i.length?null:(0,L.jsx)("div",{className:`${e}__buttons`,children:i})}renderSideHeader(){const{sideHeader:e,baseClassName:t}=this.props;if(!e)return null;let n=e;if(e.type===At){const s={className:N()(e.props.className,`${t}__preview-panel`)};this.isRow()&&(s.children=null),n=(0,U.cloneElement)(e,s)}return(0,L.jsx)("div",{className:`${t}__side-header`,children:n})}renderSideContent(){const{sideContent:e,baseClassName:t}=this.props;return e?(0,L.jsx)("div",{className:`${t}__side-content`,children:e}):null}renderRow(){const{baseClassName:e,rowContent:t}=this.props;return(0,L.jsx)("div",{className:`${e}__inner`,children:(0,L.jsxs)("div",{className:`${e}__body`,children:[this.renderSelection(),this.renderSideHeader(),this.renderRowHeader(),(0,L.jsx)("div",{className:`${e}__main`,children:(0,L.jsx)("div",{className:`${e}__main-content`,children:t})}),this.renderButtons()]})})}renderTile(){const{baseClassName:e}=this.props;return(0,L.jsxs)("div",{className:`${e}__inner`,children:[this.renderHeader(),(0,L.jsxs)("div",{className:`${e}__body`,children:[this.renderSideHeader(),this.renderContent()]}),this.renderSideContent()]})}renderExtended(){const{baseClassName:e}=this.props,t=this.renderSideHeader(),n=this.renderSideContent();return(0,L.jsxs)("div",{className:`${e}__inner`,children:[this.renderHeader(),(0,L.jsxs)("div",{className:`${e}__body`,children:[t||n?(0,L.jsxs)("div",{className:`${e}__side`,children:[t,n]}):null,this.renderContent()]})]})}render(){const{baseClassName:e,className:t,children:n,view:s,intent:i,title:a,subtitle:r,titleLink:o,titleLabels:l,selection:c,rowContent:u,sideHeader:d,sideContent:p,buttons:h,menu:m,labels:f,progress:g,...b}=this.props;return(0,L.jsx)(st,{classNames:`${e}-`,in:this.isExtended(),timeout:300,nodeRef:this.rootRef,children:(0,L.jsxs)("div",{className:N()(e,{[`${e}--extended`]:this.isExtended(),[`${e}--tile`]:this.isTile(),[`${e}--row`]:this.isRow(),[`${e}--${i}`]:i,[`${e}--progress`]:g},t),...b,ref:this.rootRef,children:[this.isExtended()&&this.renderExtended(),this.isTile()&&this.renderTile(),this.isRow()&&this.renderRow(),g&&(0,L.jsx)(It,{overlay:!0,backdrop:!0,text:!0===g?null:g})]})})}}Nt.propTypes={children:Fe().node,view:Fe().oneOf([Ut,Et,Rt]),intent:Fe().oneOf(["warning","danger","inactive"]),title:Fe().node.isRequired,titleLink:Fe().oneOfType([Fe().string,Fe().object]),titleLabels:Fe().arrayOf(Fe().element),subtitle:Fe().node,labels:Fe().arrayOf(Fe().element),buttons:Fe().arrayOf(Fe().shape({icon:Fe().oneOfType([Fe().string,Fe().object,Fe().element]).isRequired,onClick:Fe().func.isRequired,tooltip:Fe().node})),menu:Fe().element,selection:Fe().shape({isSelected:Fe().bool.isRequired,onSelectionChange:Fe().func.isRequired}),sideHeader:Fe().element,sideContent:Fe().element,rowContent:Fe().any,progress:Fe().oneOfType([Fe().bool,Fe().node]),className:Fe().string,baseClassName:Fe().string},Nt.defaultProps={children:null,view:Ut,intent:null,subtitle:"",titleLink:null,titleLabels:[],labels:[],buttons:[],menu:null,selection:null,sideHeader:null,sideContent:null,rowContent:null,progress:!1,className:null,baseClassName:`${F.CLS_PREFIX}card`};const Ft=Nt;function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Yt.apply(this,arguments)}function Bt(e,t){return Bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Bt(e,t)}var Ht=r(45697),Vt=r.n(Ht),$t=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,s){return e[0]===t&&(n=s,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),s=this.__entries__[n];return s&&s[1]},t.prototype.set=function(t,n){var s=e(this.__entries__,t);~s?this.__entries__[s][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,s=e(n,t);~s&&n.splice(s,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,s=this.__entries__;n<s.length;n++){var i=s[n];e.call(t,i[1],i[0])}},t}()}(),Wt="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,zt=void 0!==r.g&&r.g.Math===Math?r.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),qt="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(zt):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)},Gt=["top","right","bottom","left","width","height","size","weight"],Kt="undefined"!=typeof MutationObserver,Xt=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,s=!1,i=0;function a(){n&&(n=!1,e()),s&&o()}function r(){qt(a)}function o(){var e=Date.now();if(n){if(e-i<2)return;s=!0}else n=!0,s=!1,setTimeout(r,20);i=e}return o}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){Wt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Kt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){Wt&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;Gt.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Zt=function(e,t){for(var n=0,s=Object.keys(t);n<s.length;n++){var i=s[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},Jt=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||zt},Qt=an(0,0,0,0);function en(e){return parseFloat(e)||0}function tn(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+en(e["border-"+n+"-width"])}),0)}var nn="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof Jt(e).SVGGraphicsElement}:function(e){return e instanceof Jt(e).SVGElement&&"function"==typeof e.getBBox};function sn(e){return Wt?nn(e)?function(e){var t=e.getBBox();return an(0,0,t.width,t.height)}(e):function(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Qt;var s=Jt(e).getComputedStyle(e),i=function(e){for(var t={},n=0,s=["top","right","bottom","left"];n<s.length;n++){var i=s[n],a=e["padding-"+i];t[i]=en(a)}return t}(s),a=i.left+i.right,r=i.top+i.bottom,o=en(s.width),l=en(s.height);if("border-box"===s.boxSizing&&(Math.round(o+a)!==t&&(o-=tn(s,"left","right")+a),Math.round(l+r)!==n&&(l-=tn(s,"top","bottom")+r)),!function(e){return e===Jt(e).document.documentElement}(e)){var c=Math.round(o+a)-t,u=Math.round(l+r)-n;1!==Math.abs(c)&&(o-=c),1!==Math.abs(u)&&(l-=u)}return an(i.left,i.top,o,l)}(e):Qt}function an(e,t,n,s){return{x:e,y:t,width:n,height:s}}var rn=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=an(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=sn(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),on=function(e,t){var n=function(e){var t=e.x,n=e.y,s=e.width,i=e.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,r=Object.create(a.prototype);return Zt(r,{x:t,y:n,width:s,height:i,top:n,right:t+s,bottom:i+n,left:t}),r}(t);Zt(this,{target:e,contentRect:n})},ln=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new $t,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Jt(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new rn(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof Jt(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new on(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),cn="undefined"!=typeof WeakMap?new WeakMap:new $t,un=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Xt.getInstance(),s=new ln(t,n,this);cn.set(this,s)};["observe","unobserve","disconnect"].forEach((function(e){un.prototype[e]=function(){var t;return(t=cn.get(this))[e].apply(t,arguments)}}));const dn=void 0!==zt.ResizeObserver?zt.ResizeObserver:un;var pn=["client","offset","scroll","bounds","margin"];function hn(e){var t=[];return pn.forEach((function(n){e[n]&&t.push(n)})),t}function mn(e,t){var n={};if(t.indexOf("client")>-1&&(n.client={top:e.clientTop,left:e.clientLeft,width:e.clientWidth,height:e.clientHeight}),t.indexOf("offset")>-1&&(n.offset={top:e.offsetTop,left:e.offsetLeft,width:e.offsetWidth,height:e.offsetHeight}),t.indexOf("scroll")>-1&&(n.scroll={top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}),t.indexOf("bounds")>-1){var s=e.getBoundingClientRect();n.bounds={top:s.top,right:s.right,bottom:s.bottom,left:s.left,width:s.width,height:s.height}}if(t.indexOf("margin")>-1){var i=getComputedStyle(e);n.margin={top:i?parseInt(i.marginTop):0,right:i?parseInt(i.marginRight):0,bottom:i?parseInt(i.marginBottom):0,left:i?parseInt(i.marginLeft):0}}return n}function fn(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||window}var gn=function(e){var t,n;return n=t=function(t){var n,s;function i(){for(var e,n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return(e=t.call.apply(t,[this].concat(s))||this).state={contentRect:{entry:{},client:{},offset:{},scroll:{},bounds:{},margin:{}}},e._animationFrameID=null,e._resizeObserver=null,e._node=null,e._window=null,e.measure=function(t){var n=mn(e._node,hn(e.props));t&&(n.entry=t[0].contentRect),e._animationFrameID=e._window.requestAnimationFrame((function(){null!==e._resizeObserver&&(e.setState({contentRect:n}),"function"==typeof e.props.onResize&&e.props.onResize(n))}))},e._handleRef=function(t){null!==e._resizeObserver&&null!==e._node&&e._resizeObserver.unobserve(e._node),e._node=t,e._window=fn(e._node);var n=e.props.innerRef;n&&("function"==typeof n?n(e._node):n.current=e._node),null!==e._resizeObserver&&null!==e._node&&e._resizeObserver.observe(e._node)},e}s=t,(n=i).prototype=Object.create(s.prototype),n.prototype.constructor=n,Bt(n,s);var a=i.prototype;return a.componentDidMount=function(){this._resizeObserver=null!==this._window&&this._window.ResizeObserver?new this._window.ResizeObserver(this.measure):new dn(this.measure),null!==this._node&&(this._resizeObserver.observe(this._node),"function"==typeof this.props.onResize&&this.props.onResize(mn(this._node,hn(this.props))))},a.componentWillUnmount=function(){null!==this._window&&this._window.cancelAnimationFrame(this._animationFrameID),null!==this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)},a.render=function(){var t=this.props,n=(t.innerRef,t.onResize,function(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["innerRef","onResize"]));return(0,U.createElement)(e,Yt({},n,{measureRef:this._handleRef,measure:this.measure,contentRect:this.state.contentRect}))},i}(U.Component),t.propTypes={client:Vt().bool,offset:Vt().bool,scroll:Vt().bool,bounds:Vt().bool,margin:Vt().bool,innerRef:Vt().oneOfType([Vt().object,Vt().func]),onResize:Vt().func},n}((function(e){var t=e.measure,n=e.measureRef,s=e.contentRect;return(0,e.children)({measure:t,measureRef:n,contentRect:s})}));gn.displayName="Measure",gn.propTypes.children=Vt().func;const bn=gn,vn=e=>{let{baseClassName:t=`${F.CLS_PREFIX}input`,className:n,size:s="md",type:i="text",textAlign:a,prefix:r,suffix:o,innerRef:l,rootProps:c,...u}=e;const d="string"==typeof s&&-1!==["sm","md","lg","xl","fill"].indexOf(s);return(0,L.jsxs)("span",{className:N()(t,{[`${t}--size-${s}`]:d,[`${t}--text-${a}`]:a,[`${t}--affix`]:r||o},n),...c,children:[r&&(0,L.jsx)("span",{className:`${t}__prefix`,children:r}),(0,L.jsx)("input",{ref:l,type:i,size:"number"==typeof s?s:void 0,className:`${t}__input`,...u}),o&&(0,L.jsx)("span",{className:`${t}__suffix`,children:o})]})},yn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER||-(Math.pow(2,53)-1),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1;return void 0!==n&&e>n?n:void 0!==t&&e<t?t:e},_n=e=>{if(""===String(e).trim())return!1;const t=parseFloat(String(e));return"number"==typeof t&&!isNaN(t)},xn=e=>{if("string"==typeof e){const t=parseFloat(e);return _n(t)?t:0}return e},Sn=e=>{let{baseClassName:t=`${F.CLS_PREFIX}input-number`,className:n,defaultValue:s,value:i,disabled:a,onChange:r,min:o,max:l,step:c=1,decrementIcon:u="minus",incrementIcon:d="plus",...p}=e;const h=(0,U.useRef)(null),m=void 0!==i,f="number"==typeof s?s:"",g="number"==typeof i?i:"",[b,v]=(0,U.useState)(m?g:f),y=(0,U.useRef)(Number(m?g:f));(0,U.useLayoutEffect)((()=>{m&&v(g)}),[m,g]);const _=e=>{y.current!==e&&(y.current=e,G(r,e))},x=e=>()=>{const t=yn(xn(b)+e,o,l);m&&t!==g||v(t),_(t)},S=x(+c),w=x(-c),k=()=>{let e;_n(b)?(e=yn(xn(b),o,l),_(e)):e="",v(m?g:e)},j=e=>{e.preventDefault(),e.currentTarget.hasAttribute("disabled")||h.current&&document.activeElement!==h.current&&h.current.focus()},T=a||((e,t)=>void 0!==t&&""!==e&&+e<=t)(b,o),C=a||((e,t)=>void 0!==t&&""!==e&&+e>=t)(b,l);return(0,L.jsx)(vn,{textAlign:"center",size:"sm",...p,value:b,disabled:a,onChange:e=>{const t=e.target.value;let n=t;""===String(t).trim()&&(n=""),v(n)},onKeyDown:e=>{switch(e.key){case"ArrowUp":S();break;case"ArrowDown":w();break;case"Enter":k()}},onBlur:k,className:N()(t,n),innerRef:h,prefix:(0,L.jsx)(Ue,{icon:u,ghost:!0,disabled:T,onClick:w,onMouseDown:j,className:`${t}__dec`}),suffix:(0,L.jsx)(Ue,{icon:d,ghost:!0,disabled:C,onClick:S,onMouseDown:j,className:`${t}__inc`})})},wn=e=>{let{baseClassName:t=`${F.CLS_PREFIX}link`,className:n,onClick:s,disabled:i=!1,pseudo:a=!1,component:r,children:o,...l}=e;const c=r||"a",u=(0,U.useContext)(oe),d={...l,onClick:s,className:N()(t,n,{[`${t}--disabled`]:i,[`${t}--pseudo`]:a,[`${t}--on-dark`]:u})},{target:p}=l,h=!a&&"_blank"===p;return h&&!d.rel&&(d.rel="noopener noreferrer"),i&&(d.onClick=e=>e.preventDefault(),d.tabIndex=-1),s&&(d.tabIndex=d.tabIndex||0,d.onKeyDown=K(d.onKeyDown,(e=>{"Enter"===e.key&&(e.preventDefault(),e.currentTarget.click())}))),(0,L.jsxs)(c,{...d,children:[o,h&&(0,L.jsx)(he,{flipHorizontal:at(),name:"arrow-diagonal-out",className:`${t}__external-icon`})]})},kn=e=>{let{baseClassName:t=`${F.CLS_PREFIX}heading`,className:n,icon:s,children:i,component:a,level:r=1,...o}=e;a||(a=`h${r}`);let l=le;return 1===r&&(l=ce),2!==r&&3!==r||(l="24"),6===r&&(l="12"),(0,L.jsxs)(a,{className:N()(t,{[`${t}--h${r}`]:r,[`${t}--icon`]:s},n),...o,children:[he.create(s,{className:`${t}__icon`,size:l}),s?(0,L.jsx)("span",{className:`${t}__text`,children:i}):i]})},jn=e=>{if("string"==typeof e)return!0;if((0,U.isValidElement)(e)&&e.type===wt){const{component:t,children:n}=e.props;if(void 0===t&&("string"==typeof n||null==n))return!0}return!1},Tn=e=>{if(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return"hidden"!==e.type&&"file"!==e.type;case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}};class Cn{constructor(){B(this,"ignoreFocusChange",!1)}canIgnoreFocusChange(){return this.ignoreFocusChange}focusFirstDescendant(e,t){for(let n=0;n<e.childNodes.length;n++){const s=e.childNodes[n];if((!t||"function"!=typeof t.canSkip||!t.canSkip(s))&&(this.attemptFocus(s)||this.focusFirstDescendant(s)))return!0}return!1}focusLastDescendant(e){for(let t=e.childNodes.length-1;t>=0;t--){const n=e.childNodes[t];if(this.attemptFocus(n)||this.focusLastDescendant(n))return!0}return!1}attemptFocus(e){if(!Tn(e))return!1;this.ignoreFocusChange=!0;try{e.focus()}catch{}return this.ignoreFocusChange=!1,document.activeElement===e}}const Dn=e=>({elements:[],collect(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.elements=[]);for(let s=0;s<t.children.length;s++){const i=t.children[s];e.current&&(n=i)instanceof HTMLElement&&n.dataset&&n.dataset.skipAutoFocus||(this.elements.push(i),this.collect(i))}var n},getFirst(e){return this.collect(e,!0),this.elements[0]},getLast(e){return this.collect(e,!0),this.elements[this.elements.length-1]},getNext(e,t){if(t){const e=this.elements.indexOf(t);if(-1!==e)return this.elements[e+1]}},getPrev(e,t){if(t){const e=this.elements.indexOf(t);if(-1!==e)return this.elements[e-1]}}}),Pn=(e,t)=>{let{children:n,onFocus:s,...i}=e;const a=(0,U.useRef)(null),r=(0,U.useRef)(null),o=(0,U.useRef)(null),l=(0,U.useRef)(!1),c=e=>e!==r.current&&e!==o.current&&Tn(e),{focusFirst:u,focusLast:d}=(0,U.useMemo)((()=>{const e=Dn(l);return te(a,c,e)}),[]),p=K(s,(e=>{if(a.current)switch(!0){case e.target===r.current:a.current!==e.relatedTarget&&e.relatedTarget instanceof HTMLElement&&a.current.contains(e.relatedTarget)?d():u();break;case e.target===o.current:a.current!==e.relatedTarget&&e.relatedTarget instanceof HTMLElement&&a.current.contains(e.relatedTarget)?u():d()}}));return(0,L.jsxs)("div",{onFocus:p,ref:ne(a,t),tabIndex:-1,...i,children:[(0,L.jsx)("div",{tabIndex:0,ref:r}),n,(0,L.jsx)("div",{tabIndex:0,ref:o})]})};Pn.displayName="FocusTrap";const In=(0,U.forwardRef)(Pn),On={"top-left":"top-end","top-right":"top-start","right-top":"right-end","right-bottom":"right-start","bottom-left":"bottom-end","bottom-right":"bottom-start","left-top":"left-end","left-bottom":"left-start",top:"top",right:"right",bottom:"bottom",left:"left",auto:"auto"},Ln=e=>null!==e.visible;class Mn extends U.Component{constructor(){super(...arguments),B(this,"state",{show:this.props.defaultVisible,arrowInHeader:!1}),B(this,"contentRef",(0,U.createRef)()),B(this,"targetRef",(0,U.createRef)()),B(this,"prevFocusElement",void 0),B(this,"popperData",void 0),B(this,"headerBounds",void 0),B(this,"checkArrowPosition",(()=>{const{title:e}=this.props,{show:t,arrowInHeader:n}=this.state;if(!t||!this.popperData)return;const{actualPlacement:s,arrowStyle:i}=this.popperData,a=parseInt(i?.top||""),[r]=s?.split("-")||[];let o=!1;const l="bottom"===r||null!==a&&this.headerBounds&&a<this.headerBounds.height-13,c="top"!==r&&l;e&&this.headerBounds&&c&&(o=!0),n!==o&&this.setState({arrowInHeader:o})})),B(this,"hotkeyHandler",(e=>{e.isDefaultPrevented()||"Escape"!==e.key||(this.handleClose(),e.preventDefault())})),B(this,"handleTargetClick",(e=>{const{show:t}=this.state,{canCloseOnOutsideClick:n}=this.props;t&&!n||(this.targetRef.current=e.currentTarget,this.setState((e=>({show:!e.show}))))})),B(this,"handleClose",(()=>{const{show:e}=this.state;if(!e)return;const{onClose:t,canCloseOnEscapePress:n,autoFocus:s}=this.props,i=s&&n&&this.prevFocusElement&&(!document.activeElement||this.contentRef.current?.contains(document.activeElement));t?t():this.setState({show:!1}),i&&this.prevFocusElement?.focus()})),B(this,"handleHeaderResize",(e=>{this.headerBounds=e.bounds,this.checkArrowPosition()})),B(this,"handlePopperUpdate",(e=>{this.popperData=e,this.checkArrowPosition()})),B(this,"getIgnoreNodes",(()=>{const{targetRef:e}=this.props;return e||this.targetRef.current?[e,this.targetRef]:[(0,M.findDOMNode)(this)]}))}static getDerivedStateFromProps(e,t){return{show:Ln(e)?e.visible:t.show}}componentDidUpdate(e,t){const{canCloseOnEscapePress:n,autoFocus:s}=this.props,{show:i}=this.state;s&&n&&!t.show&&i&&setTimeout((()=>this.focus()),0)}focus(){if(null!==this.contentRef.current&&null!==document.activeElement&&this.state.show&&(this.prevFocusElement=document.activeElement,!this.contentRef.current.contains(document.activeElement))){const e=this.contentRef.current.querySelector("[autofocus]");null!==e?e.focus():this.contentRef.current&&this.contentRef.current.focus()}}render(){const{baseClassName:e,className:t,visible:n,defaultVisible:s,title:i,placement:a,canCloseOnOutsideClick:r,canCloseOnEscapePress:o,target:l,targetRef:c,intent:u,wide:d,width:p,height:h,extra:m,onClose:f,children:g,...b}=this.props,{show:v,arrowInHeader:y}=this.state;let _;if("auto"!==a){const[e]=a?.split("-")||[];"top"===e?_=["top","bottom","right","left"]:"right"===e?_=["right","left","bottom","top"]:"bottom"===e?_=["bottom","top","left","right"]:"left"===e&&(_=["left","right","top","bottom"])}const x=(0,L.jsx)(Ue,{className:N()(`${e}__close`,i&&`${e}__close--heading`),onClick:this.handleClose,ghost:!0,icon:{name:"cross-mark",size:i?"16":"12"}}),S=i&&(0,L.jsx)(bn,{onResize:this.handleHeaderResize,bounds:!0,children:t=>{let{measureRef:n}=t;return(0,L.jsxs)("div",{ref:n,className:`${e}__heading`,children:[jn(i)?(0,L.jsx)(kn,{level:5,className:`${e}__title`,children:i}):i,(0,L.jsxs)("div",{className:`${e}__extra`,children:[m,x]})]})}}),w=Ln(this.props)?l:(0,U.cloneElement)(l,{className:N()(l.props.className,`${e}__target`),onClick:K(l.props.onClick,this.handleTargetClick)}),k=a?On[a]:void 0;let j;var T;h&&(j={height:(T=h,String(Number(T))===String(T)?`${T}px`:T)});const C=(0,L.jsxs)(In,{ref:this.contentRef,onKeyUp:o&&v?this.hotkeyHandler:void 0,className:`${e}__inner`,style:j,children:[h?S:S||x,(0,L.jsx)("div",{className:`${e}__content`,children:(0,L.jsx)("div",{className:`${e}__content-inner`,children:"function"==typeof g?g({onClose:this.handleClose}):g})})]});return(0,L.jsx)(pt,{target:w,targetRef:c||this.targetRef,arrow:(0,L.jsx)("span",{className:N()(`${e}__arrow`,y&&`${e}__arrow--heading`)}),placement:k,onUpdate:this.handlePopperUpdate,className:N()({[`${e}--heading`]:i,[`${e}--${u}`]:u,[`${e}--wide`]:d||p,[`${e}--width-${p}`]:p,[`${e}--on-dark`]:!0===this.context},t),baseClassName:e,behavior:_,zIndex:F.Z_INDEX_POPOVER,show:v,...b,children:r?(0,L.jsx)(ct,{onClose:this.handleClose,ignoreNodes:this.getIgnoreNodes,nodeRef:this.contentRef,children:C}):C})}}B(Mn,"contextType",oe),B(Mn,"defaultProps",{visible:null,defaultVisible:!1,title:void 0,onClose:void 0,placement:"auto",canCloseOnOutsideClick:!0,canCloseOnEscapePress:!0,children:void 0,intent:void 0,wide:void 0,width:void 0,height:void 0,extra:void 0,className:void 0,baseClassName:`${F.CLS_PREFIX}popover`,boundariesElement:void 0,autoFocus:!0,targetRef:void 0});const An=Mn,En=e=>{let{className:t,children:n,selected:s=!1,baseClassName:i=`${F.CLS_PREFIX}menu__item`,...a}=e;return(0,L.jsx)(ft,{className:N()(i,t),icon:s?"check-mark":null,role:"menuitemcheckbox","aria-checked":s?"true":"false",...a,children:n})},Un=e=>{let t=!1;return U.Children.forEach(e,(e=>{(0,U.isValidElement)(e)&&(e.type===En||e.props.icon)&&(t=!0)})),t},Rn=(0,U.forwardRef)((function(e,t){let{className:n,children:s,onItemClick:i,onKeyDown:a,onFocus:r,autoFocus:o,overlay:l=!1,baseClassName:c=`${F.CLS_PREFIX}menu`,...u}=e;const d=(0,U.useRef)(null),{focusNext:p,focusPrev:h,focusFirst:m,focusLast:f}=(0,U.useMemo)((()=>te(d,(e=>("menuitem"===e.getAttribute("role")||"menuitemcheckbox"===e.getAttribute("role"))&&"true"!==e.getAttribute("aria-disabled")))),[]);let g=!1;const b=U.Children.map(s,((e,t)=>{if(!(0,U.isValidElement)(e))return e;const n={tabIndex:-1};return i&&(n.onClick=K(e.props.onClick,i.bind(null,e,t))),g||e.type!==ft&&e.type!==En||e.props.disabled?n.tabIndex=-1:(n.tabIndex=0,g=!0),(0,U.cloneElement)(e,n)}));return(0,L.jsx)("div",{className:N()(c,n,{[`${c}--icons`]:Un(s),[`${c}--overlay`]:l}),role:"menu",...u,ref:e=>{d.current=e,t&&"function"!=typeof t&&(t.current=e)},onKeyDown:e=>{switch(e.key){case"ArrowUp":e.preventDefault(),h();break;case"ArrowDown":e.preventDefault(),p();break;case"Home":case"PageUp":e.preventDefault(),m();break;case"End":case"PageDown":e.preventDefault(),f()}G(a,e)},onFocus:e=>{e.target===d.current&&o&&m(),G(r,e)},tabIndex:-1,children:b})}));Rn.displayName="Menu";const Nn=Rn;class Fn extends U.Component{constructor(){super(...arguments),B(this,"rootRef",(0,U.createRef)()),B(this,"measuring",!1),B(this,"measurements",[]),B(this,"minWidth",0),B(this,"handleResize",(()=>{this.measure()}))}addMeasurement(e){this.measurements.push(e),this.measurements.length>2&&this.measurements.shift()}measure(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{compact:t,uncompact:n}=this.props;if(this.measuring&&!e)return;this.measuring=!0;const s=this.rootRef.current,i=Math.ceil(s.getBoundingClientRect().width),a=Math.ceil(s.scrollWidth);let r=!1;i<a?t()&&(this.minWidth=a,r=!0):i>this.minWidth&&n()&&(this.minWidth=i,r=!0),this.addMeasurement(i),this.check(r)}check(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]||2!==this.measurements.length||this.measurements[0]!==this.measurements[1]?this.setState({},(()=>{this.measure(!0)})):this.measuring=!1}render(){const{children:e,innerRef:t,innerMeasure:n}=this.props;return(0,L.jsx)(bn,{onResize:this.handleResize,innerRef:e=>{e&&(this.rootRef.current=e,G(t,e),G(n,(()=>{this.measure(!0)})))},children:t=>{let{measureRef:n}=t;return e({ref:n})}})}}const Yn=Fn,Bn=(e,t)=>e>t?1:-1,Hn=`${F.CLS_PREFIX}segmented-control`;class Vn extends U.Component{constructor(){super(...arguments),B(this,"state",{selected:this.props.selected,monoWidth:0}),B(this,"context",void 0),B(this,"isCompact",!1),B(this,"rootRef",(0,U.createRef)()),B(this,"adjustMonospaced",(()=>{const{baseClassName:e,monospaced:t}=this.props;if(t){let t=0;this.rootRef.current?.querySelectorAll(`.${e}__button`).forEach((e=>{t=Math.max(t,e.getBoundingClientRect().width)})),t!==this.state.monoWidth&&this.setState({monoWidth:t})}})),B(this,"handleChange",(e=>()=>{const{multiple:t,onChange:n}=this.props,{selected:s}=this.state;let i;t?(i=s&&Array.isArray(s)?s.slice():[],s&&s instanceof Array&&-1!==s.indexOf(e)?i.splice(s.indexOf(e),1):i.push(e),i.sort(Bn),this.setState({selected:i}),JSON.stringify(i)!==JSON.stringify(s)&&n?.(i)):(i=e,JSON.stringify(i)!==JSON.stringify(s)&&n?.(i))})),B(this,"compact",(()=>!this.isCompact&&(this.isCompact=!0,this.forceUpdate(),!0))),B(this,"uncompact",(()=>!!this.isCompact&&(this.isCompact=!1,this.forceUpdate(),!0)))}static getDerivedStateFromProps(e,t){const{selected:n,multiple:s}=e,{prevSelected:i}=t,a={selected:t.selected};return n!==i&&(a.selected=n),!s||!a.selected||a.selected instanceof Array||(a.selected=[a.selected]),a.prevSelected=n,a}componentDidMount(){this.adjustMonospaced()}componentDidUpdate(){this.adjustMonospaced()}isResponsive(){return void 0===this.context?this.isCompact:this.context}renderControl(){const{buttons:e,multiple:t}=this.props;return e.some((e=>{let{icon:t}=e;return!!t}))||t||!this.isResponsive()?this.renderButtonGroup():this.renderDropdown()}renderDropdown(){const{buttons:e,onChange:t}=this.props,{selected:n}=this.state,{title:s=""}=e.find((e=>e.value===n))||{},i=(0,L.jsx)(Nn,{children:e.map((e=>{let{title:n,value:s,...i}=e;const a={};return null!==t&&(a.onClick=this.handleChange(s)),(0,L.jsx)(ft,{...i,...a,children:n},`${s}`)}))});return(0,L.jsx)(Tt,{menu:i,children:s})}renderButtonGroup(){const{buttons:e,monospaced:t,multiple:n,onChange:s,ghost:i,baseClassName:a}=this.props,{selected:r,monoWidth:o}=this.state,l=this.state.compact;return(0,L.jsx)(Re,{className:`${a}__button-group`,children:e.map((e=>{let{value:c,title:u,...d}=e;const p={};null!==s&&(p.onClick=this.handleChange(c));let h=!1;return n&&r&&r instanceof Array&&-1!==r.indexOf(c)?h=!0:n||r!==c||(h=!0),d.className=N()(d.className,`${a}__button`),!l&&t&&o&&(d.style={width:o,...d.style}),(0,L.jsx)(Ue,{selected:h,ghost:i,...p,...d,children:u},`${c}`)}))})}render(){const{label:e,labelPlacement:t,buttons:n,monospaced:s,multiple:i,selected:a,onChange:r,inline:o,ghost:l,className:c,baseClassName:u,...d}=this.props,p=this.isResponsive();return(0,L.jsx)(Ce.Provider,{value:p,children:(0,L.jsx)(Yn,{compact:this.compact,uncompact:this.uncompact,innerRef:e=>{this.rootRef.current=e},children:n=>{let{ref:s}=n;return(0,L.jsxs)("div",{ref:s,className:N()(u,{[`${u}--inline`]:o,[`${u}--collapsed`]:p,[`${u}--vertical`]:e&&"top"===t},c),...d,children:[e&&(0,L.jsx)("div",{className:`${u}__label`,children:e}),this.renderControl()]})}})})}}B(Vn,"defaultProps",{label:null,labelPlacement:"top",monospaced:!1,multiple:!1,onChange:null,inline:!1,ghost:!1,className:null,baseClassName:Hn}),B(Vn,"contextType",Ce);const $n=Vn,Wn=e=>{let{baseClassName:t=`${F.CLS_PREFIX}text`,className:n,children:s,component:i,intent:a,fontSize:r,bold:o=!1,italic:l=!1,mark:c=!1,truncate:u=!1,nowrap:d=!1,...p}=e;i||(i=c?"mark":"span");const h=(0,U.useContext)(oe);return(0,L.jsx)(i,{className:N()(t,{[`${t}--${a}`]:a,[`${t}--${r}`]:r,[`${t}--bold`]:o,[`${t}--italic`]:l,[`${t}--truncate`]:u,[`${t}--nowrap`]:d,[`${t}--mark`]:c,[`${t}--on-dark`]:h},n),...p,children:s})},zn=[25,100,"all"],qn="default",Gn=e=>{let{baseClassName:t=`${F.CLS_PREFIX}pagination`,className:n,current:s=1,total:i,onSelect:a,itemsPerPage:r,itemsPerPageOptions:o=zn,onItemsPerPageChange:l,isShowNavigationButtons:c,isShowPageButtons:u,maxPageButtons:d,view:p=qn,loading:h=!1,...m}=e;const f=(0,L.jsxs)("div",{className:N()(t,n),...m,children:[(0,L.jsxs)("div",{className:`${t}__pages`,children:[(0,L.jsx)(It,{loading:h,overlay:!0,spinner:{size:"sm"},className:`${t}__loader`,children:(0,L.jsx)(Sn,{value:h?void 0:s,onChange:e=>G(a,e),min:1,max:i,decrementIcon:"arrow-left",incrementIcon:"arrow-right",className:`${t}__input`})}),(0,L.jsx)(wt,{content:"Pagination.totalShort",fallback:"of %%total%%",params:{total:i},className:`${t}__text`})]}),l?(0,L.jsxs)("div",{className:`${t}__options`,children:[(0,L.jsx)(wt,{content:"Pagination.itemsPerPage",fallback:"Items per page",className:`${t}__text`}),(0,L.jsx)($n,{ghost:!0,buttons:o.map((e=>{let t=e;return"all"===e&&(t=(0,L.jsx)(wt,{content:"Pagination.all",fallback:"All"})),{value:e,title:t}})),selected:r,onChange:e=>G(l,e),className:`${t}__control`})]}):null]});return"popover"===p?(0,L.jsx)(An,{target:(0,L.jsx)(Wn,{fontSize:"sm",component:wn,nowrap:!0,children:(0,L.jsx)(wt,{content:"Pagination.total",fallback:"Page %%current%% of %%total%%",params:{current:s,total:i}})}),placement:"top",className:`${t}__popover`,children:f}):f};class Kn extends U.Component{constructor(){super(...arguments),B(this,"state",{xs:this.props.xs}),B(this,"handleResize",(e=>{let{bounds:t}=e;const{width:n}=t;let{maxColumnsNumber:s}=this.props;"function"==typeof s&&(s=s({width:n}));const i=Math.max(Math.floor((n+this.getGapSize())/(this.props.minColumnWidth+this.getGapSize())),1);this.setState({xs:Math.min(i,s)}),this.props.onColumnsChange&&this.props.onColumnsChange(i)}))}getGapSize(){switch(this.props.gap){case"xs":return 8;case"sm":return 12;case"md":return 16;case"lg":return 24;case"xl":return 32;default:return 0}}render(){const{baseClassName:e,className:t,minColumnWidth:n,onColumnsChange:s,maxColumnsNumber:i,xs:a,sm:r,md:o,lg:l,xl:c,gap:u,children:d,...p}=this.props,h=N()(e,{[`${e}--xs-${this.state.xs}`]:this.state.xs,[`${e}--sm-${r}`]:r,[`${e}--md-${o}`]:o,[`${e}--lg-${l}`]:l,[`${e}--xl-${c}`]:c,[`${e}--gap-xs`]:"xs"===u,[`${e}--gap-sm`]:"sm"===u,[`${e}--gap-md`]:"md"===u,[`${e}--gap-lg`]:"lg"===u,[`${e}--gap-xl`]:"xl"===u},t),m=(0,L.jsx)("div",{className:h,...p,children:n&&!this.state.xs?null:d});return n?(0,L.jsx)(bn,{bounds:!0,onResize:this.handleResize,children:e=>{let{measureRef:t}=e;return(0,U.cloneElement)(m,{ref:t})}}):m}}B(Kn,"defaultProps",{children:null,className:null,baseClassName:`${F.CLS_PREFIX}grid`,minColumnWidth:null,maxColumnsNumber:6,xs:null,sm:null,md:null,lg:null,xl:null,gap:null,onColumnsChange:null});const Xn=Kn,Zn=e=>{let{baseClassName:t=`${F.CLS_PREFIX}grid__col`,className:n,children:s,xs:i,sm:a,md:r,lg:o,xl:l,...c}=e;const u=N()(t,{[`${t}--xs-${i}`]:i,[`${t}--sm-${a}`]:a,[`${t}--md-${r}`]:r,[`${t}--lg-${o}`]:o,[`${t}--xl-${l}`]:l},n);return(0,L.jsx)("div",{className:u,...c,children:s})},Jn=e=>{let{className:t,children:n,baseClassName:s=`${F.CLS_PREFIX}menu__header`,...i}=e;return(0,L.jsx)(mt,{className:N()(s,t),role:"none",...i,children:n})},Qn=(0,U.createContext)(void 0);Qn.displayName="DistractionFreeModeContext";const es=Qn,ts=e=>{let{baseClassName:t=`${F.CLS_PREFIX}toolbar__expander`,className:n,children:s,...i}=e;const a=(0,U.useContext)(es);return a&&a.enabled?null:(0,L.jsx)("div",{className:N()(t,n),...i,children:s})},ns=(0,U.createContext)({selectedRows:0});ns.displayName="ListOperationContext";const ss=ns,is=e=>{let{className:t,children:n,title:s,titleAddon:i,titleSize:a,image:r,imageSpacing:o,imageAlign:l,align:c,vertical:u=!1,baseClassName:d=`${F.CLS_PREFIX}media`,...p}=e;return!o&&(0,U.isValidElement)(r)&&r.type===he&&(o={12:"sm",[le]:"sm",24:"md",[ce]:"md",48:"lg",64:"xl",96:"xxl",128:"xxl",192:"xxl"}[r.props.size]),(0,L.jsxs)("div",{className:N()(d,{[`${d}--${c}`]:c,[`${d}--vertical`]:u},t),...p,children:[r&&(0,L.jsx)("figure",{className:N()(`${d}__figure`,{[`${d}__figure--${o}`]:o,[`${d}__figure--${l}`]:l}),children:r}),(0,L.jsxs)("div",{className:`${d}__body`,children:[s||i?(0,L.jsxs)("div",{className:N()(`${d}__header`,{[`${d}__header--${a}`]:a}),children:[(e=>e?"string"==typeof e?(0,L.jsx)(kn,{level:5,className:`${d}__title`,children:e}):(0,U.isValidElement)(e)?(0,U.cloneElement)(e,{className:N()(`${d}__title`,e.props.className)}):null:null)(s),i&&(0,L.jsx)("div",{className:`${d}__title-addon`,children:i})]}):null,U.Children.toArray(n).length?(0,L.jsx)("div",{className:`${d}__content`,children:n}):null]})]})},as=e=>{let{baseClassName:t=`${F.CLS_PREFIX}paragraph`,className:n,children:s,component:i="p",...a}=e;return(0,L.jsx)(i,{className:N()(t,n),...a,children:s})},rs=e=>void 0===e?void 0:(0,L.jsx)(Wn,{bold:!0,children:e}),os=e=>{let t;if("cancelButton"!==e)throw new Error("Unknown key");t="Cancel";const n=`ListOperation.${e}`;return(0,L.jsx)(wt,{content:n,fallback:"Cancel"})},ls=e=>{let{critical:t=!1,noSelectionText:n,confirmationText:s,actionButtonText:i,cancelButtonText:a,children:r,...o}=e;const{selectedRows:l,selectedRowTitle:c}=(0,U.useContext)(ss),[u,d]=(0,U.useState)(null),p=(0,U.useRef)(null);if(!(0,U.isValidElement)(r))throw new Error('The "children" property must be an element.');const h=e=>"function"==typeof e?e({selectedRows:rs(l),selectedRowTitle:rs(c)}):e,m=()=>{d(null)},f=(0,U.cloneElement)(r,{...o,onClick:e=>{switch(p.current=e.currentTarget,!0){case l&&t:d({message:h(s),actionButtonText:h(i),actionButtonIntent:"danger",cancelButtonText:h(a)||os("cancelButton")});break;case!l&&!t:d({message:h(n),actionButtonText:h(i),actionButtonIntent:"primary",cancelButtonText:h(a)||os("cancelButton")});break;case!l&&t:d({message:h(n),icon:(0,L.jsx)(he,{intent:"info",name:"info-circle-filled"})});break;case l&&!t:G(r.props.onClick,e)}}});return(0,L.jsx)(An,{visible:!!u,target:f,targetRef:p,placement:"top",onClose:m,children:u&&(0,L.jsxs)(is,{image:u.icon,children:[(0,L.jsx)(as,{children:u.message}),u.actionButtonText&&(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{onClick:e=>{d(null),G(r.props.onClick,e)},intent:u.actionButtonIntent,children:u.actionButtonText})," ",(0,L.jsx)(Ue,{ghost:!0,onClick:m,children:u.cancelButtonText})]})]})})},cs=(e,t,n)=>{switch(e.type){case Ue:{const t={};let s={};return({disabled:t.disabled,icon:t.icon,onClick:t.onClick,children:t.children,...s}=e.props),t.onClick=K(t.onClick,n),Object.keys(s).forEach((e=>{Ue.defaultProps&&e in Ue.defaultProps||(t[e]=s[e])})),"a"!==e.props.component&&"function"!=typeof e.props.component||(t.component=e.props.component),(0,L.jsx)(ft,{...t,children:t.children})}case _s:{const{title:s,children:i}=e.props;return[(0,L.jsx)(Jn,{children:s},s),us(i,n),t?null:(0,L.jsx)(ht,{})]}case ts:return null;case Tt:{let s;return(0,U.isValidElement)(e.props.menu)&&({onItemClick:s}=e.props.menu.props),[e.props.children?(0,L.jsx)(Jn,{children:e.props.children}):null,us(e.props.menu.props.children,K(s,n)),t?null:(0,L.jsx)(ht,{})]}case ls:{const t=cs(e.props.children,!0,n);return(0,U.isValidElement)(t)?(0,U.cloneElement)(e,{children:(0,U.cloneElement)(t,{onClick:e=>{t.props.onClick(e),n?.(e)}})}):null}case ft:case mt:return(0,U.cloneElement)(e,{onClick:K(e.props.onClick,n)});case ht:return e;default:return(0,L.jsx)(mt,{onClick:n,children:e})}},us=(e,t)=>{const n=U.Children.count(e);return U.Children.map(e,((e,s)=>(0,U.isValidElement)(e)?cs(e,s===n-1,t):e))},ds=(0,U.forwardRef)((function(e,t){let{onItemClick:n,children:s,...i}=e;return(0,L.jsx)(Nn,{...i,ref:t,children:us(s,n)})})),ps=ds,hs=(0,U.createContext)(void 0);hs.displayName="RegistryContext";const ms=hs,fs=()=>({stack:[],register(e){this.stack.push(e)},unregister(e){this.stack=this.stack.filter((t=>t!==e))},uncompact(){let e=!1;return this.stack.every((t=>!t.isCompact(!0)||(t.setCompact(!1),e=!0,!1))),e},compact(){let e=!1;return[...this.stack].reverse().every((t=>!!t.isCompact(!1)||(t.setCompact(!0),e=!0,!1))),e},isCompact(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?this.stack.some((t=>t.isCompact(e))):this.stack.every((t=>t.isCompact(e)))}});class gs extends U.Component{constructor(){super(...arguments),B(this,"state",{compact:!1}),B(this,"context",void 0)}componentDidMount(){this.context.register(this)}componentWillUnmount(){this.context.unregister(this)}isCompact(){return this.state.compact}setCompact(e){this.setState({compact:e})}render(){const{children:e}=this.props,{compact:t}=this.state;return(0,L.jsx)(Ce.Provider,{value:t,children:e})}}gs.contextType=ms;const bs=e=>U.Children.map(e,(e=>(0,U.isValidElement)(e)?e.type===_s||e.type===ts?e:(0,L.jsx)(gs,{children:(0,U.cloneElement)(e,{className:N()(e.props.className,`${F.CLS_PREFIX}toolbar__group-item`)})}):e));class vs extends U.Component{constructor(e){super(e),B(this,"state",{compact:!1,availableInDistractionFreeMode:!1,distractionFreeMode:{enabled:!1,toggle:()=>{this.props.distractionFreeMode&&(this.props.distractionFreeMode.toggle(),this.setState({availableInDistractionFreeMode:!this.props.distractionFreeMode.enabled}))}}}),B(this,"registry",void 0),B(this,"selfApi",void 0),B(this,"childrenApi",void 0),this.registry=fs(),this.selfApi={isCompact:()=>this.state.compact,setCompact:e=>{this.setState({compact:e})}},this.childrenApi={isCompact:e=>this.registry.isCompact(e),setCompact:e=>{e?this.registry.compact():this.registry.uncompact()}}}static getDerivedStateFromProps(e,t){return e.distractionFreeMode?{distractionFreeMode:{...t.distractionFreeMode,enabled:e.distractionFreeMode.enabled}}:null}componentDidMount(){const{registry:e}=this.props;e&&(e.register(this.selfApi),e.register(this.childrenApi))}componentWillUnmount(){const{registry:e}=this.props;e&&(e.unregister(this.selfApi),e.unregister(this.childrenApi))}render(){const{baseClassName:e,className:t,title:n,children:s,distractionFreeMode:i,registry:a,groupable:r,...o}=this.props;let{children:l}=this.props;const{compact:c,distractionFreeMode:u,availableInDistractionFreeMode:d}=this.state;let p=U.Children.toArray(l).some((e=>(0,U.isValidElement)(e)&&e.type===ts));return r&&c&&U.Children.count(l)>1?(p=!1,l=(0,L.jsx)(Tt,{menu:(0,L.jsx)(ps,{onItemClick:()=>{},children:l}),children:n})):l=(0,L.jsx)(ms.Provider,{value:this.registry,children:(0,L.jsx)(es.Provider,{value:u,children:bs(l)})}),u.enabled&&!d?null:(0,L.jsx)("div",{className:N()(e,t,{[`${e}--grow`]:p||u.enabled&&d}),...o,children:l})}}B(vs,"defaultProps",{registry:void 0,distractionFreeMode:void 0});const ys=e=>{let{groupable:t=!0,baseClassName:n=`${F.CLS_PREFIX}toolbar__group`,...s}=e;const i=(0,U.useContext)(ms),a=(0,U.useContext)(es);return(0,L.jsx)(vs,{groupable:t,baseClassName:n,...s,registry:i,distractionFreeMode:a})};ys.displayName="ToolbarGroup";const _s=ys;class xs extends U.Component{constructor(e){super(e),B(this,"state",{distractionFreeMode:{enabled:!1,toggle:()=>{this.setState((e=>({distractionFreeMode:{...e.distractionFreeMode,enabled:!e.distractionFreeMode.enabled}})),(()=>{this.measure()}))}}}),B(this,"registry",void 0),B(this,"measure",void 0),this.registry=fs(),this.measure=()=>{}}render(){const{baseClassName:e,className:t,children:n,...s}=this.props,i=bs(n);return(0,L.jsx)(Yn,{compact:()=>this.registry.compact(),uncompact:()=>this.registry.uncompact(),innerMeasure:e=>{this.measure=e},children:n=>{let{ref:a}=n;return(0,L.jsx)("div",{ref:a,className:N()(e,t),...s,children:(0,L.jsx)(ms.Provider,{value:this.registry,children:(0,L.jsx)(es.Provider,{value:this.state.distractionFreeMode,children:i})})})}})}}B(xs,"defaultProps",{children:null,className:null,baseClassName:`${F.CLS_PREFIX}toolbar`});const Ss=xs,ws=e=>(0,U.isValidElement)(e)&&e.type===ts,ks=e=>{let{baseClassName:t,selection:n,onViewChange:s,currentView:i,groups:a}=e,r=[];return n&&r.push(((e,t)=>{let{onSelectAll:n,onSelectNone:s,checked:i,badge:a,menuItems:r=[]}=e;const o=r.length>0,l={},c={};o?(l.caret=!0,c.onClick=e=>e.stopPropagation(),l.component="span"):l.component="label";let u=(0,L.jsx)(Ue,{...l,className:`${t}--select-all-btn`,children:(0,L.jsx)(it,{checked:i,onChange:e=>{e?n():s()},...c})});return a&&("string"==typeof a&&(a={label:a}),u=(0,L.jsx)(_e,{...a,children:u})),o&&(u=(0,L.jsx)(Tt,{menu:(0,L.jsx)(Nn,{children:r}),children:u})),(0,L.jsx)(_s,{title:(0,L.jsx)(wt,{content:"CardList.toolbarSelect",fallback:"Select"}),children:u},"selection")})(n,t)),r=r.concat(a),s&&i!==Cs&&(a.filter(ws).length>0||r.push((0,L.jsx)(ts,{},"expander")),r.push(((e,t)=>{const n=[{value:Ds,title:(0,L.jsx)(wt,{content:"CardList.viewCards",fallback:"Cards"}),icon:"site-page"},{value:Ts,title:(0,L.jsx)(wt,{content:"CardList.viewTiles",fallback:"Tiles"}),icon:"four-squares"},{value:Ps,title:(0,L.jsx)(wt,{content:"CardList.viewList",fallback:"List"}),icon:"list"}];return(0,L.jsx)(_s,{title:(0,L.jsx)(wt,{content:"CardList.toolbarView",fallback:"View"}),children:(0,L.jsx)($n,{buttons:n,selected:t,onChange:t=>e(t)})},"view")})(s,i))),0===r.length?null:(0,L.jsx)(Ss,{className:t,children:r})};ks.propTypes={selection:Fe().object,groups:Fe().arrayOf(Fe().element).isRequired,onViewChange:Fe().func,currentView:Fe().string.isRequired,baseClassName:Fe().string},ks.defaultProps={selection:null,onViewChange:null,baseClassName:`${F.CLS_PREFIX}card-list__toolbar`};const js=ks,Ts="tile",Cs="responsive",Ds="extended",Ps="row";class Is extends U.Component{constructor(){super(...arguments),B(this,"state",{page:this.props.defaultPage,totalItems:this.props.totalItems||this.props.items.length,pageSize:10,items:this.props.items,view:this.props.view}),B(this,"selectAll",(()=>{const{items:e}=this.state;this.select(e.map(this.getItemKey))})),B(this,"selectNone",(()=>{this.select([])})),B(this,"getItemKey",(e=>{const{itemKey:t}=this.props;return e[t]})),B(this,"renderItem",(e=>{const{baseClassName:t,itemRender:n,onSelectionChange:s}=this.props,{view:i}=this.state;return(0,U.cloneElement)(n(e),{key:this.getItemKey(e),view:this.isTile()?Ts:i,className:N()(`${t}__list-item`),selection:s?this.itemSelection(e):null})})),B(this,"previousView",null),B(this,"handleResize",(e=>{let{bounds:{width:t}}=e;const n=t>584?this.previousView:Cs;n!==Cs||this.previousView?n!==Cs&&(this.previousView=null):this.previousView=this.state.view,n&&n!==this.state.view&&this.changeView(n)}))}static getDerivedStateFromProps(e,t){const{items:n,totalItems:s}=e,{prevItems:i,prevTotalItems:a}=t,r={};return n!==i&&(r.items=n),s!==a&&(r.totalItems=s||n.length),r.prevItems=n,r.prevTotalItems=s||n.length,r}componentDidMount(){this.fetchItems()}componentDidUpdate(e){const{view:t}=this.props;t!==e.view&&this.state.view!==Cs&&this.fetchItems({page:1,view:t})}totalPages(){const{totalItems:e,pageSize:t}=this.state;return Math.ceil(e/t)}fetchItems(){let{page:e=this.state.page,view:t=this.state.view}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{onItemsFetch:n}=this.props,s=t===Ps?40:10;this.setState({view:t,page:e,pageSize:s}),G(n,{page:e,pageSize:s})}loadMore(){const{onItemsFetch:e}=this.props,{page:t}=this.state,n=t+1;this.setState({page:n,pageSize:10}),G(e,{page:n,pageSize:10})}isTile(){const{view:e}=this.state;return e===Ts||e===Cs}renderPagination(){const{baseClassName:e}=this.props,{page:t,view:n}=this.state,s=this.totalPages();return s<2?null:n===Cs&&t<s?(0,L.jsx)("div",{className:`${e}__pagination`,children:(0,L.jsx)(Ue,{onClick:()=>this.loadMore(),children:(0,L.jsx)(wt,{content:"CardList.loadMore",fallback:"Load more"})})}):(0,L.jsx)(Gn,{className:`${e}__pagination`,total:s,current:t,onSelect:e=>this.fetchItems({page:e})})}changeView(e){const{onViewChange:t}=this.props;this.fetchItems({page:1,view:e}),G(t,e)}select(e){const{onSelectionChange:t}=this.props;t(e)}itemSelection(e){const t=this.getItemKey(e),{selection:n}=this.props;return{isSelected:n.indexOf(t)>-1,onSelectionChange:e=>{let{isSelected:s}=e;const i=s?[...n,t]:n.filter((e=>e!==t));this.select(i)}}}renderLoader(){const{baseClassName:e,loading:t}=this.props;return t?(0,L.jsx)("div",{className:`${e}__content-blocker`,children:(0,L.jsx)("div",{className:`${e}__loader`,children:(0,L.jsx)(me,{className:`${e}__loader-spinner`})})}):null}render(){const{baseClassName:e,className:t,items:n,onItemsFetch:s,view:i,itemKey:a,itemRender:r,onViewChange:o,selection:l,onSelectionChange:c,selectionButton:u,viewSwitcher:d,toolbarGroups:p,totalItems:h,defaultPage:m,loading:f,...g}=this.props;let b=this.state.items.map(this.renderItem);return this.isTile()&&(b=(0,L.jsx)(Xn,{minColumnWidth:400,gap:"md",children:U.Children.map(b,(e=>(0,L.jsx)(Zn,{children:e},e.props.key)))})),(0,L.jsx)(bn,{bounds:!0,onResize:this.handleResize,children:n=>{let{measureRef:s}=n;return(0,L.jsxs)("div",{ref:s,className:N()(e,t),...g,children:[(0,L.jsx)(js,{selection:c&&this.state.totalItems>1?{...u,total:this.state.totalItems,onSelectAll:this.selectAll,onSelectNone:this.selectNone,checked:this.state.items.length===l.length}:null,onViewChange:d?e=>this.changeView(e):null,currentView:this.state.view,groups:p}),this.state.items.length>0&&(0,L.jsx)("div",{className:`${e}__list ${e}__list--${this.state.view}`,children:b}),0===this.state.items.length&&!f&&(0,L.jsx)(wt,{content:"CardList.notFound",fallback:"No items found."}),this.renderPagination(),this.renderLoader()]})}})}}Is.propTypes={items:Fe().array.isRequired,onItemsFetch:Fe().func,totalItems:Fe().number,defaultPage:Fe().number,view:Fe().oneOf([Ds,Ts,Ps,Cs]),onViewChange:Fe().func,viewSwitcher:Fe().bool,selection:Fe().array,onSelectionChange:Fe().func,selectionButton:Fe().shape({badge:Fe().oneOfType([Fe().string,Fe().object]),menuItems:Fe().arrayOf(Fe().element)}),toolbarGroups:Fe().arrayOf(Fe().element),itemKey:Fe().string.isRequired,itemRender:Fe().func.isRequired,loading:Fe().bool,className:Fe().string,baseClassName:Fe().string},Is.defaultProps={onItemsFetch:null,totalItems:null,defaultPage:1,view:Ds,onViewChange:null,viewSwitcher:!1,selection:[],onSelectionChange:null,selectionButton:{badge:null,menuItems:[]},toolbarGroups:[],loading:!1,className:null,baseClassName:`${F.CLS_PREFIX}card-list`};const Os=Is;let Ls=0;const Ms=e=>{let{baseClassName:t=`${F.CLS_PREFIX}radio`,className:n,children:s,onChange:i,checked:a,defaultChecked:r,disabled:o=!1,name:l,inputProps:c={},...u}=e;const d=c&&c.id||"radio-"+Ls++;return(0,L.jsxs)("label",{htmlFor:d,className:N()(t,{[`${t}--disabled`]:o},n),...u,children:[(0,L.jsx)("input",{className:`${t}__input`,type:"radio",name:l,id:d,onChange:e=>{!o&&i&&i(e.target.checked)},checked:a,defaultChecked:r,disabled:o,...c}),(0,L.jsx)("span",{className:`${t}__indicator`}),s?(0,L.jsx)("span",{className:`${t}__text`,children:s}):null]})},As=450,Es=(0,U.createContext)(void 0);Es.displayName="VerticalContext";const Us=Es,Rs=e=>{let{baseClassName:t=`${F.CLS_PREFIX}columns`,className:n,children:s,vertical:i,gap:a,...r}=e,[o,l]=(0,U.useState)(!1);const c=(0,U.useContext)(Us);void 0===i&&(i=void 0===c?As:c),"boolean"==typeof i&&(o=i);const u=e=>(0,L.jsx)("div",{ref:e,className:N()(t,{[`${t}--vertical`]:o,[`${t}--gap-${a}`]:a},n),...r,children:(0,L.jsx)(Us.Provider,{value:o,children:s})});return"number"==typeof i?(0,L.jsx)(bn,{bounds:!0,onResize:e=>{let{bounds:t}=e;l(t.width<i)},children:e=>{let{measureRef:t}=e;return u(t)}}):u()},Ns=e=>String(Number(e))===String(e)?`${e}px`:e,Fs=e=>{let{baseClassName:t=`${F.CLS_PREFIX}columns__column`,className:n,children:s,fill:i,ratio:a,style:r,width:o,minWidth:l,maxWidth:c,...u}=e;const d=(0,U.useContext)(Us);return(0,L.jsx)("div",{className:N()(t,{[`${t}--fill`]:i&&!d,[`${t}--ratio-${a}`]:a&&!d,[`${t}--has-width`]:o&&!d},n),style:d?r:{width:Ns(o),flexBasis:Ns(l),maxWidth:Ns(c),...r},...u,children:s})};let Ys=0;const Bs=e=>{let{baseClassName:t=`${F.CLS_PREFIX}overlay`,className:n,children:s=null,isOpen:i,placement:a="center",size:r="md",sideBanner:o,sideBannerContainer:l,onClose:c,canCloseOnBackdropClick:u=!0,canCloseOnEscapePress:d=!0,style:p={},onAnimationExited:h,...m}=e;const f=(0,U.useRef)(null),g=(0,U.useRef)(null),[b,v]=(0,U.useState)(!1);(0,U.useEffect)((()=>v(i)),[i]);const y=()=>{if(null!==g.current&&null!==document.activeElement&&!g.current.contains(document.activeElement)){const e=g.current.querySelector("[autofocus]");e instanceof HTMLElement?e.focus():g.current.focus()}};(0,U.useLayoutEffect)((()=>{b&&y()}),[b]);const _=`${t}--open`,x={in:b,classNames:{enterActive:_,enterDone:_},timeout:300};return(0,L.jsx)(we,{level:F.Z_INDEX_OVERLAY,children:(0,L.jsxs)("div",{className:N()(t,`${t}--${a}`,`${t}--${r}`,o&&`${t}--side`,n),style:{"--overlay-side-banner-background":l?.background,"--overlay-side-banner-align":l?.align,...p},...m,children:[(0,L.jsx)(st,{nodeRef:f,...x,children:(0,L.jsx)("div",{ref:f,className:`${t}__backdrop`,onClick:()=>{u?G(c):b&&y()}})}),(0,L.jsx)(st,{onExited:h,nodeRef:g,...x,children:(0,L.jsxs)(In,{className:`${t}__content`,onKeyUp:d?e=>{e.isDefaultPrevented()||"Escape"!==e.key||(G(c),e.preventDefault())}:void 0,ref:g,role:"dialog","aria-modal":"true",children:[(0,L.jsx)("div",{className:`${t}__body`,children:s}),o&&(e=>{const n=`${t}__side`;let s=null;return s=(0,U.isValidElement)(e)?e:"string"==typeof e?(0,L.jsx)("img",{className:`${n}-image`,src:e,alt:""}):(0,L.jsx)("img",{className:`${n}-image`,...e}),(0,L.jsx)("div",{className:n,children:s})})(o)]})})]})})},Hs=e=>{let{isOpen:t=!1,...n}=e;const s=(0,U.useRef)(!1),[i,a]=(0,U.useState)(!1),r=(0,U.useRef)(null),o=(0,U.useCallback)((()=>{s.current&&(s.current=!1,0==--Ys&&(()=>{if(!rt){const e=Math.abs(parseInt(document.body.style.marginTop||"0"));document.documentElement.style.position="",document.body.style.marginTop="",window.scrollTo(0,e),rt=!0}})(),r.current?.focus())}),[]);return(0,U.useEffect)((()=>{t?(s.current=!0,(()=>{if(rt){const e=-window.pageYOffset+"px";document.documentElement.style.position="fixed",document.body.style.marginTop=e,rt=!1}})(),Ys++,document.activeElement instanceof HTMLElement&&(r.current=document.activeElement),a(!0)):o()}),[t,o]),(0,U.useEffect)((()=>()=>o()),[o]),i?(0,L.jsx)(Bs,{isOpen:t,onAnimationExited:()=>{a(!1)},...n}):null},Vs=e=>{let{onClose:t,closingConfirmation:n}=e;const[s,i]=(0,U.useState)(!1),[a,r]=(0,U.useState)(!1),o=()=>{r(!1)};let l;"function"==typeof t&&(l=()=>{n?(i(!0),r(!0)):t()});let c=null;return s&&(c=(0,L.jsx)(ji,{isOpen:a,size:"sm",onClose:o,buttons:[(0,L.jsx)(Ue,{intent:"primary",onClick:o,children:(0,L.jsx)(wt,{content:"ClosingConfirmation.cancel",fallback:"Go Back"})},"cancel"),(0,L.jsx)(Ue,{onClick:()=>{r(!1),G(t)},children:(0,L.jsx)(wt,{content:"ClosingConfirmation.confirm",fallback:"Leave"})},"confirm")],cancelButton:!1,children:(0,L.jsx)(as,{children:(0,L.jsx)(wt,{content:"ClosingConfirmation.content",fallback:"Are you sure you want to close and leave this window? Any data changes you've made won't be saved."})})})),{onCloseWithConfirmation:l,closingConfirmationDialog:c}},$s=e=>e.replace(/]/g,"").split("["),Ws=(e,t)=>isNaN(t)&&(Array.isArray(e)||"object"!=typeof e||null===e)?{}:isNaN(t)||Array.isArray(e)?isNaN(t)?{...e}:[...e]:[],zs=(e,t,n)=>{const s=$s(t);let i;try{i=s.reduce(((e,t)=>e[t]),e)}catch{}return void 0===i?n:i},qs=(e,t,n)=>{const s=$s(t),i=Ws(e,s[0]);let a,r=i;for(;(a=s.shift())&&s.length;)r[a]=Ws(r[a],s[0]),r=r[a];return a&&(r[a]=n),i},Gs=`${F.CLS_PREFIX}section-item`,Ks=e=>{let{baseClassName:t=Gs,className:n,children:s,title:i,actions:a=!1,vertical:r,...o}=e;const l=(0,U.useContext)(Us);return(0,L.jsxs)("div",{className:N()(t,{[`${t}--actions`]:a,[`${t}--vertical`]:void 0===r?l:r},n),...o,children:[null==i?null:(0,L.jsx)("div",{className:`${t}__title`,children:i}),(0,L.jsx)("div",{className:`${t}__value`,children:s})]})},Xs=e=>{let{baseClassName:t=`${F.CLS_PREFIX}hint`,className:n,children:s,component:i="span",...a}=e;return(0,L.jsx)(i,{className:N()(t,n),...a,children:s})},Zs=(0,U.createContext)(void 0);Zs.displayName="FormContext";const Js=Zs,Qs=(0,U.createContext)(null);Qs.displayName="ScrollableElementFormContext";const ei=Qs,ti=(0,U.createContext)(void 0);ti.displayName="DisabledContext";const ni=ti,si=`${F.CLS_PREFIX}form-field`,ii=void 0,ai={id:void 0,name:void 0,value:ii,onChange:null,label:void 0,description:void 0,errors:{},required:!1,children:void 0,multi:void 0,disabled:void 0,locale:void 0,addMoreValidator:void 0,onRemoveRow:null,fullDescription:void 0,className:void 0,baseClassName:si,form:void 0,vertical:void 0,scrollableElement:void 0},ri=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(Array.isArray(e)&&e.length>0)return e;const n=[];return t&&n.push(void 0),n},oi=e=>!e&&0!==e||Array.isArray(e)&&0===e.length||!Array.isArray(e)&&"object"==typeof e&&0===Object.values(e).filter((e=>Boolean(e))).length;class li extends U.Component{constructor(e){var t;super(e),t=this,B(this,"fieldApi",void 0),B(this,"targetRefs",void 0),B(this,"focusTimer",null),B(this,"getFieldApi",(e=>this.props.multi?{getValues:()=>this.fieldApi.getValues(),getId:()=>{const t=this.fieldApi.getId();return t?`${t}-${e}`:t},getName:()=>{const t=this.fieldApi.getName();return t?`${t}[${e}]`:t},getValue:t=>{const n=this.fieldApi.getValue();return n instanceof Array&&n[e]?n[e]:t},setValue:t=>{const n=ri(this.fieldApi.getValue(),!0);return this.fieldApi.setValue(n.map(((n,s)=>s===e?t:n)))},getErrors:()=>{const t=this.fieldApi.getErrors();return t instanceof Array&&t[e]?t[e]:{}},getRequiredMark:()=>0===e?this.fieldApi.getRequiredMark():null,getSeparator:()=>(0,L.jsx)("span",{className:`${this.props.baseClassName}__separator`}),isDisabled:()=>!!this.props.disabled,getFullDescription:()=>0===e?this.fieldApi.getFullDescription():null}:this.fieldApi)),B(this,"focus",(e=>{let t=0;Array.isArray(e)&&(t=e.findIndex((e=>Boolean(e))));const{scrollableElement:n}=this.props,s=this.targetRefs[t];s&&(J(s,{boundary:n}),this.focusTimer=setTimeout((()=>{s&&(new Cn).focusFirstDescendant(s)}),500))})),B(this,"handleAddMore",(()=>{const e=ri(this.fieldApi.getValue(),!0);this.fieldApi.setValue([...e,ii])})),B(this,"handleRemove",(e=>{const t=ri(this.fieldApi.getValue());this.fieldApi.setValue(t.filter(((t,n)=>n!==e))),G(this.props.onRemoveRow,e),this.setState((t=>t.errors&&t.errors.filter?{errors:t.errors.filter(((t,n)=>n!==e))}:{}))})),B(this,"setTargetRef",(e=>t=>{this.targetRefs[e]=t})),B(this,"renderRemoveButton",(e=>{const{multi:t,locale:n,disabled:s}=this.props,i=ri(this.fieldApi.getValue()),a=t&&1===i.length&&!oi(i[0]);return!t||i.length<1||1===i.length&&oi(i[0])?null:(0,L.jsx)(Ue,{className:`${this.props.baseClassName}__remove`,icon:a?"clean":"cross-mark",tooltip:(0,L.jsx)(wt,{namespace:"FormField",content:a?"clear":"remove",fallback:a?"Clear":"Remove",translators:n}),onClick:()=>this.handleRemove(e),disabled:s,ghost:!0})})),B(this,"renderDescription",(e=>{const{baseClassName:t,description:n,multi:s}=this.props;return!n||s&&ri(this.fieldApi.getValue()).length-1>e?null:(0,L.jsx)(Xs,{component:"div",className:`${t}__description`,children:n})})),B(this,"renderField",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{baseClassName:s,className:i,id:a,name:r,value:o,onChange:l,label:c,description:u,errors:d,required:p,children:h,multi:m,disabled:f,addMoreValidator:g,onRemoveRow:b,locale:v,form:y,vertical:_,scrollableElement:x,fullDescription:S,...w}=t.props,k=t.getFieldApi(e),j=k.getErrors(),T=j&&Object.keys(j).length>0;let C=c;C&&e&&(C="");let D="function"==typeof h?h(k):h;return m&&(D=(0,L.jsxs)("div",{className:`${s}__multi`,children:[D," ",t.renderRemoveButton(e)]})),(0,L.jsxs)(Ks,{className:N()(s,{[`${s}--error`]:T,[`${s}--vertical-multi`]:m&&_},i),title:null===C?null:(0,L.jsxs)("div",{className:`${s}__label`,children:[(0,L.jsx)("label",{htmlFor:k.getId(),children:C}),k.getFullDescription(),p?k.getRequiredMark():null]}),vertical:_,...w,children:[(0,L.jsx)("div",{ref:t.setTargetRef(e),children:D}),T&&Object.keys(j).map((e=>(0,L.jsxs)("span",{className:`${s}__error`,children:[(0,L.jsx)(he,{className:`${s}__error-icon`,name:"exclamation-mark-circle-filled",size:"12"}),j[e]]},e))),t.renderDescription(e),n&&(0,L.jsx)(wn,{role:"button",onClick:t.handleAddMore,className:`${s}__add-more`,disabled:f,children:(0,L.jsx)(wt,{namespace:"FormField",content:"addMore",fallback:"Add one more",translators:v})})]},e)}));const{value:n,multi:s}=this.props;let i=n;s&&!i&&(i=[ii]),this.state={value:i,errors:this.props.errors},this.fieldApi={getId:()=>this.props.id?this.props.id:this.props.name?this.props.name.replace(/[[\]]+/g,"-").replace(/-+$/,""):void 0,getName:()=>this.props.name,getValues:()=>this.props.form?this.props.form.getValues():null,getValue:e=>this.props.form&&this.props.name?this.props.form.getValue(this.props.name,e):this.state.value||e,setValue:e=>{this.setState({value:e}),this.props.form&&this.props.name&&this.props.form.setValue(this.props.name,e),G(this.props.onChange,e)},getErrors:()=>this.props.form&&this.props.name?this.props.form.getErrors(this.props.name):this.state.errors,getRequiredMark:()=>this.props.form?this.props.form.getRequiredMark():null,isDisabled:()=>Boolean(this.props.disabled),getFullDescription:()=>this.props.fullDescription?(0,L.jsx)(An,{target:(0,L.jsx)(fe,{outerProps:{className:`${this.props.baseClassName}__full-description`},icon:{name:"info-circle",size:"12",className:`${this.props.baseClassName}__full-description-icon`}}),placement:"right",intent:"info",children:this.props.fullDescription}):null},this.targetRefs=[]}static getDerivedStateFromProps(e,t){const n={},{errors:s,form:i,required:a,name:r}=e,{prevErrors:o,prevRequired:l}=t;return void 0!==e.value&&(n.value=e.value),s!==o&&(n.errors=s),r&&i&&a!==l&&i.setRequiredField(r,!!a),n.prevErrors=s,n.prevRequired=a,n}componentDidMount(){this.props.form&&this.props.name&&(this.props.form.setRequiredField(this.props.name,!!this.props.required),this.props.form.registerField(this.props.name,{focus:this.focus}))}componentWillUnmount(){this.props.form&&this.props.name&&(this.props.form.setRequiredField(this.props.name,!1),this.props.form.unregisterField(this.props.name)),this.focusTimer&&clearTimeout(this.focusTimer)}render(){if(!this.props.multi)return this.renderField();const e="object"==typeof this.props.multi&&this.props.multi.max?this.props.multi.max:1/0;let t=0;const n=(this.fieldApi.getValue()||[]).length||1,s=[];do{s.push(this.renderField(t++,n===t&&n<e))}while(t<n);return s}}B(li,"defaultProps",ai);const ci=e=>{const t=(0,U.useContext)(Js),n=(0,U.useContext)(Us),s=void 0===e.vertical?n:e.vertical,i=(0,U.useContext)(ei),a=(0,U.useContext)(ni);return(0,L.jsx)(li,{...e,form:t,vertical:s,scrollableElement:i,disabled:e.disabled||a})};ci.displayName="FormField",ci.defaultProps=ai;const ui=ci;class di extends U.Component{constructor(){super(...arguments),B(this,"state",{editing:!1,draft:""}),B(this,"handleEdit",(()=>{this.setState((e=>{let{editing:t}=e;return{editing:!t,draft:t?"":this.props.value}}))})),B(this,"handleEditKey",(e=>{"Escape"===e.key?this.handleEdit():"Enter"===e.key&&this.handleEditOk()})),B(this,"handleChange",(e=>{this.setState({draft:e.target.value})})),B(this,"handleEditOk",(()=>{this.props.onChange&&this.props.onChange(this.state.draft),this.handleEdit()}))}render(){const{draft:e,editing:t}=this.state,{baseClassName:n,className:s,onChange:i,value:a,...r}=this.props;return(0,L.jsxs)("div",{className:N()(n,s),...r,children:[t?(0,L.jsxs)("div",{className:`${n}__edit`,children:[(0,L.jsx)(vn,{className:`${n}__edit-input`,value:e,onChange:this.handleChange,onKeyDown:this.handleEditKey,autoFocus:!0}),(0,L.jsxs)("div",{className:`${n}__edit-actions`,children:[(0,L.jsx)(je,{title:(0,L.jsx)(wt,{content:"InPlaceEdit.okButtonHint",fallback:"Save changes"}),children:(0,L.jsx)(Ue,{ghost:!0,className:N()(`${n}__control-button`,`${n}__control-button--ok`),icon:"check-mark",onClick:this.handleEditOk})}),(0,L.jsx)(je,{title:(0,L.jsx)(wt,{content:"InPlaceEdit.cancelButtonHint",fallback:"Discard changes"}),children:(0,L.jsx)(Ue,{ghost:!0,className:N()(`${n}__control-button`,`${n}__control-button--cancel`),icon:"cross-mark",onClick:this.handleEdit})})]})]}):a,i&&!t&&(0,L.jsx)(je,{title:(0,L.jsx)(wt,{content:"InPlaceEdit.editButtonHint",fallback:"Edit value"}),children:(0,L.jsx)(Ue,{ghost:!0,className:N()(`${n}__control-button`,`${n}__control-button--edit`),onClick:this.handleEdit,icon:{name:"pencil",className:`${n}__control-button-icon`}})})]})}}B(di,"defaultProps",{value:null,onChange:null,className:null,baseClassName:`${F.CLS_PREFIX}in-place-edit`});const pi=di,hi=(e,t)=>{let n={};return U.Children.forEach(t,(t=>{(0,U.isValidElement)(t)&&(t.props.name&&(n={...n,...e.getErrors(t.props.name)}),t.props.children&&(n={...n,...hi(e,t.props.children)}))})),n},mi=`${F.CLS_PREFIX}section`,fi={title:void 0,intent:void 0,collapsible:!1,collapsed:!1,onTitleChange:void 0,onClose:void 0,onToggle:void 0,buttons:void 0,vertical:void 0,children:void 0,className:void 0,baseClassName:mi,form:void 0};class gi extends U.Component{constructor(){super(...arguments),B(this,"state",{vertical:!1}),B(this,"handleResize",(e=>{let{bounds:t}=e;void 0===this.props.vertical&&t&&this.setState({vertical:t.width<As})})),B(this,"handleCollapse",(e=>{X(e)||this.setState((e=>{let{collapsed:t}=e;return{collapsed:!t}}),(()=>{this.props.onToggle?.(this.state.collapsed??!1)}))}))}static getDerivedStateFromProps(e,t){const{collapsible:n,collapsed:s,form:i,children:a}=e,{prevCollapsed:r,prevErrors:o}=t,l={};if(s!==r&&(l.collapsed=s),l.prevCollapsed=s,n&&i){const e=hi(i,a);JSON.stringify(e)!==JSON.stringify(o)&&Object.keys(e).length>0&&(l.collapsed=!1),l.prevErrors=e}return l}renderCollapseButton(e){let{baseClassName:t,collapsible:n}=e;const{collapsed:s}=this.state;return n&&(0,L.jsx)(Ue,{ghost:!0,className:N()(`${t}__control-button`,`${t}__control-button--collapse`),icon:{name:"chevron-up",flipVertical:s},onClick:this.handleCollapse})}renderCloseButton(e){let{baseClassName:t,onClose:n,buttons:s}=e;return(n||s)&&(0,L.jsxs)("div",{className:`${t}__header-buttons`,children:[s,n&&(0,L.jsx)(Ue,{ghost:!0,className:N()(`${t}__control-button`,`${t}__control-button--close`),onClick:n,icon:"cross-mark"})]})}renderTitle(e){let{baseClassName:t,title:n,onTitleChange:s}=e;return n&&(0,L.jsx)(pi,{className:`${t}__title`,value:n,onChange:s,onClick:e=>{const n=e.target?.closest(`.${t}__header`)?.querySelector(`.${t}__control-button`);n?.click()}})}renderContent(e){let{collapsible:t,children:n}=e;const{collapsed:s}=this.state;return t&&s?null:n}render(){const{baseClassName:e=mi,className:t,intent:n,collapsible:s=!1,title:i,collapsed:a,onTitleChange:r,onClose:o,onToggle:l,buttons:c,vertical:u,children:d,form:p,...h}=this.props,m=void 0===u?this.state.vertical:u;return(0,L.jsx)(Us.Provider,{value:m,children:(0,L.jsx)(bn,{onResize:this.handleResize,bounds:!0,children:a=>{let{measureRef:l}=a;return(0,L.jsxs)("div",{ref:l,className:N()(e,{[`${e}--${n}`]:n,[`${e}--collapsible`]:s,[`${e}--collapsed`]:this.state.collapsed,[`${e}--vertical`]:m},t),...h,children:[i&&(0,L.jsxs)("div",{className:`${e}__header`,children:[this.renderCollapseButton({baseClassName:e,collapsible:s}),this.renderTitle({baseClassName:e,title:i,onTitleChange:r}),this.renderCloseButton({baseClassName:e,onClose:o,buttons:c})]}),this.renderContent({collapsible:s,children:d})]})}})})}}B(gi,"defaultProps",fi);const bi=e=>{const t=(0,U.useContext)(Js),n=(0,U.useContext)(Us),s=void 0===e.vertical?n:e.vertical;return(0,L.jsx)(gi,{...e,form:t,vertical:s})};bi.displayName="Section",bi.defaultProps=fi,bi.WrappedComponent=gi;const vi=bi,yi=Ie({defaultProps:{size:"lg"}});class _i extends U.Component{constructor(){var e;super(...arguments),e=this,B(this,"state",{values:this.props.values,vertical:this.props.vertical||!1,requiredFields:[],formContext:{getValues:()=>this.state.values,getValue:(e,t)=>this.state.values?zs(this.state.values,e,t):t,setValue:(e,t)=>{this.setState((n=>{let{values:s}=n;return s?{values:qs(s,e,t)}:null})),G(this.props.onFieldChange,e,t)},getErrors:e=>this.props.errors?zs(this.props.errors,e,{}):{},registerField:(e,t)=>{e&&(this.fields[e]=t)},unregisterField:e=>{e&&delete this.fields[e]},setRequiredField:(e,t)=>{this.setState((n=>t?{requiredFields:[...n.requiredFields,e]}:{requiredFields:n.requiredFields.filter((t=>t!==e))}))},getRequiredMark:()=>this.props.requiredMark}}),B(this,"fields",{}),B(this,"handleSubmit",(e=>{e.preventDefault(),this.props.onSubmit&&this.state.values&&this.props.onSubmit(this.state.values,!1)})),B(this,"handleSubmitClick",(e=>{"submit"!==e.currentTarget.type&&this.props.onSubmit&&this.state.values&&this.props.onSubmit(this.state.values,!1)})),B(this,"handleApplyClick",(e=>{"submit"!==e.currentTarget.type&&this.props.onSubmit&&this.state.values&&this.props.onSubmit(this.state.values,!0)})),B(this,"handleResize",(e=>{let{bounds:t}=e;const{vertical:n}=this.props;void 0===n?this.setState({vertical:t.width<As}):this.setState({vertical:n})})),B(this,"renderForm",(function(){let{actionButtons:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{innerRef:n,baseClassName:s,className:i,children:a,requiredMark:r,hideRequiredLegend:o,values:l,errors:c,submitButton:u,applyButton:d,cancelButton:p,onFieldChange:h,onSubmit:m,additionalButtons:f,footerClassName:g,state:b,render:v,vertical:y,..._}=e.props;return(0,L.jsx)(Js.Provider,{value:e.state.formContext,children:(0,L.jsx)(Us.Provider,{value:e.state.vertical,children:(0,L.jsx)(ni.Provider,{value:!!b,children:(0,L.jsx)(bn,{onResize:e.handleResize,innerRef:n,bounds:!0,children:n=>{let{measureRef:r}=n;return(0,L.jsxs)("form",{ref:r,className:N()(s,{[`${s}--has-required`]:e.hasRequiredField()},i),onSubmit:e.handleSubmit,..._,children:[a,t,(0,L.jsx)("input",{type:"image",src:"data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",style:{border:0,height:0,width:0,position:"absolute"}})]})}})})})})})),B(this,"renderActionButtons",(()=>{const{submitButton:e,applyButton:t,cancelButton:n,state:s,additionalButtons:i,baseClassName:a,footerClassName:r}=this.props;return(0,L.jsx)(vi,{className:N()(`${a}__footer`,r),children:(0,L.jsx)(ui,{children:(0,L.jsxs)(Pe.Provider,{value:yi,children:[this.renderSubmitButton({submitButton:e,state:s}),this.renderApplyButton({applyButton:t,state:s}),this.renderAdditionalButtons({additionalButtons:i}),this.renderCancelButton({cancelButton:n,state:s})]})})})}))}static getDerivedStateFromProps(e,t){const{values:n,errors:s,requiredMark:i}=e,{prevValues:a,prevErrors:r,prevRequiredMark:o}=t,l={};return n!==a&&(l.values=n),n===a&&s===r&&i===o||(l.formContext={...t.formContext}),l.prevValues=n,l.prevErrors=s,l.prevRequiredMark=i,l}componentDidUpdate(e){const{errors:t}=this.props;if(t!==e.errors){let e,n;Object.keys(this.fields).every((s=>{const i=zs(t,s);return!(i&&"object"==typeof i&&Object.keys(i).length>0&&(e=this.fields[s],n=i,1))})),e&&e.focus(n)}}hasRequiredField(){return this.props.requiredMark&&this.state.requiredFields.length>0}renderSubmitButton(e){let{submitButton:t,state:n}=e;return t?(0,L.jsx)(Ue,{intent:"primary",state:"submit"===n?"loading":void 0,disabled:!!n,onClick:this.handleSubmitClick,children:(0,L.jsx)(wt,{content:"Form.submitButton",fallback:"Save"}),..."object"==typeof t?t:{}}):null}renderApplyButton(e){let{applyButton:t,state:n}=e;return t?(0,L.jsx)(Ue,{intent:"primary",state:"apply"===n?"loading":void 0,disabled:!!n,onClick:this.handleApplyClick,children:(0,L.jsx)(wt,{content:"Form.applyButton",fallback:"Apply"}),..."object"==typeof t?t:{}}):null}renderCancelButton(e){let{cancelButton:t,state:n}=e;return t?(0,L.jsx)(Ue,{state:"cancel"===n?"loading":void 0,disabled:!!n,children:(0,L.jsx)(wt,{content:"Form.cancelButton",fallback:"Cancel"}),..."object"==typeof t?t:{}}):null}renderAdditionalButtons(e){let{additionalButtons:t}=e;const{baseClassName:n}=this.props;return Array.isArray(t)?t.map((e=>{if((0,U.isValidElement)(e)){const t={className:N()(e.props.className,`${n}__additional-button`)};return(0,U.cloneElement)(e,t)}return e})):null}render(){const{render:e}=this.props;return"function"==typeof e?e({renderForm:this.renderForm,renderActionButtons:this.renderActionButtons}):this.renderForm({actionButtons:this.renderActionButtons()})}}B(_i,"defaultProps",{children:void 0,requiredMark:(0,L.jsx)("span",{className:`${F.CLS_PREFIX}form__required`}),hideRequiredLegend:!1,values:{},errors:{},state:void 0,submitButton:!0,applyButton:!0,cancelButton:!0,additionalButtons:[],onFieldChange:void 0,onSubmit:void 0,className:void 0,footerClassName:void 0,vertical:void 0,baseClassName:`${F.CLS_PREFIX}form`,render:void 0,innerRef:void 0});const xi=(0,U.forwardRef)(((e,t)=>{const n=(0,U.useRef)(null);return(0,U.useImperativeHandle)(t,(()=>({submit(){n.current?.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))}}))),(0,L.jsx)(_i,{innerRef:n,...e})}));xi.displayName="Form";const Si=xi,wi=e=>e&&"object"==typeof e&&!(0,U.isValidElement)(e),ki=e=>{let{baseClassName:t,className:n,children:s,actions:i,isOpen:a,banner:r,image:o,title:l,subtitle:c,cancelTitle:u,cancelButton:d,buttons:p,form:h,size:m,closable:f,onClose:g,closingConfirmation:b,canClose:v,...y}=e;const[_,x]=(0,U.useState)(a),{onCloseWithConfirmation:S,closingConfirmationDialog:w}=Vs({onClose:()=>{x(!1),G(g)},closingConfirmation:b});(0,U.useEffect)((()=>{x(a)}),[a]);const k=(e,n)=>{const s=`${t}__${n}`;return(0,U.isValidElement)(e)?(0,L.jsx)("div",{className:s,children:e}):"string"==typeof e?(0,L.jsx)("div",{className:s,children:(0,L.jsx)("img",{alt:"",className:`${s}-inner`,src:e})}):(0,L.jsx)("div",{className:s,children:(0,L.jsx)("img",{alt:"",className:`${s}-inner`,...e})})},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h;if(!f)return!1;if(!1===d||e&&!1===e.cancelButton)return!1;let t={onClick:S,children:u||(0,L.jsx)(wt,{content:"Dialog.cancelButton",fallback:"Cancel"})};return e&&wi(e.cancelButton)&&(t={...t,...e.cancelButton}),wi(d)&&(t={...t,...d}),t};let T;return h?(0,U.isValidElement)(h)?T=(0,U.cloneElement)(h,{cancelButton:j(h.props),footerClassName:N()(h.props.footerClassName,`${t}__form-footer`)}):"object"==typeof h&&(h.cancelButton=j(),h.footerClassName=N()(h.footerClassName,`${t}__form-footer`),h.applyButton=h.applyButton||!1,T=(0,L.jsx)(Si,{...h,children:s})):T=s,(0,L.jsxs)(Hs,{className:N()(t,n),isOpen:_,onClose:S,canCloseOnBackdropClick:v&&f,canCloseOnEscapePress:v&&f,size:m,...y,children:[(l||c||i)&&(0,L.jsxs)("header",{className:`${t}__header`,children:[r&&k(r,"banner"),(0,L.jsx)("div",{className:`${t}__header-inner`,children:(0,L.jsxs)("div",{className:`${t}__header-body`,children:[(0,L.jsxs)("div",{className:`${t}__header-content`,children:[jn(l)?(0,L.jsx)(kn,{level:2,className:`${t}__title`,children:l}):(0,L.jsx)("div",{className:`${t}__title`,children:l}),c&&(0,L.jsx)("div",{className:`${t}__subtitle`,children:jn(c)?(0,L.jsx)(Wn,{intent:"muted",children:c}):c})]}),(i||f)&&(0,L.jsxs)("div",{className:`${t}__header-actions`,children:[i,f&&(0,L.jsx)(Ue,{className:`${t}__header-close`,disabled:!v,ghost:!0,size:"lg",icon:"cross-mark",onClick:S})]})]})})]}),(0,L.jsxs)("div",{className:`${t}__content`,children:[o&&k(o,"image"),T,(()=>{if(h)return null;let e;const n=j();return n&&(e=(0,L.jsx)(Ue,{...n})),p||e?(0,L.jsxs)("div",{className:`${t}__buttons`,children:[p,e]}):null})()]}),w]})};ki.defaultProps={isOpen:!1,banner:void 0,sideBanner:void 0,sideBannerContainer:void 0,image:void 0,title:void 0,subtitle:void 0,cancelTitle:void 0,cancelButton:void 0,buttons:void 0,actions:void 0,form:void 0,size:"md",closable:!0,canClose:!0,onClose:void 0,closingConfirmation:void 0,children:void 0,className:void 0,baseClassName:`${F.CLS_PREFIX}dialog`};const ji=ki,Ti=e=>{let{baseClassName:t=`${F.CLS_PREFIX}drawer-header`,onClose:n,children:s,backButton:i=!1,hideButton:a=!1,tabs:r,...o}=e;const l=function(){let{disabled:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,L.jsx)(Ue,{ghost:!0,className:N()(`${t}__button`,`${t}__button--close`),size:"lg",icon:(0,L.jsx)(he,{name:"cross-mark",className:`${t}__icon`}),onClick:n,disabled:e})};let c,u;return n&&(i?c=(0,L.jsx)(Ue,{ghost:!0,className:N()(`${t}__button`,`${t}__button--back`),size:"lg",icon:(0,L.jsx)(he,{name:"chevron-left",flipHorizontal:at(),className:`${t}__icon`}),onClick:n}):u=a?(0,L.jsxs)("div",{className:`${t}__actions`,children:[(0,L.jsx)(Ue,{ghost:!0,className:N()(`${t}__button`,`${t}__button--hide`),size:"lg",icon:(0,L.jsx)(he,{className:`${t}__icon`,name:"minimize"}),onClick:n}),l({disabled:!0})]}):(0,L.jsx)("div",{className:`${t}__actions`,children:l()})),(0,L.jsx)("div",{className:t,...o,children:(0,L.jsxs)("div",{className:`${t}__inner`,children:[c,(0,L.jsxs)("div",{className:`${t}__content`,children:[s,r&&(0,L.jsx)("div",{className:`${t}__tabs`,children:(0,L.jsx)("div",{className:`${t}__tabs-inner`,children:r})})]}),u]})})},Ci={info:"info-circle-filled",success:"check-mark-circle-filled",warning:"triangle-exclamation-mark-filled",danger:"exclamation-mark-circle-filled",inactive:"cross-mark-circle-filled"},Di=(e,t)=>{if(!1!==e)return!0!==e&&e||!t||(e=Ci[t]),he.create(e,t?{name:Ci[t]}:void 0)},Pi=e=>{let{baseClassName:t=`${F.CLS_PREFIX}status`,className:n,children:s,icon:i,intent:a,progress:r,compact:o,flip:l,outerProps:c={},...u}=e;return"muted"===a&&(a="inactive"),(0,L.jsx)(fe,{component:"span",icon:o?void 0:Di(i,a),className:N()(t,{[`${t}--${a}`]:a&&!r,[`${t}--on-dark`]:(0,U.useContext)(oe)},n),outerProps:{...c,className:N()({[`${t}--compact`]:o,[`${t}--flip`]:l},c.className)},progress:r,...u,children:s})},Ii=e=>{let{baseClassName:t=`${F.CLS_PREFIX}progress-bar__indicator`,className:n,intent:s,progress:i=-1,...a}=e;return(0,L.jsx)("div",{className:N()(t,{[`${t}--${s}`]:s,[`${t}--indeterminate`]:-1===i},n),style:i>=0&&i<=100?{width:`${i}%`}:void 0,...a})},Oi=e=>{let{baseClassName:t=`${F.CLS_PREFIX}progress-bar`,className:n,intent:s,progress:i=-1,...a}=e;return(0,L.jsx)("div",{className:N()(t,{[`${t}--on-dark`]:(0,U.useContext)(oe)},n),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i>=0&&i<=100?i:void 0,role:"progressbar",...a,children:(0,L.jsx)(Ii,{intent:s,progress:i})})},Li="not_started",Mi="running",Ai="done",Ei="warning",Ui="error",Ri=e=>{let{className:t,children:n,icon:s,title:i,statusText:a,progress:r,status:o,baseClassName:l,...c}=e,u=null;switch(o){case Li:u="inactive",s="dot";break;case Mi:u=!1,s="dot";break;case Ai:u="success",s="check-mark-circle-filled";break;case Ei:u="warning",s="triangle-exclamation-mark-filled";break;case Ui:u="danger",s="exclamation-mark-circle-filled";break;case"canceled":r=0,u="inactive",s="cross-mark-circle-filled"}return s=he.create(s,{className:`${l}__icon`,size:le,intent:u}),!a||(0,U.isValidElement)(a)&&a.type===Pi||(a=(0,L.jsx)(Pi,{children:a})),(0,L.jsxs)("div",{className:N()(l,{[`${l}--${u}`]:u,[`${l}--content`]:U.Children.toArray(n).length,[`${l}--on-dark`]:(0,U.useContext)(oe)},t),...c,children:[s&&(0,L.jsx)("div",{className:`${l}__media`,children:s}),(0,L.jsxs)("div",{className:`${l}__body`,children:[(i||a||U.Children.toArray(n).length>0)&&(0,L.jsxs)("div",{className:`${l}__labels`,children:[(0,L.jsxs)("div",{className:`${l}__labels-body`,children:[i&&(0,L.jsx)("div",{className:`${l}__title`,children:i}),U.Children.toArray(n).length?(0,L.jsx)("div",{className:`${l}__content`,children:n}):null]}),a&&(0,L.jsx)("div",{className:`${l}__status`,children:a})]}),Mi===o&&(0,L.jsx)(Oi,{className:`${l}__progress`,intent:"info",progress:r})]})]})};Ri.defaultProps={icon:null,title:null,status:Li,statusText:null,progress:-1,children:null,className:null,baseClassName:`${F.CLS_PREFIX}progress-step`};const Ni=Ri;class Fi extends U.Component{constructor(){super(...arguments),B(this,"state",{status:null})}static getDerivedStateFromProps(e){let{children:t}=e,n=!0,s=!0,i=!0,a=!1;return t&&U.Children.forEach(t,(e=>{(0,U.isValidElement)(e)&&e.props.status&&(n=n&&e.props.status===Li,s=s&&e.props.status===Ai,i=i&&[Ai,Ei].includes(e.props.status),a=a||e.props.status===Ui)})),s?{status:Ai}:i?{status:Ei}:n?{status:Li}:a?{status:Ui}:{status:Mi}}componentDidMount(){const{status:e}=this.state,{onStatusChange:t}=this.props;e&&G(t,e)}componentDidUpdate(e,t){const{status:n}=this.state,{onStatusChange:s}=this.props;t.status!==n&&n&&G(s,n)}render(){const{baseClassName:e,className:t,children:n,onStatusChange:s,...i}=this.props;return(0,L.jsx)("div",{className:N()(e,t),...i,children:n})}}B(Fi,"defaultProps",{onStatusChange:null,children:null,className:null,baseClassName:`${F.CLS_PREFIX}progress`});const Yi=Fi,Bi=Ie({defaultProps:{size:"lg"}});class Hi extends U.Component{constructor(){super(...arguments),B(this,"state",{status:null}),B(this,"closeTimeout",void 0),B(this,"handleStatusChange",(e=>{const{onClosableChange:t,onFinish:n,onFail:s,cancelable:i,onStatusChange:a}=this.props,r=e===Ai,o=e===Ui;G(a,e),this.setState({status:e}),G(t,i||r||o),r?G(n):o&&G(s)})),B(this,"handleClose",(()=>{const{onClose:e,onCancel:t,cancelable:n}=this.props;window.clearTimeout(this.closeTimeout),n&&G(t),G(e)})),B(this,"handleCancel",(()=>{const{onCancel:e,onClose:t,cancelable:n}=this.props;window.clearTimeout(this.closeTimeout),n&&G(e),G(t)}))}componentDidUpdate(e,t){const{autoCloseTimeout:n,onStart:s}=this.props,{status:i}=this.state;t.status!==Ai&&i===Ai&&(window.clearTimeout(this.closeTimeout),null!==n&&(this.closeTimeout=window.setTimeout(this.handleClose,n))),t.status===Li&&i!==Li&&G(s)}componentWillUnmount(){window.clearTimeout(this.closeTimeout)}render(){const{baseClassName:e,title:t,steps:n,buttons:s,cancelable:i,render:a}=this.props,{status:r}=this.state,o=i&&!(r===Ai||r===Ui),l=!(!s&&!o),c=(0,L.jsxs)(U.Fragment,{children:[t&&(0,L.jsx)("div",{className:`${e}__title`,children:t}),(0,L.jsx)(Yi,{onStatusChange:this.handleStatusChange,className:`${e}__progress`,children:n.map(((e,t)=>(0,L.jsx)(Ni,{...e},t.toString())))})]}),u=l?(0,L.jsxs)("div",{className:`${e}__footer`,children:[(0,L.jsx)(Pe.Provider,{value:Bi,children:s}),o&&(0,L.jsx)(Ue,{onClick:this.handleCancel,size:"lg",children:(0,L.jsx)(wt,{content:"DrawerProgress.cancelButton",fallback:"Cancel"})})]}):null;return"function"==typeof a?a({content:c,footer:u}):(0,L.jsxs)(U.Fragment,{children:[c,u]})}}B(Hi,"defaultProps",{baseClassName:`${F.CLS_PREFIX}drawer-progress`,autoCloseTimeout:0,cancelable:!1,steps:[]});const Vi=Hi,$i={isOpen:!1,subtitle:void 0,backButton:void 0,hideButton:void 0,tabs:void 0,placement:"left",size:"md",onClose:void 0,closingConfirmation:void 0,form:void 0,sideBanner:void 0,sideBannerContainer:void 0,progress:void 0,children:null,className:void 0,baseClassName:`${F.CLS_PREFIX}drawer`},Wi=e=>{let{baseClassName:t,className:n,children:s,title:i,subtitle:a,backButton:r,hideButton:o,tabs:l,onClose:c,form:u,progress:d,closingConfirmation:p,...h}=e;const m=(0,U.useRef)(null),[f,g]=(0,U.useState)(!0),{onCloseWithConfirmation:b,closingConfirmationDialog:v}=Vs({onClose:c,closingConfirmation:p});return(0,L.jsxs)(Hs,{className:N()(t,{[`${t}--form`]:u},n),onClose:b,canCloseOnBackdropClick:!0,...h,children:[(e=>{if(d){d.onClose=b,d.onClosableChange=g;const n=n=>{let{content:s,footer:i}=n;return e({content:(0,L.jsx)("div",{className:`${t}__form`,children:s}),footer:i})};return(0,L.jsx)(Vi,{render:n,...d})}if(u){if((0,U.isValidElement)(u))return(0,U.cloneElement)(u,{className:N()(`${t}__form`,u.props.className),cancelButton:!1!==u.props.cancelButton&&{onClick:b,..."object"==typeof u.props.cancelButton&&u.props.cancelButton},render:t=>{let{renderForm:n,renderActionButtons:s}=t;return e({content:n(),footer:s()})}});if("object"==typeof u)return u.className=N()(`${t}__form`,u.className),!1!==u.cancelButton&&(u.cancelButton={onClick:b,..."object"==typeof u.cancelButton&&u.cancelButton}),(0,L.jsx)(Si,{...u,render:t=>{let{renderForm:n,renderActionButtons:s}=t;return e({content:n(),footer:s()})},children:s})}return e({content:(0,L.jsx)("div",{className:`${t}__inner-body`,children:s})})})((e=>{let{content:n,footer:s}=e;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(Ti,{backButton:r,hideButton:"boolean"==typeof o?o:Boolean(d&&!f),onClose:b,tabs:l,children:[jn(i)?(0,L.jsx)(kn,{level:2,className:`${t}__title`,children:i}):(0,L.jsx)("div",{className:`${t}__title`,children:i}),a&&(0,L.jsx)("div",{className:`${t}__subtitle`,children:a})]}),(0,L.jsx)("div",{className:`${t}__body`,ref:m,children:(0,L.jsx)(ei.Provider,{value:m.current,children:n})}),s&&(0,L.jsx)("footer",{className:`${t}__footer`,children:(0,L.jsx)("div",{className:`${t}__footer-inner`,children:s})})]})})),v]})};Wi.defaultProps=$i;const zi=Wi,qi=e=>{let{baseClassName:t=`${F.CLS_PREFIX}extended-status-message`,className:n,intent:s,image:i,children:a=!1,loading:r,...o}=e;return(0,L.jsx)("div",{className:`${t}__container`,children:(0,L.jsxs)("div",{className:N()(t,{[`${t}--${s}`]:s,[`${t}--loading`]:r},n),...o,children:[i?(0,L.jsx)("div",{className:`${t}__image`,children:i}):null,(0,L.jsx)("div",{className:`${t}__body`,children:a}),r&&(0,L.jsx)(It,{overlay:!0,text:!0===r?null:r})]})})},Gi=e=>{let{baseClassName:t=`${F.CLS_PREFIX}extended-status-message`,className:n,children:s,...i}=e;return(0,L.jsx)("div",{className:N()(`${t}__actions`,n),...i,children:s})},Ki=e=>{let{baseClassName:t=`${F.CLS_PREFIX}extended-status-message`,className:n,children:s,...i}=e;return(0,L.jsx)("div",{className:N()(`${t}__description`,n),...i,children:s})},Xi=e=>{let{baseClassName:t=`${F.CLS_PREFIX}extended-status-message`,className:n,children:s,...i}=e;return(0,L.jsx)(kn,{level:3,className:N()(`${t}__title`,n),...i,children:s})},Zi=e=>{let{className:t,label:n,autoFocus:s,required:i=!1,checkedValue:a=!0,uncheckedValue:r=!1,baseClassName:o=`${F.CLS_PREFIX}form-field-checkbox`,...l}=e;return(0,L.jsx)(ui,{className:N()(o,t),label:null,required:i,...l,children:e=>{let{getId:t,getName:o,getValue:l,setValue:c,getRequiredMark:u,getFullDescription:d,isDisabled:p}=e;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("input",{type:"hidden",name:o(),value:r.toString()}),(0,L.jsx)(it,{checked:l()===a,onChange:e=>c(e?a:r),inputProps:{id:t(),name:o(),value:a.toString(),autoFocus:s},disabled:p(),rightAddon:(0,L.jsxs)(L.Fragment,{children:[d(),i?u():null]}),children:n})]})}})},Ji={improvePassword:"To improve your password:",passwordTooShort:"Make the password longer.",lettersLowerCase:"Use at least one lower-case character.",lettersUpperCase:"Use at least one upper-case character.",numbers1:"Use at least one number.",numbers3:"Use at least three numbers.",specialChar1:"Use at least one special character (for example: !, @, #, $, % ,^, &, *, ?, _, ~).",specialChar2:"Use at least two special characters (for example: !, @, #, $, %, ^, &, *, ?, _, ~).",comboUpperAndLower:"Use both upper and lower-case characters.",comboLettersAndNumbers:"Use both numbers and characters.",comboLettersNumbersSpecial:"Use numbers, characters and special characters.",yourPasswordIsStrong:"You can make it even stronger by increasing its length.",passwordStrength:"The password strength is %%strength%%.",strengthVeryStrong:"VERY STRONG",strengthStrong:"STRONG",strengthVeryWeak:"VERY WEAK",strengthWeak:"WEAK",strengthMedium:"MEDIUM",hidePassword:"Hide password",showPassword:"Show password",generateButton:"Generate",generateButtonHint:"Generate a strong password"},Qi={numbers1:"numbers3",specialChar1:"specialChar2",lettersLowerCase:"comboUpperAndLower",lettersUpperCase:"comboUpperAndLower"},ea=[{name:"passwordTooShort",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.passwordTooShort",fallback:Ji.passwordTooShort}),score:e=>e.length<5?-1:0},{name:"passwordLength",score:e=>e.length<5?3:e.length>4&&e.length<8?6:e.length>7&&e.length<16?12:18},{name:"lettersLowerCase",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.lettersLowerCase",fallback:Ji.lettersLowerCase}),score:e=>e.match(/[a-z]/)?1:-1},{name:"lettersUpperCase",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.lettersUpperCase",fallback:Ji.lettersUpperCase}),score:e=>e.match(/[A-Z]/)?5:-1},{name:"numbers1",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.numbers1",fallback:Ji.numbers1}),score:e=>e.match(/\d+/)?5:-1},{name:"numbers3",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.numbers3",fallback:Ji.numbers3}),score:e=>e.match(/(.*[0-9].*[0-9].*[0-9])/)?5:-1},{name:"specialChar1",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.specialChar1",fallback:Ji.specialChar1}),score:e=>e.match(/[!@#$%^&*?_~]/)?5:-1},{name:"specialChar2",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.specialChar2",fallback:Ji.specialChar2}),score:e=>e.match(/(.*[!@#$%^&*?_~].*[!@#$%^&*?_~])/)?5:-1},{name:"comboUpperAndLower",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.comboUpperAndLower",fallback:Ji.comboUpperAndLower}),score:e=>e.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)?2:-1},{name:"comboLettersAndNumbers",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.comboLettersAndNumbers",fallback:Ji.comboLettersAndNumbers}),score:e=>e.match(/([a-zA-Z])/)&&e.match(/([0-9])/)?2:-1},{name:"comboLettersNumbersSpecial",suggestion:(0,L.jsx)(wt,{content:"FormFieldPassword.comboLettersNumbersSpecial",fallback:Ji.comboLettersNumbersSpecial}),score:e=>e.match(/([a-zA-Z0-9].*[!@#$%^&*?_~])|([!@#$%^&*?_~].*[a-zA-Z0-9])/)?2:-1}],ta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ea,n=0;const s=[],i=new Set;let a;switch(t.forEach((t=>{const a=t.score(e);a>=0?n+=a:(i.add(Qi[t.name]),!i.has(t.name)&&t.suggestion&&s.push(t.suggestion))})),!0){case n<16:a="VeryWeak";break;case n<25:a="Weak";break;case n<35:a="Medium";break;case n<45:a="Strong";break;default:a="VeryStrong"}return{strength:a,suggestions:s}},na={VeryWeak:"danger",Weak:"danger",Medium:"warning",Strong:"success",VeryStrong:"success"},sa=e=>{let{value:t,visible:n,onEstimate:s,children:i,...a}=e;const[r,o]=(0,U.useState)(null);return(0,U.useEffect)((()=>{n&&Promise.resolve(s?s(t,ta,ea):ta(t)).then((e=>{o(e)}))}),[n,t,s]),(0,L.jsxs)(An,{visible:n&&null!==r,placement:"bottom-right",intent:r?na[r.strength]:void 0,canCloseOnOutsideClick:!1,canCloseOnEscapePress:!1,...a,target:i,children:[r?.strength?(0,L.jsx)(wt,{component:"div",content:"FormFieldPassword.passwordStrength",fallback:Ji.passwordStrength,params:{strength:(0,L.jsx)("b",{children:(0,L.jsx)(wt,{content:`FormFieldPassword.strength${r?.strength}`,fallback:Ji[`strength${r?.strength}`]})})}}):null,r?.suggestions.length?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(wt,{content:"FormFieldPassword.improvePassword",fallback:Ji.improvePassword}),(0,L.jsx)("br",{}),(0,L.jsx)("ul",{children:r.suggestions.slice(0,3).map(((e,t)=>(0,L.jsx)("li",{children:e},t.toString())))})]}):(0,L.jsx)(wt,{content:"FormFieldPassword.yourPasswordIsStrong",fallback:Ji.yourPasswordIsStrong})]})},ia={upper:"ABCDEFGHIJKLMNOPQRSTUVWXYZ",lower:"abcdefghijklmnopqrstuvwxyz",number:"0123456789",special:"!@#$%^&*?_~"};class aa extends U.Component{constructor(){super(...arguments),B(this,"state",{visible:!1,passwordMeterVisible:!1}),B(this,"targetRef",(0,U.createRef)()),B(this,"handleToggleClick",(()=>{this.setState((e=>{let{visible:t}=e;return{visible:!t}}))})),B(this,"handleClosePasswordMeter",(()=>{this.setState({passwordMeterVisible:!1})})),B(this,"handleBlur",this.handleClosePasswordMeter)}renderGenerateButton(e){let{setValue:t,isDisabled:n}=e;const{baseClassName:s,generateButton:i}=this.props,a={className:`${s}__button--generate`,onClick:()=>t(["upper","upper","upper","lower","lower","lower","lower","lower","lower","lower","lower","number","number","number","special","special"].sort(((e,t)=>Math.floor(t.length*Math.random())-Math.floor(e.length*Math.random()))).map((e=>ia[e][Math.floor(ia[e].length*Math.random())])).join("")),tooltip:(0,L.jsx)(wt,{content:"FormFieldPassword.generateButtonHint",fallback:Ji.generateButtonHint}),disabled:n(),children:(0,L.jsx)(wt,{content:"FormFieldPassword.generateButton",fallback:Ji.generateButton})};let r;return r="function"==typeof i?i(a):(0,L.jsx)(Ue,{...a}),(0,L.jsxs)(U.Fragment,{children:[" ",r]})}render(){const{baseClassName:e,className:t,hideShowButton:n,generateButton:s,hideGenerateButton:i,hidePasswordMeter:a,passwordMeterProps:r,size:o,autoFocus:l,autoComplete:c,...u}=this.props,{visible:d,passwordMeterVisible:p}=this.state;return(0,L.jsx)(ui,{className:N()(e,t),...u,children:t=>{let{getId:s,getName:u,getValue:h,setValue:m,isDisabled:f}=t;const g=h(""),b=(0,L.jsx)(vn,{id:s(),name:u(),type:d?"text":"password",value:g,onChange:e=>{m(e.target.value),this.setState({passwordMeterVisible:!0})},onBlur:this.handleBlur,autoFocus:l,autoComplete:c,className:`${e}__input`,size:o,suffix:n?null:(0,L.jsx)(Ue,{className:`${e}__button--show`,onClick:this.handleToggleClick,icon:d?"visible":"invisible",tooltip:d?(0,L.jsx)(wt,{content:"FormFieldPassword.hidePassword",fallback:Ji.hidePassword}):(0,L.jsx)(wt,{content:"FormFieldPassword.showPassword",fallback:Ji.showPassword}),ghost:!0,disabled:f()}),disabled:f(),rootProps:{ref:this.targetRef}});return(0,L.jsxs)("div",{className:N()(`${e}__control`,`${e}__control--${o}`),children:[(0,L.jsx)("div",{className:N()(`${e}__field`,`${e}__field--${o}`),children:a?b:(0,L.jsx)(sa,{value:g,targetRef:this.targetRef,visible:p&&""!==g,onClose:this.handleClosePasswordMeter,...r,children:b})}),i?null:this.renderGenerateButton({setValue:m,isDisabled:f})]})}})}}B(aa,"defaultProps",{hideShowButton:!1,generateButton:void 0,hideGenerateButton:!1,hidePasswordMeter:!1,passwordMeterProps:{},size:"md",autoFocus:void 0,autoComplete:void 0,className:void 0,baseClassName:`${F.CLS_PREFIX}form-field-password`});const ra=aa,oa=e=>{let{baseClassName:t=`${F.CLS_PREFIX}form-field-radio-buttons`,className:n,options:s,autoFocus:i,...a}=e;return(0,L.jsx)(ui,{className:N()(t,n),...a,children:e=>{let{getId:n,getName:a,getValue:r,setValue:o,isDisabled:l}=e;return s.map(((e,s)=>{let{value:c,label:u,description:d,disabled:p,indentFields:h=[]}=e;return(0,L.jsxs)("div",{className:`${t}__radio`,children:[(0,L.jsx)(Ms,{name:a(),checked:r()===c,onChange:e=>{e&&o(c)},disabled:l()||p,inputProps:{id:n()?`${n()}-${c}`:void 0,name:a(),value:c,autoFocus:!(0!==s||!i)||void 0},children:u||c}),d||h?(0,L.jsxs)("div",{className:`${t}__content`,children:[d&&(0,L.jsx)(Xs,{component:"div",className:`${si}__description`,children:d}),h.map((e=>l()||p||r()!==c?(0,U.cloneElement)(e,{disabled:!0}):e))]}):null]},c)}))}})},la="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n",ca=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"],ua=new Map;let da;const pa=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t&&ua.has(e))return ua.get(e);const n=window.getComputedStyle(e),s=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),i=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),a=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),r=ca.map((e=>`${e}:${n.getPropertyValue(e)}`)).join(";"),o={sizingStyle:r,paddingSize:i,borderSize:a,boxSizing:s};return t&&ua.set(e,o),o},ha=["sm","md","lg","xl","fill"];class ma extends U.Component{constructor(){super(...arguments),B(this,"state",{textareaStyles:null}),B(this,"rootRef",(0,U.createRef)()),B(this,"handleChange",(e=>{const{autoheight:t,onChange:n}=this.props;t&&this.adjustHeight(),"function"==typeof n&&n(e)}))}static getDerivedStateFromProps(e){let{rows:t}=e;return t?(e=>"number"==typeof e?{minRows:e}:"object"==typeof e&&"number"==typeof e.min&&"number"==typeof e.max?{minRows:e.min,maxRows:e.max}:null)(t):null}componentDidMount(){this.adjustHeight()}componentDidUpdate(e){const{autoheight:t}=this.props;t!==e.autoheight&&this.adjustHeight()}adjustHeight(){const{autoheight:e}=this.props;if(!e)return void this.setState({textareaStyles:null});const{minRows:t,maxRows:n}=this.state;if(this.rootRef.current){const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;da||(da=document.createElement("textarea"),document.body.appendChild(da)),e.getAttribute("wrap")?da.setAttribute("wrap",e.getAttribute("wrap")):da.removeAttribute("wrap");const{paddingSize:i,borderSize:a,boxSizing:r,sizingStyle:o}=pa(e,t);da.setAttribute("style",`${o};${la}`),da.value=e.value||e.placeholder||"";let l,c=null,u=null,d=da.scrollHeight;if("border-box"===r?d+=a:"content-box"===r&&(d-=i),null!==n||null!==s){da.value=" ";const e=da.scrollHeight-i;null!==n&&(c=e*n,"border-box"===r&&(c=c+i+a),d=Math.max(c,d)),null!==s&&(u=e*s,"border-box"===r&&(u=u+i+a),l=d>u?"":"hidden",d=Math.min(u,d))}return{height:d,minHeight:c,maxHeight:u,overflowY:l}}(this.rootRef.current,!1,t,n);this.setState({textareaStyles:e})}}render(){const{baseClassName:e,className:t,rows:n,size:s,autoheight:i,onChange:a,...r}=this.props,{textareaStyles:o,minRows:l}=this.state,c=s&&-1!==ha.indexOf(s);return(0,L.jsx)("textarea",{className:N()(e,{[`${e}--size-${s}`]:c},t),ref:this.rootRef,style:o,onChange:this.handleChange,rows:l,...r})}}B(ma,"defaultProps",{baseClassName:`${F.CLS_PREFIX}textarea`,className:null,rows:4,size:"md",autoheight:!1,onChange:null});const fa=ma,ga=e=>{const{baseClassName:t=`${F.CLS_PREFIX}form-field-text`,className:n,size:s,placeholder:i,rows:a=4,autoFocus:r,multiline:o=!1,autoComplete:l,autoheight:c=!1,inputProps:u,...d}=e;return(0,L.jsx)(ui,{className:N()(t,{[`${t}--multiline`]:o},n),...d,children:n=>{let{getId:o,getName:u,getValue:d,setValue:p,isDisabled:h}=n;return e.multiline?(0,L.jsx)(fa,{id:o(),name:u(),value:d(""),onChange:e=>p(e.currentTarget.value),disabled:h(),size:s,rows:a,placeholder:i,autoFocus:r,autoComplete:l,autoheight:c,...e.inputProps??{}}):(0,L.jsx)(vn,{id:o(),name:u(),className:`${t}__input`,value:d(""),onChange:e=>p(e.currentTarget.value),disabled:h(),size:s,placeholder:i,autoFocus:r,autoComplete:l,...e.inputProps??{}})}})},ba=e=>{let{baseClassName:t=`${F.CLS_PREFIX}combobox-dropdown`,className:n,control:s,controlRef:i,opened:a,disabled:r,groups:o,options:l,onHighlightedIndexChange:c,onClose:u,value:d,highlightedIndex:p,onSelect:h,noOptions:m,emitter:f,...g}=e;const b=(0,U.useRef)(null),v=(0,U.useRef)(null),[y,_]=(0,U.useState)(0);(0,U.useLayoutEffect)((()=>{if(a&&b.current){const{width:e}=b.current.getBoundingClientRect();e!==y&&_(e)}}),[a,y]),(0,U.useEffect)((()=>{if(!a)return;const e=()=>{G(u)};return window.addEventListener("resize",e,{once:!0}),()=>window.removeEventListener("resize",e)}),[a,u]),(0,U.useEffect)((()=>{f&&f.on("focus",(e=>{if(v.current){const t=v.current.querySelector(`[data-index="${e}"]`);t&&J(t,{behavior:"instant",block:"nearest",boundary:v.current})}}))}),[f]);const x=(0,L.jsx)(ct,{onClose:()=>{setTimeout((()=>{G(u)}),0)},ignoreNodes:()=>[v.current],nodeRef:i,children:s});return(0,L.jsx)("div",{className:n,...g,ref:b,children:(0,L.jsx)(pt,{target:x,targetRef:i,show:a&&!r,className:`${t}__popper`,zIndex:F.Z_INDEX_DROPDOWN,children:(0,L.jsxs)(Nn,{style:{minWidth:y},ref:v,className:`${t}__menu`,children:[o.reduce(((e,n)=>(n.label&&e.push((0,U.createElement)(Jn,{...n.props,key:`group_${n.label}`},n.label)),n.options.forEach((n=>{const s=l.indexOf(n);let i,a,r;n.disabled||(i=e=>{e.preventDefault(),G(h,n.value)},a=()=>{G(c,s)},r=e=>{e.preventDefault()});const o={...n.props,active:d===n.value,className:N()(`${t}__option`,{[`${t}__option--selected`]:s===p}),disabled:n.disabled,onClick:i,onMouseOver:a,onMouseDown:r,"data-index":s};e.push((0,L.jsx)(ft,{...o,children:n.children},`option_${n.value}`))})),e)),[]),0===l.length&&m&&(0,L.jsx)(ft,{disabled:!0,className:`${t}__no-options`,children:m})]})})})},va=e=>{let{baseClassName:t=`${F.CLS_PREFIX}select-multi-value`,onRemove:n,children:s,...i}=e;return(0,L.jsx)("div",{className:N()(t),...i,children:(0,L.jsxs)("div",{className:`${t}__content`,children:[(0,L.jsx)("span",{className:`${t}__label`,children:s}),(0,L.jsx)(he,{className:`${t}__remove`,size:"12",onMouseDown:e=>{e.preventDefault()},onClick:e=>{e.stopPropagation(),n()},children:(0,L.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 12",focusable:"false","aria-hidden":"true",children:(0,L.jsx)("path",{d:"M3.85 8.854a.498.498 0 1 1-.704-.704L5.296 6l-2.15-2.15a.498.498 0 0 1 .704-.704L6 5.296l2.15-2.15a.498.498 0 1 1\r .704.704L6.704 6l2.15 2.15a.498.498 0 0 1-.704.704L6 6.704l-2.15 2.15z"})})})]})})};let ya;const _a=(0,U.forwardRef)((function(e,t){let{baseClassName:n=`${F.CLS_PREFIX}select-control`,id:s,name:i,current:a,disabled:r,searchable:o,clearable:l,multiple:c,filterValue:u,onFilterChange:d,onHighlightChange:p,onHighlightConfirm:h,onHighlightSearch:m,onOpen:f,onClose:g,onClear:b,onValueRemove:v,placeholder:y,..._}=e;const x=(0,U.useRef)(null),S=(0,U.useRef)(""),w=(0,U.useRef)(0),[k,j]=(0,U.useState)(2),[T,C]=(0,U.useState)(!1),D=_t();void 0===y&&(y=D("Select.placeholder",void 0,"Select..."));let P=[];Array.isArray(a)?P=a.map((e=>{let{value:t}=e;return t})):a&&(P=[a.value]);const I=P.length>0;(0,U.useLayoutEffect)((()=>{""===u&&j(2)}),[u]);const O=e=>{v(e)};return(0,L.jsxs)("div",{className:N()(n,{[`${n}--disabled`]:r,[`${n}--focused`]:T,[`${n}--multiple`]:c}),..._,onClick:()=>{r||(f(),x.current&&x.current.focus())},ref:t,children:[(0,L.jsxs)("span",{className:`${n}__value-container`,children:[Array.isArray(a)&&a.map((e=>{let{value:t,label:n}=e;return(0,L.jsx)(va,{onRemove:()=>O(t),children:n},t)})),(0,L.jsx)("input",{id:s,className:`${n}__input`,value:u,type:"text",onChange:e=>{const t=(e=>{ya||(ya=document.createElement("pre"),document.body.appendChild(ya));const t=window.getComputedStyle(e);ya.style.fontFamily=t.fontFamily,ya.style.fontSize=t.fontSize,ya.style.padding="0",ya.style.display="inline-block",ya.style.width="auto",ya.style.position="absolute",ya.style.right="0",ya.style.top="-9999px",ya.style.visibility="hidden",ya.textContent=e.value;const{width:n}=ya.getBoundingClientRect();return n||2})(e.target);j(t),d(e.target.value)},onKeyDown:e=>{switch(e.key){case"ArrowUp":e.preventDefault(),p(-1);break;case"ArrowDown":e.preventDefault(),p(1);break;case"PageUp":e.preventDefault(),p(-10);break;case"PageDown":e.preventDefault(),p(10);break;case"Enter":e.preventDefault(),h();break;case"Escape":e.preventDefault(),d(""),g();break;case"Backspace":""===u&&(c||l)&&O();break;default:o||1!==e.key.length||(S.current+=e.key,m(S.current),window.clearTimeout(w.current),w.current=window.setTimeout((()=>{S.current=""}),1e3))}},onFocus:()=>{C(!0)},onBlur:()=>{C(!1)},onClick:e=>{0===e.detail&&e.stopPropagation()},readOnly:!o,disabled:r,ref:x,style:{width:k}}),!u&&(0,L.jsxs)(U.Fragment,{children:[!Array.isArray(a)&&a&&(0,L.jsx)("span",{className:`${n}__value`,children:a.children}),!I&&y&&(0,L.jsx)("span",{className:`${n}__placeholder`,children:y})]})]}),(0,L.jsxs)("span",{className:`${n}__indicators`,children:[l&&I&&(0,L.jsx)("button",{type:"button",className:N()(`${n}__indicator`,`${n}__indicator--clear`),tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:e=>{e.stopPropagation(),b()},children:(0,L.jsx)(he,{className:`${n}__indicator-icon`,children:(0,L.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-4 -4 16 16","aria-hidden":"true",focusable:"false",children:(0,L.jsx)("path",{d:"M.85 7.854a.498.498 0 1 1-.704-.704L3.296 4 .146.85A.498.498 0 0 1 .85.146L4 3.296 7.15.146a.498.498 0 0 1\r .704.704L4.704 4l3.15 3.15a.498.498 0 0 1-.704.704L4 4.704.85 7.854z"})})})}),(0,L.jsx)("button",{type:"button",className:N()(`${n}__indicator`,`${n}__indicator--dropdown`),tabIndex:-1,children:(0,L.jsx)(he,{className:`${n}__indicator-icon`,children:(0,L.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"-4 -5 16 16","aria-hidden":"true",focusable:"false",children:(0,L.jsx)("path",{d:"M4 4.048L.847.895a.496.496 0 1 0-.702.702l3.452 3.451a.5.5 0 0 0 .806 0l3.452-3.451a.496.496 0 0 0-.702-.702L4 4.048z"})})})})]}),i&&P.map((e=>(0,L.jsx)("input",{type:"hidden",name:i,value:e},e)))]})}));_a.displayName="SelectControl";const xa=_a,Sa=e=>null,wa=e=>null,ka=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const s=[];return U.Children.forEach(e,(e=>{if(!(0,U.isValidElement)(e)||e.type!==Sa&&"optgroup"!==e.type){if((0,U.isValidElement)(e)&&(e.type===wa||"option"===e.type)){let s,{value:i,label:a,disabled:r,children:o,...l}=e.props;if("string"!=typeof i&&"number"!=typeof i){if("string"!=typeof o||!o)throw new Error("The value can only be a number or a string.");i=o}if(a&&"string"==typeof a?({label:s}=e.props):"string"==typeof e.props.children&&(s=e.props.children),!s)throw new Error("The label can only be a string.");const c={value:i,label:s,children:o,disabled:Boolean(r),group:n,props:l};t.push(c),n&&n.options.push(c)}}else{const{label:n,children:i,...a}=e.props,r={label:String(n),options:[],props:a};s.push(r),ka(i,t,r)}})),0===s.length&&s.push({options:t}),{groups:s,options:t}},ja=(e,t)=>Array.isArray(t)?[...t,e]:e,Ta=e=>{let{id:t,name:n,size:s,baseClassName:i=`${F.CLS_PREFIX}select`,className:a,children:r,defaultValue:o,value:l,onChange:c,disabled:u=!1,searchable:d=!1,clearable:p=!1,multiple:h=!1,placeholder:m,...f}=e;const[g,b]=(0,U.useState)(!1),v=(0,U.useRef)(null),y=(0,U.useRef)(new Q);let[_,x]=(0,U.useState)((()=>void 0===o?h?[]:void 0:o));void 0!==l&&(_=l,x=()=>{});const[S,w]=(0,U.useState)(""),[k,j]=(0,U.useState)(0);let T,{groups:C,options:D}=ka(r);if(Array.isArray(_)){const e=[];_.forEach((t=>{const n=D.find((e=>e.value===t));n&&e.push(n)})),T=e}else T=D.find((e=>e.value===_));const P=[],I=[];function O(e){return t=>e.every((e=>e(t)))}if(Array.isArray(_)&&_.length>0){const e=_;P.push((()=>!1)),I.push((t=>-1===e.indexOf(t.value)))}if(S){const e=S.toLowerCase();P.push((t=>!!t.label&&t.label.toLowerCase().includes(e))),I.push((t=>t.label.toLowerCase().includes(e)))}if(P.length||I.length){const e=O(P),t=O(I);D=[],C=C.filter((n=>e(n)?(D=[...D,...n.options],!0):(n.options=n.options.filter((e=>!!t(e)&&(D.push(e),!0))),n.options.length>0)))}k&&k>D.length-1&&j(0);const M=e=>{y.current.emit("focus",e)},A=e=>{if(!g&&void 0===e)return;const t=D[void 0===e?k:e];if(!t)return;if(t.disabled)return;const n=ja(t.value,_);x(n),w(""),h||R(),G(c,n)},E=()=>{b(!0)},R=()=>{b(!1),j(0)},Y=(0,L.jsx)(xa,{id:t,name:n,current:T,filterValue:S,searchable:d,clearable:p,multiple:h,disabled:u,onFilterChange:e=>{E(),w(e)},onHighlightChange:e=>{if(!g)return void E();const t=((e,t,n)=>{const s=n.length-1;let i=0;for(let a=e+t;i<n.length;a+=t)if(i+=1,a>s?a=0:a<0&&(a=s),n[a]&&!1===n[a].disabled)return a;return-1})(k,e,D);-1!==t&&(j(t),M(t))},onHighlightConfirm:A,onHighlightSearch:e=>{const t=e.toLowerCase(),n=D.findIndex((e=>!e.disabled&&e.label.toLowerCase().includes(t)));-1!==n&&(j(n),M(n),g||A(n))},onOpen:E,onClose:R,onClear:()=>{const e=Array.isArray(_)?[]:void 0;w(""),x(e),G(c,e)},onValueRemove:e=>{if(Array.isArray(_)){let t;void 0===e?(t=[..._],t.pop()):t=_.filter((t=>t!==e)),x(t),G(c,t)}else x(void 0),G(c,void 0)},placeholder:m,ref:v});return(0,L.jsx)(ba,{className:N()(i,a,{[`${i}--size-${s}`]:s}),control:Y,controlRef:v,opened:g&&!u,disabled:u,groups:C,options:D,onSelect:e=>{const t=ja(e,_);x(t),w(""),h||R(),G(c,t)},highlightedIndex:k,onHighlightedIndexChange:e=>{j(e)},onClose:R,noOptions:(0,L.jsx)(wt,{content:"Select.noOptions",fallback:"No options"}),emitter:y.current,value:_,...f})},Ca=e=>{let{size:t,baseClassName:n=`${F.CLS_PREFIX}form-field-select`,className:s,children:i,searchable:a,clearable:r,multiple:o,placeholder:l,...c}=e;return(0,L.jsx)(ui,{className:N()(n,s),...c,children:e=>{let{getId:n,getName:s,setValue:c,getValue:u,isDisabled:d}=e;return(0,L.jsx)(Ta,{size:t,id:n(),name:s(),value:u(o?[]:void 0),onChange:c,disabled:d(),searchable:a,clearable:r,multiple:o,placeholder:l,children:i})}})},Da=e=>{let{children:t,baseClassName:n=`${F.CLS_PREFIX}item`,component:s,view:i="simple",className:a,icon:r,title:o,description:l,footer:c,value:u,tooltip:d,disabled:p,hoverable:h,...m}=e;const f=s||"div";m.onClick&&(p?m.onClick=e=>e.preventDefault():(m.tabIndex=0,m.onKeyDown=K(m.onKeyDown,(e=>{"Enter"===e.key&&(e.preventDefault(),e.currentTarget.click())}))));const g=(0,L.jsxs)(f,{className:N()(n,{[`${n}--card`]:"card"===i,[`${n}--disabled`]:p,[`${n}--hoverable`]:h},a),...m,children:[(0,L.jsxs)(is,{image:r?"string"==typeof r?he.create({},{size:ce,[-1===re.indexOf(r)?"src":"name"]:r}):he.create(r,{size:ce}):null,title:(()=>{if(!o)return null;let e=!1;return"string"==typeof o?(o=(0,L.jsx)("span",{children:o}),e=!0):"object"!=typeof o||(0,U.isValidElement)(o)||(o=(0,L.jsx)("a",{...o}),e=!0),e&&"card"===i&&(o=(0,L.jsx)(kn,{level:3,children:o})),(0,U.isValidElement)(o)&&(o=(0,U.cloneElement)(o,{className:N()(`${n}__title`,o.props.className)})),o})(),className:`${n}__media`,children:[l&&(0,L.jsx)("div",{className:`${n}__description`,children:l}),U.Children.toArray(t).length?(0,L.jsx)("div",{className:`${n}__content`,children:t}):null]}),c&&(0,L.jsx)("footer",{className:`${n}__footer`,children:c})]});return d?Z((e=>(0,L.jsx)(je,{title:d,children:(0,U.cloneElement)(g,e)}))):g};class Pa extends U.Component{constructor(e){super(e),B(this,"createItemProps",(e=>{const{baseClassName:t,selectable:n,onSelect:s,reorderable:i,hoverable:a}=this.props,r=[`${t}__item`],o={};if(n&&void 0!==e.props.value){const{value:i}=this.state,a=e.props.value;(Array.isArray(i)&&-1!==i.indexOf(a)||i===a)&&r.push(`${t}__item--selected`),o.onClick=t=>{G(e.props.onClick,t);const r=((e,t,n)=>Array.isArray(t)?-1!==t.indexOf(e)?n?t.filter((t=>t!==e)):t:[...t,e]:n&&t===e?null:e)(a,i,"toggleable"===n||"multiple"===n);this.setState({value:r}),G(s,r)}}return void 0===e.props.hoverable&&(o.hoverable=a&&this.canManageHoverableState()),i&&r.push(`${t}__item--reorderable`),r.push(e.props.className),o.className=N()(...r),o})),this.state={ReorderableGrid:null,ReorderableGridCol:null,value:void 0===e.defaultValue?null:e.defaultValue}}static getDerivedStateFromProps(e,t){let{selectable:n,value:s}=e;if(n){const e="multiple"===n,i=e?[]:null,a=void 0===s?t.value:s;return e&&!Array.isArray(a)?a?{value:[a]}:{value:i}:!e&&Array.isArray(a)?a[0]?{value:a[0]}:{value:i}:{value:a}}return null}componentDidMount(){const{reorderable:e}=this.props;e&&Promise.all([r.e(588),r.e(147)]).then(r.bind(r,15091)).then((e=>{let{sortableContainer:t,sortableElement:n}=e;this.setState({ReorderableGrid:t(Xn),ReorderableGridCol:n(Zn)})}))}renderNormal(e){let{baseClassName:t,children:n,...s}=e;return(0,L.jsx)(Xn,{...s,children:U.Children.map(n,(e=>(0,U.isValidElement)(e)?(0,L.jsx)(Zn,{className:N()(`${t}__col`),children:(0,U.cloneElement)(e,this.createItemProps(e))}):null))})}someChild(e){let t=!1;return U.Children.forEach(this.props.children,(n=>{n&&e(n)&&(t=!0)})),t}canManageHoverableState(){const{reorderable:e,selectable:t}=this.props;return!e&&!t}isHoverable(){return!!this.canManageHoverableState()&&(this.props.hoverable||this.hasHoverableCard())}hasViewCard(){return this.someChild((e=>e.props&&"card"===e.props.view))}hasHoverableCard(){return this.someChild((e=>e.props&&!!e.props.hoverable))}renderReorderable(e){let{baseClassName:t,onReorderEnd:n,children:s,...i}=e;const{ReorderableGrid:a,ReorderableGridCol:r}=this.state;if(!a)return null;const o=N()({[`${t}__col--gap-xs`]:"xs"===i.gap,[`${t}__col--gap-sm`]:"sm"===i.gap,[`${t}__col--gap-md`]:"md"===i.gap,[`${t}__col--gap-lg`]:"lg"===i.gap,[`${t}__col--gap-xl`]:"xl"===i.gap});return(0,L.jsx)(a,{axis:"xy",helperClass:o,onSortEnd:n,...i,children:U.Children.map(s,((e,n)=>{if((0,U.isValidElement)(e)){const{disabled:s}=e.props;return(0,L.jsx)(r,{index:n,className:N()(`${t}__col`),disabled:s,children:(0,U.cloneElement)(e,this.createItemProps(e))})}return null}))})}render(){const{className:e,reorderable:t,hoverable:n,stretchable:s,selectable:i,onSelect:a,value:r,defaultValue:o,onReorderEnd:l,...c}=this.props;return(0,L.jsx)("div",{className:N()(this.props.baseClassName,{[`${this.props.baseClassName}--hoverable`]:this.isHoverable(),[`${this.props.baseClassName}--stretchable`]:s,[`${this.props.baseClassName}--selectable`]:i,[`${this.props.baseClassName}--cards`]:this.hasViewCard()},e),children:t?this.renderReorderable({onReorderEnd:l,...c}):this.renderNormal(c)})}}B(Pa,"defaultProps",{hoverable:!0,stretchable:!1,reorderable:!1,selectable:!1,baseClassName:`${F.CLS_PREFIX}item-list`});const Ia=Pa;var Oa=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function La(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!((s=e[n])===(i=t[n])||Oa(s)&&Oa(i)))return!1;var s,i;return!0}const Ma=function(e,t){var n;void 0===t&&(t=La);var s,i=[],a=!1;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];return a&&n===this&&t(r,i)||(s=e.apply(this,r),a=!0,n=this,i=r),s}},Aa=(e,t,n)=>{void 0===t&&(t="filtered"===n?"/modules/wp-toolkit/images/filtered.png":"/modules/wp-toolkit/images/default.png");let s=t;return"string"==typeof t&&(s=(0,L.jsx)("img",{src:t,height:"192",alt:""})),s?(0,L.jsx)("div",{className:`${e}__image`,children:s}):null},Ea=(e,t,n)=>(void 0===t&&(t="filtered"===n?(0,L.jsx)(wt,{content:"ListEmptyView.filteredTitle",fallback:"Could not find any items matching the filter"}):(0,L.jsx)(wt,{content:"ListEmptyView.emptyTitle",fallback:"Looks like there's nothing here"})),(0,L.jsx)(kn,{level:3,className:`${e}__title`,children:t})),Ua=(e,t,n)=>void 0!==t||n?(void 0===t&&"filtered"===n&&(t=(0,L.jsx)(wt,{content:"ListEmptyView.filteredDescription",fallback:"Refine your query or remove some of the criteria from the filter and try again."})),(0,L.jsx)("div",{className:`${e}__description`,children:t})):null,Ra=Ie({defaultProps:{size:"lg"}}),Na=e=>{let{baseClassName:t=`${F.CLS_PREFIX}list-empty-view`,className:n,title:s,image:i,description:a,actions:r,reason:o,...l}=e;return(0,L.jsxs)("div",{className:N()(t,n),...l,children:[Aa(t,i,o),(0,L.jsxs)("div",{className:`${t}__body`,children:[Ea(t,s,o),Ua(t,a,o),r&&(0,L.jsx)("div",{className:`${t}__actions`,children:(0,L.jsx)(Pe.Provider,{value:Ra,children:r})})]})]})};var Fa=U.createContext({hadKeyboardEvent:!0,isInitialized:!1});function Ya(e){var t=(0,U.useState)(!0),n=t[0],s=t[1];return(0,U.useEffect)((function(){function e(){s(!1)}function t(e){var t,n=null==e?void 0:e.target;"html"!==(null==n||null===(t=n.nodeName)||void 0===t?void 0:t.toLowerCase())&&(s(!1),i())}function n(){document.addEventListener("mousemove",t),document.addEventListener("mousedown",t),document.addEventListener("mouseup",t),document.addEventListener("pointermove",t),document.addEventListener("pointerdown",t),document.addEventListener("pointerup",t),document.addEventListener("touchmove",t),document.addEventListener("touchstart",t),document.addEventListener("touchend",t)}function i(){document.removeEventListener("mousemove",t),document.removeEventListener("mousedown",t),document.removeEventListener("mouseup",t),document.removeEventListener("pointermove",t),document.removeEventListener("pointerdown",t),document.removeEventListener("pointerup",t),document.removeEventListener("touchmove",t),document.removeEventListener("touchstart",t),document.removeEventListener("touchend",t)}function a(e){e.metaKey||e.altKey||e.ctrlKey||s(!0)}function r(e){"hidden"===document.visibilityState&&(s(!0),n())}return document.addEventListener("keydown",a,!0),document.addEventListener("mousedown",e,!0),document.addEventListener("pointerdown",e,!0),document.addEventListener("touchstart",e,!0),document.addEventListener("visibilitychange",r,!0),n(),function(){document.removeEventListener("keydown",a,!0),document.removeEventListener("mousedown",e,!0),document.removeEventListener("pointerdown",e,!0),document.removeEventListener("touchstart",e,!0),document.removeEventListener("visibilitychange",r,!0),i()}}),[s]),U.createElement(Fa.Provider,{value:{hadKeyboardEvent:n,isInitialized:!0}},e.children)}function Ba(e,t){const{rowKey:n}=t;return"function"==typeof n?n(e):e[n]}const Ha=e=>{let{baseClassName:t,className:n,...s}=e;const{focusVisible:i,onFocus:a,onBlur:r}=(l=(o=(0,U.useState)(!1))[0],c=o[1],d=(u=(0,U.useContext)(Fa)).hadKeyboardEvent,{focusVisible:u.isInitialized?d&&l:l,onFocus:function(){c(!0)},onBlur:function(){c(!1)}});var o,l,c,u,d;return(0,L.jsx)("tbody",{...s,onFocus:K(s.onFocus,a),onBlur:K(s.onBlur,r),className:N()(n,{[`${t}--focus-visible`]:i})})};Ha.propTypes={onFocus:Fe().func,onBlur:Fe().func,className:Fe().string,baseClassName:Fe().string},Ha.defaultProps={onFocus:void 0,onBlur:void 0,className:void 0,baseClassName:`${F.CLS_PREFIX}list__wrapper`};const Va=e=>{let t,{selectedRows:n,totalRows:s,allRowsSelected:i,translators:a}=e;t=i||0!==n?i||n===s?"selectedAllRows":"selectedRows":"totalRows";const r=e=>(0,L.jsx)(Wn,{fontSize:"sm",children:e});switch(t){case"totalRows":return r((0,L.jsx)(wt,{namespace:"List",content:"totalRows",fallback:"%%totalRows%% items total",params:{totalRows:s},translators:a}));case"selectedRows":return r((0,L.jsx)(wt,{namespace:"List",content:"selectedRows",fallback:"%%selectedRows%% of %%totalRows%% items selected",params:{selectedRows:(0,L.jsx)(Wn,{bold:!0,children:n}),totalRows:s},translators:a}));case"selectedAllRows":return r((0,L.jsx)(wt,{namespace:"List",content:"selectedRows",fallback:"%%selectedRows%% of %%totalRows%% items selected",params:{selectedRows:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(wt,{namespace:"List",content:"all",fallback:"All",translators:a})}),totalRows:s},translators:a}));default:return null}};class $a extends U.Component{constructor(){super(...arguments),B(this,"state",{sortInPlace:!this.props.pagination,vertical:!1,expandedRows:this.props.expandedRows??[],ReorderableList:void 0,reorderableItemWidths:[],prevExpandedRows:this.props.expandedRows??[],sortColumn:void 0,prevSortColumn:void 0,sortDirection:void 0,prevSortDirection:void 0,selection:this.props.selection??[],prevSelection:this.props.selection??[],prevData:[],prevPagination:void 0}),B(this,"needScroll",!1),B(this,"anchorRef",(0,U.createRef)()),B(this,"flatData",(e=>e.reduce(((e,t)=>{const{data:n}=t,{virtual:s}=this.getRowProps(t);return s?[...e,...n?this.flatData(n):[]]:[...e,t,...n?this.flatData(n):[]]}),[]))),B(this,"handleRowSelectionChange",((e,t)=>{const{onAllRowsSelectedChange:n}=this.props;let s;e?(s=this.state.selection.slice(),s.push(t)):(s=this.state.selection.filter((e=>e!==t)),G(n,!1)),this.setSelection(s)})),B(this,"handleGlobalSelectionChange",(e=>{const{onAllRowsSelectedChange:t,data:n}=this.props,{selection:s}=this.state,i=[];this.flatData(n??[]).forEach((t=>{const n=Ba(t,this.props);t.disabled||this.isRowLoading(t)?-1!==s.indexOf(n)&&i.push(n):e&&i.push(n)})),e||G(t,!1),this.setSelection(i)})),B(this,"handleResize",(e=>{let{bounds:t}=e;t&&this.props.vertical&&this.setState({vertical:"boolean"==typeof this.props.vertical?this.props.vertical:t.width<this.props.vertical})})),B(this,"isRowLoading",(e=>-1!==this.props.loadingRows?.indexOf(Ba(e,this.props)))),B(this,"getRowTitle",(e=>{const{columns:t}=this.props,n=t.find((e=>"title"===e.type));if(n&&n.key)return e[n.key]})),B(this,"getRowProps",(e=>{const{rowProps:t}=this.props;return"function"==typeof t?{...t(e)}:{...t}})),B(this,"isAllRowsChecked",Ma(((e,t)=>{const n=this.flatData(e).filter((e=>!e.disabled));return n.length>0&&n.every((e=>{const n=Ba(e,this.props);return-1!==t.indexOf(n)}))}))),B(this,"isAnyRowsExpanded",Ma(((e,t)=>this.flatData(e).some((e=>{const n=Ba(e,this.props);return-1!==t.indexOf(n)}))))),B(this,"handleGlobalExpandingChange",(()=>{const{data:e}=this.props,{expandedRows:t}=this.state,n=this.isAnyRowsExpanded(e,t),s=[];this.flatData(e??[]).forEach((e=>{const i=Ba(e,this.props);this.isRowExpandable(e)?n||s.push(i):-1!==t.indexOf(i)&&s.push(i)})),this.setExpandedRows(s)})),B(this,"createRowClickHandler",(e=>t=>{X(t)||this.isRowExpandable(e)&&this.handleRowExpandingChange(e)}))}static getDerivedStateFromProps(e,t){let{sortColumn:n,sortDirection:s,selection:i,expandedRows:a,notExpandableRows:r,renderRowBody:o,data:l,pagination:c,vertical:u,rowKey:d,totalRows:p,filtered:h}=e,{prevSortColumn:m,prevSortDirection:f,prevData:g,prevSelection:b,prevPagination:v,prevExpandedRows:y,..._}=t,x={};m===n&&f===s||(x={...x,sortColumn:n,sortDirection:s});const S=[];if(g!==l){const e=()=>l&&_.expandedRows.includes(Ba(l[0],{rowKey:d}));if(o&&1===l?.length&&(!c||1===p)&&(!g||0===g?.length||e())&&(!h||e())){const e=Ba(l[0],{rowKey:d});-1===r?.indexOf(e)&&S.push(e)}const t=(l??[]).map((e=>Ba(e,{rowKey:d}))),n=_.selection.filter((e=>-1!==t.indexOf(e)));x={...x,selection:n}}return b!==i&&(x={...x,selection:i??[]}),(y!==a||S.length)&&(x={...x,expandedRows:[...a??[],...S]}),v!==c&&(x={...x,sortInPlace:!c}),"boolean"==typeof u&&(x.vertical=u),x.prevSortColumn=n,x.prevSortDirection=s,x.prevData=l,x.prevSelection=i,x.prevPagination=c,x.prevExpandedRows=a,x}componentDidMount(){this.props.reorderable&&this.applyReorderableList()}componentDidUpdate(e){const{data:t}=this.props,{data:n}=e;t!==n&&this.needScroll&&this.anchorRef.current&&(J(this.anchorRef.current,{scrollMode:"if-needed"}),this.needScroll=!1),e.reorderable!==this.props.reorderable&&this.props.reorderable&&this.applyReorderableList()}applyReorderableList(){r.e(405).then(r.t.bind(r,56695,23)).then((e=>{let{List:t}=e;this.setState({ReorderableList:t})}))}getData(){const{sortInPlace:e,sortColumn:t,sortDirection:n}=this.state,{data:s,columns:i}=this.props;if(!s)return[];if(!e)return s;const[a]=i.filter((e=>{let{key:n}=e;return n===t}));return a&&t?s.sort(((e,s)=>(a.sort?a.sort(e,s):((e,t)=>e>t?1:e<t?-1:0)(e[t],s[t]))*("ASC"===n?1:-1))):s}sort(e){const{sortInPlace:t}=this.state,{sortColumn:n,sortDirection:s}=this.state;if(!n||!s)return;const i=n===e&&"ASC"===s?"DESC":"ASC",a=e;t&&this.setState({sortColumn:a,sortDirection:i}),this.props.onSortChange&&this.props.onSortChange({sortColumn:a,sortDirection:i})}isRowSelected(e){return-1!==this.state.selection.indexOf(Ba(e,this.props))}setSelection(e){this.setState({selection:e}),this.props.onSelectionChange&&this.props.onSelectionChange(e.slice())}isRowExpanded(e){return-1!==this.state.expandedRows.indexOf(Ba(e,this.props))}isRowExpandable(e){const{virtual:t}=this.getRowProps(e);return!t&&-1===this.props.notExpandableRows?.indexOf(Ba(e,this.props))}handleRowExpandingChange(e){let t;const n=Ba(e,this.props);this.isRowExpanded(e)?t=this.state.expandedRows.filter((e=>e!==n)):(t=this.state.expandedRows.slice(),t.push(n)),this.setExpandedRows(t)}setExpandedRows(e){this.setState({expandedRows:e}),G(this.props.onExpandedRowsChange,e.slice())}renderRow(e){let{row:t,index:n,hasTitle:s,realColumn:i,parent:a,isDragged:r,reorderableProps:o}=e;const{baseClassName:l,renderRowBody:c,reorderable:u}=this.props,{vertical:d,reorderableItemWidths:p}=this.state,h=i.some((e=>{let{type:t}=e;return"actions"===t})),{className:m,virtual:f,...g}=this.getRowProps(t);let b=0;const v=u&&!a?Ha:U.Fragment,y=(0,U.createElement)(v,{...v!==Ha||r?void 0:o,key:Ba(t,this.props)},(0,L.jsx)("tr",{className:N()({"is-selected":this.isRowSelected(t),[`${l}__row--expanded`]:this.isRowExpanded(t),[`${l}__row--expandable`]:c&&this.isRowExpandable(t),[`${l}__row--parent`]:t.data,[`${l}__row--virtual`]:f,[`${l}__row--child`]:a,[`${l}__row--reorderable`]:u,[`${l}__row--${t.intent}`]:t.intent},m),...g,onClick:c?this.createRowClickHandler(t):void 0,children:i.map(((e,n)=>{let i,{key:o,title:c,render:u,width:m,cellProps:f,truncate:g,type:v}=e;if(b>0)return b-=1,null;s||!m||d||(i={width:m}),r&&p&&(i={width:p[n]});let y=u?u(t,{parent:a}):t[o];if(y&&y.children&&!(0,U.isValidElement)(y)){const{children:e,...t}=y;y=e,f={...f,...t},t.colSpan&&(b+=t.colSpan-1)}const _=!c&&!y;if(g&&(y=(0,L.jsx)("div",{className:`${l}__truncate`,children:(0,L.jsx)(Wn,{truncate:!0,children:y})})),d){const e="internal"!==v&&"actions"!==v&&"title"!==v&&c;_||"internal"===v||(y=(0,L.jsxs)(L.Fragment,{children:[e&&(0,L.jsx)("div",{className:`${l}__cell-inner-title`,children:c}),(0,L.jsx)("div",{className:`${l}__cell-inner-content`,children:y})]})),"actions"===v&&(y=(0,L.jsx)(Us.Provider,{value:!0,children:y}))}return"reorderable"===o&&"internal"===v&&a&&(y=null),(0,L.jsx)("td",{style:i,...f,className:N()(f&&f.className,{[`${l}__cell-controls`]:"controls"===v,[`${l}__cell-actions`]:"actions"===v,[`${l}__cell-title`]:"title"===v,[`${l}__cell-has-actions`]:"title"===v&&h})||void 0,children:y},o)}))}),c&&!f&&this.renderRowBody({row:t,index:n,realColumn:i,parent:a}),t.data?t.data.map(((e,n)=>this.renderRow({row:e,index:n,hasTitle:s,realColumn:i,parent:t}))):null);return r?(0,L.jsx)("div",{className:N()(l,`${l}--dragged`),...o,children:(0,L.jsx)("table",{className:N()(`${l}__table`,`${l}__table--reorderable`,{[`${l}--expandable`]:c,[`${l}__table--vertical`]:d}),children:y})}):y}renderRowBody(e){let{row:t,index:n,realColumn:s,parent:i}=e;const{baseClassName:a,renderRowBody:r}=this.props,{vertical:o}=this.state;if(!r)return null;const l=s.find((e=>{let{key:t}=e;return"reorderable"===t})),c=s.find((e=>{let{key:t}=e;return"expander"===t})),u=this.isRowExpanded(t),d=(0,U.createRef)();return(0,L.jsx)(st,{in:u,unmountOnExit:!0,timeout:{enter:0,exit:300},classNames:`${a}__row-body-`,nodeRef:d,children:e=>(0,L.jsxs)("tr",{className:`${a}__row-body`,ref:d,children:[l?(0,L.jsx)("td",{className:`${a}__cell-reorderable`}):null,c?(0,L.jsx)("td",{className:`${a}__cell-expander`}):null,(0,L.jsx)("td",{colSpan:s.length-(l?1:0)-(c?1:0),className:`${a}__cell-body`,children:(0,L.jsx)("div",{className:`${a}__row-body-content-wrapper`,children:(0,L.jsx)("div",{className:`${a}__row-body-content ${a}__row-body-content--${e}`,children:(0,L.jsx)(Us.Provider,{value:o,children:r(t,{index:n,parent:i})})})})})]})})}renderSelectAllButton(){const{allRowsSelected:e,totalRows:t,onAllRowsSelectedChange:n,onSelectionChange:s,locale:i}=this.props,{selection:a}=this.state;return e||a.length===t||!s?null:(0,L.jsx)(Ue,{ghost:!0,onClick:()=>{this.handleGlobalSelectionChange(!0),G(n,!0)},children:(0,L.jsx)(wt,{namespace:"List",content:"selectAll",fallback:"Select all",translators:i})})}renderDeselectAllButton(){const{allRowsSelected:e,onAllRowsSelectedChange:t,onSelectionChange:n,locale:s}=this.props,{selection:i}=this.state;return!e&&0===i.length||!n?null:(0,L.jsx)(Ue,{ghost:!0,onClick:()=>{this.handleGlobalSelectionChange(!1),G(t,!1)},children:(0,L.jsx)(wt,{namespace:"List",content:"deselectAll",fallback:"Deselect",translators:s})})}renderToolbar(){const{toolbar:e,allRowsSelected:t,totalRows:n,data:s,locale:i}=this.props,{selection:a}=this.state;let r;if(1===a.length){const e=this.flatData(s).find((e=>Ba(e,this.props)===a[0]));e&&(r=this.getRowTitle(e))}if(!e)return null;const o={selectedRows:t?n||(0,L.jsx)(wt,{namespace:"List",content:"all",fallback:"all",translators:i}):a.length,selectedRowTitle:r};return(0,L.jsx)(ss.Provider,{value:o,children:e})}shouldBePagination(){const{totalRows:e,pagination:t}=this.props;if(!t||!e)return!1;if(e&&(0,U.isValidElement)(t)){const{itemsPerPageOptions:n=zn}=t.props;if(Array.isArray(n)){const t=n.filter(Number);if(t.length&&e<=Math.min(...t))return!1}}return!0}renderHeader(){const{baseClassName:e,allRowsSelected:t,totalRows:n,locale:s}=this.props,{selection:i}=this.state,a=this.shouldBePagination();return void 0!==n||a?(0,L.jsxs)("div",{className:`${e}__header`,children:[void 0===n?(0,L.jsx)("span",{}):(0,L.jsxs)("span",{children:[(0,L.jsx)("span",{className:`${e}__header-text`,children:Va({selectedRows:i.length,totalRows:n,allRowsSelected:t,translators:s})}),(0,L.jsxs)("span",{className:`${e}__header-buttons`,children:[this.renderSelectAllButton(),this.renderDeselectAllButton()]})]}),a&&(0,L.jsx)("div",{className:`${e}__header-text`,children:this.renderPagination("header")})]}):null}renderEmptyView(){const{emptyView:e,filtered:t}=this.props;return void 0===e?t?(0,L.jsx)(Na,{reason:"filtered"}):(0,L.jsx)(Na,{}):e}renderPagination(e){const{pagination:t,loading:n}=this.props;if(!t)return null;const s={loading:n};switch(e){case"header":s.view="popover";break;case"footer":s.onSelect=e=>{this.needScroll=!0,G(t.props.onSelect,e)},t.props.onItemsPerPageChange&&(s.onItemsPerPageChange=e=>{this.needScroll=!0,G(t.props.onItemsPerPageChange,e)})}return(0,U.cloneElement)(t,{...s})}render(){const{baseClassName:e,className:t,data:n,columns:s,sortColumn:i,sortDirection:a,onSortChange:r,selection:o,onSelectionChange:l,renderSelectionCheckbox:c,rowKey:u,renderRowBody:d,expandedRows:p,notExpandableRows:h,onExpandedRowsChange:m,loadingRows:f,pagination:g,totalRows:b,toolbar:v,allRowsSelected:y,onAllRowsSelectedChange:_,filtered:x,emptyView:S,emptyViewMode:w,sidebar:k,locale:j,vertical:T,loading:C,rowProps:D,reorderable:P,onReorderEnd:I,...O}=this.props,{vertical:M}=this.state;if(!(n&&n.length>0||x||"all"!==w))return this.renderEmptyView();const A=s.map(((t,n)=>{const s=[],i=[];if(0===n&&i.push(`${e}__cell-first`),t.align&&!M){const n=`${e}__cell-${t.align}`;s.push(n),i.push(n)}t.className&&(s.push(t.className),i.push(t.className));const a={...t};return s.length&&(a.className=N()(...s)),i.length&&(a.cellProps={className:N()(...i)}),a}));if(l){const t={checked:this.isAllRowsChecked(n,this.state.selection),onChange:this.handleGlobalSelectionChange};A.unshift({key:"selection",type:"internal",className:`${e}__cell-selection`,cellProps:{className:`${e}__cell-selection`},title:"function"==typeof c?c(t):(0,L.jsx)(it,{...t}),render:t=>{const{virtual:n}=this.getRowProps(t);if(n)return null;if(this.isRowLoading(t))return(0,L.jsx)(me,{className:`${e}__spinner`});const s={checked:this.isRowSelected(t),disabled:t.disabled,onChange:e=>this.handleRowSelectionChange(e,Ba(t,this.props)),inputProps:{value:Ba(t,this.props)}};return"function"==typeof c?c(s,t):(0,L.jsx)(it,{...s})}})}d&&A.unshift({key:"expander",type:"internal",className:`${e}__cell-expander`,cellProps:{className:`${e}__cell-expander`},title:(0,L.jsx)(Ue,{ghost:!0,className:`${e}__row-expander`,icon:(0,L.jsx)(he,{className:`${e}__row-expander-icon`,children:(0,L.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:(0,L.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.5 1.4L5 4.9l3.5-3.5M1.5 5.1L5 8.6l3.5-3.5"})})}),onClick:this.handleGlobalExpandingChange}),render:t=>this.isRowExpandable(t)&&(0,L.jsx)(Ue,{ghost:!0,className:`${e}__row-expander`,icon:(0,L.jsx)(he,{className:`${e}__row-expander-icon`,children:(0,L.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 10 10",children:(0,L.jsx)("path",{fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M1.5 3.2L5 6.7l3.5-3.5"})})}),onClick:()=>this.handleRowExpandingChange(t)})}),P&&A.unshift({key:"reorderable",type:"internal",className:`${e}__cell-reorderable`,cellProps:{className:`${e}__cell-reorderable`},title:null,render:()=>(0,L.jsx)("span",{className:`${e}__cell-reorderable-indicator`,"data-movable-handle":!0,children:(0,L.jsx)("svg",{width:"6",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:(0,L.jsx)("path",{d:"M0 0h2v2H0zM0 4h2v2H0zM0 8h2v2H0zM0 12h2v2H0zM4 0h2v2H4zM4 4h2v2H4zM4 8h2v2H4zM4 12h2v2H4z",fill:"currentColor"})})})});const E=!M&&s.some((e=>e.title));let U;if(n&&n.length>0||!x&&"items"!==w){const t=t=>{let{children:s,props:i}=t;return(0,L.jsx)(Ya,{children:(0,L.jsxs)("table",{className:N()(`${e}__table`,{[`${e}--expandable`]:d,[`${e}__table--vertical`]:M,[`${e}__table--reorderable`]:P}),...i,children:[E&&(0,L.jsx)("thead",{children:(0,L.jsx)("tr",{className:N()(`${e}__table-thead`,{[`${e}__row--expanded`]:this.isAnyRowsExpanded(n,this.state.expandedRows)}),children:A.map((e=>{let{key:t,title:n,sortable:s,sort:i,width:a,render:r,truncate:o,type:l,cellProps:c,...u}=e;return s&&(n=(0,L.jsx)("div",{className:"th__action",children:n}),u.className=N()({"is-sortable":s,"is-sorted is-sorted--up":this.state.sortColumn===t&&"ASC"===this.state.sortDirection,"is-sorted is-sorted--down":this.state.sortColumn===t&&"DESC"===this.state.sortDirection},u.className),u.onClick=()=>this.sort(t)),a&&(u.style={...u.style,width:a}),(0,L.jsx)("th",{...u,children:n},t)}))})}),P?s:(0,L.jsx)("tbody",{children:s})]})})},s=e=>{let{value:{row:t},index:n,props:s,isDragged:i}=e;return this.renderRow({row:t,index:n,hasTitle:E,realColumn:A,reorderableProps:s,isDragged:i})};if(P&&this.state.ReorderableList){const{ReorderableList:e}=this.state;U=(0,L.jsx)(e,{beforeDrag:e=>{let{elements:t,index:n}=e;const s=Array.from(t[n].firstElementChild.children).map((e=>window.getComputedStyle(e).width));this.setState({reorderableItemWidths:s})},onChange:e=>{let{oldIndex:t,newIndex:n}=e;G(I,{oldIndex:t,newIndex:n})},values:this.getData().map((e=>({row:e}))),renderList:t,renderItem:s,lockVertically:!0,hooks:{getChildren:e=>e.filter((e=>"THEAD"!==e.nodeName))},useDragHandle:!1})}else U=t({children:this.getData().map(((e,t)=>s({value:{row:e},index:t})))})}else U=this.renderEmptyView();U=(0,L.jsx)("div",{className:N()(`${e}__table-container`,{[`${e}__table-container--loading`]:C}),children:U}),k&&(U=(0,L.jsxs)(Rs,{gap:"md",className:N()(`${e}__content`,{[`${e}__content--vertical`]:M}),children:[(0,L.jsx)(Fs,{fill:!0,children:U}),(0,L.jsx)(Fs,{className:`${e}__sidebar`,children:k})]}));const R=this.shouldBePagination(),F=n=>(0,L.jsxs)("div",{ref:n,className:N()(e,t),...O,children:[this.renderHeader(),this.renderToolbar(),R&&(0,L.jsx)("span",{ref:this.anchorRef}),U,R&&(0,L.jsx)("div",{className:`${e}__footer`,children:this.renderPagination("footer")})]});return"number"==typeof T?(0,L.jsx)(bn,{bounds:!0,onResize:this.handleResize,children:e=>{let{measureRef:t}=e;return F(t)}}):F()}}B($a,"defaultProps",{data:[],sortColumn:void 0,sortDirection:"ASC",onSortChange:void 0,onSelectionChange:void 0,selection:[],renderSelectionCheckbox:void 0,rowKey:"key",renderRowBody:void 0,expandedRows:[],notExpandableRows:[],onExpandedRowsChange:void 0,loadingRows:[],className:"",baseClassName:`${F.CLS_PREFIX}list`,pagination:void 0,totalRows:void 0,toolbar:void 0,allRowsSelected:!1,onAllRowsSelectedChange:void 0,filtered:!1,emptyView:void 0,emptyViewMode:"all",sidebar:void 0,locale:void 0,vertical:As,loading:!1,rowProps:void 0,reorderable:!1,onReorderEnd:void 0});const Wa=$a,za=e=>{let{primary:t,children:n,tooltip:s,...i}=e;const a=e=>t?(0,L.jsx)(Ue,{ghost:!0,tooltip:e,...i}):(0,L.jsx)(ft,{tooltip:s,...i,children:e});return"function"==typeof n?n({wrap:e=>a(e)}):a(n)},qa=e=>{let{baseClassName:t=`${F.CLS_PREFIX}list-actions`,className:n,children:s,locale:i,...a}=e;const[r,o]=(0,U.useState)(!1),l=(0,U.useContext)(Us);(0,U.useEffect)((()=>{const e=e=>{let{matches:t}=e;o(!t)},t=window.matchMedia("(min-width: 768px)");return e(t),t.addListener(e),()=>{t.removeListener(e)}}),[]);const c=[],u=[];let d,p=0;return U.Children.toArray(s).forEach(((e,n)=>{if((0,U.isValidElement)(e)&&e.type===za){const{primary:s,hidden:i}=e.props,a=n.toString();s&&!l?c.push(i?(0,L.jsx)("div",{className:`${t}__hidden-action`},a):e):(p++,i||u.push((0,U.cloneElement)(e,{primary:!1})))}else p++,u.push(e)})),u.length>0?d=(0,L.jsx)(Tt,{className:`${t}__menu`,menu:(0,L.jsx)(Nn,{children:u}),menuPlacement:"bottom-end",overlay:r,locale:i,children:(0,L.jsx)(Ue,{ghost:!0,icon:"kebab"})}):p&&(d=(0,L.jsx)("div",{className:`${t}__menu ${t}__hidden-action`})),(0,L.jsxs)("div",{className:N()(t,n),...a,children:[c,d]})};let Ga={async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const Ka=/[&<>"']/,Xa=new RegExp(Ka.source,"g"),Za=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ja=new RegExp(Za.source,"g"),Qa={"&":"&","<":"<",">":">",'"':""","'":"'"},er=e=>Qa[e];function tr(e,t){if(t){if(Ka.test(e))return e.replace(Xa,er)}else if(Za.test(e))return e.replace(Ja,er);return e}const nr=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function sr(e){return e.replace(nr,((e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const ir=/(^|[^\[])\^/g;function ar(e,t){e="string"==typeof e?e:e.source,t=t||"";const n={replace:(t,s)=>(s=(s=s.source||s).replace(ir,"$1"),e=e.replace(t,s),n),getRegex:()=>new RegExp(e,t)};return n}const rr=/[^\w:]/g,or=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function lr(e,t,n){if(e){let e;try{e=decodeURIComponent(sr(n)).replace(rr,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!or.test(n)&&(n=function(e,t){cr[" "+e]||(ur.test(e)?cr[" "+e]=e+"/":cr[" "+e]=gr(e,"/",!0));const n=-1===(e=cr[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(dr,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(pr,"$1")+t:e+t}(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const cr={},ur=/^[^:]+:\/*[^/]*$/,dr=/^([^:]+:)[\s\S]*$/,pr=/^([^:]+:\/*[^/]*)[\s\S]*$/,hr={exec:function(){}};function mr(e){let t,n,s=1;for(;s<arguments.length;s++)for(n in t=arguments[s],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function fr(e,t){const n=e.replace(/\|/g,((e,t,n)=>{let s=!1,i=t;for(;--i>=0&&"\\"===n[i];)s=!s;return s?"|":" |"})).split(/ \|/);let s=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;s<n.length;s++)n[s]=n[s].trim().replace(/\\\|/g,"|");return n}function gr(e,t,n){const s=e.length;if(0===s)return"";let i=0;for(;i<s;){const a=e.charAt(s-i-1);if(a!==t||n){if(a===t||!n)break;i++}else i++}return e.slice(0,s-i)}function br(e){e&&e.sanitize&&!e.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function vr(e,t){if(t<1)return"";let n="";for(;t>1;)1&t&&(n+=e),t>>=1,e+=e;return n+e}function yr(e,t,n,s){const i=t.href,a=t.title?tr(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){s.state.inLink=!0;const e={type:"link",raw:n,href:i,title:a,text:r,tokens:s.inlineTokens(r)};return s.state.inLink=!1,e}return{type:"image",raw:n,href:i,title:a,text:tr(r)}}class _r{constructor(e){this.options=e||Ga}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:gr(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=function(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const s=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=s.length?e.slice(s.length):e})).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline._escapes,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=gr(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,""),n=this.lexer.state.top;this.lexer.state.top=!0;const s=this.lexer.blockTokens(e);return this.lexer.state.top=n,{type:"blockquote",raw:t[0],tokens:s,text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,s,i,a,r,o,l,c,u,d,p,h,m=t[1].trim();const f=m.length>1,g={type:"list",raw:"",ordered:f,start:f?+m.slice(0,-1):"",loose:!1,items:[]};m=f?`\\d{1,9}\\${m.slice(-1)}`:`\\${m}`,this.options.pedantic&&(m=f?m:"[*+-]");const b=new RegExp(`^( {0,3}${m})((?:[\t ][^\\n]*)?(?:\\n|$))`);for(;e&&(h=!1,t=b.exec(e))&&!this.rules.block.hr.test(e);){if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0].replace(/^\t+/,(e=>" ".repeat(3*e.length))),u=e.split("\n",1)[0],this.options.pedantic?(a=2,p=c.trimLeft()):(a=t[2].search(/[^ ]/),a=a>4?1:a,p=c.slice(a),a+=t[1].length),o=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),h=!0),!h){const t=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),s=new RegExp(`^ {0,${Math.min(3,a-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),i=new RegExp(`^ {0,${Math.min(3,a-1)}}(?:\`\`\`|~~~)`),r=new RegExp(`^ {0,${Math.min(3,a-1)}}#`);for(;e&&(d=e.split("\n",1)[0],u=d,this.options.pedantic&&(u=u.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!i.test(u))&&!r.test(u)&&!t.test(u)&&!s.test(e);){if(u.search(/[^ ]/)>=a||!u.trim())p+="\n"+u.slice(a);else{if(o)break;if(c.search(/[^ ]/)>=4)break;if(i.test(c))break;if(r.test(c))break;if(s.test(c))break;p+="\n"+u}o||u.trim()||(o=!0),n+=d+"\n",e=e.substring(d.length+1),c=u.slice(a)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(s=/^\[[ xX]\] /.exec(p),s&&(i="[ ] "!==s[0],p=p.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!s,checked:i,loose:!1,text:p}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=p.trimRight(),g.raw=g.raw.trimRight();const v=g.items.length;for(r=0;r<v;r++)if(this.lexer.state.top=!1,g.items[r].tokens=this.lexer.blockTokens(g.items[r].text,[]),!g.loose){const e=g.items[r].tokens.filter((e=>"space"===e.type)),t=e.length>0&&e.some((e=>/\n.*\n/.test(e.raw)));g.loose=t}if(g.loose)for(r=0;r<v;r++)g.items[r].loose=!0;return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};if(this.options.sanitize){const n=this.options.sanitizer?this.options.sanitizer(t[0]):tr(t[0]);e.type="paragraph",e.text=n,e.tokens=this.lexer.inline(n)}return e}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),n=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline._escapes,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:s}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:fr(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,s,i,a,r=e.align.length;for(n=0;n<r;n++)/^ *-+: *$/.test(e.align[n])?e.align[n]="right":/^ *:-+: *$/.test(e.align[n])?e.align[n]="center":/^ *:-+ *$/.test(e.align[n])?e.align[n]="left":e.align[n]=null;for(r=e.rows.length,n=0;n<r;n++)e.rows[n]=fr(e.rows[n],e.header.length).map((e=>({text:e})));for(r=e.header.length,s=0;s<r;s++)e.header[s].tokens=this.lexer.inline(e.header[s].text);for(r=e.rows.length,s=0;s<r;s++)for(a=e.rows[s],i=0;i<a.length;i++)a[i].tokens=this.lexer.inline(a[i].text);return e}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:tr(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):tr(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=gr(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;const n=e.length;let s=0,i=0;for(;i<n;i++)if("\\"===e[i])i++;else if(e[i]===t[0])s++;else if(e[i]===t[1]&&(s--,s<0))return i;return-1}(t[2],"()");if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],s=e[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(e)?n.slice(1):n.slice(1,-1)),yr(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:s?s.replace(this.rules.inline._escapes,"$1"):s},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return yr(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrong.lDelim.exec(e);if(!s)return;if(s[3]&&n.match(/[\p{L}\p{N}]/u))return;const i=s[1]||s[2]||"";if(!i||i&&(""===n||this.rules.inline.punctuation.exec(n))){const n=s[0].length-1;let i,a,r=n,o=0;const l="*"===s[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(s=l.exec(t));){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=i.length,s[3]||s[4]){r+=a;continue}if((s[5]||s[6])&&n%3&&!((n+a)%3)){o+=a;continue}if(r-=a,r>0)continue;a=Math.min(a,a+r+o);const t=e.slice(0,n+s.index+(s[0].length-i.length)+a);if(Math.min(n,a)%2){const e=t.slice(1,-1);return{type:"em",raw:t,text:e,tokens:this.lexer.inlineTokens(e)}}const l=t.slice(2,-2);return{type:"strong",raw:t,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),s=/^ /.test(e)&&/ $/.test(e);return n&&s&&(e=e.substring(1,e.length-1)),e=tr(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,s;return"@"===n[2]?(e=tr(this.options.mangle?t(n[1]):n[1]),s="mailto:"+e):(e=tr(n[1]),s=e),{type:"link",raw:n[0],text:e,href:s,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,s;if("@"===n[2])e=tr(this.options.mangle?t(n[0]):n[0]),s="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=tr(n[0]),s="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:s,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):tr(n[0]):n[0]:tr(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const xr={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:hr,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};xr.def=ar(xr.def).replace("label",xr._label).replace("title",xr._title).getRegex(),xr.bullet=/(?:[*+-]|\d{1,9}[.)])/,xr.listItemStart=ar(/^( *)(bull) */).replace("bull",xr.bullet).getRegex(),xr.list=ar(xr.list).replace(/bull/g,xr.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+xr.def.source+")").getRegex(),xr._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xr._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,xr.html=ar(xr.html,"i").replace("comment",xr._comment).replace("tag",xr._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xr.paragraph=ar(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.blockquote=ar(xr.blockquote).replace("paragraph",xr.paragraph).getRegex(),xr.normal=mr({},xr),xr.gfm=mr({},xr.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),xr.gfm.table=ar(xr.gfm.table).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.gfm.paragraph=ar(xr._paragraph).replace("hr",xr.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",xr.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr._tag).getRegex(),xr.pedantic=mr({},xr.normal,{html:ar("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",xr._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ar(xr.normal._paragraph).replace("hr",xr.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",xr.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Sr={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:hr,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:hr,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function wr(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function kr(e){let t,n,s="";const i=e.length;for(t=0;t<i;t++)n=e.charCodeAt(t),Math.random()>.5&&(n="x"+n.toString(16)),s+="&#"+n+";";return s}Sr._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Sr.punctuation=ar(Sr.punctuation).replace(/punctuation/g,Sr._punctuation).getRegex(),Sr.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Sr.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,Sr._comment=ar(xr._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Sr.emStrong.lDelim=ar(Sr.emStrong.lDelim).replace(/punct/g,Sr._punctuation).getRegex(),Sr.emStrong.rDelimAst=ar(Sr.emStrong.rDelimAst,"g").replace(/punct/g,Sr._punctuation).getRegex(),Sr.emStrong.rDelimUnd=ar(Sr.emStrong.rDelimUnd,"g").replace(/punct/g,Sr._punctuation).getRegex(),Sr._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Sr._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Sr._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Sr.autolink=ar(Sr.autolink).replace("scheme",Sr._scheme).replace("email",Sr._email).getRegex(),Sr._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Sr.tag=ar(Sr.tag).replace("comment",Sr._comment).replace("attribute",Sr._attribute).getRegex(),Sr._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Sr._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Sr._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Sr.link=ar(Sr.link).replace("label",Sr._label).replace("href",Sr._href).replace("title",Sr._title).getRegex(),Sr.reflink=ar(Sr.reflink).replace("label",Sr._label).replace("ref",xr._label).getRegex(),Sr.nolink=ar(Sr.nolink).replace("ref",xr._label).getRegex(),Sr.reflinkSearch=ar(Sr.reflinkSearch,"g").replace("reflink",Sr.reflink).replace("nolink",Sr.nolink).getRegex(),Sr.normal=mr({},Sr),Sr.pedantic=mr({},Sr.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ar(/^!?\[(label)\]\((.*?)\)/).replace("label",Sr._label).getRegex(),reflink:ar(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Sr._label).getRegex()}),Sr.gfm=mr({},Sr.normal,{escape:ar(Sr.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Sr.gfm.url=ar(Sr.gfm.url,"i").replace("email",Sr.gfm._extended_email).getRegex(),Sr.breaks=mr({},Sr.gfm,{br:ar(Sr.br).replace("{2,}","*").getRegex(),text:ar(Sr.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class jr{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ga,this.options.tokenizer=this.options.tokenizer||new _r,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:xr.normal,inline:Sr.normal};this.options.pedantic?(t.block=xr.pedantic,t.inline=Sr.pedantic):this.options.gfm&&(t.block=xr.gfm,this.options.breaks?t.inline=Sr.breaks:t.inline=Sr.gfm),this.tokenizer.rules=t}static get rules(){return{block:xr,inline:Sr}}static lex(e,t){return new jr(t).lex(e)}static lexInline(e,t){return new jr(t).inlineTokens(e)}lex(e){let t;for(e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){let n,s,i,a;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,((e,t,n)=>t+" ".repeat(n.length)));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((s=>!!(n=s.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?t.push(n):(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),s=t[t.length-1],!s||"paragraph"!==s.type&&"text"!==s.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(s.raw+="\n"+n.raw,s.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=s.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(i=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startBlock.forEach((function(e){s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i)))s=t[t.length-1],a&&"paragraph"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n),a=i.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=s.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n,s,i,a,r,o,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,a.index)+"["+vr("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,a.index)+"["+vr("a",a[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.escapedEmSt.exec(l));)l=l.slice(0,a.index+a[0].length-2)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;e;)if(r||(o=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((s=>!!(n=s.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),s=t[t.length-1],s&&"text"===n.type&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,o))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,kr))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,kr))){if(i=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let s;this.options.extensions.startInline.forEach((function(e){s=e.call({lexer:this},n),"number"==typeof s&&s>=0&&(t=Math.min(t,s))})),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,wr))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),r=!0,s=t[t.length-1],s&&"text"===s.type?(s.raw+=n.raw,s.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class Tr{constructor(e){this.options=e||Ga}code(e,t,n){const s=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,s);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",s?'<pre><code class="'+this.options.langPrefix+tr(s)+'">'+(n?e:tr(e,!0))+"</code></pre>\n":"<pre><code>"+(n?e:tr(e,!0))+"</code></pre>\n"}blockquote(e){return`<blockquote>\n${e}</blockquote>\n`}html(e){return e}heading(e,t,n,s){return this.options.headerIds?`<h${t} id="${this.options.headerPrefix+s.slug(n)}">${e}</h${t}>\n`:`<h${t}>${e}</h${t}>\n`}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(e,t,n){const s=t?"ol":"ul";return"<"+s+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"</"+s+">\n"}listitem(e){return`<li>${e}</li>\n`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return`<p>${e}</p>\n`}table(e,t){return t&&(t=`<tbody>${t}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+t+"</table>\n"}tablerow(e){return`<tr>\n${e}</tr>\n`}tablecell(e,t){const n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>\n`}strong(e){return`<strong>${e}</strong>`}em(e){return`<em>${e}</em>`}codespan(e){return`<code>${e}</code>`}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return`<del>${e}</del>`}link(e,t,n){if(null===(e=lr(this.options.sanitize,this.options.baseUrl,e)))return n;let s='<a href="'+e+'"';return t&&(s+=' title="'+t+'"'),s+=">"+n+"</a>",s}image(e,t,n){if(null===(e=lr(this.options.sanitize,this.options.baseUrl,e)))return n;let s=`<img src="${e}" alt="${n}"`;return t&&(s+=` title="${t}"`),s+=this.options.xhtml?"/>":">",s}text(e){return e}}class Cr{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class Dr{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,s=0;if(this.seen.hasOwnProperty(n)){s=this.seen[e];do{s++,n=e+"-"+s}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=s,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class Pr{constructor(e){this.options=e||Ga,this.options.renderer=this.options.renderer||new Tr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Cr,this.slugger=new Dr}static parse(e,t){return new Pr(t).parse(e)}static parseInline(e,t){return new Pr(t).parseInline(e)}parse(e,t=!0){let n,s,i,a,r,o,l,c,u,d,p,h,m,f,g,b,v,y,_,x="";const S=e.length;for(n=0;n<S;n++)if(d=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[d.type]&&(_=this.options.extensions.renderers[d.type].call({parser:this},d),!1!==_||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)))x+=_||"";else switch(d.type){case"space":continue;case"hr":x+=this.renderer.hr();continue;case"heading":x+=this.renderer.heading(this.parseInline(d.tokens),d.depth,sr(this.parseInline(d.tokens,this.textRenderer)),this.slugger);continue;case"code":x+=this.renderer.code(d.text,d.lang,d.escaped);continue;case"table":for(c="",l="",a=d.header.length,s=0;s<a;s++)l+=this.renderer.tablecell(this.parseInline(d.header[s].tokens),{header:!0,align:d.align[s]});for(c+=this.renderer.tablerow(l),u="",a=d.rows.length,s=0;s<a;s++){for(o=d.rows[s],l="",r=o.length,i=0;i<r;i++)l+=this.renderer.tablecell(this.parseInline(o[i].tokens),{header:!1,align:d.align[i]});u+=this.renderer.tablerow(l)}x+=this.renderer.table(c,u);continue;case"blockquote":u=this.parse(d.tokens),x+=this.renderer.blockquote(u);continue;case"list":for(p=d.ordered,h=d.start,m=d.loose,a=d.items.length,u="",s=0;s<a;s++)g=d.items[s],b=g.checked,v=g.task,f="",g.task&&(y=this.renderer.checkbox(b),m?g.tokens.length>0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=y+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=y+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:y}):f+=y),f+=this.parse(g.tokens,m),u+=this.renderer.listitem(f,v,b);x+=this.renderer.list(u,p,h);continue;case"html":x+=this.renderer.html(d.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(d.tokens));continue;case"text":for(u=d.tokens?this.parseInline(d.tokens):d.text;n+1<S&&"text"===e[n+1].type;)d=e[++n],u+="\n"+(d.tokens?this.parseInline(d.tokens):d.text);x+=t?this.renderer.paragraph(u):u;continue;default:{const e='Token with "'+d.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return x}parseInline(e,t){t=t||this.renderer;let n,s,i,a="";const r=e.length;for(n=0;n<r;n++)if(s=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(i=this.options.extensions.renderers[s.type].call({parser:this},s),!1!==i||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)))a+=i||"";else switch(s.type){case"escape":case"text":a+=t.text(s.text);break;case"html":a+=t.html(s.text);break;case"link":a+=t.link(s.href,s.title,this.parseInline(s.tokens,t));break;case"image":a+=t.image(s.href,s.title,s.text);break;case"strong":a+=t.strong(this.parseInline(s.tokens,t));break;case"em":a+=t.em(this.parseInline(s.tokens,t));break;case"codespan":a+=t.codespan(s.text);break;case"br":a+=t.br();break;case"del":a+=t.del(this.parseInline(s.tokens,t));break;default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return void console.error(e);throw new Error(e)}}return a}}function Ir(e,t,n){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof t&&(n=t,t=null),br(t=mr({},Ir.defaults,t||{})),n){const s=t.highlight;let i;try{i=jr.lex(e,t)}catch(e){return n(e)}const a=function(e){let a;if(!e)try{t.walkTokens&&Ir.walkTokens(i,t.walkTokens),a=Pr.parse(i,t)}catch(t){e=t}return t.highlight=s,e?n(e):n(null,a)};if(!s||s.length<3)return a();if(delete t.highlight,!i.length)return a();let r=0;return Ir.walkTokens(i,(function(e){"code"===e.type&&(r++,setTimeout((()=>{s(e.text,e.lang,(function(t,n){if(t)return a(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),r--,0===r&&a()}))}),0))})),void(0===r&&a())}function s(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+tr(e.message+"",!0)+"</pre>";throw e}try{const n=jr.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(Ir.walkTokens(n,t.walkTokens)).then((()=>Pr.parse(n,t))).catch(s);Ir.walkTokens(n,t.walkTokens)}return Pr.parse(n,t)}catch(e){s(e)}}Ir.options=Ir.setOptions=function(e){var t;return mr(Ir.defaults,e),t=Ir.defaults,Ga=t,Ir},Ir.getDefaults=function(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},Ir.defaults=Ga,Ir.use=function(...e){const t=Ir.defaults.extensions||{renderers:{},childTokens:{}};e.forEach((e=>{const n=mr({},e);if(n.async=Ir.defaults.async||n.async,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let s=e.renderer.apply(this,t);return!1===s&&(s=n.apply(this,t)),s}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");t[e.level]?t[e.level].unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=Ir.defaults.renderer||new Tr;for(const n in e.renderer){const s=t[n];t[n]=(...i)=>{let a=e.renderer[n].apply(t,i);return!1===a&&(a=s.apply(t,i)),a}}n.renderer=t}if(e.tokenizer){const t=Ir.defaults.tokenizer||new _r;for(const n in e.tokenizer){const s=t[n];t[n]=(...i)=>{let a=e.tokenizer[n].apply(t,i);return!1===a&&(a=s.apply(t,i)),a}}n.tokenizer=t}if(e.walkTokens){const t=Ir.defaults.walkTokens;n.walkTokens=function(n){let s=[];return s.push(e.walkTokens.call(this,n)),t&&(s=s.concat(t.call(this,n))),s}}Ir.setOptions(n)}))},Ir.walkTokens=function(e,t){let n=[];for(const s of e)switch(n=n.concat(t.call(Ir,s)),s.type){case"table":for(const e of s.header)n=n.concat(Ir.walkTokens(e.tokens,t));for(const e of s.rows)for(const s of e)n=n.concat(Ir.walkTokens(s.tokens,t));break;case"list":n=n.concat(Ir.walkTokens(s.items,t));break;default:Ir.defaults.extensions&&Ir.defaults.extensions.childTokens&&Ir.defaults.extensions.childTokens[s.type]?Ir.defaults.extensions.childTokens[s.type].forEach((function(e){n=n.concat(Ir.walkTokens(s[e],t))})):s.tokens&&(n=n.concat(Ir.walkTokens(s.tokens,t)))}return n},Ir.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");br(t=mr({},Ir.defaults,t||{}));try{const n=jr.lexInline(e,t);return t.walkTokens&&Ir.walkTokens(n,t.walkTokens),Pr.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"<p>An error occurred:</p><pre>"+tr(e.message+"",!0)+"</pre>";throw e}},Ir.Parser=Pr,Ir.parser=Pr.parse,Ir.Renderer=Tr,Ir.TextRenderer=Cr,Ir.Lexer=jr,Ir.lexer=jr.lex,Ir.Tokenizer=_r,Ir.Slugger=Dr,Ir.parse=Ir,Ir.options,Ir.setOptions,Ir.use,Ir.walkTokens,Ir.parseInline,Pr.parse,jr.lex;const Or=e=>{let{baseClassName:t=`${F.CLS_PREFIX}markdown`,className:n,compact:s=!1,children:i,...a}=e;return(0,L.jsx)("div",{className:N()(t,{[`${t}--compact`]:s},n),dangerouslySetInnerHTML:{__html:Ir(i)},...a})},Lr=e=>{let{className:t,children:n,baseClassName:s=`${F.CLS_PREFIX}media-section`,...i}=e;return(0,L.jsx)("div",{className:N()(s,t),...i,children:n})};class Mr extends U.Component{constructor(e){super(e),B(this,"handleToggle",(e=>{X(e)||this.setState((e=>{let{collapsed:t}=e;return{collapsed:!t}}),(()=>{this.props.onToggle&&this.props.onToggle(this.state.collapsed)}))}));const t=this.props.collapsible&&this.props.collapsed||!1;this.state={collapsed:t,prevPropsCollapsed:t}}static getDerivedStateFromProps(e,t){return e.collapsed!==t.prevPropsCollapsed?{collapsed:e.collapsed,prevPropsCollapsed:e.collapsed}:null}render(){const{baseClassName:e,className:t,title:n,collapsible:s,collapsed:i,onToggle:a,children:r,extra:o,...l}=this.props,{collapsed:c}=this.state,u=s?this.handleToggle:void 0,d=(0,U.createRef)();return(0,L.jsx)(st,{classNames:`${e}-`,in:!c,timeout:300,nodeRef:d,children:(0,L.jsxs)("div",{className:N()(e,{[`${e}--collapsible`]:s,[`${e}--collapsed`]:c,[`${e}--expanded`]:!c},t),...l,ref:d,children:[n&&(0,L.jsxs)("div",{className:`${e}__header`,onClick:u,children:[jn(n)?(0,L.jsx)(kn,{component:"div",level:4,className:`${e}__title`,children:n}):n,(o||s)&&(0,L.jsxs)("div",{className:`${e}__extra`,children:[o,s&&(0,L.jsx)(Ue,{ghost:!0,className:`${e}__control-button`,icon:{name:"chevron-up",flipVertical:c},onClick:u})]})]}),(0,L.jsx)("div",{className:`${e}__content`,children:r})]})})}}B(Mr,"defaultProps",{collapsible:!1,collapsed:!1,baseClassName:`${F.CLS_PREFIX}panel`});const Ar=Mr,Er=e=>{let t=5*Math.ceil(20*e/5);return t%20==5?t+=2:t%20==15&&(t-=2),t},Ur=e=>{let{baseClassName:t=`${F.CLS_PREFIX}rating`,className:n,value:s=0,small:i=!1,...a}=e;return(0,L.jsx)("div",{className:N()(t,n,{[`${t}--static`]:!0,[`${t}--small`]:i}),...a,children:(0,L.jsx)("div",{className:`${t}__rates`,style:{width:`${Er(s)}%`}})})},Rr=e=>{let{baseClassName:t=`${F.CLS_PREFIX}status-message`,className:n,intent:s,children:i,...a}=e;return(0,L.jsxs)(ge,{className:N()(t,[`${t}--${s}`],n),intent:s,...a,children:[(0,L.jsx)(he,{name:Ci[s],className:`${t}__icon`}),i]})},Nr=e=>{let{className:t,children:n,onChange:s,tooltip:i,intent:a,checked:r,defaultChecked:o,baseClassName:l=`${F.CLS_PREFIX}switch`,disabled:c=!1,loading:u=!1,...d}=e;const p=(0,L.jsxs)("label",{className:N()(l,{[`${l}--${a}`]:a,[`${l}--loading`]:u},t),...d,children:[n?(0,L.jsx)("span",{className:`${l}__label`,children:n}):null,(0,L.jsx)("input",{type:"checkbox",onChange:e=>{!c&&s&&s(e.target.checked)},checked:r,defaultChecked:null==r?o:void 0,disabled:c||u}),(0,L.jsx)("span",{className:`${l}__indicator`})]});return i?(0,L.jsx)(je,{title:i,children:p}):p},Fr=e=>{let{children:t}=e;return(0,L.jsx)("div",{children:t})};class Yr extends U.Component{constructor(){super(...arguments),B(this,"state",{active:this.props.active||1,collapsedLength:0,compact:!1,searching:!1,monospacedWidth:0}),B(this,"widths",void 0),B(this,"addon",void 0),B(this,"tabsnavRef",void 0),B(this,"moreTabsRef",null),B(this,"checkAdaptive",(()=>{let{compact:e,searching:t,collapsedLength:n}=this.state;const{addonMinWidth:s,search:i,monospaced:a}=this.props,{widths:r,addon:o}=this;let l=0;const c=()=>l;if(!r)return;const u=5+(s||(i?.props.minWidth??150)),d=e&&i?65:0,{more:p,container:h,margin:m}=r;let f=r.tabs.slice();const g=f.length;let b=g-1-n;a&&(l=Math.max(...f.slice(0,b+1)),f=f.map(c));const v=()=>{let e=a?m*Math.max(0,g-1-Math.max(0,n-1)):0;for(let t=0;t<=b;++t)e+=f[t];return n&&(e+=p),e};let y=h-v();o&&!n&&!e&&y<=u&&(e=!0);let _=y-d;if(_<=0)for(let e=b;e>=0;--e){let t=f[e];if(a&&r.tabs[e]===l&&(l=r.tabs.slice(0,b).reduce(((e,t)=>t>e?t:e),0),f=f.map(c),t+=(r.tabs[e]-l)*b),0===n&&(t-=p),_+=t,++n,--b,_>0)break}else for(let e=b+1;e<g;++e){let t=f[e];if(a&&r.tabs[e]>l&&(l=r.tabs[e],f=f.map(c),t=l+(l-t)*(b+1)),1===n&&(t-=p),_<=t)break;_-=t,--n,++b}(n||e)&&(y=h-v(),n?e=!0:y>=u&&(e=!1,t=!1));const x={compact:e,searching:t,collapsedLength:n,monospacedWidth:l};for(const e of Object.keys(x))JSON.stringify(x[e])===JSON.stringify(this.state[e])&&delete x[e];Object.keys(x).length&&this.setState(x,(()=>{void 0!==x.collapsedLength&&this.state.collapsedLength!==x.collapsedLength&&this.checkAdaptive()}))})),B(this,"handleStartSearching",(()=>{this.setState({searching:!0})})),B(this,"handleCancelSearching",(()=>{this.setState({searching:!1},this.checkAdaptive)})),B(this,"handleResize",(()=>{const{baseClassName:e}=this.props;if(this.tabsnavRef){const t=this.tabsnavRef.querySelectorAll(`.${e}__tab-list--fake .${e}__tab`),n=t[t.length-1],s=Array.prototype.slice.call(t,0,-1).map((e=>e.offsetWidth));this.widths={tabs:s,more:n.offsetWidth,container:this.tabsnavRef.offsetWidth,margin:n.offsetWidth-(n.querySelector(`.${e}__link`)?.offsetWidth??0)}}this.checkAdaptive()})),B(this,"handleAddonResize",(e=>{this.addon=e.bounds,this.checkAdaptive()})),B(this,"renderTabItem",((e,t,n)=>{const{baseClassName:s}=this.props,{monospacedWidth:i,active:a}=this.state;if(!e||e.type!==Fr)return null;const{title:r,label:o,icon:l,onActivate:c,onClose:u,component:d="a",...p}=e.props,h=t+1===a,m=t.toString(),f=he.create(l,{size:le,className:`${s}__tab-icon`}),g=this.renderTabLabel(n,o),b=this.renderTabClose(n,u),v=()=>this.onClick(t+1);return p.tabIndex=p.tabIndex||0,p.onKeyDown=K(p.onKeyDown,(e=>{"Enter"===e.key&&e.currentTarget.click()})),"menu-item"===n?(0,L.jsx)(ft,{icon:f,label:(0,L.jsxs)(U.Fragment,{children:[g,b]}),active:h,onClick:v,className:`${s}__menu-item`,component:d,...p,children:r},m):(0,L.jsx)("li",{className:N()(`${s}__tab`,h&&`${s}__tab--selected`,b&&`${s}__tab--closable`),role:"presentation",children:(0,L.jsxs)(d,{className:`${s}__link`,role:"tab","aria-selected":h||void 0,style:{width:i||void 0},onClick:v,...p,children:[f,(0,L.jsx)("span",{className:`${s}__tab-title`,children:r}),g,b]})},m)}))}static getDerivedStateFromProps(e,t){const{active:n}=e,{prevActive:s}=t,i={};return n&&n!==s&&(i.active=n),i.prevActive=n,i}componentDidUpdate(){this.widths&&U.Children.count(this.props.children)===this.widths.tabs.length||setTimeout((()=>this.handleResize()))}onClick(e){this.setState({active:e}),(Array.isArray(this.props.children)?this.props.children[e-1]:this.props.children)?.props?.onActivate?.()}renderTabLabel(e,t){const{baseClassName:n}=this.props;return"string"==typeof t?(0,L.jsx)(ye,{className:`${n}__${e}-label`,intent:"danger",children:t}):(0,U.isValidElement)(t)?(0,U.cloneElement)(t,{className:N()(`${n}__${e}-label`,t.props.className)}):null}renderTabClose(e,t){const{baseClassName:n}=this.props;return"function"==typeof t?(0,L.jsx)("button",{className:`${n}__${e}-close`,type:"button",onClick:e=>{e.preventDefault(),e.stopPropagation(),t(e)},children:(0,L.jsx)(he,{className:`${n}__${e}-close-icon`,name:"cross-mark"})}):null}renderFakeTabs(){const{baseClassName:e,children:t}=this.props;return U.Children.count(t)&&t?(0,L.jsxs)("ul",{className:N()(`${e}__tab-list`,`${e}__tab-list--fake`),children:[U.Children.map(t,(t=>{if(!t||t.type!==Fr)return null;const{title:n,label:s,icon:i,onActivate:a,onClose:r,...o}=t.props,l=he.create(i,{size:le,className:`${e}__tab-icon`}),c=this.renderTabClose("tab",r);return(0,L.jsxs)("li",{className:N()(`${e}__tab`,c&&`${e}__tab--closable`),children:[(0,L.jsxs)("a",{className:`${e}__link`,tabIndex:-1,style:o.style,children:[l,(0,L.jsx)("span",{className:`${e}__tab-title`,children:n}),this.renderTabLabel("tab",s)]}),c]},`${n}`)})),(0,L.jsx)("li",{className:N()(`${e}__tab`,`${e}__tab--more`),children:(0,L.jsx)("a",{className:`${e}__link`,tabIndex:-1,children:(0,L.jsx)(he,{name:"three-dots-horizontal"})})})]}):null}createTabItems(){const{children:e}=this.props,{collapsedLength:t}=this.state,n=[],s=[],i=U.Children.count(e)-1-t;return U.Children.forEach(e,((e,t)=>{const a=t>i,r=a?"menu-item":"tab",o=this.renderTabItem(e,t,r);o&&(a?s:n).push(o)})),{visibleItems:n,hiddenItems:s}}renderTabList(){const{baseClassName:e,children:t}=this.props,{active:n}=this.state;if(!U.Children.toArray(t).length)return null;const{visibleItems:s,hiddenItems:i}=this.createTabItems(),a=n>s.length;return(0,L.jsxs)("ul",{className:`${e}__tab-list`,role:"tablist",children:[s,i.length>0&&(0,L.jsx)("li",{ref:e=>this.moreTabsRef=e,className:N()(`${e}__tab`,a&&`${e}__tab--selected`,`${e}__tab--more`),role:"presentation","aria-selected":a||void 0,children:(0,L.jsx)(Tt,{className:`${e}__dropdown`,menu:(0,L.jsx)(Nn,{children:i}),menuPlacement:"bottom-end",children:(0,L.jsx)("a",{className:`${e}__link`,role:"tab",tabIndex:0,"aria-selected":a||void 0,children:(0,L.jsx)(he,{name:"three-dots-horizontal"})})})})]})}renderSearchBar(e){const{baseClassName:t,search:n}=this.props;if(!n)return null;const{compact:s}=this.state,i=(0,U.cloneElement)(n,e);return s?(0,L.jsx)("div",{className:`${t}__search`,children:i}):i}render(){const{baseClassName:e,className:t,addon:n,placeholder:s,children:i,active:a,addonMinWidth:r,monospaced:o,search:l,...c}=this.props,{compact:u,searching:d}=this.state;if(!U.Children.count(i))return null;const p=n||s;let h=p;const m={};let f=null;if(l){const e={collapsable:u,onExpand:this.handleStartSearching,onCollapse:this.handleCancelSearching};u?(d?(e.maxWidth=void 0,e.minWidth=void 0,e.autoFocus=!0,e.responsive=!1):e.onSearch=this.handleStartSearching,f=this.renderSearchBar(e)):p?(e.key=1,h=(0,L.jsxs)(L.Fragment,{children:[this.renderSearchBar(e),(0,U.cloneElement)(p,{key:2})]})):(m.style={maxWidth:l.props.maxWidth},h=this.renderSearchBar(e))}return(0,L.jsx)(Ce.Provider,{value:u,children:(0,L.jsxs)("div",{className:N()(e,t),...c,children:[(0,L.jsx)(bn,{onResize:this.handleResize,innerRef:e=>this.tabsnavRef=e,children:t=>{let{measureRef:n}=t;return(0,L.jsxs)("div",{className:N()(`${e}__nav`,u&&`${e}__nav--compact`,d&&`${e}__nav--searching`,l&&`${e}__nav--search`),ref:n,children:[this.renderTabList(),(0,L.jsx)(bn,{onResize:this.handleResize,children:e=>{let{measureRef:t}=e;const n=this.renderFakeTabs();return n?(0,U.cloneElement)(n,{ref:t}):null}}),f,h&&(0,L.jsx)(bn,{onResize:this.handleAddonResize,bounds:!0,children:t=>{let{measureRef:n}=t;return(0,L.jsx)("div",{className:`${e}__addon`,ref:n,...m,children:h})}})]})}}),(0,L.jsx)("div",{className:`${e}__tab-panel`,role:"tabpanel",children:U.Children.map(i,((e,t)=>t+1===this.state.active?e:null))})]})})}}B(Yr,"defaultProps",{baseClassName:`${F.CLS_PREFIX}tabs`});const Br=Yr;class Hr extends U.Component{constructor(){super(...arguments),B(this,"state",{focused:!1,overMenu:!1,value:`${this.props.inputProps?.value||""}`,highlightedValue:null}),B(this,"isFocusScheduled",!1),B(this,"search",void 0),B(this,"keyboardNavigation",(e=>{const{onItemSelect:t,results:n}=this.props,s=this.getHighlightedValue();if(!n||!t)return;const i=this.getResults(),a=i.indexOf(s);let r;r="ArrowUp"===e?Math.max(a-1,0):Math.min(a+1,i.length-1),this.setState({highlightedValue:-1===a?null:i[r]})})),B(this,"handleFocus",(()=>{this.setState({focused:!0}),this.search&&this.search.focus()})),B(this,"handleBlur",(()=>{this.setState({focused:!1}),this.search&&this.search.blur()})),B(this,"handleMenuMouseOver",(()=>{this.setState({overMenu:!0})})),B(this,"handleMenuMouseOut",(()=>{this.setState({overMenu:!1})})),B(this,"handleKeyDown",(e=>{const{onTyping:t}=this.props,{value:n}=e.currentTarget;-1===["Enter","Escape","ArrowUp","ArrowDown"].indexOf(e.key)?(this.setState({value:n}),t&&t(n,(()=>this.clearInput()))):this.checkKeys(e.key)})),B(this,"handleSearch",(()=>{const{onSearch:e,onTyping:t}=this.props,{value:n}=this.state;e?e(n,(()=>this.clearInput())):t&&t(n,(()=>this.clearInput()))})),B(this,"handleReset",(()=>{this.clearInput(),this.handleFocus()})),B(this,"handleSelect",(e=>()=>{const{onItemSelect:t}=this.props;this.setState({highlightedValue:null}),this.handleBlur(),t?t(e,(()=>this.clearInput())):this.clearInput()})),B(this,"handleExpand",(()=>{const{onExpand:e,distractionFreeMode:t}=this.props;this.isFocusScheduled=!0,G(e),t&&t.toggle()})),B(this,"handleCollapse",(()=>{const{onCollapse:e,distractionFreeMode:t}=this.props;G(e),t&&t.toggle()}))}static getDerivedStateFromProps(e,t){const{inputProps:{value:n}={}}=e,{prevInputProps:{value:s}={}}=t,i={};return n!==s&&(i.value=n??""),i.prevInputProps=e.inputProps,i}componentDidUpdate(){this.isFocusScheduled&&(this.handleFocus(),this.isFocusScheduled=!1)}isResponsive(){return this.props.responsive}getResults(e){const{results:t}=this.props;if(!t)return[];if("type"in t&&t.type===Nn||e){let n=[];const s=e||t.props.children;if(!Array.isArray(s))return n;for(let e=0;e<s.length;e++){const t=s[e];t&&(U.Children.count(t)>1?n=n.concat(this.getResults(t)):t.type!==ft&&t.type!==En||!t.key||n.push(t.key.toString()))}return n}return t.map((e=>{let{value:t}=e;return t}))}getHighlightedValue(){return(this.state.highlightedValue||this.getResults()[0])??null}searchAction(){const{onItemSelect:e,results:t}=this.props,n=this.getHighlightedValue();e&&t?-1===this.getResults().indexOf(n)?this.handleSearch():this.handleSelect(n)():this.handleSearch()}checkKeys(e){"Enter"===e?this.searchAction():"Escape"===e?this.state.value?this.handleReset():(this.handleBlur(),this.handleMenuMouseOut()):"ArrowUp"!==e&&"ArrowDown"!==e||this.keyboardNavigation(e)}clearInput(){this.setState({value:""},this.handleSearch)}elementsIndexToKeyMapping(e){let t=[];if(!Array.isArray(e))return t;for(let n=0;n<e.length;n++){const s=e[n];s&&(Array.isArray(s)?t=t.concat(this.elementsIndexToKeyMapping(s)):t.push(s.key))}return t}renderResults(e){const{baseClassName:t}=this.props,{focused:n,overMenu:s}=this.state,i=this.getHighlightedValue();return(0,L.jsx)(Nn,{className:N()(`${t}__results`,{[`${t}__results--hidden`]:!n&&!s}),onMouseOver:this.handleMenuMouseOver,onMouseOut:this.handleMenuMouseOut,children:e.map((e=>(0,L.jsx)(ft,{active:e.value===i,onClick:this.handleSelect(e.value),children:e.title},e.value)))})}renderResultsMenu(e){const{baseClassName:t,onItemSelect:n}=this.props,{focused:s,overMenu:i}=this.state,a=this.getHighlightedValue();return(0,U.cloneElement)(e,{className:N()(`${t}__results`,{[`${t}__results--hidden`]:!s&&!i},e.props.className),onMouseOver:this.handleMenuMouseOver,onMouseOut:this.handleMenuMouseOut,onItemClick:(t,n)=>{const s=this.elementsIndexToKeyMapping(e.props.children);this.handleSelect(s[n])()},children:U.Children.map(e.props.children,(e=>n&&e&&"object"==typeof e&&"type"in e&&(e.type===ft||e.type===En)?(0,U.cloneElement)(e,{active:e.key===a}):e))})}render(){const{baseClassName:e,className:t,maxWidth:n,minWidth:s,loading:i,responsive:a,onSearch:r,onTyping:o,onItemSelect:l,collapsable:c,onCollapse:u,onExpand:d,results:p,inputProps:h,distractionFreeMode:m,...f}=this.props,{focused:g,value:b}=this.state,v=this.isResponsive(),y=Boolean(m&&m.enabled);return(0,L.jsxs)("div",{className:N()(e,{[`${e}--focused`]:g},t),style:v||y?void 0:{maxWidth:n,minWidth:s},...f,children:[(0,L.jsx)(Re,{className:`${e}__group`,children:!v||!c&&y?(0,L.jsx)(vn,{innerRef:e=>this.search=e,className:`${e}__input`,size:"fill",onChange:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,...h,value:b,prefix:(c&&!v||y)&&(0,L.jsx)(Ue,{icon:{name:"chevron-right",flipHorizontal:at()},ghost:!0,onClick:this.handleCollapse}),suffix:(0,L.jsxs)(L.Fragment,{children:[b&&(0,L.jsx)(Ue,{icon:"remove",onClick:this.handleReset,ghost:!0}),(0,L.jsx)(Ue,{icon:"search",onClick:this.handleSearch,state:i?"loading":void 0,ghost:!0})]})}):(0,L.jsx)(_e,{intent:"info",hidden:!b,children:(0,L.jsx)(Ue,{icon:"search",onClick:this.handleExpand})})}),Array.isArray(p)&&this.renderResults(p),p&&!Array.isArray(p)&&p.type===Nn&&this.renderResultsMenu(p)]})}}B(Hr,"defaultProps",{baseClassName:`${F.CLS_PREFIX}search-bar`,maxWidth:500,minWidth:270,inputProps:{}});const Vr=e=>{const t=(0,U.useContext)(es);let n=(0,U.useContext)(Ce);return n=void 0===e.responsive?n||!1:Boolean(e.responsive),(0,L.jsx)(Hr,{...e,responsive:n,distractionFreeMode:t})};Vr.displayName="SearchBar";const $r=Vr;function Wr(e,t){var n=Object.create(null);return e&&U.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,U.isValidElement)(e)?t(e):e}(e)})),n}function zr(e,t,n){return null!=n[t]?n[t]:e.props[t]}function qr(e,t,n){var s=Wr(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var s,i=Object.create(null),a=[];for(var r in e)r in t?a.length&&(i[r]=a,a=[]):a.push(r);var o={};for(var l in t){if(i[l])for(s=0;s<i[l].length;s++){var c=i[l][s];o[i[l][s]]=n(c)}o[l]=n(l)}for(s=0;s<a.length;s++)o[a[s]]=n(a[s]);return o}(t,s);return Object.keys(i).forEach((function(a){var r=i[a];if((0,U.isValidElement)(r)){var o=a in t,l=a in s,c=t[a],u=(0,U.isValidElement)(c)&&!c.props.in;!l||o&&!u?l||!o||u?l&&o&&(0,U.isValidElement)(c)&&(i[a]=(0,U.cloneElement)(r,{onExited:n.bind(null,r),in:c.props.in,exit:zr(r,"exit",e),enter:zr(r,"enter",e)})):i[a]=(0,U.cloneElement)(r,{in:!1}):i[a]=(0,U.cloneElement)(r,{onExited:n.bind(null,r),in:!0,exit:zr(r,"exit",e),enter:zr(r,"enter",e)})}})),i}var Gr=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Kr=function(e){function t(t,n){var s,i=(s=e.call(this,t,n)||this).handleExited.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(s));return s.state={contextValue:{isMounting:!0},handleExited:i,firstRender:!0},s}Ve(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,s,i=t.children,a=t.handleExited;return{children:t.firstRender?(n=e,s=a,Wr(n.children,(function(e){return(0,U.cloneElement)(e,{onExited:s.bind(null,e),in:!0,appear:zr(e,"appear",n),enter:zr(e,"enter",n),exit:zr(e,"exit",n)})}))):qr(e,i,a),firstRender:!1}},n.handleExited=function(e,t){var n=Wr(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=Ye({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,s=Be(e,["component","childFactory"]),i=this.state.contextValue,a=Gr(this.state.children).map(n);return delete s.appear,delete s.enter,delete s.exit,null===t?U.createElement(We.Provider,{value:i},a):U.createElement(We.Provider,{value:i},U.createElement(t,s,a))},t}(U.Component);Kr.propTypes={},Kr.defaultProps={component:"div",childFactory:function(e){return e}};const Xr=Kr;class Zr extends U.Component{constructor(){super(...arguments),B(this,"timer",void 0)}componentDidMount(){const{autoClosable:e,onClose:t}=this.props;let{autoCloseTimeout:n}=this.props;switch(e){case!0:n=6e3;break;case!1:n=void 0}n&&t&&(this.timer=window.setTimeout(t,n))}componentWillUnmount(){this.timer&&clearTimeout(this.timer)}render(){const{baseClassName:e,className:t,message:n,intent:s,accent:i,icon:a=s&&(0,L.jsx)(he,{name:Ci[s]}),onClose:r,closable:o=!0,autoClosable:l,autoCloseTimeout:c,innerRef:u,...d}=this.props,p=(0,L.jsxs)("div",{tabIndex:0,className:N()(e,s&&`${e}--${s}`,i&&`${e}--accent`,t),...d,ref:u,children:[a?(0,L.jsx)("div",{className:`${e}__icon`,children:he.create(a,{intent:s})}):null,(0,L.jsx)("div",{className:`${e}__content`,children:n}),o?(0,L.jsx)("div",{className:`${e}__action`,children:(0,L.jsx)(Ue,{ghost:!0,icon:{name:"cross-mark",size:"12"},className:`${e}__close`,onClick:r})}):null]});return i?p:(0,L.jsx)(oe.Provider,{value:!0,children:p})}}var Jr;B(Zr,"defaultProps",{baseClassName:`${F.CLS_PREFIX}toast`});let Qr=0;class eo extends U.Component{constructor(){super(...arguments),B(this,"state",{toasts:[]})}static getDerivedStateFromProps(e){let{toasts:t,maxToastsNumber:n}=e;return t?{toasts:t.slice(0,n)}:null}isControlled(){return Boolean(this.props.toasts)}add(e){const t="toast-"+Qr++;return this.setState((n=>{let{toasts:s}=n;return{toasts:[{key:t,...e},...s].slice(0,this.props.maxToastsNumber)}})),t}update(e,t){return this.setState((n=>{let{toasts:s}=n;return{toasts:s.map((n=>n.key===e?{...t,key:e}:n))}})),e}remove(e){this.setState((t=>{let{toasts:n}=t;return{toasts:n.filter((t=>t.key!==e))}}))}clear(){this.setState({toasts:[]})}render(){const{baseClassName:e,className:t,toasts:n,maxToastsNumber:s,position:i,onToastClose:a,...r}=this.props;let o=this.state.toasts;return"bottom-end"===i&&(o=[...o],o.reverse()),(0,L.jsx)(we,{level:F.Z_INDEX_TOASTER,children:(0,L.jsx)("div",{className:N()(e,{[`${e}--${i}`]:i},t),...r,children:(0,L.jsx)(Xr,{component:"span",children:o.map((e=>{const{intent:t}=e;let{autoClosable:n}=e;void 0===n&&"success"===t&&"top-end"===i&&(n=!0);const s=(0,U.createRef)();return(0,L.jsx)(st,{classNames:`${Zr.defaultProps.baseClassName}-`,timeout:{enter:300,exit:300},nodeRef:s,children:(0,L.jsx)(Zr,{...e,autoClosable:n,onClose:()=>{this.isControlled()||this.remove(e.key),e.onClose&&e.onClose(),a&&a(e.key)},innerRef:s})},e.key)}))})})})}}Jr=eo,B(eo,"defaultProps",{position:"top-end",baseClassName:`${F.CLS_PREFIX}toaster`}),B(eo,"create",(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;const n=document.createElement("div");return t.appendChild(n),(0,M.render)((0,L.jsx)(Jr,{...e}),n)}));const to=e=>{let{width:t,maxWidth:n,height:s,style:i,component:a="span",className:r,baseClassName:o=`${F.CLS_PREFIX}skeleton`,...l}=e;const c={...i,width:se(t),maxWidth:se(n),height:se(s)};return(0,L.jsx)(a,{className:N()(o,r),style:c,...l})},no=e=>{let{lines:t=3,component:n="span",className:s,baseClassName:i=`${F.CLS_PREFIX}skeleton-text`,lineProps:a={},...r}=e;return(0,L.jsx)(n,{className:N()(i,s),...r,children:Array.from({length:t}).map(((e,t)=>(0,L.jsx)(to,{...a,className:N()(`${i}__line`,a?.className)},t)))})};E()();var so=r(14494),io=r(51721),ao=1073741823,ro="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:{};function oo(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,s){e=n,t.forEach((function(t){return t(e,s)}))}}}var lo=U.createContext||function(e,t){var n,s,i,a="__create-react-context-"+((ro[i="__global_unique_id__"]=(ro[i]||0)+1)+"__"),r=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=oo(t.props.value),t}(0,io.Z)(n,e);var s=n.prototype;return s.getChildContext=function(){var e;return(e={})[a]=this.emitter,e},s.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,s=this.props.value,i=e.value;((a=s)===(r=i)?0!==a||1/a==1/r:a!=a&&r!=r)?n=0:(n="function"==typeof t?t(s,i):ao,0!=(n|=0)&&this.emitter.set(e.value,n))}var a,r},s.render=function(){return this.props.children},n}(U.Component);r.childContextTypes=((n={})[a]=Vt().object.isRequired,n);var o=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}(0,io.Z)(n,t);var s=n.prototype;return s.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?ao:t},s.componentDidMount=function(){this.context[a]&&this.context[a].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?ao:e},s.componentWillUnmount=function(){this.context[a]&&this.context[a].off(this.onUpdate)},s.getValue=function(){return this.context[a]?this.context[a].get():e},s.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(U.Component);return o.contextTypes=((s={})[a]=Vt().object,s),{Provider:r,Consumer:o}};const co=lo;var uo=r(39658),po=r.n(uo),ho=(r(59864),r(63366)),mo=r(8679),fo=r.n(mo),go=function(e){var t=co();return t.displayName=e,t},bo=go("Router-History"),vo=function(e){var t=co();return t.displayName=e,t},yo=vo("Router"),_o=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}(0,io.Z)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return U.createElement(yo.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},U.createElement(bo.Provider,{children:this.props.children||null,value:this.props.history}))},t}(U.Component);U.Component,U.Component;var xo={},So=0;function wo(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,s=n.path,i=n.exact,a=void 0!==i&&i,r=n.strict,o=void 0!==r&&r,l=n.sensitive,c=void 0!==l&&l;return[].concat(s).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var s=function(e,t){var n=""+t.end+t.strict+t.sensitive,s=xo[n]||(xo[n]={});if(s[e])return s[e];var i=[],a={regexp:po()(e,i,t),keys:i};return So<1e4&&(s[e]=a,So++),a}(n,{end:a,strict:o,sensitive:c}),i=s.regexp,r=s.keys,l=i.exec(e);if(!l)return null;var u=l[0],d=l.slice(1),p=e===u;return a&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:r.reduce((function(e,t,n){return e[t.name]=d[n],e}),{})}}),null)}var ko=function(e){function t(){return e.apply(this,arguments)||this}return(0,io.Z)(t,e),t.prototype.render=function(){var e=this;return U.createElement(yo.Consumer,null,(function(t){t||S(!1);var n=e.props.location||t.location,s=e.props.computedMatch?e.props.computedMatch:e.props.path?wo(n.pathname,e.props):t.match,i=(0,y.Z)({},t,{location:n,match:s}),a=e.props,r=a.children,o=a.component,l=a.render;return Array.isArray(r)&&0===r.length&&(r=null),U.createElement(yo.Provider,{value:i},i.match?r?"function"==typeof r?r(i):r:o?U.createElement(o,i):l?l(i):null:"function"==typeof r?r(i):null)}))},t}(U.Component);U.Component;var jo=function(e){function t(){return e.apply(this,arguments)||this}return(0,io.Z)(t,e),t.prototype.render=function(){var e=this;return U.createElement(yo.Consumer,null,(function(t){t||S(!1);var n,s,i=e.props.location||t.location;return U.Children.forEach(e.props.children,(function(e){if(null==s&&U.isValidElement(e)){n=e;var a=e.props.path||e.props.from;s=a?wo(i.pathname,(0,y.Z)({},e.props,{path:a})):t.match}})),s?U.cloneElement(n,{location:i,computedMatch:s}):null}))},t}(U.Component);function To(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,s=(0,ho.Z)(t,["wrappedComponentRef"]);return U.createElement(yo.Consumer,null,(function(t){return t||S(!1),U.createElement(e,(0,y.Z)({},s,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,fo()(n,e)}var Co=U.useContext;function Do(){return Co(bo)}var Po=r(5559),Io=r.n(Po),Oo="@@router/LOCATION_CHANGE",Lo="@@router/CALL_HISTORY_METHOD",Mo=function(e){return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return{type:Lo,payload:{method:e,args:n}}}},Ao=Mo("push");function Eo(e){return Eo="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},Eo(e)}Mo("replace"),Mo("go"),Mo("goBack"),Mo("goForward");const Uo=function(e){var t=e.getIn,n=e.toJS,s=function(e){var s,i=n(t(e,["router"]));if(null==(s=i)||"object"!==Eo(s)||!t(s,["location"])||!t(s,["action"]))throw'Could not find router reducer in state tree, it must be mounted under "router"';return i},i=function(e){return n(t(s(e),["location"]))};return{getLocation:i,getAction:function(e){return n(t(s(e),["action"]))},getRouter:s,getSearch:function(e){return n(t(s(e),["location","search"]))},getHash:function(e){return n(t(s(e),["location","hash"]))},createMatchSelector:function(e){var t=null,n=null;return function(s){var a=(i(s)||{}).pathname;if(a===t)return n;t=a;var r=wo(a,e);return r&&n&&r.url===n.url&&r.isExact===n.isExact||(n=r),n}}}};function Ro(e){return Ro="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},Ro(e)}function No(){return No=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},No.apply(this,arguments)}function Fo(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function Yo(e,t){return!t||"object"!==Ro(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bo(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function Ho(e){return Ho=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ho(e)}function Vo(e,t){return Vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Vo(e,t)}const $o=function(e){var t=Uo(e).getLocation,n=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vo(e,t)}(r,e);var n,s,i,a=(n=r,function(){var e,t=Ho(n);if(Bo()){var s=Ho(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return Yo(this,e)});function r(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n=a.call(this,e);var s=e.store,i=e.history,o=e.onLocationChanged,l=e.stateCompareFunction;n.inTimeTravelling=!1,n.unsubscribe=s.subscribe((function(){var a=!e.noTimeTravelDebugging,r=t(s.getState()),o=r.pathname,c=r.search,u=r.hash,d=r.state,p=i.location,h=p.pathname,m=p.search,f=p.hash,g=p.state;!a||"PUSH"!==e.history.action||h===o&&m===c&&f===u&&Io()(d,g,l)||(n.inTimeTravelling=!0,i.push({pathname:o,search:c,hash:u,state:d}))}));var c=function(e,t){var s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];n.inTimeTravelling?n.inTimeTravelling=!1:o(e,t,s)};return n.unlisten=i.listen(c),e.noInitialPop||c(i.location,i.action,!0),n}return s=r,(i=[{key:"componentWillUnmount",value:function(){this.unlisten(),this.unsubscribe()}},{key:"render",value:function(){var e=this.props,t=e.omitRouter,n=e.history,s=e.children;return t?U.createElement(U.Fragment,null,s):U.createElement(_o,{history:n},s)}}])&&Fo(s.prototype,i),r}(U.PureComponent);n.propTypes={store:Vt().shape({getState:Vt().func.isRequired,subscribe:Vt().func.isRequired}).isRequired,history:Vt().shape({action:Vt().string.isRequired,listen:Vt().func.isRequired,location:Vt().object.isRequired,push:Vt().func.isRequired}).isRequired,basename:Vt().string,children:Vt().oneOfType([Vt().func,Vt().node]),onLocationChanged:Vt().func.isRequired,noInitialPop:Vt().bool,noTimeTravelDebugging:Vt().bool,stateCompareFunction:Vt().func,omitRouter:Vt().bool};var s=function(e){var t=e.context||so.ET;if(null==t)throw"Please upgrade to react-redux v6";return U.createElement(t.Consumer,null,(function(t){var s=t.store;return U.createElement(n,No({store:s},e))}))};return s.propTypes={context:Vt().object},(0,so.$j)(null,(function(e){return{onLocationChanged:function(t,n,s){return e(function(e,t){return{type:Oo,payload:{location:e,action:t,isFirstRendering:arguments.length>2&&void 0!==arguments[2]&&arguments[2]}}}(t,n,s))}}}))(s)};function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function zo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function qo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zo(Object(n),!0).forEach((function(t){Go(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ko=function(e){if(e&&e.query)return e;var t=e&&e.search;if("string"!=typeof t||0===t.length)return qo({},e,{query:{}});var n=t.substring(1).split("&").reduce((function(e,t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],s=!0,i=!1,a=void 0;try{for(var r,o=e[Symbol.iterator]();!(s=(r=o.next()).done)&&(n.push(r.value),!t||n.length!==t);s=!0);}catch(e){i=!0,a=e}finally{try{s||null==o.return||o.return()}finally{if(i)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wo(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.split("="),2);return qo({},e,Go({},n[0],n[1]))}),{});return qo({},e,{query:n})};const Xo=function(e){var t=e.fromJS,n=e.merge;return function(e){var s=t({location:Ko(e.location),action:e.action});return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.type,r=i.payload;if(a===Oo){var o=r.location,l=r.action,c=r.isFirstRendering;return c?e:n(e,{location:t(Ko(o)),action:l})}return e}}};function Zo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function Jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Qo={fromJS:function(e){return e},getIn:function(e,t){if(!e)return e;var n=t.length;if(n){for(var s=e,i=0;i<n&&s;++i)s=s[t[i]];return s}},merge:function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zo(Object(n),!0).forEach((function(t){Jo(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e,{},t)},toJS:function(e){return e}};const el=Qo;var tl=$o(el),nl=Xo(el),sl=Uo(el),il=(sl.getLocation,sl.getAction,sl.getHash,sl.getRouter,sl.getSearch,sl.createMatchSelector,function(e,t){return il=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},il(e,t)});function al(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}il(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var rl,ol,ll,cl=function(){return cl=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},cl.apply(this,arguments)};function ul(e,t,n){if(n||2===arguments.length)for(var s,i=0,a=t.length;i<a;i++)!s&&i in t||(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}function dl(e){return e.type===ol.literal}function pl(e){return e.type===ol.argument}function hl(e){return e.type===ol.number}function ml(e){return e.type===ol.date}function fl(e){return e.type===ol.time}function gl(e){return e.type===ol.select}function bl(e){return e.type===ol.plural}function vl(e){return e.type===ol.pound}function yl(e){return e.type===ol.tag}function _l(e){return!(!e||"object"!=typeof e||e.type!==ll.number)}function xl(e){return!(!e||"object"!=typeof e||e.type!==ll.dateTime)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"}(rl||(rl={})),function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"}(ol||(ol={})),function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"}(ll||(ll={}));var Sl=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,wl=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function kl(e){var t={};return e.replace(wl,(function(e){var n=e.length;switch(e[0]){case"G":t.era=4===n?"long":5===n?"narrow":"short";break;case"y":t.year=2===n?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][n-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][n-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=4===n?"long":5===n?"narrow":"short";break;case"e":if(n<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"c":if(n<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][n-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][n-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][n-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][n-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][n-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][n-1];break;case"s":t.second=["numeric","2-digit"][n-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=n<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""})),t}var jl=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,Tl=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Cl=/^(@+)?(\+|#+)?[rs]?$/g,Dl=/(\*)(0+)|(#+)(0+)|(0+)/g,Pl=/^(0+)$/;function Il(e){var t={};return"r"===e[e.length-1]?t.roundingPriority="morePrecision":"s"===e[e.length-1]&&(t.roundingPriority="lessPrecision"),e.replace(Cl,(function(e,n,s){return"string"!=typeof s?(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length):"+"===s?t.minimumSignificantDigits=n.length:"#"===n[0]?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+("string"==typeof s?s.length:0)),""})),t}function Ol(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function Ll(e){var t;if("E"===e[0]&&"E"===e[1]?(t={notation:"engineering"},e=e.slice(2)):"E"===e[0]&&(t={notation:"scientific"},e=e.slice(1)),t){var n=e.slice(0,2);if("+!"===n?(t.signDisplay="always",e=e.slice(2)):"+?"===n&&(t.signDisplay="exceptZero",e=e.slice(2)),!Pl.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Ml(e){return Ol(e)||{}}function Al(e){for(var t={},n=0,s=e;n<s.length;n++){var i=s[n];switch(i.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=i.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=i.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t=cl(cl(cl({},t),{notation:"scientific"}),i.options.reduce((function(e,t){return cl(cl({},e),Ml(t))}),{}));continue;case"engineering":t=cl(cl(cl({},t),{notation:"engineering"}),i.options.reduce((function(e,t){return cl(cl({},e),Ml(t))}),{}));continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(i.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(i.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");i.options[0].replace(Dl,(function(e,n,s,i,a,r){if(n)t.minimumIntegerDigits=s.length;else{if(i&&a)throw new Error("We currently do not support maximum integer digits");if(r)throw new Error("We currently do not support exact integer digits")}return""}));continue}if(Pl.test(i.stem))t.minimumIntegerDigits=i.stem.length;else if(Tl.test(i.stem)){if(i.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");i.stem.replace(Tl,(function(e,n,s,i,a,r){return"*"===s?t.minimumFractionDigits=n.length:i&&"#"===i[0]?t.maximumFractionDigits=i.length:a&&r?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+r.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),""}));var a=i.options[0];"w"===a?t=cl(cl({},t),{trailingZeroDisplay:"stripIfInteger"}):a&&(t=cl(cl({},t),Il(a)))}else if(Cl.test(i.stem))t=cl(cl({},t),Il(i.stem));else{var r=Ol(i.stem);r&&(t=cl(cl({},t),r));var o=Ll(i.stem);o&&(t=cl(cl({},t),o))}}return t}var El,Ul={"001":["H","h"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["H","h","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["H","hB","h","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["H","h","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["H","h","hB","hb"],CU:["H","h","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["H","hB","h","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GT:["H","h","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["H","h","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["H","h","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["H","h","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["H","hB","h","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["H","h","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["H","h","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["H","h","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"es-BO":["H","h","hB","hb"],"es-BR":["H","h","hB","hb"],"es-EC":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"es-PE":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Rl(e){var t=e.hourCycle;if(void 0===t&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}var n,s=e.language;return"root"!==s&&(n=e.maximize().region),(Ul[n||""]||Ul[s||""]||Ul["".concat(s,"-001")]||Ul["001"])[0]}var Nl=new RegExp("^".concat(Sl.source,"*")),Fl=new RegExp("".concat(Sl.source,"*$"));function Yl(e,t){return{start:e,end:t}}var Bl=!!String.prototype.startsWith&&"_a".startsWith("a",1),Hl=!!String.fromCodePoint,Vl=!!Object.fromEntries,$l=!!String.prototype.codePointAt,Wl=!!String.prototype.trimStart,zl=!!String.prototype.trimEnd,ql=Number.isSafeInteger?Number.isSafeInteger:function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},Gl=!0;try{Gl="a"===(null===(El=nc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu").exec("a"))||void 0===El?void 0:El[0])}catch(e){Gl=!1}var Kl,Xl=Bl?function(e,t,n){return e.startsWith(t,n)}:function(e,t,n){return e.slice(n,n+t.length)===t},Zl=Hl?String.fromCodePoint:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n,s="",i=e.length,a=0;i>a;){if((n=e[a++])>1114111)throw RangeError(n+" is not a valid code point");s+=n<65536?String.fromCharCode(n):String.fromCharCode(55296+((n-=65536)>>10),n%1024+56320)}return s},Jl=Vl?Object.fromEntries:function(e){for(var t={},n=0,s=e;n<s.length;n++){var i=s[n],a=i[0],r=i[1];t[a]=r}return t},Ql=$l?function(e,t){return e.codePointAt(t)}:function(e,t){var n=e.length;if(!(t<0||t>=n)){var s,i=e.charCodeAt(t);return i<55296||i>56319||t+1===n||(s=e.charCodeAt(t+1))<56320||s>57343?i:s-56320+(i-55296<<10)+65536}},ec=Wl?function(e){return e.trimStart()}:function(e){return e.replace(Nl,"")},tc=zl?function(e){return e.trimEnd()}:function(e){return e.replace(Fl,"")};function nc(e,t){return new RegExp(e,t)}if(Gl){var sc=nc("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");Kl=function(e,t){var n;return sc.lastIndex=t,null!==(n=sc.exec(e)[1])&&void 0!==n?n:""}}else Kl=function(e,t){for(var n=[];;){var s=Ql(e,t);if(void 0===s||rc(s)||oc(s))break;n.push(s),t+=s>=65536?2:1}return Zl.apply(void 0,n)};var ic=function(){function e(e,t){void 0===t&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)},e.prototype.parseMessage=function(e,t,n){for(var s=[];!this.isEOF();){var i=this.char();if(123===i){if((a=this.parseArgument(e,n)).err)return a;s.push(a.val)}else{if(125===i&&e>0)break;if(35!==i||"plural"!==t&&"selectordinal"!==t){if(60===i&&!this.ignoreTag&&47===this.peek()){if(n)break;return this.error(rl.UNMATCHED_CLOSING_TAG,Yl(this.clonePosition(),this.clonePosition()))}if(60===i&&!this.ignoreTag&&ac(this.peek()||0)){if((a=this.parseTag(e,t)).err)return a;s.push(a.val)}else{var a;if((a=this.parseLiteral(e,t)).err)return a;s.push(a.val)}}else{var r=this.clonePosition();this.bump(),s.push({type:ol.pound,location:Yl(r,this.clonePosition())})}}}return{val:s,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var s=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:ol.literal,value:"<".concat(s,"/>"),location:Yl(n,this.clonePosition())},err:null};if(this.bumpIf(">")){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var a=i.val,r=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!ac(this.char()))return this.error(rl.INVALID_TAG,Yl(r,this.clonePosition()));var o=this.clonePosition();return s!==this.parseTagName()?this.error(rl.UNMATCHED_CLOSING_TAG,Yl(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:ol.tag,value:s,children:a,location:Yl(n,this.clonePosition())},err:null}:this.error(rl.INVALID_TAG,Yl(r,this.clonePosition())))}return this.error(rl.UNCLOSED_TAG,Yl(n,this.clonePosition()))}return this.error(rl.INVALID_TAG,Yl(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e,t=this.offset();for(this.bump();!this.isEOF()&&(45===(e=this.char())||46===e||e>=48&&e<=57||95===e||e>=97&&e<=122||e>=65&&e<=90||183==e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039);)this.bump();return this.message.slice(t,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),s="";;){var i=this.tryParseQuote(t);if(i)s+=i;else{var a=this.tryParseUnquoted(e,t);if(a)s+=a;else{var r=this.tryParseLeftAngleBracket();if(!r)break;s+=r}}}var o=Yl(n,this.clonePosition());return{val:{type:ol.literal,value:s,location:o},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ac(e=this.peek()||0)||47===e)?null:(this.bump(),"<");var e},e.prototype.tryParseQuote=function(e){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===e||"selectordinal"===e)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(39===n){if(39!==this.peek()){this.bump();break}t.push(39),this.bump()}else t.push(n);this.bump()}return Zl.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return 60===n||123===n||35===n&&("plural"===t||"selectordinal"===t)||125===n&&e>0?null:(this.bump(),Zl(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(rl.EXPECT_ARGUMENT_CLOSING_BRACE,Yl(n,this.clonePosition()));if(125===this.char())return this.bump(),this.error(rl.EMPTY_ARGUMENT,Yl(n,this.clonePosition()));var s=this.parseIdentifierIfPossible().value;if(!s)return this.error(rl.MALFORMED_ARGUMENT,Yl(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(rl.EXPECT_ARGUMENT_CLOSING_BRACE,Yl(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:ol.argument,value:s,location:Yl(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(rl.EXPECT_ARGUMENT_CLOSING_BRACE,Yl(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(rl.MALFORMED_ARGUMENT,Yl(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=Kl(this.message,t),s=t+n.length;return this.bumpTo(s),{value:n,location:Yl(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,s){var i,a=this.clonePosition(),r=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(r){case"":return this.error(rl.EXPECT_ARGUMENT_TYPE,Yl(a,o));case"number":case"date":case"time":this.bumpSpace();var l=null;if(this.bumpIf(",")){this.bumpSpace();var c=this.clonePosition();if((b=this.parseSimpleArgStyleIfPossible()).err)return b;if(0===(h=tc(b.val)).length)return this.error(rl.EXPECT_ARGUMENT_STYLE,Yl(this.clonePosition(),this.clonePosition()));l={style:h,styleLocation:Yl(c,this.clonePosition())}}if((v=this.tryParseArgumentClose(s)).err)return v;var u=Yl(s,this.clonePosition());if(l&&Xl(null==l?void 0:l.style,"::",0)){var d=ec(l.style.slice(2));if("number"===r)return(b=this.parseNumberSkeletonFromString(d,l.styleLocation)).err?b:{val:{type:ol.number,value:n,location:u,style:b.val},err:null};if(0===d.length)return this.error(rl.EXPECT_DATE_TIME_SKELETON,u);var p=d;this.locale&&(p=function(e,t){for(var n="",s=0;s<e.length;s++){var i=e.charAt(s);if("j"===i){for(var a=0;s+1<e.length&&e.charAt(s+1)===i;)a++,s++;var r=1+(1&a),o=a<2?1:3+(a>>1),l=Rl(t);for("H"!=l&&"k"!=l||(o=0);o-- >0;)n+="a";for(;r-- >0;)n=l+n}else n+="J"===i?"H":i}return n}(d,this.locale));var h={type:ll.dateTime,pattern:p,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?kl(p):{}};return{val:{type:"date"===r?ol.date:ol.time,value:n,location:u,style:h},err:null}}return{val:{type:"number"===r?ol.number:"date"===r?ol.date:ol.time,value:n,location:u,style:null!==(i=null==l?void 0:l.style)&&void 0!==i?i:null},err:null};case"plural":case"selectordinal":case"select":var m=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(rl.EXPECT_SELECT_ARGUMENT_OPTIONS,Yl(m,cl({},m)));this.bumpSpace();var f=this.parseIdentifierIfPossible(),g=0;if("select"!==r&&"offset"===f.value){if(!this.bumpIf(":"))return this.error(rl.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Yl(this.clonePosition(),this.clonePosition()));var b;if(this.bumpSpace(),(b=this.tryParseDecimalInteger(rl.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,rl.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE)).err)return b;this.bumpSpace(),f=this.parseIdentifierIfPossible(),g=b.val}var v,y=this.tryParsePluralOrSelectOptions(e,r,t,f);if(y.err)return y;if((v=this.tryParseArgumentClose(s)).err)return v;var _=Yl(s,this.clonePosition());return"select"===r?{val:{type:ol.select,value:n,options:Jl(y.val),location:_},err:null}:{val:{type:ol.plural,value:n,options:Jl(y.val),offset:g,pluralType:"plural"===r?"cardinal":"ordinal",location:_},err:null};default:return this.error(rl.INVALID_ARGUMENT_TYPE,Yl(a,o))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||125!==this.char()?this.error(rl.EXPECT_ARGUMENT_CLOSING_BRACE,Yl(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(rl.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Yl(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(!(e>0))return{val:this.message.slice(t.offset,this.offset()),err:null};e-=1;break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=function(e){if(0===e.length)throw new Error("Number skeleton cannot be empty");for(var t=[],n=0,s=e.split(jl).filter((function(e){return e.length>0}));n<s.length;n++){var i=s[n].split("/");if(0===i.length)throw new Error("Invalid number skeleton");for(var a=i[0],r=i.slice(1),o=0,l=r;o<l.length;o++)if(0===l[o].length)throw new Error("Invalid number skeleton");t.push({stem:a,options:r})}return t}(e)}catch(e){return this.error(rl.INVALID_NUMBER_SKELETON,t)}return{val:{type:ll.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?Al(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,s){for(var i,a=!1,r=[],o=new Set,l=s.value,c=s.location;;){if(0===l.length){var u=this.clonePosition();if("select"===t||!this.bumpIf("="))break;var d=this.tryParseDecimalInteger(rl.EXPECT_PLURAL_ARGUMENT_SELECTOR,rl.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;c=Yl(u,this.clonePosition()),l=this.message.slice(u.offset,this.offset())}if(o.has(l))return this.error("select"===t?rl.DUPLICATE_SELECT_ARGUMENT_SELECTOR:rl.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,c);"other"===l&&(a=!0),this.bumpSpace();var p=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===t?rl.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:rl.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Yl(this.clonePosition(),this.clonePosition()));var h=this.parseMessage(e+1,t,n);if(h.err)return h;var m=this.tryParseArgumentClose(p);if(m.err)return m;r.push([l,{value:h.val,location:Yl(p,this.clonePosition())}]),o.add(l),this.bumpSpace(),l=(i=this.parseIdentifierIfPossible()).value,c=i.location}return 0===r.length?this.error("select"===t?rl.EXPECT_SELECT_ARGUMENT_SELECTOR:rl.EXPECT_PLURAL_ARGUMENT_SELECTOR,Yl(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(rl.MISSING_OTHER_CLAUSE,Yl(this.clonePosition(),this.clonePosition())):{val:r,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,s=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var r=this.char();if(!(r>=48&&r<=57))break;i=!0,a=10*a+(r-48),this.bump()}var o=Yl(s,this.clonePosition());return i?ql(a*=n)?{val:a,err:null}:this.error(t,o):this.error(e,o)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");var t=Ql(this.message,e);if(void 0===t)throw Error("Offset ".concat(e," is at invalid UTF-16 code unit boundary"));return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();10===e?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(Xl(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error("targetOffset ".concat(e," must be greater than or equal to the current offset ").concat(this.offset()));for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error("targetOffset ".concat(e," is at invalid UTF-16 code unit boundary"));if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&rc(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset(),n=this.message.charCodeAt(t+(e>=65536?2:1));return null!=n?n:null},e}();function ac(e){return e>=97&&e<=122||e>=65&&e<=90}function rc(e){return e>=9&&e<=13||32===e||133===e||e>=8206&&e<=8207||8232===e||8233===e}function oc(e){return e>=33&&e<=35||36===e||e>=37&&e<=39||40===e||41===e||42===e||43===e||44===e||45===e||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||91===e||92===e||93===e||94===e||96===e||123===e||124===e||125===e||126===e||161===e||e>=162&&e<=165||166===e||167===e||169===e||171===e||172===e||174===e||176===e||177===e||182===e||187===e||191===e||215===e||247===e||e>=8208&&e<=8213||e>=8214&&e<=8215||8216===e||8217===e||8218===e||e>=8219&&e<=8220||8221===e||8222===e||8223===e||e>=8224&&e<=8231||e>=8240&&e<=8248||8249===e||8250===e||e>=8251&&e<=8254||e>=8257&&e<=8259||8260===e||8261===e||8262===e||e>=8263&&e<=8273||8274===e||8275===e||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||8608===e||e>=8609&&e<=8610||8611===e||e>=8612&&e<=8613||8614===e||e>=8615&&e<=8621||8622===e||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||8658===e||8659===e||8660===e||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||8968===e||8969===e||8970===e||8971===e||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||9001===e||9002===e||e>=9003&&e<=9083||9084===e||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||9655===e||e>=9656&&e<=9664||9665===e||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||9839===e||e>=9840&&e<=10087||10088===e||10089===e||10090===e||10091===e||10092===e||10093===e||10094===e||10095===e||10096===e||10097===e||10098===e||10099===e||10100===e||10101===e||e>=10132&&e<=10175||e>=10176&&e<=10180||10181===e||10182===e||e>=10183&&e<=10213||10214===e||10215===e||10216===e||10217===e||10218===e||10219===e||10220===e||10221===e||10222===e||10223===e||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||10627===e||10628===e||10629===e||10630===e||10631===e||10632===e||10633===e||10634===e||10635===e||10636===e||10637===e||10638===e||10639===e||10640===e||10641===e||10642===e||10643===e||10644===e||10645===e||10646===e||10647===e||10648===e||e>=10649&&e<=10711||10712===e||10713===e||10714===e||10715===e||e>=10716&&e<=10747||10748===e||10749===e||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||11158===e||e>=11159&&e<=11263||e>=11776&&e<=11777||11778===e||11779===e||11780===e||11781===e||e>=11782&&e<=11784||11785===e||11786===e||11787===e||11788===e||11789===e||e>=11790&&e<=11798||11799===e||e>=11800&&e<=11801||11802===e||11803===e||11804===e||11805===e||e>=11806&&e<=11807||11808===e||11809===e||11810===e||11811===e||11812===e||11813===e||11814===e||11815===e||11816===e||11817===e||e>=11818&&e<=11822||11823===e||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||11840===e||11841===e||11842===e||e>=11843&&e<=11855||e>=11856&&e<=11857||11858===e||e>=11859&&e<=11903||e>=12289&&e<=12291||12296===e||12297===e||12298===e||12299===e||12300===e||12301===e||12302===e||12303===e||12304===e||12305===e||e>=12306&&e<=12307||12308===e||12309===e||12310===e||12311===e||12312===e||12313===e||12314===e||12315===e||12316===e||12317===e||e>=12318&&e<=12319||12320===e||12336===e||64830===e||64831===e||e>=65093&&e<=65094}function lc(e){e.forEach((function(e){if(delete e.location,gl(e)||bl(e))for(var t in e.options)delete e.options[t].location,lc(e.options[t].value);else hl(e)&&_l(e.style)||(ml(e)||fl(e))&&xl(e.style)?delete e.style.location:yl(e)&&lc(e.children)}))}function cc(e,t){void 0===t&&(t={}),t=cl({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new ic(e,t).parse();if(n.err){var s=SyntaxError(rl[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return(null==t?void 0:t.captureLocation)||lc(n.val),n.val}function uc(e,t){var n=t&&t.cache?t.cache:vc,s=t&&t.serializer?t.serializer:fc;return(t&&t.strategy?t.strategy:mc)(e,{cache:n,serializer:s})}function dc(e,t,n,s){var i,a=null==(i=s)||"number"==typeof i||"boolean"==typeof i?s:n(s),r=t.get(a);return void 0===r&&(r=e.call(this,s),t.set(a,r)),r}function pc(e,t,n){var s=Array.prototype.slice.call(arguments,3),i=n(s),a=t.get(i);return void 0===a&&(a=e.apply(this,s),t.set(i,a)),a}function hc(e,t,n,s,i){return n.bind(t,e,s,i)}function mc(e,t){return hc(e,this,1===e.length?dc:pc,t.cache.create(),t.serializer)}var fc=function(){return JSON.stringify(arguments)};function gc(){this.cache=Object.create(null)}gc.prototype.get=function(e){return this.cache[e]},gc.prototype.set=function(e,t){this.cache[e]=t};var bc,vc={create:function(){return new gc}},yc={variadic:function(e,t){return hc(e,this,pc,t.cache.create(),t.serializer)},monadic:function(e,t){return hc(e,this,dc,t.cache.create(),t.serializer)}};!function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"}(bc||(bc={}));var _c,xc=function(e){function t(t,n,s){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=s,i}return al(t,e),t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error),Sc=function(e){function t(t,n,s,i){return e.call(this,'Invalid values for "'.concat(t,'": "').concat(n,'". Options are "').concat(Object.keys(s).join('", "'),'"'),bc.INVALID_VALUE,i)||this}return al(t,e),t}(xc),wc=function(e){function t(t,n,s){return e.call(this,'Value for "'.concat(t,'" must be of type ').concat(n),bc.INVALID_VALUE,s)||this}return al(t,e),t}(xc),kc=function(e){function t(t,n){return e.call(this,'The intl string context variable "'.concat(t,'" was not provided to the string "').concat(n,'"'),bc.MISSING_VALUE,n)||this}return al(t,e),t}(xc);function jc(e){return"function"==typeof e}function Tc(e,t,n,s,i,a,r){if(1===e.length&&dl(e[0]))return[{type:_c.literal,value:e[0].value}];for(var o=[],l=0,c=e;l<c.length;l++){var u=c[l];if(dl(u))o.push({type:_c.literal,value:u.value});else if(vl(u))"number"==typeof a&&o.push({type:_c.literal,value:n.getNumberFormat(t).format(a)});else{var d=u.value;if(!i||!(d in i))throw new kc(d,r);var p=i[d];if(pl(u))p&&"string"!=typeof p&&"number"!=typeof p||(p="string"==typeof p||"number"==typeof p?String(p):""),o.push({type:"string"==typeof p?_c.literal:_c.object,value:p});else if(ml(u)){var h="string"==typeof u.style?s.date[u.style]:xl(u.style)?u.style.parsedOptions:void 0;o.push({type:_c.literal,value:n.getDateTimeFormat(t,h).format(p)})}else if(fl(u))h="string"==typeof u.style?s.time[u.style]:xl(u.style)?u.style.parsedOptions:s.time.medium,o.push({type:_c.literal,value:n.getDateTimeFormat(t,h).format(p)});else if(hl(u))(h="string"==typeof u.style?s.number[u.style]:_l(u.style)?u.style.parsedOptions:void 0)&&h.scale&&(p*=h.scale||1),o.push({type:_c.literal,value:n.getNumberFormat(t,h).format(p)});else{if(yl(u)){var m=u.children,f=u.value,g=i[f];if(!jc(g))throw new wc(f,"function",r);var b=g(Tc(m,t,n,s,i,a).map((function(e){return e.value})));Array.isArray(b)||(b=[b]),o.push.apply(o,b.map((function(e){return{type:"string"==typeof e?_c.literal:_c.object,value:e}})))}if(gl(u)){if(!(v=u.options[p]||u.options.other))throw new Sc(u.value,p,Object.keys(u.options),r);o.push.apply(o,Tc(v.value,t,n,s,i))}else if(bl(u)){var v;if(!(v=u.options["=".concat(p)])){if(!Intl.PluralRules)throw new xc('Intl.PluralRules is not available in this environment.\nTry polyfilling it using "@formatjs/intl-pluralrules"\n',bc.MISSING_INTL_API,r);var y=n.getPluralRules(t,{type:u.pluralType}).select(p-(u.offset||0));v=u.options[y]||u.options.other}if(!v)throw new Sc(u.value,p,Object.keys(u.options),r);o.push.apply(o,Tc(v.value,t,n,s,i,p-(u.offset||0)))}}}}return(_=o).length<2?_:_.reduce((function(e,t){var n=e[e.length-1];return n&&n.type===_c.literal&&t.type===_c.literal?n.value+=t.value:e.push(t),e}),[]);var _}function Cc(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}!function(e){e[e.literal=0]="literal",e[e.object=1]="object"}(_c||(_c={}));var Dc=function(){function e(t,n,s,i){var a,r,o,l=this;if(void 0===n&&(n=e.defaultLocale),this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=l.formatToParts(e);if(1===t.length)return t[0].value;var n=t.reduce((function(e,t){return e.length&&t.type===_c.literal&&"string"==typeof e[e.length-1]?e[e.length-1]+=t.value:e.push(t.value),e}),[]);return n.length<=1?n[0]||"":n},this.formatToParts=function(e){return Tc(l.ast,l.locales,l.formatters,l.formats,e,void 0,l.message)},this.resolvedOptions=function(){var e;return{locale:(null===(e=l.resolvedLocale)||void 0===e?void 0:e.toString())||Intl.NumberFormat.supportedLocalesOf(l.locales)[0]}},this.getAst=function(){return l.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),"string"==typeof t){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var c=i||{},u=(c.formatters,function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(c,["formatters"]));this.ast=e.__parse(t,cl(cl({},u),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=(r=e.formats,(o=s)?Object.keys(r).reduce((function(e,t){var n,s;return e[t]=(n=r[t],(s=o[t])?cl(cl(cl({},n||{}),s||{}),Object.keys(n).reduce((function(e,t){return e[t]=cl(cl({},n[t]),s[t]||{}),e}),{})):n),e}),cl({},r)):r),this.formatters=i&&i.formatters||(void 0===(a=this.formatterCache)&&(a={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:uc((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,ul([void 0],t,!1)))}),{cache:Cc(a.number),strategy:yc.variadic}),getDateTimeFormat:uc((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,ul([void 0],t,!1)))}),{cache:Cc(a.dateTime),strategy:yc.variadic}),getPluralRules:uc((function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,ul([void 0],t,!1)))}),{cache:Cc(a.pluralRules),strategy:yc.variadic})})}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=(new Intl.NumberFormat).resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(void 0!==Intl.Locale){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale("string"==typeof e?e:e[0])}},e.__parse=cc,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const Pc=Dc,Ic=(0,U.createContext)("en-US"),Oc=(0,U.createContext)({}),Lc=({messages:e,localeCode:t,parameters:n,children:s})=>(0,L.jsx)(Ic.Provider,{value:t,children:(0,L.jsx)(Oc.Provider,{value:n,children:(0,L.jsx)(St,{messages:e,children:s})})}),Mc=e=>{const t=_t(e),n=(0,U.useContext)(Ic),s=(0,U.useContext)(Oc);return(0,U.useCallback)(((e,i,a)=>{const r=t(e,Object.assign(Object.assign({},s),i),a);if("string"!=typeof r)return r;try{const e=new Pc(r,n,void 0,{ignoreTag:!0}).format(Object.assign(Object.assign({},s),i));return Array.isArray(e)?U.Children.toArray(e):e}catch(e){return r}}),[t,n,e,s])};const Ac=e=>{var{component:t,content:n,children:s,params:i,unsafe:a,fallback:r,namespace:o}=e,l=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["component","content","children","params","unsafe","fallback","namespace"]);const c=t||"span",u=Mc(o)(n||s||"",i,r),d=Object.assign({},l);return a&&"string"==typeof u?d.dangerouslySetInnerHTML={__html:u}:d.children=u,(0,L.jsx)(c,Object.assign({},d))};var Ec=r(80129),Uc=r.n(Ec);const Rc=(e,t,...n)=>{e.preventDefault(),e.stopPropagation(),t&&(n?t(...n):t())},Nc=(e,...t)=>(...n)=>{const s={type:e};return t.forEach(((e,i)=>{s[t[i]]=n[i]})),s},Fc=({status:e,message:t,actionMessages:n})=>{const s=[];return e&&t&&t.length&&s.push({key:$c(4),status:e,message:t}),n&&n.length&&n.forEach((e=>{const{message:t}=e;t&&t.length>0&&s.push({key:$c(4),status:e.status,message:t})})),s},Yc=e=>{let t={};return e.steps.forEach((e=>{t=Object.assign(Object.assign({},t),{[e.code]:{title:e.title,status:e.status,progress:e.progress,icon:e.icon,hint:e.hint}})})),Object.assign(Object.assign({},e),{steps:t})},Bc=e=>`${e.slug}-${e.instanceId}`,Hc=e=>e.itemsIds.map((t=>`${t}-${e.instanceId}`)),Vc=(e,t,n)=>{const s=(t-1)*n;return{pages:Math.ceil(e.length/n),currentItems:e.slice(s,s+n)}},$c=e=>Math.random().toString(36).substr(2,e),Wc=(e,t,n=null)=>e&&e.data&&e.data[t]?e.data[t]:n,zc=(e,t)=>e.reduce(((e,n)=>{const{key:s,value:i}=t(n);return e[s]=i,e}),{}),qc=(e,t)=>-1!==e.indexOf(t),Gc=(e,t,n)=>e&&e.hasOwnProperty(t)?e[t]:n,Kc=(e,t,n="slug")=>{const s=t.filter((t=>e.includes(t[n])));return s.length===e.length?e:s.map((e=>e[n]))},Xc=(e,...t)=>{"function"==typeof e&&e(...t)},Zc=(e,t)=>e.filter((e=>!t.includes(e)));var Jc;!function(e){e.ASC="ASC",e.DESC="DESC"}(Jc||(Jc={}));const Qc=(e,t,n=Jc.ASC)=>{let s=0;return e<t&&(s=-1),e>t&&(s=1),(n===Jc.ASC?1:-1)*s},eu=e=>{const t=e.path.replace(/\\/g,"/").replace(/\/\//g,"/").replace(/\/$/,"").split("/");return t[t.length-1]};var tu=r(961);const nu="success",su="error",iu="themes",au="plugins",ru="success",ou="warning",lu="danger",cu="clone",uu="sync",du="initial",pu="requested",hu="submitted",mu="loading_error",fu="updated",gu="wp-toolkit-",bu=`${gu}disabled-form-styles`,vu=`${gu}drawer-with-progress-states`,yu=`${gu}instance-ssl-status-popover`,_u=tu.CLS_PREFIX,xu=`${gu}context`,Su="app/ADD_APP_MESSAGE",wu="app/CLEAR_APP_MESSAGE",ku="app/SET_SEARCH",ju="app/DISABLE_SMART_UPDATE_PROMO_FOR_INSTANCES",Tu="app/DISABLE_SMART_UPDATE_PROMO_FOR_UPDATES_SCREEN",Cu="app/DISABLE_SMART_UPDATE_PROMO_FOR_MULTIPLE_SITES_UPDATES_SCREEN",Du="app/GET_INITIAL_OPTIONS_FINISHED",Pu="app/SET_CHANGELOG",Iu="app/CLOSE_FLASH_MESSAGE",Ou="app/SET_PREMIUM_USERS",Lu="app/CLOSE_GLOBAL_ALERT",Mu="app/ADD_UP_VOTED_FEATURE",Au="app/LICENSE_INFO_UPDATED",Eu="mode",Uu="domain";var Ru=r(9669),Nu=r.n(Ru);const Fu=e=>{const t=new Date;return e.performanceTesting={startTime:t.getTime()/1e3},e.headers=Object.assign(Object.assign({},e.headers),{"X-Performance-Testing-Start-Time":e.performanceTesting.startTime}),e},Yu={Accept:"application/json","Cache-Control":"no-cache",Credentials:"same-origin"},Bu=e=>(!1===e.includes("http")&&(e=`${window.location.protocol}//${window.location.host}${e}`),e),Hu=(e={})=>Object.assign(Object.assign(Object.assign({},e),Yu),{"X-Wpt-Ui":"true"}),Vu=e=>!!(e&&e.data&&e.data.formErrors),$u=e=>!!(e&&e.data&&e.data.meta),Wu=(e,t)=>`${e}/v1/installations/${t}/features/updates/smart/result`,zu=(e,t)=>`${e}/v1/installations/${t}/features/updates/php/result`,{Cancel:qu}=Nu(),Gu=e=>{if(-1!==e.request.responseURL.indexOf("login_up.php")||-1!==e.request.responseURL.indexOf("login.php"))throw location.reload(),new Error("Unauthorized");return e},Ku=(e,t)=>{if($u(t.response))return Promise.reject(t);const n=t&&t.message?t.message:"unknown";return t&&t instanceof qu||e((0,L.jsx)(Ac,{content:"api.service.internalServerError",params:{errorMessage:n}})),Promise.reject(t)};let Xu=null,Zu="/",Ju=()=>{};const Qu=e=>{Zu=Bu(e)},ed=e=>{Ju=e},td=e=>{const t=Nu().create({baseURL:Zu,headers:Hu()});if(t.interceptors.response.use((e=>Gu(e)),(e=>Ku(Ju,e))),null!==e&&e.endpoint&&e.key&&e.type&&e.hasOwnProperty("initialInstancesCount")){const n=Nu().create({baseURL:e.endpoint,headers:Object.assign(Object.assign({},Yu),{"X-Api-Key":e.key,"Content-type":"application/json"})});t.interceptors.request.use(Fu,(e=>e)),t.interceptors.response.use((t=>((e,t,n)=>{const s=new Date;return e.config.performanceTesting=Object.assign(Object.assign({},e.config.performanceTesting),{endTime:s.getTime()/1e3,action:e.config.url.replace(e.config.baseURL,"")}),t.post("/put-metrics",JSON.stringify([{MetricName:"actionTime",Timestamp:e.config.performanceTesting.startTime,Value:e.config.performanceTesting.endTime-e.config.performanceTesting.startTime,Unit:"Seconds",StorageResolution:1,Dimensions:[{Name:"backendAction",Value:`/${e.config.performanceTesting.action.split("/")[1]}`},{Name:"type",Value:n.type},{Name:"initialInstancesCount",Value:n.hasOwnProperty("initialInstancesCount")?n.initialInstancesCount:0}]}]),{crossdomain:!0}).then((()=>e))})(t,n,e)),(e=>e))}Xu=t},nd={disableSmartUpdatePromoForInstances:()=>Xu.post("/disable-smart-update-promo-for-instances-screen",{disable:!0}),disableSmartUpdatePromoForUpdatesScreen:e=>Xu.post("/disable-smart-update-promo-for-updates-screen",e),disableSmartUpdatePromoForMultipleSitesUpdatesScreen:e=>Xu.post("/disable-smart-update-promo-for-multiple-sites-updates-screen",e),getInitialData:()=>Xu.get("/get-initial-data"),getPremiumUsers:()=>Xu.get("/get-premium-users"),sendMainPagePerfStat:(e,t)=>{const n=new FormData;return n.append("pageLoadTime",`${e}`),n.append("pageAccessTime",`${t}`),Xu.post("/set-main-page-perf-stat",n)},getWhmcsUpsellLink:e=>{let t="/get-whmcs-upsell-link";return e&&(t=`${t}/instanceId/${e}`),Xu.get(t)}},sd={refresh:e=>Xu.get(`/clear-cache/id/${e}`),switchPhpHandler:(e,t)=>Xu.post(`/switch-php-handler/id/${e}/php-handler-id/${t}`),refreshScreenshot:e=>Xu.get(`/refresh-screenshot/id/${e}`),remove:e=>Xu.post("/remove",e),detach:e=>Xu.post("/detach",e),getDbSettings:e=>Xu.get(`/get-db-settings/id/${e}`),setDbSettings:(e,t)=>{const n=new FormData;return n.append("dbUserName",t.dbUserName),n.append("dbUserPassword",t.dbUserPassword),Xu.post(`/set-db-settings/id/${e}`,n)},customizeMaintenanceTemplate:e=>Xu.get(`/maintenance-customize/id/${e}`),restoreSnapshot:e=>Xu.post(`/restore-snapshot/id/${e}`),deleteSnapshot:e=>Xu.post(`/delete-snapshot/id/${e}`),getAdminSettings:e=>Xu.get(`/account/id/${e}`),setInstanceName:(e,t)=>Xu.post(`/name/id/${e}`,t),updateRemoteInstanceProperties:(e,t)=>Xu.post(`/update-remote-instance-properties/id/${e}`,t),updateRemoteAgentInstanceProperties:(e,t)=>Xu.post(`/update-remote-agent-instance-properties/id/${e}`,t),redetectRemoteInstanceProperties:(e,t)=>Xu.post(`/redetect-remote-instance-properties/id/${e}`,t),connectRemoteAgentInstance:e=>Xu.post("/connect-remote-agent-instance",e),synchronizeSiteUrl:e=>Xu.post(`/synchronize-site-url/id/${e}`),synchronizeSiteUrlSync:e=>Xu.post(`/synchronize-site-url-sync/id/${e}`),getSynchronizeSiteUrlParams:e=>Xu.get(`/get-synchronize-site-url-params/id/${e}`)},id=(e,t)=>{e.forEach(((e,n)=>t.append(`instances[${n}]`,`${e}`)))},ad=(e,t,n)=>{t.forEach(((t,s)=>{n.append(`${e}[${s}][name]`,t.name),void 0!==t.version&&null!==t.version&&n.append(`${e}[${s}][version]`,t.version),void 0!==t.isUploaded&&n.append(`${e}[${s}][isUploaded]`,`${t.isUploaded}`),void 0!==t.ownerGuid&&null!==t.ownerGuid&&n.append(`${e}[${s}][ownerGuid]`,t.ownerGuid)}))},rd=(e,t)=>{void 0!==e&&t.append("activateAfterInstallation",`${e}`)},od=(e,t)=>{ad("plugins",e,t)},ld=e=>{const t=new FormData;return od(e,t),t},cd={getPluginsList:()=>Xu.get("/list-plugins"),remove:e=>Xu.post("/uninstall-plugins",e),searchPlugins:e=>{const t=new FormData;return t.append("term",e),Xu.post("/search-plugins",t)},installPlugins:(e,t,n)=>Xu.post("/install-plugins",((e,t,n)=>{const s=((e,t)=>{const n=new FormData;return od(e,n),id(t,n),n})(e,t);return rd(n,s),s})(e,t,n)),activatePlugins:e=>Xu.post("/activate-plugins-on-all-instances",ld(e)),deactivatePlugins:e=>Xu.post("/deactivate-plugins-on-all-instances",ld(e)),uninstallPlugins:e=>Xu.post("/uninstall-plugins-on-all-instances",ld(e)),removePlugins:e=>Xu.post("/remove-plugins-on-all-instances",ld(e)),updatePlugins:e=>Xu.post("/update-plugins-on-all-instances",ld(e)),uploadPluginToStorage:(e,t)=>{const n=new FormData;return n.append("fileUpload",e),null!==t&&n.append("setId",`${t}`),Xu.post("/upload-plugin-to-storage",n)},uploadAndInstallPlugin:(e,t,n)=>{const s=new FormData;return s.append("fileUpload",e),id(t,s),rd(n,s),Xu.post("/upload-and-install-plugin",s)},loadPluginsData:e=>Xu.post("/load-plugins-data",ld(e))},ud=(e,t)=>{ad("themes",e,t)},dd=e=>{const t=new FormData;return ud(e,t),t},pd={getThemesList:()=>Xu.get("/list-themes"),remove:e=>Xu.post("/uninstall-themes",e),loadThemesData:e=>Xu.post("/load-themes-data",dd(e)),searchThemes:e=>{const t=new FormData;return t.append("term",e),Xu.post("/search-themes",t)},installThemes:(e,t,n)=>Xu.post("/install-themes",((e,t,n)=>{const s=((e,t)=>{const n=new FormData;return ud(e,n),id(t,n),n})(e,t);return rd(n,s),s})(e,t,n)),uninstallThemes:e=>Xu.post("/uninstall-themes-on-all-instances",dd(e)),removeThemes:e=>Xu.post("/remove-themes-on-all-instances",dd(e)),updateThemes:e=>Xu.post("/update-themes-on-all-instances",dd(e)),uploadThemeToStorage:(e,t)=>{const n=new FormData;return n.append("fileUpload",e),null!==t&&n.append("setId",`${t}`),Xu.post("/upload-theme-to-storage",n)},uploadAndInstallTheme:(e,t,n)=>{const s=new FormData;return s.append("fileUpload",e),id(t,s),rd(n,s),Xu.post("/upload-and-install-theme",s)},activateThemeOnAllInstances:e=>Xu.post("/activate-theme-on-all-instances",(e=>{const t=new FormData;return((e,t)=>{((e,t,n)=>{n.append("theme[name]",t.name),void 0!==t.version&&null!==t.version&&n.append("theme[version]",t.version),void 0!==t.isUploaded&&n.append("theme[isUploaded]",t.isUploaded),void 0!==t.ownerGuid&&null!==t.ownerGuid&&n.append("theme[ownerGuid]",t.ownerGuid)})(0,e,t)})(e,t),t})(e))},hd={getSetsList:()=>Xu.get("/list-sets"),addSet:e=>{const t=new FormData;return t.append("name",e),Xu.post("/add-set",t)},removeSets:e=>{const t=new FormData;return e.forEach((e=>t.append("setIds[]",`${e}`))),Xu.post("/remove-sets",t)},renameSet:(e,t)=>{const n=new FormData;return n.append("setId",`${e}`),n.append("newName",t),Xu.post("/rename-set",n)},setPluginActivationState:(e,t,n)=>{const s=new FormData;return s.append("setId",`${e}`),s.append("assetId",`${t}`),s.append("active",n?"1":"0"),s.append("assetType","plugin"),Xu.post("set-asset-activation-state",s)},setThemeActivationState:(e,t,n)=>{const s=new FormData;return s.append("setId",`${e}`),s.append("assetId",`${t}`),s.append("active",n?"1":"0"),s.append("assetType","theme"),Xu.post("set-asset-activation-state",s)},addPluginsToSet:(e,t)=>{const n=new FormData;return n.append("setId",`${e}`),t.forEach(((e,t)=>{e.id&&n.append(`plugins[${t}][id]`,`${e.id}`),e.name&&n.append(`plugins[${t}][name]`,e.name),e.title&&n.append(`plugins[${t}][title]`,e.title),n.append(`plugins[${t}][isUploaded]`,`${e.isUploaded}`)})),Xu.post("add-plugins-to-set",n)},addThemesToSet:(e,t)=>{const n=new FormData;return n.append("setId",`${e}`),t.forEach(((e,t)=>{e.id&&n.append(`themes[${t}][id]`,`${e.id}`),e.name&&n.append(`themes[${t}][name]`,e.name),e.title&&n.append(`themes[${t}][title]`,e.title),n.append(`themes[${t}][isUploaded]`,`${e.isUploaded}`)})),Xu.post("add-themes-to-set",n)},removeSet:e=>{const t=new FormData;return t.append("setId",`${e}`),Xu.post("/remove-set",t)},removePluginFromSet:(e,t)=>{const n=new FormData;return n.append("setId",`${e}`),n.append("pluginId",`${t}`),Xu.post("remove-plugin-from-set",n)},removeThemeFromSet:(e,t)=>{const n=new FormData;return n.append("setId",`${e}`),n.append("themeId",`${t}`),Xu.post("remove-theme-from-set",n)},removeAllPluginsFromSet:e=>{const t=new FormData;return t.append("setId",`${e}`),Xu.post("/remove-all-plugins-from-set",t)},removeAllThemesFromSet:e=>{const t=new FormData;return t.append("setId",`${e}`),Xu.post("/remove-all-themes-from-set",t)},installInto:(e,t)=>{const n=new FormData;return n.append("setId",`${e}`),t.forEach(((e,t)=>{n.append(`instanceIds[${t}]`,`${e}`)})),Xu.post("/install-set-into-instances",n)},searchPlugins:e=>{const t=new FormData;return t.append("term",e),Xu.post("/search-plugins-for-set",t)},searchThemes:e=>{const t=new FormData;return t.append("term",e),Xu.post("/search-themes-for-set",t)},getPluginDescription:e=>{const t=new FormData;return t.append("pluginId",`${e}`),Xu.post("/get-plugin-description",t)},getThemeDescription:e=>{const t=new FormData;return t.append("themeId",`${e}`),Xu.post("/get-theme-description",t)}},md={getTaskData:e=>{const t=new FormData;return t.append("id",`${e.id}`),t.append("code",e.code),Xu.post("/get-background-task-data",t)},getTasksData:e=>{const t=new FormData;return e.forEach(((e,n)=>{t.append(`tasks[${n}][id]`,`${e.id}`),t.append(`tasks[${n}][code]`,e.code)})),Xu.post("/get-background-tasks-data",t)},removeTask:e=>{const t=new FormData;return t.append("id",`${e.id}`),t.append("code",e.code),Xu.post("/remove-background-task",t)},removeTasks:e=>{const t=new FormData;return e.forEach(((e,n)=>{t.append(`tasks[${n}][id]`,`${e.id}`),t.append(`tasks[${n}][code]`,e.code)})),Xu.post("/remove-background-tasks",t)}},fd={getInstanceActionLogRecords:(e,t)=>{let n=`/get-instance-action-log-records/id/${e}/`;return null!==t&&(n=`${n}lastRecordHashSum/${t}/`),Xu.get(n)},onOpenActionLogBrowser:e=>Xu.post(`/on-open-action-log-browser/id/${e}`,{opened:!0}),onEnableRealTimeUpdates:e=>Xu.post(`/on-enable-real-time-updates/id/${e}`,{enabled:!0}),getInstanceActionLogRotationSettings:e=>Xu.get(`/get-instance-action-log-rotation-settings/id/${e}`),saveInstanceActionLogRotationSettings:(e,t)=>{const n=new FormData;return n.append("instanceId",`${e}`),n.append("enabled",`${t.enabled}`),n.append("rotateCount",`${t.rotateCount}`),n.append("size",`${t.size}`),n.append("timePeriod",`${t.timePeriod}`),n.append("type",`${t.type}`),n.append("compress",`${t.compress}`),Xu.post("/save-instance-action-log-rotation-settings",n)}},gd={verifyChecksums:e=>Xu.post(`/verify-checksums/id/${e}`,{verify:!0}),reinstallCore:e=>Xu.post(`/reinstall-core/id/${e}`,{reinstall:!0})},bd=nd,vd=sd,yd=cd,_d=pd,xd=hd,Sd={addServer:e=>Xu.post("/add-server",e),scanServers:e=>Xu.post("/scan-servers",e),detachServers:e=>Xu.post("/detach-servers",e),getServersList:()=>Xu.get("/get-servers-list"),getServer:e=>Xu.get(`/get-server/id/${e}`),acceptFingerprint:e=>Xu.get(`/accept-fingerprint/id/${e}`),disableBetaDialog:()=>Xu.get("/disable-remote-wpt-beta-dialog"),getInstancesLog:e=>Xu.get(`/get-instances-log/id/${e}`)},wd={check:()=>Xu.get("/check-session")},kd={load:()=>Xu.get("/get-global-settings"),update:e=>Xu.post("/update-global-settings",e)},jd={getSyncSettings:e=>Xu.get(`/get-sync-settings/id/${e}`),syncInstance:e=>Xu.post("/sync",e)},Td=md,Cd=fd,Dd=gd,Pd="https://example.com/api/modules/wp-toolkit".replace(/\/+$/,"");class Id extends Error{constructor(e,t){super(t),this.field=e,this.name="RequiredError"}}const Od="https://example.com",Ld=function(e,t,n){if(null==n)throw new Id(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},Md=function(e,t,n){return s=this,i=void 0,r=function*(){if(n&&n.apiKey){const s="function"==typeof n.apiKey?yield n.apiKey(t):yield n.apiKey;e[t]=s}},new((a=void 0)||(a=Promise))((function(e,t){function n(e){try{l(r.next(e))}catch(e){t(e)}}function o(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var s;t.done?e(t.value):(s=t.value,s instanceof a?s:new a((function(e){e(s)}))).then(n,o)}l((r=r.apply(s,i||[])).next())}));var s,i,a,r},Ad=function(e,t){t&&(t.username||t.password)&&(e.auth={username:t.username,password:t.password})},Ed=function(e,...t){const n=new URLSearchParams(e.search);for(const e of t)for(const t in e)if(Array.isArray(e[t])){n.delete(t);for(const s of e[t])n.append(t,s)}else n.set(t,e[t]);e.search=n.toString()},Ud=function(e,t,n){const s="string"!=typeof e;return(s&&n&&n.isJsonMime?n.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(void 0!==e?e:{}):e||""},Rd=function(e){return e.pathname+e.search+e.hash},Nd=function(e,t,n,s){return(i=t,a=n)=>{const r=Object.assign(Object.assign({},e.options),{url:((null==s?void 0:s.basePath)||a)+e.url});return i.request(r)}};var Fd,Yd,Bd,Hd,Vd,$d,Wd,zd,qd,Gd,Kd,Xd,Zd,Jd,Qd,ep,tp,np,sp,ip,ap,rp,op,lp,cp,up=function(e,t,n,s){return new(n||(n=Promise))((function(i,a){function r(e){try{l(s.next(e))}catch(e){a(e)}}function o(e){try{l(s.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,o)}l((s=s.apply(e,t||[])).next())}))};!function(e){e.Disabled="disabled",e.Minor="minor",e.Major="major"}(Fd||(Fd={})),function(e){e.Scheduling="scheduling",e.NotStarted="not_started",e.Started="started",e.Running="running",e.Canceled="canceled",e.Error="error",e.Done="done"}(Yd||(Yd={})),function(e){e.NotStarted="not_started",e.Started="started",e.Running="running",e.Canceled="canceled",e.Error="error",e.Done="done"}(Bd||(Bd={})),function(e){e.Update="update",e.Deactivate="deactivate"}(Hd||(Hd={})),function(e){e.LocalPleskLinux="localPleskLinux",e.LocalPleskWindows="localPleskWindows",e.LocalCpanel="localCpanel",e.RemoteCpanel="remoteCpanel",e.ManagedByPlugin="managedByPlugin",e.RemoteGeneric="remoteGeneric"}(Vd||(Vd={})),function(e){e.Disabled="disabled",e.Minor="minor",e.Major="major"}($d||($d={})),function(e){e.Disabled="disabled",e.Minor="minor",e.Major="major"}(Wd||(Wd={})),function(e){e.Disabled="disabled",e.Minor="minor",e.Major="major"}(zd||(zd={})),function(e){e.Public="public",e.Private="private"}(qd||(qd={})),function(e){e.Http="http",e.Https="https"}(Gd||(Gd={})),function(e){e.Unknown="unknown",e.Insecure="insecure",e.SecureRecommended="secureRecommended",e.SecureFull="secureFull"}(Kd||(Kd={})),function(e){e.Started="started",e.Success="success",e.Warning="warning",e.Failed="failed",e.NotExist="notExist"}(Xd||(Xd={})),function(e){e.Started="started",e.Success="success",e.Warning="warning",e.Failed="failed",e.NotExist="notExist"}(Zd||(Zd={})),function(e){e.FeatureDisabled="featureDisabled",e.DisabledForDomain="disabledForDomain",e.LimitReachedForDomain="limitReachedForDomain",e.LicenseAbsent="licenseAbsent",e.LicenseLimitReached="licenseLimitReached",e.WpToolkitDeluxeDisabled="wpToolkitDeluxeDisabled"}(Jd||(Jd={})),function(e){e.Active="active",e.Expired="expired",e.Suspended="suspended",e.Terminated="terminated"}(Qd||(Qd={})),function(e){e.Info="info",e.Success="success",e.Warning="warning",e.Danger="danger"}(ep||(ep={})),function(e){e.Unix="unix",e.Windows="windows"}(tp||(tp={})),function(e){e.X8664="x86_64",e.Aarch64="aarch64"}(np||(np={})),function(e){e.Started="started",e.Success="success",e.Warning="warning",e.Failed="failed",e.NotExist="notExist"}(sp||(sp={})),function(e){e.ActionLogFeature="actionLogFeature",e.CheckWordPressIntegrityFeature="checkWordPressIntegrityFeature",e.HotlinkProtectionFeature="hotlinkProtectionFeature",e.PluginsBlocklistFeature="pluginsBlocklistFeature",e.SmartPhpUpdateFeature="smartPhpUpdateFeature",e.VulnerabilityFeature="vulnerabilityFeature",e.WordpressPermalinkHandlingFeature="wordpressPermalinkHandlingFeature"}(ip||(ip={})),function(e){e.ActivateAfterUpdate="activateAfterUpdate"}(ap||(ap={})),function(e){e.Low="low",e.Medium="medium",e.High="high",e.Critical="critical"}(rp||(rp={})),function(e){e.SecurityMeasure="securityMeasure",e.VirtualPatch="virtualPatch",e.Update="update",e.DeactivateAsset="deactivateAsset"}(op||(op={})),function(e){e.Patchstack="patchstack",e.Wordfence="wordfence"}(lp||(lp={})),function(e){e.Changelog="changelog",e.Description="description",e.Faq="faq",e.Installation="installation"}(cp||(cp={}));const dp=function(e){const t=function(e){return{acceptSmartPhpUpdate:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("acceptSmartPhpUpdate","installationId",t);const i="/v1/installations/{installationId}/features/updates/php/result".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),activateVirtualPatchesSubscription:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("activateVirtualPatchesSubscription","installationId",t),Ld("activateVirtualPatchesSubscription","virtualPatchesActivatorRequest",n);const i="/v1/installations/{installationId}/features/virtual-patches/subscription/activator".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),addLicense:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("addLicense","licenseRequest",t);const s=new URL("/v1/license",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),addPluginsToSet:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("addPluginsToSet","setId",t),Ld("addPluginsToSet","pluginAssetDetails",n);const i="/v1/sets/{setId}/plugins".replace("{setId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),addThemesToSet:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("addThemesToSet","setId",t),Ld("addThemesToSet","themeAssetDetails",n);const i="/v1/sets/{setId}/themes".replace("{setId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),applySmartUpdate:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("applySmartUpdate","installationId",t);const i="/v1/installations/{installationId}/features/updates/smart/result".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),appyVirtualPatches:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("appyVirtualPatches","virtualPatchesApplyRequest",t);const s=new URL("/v1/agent/virtual-patches-applier",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),calculateVulnerabilityProtectionUsageStatistics:(t,n={})=>up(this,void 0,void 0,(function*(){const s=new URL("/v1/features/virtual-patches/statistics/calculator",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),cancelBackgroundTask:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("cancelBackgroundTask","taskId",t),Ld("cancelBackgroundTask","taskCode",n);const i="/v1/background-tasks/{taskCode}/{taskId}".replace("{taskId}",encodeURIComponent(String(t))).replace("{taskCode}",encodeURIComponent(String(n))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),{url:Rd(a),options:o}})),checkInstallationsVulnerability:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("checkInstallationsVulnerability","checkVulnerabilityRequest",t);const s=new URL("/v1/vulnerabilities-checker",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),checkSecurity:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("checkSecurity","securityMeasuresCheckSecurityRequest",t);const s=new URL("/v1/security-measures/checker",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),cleanInstallationCache:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("cleanInstallationCache","cacheCleanerRequest",t);const s=new URL("/v1/cache-cleaner",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),cloneInstallation:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("cloneInstallation","installationCloneRequest",t);const s=new URL("/v1/cloner",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),closeGlobalAlert:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("closeGlobalAlert","closeGlobalAlertRequest",t);const s=new URL("/v1/global-alerts",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"DELETE"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),createInstallation:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("createInstallation","installationRequest",t);const s=new URL("/v1/installations",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),createInstallationBackup:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("createInstallationBackup","backupCreatorRequest",t);const s=new URL("/v1/features/backups/creator",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),createInstallationWpUser:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("createInstallationWpUser","installationId",t),Ld("createInstallationWpUser","installationWpUserRequest",n);const i="/v1/installations/{installationId}/users".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),createMaintenancePreview:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("createMaintenancePreview","installationId",t),Ld("createMaintenancePreview","maintenancePreviewRequest",n);const i="/v1/installations/{installationId}/features/maintenance/preview".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),createSet:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("createSet","createSetRequest",t);const s=new URL("/v1/sets",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),deleteLicense:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("deleteLicense","licenseRequest",t);const s=new URL("/v1/license",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"DELETE"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),deleteSet:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("deleteSet","setId",t);const i="/v1/sets/{setId}".replace("{setId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),detachInstallations:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("detachInstallations","detachInstallationsRequest",t);const s=new URL("/v1/detacher",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),detachVirtualPatchesSubscription:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("detachVirtualPatchesSubscription","installationId",t),Ld("detachVirtualPatchesSubscription","basicConfirmationRequest",n);const i="/v1/installations/{installationId}/features/virtual-patches/subscription".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),disableVirtualPatches:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("disableVirtualPatches","virtualPatchesDisableRequest",t);const s=new URL("/v1/agent/virtual-patches-applier",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"DELETE"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),discardSmartPhpUpdate:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("discardSmartPhpUpdate","installationId",t);const i="/v1/installations/{installationId}/features/updates/php/result".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),discardSmartUpdate:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("discardSmartUpdate","installationId",t);const i="/v1/installations/{installationId}/features/updates/smart/result".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),featureVulnerabilityStatsUpdate:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("featureVulnerabilityStatsUpdate","buttonClicksStats",t);const s=new URL("/v1/features/vulnerability/stats",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),fetchAvailableAutoUpdateSettings:(t,n={})=>up(this,void 0,void 0,(function*(){const s=new URL("/v1/agent/installations-auto-update-settings-getter",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),fetchAvailableInstallationsAutoUpdateSettings:(t,n={})=>up(this,void 0,void 0,(function*(){const s=new URL("/v1/installations-auto-update-settings-getter",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),fetchAvailableUpdates:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){const r=new URL("/v1/updates-checker",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"GET"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),t&&(u["installationsIds[]"]=t),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),{url:Rd(r),options:l}})),fetchInstallationsVulnerabilityStatuses:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){const r=new URL("/v1/vulnerabilities-checker",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"GET"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),t&&(u["installationsIds[]"]=t),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),{url:Rd(r),options:l}})),fetchInstallationsVulnerabilityStatusesShort:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){const r=new URL("/v1/agent/vulnerabilities-checker",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"GET"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),t&&(u["installationsIds[]"]=t),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),{url:Rd(r),options:l}})),forgotPlatfromApiKey:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/agent/api-key",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"DELETE"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),getAutoUpdateSettings:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getAutoUpdateSettings","installationId",t);const s="/v1/installations/{installationId}/features/updates/settings".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getAvailablePhpHandlers:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getAvailablePhpHandlers","installationId",t);const s="/v1/installations/{installationId}/features/php/handlers".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getBackgroundTask:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("getBackgroundTask","taskId",t),Ld("getBackgroundTask","taskCode",n);const i="/v1/background-tasks/{taskCode}/{taskId}".replace("{taskId}",encodeURIComponent(String(t))).replace("{taskCode}",encodeURIComponent(String(n))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"GET"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),{url:Rd(a),options:o}})),getChangelogs:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/changelogs",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"GET"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),getCloneStub:(t,n,s,i,a,r,o,l={})=>up(this,void 0,void 0,(function*(){Ld("getCloneStub","installationId",t);const c="/v1/installations/{installationId}/features/clone/stub".replace("{installationId}",encodeURIComponent(String(t))),u=new URL(c,Od);let d;e&&(d=e.baseOptions);const p=Object.assign(Object.assign({method:"GET"},d),l),h={},m={};Ad(p,e),yield Md(h,"X-API-Key",e),void 0!==n&&(m["database[name]"]=n),void 0!==s&&(m["database[server]"]=s),void 0!==i&&(m["domain[existing]"]=i),void 0!==a&&(m["domain[newSubdomain][name]"]=a),void 0!==r&&(m["domain[newSubdomain][parentDomain]"]=r),void 0!==o&&(m.installationPath=o),Ed(u,m);let f=d&&d.headers?d.headers:{};return p.headers=Object.assign(Object.assign(Object.assign({},h),f),l.headers),{url:Rd(u),options:p}})),getHotlinkProtectionSettingsMeta:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getHotlinkProtectionSettingsMeta","installationId",t);const s="/v1/installations/{installationId}/features/hotlink-protection/settings/meta".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallation:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getInstallation","installationId",t);const s="/v1/installations/{installationId}".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallationBackupsInfo:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationBackupsInfo","installationId",t);const i="/v1/installations/{installationId}/backups".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"GET"},r),s),l={},c={};Ad(o,e),yield Md(l,"X-API-Key",e),n&&(c["files[]"]=n),Ed(a,c);let u=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),u),s.headers),{url:Rd(a),options:o}})),getInstallationBackupsMeta:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationBackupsMeta","installationId",t);const s="/v1/installations/{installationId}/backups/meta".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallationLabelsMeta:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationLabelsMeta","installationId",t);const s="/v1/installations/{installationId}/labels/meta".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallationPlugins:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationPlugins","installationId",t);const s="/v1/installations/{installationId}/plugins".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallationSecurityPolicies:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationSecurityPolicies","installationId",t);const s="/v1/installations/{installationId}/features/vulnerability/security-policies".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallationStub:(t,n,s={})=>up(this,void 0,void 0,(function*(){const i=new URL("/v1/installer/installation-stub",Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),s),o={},l={};Ad(r,e),yield Md(o,"X-API-Key",e),void 0!==t&&(l.domain=t),void 0!==n&&(l.version=n),Ed(i,l);let c=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),c),s.headers),{url:Rd(i),options:r}})),getInstallationThemes:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationThemes","installationId",t);const s="/v1/installations/{installationId}/themes".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallationWpUserStub:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationWpUserStub","installationId",t);const s="/v1/installations/{installationId}/users/stub".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getInstallations:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){const a=new URL("/v1/installations",Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"GET"},r),i),l={},c={};Ad(o,e),yield Md(l,"X-API-Key",e),t&&(c["installationsIds[]"]=t),void 0!==n&&(c.sortBy=n),void 0!==s&&(c.sortOrder=s),Ed(a,c);let u=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),u),i.headers),{url:Rd(a),options:o}})),getInstallationsPlugins:(t,n,s,i,a,r,o,l,c={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationsPlugins","installationId",t),Ld("getInstallationsPlugins","page",n),Ld("getInstallationsPlugins","pageSize",s);const u="/v1/installations/{installationId}/features/catalog/plugins".replace("{installationId}",encodeURIComponent(String(t))),d=new URL(u,Od);let p;e&&(p=e.baseOptions);const h=Object.assign(Object.assign({method:"GET"},p),c),m={},f={};Ad(h,e),yield Md(m,"X-API-Key",e),void 0!==i&&(f.compatible=i),void 0!==a&&(f.downloadCount=a),void 0!==r&&(f.lastUpdatedAt=r),void 0!==n&&(f.page=n),void 0!==s&&(f.pageSize=s),void 0!==o&&(f.rating=o),void 0!==l&&(f.term=l),Ed(d,f);let g=p&&p.headers?p.headers:{};return h.headers=Object.assign(Object.assign(Object.assign({},m),g),c.headers),{url:Rd(d),options:h}})),getInstallationsRemoveConfirmation:(t,n={})=>up(this,void 0,void 0,(function*(){const s=new URL("/v1/remover/confirmation",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"GET"},i),n),r={},o={};Ad(a,e),yield Md(r,"X-API-Key",e),t&&(o["installationsIds[]"]=t),Ed(s,o);let l=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),l),n.headers),{url:Rd(s),options:a}})),getInstallationsThemes:(t,n,s,i,a,r,o,l,c={})=>up(this,void 0,void 0,(function*(){Ld("getInstallationsThemes","installationId",t),Ld("getInstallationsThemes","page",n),Ld("getInstallationsThemes","pageSize",s);const u="/v1/installations/{installationId}/features/catalog/themes".replace("{installationId}",encodeURIComponent(String(t))),d=new URL(u,Od);let p;e&&(p=e.baseOptions);const h=Object.assign(Object.assign({method:"GET"},p),c),m={},f={};Ad(h,e),yield Md(m,"X-API-Key",e),void 0!==i&&(f.compatible=i),void 0!==a&&(f.downloadCount=a),void 0!==r&&(f.lastUpdatedAt=r),void 0!==n&&(f.page=n),void 0!==s&&(f.pageSize=s),void 0!==o&&(f.rating=o),void 0!==l&&(f.term=l),Ed(d,f);let g=p&&p.headers?p.headers:{};return h.headers=Object.assign(Object.assign(Object.assign({},m),g),c.headers),{url:Rd(d),options:h}})),getIntegrity:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getIntegrity","installationId",t);const s="/v1/installations/{installationId}/features/integrity".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getLicenseInfo:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/license-info",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"GET"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),getMaintenanceSettings:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getMaintenanceSettings","installationId",t);const s="/v1/installations/{installationId}/features/maintenance/settings".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getMaintenanceTemplateCustomizationUrl:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getMaintenanceTemplateCustomizationUrl","installationId",t);const s="/v1/installations/{installationId}/features/maintenance/template-customization-url".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getPasswordProtection:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getPasswordProtection","installationId",t);const s="/v1/installations/{installationId}/features/password-protection".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getRemoteAgentInstallationProperties:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getRemoteAgentInstallationProperties","installationId",t);const s="/v1/installations/{installationId}/features/remote-management/remote-agent/properties".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getRemoteServerInstallationProperties:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getRemoteServerInstallationProperties","installationId",t);const s="/v1/installations/{installationId}/features/remote-management/remote-server/properties".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getScannerLogs:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/agent/scanner/logs",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"GET"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),getSecurityMeasures:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/security-measures",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"GET"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),getSecurityMeasuresPerInstallations:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){const r=new URL("/v1/security-measures/checker",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"GET"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),t&&(u["installationsIds[]"]=t),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),{url:Rd(r),options:l}})),getServerInfo:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/server-info",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"GET"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),getSetDetails:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getSetDetails","setId",t);const s="/v1/sets/{setId}".replace("{setId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getSetsList:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/sets",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"GET"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),getSetupDrawerSettings:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getSetupDrawerSettings","installationId",t);const s="/v1/installations/{installationId}/account".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getSmartPhpUpdateResult:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getSmartPhpUpdateResult","installationId",t);const s="/v1/installations/{installationId}/features/updates/php/result".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getSmartPhpUpdateStub:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getSmartPhpUpdateStub","installationId",t);const s="/v1/installations/{installationId}/features/updates/php/stub".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getSmartUpdateResult:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getSmartUpdateResult","installationId",t);const s="/v1/installations/{installationId}/features/updates/smart/result".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getSpecification:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getSpecification","specificationType",t);const s="/v1/specification/{specificationType}".replace("{specificationType}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getTaskSchedule:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getTaskSchedule","scheduledTaskId",t);const s="/v1/scheduled-tasks/{scheduledTaskId}".replace("{scheduledTaskId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getVirtualPatchesSubscriptionGuid:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getVirtualPatchesSubscriptionGuid","installationId",t);const s="/v1/installations/{installationId}/features/virtual-patches/subscription/guid".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getVirtualPatchesSubscriptionInfo:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getVirtualPatchesSubscriptionInfo","installationId",t);const s="/v1/installations/{installationId}/features/virtual-patches/subscription".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getVirtualPatchesSubscriptionPurchaseUrl:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("getVirtualPatchesSubscriptionPurchaseUrl","installationId",t);const i="/v1/installations/{installationId}/features/virtual-patches/subscription".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),getWordPressDebugSettings:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getWordPressDebugSettings","installationId",t);const s="/v1/installations/{installationId}/features/debug/settings".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getWordPressDebugSettingsMeta:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getWordPressDebugSettingsMeta","installationId",t);const s="/v1/installations/{installationId}/features/debug/settings/meta".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getWpCredentials:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getWpCredentials","installationId",t);const s="/v1/installations/{installationId}/credentials".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),getWpCronTakeoverMeta:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("getWpCronTakeoverMeta","installationId",t);const s="/v1/installations/{installationId}/features/wp-cron-takeover/meta".replace("{installationId}",encodeURIComponent(String(t))),i=new URL(s,Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"GET"},a),n),o={};Ad(r,e),yield Md(o,"X-API-Key",e),Ed(i,{});let l=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),l),n.headers),{url:Rd(i),options:r}})),instalationsPluginsActivateDeactivate:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("instalationsPluginsActivateDeactivate","installationId",t),Ld("instalationsPluginsActivateDeactivate","slug",n),Ld("instalationsPluginsActivateDeactivate","statusRequest",s);const a="/v1/installations/{installationId}/plugins/{slug}/status".replace("{installationId}",encodeURIComponent(String(t))).replace("{slug}",encodeURIComponent(String(n))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"PUT"},o),i),c={};Ad(l,e),yield Md(c,"X-API-Key",e),c["Content-Type"]="application/json",Ed(r,{});let u=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),u),i.headers),l.data=Ud(s,l,e),{url:Rd(r),options:l}})),instalationsPluginsInfo:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("instalationsPluginsInfo","installationId",t),Ld("instalationsPluginsInfo","slug",n);const i="/v1/installations/{installationId}/features/catalog/plugins/{slug}".replace("{installationId}",encodeURIComponent(String(t))).replace("{slug}",encodeURIComponent(String(n))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"GET"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),{url:Rd(a),options:o}})),instalationsPluginsInstall:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("instalationsPluginsInstall","installationId",t),Ld("instalationsPluginsInstall","installationAssetInstallRequest",n);const i="/v1/installations/{installationId}/plugins".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),instalationsPluginsUninstall:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("instalationsPluginsUninstall","installationId",t),Ld("instalationsPluginsUninstall","requestBody",n);const i="/v1/installations/{installationId}/plugins".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),instalationsPluginsUploadAndInstall:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("instalationsPluginsUploadAndInstall","installationId",t),Ld("instalationsPluginsUploadAndInstall","file",n),Ld("instalationsPluginsUploadAndInstall","status",s);const a="/v1/installations/{installationId}/features/uploader/plugins".replace("{installationId}",encodeURIComponent(String(t))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),i),c={},u=new(e&&e.formDataCtor||FormData);Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&u.append("file",n),void 0!==s&&u.append("status",s),c["Content-Type"]="multipart/form-data",Ed(r,{});let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),i.headers),l.data=u,{url:Rd(r),options:l}})),instalationsThemesActivate:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("instalationsThemesActivate","installationId",t),Ld("instalationsThemesActivate","slug",n),Ld("instalationsThemesActivate","statusRequest",s);const a="/v1/installations/{installationId}/themes/{slug}/status".replace("{installationId}",encodeURIComponent(String(t))).replace("{slug}",encodeURIComponent(String(n))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"PUT"},o),i),c={};Ad(l,e),yield Md(c,"X-API-Key",e),c["Content-Type"]="application/json",Ed(r,{});let u=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),u),i.headers),l.data=Ud(s,l,e),{url:Rd(r),options:l}})),instalationsThemesInstall:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("instalationsThemesInstall","installationId",t),Ld("instalationsThemesInstall","installationAssetInstallRequest",n);const i="/v1/installations/{installationId}/themes".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),instalationsThemesUninstall:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("instalationsThemesUninstall","installationId",t),Ld("instalationsThemesUninstall","requestBody",n);const i="/v1/installations/{installationId}/themes".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),instalationsThemesUploadAndInstall:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("instalationsThemesUploadAndInstall","installationId",t),Ld("instalationsThemesUploadAndInstall","file",n),Ld("instalationsThemesUploadAndInstall","status",s);const a="/v1/installations/{installationId}/features/uploader/themes".replace("{installationId}",encodeURIComponent(String(t))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),i),c={},u=new(e&&e.formDataCtor||FormData);Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&u.append("file",n),void 0!==s&&u.append("status",s),c["Content-Type"]="multipart/form-data",Ed(r,{});let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),i.headers),l.data=u,{url:Rd(r),options:l}})),installSet:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("installSet","installSetRequest",t);const s=new URL("/v1/sets-installer",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),launchUpdate:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){Ld("launchUpdate","launchInstallationUpdate",t);const r=new URL("/v1/updater",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),c["Content-Type"]="application/json",Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),l.data=Ud(t,l,e),{url:Rd(r),options:l}})),loginInstallation:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("loginInstallation","installationId",t);const a="/v1/installations/{installationId}/login".replace("{installationId}",encodeURIComponent(String(t))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),i),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&(u.login=n),c["Content-Type"]="application/json",Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),i.headers),l.data=Ud(s,l,e),{url:Rd(r),options:l}})),massUpdateInstallationsAutoUpdatesSettings:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){Ld("massUpdateInstallationsAutoUpdatesSettings","installationsAutoUpdateListItemRequest",t);const r=new URL("/v2/features/updates/mass-settings",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),c["Content-Type"]="application/json",Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),l.data=Ud(t,l,e),{url:Rd(r),options:l}})),mitigateVulnerabilities:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("mitigateVulnerabilities","vulnerabilitiesMitigation",t);const s=new URL("/v1/features/vulnerability/mitigator",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),receiveHelloFromAgent:(t={})=>up(this,void 0,void 0,(function*(){const n=new URL("/v1/agent/hello",Od);let s;e&&(s=e.baseOptions);const i=Object.assign(Object.assign({method:"GET"},s),t),a={};Ad(i,e),yield Md(a,"X-API-Key",e),Ed(n,{});let r=s&&s.headers?s.headers:{};return i.headers=Object.assign(Object.assign(Object.assign({},a),r),t.headers),{url:Rd(n),options:i}})),refreshAvailableUpdates:(t,n={})=>up(this,void 0,void 0,(function*(){const s=new URL("/v1/updates-checker",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),removeInstallationBackups:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("removeInstallationBackups","installationId",t),Ld("removeInstallationBackups","files",n);const a="/v1/installations/{installationId}/backups".replace("{installationId}",encodeURIComponent(String(t))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"DELETE"},o),i),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),n&&(u["files[]"]=n),c["Content-Type"]="application/json",Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),i.headers),l.data=Ud(s,l,e),{url:Rd(r),options:l}})),removePluginFromSet:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("removePluginFromSet","setId",t),Ld("removePluginFromSet","pluginSlug",n);const a="/v1/sets/{setId}/plugins/{pluginSlug}".replace("{setId}",encodeURIComponent(String(t))).replace("{pluginSlug}",encodeURIComponent(String(n))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"DELETE"},o),i),c={};Ad(l,e),yield Md(c,"X-API-Key",e),c["Content-Type"]="application/json",Ed(r,{});let u=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),u),i.headers),l.data=Ud(s,l,e),{url:Rd(r),options:l}})),removeThemeFromSet:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("removeThemeFromSet","setId",t),Ld("removeThemeFromSet","themeSlug",n);const a="/v1/sets/{setId}/themes/{themeSlug}".replace("{setId}",encodeURIComponent(String(t))).replace("{themeSlug}",encodeURIComponent(String(n))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"DELETE"},o),i),c={};Ad(l,e),yield Md(c,"X-API-Key",e),c["Content-Type"]="application/json",Ed(r,{});let u=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),u),i.headers),l.data=Ud(s,l,e),{url:Rd(r),options:l}})),resetHotlinkProtectionSettings:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("resetHotlinkProtectionSettings","installationId",t);const i="/v1/installations/{installationId}/features/hotlink-protection/settings".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),resolveSecurityMeasures:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("resolveSecurityMeasures","securityMeasuresResolveRequest",t);const s=new URL("/v1/security-measures/resolver",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),restoreInstallationBackup:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("restoreInstallationBackup","backupRestorerRequest",t);const s=new URL("/v1/features/backups/restorer",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),restoreMaintenanceTemplate:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("restoreMaintenanceTemplate","installationId",t);const i="/v1/installations/{installationId}/features/maintenance/template".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"DELETE"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),revertSecurityMeasures:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("revertSecurityMeasures","securityMeasuresRevertRequest",t);const s=new URL("/v1/security-measures/reverter",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),runSmartPhpUpdate:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("runSmartPhpUpdate","runSmartPhpUpdateRequest",t);const s=new URL("/v1/smart-php-updater",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),scanInstallations:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("scanInstallations","basicConfirmationRequest",t);const s=new URL("/v1/scanner",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),setPluginsToSet:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("setPluginsToSet","setId",t),Ld("setPluginsToSet","pluginAssetDetails",n);const i="/v1/sets/{setId}/plugins".replace("{setId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),setTaskSchedule:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("setTaskSchedule","scheduledTaskId",t),Ld("setTaskSchedule","scheduledTimeApplyRequest",n);const i="/v1/scheduled-tasks/{scheduledTaskId}".replace("{scheduledTaskId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),setThemesToSet:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("setThemesToSet","setId",t),Ld("setThemesToSet","themeAssetDetails",n);const i="/v1/sets/{setId}/themes".replace("{setId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),statsHireDeveloperTransition:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("statsHireDeveloperTransition","transitionStats",t);const s=new URL("/v1/stats/hire-developer-transition",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),upVoteForFeature:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("upVoteForFeature","upVoteForFeatureRequest",t);const s=new URL("/v1/features/up-votes",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),updateAutoUpdateSettings:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateAutoUpdateSettings","installationId",t),Ld("updateAutoUpdateSettings","installationAutoUpdateRequest",n);const i="/v1/installations/{installationId}/features/updates/settings".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateHotlinkProtectionSettings:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateHotlinkProtectionSettings","installationId",t),Ld("updateHotlinkProtectionSettings","hotlinkProtectionSettingsRequest",n);const i="/v1/installations/{installationId}/features/hotlink-protection/settings".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateHotlinkProtectionStatus:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateHotlinkProtectionStatus","installationId",t),Ld("updateHotlinkProtectionStatus","hotlinkProtectionStatusRequest",n);const i="/v1/installations/{installationId}/features/hotlink-protection/status".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateIndexingStatus:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateIndexingStatus","installationId",t),Ld("updateIndexingStatus","statusRequest",n);const i="/v1/installations/{installationId}/features/indexing/status".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateInstallationLabels:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateInstallationLabels","installationId",t),Ld("updateInstallationLabels","installationLabel",n);const i="/v1/installations/{installationId}/labels".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateInstallationSecurityPolicies:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateInstallationSecurityPolicies","installationId",t),Ld("updateInstallationSecurityPolicies","installationSecurityPoliciesUpdateRequest",n);const i="/v1/installations/{installationId}/features/vulnerability/security-policies".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateInstallationsAutoUpdatesSettings:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){Ld("updateInstallationsAutoUpdatesSettings","installationsAutoUpdateRequest",t);const r=new URL("/v1/features/updates/settings",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),c["Content-Type"]="application/json",Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),l.data=Ud(t,l,e),{url:Rd(r),options:l}})),updateInstallationsAutoUpdatesSettingsV2:(t,n,s,i,a={})=>up(this,void 0,void 0,(function*(){Ld("updateInstallationsAutoUpdatesSettingsV2","installationsAutoUpdateRequest",t);const r=new URL("/v2/features/updates/settings",Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),a),c={},u={};Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&(u.skipBrokenInstallations=n),void 0!==s&&(u.skipInfectedInstallations=s),void 0!==i&&(u.skipUnsupportedInstallations=i),c["Content-Type"]="application/json",Ed(r,u);let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),a.headers),l.data=Ud(t,l,e),{url:Rd(r),options:l}})),updateInstallationsPlugins:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateInstallationsPlugins","installationId",t),Ld("updateInstallationsPlugins","installationAssetUpdateRequest",n);const i="/v1/installations/{installationId}/plugins".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateInstallationsThemes:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateInstallationsThemes","installationId",t),Ld("updateInstallationsThemes","installationAssetUpdateRequest",n);const i="/v1/installations/{installationId}/themes".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateLicenseInfo:(t,n={})=>up(this,void 0,void 0,(function*(){const s=new URL("/v1/license-info/updater",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}})),updateMaintenanceSettings:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateMaintenanceSettings","installationId",t),Ld("updateMaintenanceSettings","maintenanceSettingsRequest",n);const i="/v1/installations/{installationId}/features/maintenance/settings".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateMaintenanceStatus:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateMaintenanceStatus","installationId",t),Ld("updateMaintenanceStatus","statusRequest",n);const i="/v1/installations/{installationId}/features/maintenance/status".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateNginxCachingStatus:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateNginxCachingStatus","installationId",t),Ld("updateNginxCachingStatus","statusRequest",n);const i="/v1/installations/{installationId}/features/nginx-caching/status".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updatePasswordProtection:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updatePasswordProtection","installationId",t),Ld("updatePasswordProtection","passwordProtectionRequest",n);const i="/v1/installations/{installationId}/features/password-protection".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateSet:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateSet","setId",t),Ld("updateSet","updateSetRequest",n);const i="/v1/sets/{setId}".replace("{setId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateSetupDrawerSettings:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateSetupDrawerSettings","installationId",t),Ld("updateSetupDrawerSettings","setupDrawerSettingsRequest",n);const i="/v1/installations/{installationId}/account".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateSmartUpdatesStatus:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateSmartUpdatesStatus","installationId",t),Ld("updateSmartUpdatesStatus","statusRequest",n);const i="/v1/installations/{installationId}/features/updates/smart/status".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateVirtualPatchesProtectionStatus:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateVirtualPatchesProtectionStatus","virtualPatchesProtectorRequest",t);const i=new URL("/v1/features/virtual-patches/protector",Od);let a;e&&(a=e.baseOptions);const r=Object.assign(Object.assign({method:"POST"},a),s),o={},l={};Ad(r,e),yield Md(o,"X-API-Key",e),void 0!==n&&(l["dry-run"]=n),o["Content-Type"]="application/json",Ed(i,l);let c=a&&a.headers?a.headers:{};return r.headers=Object.assign(Object.assign(Object.assign({},o),c),s.headers),r.data=Ud(t,r,e),{url:Rd(i),options:r}})),updateVulnerabilityFiltering:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateVulnerabilityFiltering","installationId",t),Ld("updateVulnerabilityFiltering","vulnerabilityFilteringRequest",n);const i="/v1/installations/{installationId}/features/vulnerability/filtering".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateWordPressDebugSettings:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateWordPressDebugSettings","installationId",t),Ld("updateWordPressDebugSettings","wordPressDebugSettingsRequest",n);const i="/v1/installations/{installationId}/features/debug/settings".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateWordPressDebugStatus:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateWordPressDebugStatus","installationId",t),Ld("updateWordPressDebugStatus","wordPressDebugStatusRequest",n);const i="/v1/installations/{installationId}/features/debug/status".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PUT"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),updateWpCronTakeover:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("updateWpCronTakeover","installationId",t),Ld("updateWpCronTakeover","wpCronTakeoverInstanceRequest",n);const i="/v1/installations/{installationId}/features/wp-cron-takeover".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"PATCH"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),uploadPluginToSet:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("uploadPluginToSet","setId",t),Ld("uploadPluginToSet","file",n),Ld("uploadPluginToSet","status",s);const a="/v1/sets/{setId}/features/uploader/plugins".replace("{setId}",encodeURIComponent(String(t))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),i),c={},u=new(e&&e.formDataCtor||FormData);Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&u.append("file",n),void 0!==s&&u.append("status",s),c["Content-Type"]="multipart/form-data",Ed(r,{});let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),i.headers),l.data=u,{url:Rd(r),options:l}})),uploadThemeToSet:(t,n,s,i={})=>up(this,void 0,void 0,(function*(){Ld("uploadThemeToSet","setId",t),Ld("uploadThemeToSet","file",n),Ld("uploadThemeToSet","status",s);const a="/v1/sets/{setId}/features/uploader/themes".replace("{setId}",encodeURIComponent(String(t))),r=new URL(a,Od);let o;e&&(o=e.baseOptions);const l=Object.assign(Object.assign({method:"POST"},o),i),c={},u=new(e&&e.formDataCtor||FormData);Ad(l,e),yield Md(c,"X-API-Key",e),void 0!==n&&u.append("file",n),void 0!==s&&u.append("status",s),c["Content-Type"]="multipart/form-data",Ed(r,{});let d=o&&o.headers?o.headers:{};return l.headers=Object.assign(Object.assign(Object.assign({},c),d),i.headers),l.data=u,{url:Rd(r),options:l}})),validateClonePath:(t,n,s={})=>up(this,void 0,void 0,(function*(){Ld("validateClonePath","installationId",t),Ld("validateClonePath","clonePathValidatorRequest",n);const i="/v1/installations/{installationId}/features/clone/path-validator".replace("{installationId}",encodeURIComponent(String(t))),a=new URL(i,Od);let r;e&&(r=e.baseOptions);const o=Object.assign(Object.assign({method:"POST"},r),s),l={};Ad(o,e),yield Md(l,"X-API-Key",e),l["Content-Type"]="application/json",Ed(a,{});let c=r&&r.headers?r.headers:{};return o.headers=Object.assign(Object.assign(Object.assign({},l),c),s.headers),o.data=Ud(n,o,e),{url:Rd(a),options:o}})),validateInstallationPath:(t,n={})=>up(this,void 0,void 0,(function*(){Ld("validateInstallationPath","installationPathValidatorRequest",t);const s=new URL("/v1/installer/path-validator",Od);let i;e&&(i=e.baseOptions);const a=Object.assign(Object.assign({method:"POST"},i),n),r={};Ad(a,e),yield Md(r,"X-API-Key",e),r["Content-Type"]="application/json",Ed(s,{});let o=i&&i.headers?i.headers:{};return a.headers=Object.assign(Object.assign(Object.assign({},r),o),n.headers),a.data=Ud(t,a,e),{url:Rd(s),options:a}}))}}(e);return{acceptSmartPhpUpdate(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.acceptSmartPhpUpdate(n,s,i);return Nd(a,Nu(),Pd,e)}))},activateVirtualPatchesSubscription(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.activateVirtualPatchesSubscription(n,s,i);return Nd(a,Nu(),Pd,e)}))},addLicense(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.addLicense(n,s);return Nd(i,Nu(),Pd,e)}))},addPluginsToSet(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.addPluginsToSet(n,s,i);return Nd(a,Nu(),Pd,e)}))},addThemesToSet(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.addThemesToSet(n,s,i);return Nd(a,Nu(),Pd,e)}))},applySmartUpdate(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.applySmartUpdate(n,s,i);return Nd(a,Nu(),Pd,e)}))},appyVirtualPatches(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.appyVirtualPatches(n,s);return Nd(i,Nu(),Pd,e)}))},calculateVulnerabilityProtectionUsageStatistics(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.calculateVulnerabilityProtectionUsageStatistics(n,s);return Nd(i,Nu(),Pd,e)}))},cancelBackgroundTask(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.cancelBackgroundTask(n,s,i);return Nd(a,Nu(),Pd,e)}))},checkInstallationsVulnerability(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.checkInstallationsVulnerability(n,s);return Nd(i,Nu(),Pd,e)}))},checkSecurity(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.checkSecurity(n,s);return Nd(i,Nu(),Pd,e)}))},cleanInstallationCache(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.cleanInstallationCache(n,s);return Nd(i,Nu(),Pd,e)}))},cloneInstallation(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.cloneInstallation(n,s);return Nd(i,Nu(),Pd,e)}))},closeGlobalAlert(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.closeGlobalAlert(n,s);return Nd(i,Nu(),Pd,e)}))},createInstallation(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.createInstallation(n,s);return Nd(i,Nu(),Pd,e)}))},createInstallationBackup(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.createInstallationBackup(n,s);return Nd(i,Nu(),Pd,e)}))},createInstallationWpUser(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.createInstallationWpUser(n,s,i);return Nd(a,Nu(),Pd,e)}))},createMaintenancePreview(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.createMaintenancePreview(n,s,i);return Nd(a,Nu(),Pd,e)}))},createSet(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.createSet(n,s);return Nd(i,Nu(),Pd,e)}))},deleteLicense(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.deleteLicense(n,s);return Nd(i,Nu(),Pd,e)}))},deleteSet(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.deleteSet(n,s,i);return Nd(a,Nu(),Pd,e)}))},detachInstallations(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.detachInstallations(n,s);return Nd(i,Nu(),Pd,e)}))},detachVirtualPatchesSubscription(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.detachVirtualPatchesSubscription(n,s,i);return Nd(a,Nu(),Pd,e)}))},disableVirtualPatches(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.disableVirtualPatches(n,s);return Nd(i,Nu(),Pd,e)}))},discardSmartPhpUpdate(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.discardSmartPhpUpdate(n,s,i);return Nd(a,Nu(),Pd,e)}))},discardSmartUpdate(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.discardSmartUpdate(n,s,i);return Nd(a,Nu(),Pd,e)}))},featureVulnerabilityStatsUpdate(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.featureVulnerabilityStatsUpdate(n,s);return Nd(i,Nu(),Pd,e)}))},fetchAvailableAutoUpdateSettings(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.fetchAvailableAutoUpdateSettings(n,s);return Nd(i,Nu(),Pd,e)}))},fetchAvailableInstallationsAutoUpdateSettings(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.fetchAvailableInstallationsAutoUpdateSettings(n,s);return Nd(i,Nu(),Pd,e)}))},fetchAvailableUpdates(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.fetchAvailableUpdates(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},fetchInstallationsVulnerabilityStatuses(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.fetchInstallationsVulnerabilityStatuses(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},fetchInstallationsVulnerabilityStatusesShort(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.fetchInstallationsVulnerabilityStatusesShort(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},forgotPlatfromApiKey(n){return up(this,void 0,void 0,(function*(){const s=yield t.forgotPlatfromApiKey(n);return Nd(s,Nu(),Pd,e)}))},getAutoUpdateSettings(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getAutoUpdateSettings(n,s);return Nd(i,Nu(),Pd,e)}))},getAvailablePhpHandlers(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getAvailablePhpHandlers(n,s);return Nd(i,Nu(),Pd,e)}))},getBackgroundTask(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.getBackgroundTask(n,s,i);return Nd(a,Nu(),Pd,e)}))},getChangelogs(n){return up(this,void 0,void 0,(function*(){const s=yield t.getChangelogs(n);return Nd(s,Nu(),Pd,e)}))},getCloneStub(n,s,i,a,r,o,l,c){return up(this,void 0,void 0,(function*(){const u=yield t.getCloneStub(n,s,i,a,r,o,l,c);return Nd(u,Nu(),Pd,e)}))},getHotlinkProtectionSettingsMeta(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getHotlinkProtectionSettingsMeta(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallation(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallation(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallationBackupsInfo(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.getInstallationBackupsInfo(n,s,i);return Nd(a,Nu(),Pd,e)}))},getInstallationBackupsMeta(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallationBackupsMeta(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallationLabelsMeta(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallationLabelsMeta(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallationPlugins(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallationPlugins(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallationSecurityPolicies(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallationSecurityPolicies(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallationStub(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.getInstallationStub(n,s,i);return Nd(a,Nu(),Pd,e)}))},getInstallationThemes(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallationThemes(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallationWpUserStub(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallationWpUserStub(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallations(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.getInstallations(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},getInstallationsPlugins(n,s,i,a,r,o,l,c,u){return up(this,void 0,void 0,(function*(){const d=yield t.getInstallationsPlugins(n,s,i,a,r,o,l,c,u);return Nd(d,Nu(),Pd,e)}))},getInstallationsRemoveConfirmation(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getInstallationsRemoveConfirmation(n,s);return Nd(i,Nu(),Pd,e)}))},getInstallationsThemes(n,s,i,a,r,o,l,c,u){return up(this,void 0,void 0,(function*(){const d=yield t.getInstallationsThemes(n,s,i,a,r,o,l,c,u);return Nd(d,Nu(),Pd,e)}))},getIntegrity(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getIntegrity(n,s);return Nd(i,Nu(),Pd,e)}))},getLicenseInfo(n){return up(this,void 0,void 0,(function*(){const s=yield t.getLicenseInfo(n);return Nd(s,Nu(),Pd,e)}))},getMaintenanceSettings(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getMaintenanceSettings(n,s);return Nd(i,Nu(),Pd,e)}))},getMaintenanceTemplateCustomizationUrl(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getMaintenanceTemplateCustomizationUrl(n,s);return Nd(i,Nu(),Pd,e)}))},getPasswordProtection(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getPasswordProtection(n,s);return Nd(i,Nu(),Pd,e)}))},getRemoteAgentInstallationProperties(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getRemoteAgentInstallationProperties(n,s);return Nd(i,Nu(),Pd,e)}))},getRemoteServerInstallationProperties(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getRemoteServerInstallationProperties(n,s);return Nd(i,Nu(),Pd,e)}))},getScannerLogs(n){return up(this,void 0,void 0,(function*(){const s=yield t.getScannerLogs(n);return Nd(s,Nu(),Pd,e)}))},getSecurityMeasures(n){return up(this,void 0,void 0,(function*(){const s=yield t.getSecurityMeasures(n);return Nd(s,Nu(),Pd,e)}))},getSecurityMeasuresPerInstallations(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.getSecurityMeasuresPerInstallations(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},getServerInfo(n){return up(this,void 0,void 0,(function*(){const s=yield t.getServerInfo(n);return Nd(s,Nu(),Pd,e)}))},getSetDetails(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getSetDetails(n,s);return Nd(i,Nu(),Pd,e)}))},getSetsList(n){return up(this,void 0,void 0,(function*(){const s=yield t.getSetsList(n);return Nd(s,Nu(),Pd,e)}))},getSetupDrawerSettings(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getSetupDrawerSettings(n,s);return Nd(i,Nu(),Pd,e)}))},getSmartPhpUpdateResult(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getSmartPhpUpdateResult(n,s);return Nd(i,Nu(),Pd,e)}))},getSmartPhpUpdateStub(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getSmartPhpUpdateStub(n,s);return Nd(i,Nu(),Pd,e)}))},getSmartUpdateResult(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getSmartUpdateResult(n,s);return Nd(i,Nu(),Pd,e)}))},getSpecification(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getSpecification(n,s);return Nd(i,Nu(),Pd,e)}))},getTaskSchedule(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getTaskSchedule(n,s);return Nd(i,Nu(),Pd,e)}))},getVirtualPatchesSubscriptionGuid(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getVirtualPatchesSubscriptionGuid(n,s);return Nd(i,Nu(),Pd,e)}))},getVirtualPatchesSubscriptionInfo(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getVirtualPatchesSubscriptionInfo(n,s);return Nd(i,Nu(),Pd,e)}))},getVirtualPatchesSubscriptionPurchaseUrl(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.getVirtualPatchesSubscriptionPurchaseUrl(n,s,i);return Nd(a,Nu(),Pd,e)}))},getWordPressDebugSettings(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getWordPressDebugSettings(n,s);return Nd(i,Nu(),Pd,e)}))},getWordPressDebugSettingsMeta(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getWordPressDebugSettingsMeta(n,s);return Nd(i,Nu(),Pd,e)}))},getWpCredentials(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getWpCredentials(n,s);return Nd(i,Nu(),Pd,e)}))},getWpCronTakeoverMeta(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.getWpCronTakeoverMeta(n,s);return Nd(i,Nu(),Pd,e)}))},instalationsPluginsActivateDeactivate(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.instalationsPluginsActivateDeactivate(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},instalationsPluginsInfo(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.instalationsPluginsInfo(n,s,i);return Nd(a,Nu(),Pd,e)}))},instalationsPluginsInstall(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.instalationsPluginsInstall(n,s,i);return Nd(a,Nu(),Pd,e)}))},instalationsPluginsUninstall(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.instalationsPluginsUninstall(n,s,i);return Nd(a,Nu(),Pd,e)}))},instalationsPluginsUploadAndInstall(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.instalationsPluginsUploadAndInstall(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},instalationsThemesActivate(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.instalationsThemesActivate(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},instalationsThemesInstall(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.instalationsThemesInstall(n,s,i);return Nd(a,Nu(),Pd,e)}))},instalationsThemesUninstall(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.instalationsThemesUninstall(n,s,i);return Nd(a,Nu(),Pd,e)}))},instalationsThemesUploadAndInstall(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.instalationsThemesUploadAndInstall(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},installSet(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.installSet(n,s);return Nd(i,Nu(),Pd,e)}))},launchUpdate(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.launchUpdate(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},loginInstallation(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.loginInstallation(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},massUpdateInstallationsAutoUpdatesSettings(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.massUpdateInstallationsAutoUpdatesSettings(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},mitigateVulnerabilities(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.mitigateVulnerabilities(n,s);return Nd(i,Nu(),Pd,e)}))},receiveHelloFromAgent(n){return up(this,void 0,void 0,(function*(){const s=yield t.receiveHelloFromAgent(n);return Nd(s,Nu(),Pd,e)}))},refreshAvailableUpdates(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.refreshAvailableUpdates(n,s);return Nd(i,Nu(),Pd,e)}))},removeInstallationBackups(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.removeInstallationBackups(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},removePluginFromSet(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.removePluginFromSet(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},removeThemeFromSet(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.removeThemeFromSet(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},resetHotlinkProtectionSettings(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.resetHotlinkProtectionSettings(n,s,i);return Nd(a,Nu(),Pd,e)}))},resolveSecurityMeasures(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.resolveSecurityMeasures(n,s);return Nd(i,Nu(),Pd,e)}))},restoreInstallationBackup(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.restoreInstallationBackup(n,s);return Nd(i,Nu(),Pd,e)}))},restoreMaintenanceTemplate(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.restoreMaintenanceTemplate(n,s,i);return Nd(a,Nu(),Pd,e)}))},revertSecurityMeasures(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.revertSecurityMeasures(n,s);return Nd(i,Nu(),Pd,e)}))},runSmartPhpUpdate(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.runSmartPhpUpdate(n,s);return Nd(i,Nu(),Pd,e)}))},scanInstallations(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.scanInstallations(n,s);return Nd(i,Nu(),Pd,e)}))},setPluginsToSet(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.setPluginsToSet(n,s,i);return Nd(a,Nu(),Pd,e)}))},setTaskSchedule(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.setTaskSchedule(n,s,i);return Nd(a,Nu(),Pd,e)}))},setThemesToSet(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.setThemesToSet(n,s,i);return Nd(a,Nu(),Pd,e)}))},statsHireDeveloperTransition(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.statsHireDeveloperTransition(n,s);return Nd(i,Nu(),Pd,e)}))},upVoteForFeature(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.upVoteForFeature(n,s);return Nd(i,Nu(),Pd,e)}))},updateAutoUpdateSettings(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateAutoUpdateSettings(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateHotlinkProtectionSettings(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateHotlinkProtectionSettings(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateHotlinkProtectionStatus(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateHotlinkProtectionStatus(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateIndexingStatus(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateIndexingStatus(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateInstallationLabels(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateInstallationLabels(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateInstallationSecurityPolicies(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateInstallationSecurityPolicies(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateInstallationsAutoUpdatesSettings(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.updateInstallationsAutoUpdatesSettings(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},updateInstallationsAutoUpdatesSettingsV2(n,s,i,a,r){return up(this,void 0,void 0,(function*(){const o=yield t.updateInstallationsAutoUpdatesSettingsV2(n,s,i,a,r);return Nd(o,Nu(),Pd,e)}))},updateInstallationsPlugins(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateInstallationsPlugins(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateInstallationsThemes(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateInstallationsThemes(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateLicenseInfo(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.updateLicenseInfo(n,s);return Nd(i,Nu(),Pd,e)}))},updateMaintenanceSettings(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateMaintenanceSettings(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateMaintenanceStatus(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateMaintenanceStatus(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateNginxCachingStatus(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateNginxCachingStatus(n,s,i);return Nd(a,Nu(),Pd,e)}))},updatePasswordProtection(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updatePasswordProtection(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateSet(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateSet(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateSetupDrawerSettings(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateSetupDrawerSettings(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateSmartUpdatesStatus(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateSmartUpdatesStatus(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateVirtualPatchesProtectionStatus(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateVirtualPatchesProtectionStatus(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateVulnerabilityFiltering(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateVulnerabilityFiltering(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateWordPressDebugSettings(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateWordPressDebugSettings(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateWordPressDebugStatus(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateWordPressDebugStatus(n,s,i);return Nd(a,Nu(),Pd,e)}))},updateWpCronTakeover(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.updateWpCronTakeover(n,s,i);return Nd(a,Nu(),Pd,e)}))},uploadPluginToSet(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.uploadPluginToSet(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},uploadThemeToSet(n,s,i,a){return up(this,void 0,void 0,(function*(){const r=yield t.uploadThemeToSet(n,s,i,a);return Nd(r,Nu(),Pd,e)}))},validateClonePath(n,s,i){return up(this,void 0,void 0,(function*(){const a=yield t.validateClonePath(n,s,i);return Nd(a,Nu(),Pd,e)}))},validateInstallationPath(n,s){return up(this,void 0,void 0,(function*(){const i=yield t.validateInstallationPath(n,s);return Nd(i,Nu(),Pd,e)}))}}};class pp extends class{constructor(e,t=Pd,n=Nu()){this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath||this.basePath)}}{acceptSmartPhpUpdate(e,t,n){return dp(this.configuration).acceptSmartPhpUpdate(e,t,n).then((e=>e(this.axios,this.basePath)))}activateVirtualPatchesSubscription(e,t,n){return dp(this.configuration).activateVirtualPatchesSubscription(e,t,n).then((e=>e(this.axios,this.basePath)))}addLicense(e,t){return dp(this.configuration).addLicense(e,t).then((e=>e(this.axios,this.basePath)))}addPluginsToSet(e,t,n){return dp(this.configuration).addPluginsToSet(e,t,n).then((e=>e(this.axios,this.basePath)))}addThemesToSet(e,t,n){return dp(this.configuration).addThemesToSet(e,t,n).then((e=>e(this.axios,this.basePath)))}applySmartUpdate(e,t,n){return dp(this.configuration).applySmartUpdate(e,t,n).then((e=>e(this.axios,this.basePath)))}appyVirtualPatches(e,t){return dp(this.configuration).appyVirtualPatches(e,t).then((e=>e(this.axios,this.basePath)))}calculateVulnerabilityProtectionUsageStatistics(e,t){return dp(this.configuration).calculateVulnerabilityProtectionUsageStatistics(e,t).then((e=>e(this.axios,this.basePath)))}cancelBackgroundTask(e,t,n){return dp(this.configuration).cancelBackgroundTask(e,t,n).then((e=>e(this.axios,this.basePath)))}checkInstallationsVulnerability(e,t){return dp(this.configuration).checkInstallationsVulnerability(e,t).then((e=>e(this.axios,this.basePath)))}checkSecurity(e,t){return dp(this.configuration).checkSecurity(e,t).then((e=>e(this.axios,this.basePath)))}cleanInstallationCache(e,t){return dp(this.configuration).cleanInstallationCache(e,t).then((e=>e(this.axios,this.basePath)))}cloneInstallation(e,t){return dp(this.configuration).cloneInstallation(e,t).then((e=>e(this.axios,this.basePath)))}closeGlobalAlert(e,t){return dp(this.configuration).closeGlobalAlert(e,t).then((e=>e(this.axios,this.basePath)))}createInstallation(e,t){return dp(this.configuration).createInstallation(e,t).then((e=>e(this.axios,this.basePath)))}createInstallationBackup(e,t){return dp(this.configuration).createInstallationBackup(e,t).then((e=>e(this.axios,this.basePath)))}createInstallationWpUser(e,t,n){return dp(this.configuration).createInstallationWpUser(e,t,n).then((e=>e(this.axios,this.basePath)))}createMaintenancePreview(e,t,n){return dp(this.configuration).createMaintenancePreview(e,t,n).then((e=>e(this.axios,this.basePath)))}createSet(e,t){return dp(this.configuration).createSet(e,t).then((e=>e(this.axios,this.basePath)))}deleteLicense(e,t){return dp(this.configuration).deleteLicense(e,t).then((e=>e(this.axios,this.basePath)))}deleteSet(e,t,n){return dp(this.configuration).deleteSet(e,t,n).then((e=>e(this.axios,this.basePath)))}detachInstallations(e,t){return dp(this.configuration).detachInstallations(e,t).then((e=>e(this.axios,this.basePath)))}detachVirtualPatchesSubscription(e,t,n){return dp(this.configuration).detachVirtualPatchesSubscription(e,t,n).then((e=>e(this.axios,this.basePath)))}disableVirtualPatches(e,t){return dp(this.configuration).disableVirtualPatches(e,t).then((e=>e(this.axios,this.basePath)))}discardSmartPhpUpdate(e,t,n){return dp(this.configuration).discardSmartPhpUpdate(e,t,n).then((e=>e(this.axios,this.basePath)))}discardSmartUpdate(e,t,n){return dp(this.configuration).discardSmartUpdate(e,t,n).then((e=>e(this.axios,this.basePath)))}featureVulnerabilityStatsUpdate(e,t){return dp(this.configuration).featureVulnerabilityStatsUpdate(e,t).then((e=>e(this.axios,this.basePath)))}fetchAvailableAutoUpdateSettings(e,t){return dp(this.configuration).fetchAvailableAutoUpdateSettings(e,t).then((e=>e(this.axios,this.basePath)))}fetchAvailableInstallationsAutoUpdateSettings(e,t){return dp(this.configuration).fetchAvailableInstallationsAutoUpdateSettings(e,t).then((e=>e(this.axios,this.basePath)))}fetchAvailableUpdates(e,t,n,s,i){return dp(this.configuration).fetchAvailableUpdates(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}fetchInstallationsVulnerabilityStatuses(e,t,n,s,i){return dp(this.configuration).fetchInstallationsVulnerabilityStatuses(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}fetchInstallationsVulnerabilityStatusesShort(e,t,n,s,i){return dp(this.configuration).fetchInstallationsVulnerabilityStatusesShort(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}forgotPlatfromApiKey(e){return dp(this.configuration).forgotPlatfromApiKey(e).then((e=>e(this.axios,this.basePath)))}getAutoUpdateSettings(e,t){return dp(this.configuration).getAutoUpdateSettings(e,t).then((e=>e(this.axios,this.basePath)))}getAvailablePhpHandlers(e,t){return dp(this.configuration).getAvailablePhpHandlers(e,t).then((e=>e(this.axios,this.basePath)))}getBackgroundTask(e,t,n){return dp(this.configuration).getBackgroundTask(e,t,n).then((e=>e(this.axios,this.basePath)))}getChangelogs(e){return dp(this.configuration).getChangelogs(e).then((e=>e(this.axios,this.basePath)))}getCloneStub(e,t,n,s,i,a,r,o){return dp(this.configuration).getCloneStub(e,t,n,s,i,a,r,o).then((e=>e(this.axios,this.basePath)))}getHotlinkProtectionSettingsMeta(e,t){return dp(this.configuration).getHotlinkProtectionSettingsMeta(e,t).then((e=>e(this.axios,this.basePath)))}getInstallation(e,t){return dp(this.configuration).getInstallation(e,t).then((e=>e(this.axios,this.basePath)))}getInstallationBackupsInfo(e,t,n){return dp(this.configuration).getInstallationBackupsInfo(e,t,n).then((e=>e(this.axios,this.basePath)))}getInstallationBackupsMeta(e,t){return dp(this.configuration).getInstallationBackupsMeta(e,t).then((e=>e(this.axios,this.basePath)))}getInstallationLabelsMeta(e,t){return dp(this.configuration).getInstallationLabelsMeta(e,t).then((e=>e(this.axios,this.basePath)))}getInstallationPlugins(e,t){return dp(this.configuration).getInstallationPlugins(e,t).then((e=>e(this.axios,this.basePath)))}getInstallationSecurityPolicies(e,t){return dp(this.configuration).getInstallationSecurityPolicies(e,t).then((e=>e(this.axios,this.basePath)))}getInstallationStub(e,t,n){return dp(this.configuration).getInstallationStub(e,t,n).then((e=>e(this.axios,this.basePath)))}getInstallationThemes(e,t){return dp(this.configuration).getInstallationThemes(e,t).then((e=>e(this.axios,this.basePath)))}getInstallationWpUserStub(e,t){return dp(this.configuration).getInstallationWpUserStub(e,t).then((e=>e(this.axios,this.basePath)))}getInstallations(e,t,n,s){return dp(this.configuration).getInstallations(e,t,n,s).then((e=>e(this.axios,this.basePath)))}getInstallationsPlugins(e,t,n,s,i,a,r,o,l){return dp(this.configuration).getInstallationsPlugins(e,t,n,s,i,a,r,o,l).then((e=>e(this.axios,this.basePath)))}getInstallationsRemoveConfirmation(e,t){return dp(this.configuration).getInstallationsRemoveConfirmation(e,t).then((e=>e(this.axios,this.basePath)))}getInstallationsThemes(e,t,n,s,i,a,r,o,l){return dp(this.configuration).getInstallationsThemes(e,t,n,s,i,a,r,o,l).then((e=>e(this.axios,this.basePath)))}getIntegrity(e,t){return dp(this.configuration).getIntegrity(e,t).then((e=>e(this.axios,this.basePath)))}getLicenseInfo(e){return dp(this.configuration).getLicenseInfo(e).then((e=>e(this.axios,this.basePath)))}getMaintenanceSettings(e,t){return dp(this.configuration).getMaintenanceSettings(e,t).then((e=>e(this.axios,this.basePath)))}getMaintenanceTemplateCustomizationUrl(e,t){return dp(this.configuration).getMaintenanceTemplateCustomizationUrl(e,t).then((e=>e(this.axios,this.basePath)))}getPasswordProtection(e,t){return dp(this.configuration).getPasswordProtection(e,t).then((e=>e(this.axios,this.basePath)))}getRemoteAgentInstallationProperties(e,t){return dp(this.configuration).getRemoteAgentInstallationProperties(e,t).then((e=>e(this.axios,this.basePath)))}getRemoteServerInstallationProperties(e,t){return dp(this.configuration).getRemoteServerInstallationProperties(e,t).then((e=>e(this.axios,this.basePath)))}getScannerLogs(e){return dp(this.configuration).getScannerLogs(e).then((e=>e(this.axios,this.basePath)))}getSecurityMeasures(e){return dp(this.configuration).getSecurityMeasures(e).then((e=>e(this.axios,this.basePath)))}getSecurityMeasuresPerInstallations(e,t,n,s,i){return dp(this.configuration).getSecurityMeasuresPerInstallations(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}getServerInfo(e){return dp(this.configuration).getServerInfo(e).then((e=>e(this.axios,this.basePath)))}getSetDetails(e,t){return dp(this.configuration).getSetDetails(e,t).then((e=>e(this.axios,this.basePath)))}getSetsList(e){return dp(this.configuration).getSetsList(e).then((e=>e(this.axios,this.basePath)))}getSetupDrawerSettings(e,t){return dp(this.configuration).getSetupDrawerSettings(e,t).then((e=>e(this.axios,this.basePath)))}getSmartPhpUpdateResult(e,t){return dp(this.configuration).getSmartPhpUpdateResult(e,t).then((e=>e(this.axios,this.basePath)))}getSmartPhpUpdateStub(e,t){return dp(this.configuration).getSmartPhpUpdateStub(e,t).then((e=>e(this.axios,this.basePath)))}getSmartUpdateResult(e,t){return dp(this.configuration).getSmartUpdateResult(e,t).then((e=>e(this.axios,this.basePath)))}getSpecification(e,t){return dp(this.configuration).getSpecification(e,t).then((e=>e(this.axios,this.basePath)))}getTaskSchedule(e,t){return dp(this.configuration).getTaskSchedule(e,t).then((e=>e(this.axios,this.basePath)))}getVirtualPatchesSubscriptionGuid(e,t){return dp(this.configuration).getVirtualPatchesSubscriptionGuid(e,t).then((e=>e(this.axios,this.basePath)))}getVirtualPatchesSubscriptionInfo(e,t){return dp(this.configuration).getVirtualPatchesSubscriptionInfo(e,t).then((e=>e(this.axios,this.basePath)))}getVirtualPatchesSubscriptionPurchaseUrl(e,t,n){return dp(this.configuration).getVirtualPatchesSubscriptionPurchaseUrl(e,t,n).then((e=>e(this.axios,this.basePath)))}getWordPressDebugSettings(e,t){return dp(this.configuration).getWordPressDebugSettings(e,t).then((e=>e(this.axios,this.basePath)))}getWordPressDebugSettingsMeta(e,t){return dp(this.configuration).getWordPressDebugSettingsMeta(e,t).then((e=>e(this.axios,this.basePath)))}getWpCredentials(e,t){return dp(this.configuration).getWpCredentials(e,t).then((e=>e(this.axios,this.basePath)))}getWpCronTakeoverMeta(e,t){return dp(this.configuration).getWpCronTakeoverMeta(e,t).then((e=>e(this.axios,this.basePath)))}instalationsPluginsActivateDeactivate(e,t,n,s){return dp(this.configuration).instalationsPluginsActivateDeactivate(e,t,n,s).then((e=>e(this.axios,this.basePath)))}instalationsPluginsInfo(e,t,n){return dp(this.configuration).instalationsPluginsInfo(e,t,n).then((e=>e(this.axios,this.basePath)))}instalationsPluginsInstall(e,t,n){return dp(this.configuration).instalationsPluginsInstall(e,t,n).then((e=>e(this.axios,this.basePath)))}instalationsPluginsUninstall(e,t,n){return dp(this.configuration).instalationsPluginsUninstall(e,t,n).then((e=>e(this.axios,this.basePath)))}instalationsPluginsUploadAndInstall(e,t,n,s){return dp(this.configuration).instalationsPluginsUploadAndInstall(e,t,n,s).then((e=>e(this.axios,this.basePath)))}instalationsThemesActivate(e,t,n,s){return dp(this.configuration).instalationsThemesActivate(e,t,n,s).then((e=>e(this.axios,this.basePath)))}instalationsThemesInstall(e,t,n){return dp(this.configuration).instalationsThemesInstall(e,t,n).then((e=>e(this.axios,this.basePath)))}instalationsThemesUninstall(e,t,n){return dp(this.configuration).instalationsThemesUninstall(e,t,n).then((e=>e(this.axios,this.basePath)))}instalationsThemesUploadAndInstall(e,t,n,s){return dp(this.configuration).instalationsThemesUploadAndInstall(e,t,n,s).then((e=>e(this.axios,this.basePath)))}installSet(e,t){return dp(this.configuration).installSet(e,t).then((e=>e(this.axios,this.basePath)))}launchUpdate(e,t,n,s,i){return dp(this.configuration).launchUpdate(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}loginInstallation(e,t,n,s){return dp(this.configuration).loginInstallation(e,t,n,s).then((e=>e(this.axios,this.basePath)))}massUpdateInstallationsAutoUpdatesSettings(e,t,n,s,i){return dp(this.configuration).massUpdateInstallationsAutoUpdatesSettings(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}mitigateVulnerabilities(e,t){return dp(this.configuration).mitigateVulnerabilities(e,t).then((e=>e(this.axios,this.basePath)))}receiveHelloFromAgent(e){return dp(this.configuration).receiveHelloFromAgent(e).then((e=>e(this.axios,this.basePath)))}refreshAvailableUpdates(e,t){return dp(this.configuration).refreshAvailableUpdates(e,t).then((e=>e(this.axios,this.basePath)))}removeInstallationBackups(e,t,n,s){return dp(this.configuration).removeInstallationBackups(e,t,n,s).then((e=>e(this.axios,this.basePath)))}removePluginFromSet(e,t,n,s){return dp(this.configuration).removePluginFromSet(e,t,n,s).then((e=>e(this.axios,this.basePath)))}removeThemeFromSet(e,t,n,s){return dp(this.configuration).removeThemeFromSet(e,t,n,s).then((e=>e(this.axios,this.basePath)))}resetHotlinkProtectionSettings(e,t,n){return dp(this.configuration).resetHotlinkProtectionSettings(e,t,n).then((e=>e(this.axios,this.basePath)))}resolveSecurityMeasures(e,t){return dp(this.configuration).resolveSecurityMeasures(e,t).then((e=>e(this.axios,this.basePath)))}restoreInstallationBackup(e,t){return dp(this.configuration).restoreInstallationBackup(e,t).then((e=>e(this.axios,this.basePath)))}restoreMaintenanceTemplate(e,t,n){return dp(this.configuration).restoreMaintenanceTemplate(e,t,n).then((e=>e(this.axios,this.basePath)))}revertSecurityMeasures(e,t){return dp(this.configuration).revertSecurityMeasures(e,t).then((e=>e(this.axios,this.basePath)))}runSmartPhpUpdate(e,t){return dp(this.configuration).runSmartPhpUpdate(e,t).then((e=>e(this.axios,this.basePath)))}scanInstallations(e,t){return dp(this.configuration).scanInstallations(e,t).then((e=>e(this.axios,this.basePath)))}setPluginsToSet(e,t,n){return dp(this.configuration).setPluginsToSet(e,t,n).then((e=>e(this.axios,this.basePath)))}setTaskSchedule(e,t,n){return dp(this.configuration).setTaskSchedule(e,t,n).then((e=>e(this.axios,this.basePath)))}setThemesToSet(e,t,n){return dp(this.configuration).setThemesToSet(e,t,n).then((e=>e(this.axios,this.basePath)))}statsHireDeveloperTransition(e,t){return dp(this.configuration).statsHireDeveloperTransition(e,t).then((e=>e(this.axios,this.basePath)))}upVoteForFeature(e,t){return dp(this.configuration).upVoteForFeature(e,t).then((e=>e(this.axios,this.basePath)))}updateAutoUpdateSettings(e,t,n){return dp(this.configuration).updateAutoUpdateSettings(e,t,n).then((e=>e(this.axios,this.basePath)))}updateHotlinkProtectionSettings(e,t,n){return dp(this.configuration).updateHotlinkProtectionSettings(e,t,n).then((e=>e(this.axios,this.basePath)))}updateHotlinkProtectionStatus(e,t,n){return dp(this.configuration).updateHotlinkProtectionStatus(e,t,n).then((e=>e(this.axios,this.basePath)))}updateIndexingStatus(e,t,n){return dp(this.configuration).updateIndexingStatus(e,t,n).then((e=>e(this.axios,this.basePath)))}updateInstallationLabels(e,t,n){return dp(this.configuration).updateInstallationLabels(e,t,n).then((e=>e(this.axios,this.basePath)))}updateInstallationSecurityPolicies(e,t,n){return dp(this.configuration).updateInstallationSecurityPolicies(e,t,n).then((e=>e(this.axios,this.basePath)))}updateInstallationsAutoUpdatesSettings(e,t,n,s,i){return dp(this.configuration).updateInstallationsAutoUpdatesSettings(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}updateInstallationsAutoUpdatesSettingsV2(e,t,n,s,i){return dp(this.configuration).updateInstallationsAutoUpdatesSettingsV2(e,t,n,s,i).then((e=>e(this.axios,this.basePath)))}updateInstallationsPlugins(e,t,n){return dp(this.configuration).updateInstallationsPlugins(e,t,n).then((e=>e(this.axios,this.basePath)))}updateInstallationsThemes(e,t,n){return dp(this.configuration).updateInstallationsThemes(e,t,n).then((e=>e(this.axios,this.basePath)))}updateLicenseInfo(e,t){return dp(this.configuration).updateLicenseInfo(e,t).then((e=>e(this.axios,this.basePath)))}updateMaintenanceSettings(e,t,n){return dp(this.configuration).updateMaintenanceSettings(e,t,n).then((e=>e(this.axios,this.basePath)))}updateMaintenanceStatus(e,t,n){return dp(this.configuration).updateMaintenanceStatus(e,t,n).then((e=>e(this.axios,this.basePath)))}updateNginxCachingStatus(e,t,n){return dp(this.configuration).updateNginxCachingStatus(e,t,n).then((e=>e(this.axios,this.basePath)))}updatePasswordProtection(e,t,n){return dp(this.configuration).updatePasswordProtection(e,t,n).then((e=>e(this.axios,this.basePath)))}updateSet(e,t,n){return dp(this.configuration).updateSet(e,t,n).then((e=>e(this.axios,this.basePath)))}updateSetupDrawerSettings(e,t,n){return dp(this.configuration).updateSetupDrawerSettings(e,t,n).then((e=>e(this.axios,this.basePath)))}updateSmartUpdatesStatus(e,t,n){return dp(this.configuration).updateSmartUpdatesStatus(e,t,n).then((e=>e(this.axios,this.basePath)))}updateVirtualPatchesProtectionStatus(e,t,n){return dp(this.configuration).updateVirtualPatchesProtectionStatus(e,t,n).then((e=>e(this.axios,this.basePath)))}updateVulnerabilityFiltering(e,t,n){return dp(this.configuration).updateVulnerabilityFiltering(e,t,n).then((e=>e(this.axios,this.basePath)))}updateWordPressDebugSettings(e,t,n){return dp(this.configuration).updateWordPressDebugSettings(e,t,n).then((e=>e(this.axios,this.basePath)))}updateWordPressDebugStatus(e,t,n){return dp(this.configuration).updateWordPressDebugStatus(e,t,n).then((e=>e(this.axios,this.basePath)))}updateWpCronTakeover(e,t,n){return dp(this.configuration).updateWpCronTakeover(e,t,n).then((e=>e(this.axios,this.basePath)))}uploadPluginToSet(e,t,n,s){return dp(this.configuration).uploadPluginToSet(e,t,n,s).then((e=>e(this.axios,this.basePath)))}uploadThemeToSet(e,t,n,s){return dp(this.configuration).uploadThemeToSet(e,t,n,s).then((e=>e(this.axios,this.basePath)))}validateClonePath(e,t,n){return dp(this.configuration).validateClonePath(e,t,n).then((e=>e(this.axios,this.basePath)))}validateInstallationPath(e,t){return dp(this.configuration).validateInstallationPath(e,t).then((e=>e(this.axios,this.basePath)))}}class hp{constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){const t=new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$","i");return null!==e&&(t.test(e)||"application/json-patch+json"===e.toLowerCase())}}let mp=null,fp=null,gp="/",bp=e=>{};const vp=(e,t,n=!1)=>{gp=Bu(e),bp=t,mp=Nu().create({baseURL:gp,headers:Hu({"Is-Webspace-Context":n.toString()})}),mp.interceptors.response.use((e=>Gu(e)),(e=>Ku(bp,e)));const s=new hp({basePath:gp});fp=new pp(s,void 0,mp)},yp=e=>t=>{if(!Vu(e.response))return;const n=(s=e.response,Vu(s)&&(null==s?void 0:s.data.formErrors)||null);var s;if(!n||0===Object.keys(n).length)return;const i=e=>{"string"==typeof e?t(Cp("error",e)):Array.isArray(e)&&e.filter((e=>!!e)).forEach((e=>t(Cp("error",e))))};Object.values(n).forEach((e=>{Object.values(e).forEach((e=>{"string"==typeof e||Array.isArray(e)?i(e):Object.values(e).forEach((e=>{i(e)}))}))}))},_p=e=>t=>{if(!$u(e.response))return;const n=(s=e.response,$u(s)&&(null==s?void 0:s.data.meta)||null);var s;(null==n?void 0:n.message)&&t(Cp("error",n.message))},xp=(e,t,n)=>s=>{switch(Fc(e).forEach((({status:e,message:t})=>s(Cp(e,t)))),e.status){case nu:if(t)return Promise.resolve(t()).then((()=>e));break;case su:if(n)return Promise.resolve(n()).then((()=>e))}return Promise.resolve(e)},Sp=()=>()=>wd.check(),wp=e=>t=>t(Cp(ru,e)),kp=e=>t=>t(Cp("info",e)),jp=e=>t=>t(Cp(lu,e)),Tp=e=>t=>t(Cp(ou,e)),Cp=Nc(Su,"intent","message"),Dp=Nc(wu),Pp=Nc(ku,"search"),Ip=Nc(Du,"options","urls"),Op=()=>e=>bd.disableSmartUpdatePromoForInstances().then((({data:t})=>{e(xp(t,(()=>e({type:ju}))))})),Lp=e=>t=>bd.disableSmartUpdatePromoForUpdatesScreen(Uc().stringify(e)).then((({data:e})=>{t(xp(e,(()=>t({type:Tu}))))})),Mp=e=>t=>bd.disableSmartUpdatePromoForMultipleSitesUpdatesScreen(Uc().stringify(e)).then((({data:e})=>{t(xp(e,(()=>t({type:Cu}))))})),Ap=()=>e=>bd.getInitialData().then((({data:t})=>{e(xp(t,(()=>e(Ip(t.data.options,t.data.urls)))))})),Ep=e=>t=>t({type:Iu,index:e}),Up=e=>t=>{fp.closeGlobalAlert({alertId:e}).catch(),t({type:Lu,alertId:e})},Rp=()=>e=>(e(Np(null)),fp.getChangelogs().then((({data:t})=>(e(Np(t.changelog)),t.changelog))).catch((t=>(e(_p(t)),Promise.reject())))),Np=Nc(Pu,"changelog"),Fp=()=>e=>(e(Bp(null)),bd.getPremiumUsers().then((({data:t})=>(e(xp(t,(()=>e(Bp(t.data.premiumUsers))))),t)))),Yp=e=>t=>bd.getWhmcsUpsellLink(e).then((({data:e})=>(t(xp(e)),e))),Bp=Nc(Ou,"premiumUsers"),Hp=e=>t=>fp.upVoteForFeature({featureName:e}).then((()=>{t({type:Mu,featureName:e})})),Vp=()=>e=>fp.getLicenseInfo().then((({data:t})=>{e({type:Au,info:t})})),$p=()=>e=>fp.updateLicenseInfo().then((({data:t})=>(e({type:Au,info:t}),t))).catch((t=>(e(_p(t)),Promise.reject()))),Wp=e=>{const t=`${e}/get-initial-data`;return Nu().get(t,{headers:{Accept:"application/json","Cache-Control":"no-cache",Credentials:"same-origin"}}).then((({data:e})=>{if("error"===e.status)throw new Error(e.message);if(void 0===e.data||void 0===e.data.urls||void 0===e.data.options||void 0===e.data.unpaidFeatures||void 0===e.data.buildMeta)throw new Error("Initial data load error: some required fields are not provided");return e.data}))};let zp=!1;const qp=()=>{if(!zp){const e=Date.now();if(!(window&&window.performance&&window.performance.timing&&window.performance.timing.connectStart))return;if("/"!==window.WPT_INITIAL_ROUTE_PATHNAME&&"/list"!==window.WPT_INITIAL_ROUTE_PATHNAME)return;const t=window.performance.timing.connectStart,n=e-t;zp=!0,setTimeout((()=>bd.sendMainPagePerfStat(n,Math.floor(t/1e3)).catch((e=>window.console.warn(`Failed to record page load statistics ${e}`)))),2e3)}};var Gp=r(1413);function Kp(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Xp="function"==typeof Symbol&&Symbol.observable||"@@observable",Zp=function(){return Math.random().toString(36).substring(7).split("").join(".")},Jp={INIT:"@@redux/INIT"+Zp(),REPLACE:"@@redux/REPLACE"+Zp(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Zp()}};function Qp(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function eh(e,t,n){var s;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Kp(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Kp(1));return n(eh)(e,t)}if("function"!=typeof e)throw new Error(Kp(2));var i=e,a=t,r=[],o=r,l=!1;function c(){o===r&&(o=r.slice())}function u(){if(l)throw new Error(Kp(3));return a}function d(e){if("function"!=typeof e)throw new Error(Kp(4));if(l)throw new Error(Kp(5));var t=!0;return c(),o.push(e),function(){if(t){if(l)throw new Error(Kp(6));t=!1,c();var n=o.indexOf(e);o.splice(n,1),r=null}}}function p(e){if(!Qp(e))throw new Error(Kp(7));if(void 0===e.type)throw new Error(Kp(8));if(l)throw new Error(Kp(9));try{l=!0,a=i(a,e)}finally{l=!1}for(var t=r=o,n=0;n<t.length;n++)(0,t[n])();return e}function h(e){if("function"!=typeof e)throw new Error(Kp(10));i=e,p({type:Jp.REPLACE})}function m(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(Kp(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[Xp]=function(){return this},e}return p({type:Jp.INIT}),(s={dispatch:p,subscribe:d,getState:u,replaceReducer:h})[Xp]=m,s}function th(e,t){return function(){return t(e.apply(this,arguments))}}function nh(e,t){if("function"==typeof e)return th(e,t);if("object"!=typeof e||null===e)throw new Error(Kp(16));var n={};for(var s in e){var i=e[s];"function"==typeof i&&(n[s]=th(i,t))}return n}function sh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}const ih="checkbox",ah="settings/OPEN_DRAWER",rh="settings/CLOSE_DRAWER",oh="settings/SETTINGS_REQUESTED",lh="settings/SETTINGS_LOADED",ch="settings/SETTINGS_LOADING_ERROR",uh="settings/SETTINGS_SUBMITTED",dh="settings/SETTINGS_UPDATED",ph="settings/SETTINGS_UPDATE_ERROR",hh=()=>(e,t)=>{t().settings.status===du&&e(mh())},mh=()=>e=>(kd.load().then((({data:t})=>{const n=Fc(t);if(t.status===su)return void e(_h(n));const s=Wc(t,"settings");s&&e(yh(s,n))})),e(vh())),fh=e=>t=>(t(xh()),kd.update(Uc().stringify(e)).then((({data:e})=>{const n=Fc(e);if(e.status===su)return void t(wh(n,e.formErrors));const s=Wc(e,"settings");t(Sh(s,n))}))),gh=Nc(ah),bh=Nc(rh),vh=Nc(oh),yh=Nc(lh,"settings","messages"),_h=Nc(ch,"messages"),xh=Nc(uh),Sh=Nc(dh,"settings","messages"),wh=Nc(ph,"messages","formErrors"),kh="instance-remove-confirmation-button-yes",jh="instance-detach-confirmation-button-yes",Th="instances-dialog",Ch="instance-remove",Dh="instance-check-security",Ph="instance-detach",Ih="remote-instance-properties",Oh="remote-server-drawer",Lh="remote-agent-instance-properties",Mh="instance-tab-list",Ah="instance-database-settings-phpmyadmin-link",Eh="update-button",Uh="update-button-with-confirmation",Rh="update-settings-submit-button",Nh="btn-upgrade",Fh="virtual-patches-switcher-prompt-submit-button",Yh="refresh-button",Bh="btn-send",Hh="instance-link-files",Vh="clone-path",$h="toolbar-activate-button",Wh="install-drawer-search-input",zh="install-drawer-search-button",qh="found-assets-list",Gh="instance-backups-drawer-remove-backup",Kh="instance-security-vulnerabilities-virtual-patches-disabled-widget",Xh="instances-security-sites-button",Zh="instances-security-vulnerabilities-button",Jh="instances-security-vulnerabilities-apply-virtual-patches-button",Qh="instances-security-vulnerabilities-virtual-patches-apply-confirm-button",em="instances-security-vulnerabilities-theme-advise",tm="wpt-virtual-patching-upsell-dialog-buy-button",nm="wpt-security-widgets",sm="blocked-relative-date",im="vulnerability-protection-widget",am="looks-good",rm="virtual-patches-shield-button",om="virtual-patches-shield-apply-confirm-button",lm=(e,t={})=>{let n;try{n=Jsw&&Jsw.UAT}catch(e){}n&&n.dispatchAction(e,t)},cm=e=>{let t;try{t=Jsw&&Jsw.UAT}catch(e){}if(!t||!t.getConfig())return e;const n=new URL(e,window.location.href),s=new URLSearchParams(n.search),{instanceId:i,accountId:a,sessionId:r}=t.getConfig();return s.set("ux",`${i}.${a}.${r}`),n.search=s.toString(),n.toString()},um={getWhmcsUpsellLink:Yp},dm=(0,so.$j)((e=>({useWhmcsUpsellLinks:e.app.options.useWhmcsUpsellLinks})),um)((({purchaseLicenseUrl:e,getWhmcsUpsellLink:t,onTogglePopover:n,uatAction:s,children:i,useWhmcsUpsellLinks:a,installationId:r,featureType:o,onClick:l,intent:c="success"})=>{const u=Mc();return a&&!o?(0,L.jsx)(Ue,{intent:c,onClick:()=>(s&&lm(s),(({installationId:e,getWhmcsUpsellLink:t,translate:n,purchaseLicenseUrl:s})=>{const i=window.open("","_blank");i&&(i.document.body.innerText=n("general-ui.loadingUpgradePage"),t(e).then((({data:{url:e}={}})=>{const t=e||s;t||i.close(),i.location=t})))})({installationId:r,getWhmcsUpsellLink:t,translate:u,purchaseLicenseUrl:e}),null==l||l(),Xc(n)),icon:"lock-open","data-test-id":Nh,children:i}):(0,L.jsx)(Ue,{component:"a",href:e,target:"_blank",intent:c,onClick:()=>(s&&lm(s),null==l||l(),Xc(n)),icon:"lock-open","data-test-id":Nh,children:i})})),pm=({purchaseLicenseUrl:e,premiumFeaturesUrl:t,onTogglePopover:n,children:s,baseClassName:i=`${gu}paid-feature-desc`,uatAction:a,installationId:r})=>(0,L.jsxs)(qi,{className:i,"data-test-id":"license-warning",children:[(0,L.jsxs)(Xi,{children:[(0,L.jsx)(he,{name:"lock-closed",size:"24",intent:"inactive"})," ",(0,L.jsx)(Wn,{children:(0,L.jsx)(Ac,{content:"paidFeatureDesc.title"})})]}),(0,L.jsx)(Ki,{children:s}),(0,L.jsxs)(Gi,{children:[(0,L.jsx)(dm,{purchaseLicenseUrl:e,uatAction:a,onTogglePopover:n,installationId:r,children:(0,L.jsx)(Ac,{content:"paidFeatureDesc.buttonPurchase"})}),t&&(0,L.jsx)(Ue,{ghost:!0,component:"a",target:"_blank",href:t,children:(0,L.jsx)(Ac,{content:"paidFeatureDesc.buttonDiscoverAllPremiumFeatures"})})]})]});var hm=r(94184),mm=r.n(hm);class fm extends U.Component{constructor(e){super(e),this.handleTogglePopover=()=>this.props.isAbleToClick&&this.setState((e=>({showPopover:!e.showPopover}))),this.getPopover=()=>{const{upgradeUrl:e,premiumFeaturesUrl:t,description:n,uatAction:s,installationId:i}=this.props,{showPopover:a}=this.state;return(0,L.jsx)(An,{visible:a,width:"xs",onClose:this.handleTogglePopover,target:(0,L.jsx)(fe,{onClick:this.handleTogglePopover,icon:"lock-closed"}),children:(0,L.jsx)(pm,{uatAction:s,purchaseLicenseUrl:e,premiumFeaturesUrl:t,onTogglePopover:this.handleTogglePopover,installationId:i,children:n})})},this.state={isUnpaid:!!e.unpaidFeatures[e.featureName],showPopover:!1}}render(){const{className:e,baseClassName:t,children:n,isInstanceFeatureDisabled:s}=this.props,{isUnpaid:i}=this.state;let a=!1;return null!=s&&(a=s),i||a?(0,L.jsxs)("span",{className:mm()(t,e),children:[this.getPopover()," ",n]}):(0,L.jsx)("span",{className:mm()(t,e),children:n})}}fm.defaultProps={children:void 0,isAbleToClick:!0,className:void 0,uatAction:void 0,baseClassName:`${gu}paid-feature`,isInstanceFeatureDisabled:void 0,installationId:void 0};const gm=(0,so.$j)(((e,t)=>({upgradeUrl:e.app.urls.featuresBuyLinks[t.featureName],unpaidFeatures:e.app.unpaidFeatures,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl})),null,null,{forwardRef:!0})(fm),bm=({link:e,inNewWindow:t,goToUri:n,accountUsername:s})=>_m()?{onClick:t=>Rc(t,(()=>n(e,s)))}:{href:`${vm()}/${e}`,target:t?"_blank":"_self"},vm=()=>`${window.location.origin}${xm()}`,ym={2082:"cpanel",2083:"cpanel",2086:"whostmgr",2087:"whostmgr",2095:"webmail",2096:"webmail",frontend:"cpanel",webmail:"webmail"},_m=()=>{const e=location.pathname.match(/((?:\/cpsess\d+)?)(?:\/([^/]+))?/)||[],t=ym[location.port]||ym[e[2]]||"whostmgr";return/wh/i.test(t)||!1},xm=()=>(location.pathname.match(/((?:\/cpsess\d+)?)(?:\/([^/]+))?/)||[])[1]||"",Sm="SHOW_INSTANCES_SMART_UPDATE_PROMO",wm="CLICK_EXT_BUY_FROM_MULTIPLE_UPDATE_FORM",km="CLICK_EXT_BUY_FROM_INSTANCE_CARD",jm="CLICK_EXT_BUY_FROM_INSTANCES_LIST",Tm="CLICK_EXT_BUY_FROM_INSTANCE_SECURITY",Cm="CLICK_EXT_BUY_FROM_INSTANCES_SECURITY";class Dm extends U.Component{constructor(){super(...arguments),this.state={exception:null},this.getError=()=>{const{exception:e}=this.state;return(0,L.jsx)("p",{children:null==e?void 0:e.message})},this.handleRefresh=()=>{this.setState({exception:null}),this.props.onRefresh&&this.props.onRefresh()}}componentDidCatch(e){this.setState({exception:e})}render(){return this.state.exception?(0,L.jsxs)("div",{children:[(0,L.jsx)("h1",{children:(0,L.jsx)(Ac,{content:"general-ui.react-js-error.commonText"})}),this.getError(),(0,L.jsx)("p",{children:(0,L.jsx)(Ue,{intent:"primary",onClick:this.handleRefresh,children:(0,L.jsx)(Ac,{content:"general-ui.react-js-error.refresh"})})})]}):this.props.children}}const Pm=Dm,Im="instances/SET_FILTER",Om="instances/REMOVE_INSTALLATIONS",Lm="instances/SET_INSTALLATION_NAME",Mm="instances/INSTANCE_PASSWORD_PROTECTION_UPDATED",Am="instances/ADD_ASSETS_TO_REMOVAL",Em="instances/REMOVE_ASSETS_FROM_REMOVAL",Um="instances/ADD_ASSET_TO_CHANGING_STATUS",Rm="instances/REMOVE_ASSET_FROM_CHANGING_STATUS",Nm="instances/TOGGLE_DEBUG",Fm="instances/TOGGLE_INDEXING",Ym="instances/NGINX_CACHING_INSTALLATION_UPDATE",Bm="instances/SMART_UPDATES_INSTALLATION_UPDATE",Hm="instances/WP_CRON_TAKEOVER_UPDATED",Vm="instances/WP_CRON_TASK_REPLACEMENT_UPDATED",$m="instances/TOGGLE_HOTLINK_PROTECTION",Wm="instances/SET_MAINTENANCE_STATUS",zm="instances/UPDATE_ITEMS_STARTED",qm="instances/SET_AUTO_UPDATES_SETTINGS_FINISHED_SUCCESSFULLY",Gm="instances/SMART_UPDATES_STARTED",Km="instances/DISCARD_SMART_UPDATES",Xm="instances/APPLY_SMART_UPDATES_STARTED",Zm="instances/SET_SCREENSHOT",Jm="instances/SET_IS_SCREENSHOT_LOADING",Qm="instances/RESTORE_SNAPSHOT_STARTED",ef="instances/DELETE_SNAPSHOT",tf="instances/SET_IS_NEED_TO_UPDATE_INSTANCES_LIST",nf="instances/SET_IS_NEED_TO_UPDATE_INSTANCES_FILTER",sf="instances/RESET_INSTANCES_LIST",af="instances/CONNECT_REMOTE_AGENT_INSTANCE_STARTED",rf="instances/SCAN_STARTED",of="instances/SET_SELECTED_INSTANCE_ID",lf="instances/SET_EXPANDED_INSTANCE_ID",cf="instances/SET_KEPT_EXPANDED_INSTANCE_IDS",uf="instances/SET_LAST_INSTALLED_INSTANCE_ID",df="instances/MASS_CHECK_UPDATES_STARTED",pf="instances/UPDATE_STORES_ON_MASS_UPDATES_RECEIVED",hf="instances/SET_INSTANCE_ACTIVE_TAB",mf="instances/INSTALLATIONS_LOADED",ff="instances/INSTALLATIONS_RELOADED",gf="instances/SET_INSTALLATION_LABELS",bf="instances/INSTALLATION_STARTED",vf="instances/SET_INSTALLATION_AFTER_INSTANCE_INSTALL_STARTED",yf="instances/LOGIN_TO_INSTANCE",_f="instances/LOGIN_TO_INSTANCE_PERFORMED",xf="instances/SYNCHRONIZE_SITE_URL",Sf="instances/SET_ADMIN_SETTINGS_FINISHED",wf="instances/SET_MAINTENANCE_FULL_MODE",kf="instances/UPDATE_INSTALLATIONS_VULNERABILITY_STATUSES",jf="instances/CHECK_INSTALLATIONS_VULNERABILITY_FINISHED",Tf="instances/CHECK_INSTALLATIONS_VULNERABILITY_STARTED",Cf="instances/SET_INSTALLATION_PHP_HANDLER",Df="instances/SMART_PHP_UPDATE_STARTED",Pf="instances/SMART_PHP_UPDATE_TASK_STATUS_UPDATED",If="installations/INTEGRITY_RECEIVED",Of="installations/VULNERABILITY_FILTERING_SETTINGS_UPDATED",Lf="installations/APPEND_DOMAIN_INSTALLATION_IDS",Mf="installations/VIRTUAL_PATCHING_SUBSCRIPTION_UPDATED",Af=null,Ef="core",Uf="plugins",Rf="themes",Nf="updates/MASS_UPDATES_RECEIVED",Ff="updates/CLEAN_UP_STORE";class Yf extends Error{constructor(...e){super(e)}}const Bf=(e,t)=>n=>e().then((e=>(n(xp(e.data,(()=>t(n,e.data)))),e.data))),Hf=(e,t)=>Bf(e,((e,n)=>e(t(n)))),Vf="cpanel/goto-uri",$f="cpanel/reset-goto-cpanel",Wf=(e,t)=>n=>n({type:Vf,applicationUri:e,accountUsername:t}),zf="wpt-storage-",qf=()=>{const e=(e=>{try{const e=localStorage.getItem(zf+"expanded-instances");if(null===e)return;return JSON.parse(e)}catch(e){return void console.error(e)}})();return e&&e instanceof Object?e:{}},Gf=e=>{e instanceof Object&&((e,t)=>{try{const e=JSON.stringify(t);localStorage.setItem(zf+"expanded-instances",e)}catch(e){console.error(e)}})(0,e)};var Kf=r(30381),Xf=r.n(Kf);const Zf="plugins/REMOVE_PLUGINS",Jf="plugins/SET_PLUGIN_STATUS",Qf="plugins/SET_PLUGINS_AUTO_UPDATES",eg="plugins/SET_INSTALLATION_PLUGINS",tg="plugins/ADD_INSTALLATION_PLUGINS",ng="plugins/UPDATE_PLUGINS_VULNERABILITY_STATUSES",sg="vulnerabilities/INSTALLATIONS_VULNERABILITY_STATUSES_LOADED_FROM_API",ig="vulnerabilities/INSTALLATIONS_VULNERABILITY_STATUSES_RELOADED_FROM_API",ag="vulnerabilities/TOGGLE_VULNERABILITIES_MITIGATIONS",rg="vulnerabilities/TOGGLE_VULNERABILITIES_MITIGATIONS_FINISHED",og="vulnerabilities/UPDATE_VIRTUAL_PATCHES_STATUS_STARTED",lg="vulnerabilities/UPDATE_VIRTUAL_PATCHES_STATUS_FINISHED",cg="critical",ug="custom",dg="securityMeasures/LIST_LOADED_FROM_API",pg="securityMeasures/INSTALLATIONS_SECURITY_MEASURES_LOADED_FROM_API",hg="securityMeasures/INSTALLATIONS_SECURITY_MEASURES_RELOADED_FROM_API",mg="securityMeasures/CHECK_SECURITY_INITIATED",fg="securityMeasures/RESOLVE_SECURITY_INITIATED",gg="securityMeasures/REVERT_SECURITY_INITIATED",bg="installations/UPDATE_SECURITY_STATUS",vg=Nc(bg,"installationSecurityStatuses"),yg=Nc(dg,"securityMeasures"),_g=()=>e=>fp.getSecurityMeasures().then((({data:t})=>(e(yg(t)),t))).catch((t=>(e(_p(t)),Promise.reject()))),xg=Nc(pg,"securityMeasuresInstallationStatuses"),Sg=Nc(hg,"securityMeasuresInstallationStatuses"),wg=e=>e.map((e=>({id:e.id,securityStatus:e.securityStatus,vulnerable:e.vulnerable}))),kg=e=>t=>fp.getSecurityMeasuresPerInstallations(e,!0,!0,!0).then((({data:e})=>(t(xg(e)),t(vg(wg(e))),e))).catch((e=>(t(_p(e)),Promise.reject()))),jg=e=>t=>fp.getSecurityMeasuresPerInstallations(e).then((({data:e})=>(t(Sg(e)),t(vg(wg(e))),e))).catch((e=>(t(_p(e)),Promise.reject()))),Tg=e=>t=>fp.checkSecurity({installationsIds:e,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0}).then((({data:{task:n}})=>{const s=Yc(n);return t({type:mg,task:s,installationsIds:e}),s})).catch((e=>e.response?422===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()):Promise.reject(e))),Cg=(e,t)=>n=>fp.resolveSecurityMeasures({installationsIds:e,securityMeasures:t}).then((({data:{task:t}})=>{const s=Yc(t);return n({type:fg,task:s,installationsIds:e}),s})).catch((e=>e.response?422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()):Promise.reject(e))),Dg=(e,t)=>n=>fp.revertSecurityMeasures({installationsIds:e,securityMeasures:t}).then((({data:{task:t}})=>{const s=Yc(t);return n({type:gg,task:s,installationsIds:e}),s})).catch((e=>e.response?422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()):Promise.reject(e))),Pg="themes/REMOVE_THEMES",Ig="themes/THEME_ACTIVATED",Og="plugins/SET_THEMES_AUTO_UPDATES",Lg="themes/SET_INSTALLATION_THEMES",Mg="plugins/ADD_INSTALLATION_THEMES",Ag="themes/UPDATE_THEMES_VULNERABILITY_STATUSES",Eg=(e,t=[])=>e.some((e=>!e.mitigations.some((e=>!t.includes(e.type)&&e.applied)))),Ug=(e,t,n=[])=>{const s=t.find((t=>t.slug===e));return!!s&&Eg(s.vulnerabilities,n)},Rg=Nc(sg,"installationsVulnerabilityStatuses"),Ng=Nc(ig,"installationsVulnerabilityStatuses"),Fg=e=>t=>{t({type:kf,vulnerabilityStatuses:e.reduce(((e,t)=>{const n=t.plugins.filter((e=>e.availableVersion)).length,s=t.themes.filter((e=>e.availableVersion)).length;return e[`${t.id}`]={vulnerable:t.vulnerable,version:t.core.version,availableVersion:t.core.availableVersion,amountOfPluginsWithUpdates:n,amountOfThemesWithUpdates:s},e}),{})}),t({type:ng,pluginsVulnerabilityStatuses:e.reduce(((e,t)=>(e[`${t.id}`]=t.plugins.reduce(((e,t)=>(e[t.slug]={vulnerable:t.status&&Eg(t.vulnerabilities),version:t.version,availableVersion:t.availableVersion},e)),{}),e)),{})}),t({type:Ag,themesVulnerabilityStatuses:e.reduce(((e,t)=>(e[`${t.id}`]=t.themes.reduce(((e,t)=>(e[t.slug]={vulnerable:t.status&&Eg(t.vulnerabilities),version:t.version,availableVersion:t.availableVersion},e)),{}),e)),{})})},Yg=e=>t=>fp.fetchInstallationsVulnerabilityStatuses(e,!0,!0,!0).then((({data:e})=>(t(Rg(e)),t(Fg(e)),Promise.resolve(e)))).catch((e=>(t(_p(e)),Promise.reject()))),Bg=e=>t=>fp.fetchInstallationsVulnerabilityStatuses(e,!0,!0,!0).then((({data:e})=>(t(Ng(e)),t(Fg(e)),Promise.resolve(e)))).catch((e=>(t(_p(e)),Promise.reject()))),Hg=e=>t=>fp.fetchInstallationsVulnerabilityStatuses(e,!0,!0,!0).then((({data:e})=>(t(Ng(e)),Promise.resolve(e)))).catch((e=>(t(_p(e)),Promise.reject()))),Vg=(e,t,n,s)=>i=>{const a=new Map;if(t.flatMap((e=>e.mitigations)).forEach((e=>{a.set(`${e.type}:${e.id}`,e)})),[...a.values()].some((e=>e.type===op.SecurityMeasure))){const t=n.length?Promise.resolve():i(_g()),a=s?Promise.resolve():i(jg(e));return Promise.all([t,a])}return Promise.resolve()},$g=e=>t=>{const n=e.map((e=>e.installationsIds.map((t=>({installationId:t,mitigations:e.mitigations}))))).flat();return fp.mitigateVulnerabilities(n).then((({data:{task:n}})=>{const s=Yc(n);return t({type:ag,task:s,vulnerabilities:e}),s})).catch((e=>e.response?422===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()):Promise.reject(e)))},Wg=(e,t)=>n=>fp.updateVirtualPatchesProtectionStatus(e,t).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:s})=>(t||n({type:og,installationIds:e.installationsIds,task:s.task}),s))),zg=Nc(Um,"slug","instanceId"),qg=Nc(Rm,"slug","instanceId"),Gg=Nc(Am,"instanceId","itemsIds"),Kg=Nc(Em,"instanceId","itemsIds"),Xg=Nc(Jf,"slug","installationId","status"),Zg=Nc(Zf,"installationId","slugs"),Jg=(e,t)=>n=>{n(zg(e.slug,e.instanceId));const s={status:t};return fp.instalationsPluginsActivateDeactivate(e.instanceId,e.slug,s).then((({data:t})=>(n(Xg(e.slug,e.instanceId,t.status)),n(qg(e.slug,e.instanceId)),t.status))).catch((e=>(n(_p(e)),Promise.reject())))},Qg=(e,t)=>n=>(n(Gg(e,t)),fp.instalationsPluginsUninstall(e,t).then((()=>(n(Zg(e,t)),n(Kg(e,t)),n(Bg([e]))))).catch((e=>(n(_p(e)),Promise.reject())))),eb=(e,t,n)=>s=>{const i=t.map((e=>({slug:e.slug,autoUpdates:n}))),a=t.map((e=>e.slug));return fp.updateInstallationsPlugins(e,i).then((({data:t})=>(s({type:Qf,installationId:e,pluginsSlugs:a,value:n}),t))).catch((e=>(s(_p(e)),Promise.reject())))},tb=e=>t=>fp.getInstallationPlugins(e).then((({data:n})=>(t({type:eg,installationId:e,data:n}),n))).catch((e=>(t(_p(e)),Promise.reject()))),nb=e=>t=>fp.instalationsPluginsInfo(e.instanceId,e.slug).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),sb=Nc(Um,"slug","instanceId"),ib=Nc(Rm,"slug","instanceId"),ab=Nc(Am,"instanceId","itemsIds"),rb=Nc(Em,"instanceId","itemsIds"),ob=Nc(Ig,"slug","installationId"),lb=Nc(Pg,"installationId","slugs"),cb=e=>t=>(t(sb(e.slug,e.instanceId)),fp.instalationsThemesActivate(e.instanceId,e.slug,{status:!0}).then((({data:n})=>(n.status&&(t(ob(e.slug,e.instanceId)),t(Nb(e.instanceId))),t(ib(e.slug,e.instanceId)),n.status))).catch((e=>(t(_p(e)),Promise.reject())))),ub=(e,t)=>n=>(n(ab(e,t)),fp.instalationsThemesUninstall(e,t).then((()=>{n(lb(e,t)),n(rb(e,t))})).catch((e=>(n(_p(e)),Promise.reject())))),db=(e,t,n)=>s=>{const i=t.map((e=>e.slug)),a=t.map((e=>({slug:e.slug,autoUpdates:n})));return fp.updateInstallationsThemes(e,a).then((({data:t})=>(s({type:Og,installationId:e,themesSlugs:i,value:n}),t))).catch((e=>(s(_p(e)),Promise.reject())))},pb=e=>t=>fp.getInstallationThemes(e).then((({data:n})=>(t({type:Lg,installationId:e,data:n}),n))).catch((e=>(t(_p(e)),Promise.reject()))),hb="task_install",mb="task\\updateitems",fb="smart-update-instance",gb={delete:!0},bb={confirm:!0};const vb=e=>t=>vd.refresh(e).then((({data:n})=>t(xp(n,(()=>Promise.all([t(ev(e)),t(tb(e)),t(pb(e)),t(Nb(e))])))))),yb=(e,t)=>n=>vd.switchPhpHandler(e,t).then((({data:t})=>n(xp(t,(()=>n(ev(e))))))),_b=e=>t=>fp.getAvailablePhpHandlers(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),xb=(e,t={removeDb:!1,removeUser:!1,removeActionLog:!1,checkShared:!1})=>n=>{const s=new FormData;return s.append("removeDb",""+(t.removeDb?1:0)),s.append("removeDbUser",""+(t.removeUser?1:0)),s.append("removeActionLog",""+(t.removeActionLog?1:0)),s.append("checkShared",""+(t.checkShared?1:0)),e.length&&e.forEach(((e,t)=>s.append(`ids[${t}]`,`${e}`))),vd.remove(s).then((({data:t})=>(n(xp(t,(()=>n(Hb(e))))),t)))},Sb=(e,t)=>n=>fp.createMaintenancePreview(e,t).then((({data:e})=>(e.url&&window.open(e.url,"_blank"),e))).catch((e=>(n(_p(e)),Promise.reject()))),wb=(e,t)=>n=>n({type:wf,instanceId:e,value:t}),kb=(e,t)=>t=>fp.getMaintenanceTemplateCustomizationUrl(e).then((({data:e})=>{e.url&&window.open(e.url,"_blank")})).catch((e=>(t(_p(e)),Promise.reject()))),jb=e=>t=>{const n=new FormData;return e.length&&e.forEach(((e,t)=>n.append(`ids[${t}]`,`${e}`))),vd.detach(n).then((({data:e})=>(t(xp(e,(()=>t(Hb(e.data.detachedInstances))))),e))).finally((()=>t(Tb())))},Tb=Nc("instances/INSTANCES_DETACH_FINISHED"),Cb=(e,t)=>n=>fp.updateIndexingStatus(e,{status:t}).then((({data:{status:t}})=>(n(Nc(Fm,"installationId","status")(e,t)),t))).catch((e=>(n(_p(e)),Promise.reject()))),Db=(e,t)=>n=>fp.updateWpCronTakeover(e,{status:t}).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:t})=>{var s;return n(Nc(Hm,"installationId","values")(e,{status:t.status})),null!==(s=t.status)&&void 0!==s?s:Promise.reject()})),Pb=(e,t)=>n=>fp.updateWpCronTakeover(e,{taskReplacementStatus:t}).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:s})=>{var i;return n(Nc(Vm,"installationId","values")(e,{taskReplacementStatus:t})),null!==(i=s.taskReplacementStatus)&&void 0!==i?i:Promise.reject()})),Ib=e=>t=>fp.getWpCronTakeoverMeta(e).catch((e=>422===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()))).then((({data:e})=>e)),Ob=(e,t)=>n=>fp.updateHotlinkProtectionStatus(e,{status:t}).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:{status:t}})=>(n(Nc($m,"installationId","status")(e,t)),t))),Lb=e=>t=>fp.getHotlinkProtectionSettingsMeta(e).catch((e=>(t(_p(e)),Promise.reject()))).then((({data:e})=>e)),Mb=(e,t)=>n=>fp.updateHotlinkProtectionSettings(e,t).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:e})=>e)),Ab=Nc(Wm,"instanceId","status"),Eb=(e,t,n)=>s=>fp.updateMaintenanceStatus(e,{status:t}).then((({data:i})=>(i.status!==n&&(s(Ab(e,t)),s(Nb(e))),i))).catch((e=>(s(_p(e)),Promise.reject()))),Ub=Nc(Bm,"instanceId","values"),Rb=(e,t)=>n=>fp.updateSmartUpdatesStatus(e,{status:t}).catch((e=>(n(_p(e)),Promise.reject()))).then((({data:t})=>(n(Ub(e,t)),t))),Nb=e=>t=>(t(Yb(e,!0)),vd.refreshScreenshot(e).then((({data:n})=>(t(xp(n,(()=>t(Fb(e,{createdAt:n.data.screenshotDateTime,url:n.data.screenshotUrl}))))),n))).finally((()=>{t(Yb(e,!1))}))),Fb=Nc(Zm,"instanceId","screenshot"),Yb=Nc(Jm,"instanceId","isScreenShotLoading"),Bb=e=>t=>fp.getInstallationsRemoveConfirmation(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),Hb=Nc(Om,"installationsIds"),Vb=()=>e=>fp.scanInstallations(bb).catch((t=>(e(_p(t)),Promise.reject()))).then((({data:t})=>(e($b(t.task)),t))),$b=e=>t=>t({type:rf,task:e}),Wb=()=>e=>e({type:"instances/SCAN_FINISHED"}),zb=e=>t=>fp.refreshAvailableUpdates({installationsIds:e,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0}).then((({data:{task:e}})=>(t({type:df,task:e}),e))).catch((e=>{var n;return 422===(null===(n=null==e?void 0:e.response)||void 0===n?void 0:n.status)?Promise.reject(e):(t(_p(e)),Promise.reject())})),qb=e=>t=>fp.fetchAvailableUpdates(e,!0,!0,!0).then((({data:e})=>(t({type:Nf,updates:e}),t({type:pf,updates:e}),e))).catch((e=>e.response&&e.response.status&&422===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()))),Gb=()=>e=>e({type:Ff}),Kb=e=>t=>vd.restoreSnapshot(e).then((({data:e})=>(t(xp(e,(()=>t(Xb(e.data.task))))),e))),Xb=e=>t=>t({type:Qm,task:e}),Zb=e=>t=>t(nv({instancesIds:[e]})).then((()=>{t({type:"instances/RESTORE_SNAPSHOT_FINISHED",instanceId:e})})),Jb=e=>t=>vd.deleteSnapshot(e).then((({data:n})=>(t(xp(n,(()=>t(Qb(e))))),n))),Qb=Nc(ef,"installationId"),ev=e=>t=>fp.getInstallation(e).then((({data:n})=>(t({type:ff,installations:[n],installationsIds:[e]}),n))).catch((e=>(t(_p(e)),Promise.reject()))),tv={instancesIds:[],skipUpdateInstanceList:!1},nv=(e=tv)=>t=>{const n=Object.assign(Object.assign({},tv),e);return fp.getInstallations(n.instancesIds).then((({data:e})=>(t({type:ff,installations:e,installationsIds:n.instancesIds}),n.skipUpdateInstanceList||t(Hv(!0)),e))).catch((e=>(t(_p(e)),Promise.reject())))},sv=e=>t=>vd.getDbSettings(e).then((({data:e})=>(t(xp(e)),e))),iv=(e,t)=>n=>vd.setDbSettings(e,t).then((({data:e})=>(n(xp(e)),e))),av=e=>t=>fp.getSmartPhpUpdateStub(e).then((({data:n})=>(t(Py(e,n.meta.taskStatus)),n))).catch((e=>400===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()))),rv=e=>t=>fp.getSmartPhpUpdateResult(e).then((({data:e})=>e)).catch((e=>404===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()))),ov=e=>t=>fp.acceptSmartPhpUpdate(e,bb).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),lv=e=>t=>fp.discardSmartPhpUpdate(e,gb).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),cv=(e,t)=>n=>fp.updateMaintenanceSettings(e,t).then((({data:e})=>e)).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))),uv=e=>t=>fp.restoreMaintenanceTemplate(e,gb).catch((e=>(t(_p(e)),Promise.reject()))),dv=Nc(Im,"filter"),pv=e=>t=>fp.launchUpdate(e).then((({data:{task:e}})=>{if(t({type:zm,task:e}),e.code===fb){const{currentlyUpdatingInstallationId:n}=e.publicParams;t({type:Gm,installationId:n})}return e})).catch((e=>422===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()))),hv=e=>t=>fp.applySmartUpdate(e,bb).then((({data:{task:e}})=>(t({type:Xm,task:e}),e))).catch((e=>(t(_p(e)),Promise.reject()))),mv=e=>t=>fp.discardSmartUpdate(e,gb).then((()=>(t({type:Km,installationId:e}),Promise.resolve(void 0)))).catch((e=>(t(_p(e)),Promise.reject()))),fv=e=>t=>fp.getSmartUpdateResult(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),gv=e=>t=>fp.getSetupDrawerSettings(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),bv=(e,t)=>n=>fp.updateSetupDrawerSettings(e,t).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:t})=>{const s=null!==t.currentLogin&&null!==t.currentPassword;return n(vv(e,s)),t})),vv=Nc(Sf,"instanceId","hasAdminCredentials"),yv=e=>t=>fp.getInstallationWpUserStub(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),_v=(e,t)=>n=>fp.createInstallationWpUser(e,t).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:t})=>{const s=null!==t.login&&null!==t.password;return n(vv(e,s)),t})),xv=Nc(Ym,"installationId","status"),Sv=(e,t)=>n=>fp.updateNginxCachingStatus(e,{status:t}).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:t})=>(n(xv(e,t.status)),t))),wv=(e,t)=>n=>fp.updateWordPressDebugSettings(e,t).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:e})=>e)),kv=(e,t)=>n=>fp.updateWordPressDebugStatus(e,{status:t}).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))).then((({data:t})=>(n(Nc(Nm,"installationId","status")(e,t.status)),t.status))),jv=(e,t)=>n=>fp.updateAutoUpdateSettings(e,t).then((({data:t})=>(n({type:qm,settings:[Object.assign(Object.assign({},t),{id:+e})]}),Promise.all([n(tb(e)),n(pb(e))]).catch((()=>{})),t))).catch((e=>(n(_p(e)),Promise.reject()))),Tv=(e,t)=>n=>fp.updateInstallationsAutoUpdatesSettings({installationsIds:e,autoUpdate:t}).then((({data:e})=>(n({type:qm,settings:e}),e))).catch((e=>(n(_p(e)),Promise.reject()))),Cv=e=>t=>fp.getAutoUpdateSettings(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),Dv=Nc("instances/SAVE_REMOTE_INSTANCE_PROPERTIES_FINISHED"),Pv=Nc("instances/SAVE_REMOTE_INSTANCE_PROPERTIES_FINISHED_WITH_ERROR"),Iv=Nc("instances/SAVE_REMOTE_AGENT_INSTANCE_PROPERTIES_FINISHED"),Ov=Nc("instances/SAVE_REMOTE_AGENT_INSTANCE_PROPERTIES_FINISHED_WITH_ERROR"),Lv=(e,t)=>n=>{const s=new FormData;return s.append("remoteInstanceIp",`${t.remoteInstanceIp}`),s.append("remoteInstanceSystemUser",`${t.remoteInstanceSystemUser}`),s.append("remoteInstancePhpBin",`${t.remoteInstancePhpBin}`),s.append("remoteInstancePhpIni",`${t.remoteInstancePhpIni}`),vd.updateRemoteInstanceProperties(e,s).then((({data:t})=>t.status===nu?n(vb(e)).then((()=>t)).finally((()=>n(Dv()))):(n(Pv()),Promise.resolve(t))))},Mv=(e,t)=>n=>{const s=new FormData;return s.append("pluginUrl",`${t.pluginUrl}`),s.append("token",`${t.token}`),s.append("ip",`${t.ip}`),vd.updateRemoteAgentInstanceProperties(e,s).then((({data:t})=>t.status===nu?n(vb(e)).then((()=>t)).finally((()=>n(Iv()))):(n(Ov()),Promise.resolve(t))))},Av=Nc("instances/REDETECT_REMOTE_INSTANCE_PROPERTIES_FINISHED"),Ev=Nc("instances/REDETECT_REMOTE_INSTANCE_PROPERTIES_FINISHED_WITH_ERROR"),Uv=e=>t=>vd.redetectRemoteInstanceProperties(e).then((({data:n})=>n.status===nu?t(vb(e)).then((()=>n)).finally((()=>t(Av()))):(t(Ev()),Promise.resolve(n)))),Rv=(e,t)=>n=>{const s=new FormData;return s.append("name",t),vd.setInstanceName(e,s).then((({data:s})=>(n(xp(s,(()=>n(Nv(e,t))))),s)))},Nv=Nc(Lm,"installationId","name"),Fv=e=>t=>fp.getPasswordProtection(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),Yv=(e,t)=>n=>fp.updatePasswordProtection(e,t).catch((e=>422===e.response.status?Promise.reject(e.response.data):(n(_p(e)),Promise.reject()))).then((({data:t})=>(n(Nc(Mm,"installationId","values")(e,t)),t))),Bv=(e,t)=>n=>Yv(e,{status:t})(n).then((({status:e})=>e)),Hv=Nc(tf,"value"),Vv=Nc(nf,"value"),$v=Nc(bf,"task"),Wv=e=>t=>fp.createInstallation(e).then((({data:e})=>fp.getBackgroundTask(e.task.id,e.task.code).then((({data:e})=>{const n=Yc(e);return t($v(n)),n})).catch((e=>Promise.reject(new Yf(e)))))).catch((e=>Promise.reject(e))),zv=Nc(vf,"task"),qv=Nc(sf),Gv=()=>e=>fp.getInstallations().then((({data:t})=>(e({type:mf,installations:t}),t))).catch((t=>(e(_p(t)),Promise.reject()))),Kv=Nc(of,"value"),Xv=Nc(lf,"value"),Zv=Nc(Lf,"domainId","installationId"),Jv=e=>t=>{const n=qf();n[e]=Xf()().unix(),Gf(n),t({type:cf,keptExpandedInstanceIds:Object.keys(n).map((e=>parseInt(e)))})},Qv=e=>t=>{const n=qf();delete n[e],Gf(n),t({type:cf,keptExpandedInstanceIds:Object.keys(n).map((e=>parseInt(e)))})},ey=e=>t=>{const n=qf();if(e&&Array.isArray(e)&&e.length>0){const t=Xf()().unix();Object.entries(n).forEach((([s,i])=>{e.includes(parseInt(s))?n[+s]=t:i+7776e3<t&&delete n[+s]}))}Gf(n),t({type:cf,keptExpandedInstanceIds:Object.keys(n).map((e=>parseInt(e)))})},ty=Nc(uf,"value"),ny=Nc("instances/INSTANCE_UPDATE_FINISHED"),sy=Nc("instances/INSTANCE_UPDATE_FAILED"),iy=Nc("instances/INSTANCES_MASS_UPDATE_FINISHED"),ay=Nc("instances/INSTANCES_MASS_UPDATE_FAILED"),ry=Nc("instances/INSTANCES_CHECK_UPDATES_FINISHED"),oy=Nc("instances/INSTANCES_CHECK_UPDATES_FAILED"),ly=(e,t)=>n=>n({type:hf,installationId:e,activeTab:t}),cy=e=>()=>fp.getInstallationLabelsMeta(e),uy=(e,t)=>n=>fp.updateInstallationLabels(e,t).then((({data:t})=>(n({type:gf,id:e,labels:t}),n(Hv(!0)),t))),dy=(e,t,n,s)=>i=>i({type:yf,instanceId:`${e}_${$c(10)}`,loginUrl:t,credentials:n,windowTarget:s}),py=()=>e=>e({type:_f}),hy=e=>Hf((()=>vd.synchronizeSiteUrl(e)),(e=>fy(e.data.task))),my=e=>t=>vd.synchronizeSiteUrlSync(e).then((({data:n})=>(t(xp(n,(()=>{t(ev(e))}))),n))),fy=Nc(xf,"task"),gy=Nc("instances/SYNCHRONIZE_SITE_URL_FINISHED"),by=e=>t=>vd.getSynchronizeSiteUrlParams(e).then((({data:e})=>(t(xp(e)),e))),vy=e=>t=>fp.getWpCredentials(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),yy=e=>t=>fp.getMaintenanceSettings(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),_y=e=>t=>fp.featureVulnerabilityStatsUpdate({buttonClicked:e}).catch((e=>{t(_p(e))})),xy=(e,t)=>n=>fp.validateInstallationPath({domain:e,installationPath:t}).then((e=>204===e.status?Promise.resolve(void 0):Promise.resolve(e.data))).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))),Sy=(e,t)=>n=>fp.getInstallationStub(e,t).then((({data:e})=>e)).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))),wy=e=>t=>fp.getSetDetails(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),ky=e=>t=>fp.getWordPressDebugSettingsMeta(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),jy=e=>t=>fp.checkInstallationsVulnerability({installationsIds:e,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0}).then((({data:{task:n}})=>(t({type:Tf,installationsIds:e,task:n}),n))).catch((e=>(t(_p(e)),Promise.reject()))),Ty=e=>t=>fp.runSmartPhpUpdate(e).then((({data:n})=>{const s=Yc(n.task);return t(Dy(e.installationId,s)),s})).catch((e=>422===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()))),Cy=(e,t)=>n=>{n({type:Cf,installationId:e,phpHandler:t})},Dy=(e,t)=>n=>n({type:Df,installationId:e,task:t}),Py=(e,t)=>n=>n({type:Pf,installationId:e,taskStatus:t}),Iy=(e,t)=>n=>n({type:"instances/SMART_PHP_UPDATE_FINISHED",installationId:e,task:t}),Oy=e=>t=>t({type:"instances/SMART_PHP_UPDATE_RESULT_APPLIED",installationId:e}),Ly=e=>t=>t({type:"instances/SMART_PHP_UPDATE_RESULT_DISCARDED",installationId:e}),My=e=>t=>t({type:"instances/SMART_PHP_UPDATE_STUB_LOADED",installationId:e}),Ay=e=>t=>fp.getRemoteServerInstallationProperties(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),Ey=e=>t=>fp.getRemoteAgentInstallationProperties(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),Uy=e=>t=>fp.statsHireDeveloperTransition({installationId:e}).catch((e=>(t(_p(e)),Promise.reject()))),Ry=(e,t)=>n=>fp.updateVulnerabilityFiltering(e,t).then((t=>{var s=t.data,{available:i}=s,a=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(s,["available"]);return n(Object.assign({type:Of,installationId:e},a)),jg([e])(n)})).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))),Ny=e=>()=>fp.getVirtualPatchesSubscriptionInfo(e).then((({data:e})=>e)),Fy=e=>()=>fp.getVirtualPatchesSubscriptionGuid(e).then((({data:e})=>e)).catch((e=>Promise.reject(e))),Yy=e=>t=>fp.getVirtualPatchesSubscriptionPurchaseUrl(e).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),By=Nc(Mf,"installationId","subscriptionInfo"),Hy=(e,t)=>n=>fp.activateVirtualPatchesSubscription(e,{subscriptionGuid:t}).then((({data:t})=>(n(By(e,t)),t))).catch((e=>Promise.reject(e))),Vy=e=>t=>fp.detachVirtualPatchesSubscription(e,{confirm:!0}).then((()=>{t(By(e,null))})).catch((e=>(t(_p(e)),Promise.reject()))),$y=e=>t=>fp.calculateVulnerabilityProtectionUsageStatistics(e?{installationsIds:e}:void 0).then((({data:e})=>e)).catch((e=>(t(_p(e)),Promise.reject()))),Wy=(0,U.lazy)((()=>Promise.all([r.e(588),r.e(912)]).then(r.bind(r,2912))));class zy extends U.Component{constructor(e){super(e),this.componentDidUpdate=e=>{e.isOpen!==this.props.isOpen&&this.props.isOpen&&(this.props.actions.loadSettingsIfFirstOpen(),this.updateFormValues(),this.updateLicenseInfoState()),e.messages!==this.props.messages&&this.setMessages(this.props.messages),e.settings!==this.props.settings&&this.setFormValues()},this.setMessages=e=>this.setState({messages:e}),this.updateFormValues=()=>this.props.isLoaded&&this.setFormValues(),this.updateLicenseInfoState=()=>{const{getLicenseInfo:e}=this.props.appActions;this.setState({isLicenseInfoLoading:!0}),e().finally((()=>{this.setState({isLicenseInfoLoading:!1})}))},this.handleUpdateLicense=()=>{var e;const{appActions:{updateLicenseInfo:t},instancesActions:{getInstancesData:n}}=this.props,s=null===(e=this.props.virtualPatchesLicenseInfo)||void 0===e?void 0:e.installationsLimit;this.setState({isLicenseInfoLoading:!0}),t().then((e=>{var t;(null===(t=e.virtualPatches)||void 0===t?void 0:t.installationsLimit)!==s&&n().catch((()=>{}))})).catch((()=>{})).finally((()=>{this.setState({isLicenseInfoLoading:!1})}))},this.setFormValues=()=>this.props.settings&&this.setState({formValues:Object.keys(this.props.settings).reduce(((e,t)=>{const n=this.props.settings[t];return e[t]=Object.keys(n).reduce(((e,t)=>(e[t]=n[t].type===ih?Number(n[t].value):n[t].value,e)),{}),e}),{})}),this.isFormFieldDisabled=({disabledWhenChecked:e})=>!!e&&Object.values(this.state.formValues).some((t=>t.hasOwnProperty(e)&&!!t[e])),this.deleteMessage=e=>{this.setState((t=>({messages:t.messages.filter((({key:t})=>t!==e))})))},this.handleFormSubmit=()=>this.props.actions.updateSettings(this.state.formValues).finally((()=>{const{isUpdated:e,actions:{closeDrawer:t},appActions:{addSuccessMessage:n,addWarningMessage:s,getInitialOptions:i}}=this.props,{messages:a}=this.state;e&&(t(),i(),a&&a.length&&a.forEach((({status:e,message:t})=>{e!==nu?s(t):n(t)})))})),this.handleChangeFormField=(e,t,n)=>this.setState((s=>{const i=Object.assign({},s.formValues);return i[e][t]=n,{formValues:i}})),this.getPaidFeatureDescription=e=>{switch(e){case cu:return(0,L.jsx)(Ac,{content:"paidFeature.cloneFeatureDescription"});case uu:return(0,L.jsx)(Ac,{content:"paidFeature.copyDataFeatureDescription"});default:return null}},this.renderFormFieldLabel=(e,t)=>t.isFeaturePreview?(0,L.jsx)(gm,{uatAction:"CLICK_EXT_BUY_FROM_SETTINGS",featureName:t.paidFeatureName,description:this.getPaidFeatureDescription(t.paidFeatureName),children:(0,L.jsx)(Ac,{content:`settings.${e}`})}):(0,L.jsx)(Ac,{content:`settings.${e}`}),this.renderDropdownControl=({value:e,options:t,onChange:n,size:s,disabled:i=!1})=>(0,L.jsx)(Ta,{value:e,onChange:n,disabled:i,size:s,children:t?Object.keys(t).map((e=>(0,L.jsx)(wa,{value:e,children:t[e]},e))):[]}),this.renderForm=()=>{const{baseClassName:e,settings:t,isSubmitted:n,isNotificationFeatureEnabled:s}=this.props,{formValues:i}=this.state;return t&&i?(0,L.jsxs)("div",{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"settings.title"})}),(0,L.jsxs)(as,{children:[(0,L.jsx)("span",{className:`${e}__required`,children:"*"})," - ",(0,L.jsx)(Ac,{content:"settings.requiredAsteriskDescription"})]}),Object.keys(t).map((a=>{const r=t[a],o=Object.keys(r).filter((e=>"text"===r[e].type)),l=Object.keys(r).filter((e=>r[e].type===ih&&!r[e].isHidden)),c=Object.keys(r).filter((e=>"select"===r[e].type));return 0===o.length&&0===l.length&&0===c.length?null:(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:`settings.${a}Section`}),className:`${e}__form-section`,children:[s&&"general"===a&&!1,"general"===a&&this.renderHireDeveloperForm(),o.map((e=>{const t=r[e];return(0,L.jsxs)(ui,{name:`${a}[${e}]`,label:this.renderFormFieldLabel(e,t),required:t.required&&!t.isFeaturePreview,description:t.hint&&(0,L.jsx)(Ac,{content:`settings.${e}Hint`}),children:[(0,L.jsx)(vn,{type:"text",disabled:n||t.isFeaturePreview||this.isFormFieldDisabled(t),size:t.size?t.size:"md",value:i[a][e],onChange:t=>this.handleChangeFormField(a,e,t.target.value)}),t.description&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-mgl-5"}),children:(0,L.jsx)(Ac,{content:`settings.${e}Description`})})]},`${a}-${e}`)})),c.map((e=>{const t=r[e];return(0,L.jsxs)(ui,{name:`${a}[${e}]`,label:this.renderFormFieldLabel(e,t),required:t.required&&!t.isFeaturePreview,children:[this.renderDropdownControl({options:t.options,disabled:n||t.isFeaturePreview,value:i[a][e],onChange:t=>this.handleChangeFormField(a,e,t),size:t.size}),t.description&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-mgl-5"}),children:(0,L.jsx)(Ac,{content:`settings.${e}Description`})})]},`${a}-${e}`)})),0!==l.length&&(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:`settings.${a}SectionCheckboxGroupLabel`}),className:"wpt-mgt-10",children:l.map((e=>{const t=r[e];return(0,L.jsxs)("div",{className:"wpt-mgb-10",children:[(0,L.jsx)(it,{name:`${a}[${e}]`,checked:i[a][e],disabled:n||t.isFeaturePreview,onChange:t=>this.handleChangeFormField(a,e,Number(t)),"data-test-id":`${a}-${e}`,children:this.renderFormFieldLabel(e,t)}),t.description&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-mgl-5"}),children:(0,L.jsx)(Ac,{content:`settings.${e}Description`})})]},`${a}-${e}`)}))})]},a)}))]}):null},this.handleOpenNotificationsDrawer=()=>this.setState({isNotificationsDrawerOpened:!0}),this.handleCloseNotificationDrawer=()=>this.setState({isNotificationsDrawerOpened:!1}),this.renderNotificationsDrawer=()=>{const{settings:e,baseClassName:t,vulnerabilityFeatureEnabled:n}=this.props,{formValues:s,isNotificationsDrawerOpened:i}=this.state;return e&&s?(0,L.jsx)(zi,{className:`${t}-notifications`,title:(0,L.jsx)(Ac,{content:"settings.notifications.drawerTitle"}),onClose:this.handleCloseNotificationDrawer,size:"sm",backButton:!0,"data-type":"settings",isOpen:i,children:(0,L.jsxs)("table",{children:[(0,L.jsx)("caption",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.caption"})}),(0,L.jsx)("thead",{children:(0,L.jsxs)("tr",{children:[(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.head.columnHead.event"})}),(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.head.columnHead.administrator"})}),(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.head.columnHead.reseller"})}),(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.head.columnHead.client"})})]})}),(0,L.jsxs)("tbody",{children:[(0,L.jsxs)("tr",{children:[(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.row.autoUpdates"})}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelAdminAutoUpdatesNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelResellerAutoUpdatesNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelClientAutoUpdatesNotificationEnabled")})]}),(0,L.jsxs)("tr",{children:[(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.row.quarantine"})}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelAdminSuspiciousInstanceNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelResellerSuspiciousInstanceNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelClientSuspiciousInstanceNotificationEnabled")})]}),(0,L.jsxs)("tr",{children:[(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.row.blacklisted"})}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelAdminBlocklistedPluginDeactivatedNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelResellerBlocklistedPluginDeactivatedNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelClientBlocklistedPluginDeactivatedNotificationEnabled")})]}),n&&(0,L.jsxs)("tr",{children:[(0,L.jsx)("th",{children:(0,L.jsx)(Ac,{content:"settings.notifications.table.row.vulnerabilityFound"})}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelAdminVulnerabilityFoundNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelResellerVulnerabilityFoundNotificationEnabled")}),(0,L.jsx)("td",{children:this.renderNotificationsSettingsCheckBox("cpanelClientVulnerabilityFoundNotificationEnabled")})]})]})]})}):null},this.renderNotificationsSettingsCheckBox=(e,t=!1)=>{const{formValues:n}=this.state,{isSubmitted:s}=this.props;return(0,L.jsx)(it,{name:`general[${e}]`,tooltip:(0,L.jsx)(Ac,{content:`settings.notifications.table.data.${e}.tooltip`}),checked:n.general[e],disabled:s||t,onChange:t=>this.handleChangeFormField("general",e,Number(t)),"data-test-id":`general-${e}`})},this.handleOpenChangelog=()=>this.setState({isChangelogOpened:!0,isChangelogLoaded:!1},(()=>{const{appActions:{loadChangelog:e}}=this.props;e().then((()=>{this.setState({isChangelogLoaded:!0})})).catch((()=>{this.setState({isChangelogLoaded:!1},this.handleCloseChangelog)}))})),this.handleCloseChangelog=()=>this.setState({isChangelogOpened:!1}),this.handleOpenPremiumUsersDrawer=()=>this.setState({showPremiumUsersDrawer:!0,isPremiumUsersLoading:!0},(()=>{const{appActions:{getPremiumUsers:e}}=this.props;e().then((e=>{e.status&&e.status===su&&this.handleClosePremiumUsersDrawer()})).finally((()=>this.setState({isPremiumUsersLoading:!1})))})),this.handleClosePremiumUsersDrawer=()=>this.setState({showPremiumUsersDrawer:!1}),this.renderChangelogLink=()=>{const{isAdmin:e}=this.props;return e?(0,L.jsx)(fe,{onClick:this.handleOpenChangelog,style:{marginLeft:"16px"},children:(0,L.jsx)(Ac,{content:"general-ui.changelog.open"})}):null},this.renderChangelogDrawer=()=>{const{isChangelogOpened:e,isChangelogLoaded:t}=this.state,{meta:n,changelog:s}=this.props;return e?(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"general-ui.changelog.drawerTitle"}),subtitle:(0,L.jsx)(Ac,{content:"general-ui.wptk-version",params:n}),onClose:this.handleCloseChangelog,"data-type":"changelog",size:"md",backButton:!0,isOpen:!0,children:[!t&&(0,L.jsx)(It,{}),t&&s&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("div",{tabIndex:0,className:"wpt-pul-alert wpt-pul-alert--info wpt-pul-status-message wpt-pul-status-message--info",children:(0,L.jsx)(Pi,{intent:"info",children:(0,L.jsx)(Ac,{content:"general-ui.changelog.availableOnInEnglish"})})}),(0,L.jsx)(Or,{children:s})]})]}):null},this.renderHireDeveloperForm=()=>{if(!this.props.hireDeveloperFeatureEnabled)return null;const{formValues:e}=this.state;return(0,L.jsx)(Si,{values:null==e?void 0:e.general,onFieldChange:(e,t)=>this.handleChangeFormField("general",e,t),cancelButton:!1,submitButton:!1,applyButton:!1,vertical:!0,children:(0,L.jsx)(oa,{label:(0,L.jsx)(Ac,{content:"general-ui.hireDeveloper.label"}),name:"hireDeveloperFeatureSource",options:[{value:"none",label:(0,L.jsx)(Ac,{content:"general-ui.hireDeveloper.source.none"})},{value:"codeable",label:(0,L.jsx)(Ac,{content:"general-ui.hireDeveloper.source.codeable"})},{value:"custom",label:(0,L.jsx)(Ac,{content:"general-ui.hireDeveloper.source.custom"}),indentFields:[(0,L.jsx)(ga,{name:"hireDeveloperFeatureHref",label:null,required:!0},"uri")]}]})})},this.renderPremiumUsersDrawer=()=>{const{showPremiumUsersDrawer:e,isPremiumUsersLoading:t}=this.state,{premiumUsers:n}=this.props,s=[{key:"userName",title:(0,L.jsx)(Ac,{content:"premiumUsersDrawer.columns.userName"})}],i=n?n.map(((e,t)=>({key:`premium-user-${t}`,userName:e.userName}))):[];return(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"premiumUsersDrawer.drawerTitle"}),onClose:this.handleClosePremiumUsersDrawer,"data-type":"premiumUsers",size:"md",backButton:!0,isOpen:e,children:[t&&(0,L.jsx)(It,{}),!t&&(0,L.jsx)(Wa,{columns:s,data:i})]})},this.handleOpenSwagger=()=>this.setState({isSwaggerUiVisible:!0}),this.handleCloseSwagger=()=>this.setState({isSwaggerUiVisible:!1}),this.renderSwaggerDrawer=()=>{const{urls:{restApiUrl:e}}=this.props,{isSwaggerUiVisible:t}=this.state;return(0,L.jsx)(zi,{title:(0,L.jsx)(Ac,{content:"api.swaggerUi.drawerTitle"}),"data-type":"swagger-ui",size:"lg",backButton:!0,onClose:this.handleCloseSwagger,isOpen:t,children:(0,L.jsx)(Pm,{onRefresh:()=>window.location.reload(),children:(0,L.jsx)(U.Suspense,{fallback:(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"api.swaggerUi.loadingSwaggerLibrary"})}),children:(0,L.jsx)(Wy,{url:`${e}/v1/specification/public`})})})})},this.state={messages:null,formValues:null,isChangelogOpened:!1,isChangelogLoaded:!1,showPremiumUsersDrawer:!1,isPremiumUsersLoading:!1,isNotificationsDrawerOpened:!1,isSwaggerUiVisible:!1,isLicenseInfoLoading:!1}}renderMessages(){const{isUpdated:e}=this.props,{messages:t}=this.state;return t?e?null:t.map((({key:e,status:t,message:n})=>{const s=t===su?lu:t;return(0,L.jsx)(ge,{intent:s,onClose:()=>this.deleteMessage(e),children:n},e)})):null}renderPremiumUsersUsage(){const{premiumUsersUsedTotal:e,baseClassName:t}=this.props;return _m()&&null!==e?(0,L.jsxs)(Rr,{intent:"info",children:[(0,L.jsx)(Ac,{content:"general-ui.wptk-license-used-unlimited",params:{usedTotal:e}}),e>0&&(0,L.jsxs)(U.Fragment,{children:[" ",(0,L.jsx)(wn,{onClick:this.handleOpenPremiumUsersDrawer,className:`${t}__premium-users-link`,children:(0,L.jsx)(Ac,{content:"settings.viewCpanelPremiumUsersLink"})})]})]}):null}renderSwaggerLink(){return _m()?(0,L.jsxs)(Rr,{intent:"info",children:[(0,L.jsx)(Ac,{content:"api.swaggerUi.description"})," ",(0,L.jsx)(wn,{onClick:this.handleOpenSwagger,children:(0,L.jsx)(Ac,{content:"api.swaggerUi.openDrawer"})})]}):null}renderLicenseUsage(){const{virtualPatchesLicenseInfo:e,virtualPatchesFeatureEnabled:t,isWpgLicense:n}=this.props;if(!t)return null;const s=e&&(0!==(null==e?void 0:e.installationsLimit)||n);if(!s)return null;const i=-1===e.installationsLimit;let a="info";!s||i?a="info":e.installationsActive>e.installationsLimit||n&&0===e.installationsLimit?a="danger":e.installationsActive>=.8*e.installationsLimit&&(a="warning");let r="general-ui.virtual-patching.licenseUsed";return n&&-1===e.installationsLimit?r="general-ui.virtual-patching.externalLicenseUnlimited":n&&0===e.installationsLimit?r="general-ui.virtual-patching.externalLicenseLimitReached":n?r="general-ui.virtual-patching.externalLicenseUsed":-1===e.installationsLimit&&(r="general-ui.virtual-patching.licenseUnlimited"),this.state.isLicenseInfoLoading?(0,L.jsx)(It,{}):(0,L.jsxs)(Rr,{intent:a,children:[s&&(0,L.jsx)("span",{"data-test-id":"license-usage-display",children:(0,L.jsx)(Ac,{content:r,params:e})}),!1]})}render(){const{meta:e,baseClassName:t,isOpen:n,actions:{closeDrawer:s},isRequested:i,formErrors:a,isLoadingError:r,isSubmitted:o,isNotificationFeatureEnabled:l,options:{showSwaggerUiOnCpanel:c}}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"settings.drawerTitle"}),isOpen:n,onClose:s,size:"sm","data-type":"settings","data-test-id":"global-settings-drawer",form:!i&&{onSubmit:this.handleFormSubmit,hideRequiredLegend:!0,errors:a||{},state:o?"submit":void 0,submitButton:{children:o?(0,L.jsx)(Ac,{content:"settings.submittingButton"}):(0,L.jsx)(Ac,{content:"settings.submitButton"}),disabled:r,"data-test-id":"save-button"},applyButton:!1,cancelButton:{onClick:s,children:(0,L.jsx)(Ac,{content:"settings.cancelButton"}),"data-test-id":"cancel-button"},vertical:!0},children:[i&&(0,L.jsx)(It,{}),!i&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("div",{className:"wpt-pul-alert wpt-pul-alert--info wpt-pul-status-message wpt-pul-status-message--info",children:(0,L.jsxs)(Pi,{intent:"info",children:[(0,L.jsx)(Ac,{content:"general-ui.wptk-version",params:e}),this.renderChangelogLink()]})}),this.renderPremiumUsersUsage(),this.renderLicenseUsage(),c&&this.renderSwaggerLink(),(0,L.jsxs)("div",{className:t,children:[this.renderMessages(),this.renderForm()]}),this.renderChangelogDrawer(),this.renderPremiumUsersDrawer(),l&&this.renderNotificationsDrawer()]})]}),this.renderSwaggerDrawer()]})}}zy.propTypes={meta:Vt().shape({version:Vt().string.isRequired,revision:Vt().string.isRequired}).isRequired,premiumUsersUsedTotal:Vt().number,isOpen:Vt().bool.isRequired,isLoaded:Vt().bool.isRequired,isLoadingError:Vt().bool.isRequired,isSubmitted:Vt().bool.isRequired,isRequested:Vt().bool.isRequired,isUpdated:Vt().bool.isRequired,settings:Vt().object,messages:Vt().array,formErrors:Vt().bool,actions:Vt().shape({closeDrawer:Vt().func.isRequired,loadSettingsIfFirstOpen:Vt().func.isRequired,updateSettings:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addWarningMessage:Vt().func.isRequired,addSuccessMessage:Vt().func.isRequired,loadChangelog:Vt().func.isRequired,getPremiumUsers:Vt().func.isRequired,getInitialOptions:Vt().func.isRequired,getLicenseInfo:Vt().func.isRequired,updateLicenseInfo:Vt().func.isRequired}).isRequired,instancesActions:Vt().shape({getInstancesData:Vt().func.isRequired}).isRequired,baseClassName:Vt().string,changelog:Vt().string,isAdmin:Vt().bool.isRequired,premiumUsers:Vt().arrayOf(Vt().shape({userName:Vt().string.isRequired})),isNotificationFeatureEnabled:Vt().bool.isRequired,vulnerabilityFeatureEnabled:Vt().bool.isRequired,virtualPatchesFeatureEnabled:Vt().bool.isRequired,virtualPatchesLicenseInfo:Vt().shape({installationsLimit:Vt().number.isRequired,installationsActive:Vt().number.isRequired}),urls:Vt().shape({restApiUrl:Vt().string.isRequired}).isRequired,options:Vt().shape({showSwaggerUiOnCpanel:Vt().bool.isRequired}).isRequired},zy.defaultProps={premiumUsersUsedTotal:null,settings:null,messages:[],formErrors:[],baseClassName:`${gu}settings`,changelog:null,premiumUsers:null,virtualPatchesLicenseInfo:null};const qy=(0,so.$j)((e=>({meta:e.app.buildMeta,premiumUsersUsedTotal:e.app.options.premiumUsersUsedTotal,isOpen:e.settings.drawerIsOpen,isLoaded:e.settings.status!==du,isLoadingError:e.settings.status===mu,isRequested:e.settings.status===pu,isSubmitted:e.settings.status===hu,isUpdated:e.settings.status===fu,messages:e.settings.messages,formErrors:e.settings.formErrors,settings:e.settings.settings,changelog:e.app.options.changelog,isAdmin:e.app.options.isAdmin,premiumUsers:e.app.premiumUsers,isNotificationFeatureEnabled:e.app.options.isNotificationFeatureEnabled,vulnerabilityFeatureEnabled:e.app.options.vulnerabilityFeature,virtualPatchesFeatureEnabled:e.app.options.virtualPatchesFeature,hireDeveloperFeatureEnabled:e.app.options.hireDeveloperFeature,virtualPatchesLicenseInfo:e.app.licenseInfo.virtualPatches,urls:e.app.urls,options:e.app.options,isWpgLicense:e.app.options.isWpgLicense})),(n=>({actions:nh(t,n),appActions:nh(e,n),instancesActions:nh({getInstancesData:nv},n)})))(zy);class Gy extends U.Component{constructor(){super(...arguments),this.state={loginUrl:"",credentials:{login:"",password:""},windowTarget:void 0},this.componentDidUpdate=e=>{e.loginToInstanceId!==this.props.loginToInstanceId&&this.handleLogin()},this.formRef=null,this.handleLogin=()=>{var e;if(this.props.installation&&!(null===(e=this.props.installation.features.credentials)||void 0===e?void 0:e.available)||!this.props.loginUrl||!this.props.loginCredentials)return;const{loginUrl:t,loginCredentials:{login:n,password:s},windowTarget:i,loginToInstancePerformed:a,addWarningMessage:r,seemsLikePopupBlockerIsEnabledTranslateKey:o}=this.props;this.setState({loginUrl:t,credentials:{login:n,password:s},windowTarget:i},(()=>{try{this.formRef&&this.formRef.submit(),this.setState({loginUrl:"",credentials:{login:"",password:""}}),a()}catch(e){r((0,L.jsx)(Ac,{content:o}))}}))}}render(){if(!this.props.loginToInstanceId)return null;const{loginUrl:e,credentials:{login:t,password:n},windowTarget:s}=this.state;return(0,L.jsxs)("form",{target:s,ref:e=>this.formRef=e,method:"POST",action:e,style:{display:"none"},children:[(0,L.jsx)("input",{type:"hidden",name:"log",value:t}),(0,L.jsx)("input",{type:"hidden",name:"pwd",value:n})]})}}Gy.defaultProps={loginToInstanceId:null,installation:null,loginUrl:null,loginCredentials:null,windowTarget:null,seemsLikePopupBlockerIsEnabledTranslateKey:"loginToInstance.seemsLikePopupBlockerIsEnabled"};const Ky=Gy,Xy=e=>(0,L.jsx)(Ky,{loginToInstanceId:e.loginToInstanceId,installation:e.installation,loginUrl:e.loginUrl,loginCredentials:e.loginCredentials,windowTarget:e.windowTarget,loginToInstancePerformed:e.loginToInstancePerformed,addWarningMessage:e.addWarningMessage});Xy.propTypes={loginToInstanceId:Vt().string,installation:Vt().shape({features:Vt().shape({credentials:Vt().shape({available:Vt().bool.isRequired})}).isRequired,id:Vt().number.isRequired}),loginUrl:Vt().string,loginCredentials:Vt().shape({login:Vt().string.isRequired,password:Vt().string.isRequired}),windowTarget:Vt().string,loginToInstancePerformed:Vt().func.isRequired,addWarningMessage:Vt().func.isRequired},Xy.defaultProps={loginToInstanceId:null,loginUrl:null,installation:null,loginCredentials:null,windowTarget:null};const Zy={loginToInstancePerformed:py,addWarningMessage:Tp},Jy=(0,so.$j)((e=>{const{loginToInstanceId:t,installations:n,loginUrl:s,loginCredentials:i,windowTarget:a}=e.instances,r=t&&n?n.find((e=>e.id===parseInt(t.split("_").shift()))):null;return{loginToInstanceId:t,installation:r,loginUrl:s,loginCredentials:i,windowTarget:a}}),Zy)(Xy),Qy="instances",e_="plugins",t_="themes",n_="sets",s_="servers";class i_ extends U.Component{constructor(){super(...arguments),this.resetSearch=()=>this.props.setSearch(""),this.handleTyping=e=>{clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((()=>this.props.setSearch(e)),500)},this.getTabs=()=>{const{isAdmin:e,isRemoteWptAvailable:t,isSetsManagementAvailable:n}=this.props,s=t&&e,i=[];return i.push(this.getInstancesTab()),i.push(this.getPluginsTab()),i.push(this.getThemesTab()),n&&i.push(this.getSetsTab()),s&&i.push(this.getServersTab()),i},this.hasBlockedPluginInSets=()=>{const{listOfSets:e,blockedPlugins:t}=this.props;if(e&&t.length){const n=new Set(e.reduce(((e,t)=>e.concat(t.plugins.map((e=>e.name)))),[]));return t.some((e=>n.has(e)))}return!1}}componentDidMount(){this.resetSearch()}go(e){const{baseUrl:t}=this.props;window.location.href=t+e}push(e){const{history:t}=this.props;this.resetSearch(),t.push(e)}getInstancesTab(){return{handleActivate:()=>this.push("/list"),title:(0,L.jsx)(Ac,{content:"general-ui.tabs.instances"}),"data-test-id":"tab-instances",key:Qy}}getPluginsTab(){return{handleActivate:()=>this.push("/plugins"),title:(0,L.jsx)(Ac,{content:"general-ui.tabs.plugins"}),"data-test-id":"tab-plugins",key:e_}}getThemesTab(){return{handleActivate:()=>this.push("/themes"),title:(0,L.jsx)(Ac,{content:"general-ui.tabs.themes"}),"data-test-id":"tab-themes",key:t_}}getSetsTab(){let e=(0,L.jsx)(Ac,{content:"general-ui.tabs.sets"});return this.hasBlockedPluginInSets()&&(e=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ac,{content:"general-ui.tabs.sets"})," ",(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"general-ui.tabs.sets.haveBlockedPlugin"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning"})})]})),{handleActivate:()=>this.push("/sets"),title:e,icon:this.props.isSetsUnpaid?(0,L.jsx)(he,{name:"lock-closed"}):null,"data-test-id":"tab-sets",key:n_}}getServersTab(){return{handleActivate:()=>this.push("/servers"),title:(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"general-ui.tabs.remoteServersTooltip"}),children:(0,L.jsx)(Ac,{content:"general-ui.tabs.remoteServers"})}),"data-test-id":"tab-remote-servers",key:s_}}getHeading(){const{isAdmin:e,baseClassName:t,cpanelWptHelpButtonUrl:n,settingsActions:{openDrawer:s},isUnpaid:i,upgradeUrl:a}=this.props;return(0,L.jsxs)("div",{className:`${t}__heading`,children:[(0,L.jsx)("div",{className:`${t}__heading__title`,children:(0,L.jsx)("h2",{children:(0,L.jsx)(Ac,{content:"general-ui.title"})})}),(0,L.jsxs)("div",{className:`${t}__heading__toolbar`,children:[i&&(0,L.jsx)("div",{className:`${t}__heading__toolbar__element`,children:(0,L.jsx)(dm,{uatAction:"CLICK_EXT_BUY_FROM_HEADER",purchaseLicenseUrl:a,children:(0,L.jsx)(Ac,{content:"general-ui.buttonUpgrade"})})}),e&&(0,L.jsx)("div",{className:`${t}__heading__toolbar__element`,children:(0,L.jsx)(fe,{icon:"sliders",onClick:s,"data-test-id":"global-settings-button",children:(0,L.jsx)(Ac,{content:"general-ui.settings"})})}),!1]})]})}render(){const{baseClassName:e}=this.props,t=this.getTabs(),n=t.map((e=>e.key)).indexOf(this.props.activeTab)+1;return(0,L.jsxs)("div",{className:e,children:[this.getHeading(),(0,L.jsx)(Br,{search:(0,L.jsx)($r,{onTyping:this.handleTyping}),active:n,children:t.map((e=>(0,L.jsx)(Fr,{onActivate:e.handleActivate,title:e.title,"data-test-id":e["data-test-id"],children:this.props.children},e.key)))}),(0,L.jsx)(qy,{}),(0,L.jsx)(Jy,{})]})}}i_.defaultProps={activeTab:Qy,baseClassName:`${gu}layout`,listOfSets:null};const a_=To((0,so.$j)((e=>({baseUrl:e.app.urls.baseUrl,isAdmin:e.app.options.isAdmin,isSetsManagementAvailable:e.app.options.isSetsManagementAvailable,isRemoteWptAvailable:e.app.options.isRemoteWptAvailable,cpanelWptHelpButtonUrl:e.app.options.cpanelWptHelpButtonUrl,isUnpaid:e.app.unpaidFeatures.wp_toolkit,upgradeUrl:e.app.urls.featuresBuyLinks.wp_toolkit,isSetsUnpaid:e.app.unpaidFeatures.sets,listOfSets:e.sets.list,blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})),(e=>({settingsActions:nh({openDrawer:gh},e),setSearch:nh(Pp,e)})))(i_));var r_=r(38087);function o_(e,t){void 0===t&&(t={});var n=function(e){return e&&"j"===e[0]&&":"===e[1]?e.substr(2):e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var l_=function(){return l_=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},l_.apply(this,arguments)},c_=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?r_.Q(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=r_.Q(document.cookie,e))},e.prototype._emitChange=function(e){for(var t=0;t<this.changeListeners.length;++t)this.changeListeners[t](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),o_(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var s in this.cookies)n[s]=o_(this.cookies[s],e);return n},e.prototype.set=function(e,t,n){var s;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=l_(l_({},this.cookies),((s={})[e]=t,s)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r_.q(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=l_(l_({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=l_({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r_.q(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}();const u_=c_,d_=u_;var p_=U.createContext(new d_),h_=p_.Provider,m_=p_.Consumer,f_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}(),g_=function(){return g_=Object.assign||function(e){for(var t,n=1,s=arguments.length;n<s;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},g_.apply(this,arguments)},b_=r(8679);function v_(e){var t=e.displayName||e.name,n=function(n){function s(){var e=null!==n&&n.apply(this,arguments)||this;return e.onChange=function(){e.forceUpdate()},e}return f_(s,n),s.prototype.listen=function(){this.props.cookies.addChangeListener(this.onChange)},s.prototype.unlisten=function(e){(e||this.props.cookies).removeChangeListener(this.onChange)},s.prototype.componentDidMount=function(){this.listen()},s.prototype.componentDidUpdate=function(e){e.cookies!==this.props.cookies&&(this.unlisten(e.cookies),this.listen())},s.prototype.componentWillUnmount=function(){this.unlisten()},s.prototype.render=function(){var t=this.props,n=t.forwardedRef,s=t.cookies,i=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(t,["forwardedRef","cookies"]),a=s.getAll();return U.createElement(e,g_({},i,{ref:n,cookies:s,allCookies:a}))},s.displayName="withCookies("+t+")",s.WrappedComponent=e,s}(U.Component),s=U.forwardRef((function(e,t){return U.createElement(m_,null,(function(s){return U.createElement(n,g_({cookies:s},e,{forwardedRef:t}))}))}));return s.displayName=n.displayName,s.WrappedComponent=n.WrappedComponent,b_(s,e)}const y_="plugins/UPDATE_PLUGINS_PAGE",__="plugins/RESET_PLUGINS_PAGE",x_="plugins/RELOAD_PLUGINS_FINISHED",S_="plugins/INSTALL_PLUGINS_STARTED",w_="plugins/ACTIVATE_PLUGINS_STARTED",k_="plugins/DEACTIVATE_PLUGINS_STARTED",j_="plugins/UNINSTALL_PLUGINS_STARTED",T_="plugins/REMOVE_PLUGINS_STARTED",C_="plugins/UPDATE_PLUGINS_STARTED",D_="plugins/UPLOAD_AND_INSTALL_PLUGIN_TASK_STARTED",P_=Nc(y_,"plugins","instances","sets"),I_=()=>Hf(yd.getPluginsList,(e=>P_(e.data.plugins,e.data.instances,e.data.sets))),O_=Nc(__),L_=Nc(x_,"pluginsToUpdate","newPluginsData"),M_=(e,t)=>Bf((()=>yd.loadPluginsData(e)),((n,s)=>{n(L_(e,s.data.plugins)),t&&t()})),A_=Nc("plugins/SEARCH_PLUGINS_FINISHED"),E_=e=>Hf((()=>yd.searchPlugins(e)),A_),U_=Nc(S_,"task"),R_=Nc("plugins/INSTALL_PLUGINS_FINISHED"),N_=(e,t,n)=>Hf((()=>yd.installPlugins(e,t,n)),(e=>U_(e.data.task))),F_=Nc("plugins/UPLOAD_PLUGIN_TO_STORAGE_FINISHED","pluginInfo"),Y_=(e,t)=>Hf((()=>yd.uploadPluginToStorage(e,t)),(e=>F_(e.data))),B_=Nc("plugins/UPLOAD_AND_INSTALL_PLUGIN_TASK_FINISHED"),H_=Nc(D_,"task"),V_=(e,t,n)=>Hf((()=>yd.uploadAndInstallPlugin(e,t,n)),(e=>H_(e.data.task))),$_=Nc(w_,"task"),W_=Nc("plugins/ACTIVATE_PLUGINS_FINISHED"),z_=e=>Hf((()=>yd.activatePlugins(e)),(e=>$_(e.data.task))),q_=Nc(k_,"task"),G_=Nc("plugins/DEACTIVATE_PLUGINS_FINISHED"),K_=e=>t=>yd.deactivatePlugins(e).then((({data:e})=>(t(xp(e,(()=>t(q_(e.data.task))))),e))),X_=Nc(j_,"task"),Z_=Nc("plugins/UNINSTALL_PLUGINS_FINISHED"),J_=e=>Hf((()=>yd.uninstallPlugins(e)),(e=>X_(e.data.task))),Q_=Nc(T_,"task"),ex=Nc("plugins/REMOVE_PLUGINS_FINISHED"),tx=e=>Hf((()=>yd.removePlugins(e)),(e=>Q_(e.data.task))),nx=Nc(C_,"task"),sx=Nc("plugins/UPDATE_PLUGINS_FINISHED"),ix=e=>Hf((()=>yd.updatePlugins(e)),(e=>nx(e.data.task))),ax=(e,t)=>e.reduce(((e,n)=>(0,L.jsxs)(U.Fragment,{children:[e,t,n]}))),rx=(0,so.$j)(null,(e=>({pushUrl:t=>e(Ao(t))})))((({id:e,name:t,pushUrl:n})=>(0,L.jsx)("a",{onClick:()=>n(`/list/id/${e}`),children:t}))),ox=({url:e})=>(0,L.jsx)(fe,{href:e,target:"_blank",children:e});class lx extends U.Component{constructor(e){super(e),this.handleInstancesSelectionChange=e=>{this.setState({selectedInstances:e})},this.handleActivateAfterInstallationChange=e=>{this.setState({activateAfterInstallation:e})},this.handleSubmitInstall=()=>{const{onSubmitInstall:e}=this.props,{selectedInstances:t,activateAfterInstallation:n,isInstalling:s}=this.state;s||(this.setState({isInstalling:!0}),e(t.map((e=>parseInt(e))),n).finally((()=>this.setState({isInstalling:!1}))))},this.state={selectedInstances:[],activateAfterInstallation:!0,isInstalling:!1}}render(){const{selectInstancesText:e,backButton:t,drawerTitle:n,asset:s,instances:i,onCloseDrawer:a,showActivateAfterInstallation:r,activateAfterInstallationText:o,instanceNameListTitle:l,instanceUrlListTitle:c}=this.props,{selectedInstances:u,activateAfterInstallation:d,isInstalling:p}=this.state,h=s?s.instances.map((e=>e.id)):[],m=i.filter((e=>!qc(h,e.id))).map((e=>({id:e.id,key:`${e.id}`,name:e.name,url:e.url}))),f={onSubmit:this.handleSubmitInstall,applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"list.assets.installButton"}),"data-test-id":"select-websites-drawer-install-button",disabled:0===u.length||p,state:p?"loading":"active"},cancelButton:{disabled:p}};return(0,L.jsxs)(zi,{title:n,"data-type":"select-instances",onClose:a,backButton:t,isOpen:!0,size:"sm",form:f,children:[(0,L.jsx)(as,{children:e}),(0,L.jsx)(Wa,{columns:[{key:"name",title:l,render:e=>(0,L.jsx)(rx,{id:e.id,name:e.name})},{key:"url",title:c,render:e=>(0,L.jsx)(ox,{url:e.url})}],data:m,selection:u,onSelectionChange:this.handleInstancesSelectionChange,"data-test-id":"available-websites-list"}),r&&(0,L.jsx)("div",{style:{paddingTop:"20px"},children:(0,L.jsx)(Zi,{label:o,value:d,onChange:this.handleActivateAfterInstallationChange,"data-test-id":"activate-after-installation-checkbox"})})]})}}lx.defaultProps={asset:null,backButton:!1,activateAfterInstallationText:null,showActivateAfterInstallation:!1};const cx=lx;class ux extends U.Component{constructor(e){super(e),this.handleSearchTermChange=e=>{this.setState({searchTerm:e.target.value})},this.handleSearchKeyDown=e=>{"Enter"===e.key&&this.isSearchCanBeSubmitted()&&this.handleSearch()},this.handleSearch=()=>{const{onSearchAssets:e}=this.props,{searchTerm:t}=this.state;this.setState({isSearching:!0,availableAssets:null,selectedAssets:[]},(()=>{e(t).then((e=>{this.setState({availableAssets:e})})).finally((()=>{this.setState({isSearching:!1})}))}))},this.handleInstallSelectionChange=e=>{this.setState({selectedAssets:e})},this.handleSubmitInstall=(e,t)=>{const{onInstall:n}=this.props,{selectedAssets:s}=this.state;return n(s,e,t)},this.handleSelectInstances=()=>{this.setState({isSelectingInstances:!0})},this.handleCloseSelectInstances=()=>{this.setState({isSelectingInstances:!1})},this.renderAvailableAssetsList=()=>{const{availableAssets:e}=this.state;return(null==e?void 0:e.length)?this.renderAvailableAssetsListWithItems():this.renderAvailableAssetsEmptyList()},this.state={availableAssets:null,selectedAssets:[],isSearching:!1,isSelectingInstances:!1,searchTerm:""}}normalizeRating(e){return e/100*5}renderAvailableAssetsListWithItems(){const{availableAssets:e,selectedAssets:t}=this.state,{tableTitleTitle:n,tableVersionTitle:s,tableRatingTitle:i,blockedPlugins:a}=this.props,r=[{key:"title",title:n,render:e=>(0,L.jsxs)(L.Fragment,{children:[a.includes(e.key)&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"controllers.index.install-plugin.pluginBlacklistedError"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"})})," ",e.title]})},{key:"version",title:s},{key:"rating",title:i}],o=null==e?void 0:e.map((e=>({key:e.name,title:e.title,version:e.version,rating:(0,L.jsx)(Ur,{value:this.normalizeRating(e.rating)}),disabled:a.includes(e.name)})));return(0,L.jsx)(Wa,{columns:r,data:o,selection:t,onSelectionChange:this.handleInstallSelectionChange,"data-test-id":qh})}renderAvailableAssetsEmptyList(){const{nothingFoundText:e}=this.props;return(0,L.jsx)(as,{children:e})}isSearchCanBeSubmitted(){const{isSearching:e}=this.state;return!e&&this.isSearchFieldValid()}isSearchFieldValid(){const{searchTerm:e}=this.state;return e.trim().length>=3}renderSearchingProgress(){return(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"list.assets.loading"})})}renderSelectInstancesDrawer(){const{instances:e,selectInstancesText:t,showActivateAfterInstallation:n,activateAfterInstallationText:s,instanceNameListTitle:i,instanceUrlListTitle:a}=this.props;return(0,L.jsx)(cx,{onCloseDrawer:this.handleCloseSelectInstances,instances:e,onSubmitInstall:this.handleSubmitInstall,selectInstancesText:t,instanceNameListTitle:i,instanceUrlListTitle:a,drawerTitle:(0,L.jsx)(Ac,{content:"list.assets.selectInstancesDrawerTitle"}),showActivateAfterInstallation:n,activateAfterInstallationText:s,backButton:!0})}render(){const{availableAssets:e,searchTerm:t,isSearching:n,isSelectingInstances:s,selectedAssets:i}=this.state,{drawerTitle:a,headDescription:r,searchDescription:o,onClose:l}=this.props;let c;return e&&e.length>0&&(c={onSubmit:this.handleSelectInstances,applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"list.assets.selectInstancesButton"}),"data-test-id":"install-drawer-select-websites-button",disabled:0===i.length}}),(0,L.jsxs)(zi,{title:a,"data-type":"install-asset",onClose:l,form:c,isOpen:!0,children:[(0,L.jsx)(as,{children:r}),(0,L.jsxs)(as,{children:[(0,L.jsx)(vn,{value:t,onChange:this.handleSearchTermChange,onKeyDown:this.handleSearchKeyDown,"data-test-id":Wh})," ",(0,L.jsx)(Ue,{disabled:!this.isSearchCanBeSubmitted(),icon:"search",onClick:this.handleSearch,"data-test-id":zh}),(0,L.jsx)("br",{}),(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"list.sets.minAssetSearchLength",params:{count:3}})})]}),(0,L.jsx)(as,{children:o}),n&&this.renderSearchingProgress(),e&&this.renderAvailableAssetsList(),s&&this.renderSelectInstancesDrawer()]})}}ux.defaultProps={activateAfterInstallationText:null,showActivateAfterInstallation:!1};const dx=(0,so.$j)((e=>({blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})))(ux);var px=r(70254),hx=r.n(px),mx="undefined"==typeof document||!document||!document.createElement||"multiple"in document.createElement("input");function fx(e,t){return"application/x-moz-file"===e.type||hx()(e,t)}function gx(e){e.preventDefault()}function bx(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function vx(e){return-1!==e.indexOf("Edge/")}const yx={borderStyle:"solid",borderColor:"#c66",backgroundColor:"#eee"},_x={opacity:.5},xx={borderStyle:"solid",borderColor:"#6c6",backgroundColor:"#eee"},Sx={width:200,height:200,borderWidth:2,borderColor:"#666",borderStyle:"dashed",borderRadius:5};var wx=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},kx=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();function jx(e,t){var n={};for(var s in e)t.indexOf(s)>=0||Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=e[s]);return n}var Tx=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));return s.renderChildren=function(e,t,n,i){return"function"==typeof e?e(wx({},s.state,{isDragActive:t,isDragAccept:n,isDragReject:i})):e},s.composeHandlers=s.composeHandlers.bind(s),s.onClick=s.onClick.bind(s),s.onDocumentDrop=s.onDocumentDrop.bind(s),s.onDragEnter=s.onDragEnter.bind(s),s.onDragLeave=s.onDragLeave.bind(s),s.onDragOver=s.onDragOver.bind(s),s.onDragStart=s.onDragStart.bind(s),s.onDrop=s.onDrop.bind(s),s.onFileDialogCancel=s.onFileDialogCancel.bind(s),s.onInputElementClick=s.onInputElementClick.bind(s),s.setRef=s.setRef.bind(s),s.setRefs=s.setRefs.bind(s),s.isFileDialogActive=!1,s.state={draggedFiles:[],acceptedFiles:[],rejectedFiles:[]},s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),kx(t,[{key:"componentDidMount",value:function(){var e=this.props.preventDropOnDocument;this.dragTargets=[],e&&(document.addEventListener("dragover",gx,!1),document.addEventListener("drop",this.onDocumentDrop,!1)),this.fileInputEl.addEventListener("click",this.onInputElementClick,!1),window.addEventListener("focus",this.onFileDialogCancel,!1)}},{key:"componentWillUnmount",value:function(){this.props.preventDropOnDocument&&(document.removeEventListener("dragover",gx),document.removeEventListener("drop",this.onDocumentDrop)),null!=this.fileInputEl&&this.fileInputEl.removeEventListener("click",this.onInputElementClick,!1),window.removeEventListener("focus",this.onFileDialogCancel,!1)}},{key:"composeHandlers",value:function(e){return this.props.disabled?null:e}},{key:"onDocumentDrop",value:function(e){this.node&&this.node.contains(e.target)||(e.preventDefault(),this.dragTargets=[])}},{key:"onDragStart",value:function(e){this.props.onDragStart&&this.props.onDragStart.call(this,e)}},{key:"onDragEnter",value:function(e){var t=this;e.preventDefault(),-1===this.dragTargets.indexOf(e.target)&&this.dragTargets.push(e.target),Promise.resolve(this.props.getDataTransferItems(e)).then((function(e){t.setState({isDragActive:!0,draggedFiles:e})})),this.props.onDragEnter&&this.props.onDragEnter.call(this,e)}},{key:"onDragOver",value:function(e){e.preventDefault(),e.stopPropagation();try{e.dataTransfer.dropEffect=this.isFileDialogActive?"none":"copy"}catch(e){}return this.props.onDragOver&&this.props.onDragOver.call(this,e),!1}},{key:"onDragLeave",value:function(e){var t=this;e.preventDefault(),this.dragTargets=this.dragTargets.filter((function(n){return n!==e.target&&t.node.contains(n)})),this.dragTargets.length>0||(this.setState({isDragActive:!1,draggedFiles:[]}),this.props.onDragLeave&&this.props.onDragLeave.call(this,e))}},{key:"onDrop",value:function(e){var t=this,n=this.props,s=n.onDrop,i=n.onDropAccepted,a=n.onDropRejected,r=n.multiple,o=n.disablePreview,l=n.accept,c=n.getDataTransferItems;e.preventDefault(),this.dragTargets=[],this.isFileDialogActive=!1,this.draggedFiles=null,this.setState({isDragActive:!1,draggedFiles:[]}),Promise.resolve(c(e)).then((function(n){var c=[],u=[];n.forEach((function(e){if(!o)try{e.preview=window.URL.createObjectURL(e)}catch(e){}fx(e,l)&&function(e,t,n){return e.size<=t&&e.size>=n}(e,t.props.maxSize,t.props.minSize)?c.push(e):u.push(e)})),r||u.push.apply(u,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(c.splice(1))),s&&s.call(t,c,u,e),u.length>0&&a&&a.call(t,u,e),c.length>0&&i&&i.call(t,c,e)}))}},{key:"onClick",value:function(e){var t=this.props,n=t.onClick;t.disableClick||(e.stopPropagation(),n&&n.call(this,e),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return bx(e)||vx(e)}()?setTimeout(this.open.bind(this),0):this.open())}},{key:"onInputElementClick",value:function(e){e.stopPropagation(),this.props.inputProps&&this.props.inputProps.onClick&&this.props.inputProps.onClick()}},{key:"onFileDialogCancel",value:function(){var e=this,t=this.props.onFileDialogCancel;this.isFileDialogActive&&setTimeout((function(){null!=e.fileInputEl&&(e.fileInputEl.files.length||(e.isFileDialogActive=!1)),"function"==typeof t&&t()}),300)}},{key:"setRef",value:function(e){this.node=e}},{key:"setRefs",value:function(e){this.fileInputEl=e}},{key:"open",value:function(){this.isFileDialogActive=!0,this.fileInputEl.value=null,this.fileInputEl.click()}},{key:"render",value:function(){var e=this.props,t=e.accept,n=e.acceptClassName,s=e.activeClassName,i=e.children,a=e.disabled,r=e.disabledClassName,o=e.inputProps,l=e.multiple,c=e.name,u=e.rejectClassName,d=jx(e,["accept","acceptClassName","activeClassName","children","disabled","disabledClassName","inputProps","multiple","name","rejectClassName"]),p=d.acceptStyle,h=d.activeStyle,m=d.className,f=void 0===m?"":m,g=d.disabledStyle,b=d.rejectStyle,v=d.style,y=jx(d,["acceptStyle","activeStyle","className","disabledStyle","rejectStyle","style"]),_=this.state,x=_.isDragActive,S=_.draggedFiles,w=S.length,k=l||w<=1,j=w>0&&function(e,t){return e.every((function(e){return fx(e,t)}))}(S,this.props.accept),T=w>0&&(!j||!k),C=!(f||v||h||p||b||g);x&&s&&(f+=" "+s),j&&n&&(f+=" "+n),T&&u&&(f+=" "+u),a&&r&&(f+=" "+r),C&&(v=Sx,h=xx,p=xx,b=yx,g=_x);var D=wx({position:"relative"},v);h&&x&&(D=wx({},D,h)),p&&j&&(D=wx({},D,p)),b&&T&&(D=wx({},D,b)),g&&a&&(D=wx({},D,g));var P={accept:t,disabled:a,type:"file",style:wx({position:"absolute",top:0,right:0,bottom:0,left:0,opacity:1e-5,pointerEvents:"none"},o.style),multiple:mx&&l,ref:this.setRefs,onChange:this.onDrop,autoComplete:"off"};c&&c.length&&(P.name=c),y.acceptedFiles,y.preventDropOnDocument,y.disablePreview,y.disableClick,y.onDropAccepted,y.onDropRejected,y.onFileDialogCancel,y.maxSize,y.minSize,y.getDataTransferItems;var I=jx(y,["acceptedFiles","preventDropOnDocument","disablePreview","disableClick","onDropAccepted","onDropRejected","onFileDialogCancel","maxSize","minSize","getDataTransferItems"]);return U.createElement("div",wx({className:f,style:D},I,{onClick:this.composeHandlers(this.onClick),onDragStart:this.composeHandlers(this.onDragStart),onDragEnter:this.composeHandlers(this.onDragEnter),onDragOver:this.composeHandlers(this.onDragOver),onDragLeave:this.composeHandlers(this.onDragLeave),onDrop:this.composeHandlers(this.onDrop),ref:this.setRef,"aria-disabled":a}),this.renderChildren(i,x,j,T),U.createElement("input",wx({},o,P)))}}]),t}(U.Component);const Cx=Tx;Tx.propTypes={accept:Vt().oneOfType([Vt().string,Vt().arrayOf(Vt().string)]),children:Vt().oneOfType([Vt().node,Vt().func]),disableClick:Vt().bool,disabled:Vt().bool,disablePreview:Vt().bool,preventDropOnDocument:Vt().bool,inputProps:Vt().object,multiple:Vt().bool,name:Vt().string,maxSize:Vt().number,minSize:Vt().number,className:Vt().string,activeClassName:Vt().string,acceptClassName:Vt().string,rejectClassName:Vt().string,disabledClassName:Vt().string,style:Vt().object,activeStyle:Vt().object,acceptStyle:Vt().object,rejectStyle:Vt().object,disabledStyle:Vt().object,getDataTransferItems:Vt().func,onClick:Vt().func,onDrop:Vt().func,onDropAccepted:Vt().func,onDropRejected:Vt().func,onDragStart:Vt().func,onDragEnter:Vt().func,onDragOver:Vt().func,onDragLeave:Vt().func,onFileDialogCancel:Vt().func},Tx.defaultProps={preventDropOnDocument:!0,disabled:!1,disablePreview:!1,disableClick:!1,inputProps:{},multiple:!0,maxSize:1/0,minSize:0,getDataTransferItems:function(e){var t=[];if(e.dataTransfer){var n=e.dataTransfer;n.files&&n.files.length?t=n.files:n.items&&n.items.length&&(t=n.items)}else e.target&&e.target.files&&(t=e.target.files);return Array.prototype.slice.call(t)}};class Dx extends U.Component{constructor(e){super(e),this.validateForm=()=>{const{noInstancesSelectedErrorMessage:e}=this.props,{uploadFile:t,selectedInstanceIds:n}=this.state,s={};return t||(s.fileUpload={noFile:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.errorEmptyArchive"})}),this.isInstancesSelectionAvailable()&&0===n.length&&(s.instances={noInstances:e}),s},this.handleSubmitUpload=()=>{const{onUpload:e}=this.props,{uploadFile:t,selectedSetId:n,selectedInstanceIds:s,isActivateAfterInstallation:i,isUploading:a}=this.state;if(a)return;const r=this.validateForm();Object.keys(r).length>0?this.setState({formErrors:r}):(this.setState({isUploading:!0,formErrors:null}),e({uploadFile:t,setId:""===n?null:n,instanceIds:s.map((e=>parseInt(e))),isActivateAfterInstallation:i}).then((e=>{e.status===su&&e.formErrors&&this.setState({formErrors:e.formErrors})})).finally((()=>this.setState({isUploading:!1}))))},this.handleAcceptUploadFiles=e=>{this.setState({uploadFile:e[0]})},this.handleSelectedSetChange=e=>{this.setState({selectedSetId:e.target.value})},this.handleInstancesSelectionChange=e=>{this.setState({selectedInstanceIds:e})},this.handleActivateAfterInstallationChange=e=>{this.setState({isActivateAfterInstallation:e})},this.state={uploadFile:null,selectedSetId:"",isUploading:!1,selectedInstanceIds:[],isActivateAfterInstallation:!1,formErrors:null}}isInstancesSelectionAvailable(){const{instances:e}=this.props;return null!=e&&e.length>0}getUploadFileHint(){const{uploadFile:e}=this.state;return e?e.name:(0,L.jsx)(Ac,{content:"list.assets.uploadNoFileSelected"})}renderSetsSelector(){const{sets:e,uploadHintForSet:t}=this.props;if(0===(null==e?void 0:e.length))return null;const{selectedSetId:n}=this.state;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:t}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.selectSet"}),children:(0,L.jsxs)("select",{value:n,onChange:this.handleSelectedSetChange,children:[(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.notSelectedSet",component:"option",value:""}),null==e?void 0:e.map((e=>(0,L.jsx)("option",{value:e.id,children:e.name},e.id)))]})})]})}renderInstancesSelector(){const{instances:e,activateAfterInstallationLabel:t,uploadHintForInstances:n}=this.props,{selectedInstanceIds:s,isActivateAfterInstallation:i,formErrors:a}=this.state;if(!this.isInstancesSelectionAvailable())return null;const r=[{key:"name",title:(0,L.jsx)(Ac,{content:"list.instances.url"}),render:e=>(0,L.jsx)(rx,{id:e.id,name:e.name})},{key:"url",title:(0,L.jsx)(Ac,{content:"list.instances.version"}),render:e=>(0,L.jsx)(ox,{url:e.url})}],o=null==e?void 0:e.map((e=>({id:e.id,key:`${e.id}`,name:e.name,url:e.url})));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ui,{errors:a&&a.hasOwnProperty("instances")?a.instances:void 0,label:(0,L.jsx)(Ac,{content:"list.assets.selectInstancesLabel"}),description:n,required:!0,children:(0,L.jsx)(Wa,{columns:r,data:o,selection:s,onSelectionChange:this.handleInstancesSelectionChange})}),(0,L.jsx)("div",{style:{paddingTop:"20px"},children:(0,L.jsx)(Zi,{label:t,value:i,onChange:this.handleActivateAfterInstallationChange})})]})}renderFileSelector(){const{selectLabel:e,baseClassName:t}=this.props,{formErrors:n}=this.state;return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(ui,{label:e,description:this.getUploadFileHint(),errors:n&&n.hasOwnProperty("fileUpload")?n.fileUpload:void 0,required:!0,children:(0,L.jsx)(Cx,{className:`${t}__dropzone`,onDrop:this.handleAcceptUploadFiles,multiple:!1,children:(0,L.jsx)(Ue,{children:(0,L.jsx)(Ac,{content:"list.assets.uploadBrowseButton"})})})})})}render(){const{isUploading:e}=this.state,{drawerTitle:t,onClose:n,baseClassName:s}=this.props,i={onSubmit:this.handleSubmitUpload,applyButton:!1,submitButton:{state:e?"loading":"active",disabled:e},cancelButton:{disabled:e}};return(0,L.jsxs)(zi,{title:t,"data-type":"upload-asset",onClose:n,form:i,isOpen:!0,size:this.isInstancesSelectionAvailable()?"md":"sm",className:s,children:[this.renderFileSelector(),this.renderSetsSelector(),this.renderInstancesSelector()]})}}Dx.defaultProps={sets:[],instances:null,baseClassName:`${gu}upload-asset-drawer`};const Px=Dx;var Ix=r(91036),Ox=r.n(Ix);const Lx=e=>{const t=e.displayName||e.name||"Component",n=t=>{const n=(()=>{const[e,t]=(0,U.useState)([]),n=(0,U.useCallback)((()=>t([])),[]),s=(0,U.useCallback)((n=>{t(e.filter((({key:e})=>e!==n)))}),[e]),i=(0,U.useCallback)((n=>{n=[...n];const s=e.map((e=>e.key));e.forEach((e=>{s.length&&-1===s.indexOf(e.key)&&n.push(e)})),t(n)}),[e]),a=(0,U.useCallback)(((e,t,n=$c(4))=>{i([{key:n,status:ru,message:e,isTranslate:t}])}),[i]),r=(0,U.useCallback)(((e,t,n=$c(4))=>{i([{key:n,status:lu,message:e,isTranslate:t}])}),[i]),o=(0,U.useCallback)(((e,t,n=$c(4))=>{i([{key:n,status:ou,message:e,isTranslate:t}])}),[i]),l=(0,U.useCallback)((()=>e&&e.length?e.map((({key:e,status:t,message:n,icon:i=null,isTranslate:a=!1})=>{if(!t||!n)return null;const r=a?(0,L.jsx)(Ac,{content:n}):(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(n,Object.assign(Object.assign({},Ix.defaults),{transformTags:{a:(e,t)=>({tagName:"a",attribs:Object.assign(Object.assign({},t),{target:"_blank"})})}}))}}),o=t===su?lu:t;return(0,L.jsxs)(ge,{intent:o,className:"wpt-drawer-alert",onClose:()=>s(e),children:[i&&(0,L.jsxs)(L.Fragment,{children:[i," "]}),r]},$c(4))})):null),[e,s]);return{onSetDrawerMessages:i,onClearDrawerMessages:n,onAddDrawerSuccessMessage:a,onAddDrawerErrorMessage:r,onAddDrawerWarningMessage:o,renderDrawerMessages:l}})();return(0,L.jsx)(e,Object.assign({},n,t))};return n.displayName=`withDrawerMessages(${t})`,n},Mx="servers/ADD_SERVER_STARTED",Ax="servers/ADD_SERVER",Ex="servers/UPDATE_SERVER",Ux="servers/SCAN_SERVERS_STARTED",Rx="server/SCAN_FINISHED",Nx="servers/MARK_SCANNING_SERVERS",Fx="servers/UPDATE_SERVERS_LIST",Yx="servers/DISABLE_BETA_DIALOG",Bx="servers/RESET_SERVERS_LIST",Hx="servers/REMOVE_SERVERS",Vx="server/FILTERS_ALL",$x="server/FILTERS_ACTIVE",Wx="servers/SET_INSTANCES_LOG",zx="servers/RESET_INSTANCES_LOG",qx="success",Gx="path",Kx="plain",Xx="password",Zx="autodetect",Jx="paths",Qx="clone/CLONE_STARTED",eS="sync/SYNC_STARTED",tS="asset/GET_AVAILABLE_ASSETS",nS="asset/SET_ASSET_TO_INSTALLING",sS="asset/REMOVE_ASSET_FROM_INSTALLING",iS="asset/UPLOAD_AND_INSTALL_ASSET_TO_SINGLE_INSTANCE",aS="asset/UPLOAD_AND_INSTALL_ASSET_TO_SINGLE_INSTANCE_FINISHED",rS="themes/UPDATE_THEMES_PAGE",oS="themes/RESET_THEMES_PAGE",lS="themes/RELOAD_THEMES_FINISHED",cS="themes/INSTALL_THEMES_STARTED",uS="themes/UPDATE_THEMES_STARTED",dS="themes/UNINSTALL_THEMES_STARTED",pS="themes/REMOVE_THEMES_STARTED",hS="themes/ACTIVATE_THEME_STARTED",mS="plugins/UPLOAD_AND_INSTALL_THEME_TASK_STARTED",fS="backup/SET_INSTANCE_BACKUPS_LIST",gS="backup/REMOVE_INSTANCE_BACKUPS",bS="backup/BACKUP_CREATION_STARTED",vS="backup/BACKUP_RESTORING_STARTED",yS="checkWordPressIntegrity/INSTANCE_CORE_REINSTALLATION_STARTED",_S="mass-security-operation",xS="mass-check-updates",SS=[Mx,Ux,rf,Qm,zm,Xm,af,df,Qx,eS,iS,S_,w_,k_,j_,T_,C_,cS,uS,dS,pS,hS,D_,mS,bf,vf,xf,bS,vS,yS,mg,fg,gg,Df,Tf,ag,og],wS=({className:e="",text:t=""})=>t?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("span",{className:`loading-spinner ${e}`})," ",t]}):(0,L.jsx)("span",{className:`loading-spinner ${e}`});class kS extends U.Component{constructor(){super(...arguments),this.renderPopover=()=>this.props.checkers.map((e=>(0,L.jsxs)("div",{className:"wpt-instances-security-form-list_col-popover_issue",children:[e.title," ",e.description&&e.description.length>0&&(0,L.jsx)(je,{className:"maximum-z-index",title:e.description,children:(0,L.jsx)(he,{name:"info-circle"})})]},e.id)))}render(){const{checkers:e}=this.props,t=e.length;return 0===t?(0,L.jsx)(Pi,{icon:"circle-check-mark",intent:"success"}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(An,{target:(0,L.jsx)(Pi,{icon:"circle-exclamation-mark",intent:"danger"}),placement:"top-left",children:(0,L.jsx)("div",{className:"wpt-instances-security-form-list_col-popover",children:this.renderPopover()})}),` ${t}`]})}}const jS=kS;class TS extends U.Component{constructor(){super(...arguments),this.renderPopover=()=>this.props.checkers.map((e=>(0,L.jsxs)("div",{className:"wpt-instances-security-form-list_col-popover_issue",children:[e.title," ",e.description&&e.description.length>0&&(0,L.jsx)(je,{className:"maximum-z-index",title:e.description,children:(0,L.jsx)(he,{name:"info-circle"})})]},e.id)))}render(){const{checkers:e}=this.props,t=e.length;return 0===t?(0,L.jsx)(Pi,{icon:"circle-check-mark",intent:"success"}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(An,{target:(0,L.jsx)(Pi,{icon:"triangle-exclamation-mark",intent:"warning"}),placement:"top-left",children:(0,L.jsx)("div",{className:"wpt-instances-security-form-list_col-popover",children:this.renderPopover()})}),` ${t}`]})}}const CS=TS;class DS{constructor(e){this.getCriticalSecurityMeasuresIds=()=>this.securityMeasures.filter((e=>e.critical)).map((e=>e.id)),this.getRecommendedSecurityMeasuresIds=()=>this.securityMeasures.filter((e=>!e.critical)).map((e=>e.id)),this.getUnresolvedCriticalSecurityMeasures=e=>e.securityMeasures.filter((e=>e.available&&!e.status&&this.getCriticalSecurityMeasuresIds().includes(e.id))),this.getUnresolvedRecommendedSecurityMeasures=e=>e.securityMeasures.filter((e=>e.available&&!e.status&&this.getRecommendedSecurityMeasuresIds().includes(e.id))),this.hasUnresolvedCriticalSecurityMeasures=e=>this.getUnresolvedCriticalSecurityMeasures(e).length>0,this.hasUnresolvedRecommendedSecurityMeasures=e=>this.getUnresolvedRecommendedSecurityMeasures(e).length>0,this.getSecurityMeasuresByIds=e=>this.securityMeasures.filter((t=>e.includes(t.id))),this.isSecurityMeasureResolvedForInstallation=(e,t)=>t.securityMeasures.some((t=>t.id===e&&t.status)),this.getUnresolvedSecurityMeasureAvailableForResolve=e=>e.filter((e=>e.available&&!e.status)),this.getResolvedSecurityMeasureAvailableForRevert=e=>e.filter((e=>{if(!e.available||!e.status)return!1;const t=this.securityMeasures.find((t=>t.id===e.id));return!!t&&t.rollbackAvailable})),this.isSecurityMeasureAvailable=(e,t)=>t.some((t=>t.id===e&&t.available)),this.securityMeasures=e}}const PS=["all",cg,ug];class IS extends U.Component{constructor(){super(...arguments),this.state={isLoading:!1,securityCheckersSelection:{}},this.setSecurityCheckersSelection=()=>this.props.setSecurityCheckersSelection(Object.keys(this.state.securityCheckersSelection).filter((e=>this.state.securityCheckersSelection[e]))),this.handleChangeSecurityOption=e=>this.setState((t=>{const{securityMeasures:n,securityMeasuresForResolving:s}=this.props,i=new DS(n);let a=Object.assign({},t.securityCheckersSelection);switch(e){case"all":a=zc(s,(e=>({key:e.id,value:!0})));break;case cg:a=zc(s,(e=>({key:e.id,value:i.getCriticalSecurityMeasuresIds().includes(e.id)})))}return{securityOption:e,securityCheckersSelection:a}}),this.setSecurityCheckersSelection),this.handleChangeSecurityChecker=(e,t)=>this.setState((n=>{const s=Object.assign({},n.securityCheckersSelection);return s[e]=t,{securityCheckersSelection:s,securityOption:ug}}),this.setSecurityCheckersSelection),this.getSecurityCheckersControl=()=>{const{securityMeasuresForResolving:e}=this.props,{securityCheckersSelection:t}=this.state;return(0,L.jsx)("div",{className:"wpt-mgl-20",children:e.map((e=>(0,L.jsxs)("div",{className:"wpt-instances-security_resolve-security-checkers-form_item",children:[(0,L.jsx)(Zi,{label:e.title,className:"pull-left",value:t[e.id],onChange:t=>this.handleChangeSecurityChecker(e.id,t)}),e.description&&e.description.length>0&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-instances-security_resolve-security-checkers-form_item-info"}),placement:"top-right",children:e.description}),e.rollbackAvailable&&(0,L.jsxs)(Wn,{className:"wpt-mgl-5",children:["(",(0,L.jsx)(Ac,{content:"list-ui.instances.forms.resolveSecurityCheckers.hasRollback"}),")"]})]},e.id)))})},this.getSecurityOptions=()=>PS.map((e=>({label:(0,L.jsx)(Ac,{content:`list-ui.instances.forms.resolveSecurityCheckers.${e}`}),value:String(e)})))}componentWillMount(){this.handleChangeSecurityOption(cg)}render(){const{isLoading:e,securityOption:t}=this.state;return e?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"list-ui.instances.forms.resolveSecurityCheckers.loading"})]}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.resolveSecurityCheckers.description"})}),(0,L.jsx)(oa,{name:"securityOption",label:null,value:t,options:this.getSecurityOptions(),onChange:this.handleChangeSecurityOption}),this.getSecurityCheckersControl()]})}}IS.propTypes={securityMeasuresForResolving:Vt().array.isRequired,securityMeasures:Vt().array.isRequired,setSecurityCheckersSelection:Vt().func.isRequired};const OS=(0,so.$j)((e=>({securityMeasures:e.securityMeasures.securityMeasures})),{})(IS);class LS extends U.Component{constructor(){super(...arguments),this.state={isLoading:!1,securityCheckersSelection:{}},this.handleChangeSecurityChecker=(e,t)=>this.setState((n=>{const s=Object.assign({},n.securityCheckersSelection);return s[e]=t,{securityCheckersSelection:s}}),(()=>this.props.setSecurityCheckersSelection(Object.keys(this.state.securityCheckersSelection).filter((e=>this.state.securityCheckersSelection[e])))))}render(){if(this.state.isLoading)return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"list-ui.instances.forms.revertSecurityCheckers.loading"})]});const{securityMeasuresForReverting:e}=this.props;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.revertSecurityCheckers.description"})}),e.map((e=>(0,L.jsxs)("div",{className:"wpt-instances-security_revert-security-checkers-form_item",children:[(0,L.jsx)(Zi,{label:e.title,className:"pull-left",value:this.state.securityCheckersSelection[e.id],onChange:t=>this.handleChangeSecurityChecker(e.id,t)}),e.description&&e.description.length>0&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-instances-security_revert-security-checkers-form_item-info"}),placement:"top-right",children:e.description})]},e.id)))]})}}LS.propTypes={securityMeasuresForReverting:Vt().array.isRequired,setSecurityCheckersSelection:Vt().func.isRequired};const MS=LS;function AS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n<t;n++)s[n]=e[n];return s}function ES(e,t,n){return t=YS(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,HS()?Reflect.construct(t,n||[],YS(e).constructor):t.apply(e,n))}function US(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RS(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,zS(s.key),s)}}function NS(e,t,n){return t&&RS(e.prototype,t),n&&RS(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function FS(e,t,n){return(t=zS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YS(e){return YS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},YS(e)}function BS(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WS(e,t)}function HS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(HS=function(){return!!e})()}function VS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function $S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VS(Object(n),!0).forEach((function(t){FS(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VS(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function WS(e,t){return WS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},WS(e,t)}function zS(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var s=n.call(e,t);if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}var qS={NOT_STARTED:"not_started",STARTED:"started",RUNNING:"running",CANCELED:"canceled",ERROR:"error",DONE:"done"},GS={NOT_STARTED:"not_started",STARTED:"started",RUNNING:"running",CANCELED:"canceled",ERROR:"error",DONE:"done"},KS="backgroundTask/ADD",XS="backgroundTask/UPDATE",ZS="backgroundTask/POLL",JS="backgroundTask/REMOVE",QS="error",ew="background-tasks-",tw=function(e){return e&&[qS.CANCELED,qS.ERROR,qS.DONE].includes(e.status)},nw=function(e){return e&&e.status===qS.DONE},sw=function(e){return e&&e.status===qS.ERROR},iw=function(e,t){return t.find((function(t){return t.id===e}))},aw=function(e){return e.status===qS.ERROR?"danger":"warning"},rw=function(e,t,n){return function(s,i){return e({id:t,code:n}).then((function(e){var t=e.data;if(t.status===QS)return null;var n=t.data.task;return i().backgroundTasks.tasks.some((function(e){return e.id===n.id}))||s({type:ZS,task:n}),n})).catch((function(){return null}))}},ow=function(e,t){return function(n,s){return e(t).then((function(e){var t=e.data;if(t.status===QS)return[];var i=t.data.tasks,a=s().backgroundTasks.tasks;return i.forEach((function(e){a.some((function(t){return t.id===e.id}))||n({type:ZS,task:e})})),i})).catch((function(){return[]}))}},lw=function(e){return function(t){return e.forEach((function(e){tw(e)||t({type:ZS,task:e})}))}},cw=function(e){function t(){var e;US(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return FS(e=ES(this,t,[].concat(s)),"renderStatusIcon",(function(e){return tw(e)?sw(e)?(0,U.createElement)(he,{name:"cross-mark-circle-filled",intent:"danger"}):e.errors.length>0?(0,U.createElement)(he,{name:"check-mark-circle-filled",intent:"warning"}):(0,U.createElement)(he,{name:"check-mark-circle-filled",intent:"success"}):(0,U.createElement)(he,{name:"reload",animation:"spin",intent:"info"})})),FS(e,"renderDetails",(function(t){var n=e.props,s=n.baseClassName,i=n.onShowDetails;if(!tw(t)){var a=Object.keys(t.steps).length>0;return(0,U.createElement)(U.Fragment,null,t.title,(0,U.createElement)(Ni,{className:"".concat(s,"__progress-bar"),progress:t.progress,status:t.status}),(0,U.createElement)("div",{className:"".concat(s,"__progress-footer")},a&&(0,U.createElement)("div",{className:"".concat(s,"__progress-control")},(0,U.createElement)(fe,{onClick:function(){return i(t)}},(0,U.createElement)(wt,{content:"backgroundTasks.showDetails",fallback:"show details"}))),(0,U.createElement)(wt,{content:"backgroundTasks.completedProgress",params:{progress:t.progress},fallback:"%%progress%%% completed"})))}return nw(t)&&0===t.errors.length?t.title:(0,U.createElement)(U.Fragment,null,(0,U.createElement)(Wn,null,t.title),(0,U.createElement)("br",null),(0,U.createElement)(Wn,{className:"".concat(s,"__errors")},t.errors.map((function(e){return(0,U.createElement)("span",{key:e},e,(0,U.createElement)("br",null))}))))})),FS(e,"renderAction",(function(t){if(!tw(t))return null;var n=e.props.onClose;return(0,U.createElement)(fe,{icon:"cross-mark",onClick:function(){return n(t)}})})),e}return BS(t,e),NS(t,[{key:"render",value:function(){var e=this.props,t=e.task,n=e.baseClassName;return tw(t)?(0,U.createElement)("div",{className:n},(0,U.createElement)(Xn,{xs:3},(0,U.createElement)(Zn,{xs:1},this.renderStatusIcon(t)),(0,U.createElement)(Zn,{xs:10},this.renderDetails(t)),(0,U.createElement)(Zn,{xs:1,className:"".concat(n,"__action")},this.renderAction(t)))):(0,U.createElement)("div",{className:n},(0,U.createElement)(Xn,{xs:1},(0,U.createElement)(Zn,{xs:12},this.renderDetails(t))))}}])}(U.Component);cw.propTypes={task:Vt().object.isRequired,onClose:Vt().func.isRequired,onShowDetails:Vt().func.isRequired,baseClassName:Vt().string},cw.defaultProps={baseClassName:"".concat(ew,"background-task-item")};var uw=function(e){function t(){var e;US(this,t);for(var n=arguments.length,s=new Array(n),i=0;i<n;i++)s[i]=arguments[i];return FS(e=ES(this,t,[].concat(s)),"isErrorsVisible",(function(){var t=e.props.task;return tw(t)&&t.errors.length>0})),e}return BS(t,e),NS(t,[{key:"render",value:function(){var e=this.props,t=e.task,n=e.onClose,s=e.baseClassName,i=[];return Object.keys(t.steps).forEach((function(e){var n=t.steps[e];if(n){var s=(0,U.createElement)(Ni,{key:e,title:n.title,status:n.status,progress:n.progress},!1===tw(t)&&n.hint);i.push(s)}})),(0,U.createElement)(ji,{actions:[(0,U.createElement)(fe,{key:"minimize",onClick:n},(0,U.createElement)(wt,{content:"backgroundTasks.minimizeDetails",fallback:"minimize"}))],className:s,title:t.title,size:"xs",onClose:n,closable:!1,isOpen:!0},(0,U.createElement)(Yi,{className:"".concat(s,"__content")},i),this.isErrorsVisible()&&(0,U.createElement)(ge,{className:"".concat(s,"__errors"),intent:aw(t)},t.errors.map((function(e){return(0,U.createElement)("span",{key:e},e,(0,U.createElement)("br",null))}))))}}])}(U.Component);uw.propTypes={task:Vt().object.isRequired,onClose:Vt().func.isRequired,baseClassName:Vt().string},uw.defaultProps={baseClassName:"".concat(ew,"background-task-details")};var dw=function(e){function t(e){var n;return US(this,t),FS(n=ES(this,t,[e]),"isNeedToRender",(function(){return n.props.tasks.length>0})),FS(n,"handleToggleCollaps",(function(){return n.setState((function(e){return{isCollapsed:!e.isCollapsed}}))})),FS(n,"hasSeveralStatusesOrTasks",(function(e,t,n,s){return[e,t,n,s].reduce((function(e,t){return t<=0||((e.wasOneMoreThanZero||t>1)&&(e.hasSeveralStatusesOrTasks=!0),e.wasOneMoreThanZero=!0),e}),{hasSeveralStatusesOrTasks:!1,wasOneMoreThanZero:!1}).hasSeveralStatusesOrTasks})),FS(n,"handleCloseItem",(function(e){return n.props.removeBackgroundTask(n.props.removeTaskApi,e.id,e.code)})),FS(n,"handleOpenDetails",(function(e){return n.setState({showDetailsTaskId:e.id})})),FS(n,"handleCloseDetails",(function(){return n.setState({showDetailsTaskId:null})})),FS(n,"renderHideCompletedAction",(function(e){if(!e)return null;var t=n.props,s=t.baseClassName,i=t.removeCompletedBackgroundTasks,a=t.removeTasksApi;return(0,U.createElement)(fe,{className:"".concat(s,"__hide-completed"),onClick:function(){return i(a)}},(0,U.createElement)(wt,{content:"backgroundTasks.hideCompleted",fallback:"Hide completed"}))})),FS(n,"renderTitle",(function(){var e=n.props,t=e.baseClassName,s=e.tasks,i=s.filter((function(e){return!1===tw(e)})).length,a=s.filter((function(e){return nw(e)&&0===e.errors.length})).length,r=s.filter((function(e){return nw(e)&&e.errors.length>0})).length,o=s.filter((function(e){return sw(e)})).length,l=null;i>0&&(l=(0,U.createElement)(U.Fragment,null,(0,U.createElement)(he,{className:"".concat(t,"__title__icon"),name:"reload",animation:"spin",intent:"info"}),(0,U.createElement)(wt,{content:"backgroundTasks.tasksInProgress",params:{count:i},className:"".concat(t,"__title__text"),fallback:"All %%count%% tasks in progress"}),(0,U.createElement)("span",{className:"".concat(t,"__title__count")},i)));var c=null;a>0&&(c=(0,U.createElement)(U.Fragment,null,(0,U.createElement)(he,{className:"".concat(t,"__title__icon"),name:"check-mark-circle-filled",intent:"success"}),(0,U.createElement)(wt,{content:"backgroundTasks.tasksDone",params:{count:a},className:"".concat(t,"__title__text"),fallback:"All %%count%% tasks were successfully completed"}),(0,U.createElement)("span",{className:"".concat(t,"__title__count")},a)));var u=null;r>0&&(u=(0,U.createElement)(U.Fragment,null,(0,U.createElement)(he,{className:"".concat(t,"__title__icon"),name:"check-mark-circle-filled",intent:"warning"}),(0,U.createElement)(wt,{content:"backgroundTasks.tasksWarning",params:{count:r},className:"".concat(t,"__title__text"),fallback:"All %%count%% tasks was performed with errors"}),(0,U.createElement)("span",{className:"".concat(t,"__title__count")},r)));var d=null;o>0&&(d=(0,U.createElement)(U.Fragment,null,(0,U.createElement)(he,{className:"".concat(t,"__title__icon"),name:"cross-mark-circle-filled",intent:"danger"}),(0,U.createElement)(wt,{content:"backgroundTasks.tasksFailed",params:{count:o},className:"".concat(t,"__title__text"),fallback:"All %%count%% tasks failed"}),(0,U.createElement)("span",{className:"".concat(t,"__title__count")},o)));var p=n.hasSeveralStatusesOrTasks(i,a,r,o);return(0,U.createElement)("div",{className:mm()("".concat(t,"__title"),FS({},"".concat(t,"__title--several-statuses"),p))},l,c,u,d,n.renderHideCompletedAction(p))})),FS(n,"renderTaskDetails",(function(){var e=n.state.showDetailsTaskId;if(!e)return null;var t=n.props.tasks,s=iw(e,t);return s?(0,U.createElement)(uw,{task:s,onClose:n.handleCloseDetails}):null})),n.state={isCollapsed:!1,showDetailsTaskId:null},n}return BS(t,e),NS(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.tasks,n=e.pollBackgroundTasks;if(0!==t.length){var s=t.filter((function(e){return!tw(e)}));0!==s.length&&n(s)}}},{key:"render",value:function(){var e=this;if(!this.isNeedToRender())return null;var t=this.props,n=t.baseClassName,s=t.tasks,i=this.state.isCollapsed;return(0,U.createElement)("div",{className:mm()("".concat(n,"__container"),FS({},"".concat(n,"__container--collapsed"),i))},(0,U.createElement)("div",{className:"".concat(n,"__wrapper")},(0,U.createElement)("div",{className:"".concat(n,"__header"),onClick:this.handleToggleCollaps},(0,U.createElement)("div",{className:"".concat(n,"__control")},i?(0,U.createElement)(he,{name:"chevron-up",intent:"info"}):(0,U.createElement)(he,{name:"chevron-down",intent:"info"})),this.renderTitle()),(0,U.createElement)("div",{className:"".concat(n,"__body")},(0,U.createElement)("ul",{className:"".concat(n,"__list")},s.sort((function(e,t){return e.id>t.id?-1:1})).map((function(t){return(0,U.createElement)("li",{key:t.id,className:"".concat(n,"__item")},(0,U.createElement)(cw,{task:t,onClose:e.handleCloseItem,onShowDetails:e.handleOpenDetails}))}))))),this.renderTaskDetails())}}])}(U.Component);dw.propTypes={tasks:Vt().arrayOf(Vt().shape({id:Vt().number,code:Vt().string,title:Vt().string,status:Vt().oneOf(Object.keys(qS).map((function(e){return qS[e]}))),progress:Vt().number,errors:Vt().arrayOf(Vt().string),steps:Vt().oneOf([Vt().arrayOf(Vt().shape({title:Vt().string,icon:Vt().string,progress:Vt().number,status:Vt().oneOf(Object.keys(GS).map((function(e){return GS[e]}))),hint:Vt().string})),Vt().objectOf(Vt().shape({title:Vt().string,icon:Vt().string,progress:Vt().number,status:Vt().oneOf(Object.keys(GS).map((function(e){return GS[e]}))),hint:Vt().string}))]),publicParams:Vt().oneOfType([Vt().object,Vt().array])})),removeTaskApi:Vt().func.isRequired,removeTasksApi:Vt().func.isRequired,removeBackgroundTask:Vt().func.isRequired,removeCompletedBackgroundTasks:Vt().func.isRequired,pollBackgroundTasks:Vt().func.isRequired,baseClassName:Vt().string},dw.defaultProps={tasks:[],baseClassName:"".concat(ew,"background-tasks")};var pw={removeBackgroundTask:function(e,t,n){return function(s){return s({type:JS,taskId:t}),e({id:t,code:n})}},removeCompletedBackgroundTasks:function(e){return function(t,n){var s=n().backgroundTasks.tasks,i=[];return s.forEach((function(e){tw(e)&&(i.push(e),t({type:JS,taskId:e.id}))})),e(i)}},pollBackgroundTasks:lw},hw=((0,so.$j)((function(e){return{tasks:e.backgroundTasks.tasks}}),pw)(dw),NS((function e(t,n,s,i){var a=this;if(US(this,e),FS(this,"startPolling",(function(e){setTimeout((function(){return a.addTask(e)})),tw(e)||(a.polling.some((function(t){return t===e.id}))||(a.polling=a.polling.concat(e.id)),a.isPollingActive||(a.isPollingActive=!0,a.schedulePolling()))})),FS(this,"schedulePolling",(function(){a.isPollingActive&&(a.timerId=setTimeout((function(){a.timerId=null,a.poll()}),2e3))})),FS(this,"stopPolling",(function(){a.isPollingActive=!1,clearTimeout(a.timerId)})),FS(this,"poll",(function(){var e=a.getTasks().filter((function(e){return a.polling.some((function(t){return e.id===t}))}));0!==e.length?a.getTasksData(e).then((function(e){var t=e.data;t.status!==QS?(t.data.tasks.forEach((function(e){a.updateTask(e),tw(e)&&(a.polling=a.polling.filter((function(t){return t!==e.id})))})),a.schedulePolling()):a.stopPolling()})):a.stopPolling()})),e.instance)return e.instance;this.getTasks=t,this.addTask=n,this.updateTask=s,this.getTasksData=i,this.polling=[],this.isPollingActive=!1,this.timerId=null,e.instance=this})));FS(hw,"instance",void 0);var mw,fw=Object.prototype.toString,gw=function(e){var t=fw.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===fw.call(e.callee)),n};if(!Object.keys){var bw=Object.prototype.hasOwnProperty,vw=Object.prototype.toString,yw=gw,_w=Object.prototype.propertyIsEnumerable,xw=!_w.call({toString:null},"toString"),Sw=_w.call((function(){}),"prototype"),ww=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],kw=function(e){var t=e.constructor;return t&&t.prototype===e},jw={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Tw=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!jw["$"+e]&&bw.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{kw(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();mw=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===vw.call(e),s=yw(e),i=t&&"[object String]"===vw.call(e),a=[];if(!t&&!n&&!s)throw new TypeError("Object.keys called on a non-object");var r=Sw&&n;if(i&&e.length>0&&!bw.call(e,0))for(var o=0;o<e.length;++o)a.push(String(o));if(s&&e.length>0)for(var l=0;l<e.length;++l)a.push(String(l));else for(var c in e)r&&"prototype"===c||!bw.call(e,c)||a.push(String(c));if(xw)for(var u=function(e){if("undefined"==typeof window||!Tw)return kw(e);try{return kw(e)}catch(e){return!1}}(e),d=0;d<ww.length;++d)u&&"constructor"===ww[d]||!bw.call(e,ww[d])||a.push(ww[d]);return a}}var Cw=mw,Dw=Array.prototype.slice,Pw=Object.keys,Iw=Pw?function(e){return Pw(e)}:Cw,Ow=Object.keys;Iw.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return gw(e)?Ow(Dw.call(e)):Ow(e)})}else Object.keys=Iw;return Object.keys||Iw};var Lw,Mw=Iw,Aw=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var s=Object.getOwnPropertySymbols(e);if(1!==s.length||s[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0},Ew=function(){return Aw()&&!!Symbol.toStringTag},Uw=Error,Rw=EvalError,Nw=RangeError,Fw=ReferenceError,Yw=SyntaxError,Bw=TypeError,Hw=URIError,Vw="undefined"!=typeof Symbol&&Symbol,$w={__proto__:null,foo:{}},Ww=Object,zw="Function.prototype.bind called on incompatible ",qw=Object.prototype.toString,Gw=Math.max,Kw="[object Function]",Xw=function(e,t){for(var n=[],s=0;s<e.length;s+=1)n[s]=e[s];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},Zw=function(e,t){for(var n=[],s=t||0,i=0;s<e.length;s+=1,i+=1)n[i]=e[s];return n},Jw=function(e,t){for(var n="",s=0;s<e.length;s+=1)n+=e[s],s+1<e.length&&(n+=t);return n},Qw=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||qw.apply(t)!==Kw)throw new TypeError(zw+t);for(var n,s=Zw(arguments,1),i=function(){if(this instanceof n){var i=t.apply(this,Xw(s,arguments));return Object(i)===i?i:this}return t.apply(e,Xw(s,arguments))},a=Gw(0,t.length-s.length),r=[],o=0;o<a;o++)r[o]="$"+o;if(n=Function("binder","return function ("+Jw(r,",")+"){ return binder.apply(this,arguments); }")(i),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n},ek=Function.prototype.call,tk=Object.prototype.hasOwnProperty,nk=Qw.call(ek,tk),sk=Function,ik=function(e){try{return sk('"use strict"; return ('+e+").constructor;")()}catch(e){}},ak=Object.getOwnPropertyDescriptor;if(ak)try{ak({},"")}catch(V){ak=null}var rk=function(){throw new Bw},ok=ak?function(){try{return rk}catch(e){try{return ak(arguments,"callee").get}catch(e){return rk}}}():rk,lk="function"==typeof Vw&&"function"==typeof Symbol&&"symbol"==typeof Vw("foo")&&"symbol"==typeof Symbol("bar")&&Aw(),ck={__proto__:$w}.foo===$w.foo&&!($w instanceof Ww),uk=Object.getPrototypeOf||(ck?function(e){return e.__proto__}:null),dk={},pk="undefined"!=typeof Uint8Array&&uk?uk(Uint8Array):Lw,hk={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?Lw:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Lw:ArrayBuffer,"%ArrayIteratorPrototype%":lk&&uk?uk([][Symbol.iterator]()):Lw,"%AsyncFromSyncIteratorPrototype%":Lw,"%AsyncFunction%":dk,"%AsyncGenerator%":dk,"%AsyncGeneratorFunction%":dk,"%AsyncIteratorPrototype%":dk,"%Atomics%":"undefined"==typeof Atomics?Lw:Atomics,"%BigInt%":"undefined"==typeof BigInt?Lw:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?Lw:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?Lw:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Lw:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Uw,"%eval%":eval,"%EvalError%":Rw,"%Float32Array%":"undefined"==typeof Float32Array?Lw:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Lw:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Lw:FinalizationRegistry,"%Function%":sk,"%GeneratorFunction%":dk,"%Int8Array%":"undefined"==typeof Int8Array?Lw:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Lw:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Lw:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":lk&&uk?uk(uk([][Symbol.iterator]())):Lw,"%JSON%":"object"==typeof JSON?JSON:Lw,"%Map%":"undefined"==typeof Map?Lw:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&lk&&uk?uk((new Map)[Symbol.iterator]()):Lw,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Lw:Promise,"%Proxy%":"undefined"==typeof Proxy?Lw:Proxy,"%RangeError%":Nw,"%ReferenceError%":Fw,"%Reflect%":"undefined"==typeof Reflect?Lw:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Lw:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&lk&&uk?uk((new Set)[Symbol.iterator]()):Lw,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Lw:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":lk&&uk?uk(""[Symbol.iterator]()):Lw,"%Symbol%":lk?Symbol:Lw,"%SyntaxError%":Yw,"%ThrowTypeError%":ok,"%TypedArray%":pk,"%TypeError%":Bw,"%Uint8Array%":"undefined"==typeof Uint8Array?Lw:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Lw:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Lw:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Lw:Uint32Array,"%URIError%":Hw,"%WeakMap%":"undefined"==typeof WeakMap?Lw:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Lw:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Lw:WeakSet};if(uk)try{null.error}catch(V){var mk=uk(uk(V));hk["%Error.prototype%"]=mk}var fk=function e(t){var n;if("%AsyncFunction%"===t)n=ik("async function () {}");else if("%GeneratorFunction%"===t)n=ik("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=ik("async function* () {}");else if("%AsyncGenerator%"===t){var s=e("%AsyncGeneratorFunction%");s&&(n=s.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&uk&&(n=uk(i.prototype))}return hk[t]=n,n},gk={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bk=Qw.call(Function.call,Array.prototype.concat),vk=Qw.call(Function.apply,Array.prototype.splice),yk=Qw.call(Function.call,String.prototype.replace),_k=Qw.call(Function.call,String.prototype.slice),xk=Qw.call(Function.call,RegExp.prototype.exec),Sk=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,wk=/\\(\\)?/g,kk=function(e){var t=_k(e,0,1),n=_k(e,-1);if("%"===t&&"%"!==n)throw new Yw("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new Yw("invalid intrinsic syntax, expected opening `%`");var s=[];return yk(e,Sk,(function(e,t,n,i){s[s.length]=n?yk(i,wk,"$1"):t||e})),s},jk=function(e,t){var n,s=e;if(nk(gk,s)&&(s="%"+(n=gk[s])[0]+"%"),nk(hk,s)){var i=hk[s];if(i===dk&&(i=fk(s)),void 0===i&&!t)throw new Bw("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:s,value:i}}throw new Yw("intrinsic "+e+" does not exist!")},Tk=function(e,t){if("string"!=typeof e||0===e.length)throw new Bw("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Bw('"allowMissing" argument must be a boolean');if(null===xk(/^%?[^%]*%?$/,e))throw new Yw("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=kk(e),s=n.length>0?n[0]:"",i=jk("%"+s+"%",t),a=i.name,r=i.value,o=!1,l=i.alias;l&&(s=l[0],vk(n,bk([0,1],l)));for(var c=1,u=!0;c<n.length;c+=1){var d=n[c],p=_k(d,0,1),h=_k(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===h||"'"===h||"`"===h)&&p!==h)throw new Yw("property names with quotes must have matching quotes");if("constructor"!==d&&u||(o=!0),nk(hk,a="%"+(s+="."+d)+"%"))r=hk[a];else if(null!=r){if(!(d in r)){if(!t)throw new Bw("base intrinsic for "+e+" exists, but the property is not available.");return}if(ak&&c+1>=n.length){var m=ak(r,d);r=(u=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:r[d]}else u=nk(r,d),r=r[d];u&&!o&&(hk[a]=r)}}return r},Ck=Tk("%Object.defineProperty%",!0)||!1;if(Ck)try{Ck({},"a",{value:1})}catch(V){Ck=!1}var Dk=Ck,Pk=Tk("%Object.getOwnPropertyDescriptor%",!0);if(Pk)try{Pk([],"length")}catch(V){Pk=null}var Ik=Pk,Ok=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new Bw("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new Bw("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new Bw("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new Bw("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new Bw("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new Bw("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,a=arguments.length>5?arguments[5]:null,r=arguments.length>6&&arguments[6],o=!!Ik&&Ik(e,t);if(Dk)Dk(e,t,{configurable:null===a&&o?o.configurable:!a,enumerable:null===s&&o?o.enumerable:!s,value:n,writable:null===i&&o?o.writable:!i});else{if(!r&&(s||i||a))throw new Yw("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}},Lk=function(){return!!Dk};Lk.hasArrayLengthDefineBug=function(){if(!Dk)return null;try{return 1!==Dk([],"length",{value:1}).length}catch(e){return!0}};var Mk,Ak,Ek=Lk,Uk=Ek(),Rk=Tk("%Math.floor%"),Nk=function(e,t){if("function"!=typeof e)throw new Bw("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||Rk(t)!==t)throw new Bw("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],s=!0,i=!0;if("length"in e&&Ik){var a=Ik(e,"length");a&&!a.configurable&&(s=!1),a&&!a.writable&&(i=!1)}return(s||i||!n)&&(Uk?Ok(e,"length",t,!0,!0):Ok(e,"length",t)),e},Fk=(Mk=function(e){var t=Tk("%Function.prototype.apply%"),n=Tk("%Function.prototype.call%"),s=Tk("%Reflect.apply%",!0)||Qw.call(n,t),i=Tk("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new Bw("a function is required");var t=s(Qw,n,arguments);return Nk(t,1+i(0,e.length-(arguments.length-1)),!0)};var a=function(){return s(Qw,t,arguments)};Dk?Dk(e.exports,"apply",{value:a}):e.exports.apply=a},Mk(Ak={exports:{}}),Ak.exports);Fk.apply;var Yk=Fk(Tk("String.prototype.indexOf")),Bk=function(e,t){var n=Tk(e,!!t);return"function"==typeof n&&Yk(e,".prototype.")>-1?Fk(n):n},Hk=Ew(),Vk=Bk("Object.prototype.toString"),$k=function(e){return!(Hk&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===Vk(e)},Wk=function(e){return!!$k(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==Vk(e)&&"[object Function]"===Vk(e.callee)},zk=function(){return $k(arguments)}();$k.isLegacyArguments=Wk;var qk=zk?$k:Wk,Gk="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Kk=Object.prototype.toString,Xk=Array.prototype.concat,Zk=Ek(),Jk=function(e,t,n,s){if(t in e)if(!0===s){if(e[t]===n)return}else if(!function(e){return"function"==typeof e&&"[object Function]"===Kk.call(e)}(s)||!s())return;Zk?Ok(e,t,n,!0):Ok(e,t,n)},Qk=function(e,t){var n=arguments.length>2?arguments[2]:{},s=Mw(t);Gk&&(s=Xk.call(s,Object.getOwnPropertySymbols(t)));for(var i=0;i<s.length;i+=1)Jk(e,s[i],t[s[i]],n[s[i]])};Qk.supportsDescriptors=!!Zk;var ej=Qk,tj=function(e){return e!=e},nj=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!tj(e)||!tj(t))},sj=function(){return"function"==typeof Object.is?Object.is:nj},ij=Fk(sj(),Object);ej(ij,{getPolyfill:sj,implementation:nj,shim:function(){var e=sj();return ej(Object,{is:e},{is:function(){return Object.is!==e}}),e}});var aj,rj,oj,lj,cj=ij,uj=Ew();if(uj){aj=Bk("Object.prototype.hasOwnProperty"),rj=Bk("RegExp.prototype.exec"),oj={};var dj=function(){throw oj};lj={toString:dj,valueOf:dj},"symbol"==typeof Symbol.toPrimitive&&(lj[Symbol.toPrimitive]=dj)}var pj=Bk("Object.prototype.toString"),hj=Object.getOwnPropertyDescriptor,mj=uj?function(e){if(!e||"object"!=typeof e)return!1;var t=hj(e,"lastIndex");if(!t||!aj(t,"value"))return!1;try{rj(e,lj)}catch(e){return e===oj}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===pj(e)},fj=function(){return"string"==typeof function(){}.name},gj=Object.getOwnPropertyDescriptor;if(gj)try{gj([],"length")}catch(V){gj=null}fj.functionsHaveConfigurableNames=function(){if(!fj()||!gj)return!1;var e=gj((function(){}),"name");return!!e&&!!e.configurable};var bj=Function.prototype.bind;fj.boundFunctionsHaveNames=function(){return fj()&&"function"==typeof bj&&""!==function(){}.bind().name};var vj=fj,yj=Ek(),_j=vj.functionsHaveConfigurableNames(),xj=Object,Sj=function(e,t){if("function"!=typeof e)throw new Bw("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return n&&!_j||(yj?Ok(e,"name",t,!0,!0):Ok(e,"name",t)),e}((function(){if(null==this||this!==xj(this))throw new Bw("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e}),"get flags",!0),wj=ej.supportsDescriptors,kj=Object.getOwnPropertyDescriptor,jj=function(){if(wj&&"gim"===/a/gim.flags){var e=kj(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"dotAll"in RegExp.prototype&&"hasIndices"in RegExp.prototype){var t="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){t+="d"}}),Object.defineProperty(n,"sticky",{get:function(){t+="y"}}),e.get.call(n),"dy"===t)return e.get}}return Sj},Tj=ej.supportsDescriptors,Cj=Object.getOwnPropertyDescriptor,Dj=Object.defineProperty,Pj=TypeError,Ij=Object.getPrototypeOf,Oj=/a/,Lj=Fk(jj());ej(Lj,{getPolyfill:jj,implementation:Sj,shim:function(){if(!Tj||!Ij)throw new Pj("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=jj(),t=Ij(Oj),n=Cj(t,"flags");return n&&n.get===e||Dj(t,"flags",{configurable:!0,enumerable:!1,get:e}),e}});var Mj=Lj,Aj=Date.prototype.getDay,Ej=Object.prototype.toString,Uj=Ew(),Rj=function(e){return"object"==typeof e&&null!==e&&(Uj?function(e){try{return Aj.call(e),!0}catch(e){return!1}}(e):"[object Date]"===Ej.call(e))},Nj=Date.prototype.getTime;function Fj(e){return null==e}function Yj(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length||"function"!=typeof e.copy||"function"!=typeof e.slice||e.length>0&&"number"!=typeof e[0])}var Bj=function e(t,n,s){var i=s||{};return!!(i.strict?cj(t,n):t===n)||(!t||!n||"object"!=typeof t&&"object"!=typeof n?i.strict?cj(t,n):t==n:function(t,n,s){var i,a;if(typeof t!=typeof n)return!1;if(Fj(t)||Fj(n))return!1;if(t.prototype!==n.prototype)return!1;if(qk(t)!==qk(n))return!1;var r=mj(t),o=mj(n);if(r!==o)return!1;if(r||o)return t.source===n.source&&Mj(t)===Mj(n);if(Rj(t)&&Rj(n))return Nj.call(t)===Nj.call(n);var l=Yj(t),c=Yj(n);if(l!==c)return!1;if(l||c){if(t.length!==n.length)return!1;for(i=0;i<t.length;i++)if(t[i]!==n[i])return!1;return!0}if(typeof t!=typeof n)return!1;try{var u=Mw(t),d=Mw(n)}catch(e){return!1}if(u.length!==d.length)return!1;for(u.sort(),d.sort(),i=u.length-1;i>=0;i--)if(u[i]!=d[i])return!1;for(i=u.length-1;i>=0;i--)if(!e(t[a=u[i]],n[a],s))return!1;return!0}(t,n,i))},Hj=function(e){var t={tasks:[]};return void 0!==e.tasks&&(t.tasks=function(e){return function(e){if(Array.isArray(e))return AS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return AS(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AS(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.tasks)),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case KS:return iw(n.task.id,e.tasks)?e:$S($S({},e),{},{tasks:e.tasks.concat(n.task)});case XS:var s=iw(n.task.id,e.tasks);return Bj(s,n.task,!0)?e:$S($S({},e),{},{tasks:e.tasks.map((function(e){return e.id!==n.task.id?e:n.task}))});case JS:var i=iw(n.taskId,e.tasks);return i?$S($S({},e),{},{tasks:e.tasks.filter((function(e){return e.id!==n.taskId}))}):e;default:return e}}};const Vj="all",$j="critical",Wj="recommended";class zj extends U.Component{constructor(e){super(e),this.getInstallationsWithCriticalUnresolvedMeasuresCount=e=>{const t=new DS(this.props.securityMeasures);return e.filter((e=>t.hasUnresolvedCriticalSecurityMeasures(e))).length},this.getInstallationsWithRecommendedUnresolvedMeasuresCount=e=>{const t=new DS(this.props.securityMeasures);return e.filter((e=>t.hasUnresolvedRecommendedSecurityMeasures(e))).length},this.loadSecurityMeasuresPerInstallations=()=>{const{getSecurityMeasuresPerInstallations:e}=this.props,{selection:t}=this.state;return e(t).catch((()=>{this.setState({filteredSecurityMeasuresInstallationStatuses:[],unableToLoad:!0})})).finally((()=>{this.setState({isLoading:!1})}))},this.reloadSecurityMeasuresPerInstallations=(e=[])=>{const{reloadSecurityMeasuresPerInstallations:t}=this.props;return t(e)},this.filterSecurityMeasures=e=>{const{search:t,filter:n}=this.state,s=t.toLowerCase(),i=e.filter((e=>!s||-1!==e.displayTitle.toLowerCase().indexOf(s)));if(n===Vj)return i;const{securityMeasures:a}=this.props,r=new DS(a);return i.filter((e=>{switch(n){case $j:return r.hasUnresolvedCriticalSecurityMeasures(e);case Wj:return r.hasUnresolvedRecommendedSecurityMeasures(e);default:return!1}}))},this.handleRunningTasks=()=>{const e=this.getSecuringInstancesTasks().concat(this.getRevertingInstancesTasks()).filter(((e,t,n)=>n.indexOf(e)===t)),t=this.getCheckSecurityInstancesTasks();let n=!1;if(t.length>0){const e=this.getInstancesWithCheckSecurityTasks();this.setIsCheckingSecurity(!0),this.setState({checkSecurityInstancesIds:e.map((e=>e.id))});const s=t.filter((e=>e&&+e>0));this.props.fetchBackgroundTasks(Td.getTasksData,s.map((e=>({id:e,code:_S})))).then((e=>{0!==e.length?(n=!0,this.setState({checkSecurityBackgroundTaskIds:e.map((e=>e.id))},(()=>this.handleOnReceiveCheckSecurityBackgroundTask(e)))):this.setIsCheckingSecurity(!1)}))}if(e.length>0){const t=this.getInstancesWithSecuringOrRevertingTasks();this.disableList(),this.setIsSecuringInstances(!0),this.setIsRevertingInstances(!0),this.setState({securingInstancesIds:t.map((e=>e.id))});const s=e.filter((e=>e&&+e>0));this.props.fetchBackgroundTasks(Td.getTasksData,s.map((e=>({id:e,code:_S})))).then((e=>{if(0===e.length)return this.setIsSecuringInstances(!1),this.setIsRevertingInstances(!1),void this.enableList();n=!0,this.setState({backgroundTaskIds:e.map((e=>e.id))},(()=>this.handleOnUpdateBackgroundTasks(e)))}))}const s=this.getNeedToCheckForSecurityInstancesIds();!n&&s.length>0&&this.handleCheckSecurity()},this.disableList=()=>this.setState({isListDisabled:!0}),this.enableList=()=>this.setState({isListDisabled:!1}),this.setIsCheckingSecurity=e=>this.setState({isCheckingSecurity:e}),this.setIsSecuringInstances=e=>this.setState({isSecuring:e}),this.setIsRevertingInstances=e=>this.setState({isReverting:e}),this.getInstancesWithSecuringOrRevertingTasks=()=>this.props.securityMeasuresInstallationStatuses.filter((e=>e.resolveSecurityTaskId||e.revertSecurityTaskId)),this.getInstancesWithCheckSecurityTasks=()=>this.props.securityMeasuresInstallationStatuses.filter((e=>e.checkSecurityTaskId)),this.getSecuringInstancesTasks=()=>this.getInstancesWithSecuringOrRevertingTasks().filter((e=>e.resolveSecurityTaskId)).map((e=>e.resolveSecurityTaskId)),this.getRevertingInstancesTasks=()=>this.getInstancesWithSecuringOrRevertingTasks().filter((e=>e.revertSecurityTaskId)).map((e=>e.revertSecurityTaskId)),this.getCheckSecurityInstancesTasks=()=>this.getInstancesWithCheckSecurityTasks().map((e=>e.checkSecurityTaskId)),this.handleOnUpdateBackgroundTasks=e=>{const{backgroundTaskIds:t,securingInstancesIds:n}=this.state,s=this.getInstancesWithSecuringOrRevertingTasks();let i=!1,a=!1,r=[];const o=[];t.forEach((t=>{const n=iw(t,e);if(!n)return;tw(n)&&(n.errors.length>0&&(this.props.addErrorMessage(n.errors.join("\n")),this.setState({hasErrors:!0})),this.setState((e=>({backgroundTaskIds:e.backgroundTaskIds.filter((e=>e!==n.id))})))),this.getRevertingInstancesTasks().includes(+n.id)?a=!0:i=!0;const l=s.filter((e=>e.resolveSecurityTaskId&&+e.resolveSecurityTaskId==+n.id||e.revertSecurityTaskId&&+e.revertSecurityTaskId==+n.id));l.length>0&&l.forEach((e=>{tw(n)&&!o.includes(e.id)&&o.push(e.id),tw(n)||r.includes(e.id)||(r=r.concat(e.id))}))})),s.filter((e=>!r.includes(e.id))).forEach((e=>{e.resolveSecurityTaskId&&t.includes(e.resolveSecurityTaskId)||e.revertSecurityTaskId&&t.includes(e.revertSecurityTaskId)?r=r.concat(e.id):o.includes(e.id)||o.push(e.id)})),this.setIsSecuringInstances(i),this.setIsRevertingInstances(a),n!==r&&this.setState({securingInstancesIds:r}),o.length&&this.reloadSecurityMeasuresPerInstallations(o).then((()=>{this.setState((e=>({securingInstancesIds:Zc(e.securingInstancesIds,o)})),this.handleOnAllInstancesSecured)})).catch((()=>{}))},this.handleOnReceiveCheckSecurityBackgroundTask=e=>{const{checkSecurityBackgroundTaskIds:t}=this.state,n=this.getInstancesWithCheckSecurityTasks();let s=[];const i=[];t.forEach((t=>{const a=iw(t,e);if(!a)return;tw(a)&&(a.errors.length>0&&(this.props.addErrorMessage(a.errors.join("\n")),this.setState({hasErrors:!0})),this.setState((e=>({checkSecurityBackgroundTaskIds:e.checkSecurityBackgroundTaskIds.filter((e=>+e!=+a.id))}))));const r=n.filter((e=>e.checkSecurityTaskId&&+e.checkSecurityTaskId==+a.id));r.length>0&&r.forEach((e=>{tw(a)&&!i.includes(e.id)&&i.push(e.id),tw(a)||s.includes(e.id)||(s=s.concat(e.id))}))})),n.filter((e=>!s.includes(e.id))).forEach((e=>{e.checkSecurityTaskId&&t.includes(e.checkSecurityTaskId)&&(s=s.concat(e.id)),i.includes(e.id)||i.push(e.id)})),0===s.length?this.setIsCheckingSecurity(!1):this.setIsCheckingSecurity(!0),this.setState({checkSecurityInstancesIds:s}),i.length&&this.reloadSecurityMeasuresPerInstallations(i).then((()=>{this.setState((e=>({checkSecurityInstancesIds:Zc(e.checkSecurityInstancesIds,i)})),this.handleAllInstancesChecked)})).catch((()=>{}))},this.handleOnAllInstancesSecured=()=>{const{isReverting:e}=this.state;this.state.securingInstancesIds.length>0||(this.state.hasErrors||this.props.addSuccessMessage(e?"list-ui.instances.forms.instancesSecurity.revertSuccess":"list-ui.instances.forms.instancesSecurity.resolveSuccess",!0,"instancesSecurity"),this.setIsSecuringInstances(!1),this.setIsRevertingInstances(!1),this.clearSelection(),this.enableList(),this.setState({hasErrors:!1}))},this.handleAllInstancesChecked=()=>{this.state.checkSecurityInstancesIds.length>0||(this.setIsCheckingSecurity(!1),this.clearSelection(),this.setState({hasErrors:!1}))},this.getNeedToCheckForSecurityInstancesIds=()=>this.props.securityMeasuresInstallationStatuses.filter((e=>"unknown"===e.securityStatus)).map((e=>e.id)),this.setSecurityCheckersSelection=e=>this.setState({securityCheckersSelection:e}),this.clearSelection=()=>{this.setState({selection:[]})},this.handleSearch=e=>this.setState({search:e},this.callbackAfterSearchAndFilter),this.handleFilter=e=>this.setState({filter:e},this.callbackAfterSearchAndFilter),this.callbackAfterSearchAndFilter=()=>this.setState({selection:[],filteredSecurityMeasuresInstallationStatuses:this.filterSecurityMeasures(this.props.securityMeasuresInstallationStatuses)}),this.handleSecure=()=>{const{selection:e,securityCheckersSelection:t}=this.state,{clearMessages:n,resolveSecurityCheckers:s}=this.props,i=e;return n(),this.disableList(),this.setIsSecuringInstances(!0),s(i,t).then((e=>{this.setState((t=>({backgroundTaskIds:t.backgroundTaskIds.concat(e.id)})))})).catch((()=>{this.enableList(),this.setIsSecuringInstances(!1)}))},this.handleRevert=()=>{const{selection:e,securityCheckersSelection:t}=this.state,{clearMessages:n,revertSecurityCheckers:s}=this.props,i=e;return n(),this.disableList(),this.setIsRevertingInstances(!0),s(i,t).then((e=>{this.setState((t=>({backgroundTaskIds:t.backgroundTaskIds.concat(e.id)})))})).catch((()=>{this.enableList(),this.setIsRevertingInstances(!1)}))},this.handleCheckSecurity=()=>{const{clearMessages:e,checkSecurity:t}=this.props,{filteredSecurityMeasuresInstallationStatuses:n,selection:s}=this.state;return e(),this.setIsCheckingSecurity(!0),t(s.length?s:n.map((e=>e.id))).then((e=>{this.setState((t=>({checkSecurityBackgroundTaskIds:t.checkSecurityBackgroundTaskIds.concat(e.id)})))})).catch((()=>{this.setIsCheckingSecurity(!1)}))},this.handleToggleResolveSecurityCheckersDialog=()=>this.setState((e=>({showResolveSecurityCheckersDialog:!e.showResolveSecurityCheckersDialog}))),this.handleToggleRevertSecurityCheckersDialog=()=>this.setState((e=>({showRevertSecurityCheckersDialog:!e.showRevertSecurityCheckersDialog})),(()=>{this.state.showRevertSecurityCheckersDialog&&this.setSecurityCheckersSelection([])})),this.handleOpenInstanceSecurityDrawer=e=>{this.props.clearMessages(),this.props.onOpenInstanceSecurityDrawer(e)},this.getListColumns=()=>{const{securityMeasures:e}=this.props,t=new DS(e);return[{key:"name",title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.instanceList.columns.name"}),render:e=>this.props.isUnpaid||!e.resolveAndRevertAvailable?(0,L.jsx)(gm,{uatAction:Cm,featureName:"secure",description:(0,L.jsx)(Ac,{content:"paidFeature.secureFeatureDescription"}),isInstanceFeatureDisabled:!e.resolveAndRevertAvailable,installationId:e.id,children:(0,L.jsx)("span",{children:e.displayTitle})}):(0,L.jsx)("span",{children:e.displayTitle})},{key:"critical",title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.instanceList.columns.critical"}),render:e=>{const n=t.getUnresolvedCriticalSecurityMeasures(e).map((e=>e.id)),s=t.getSecurityMeasuresByIds(n);return(0,L.jsx)(jS,{checkers:s})}},{key:"recommended",title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.instanceList.columns.recommended"}),render:e=>{const n=t.getUnresolvedRecommendedSecurityMeasures(e).map((e=>e.id)),s=t.getSecurityMeasuresByIds(n);return(0,L.jsx)(CS,{checkers:s})}},{key:"details",title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.instanceList.columns.details"}),render:e=>(0,L.jsx)(fe,{icon:"chevron-right",onClick:()=>this.handleOpenInstanceSecurityDrawer(e.id)})}]},this.hasAnyInstallationWithDisabledFeature=()=>this.props.securityMeasuresInstallationStatuses.some((e=>!e.resolveAndRevertAvailable)),this.hasUnresolvedInstallationSecurityMeasure=e=>e.some((e=>e.available&&!e.status)),this.hasRevertableInstallationSecurityMeasure=e=>e.some((e=>{if(!e.available||!e.status)return!1;const{securityMeasures:t}=this.props,n=t.find((t=>t.id===e.id));return!!n&&n.rollbackAvailable})),this.hasAnySecurityMeasureToBeResolved=()=>{const{filteredSecurityMeasuresInstallationStatuses:e,selection:t}=this.state;return e.filter((e=>t.some((t=>t===e.id)))).some((e=>this.hasUnresolvedInstallationSecurityMeasure(e.securityMeasures)))},this.hasAnySecurityMeasureToBeReverted=()=>{const{filteredSecurityMeasuresInstallationStatuses:e,selection:t}=this.state;return e.filter((e=>t.some((t=>t===e.id)))).some((e=>this.hasRevertableInstallationSecurityMeasure(e.securityMeasures)))},this.getListData=()=>{const{filteredSecurityMeasuresInstallationStatuses:e,isListDisabled:t}=this.state,{isUnpaid:n}=this.props;return e.map((e=>Object.assign(Object.assign({},e),{disabled:n||t||!e.resolveAndRevertAvailable})))},this.getAvailableSecurityMeasuresForResolving=()=>{const{filteredSecurityMeasuresInstallationStatuses:e,selection:t}=this.state,{securityMeasures:n}=this.props,s=e.filter((e=>t.some((t=>t===e.id))));return n.filter((e=>s.some((t=>t.securityMeasures.some((t=>t.available&&!t.status&&e.id===t.id))))))},this.getAvailableSecurityMeasuresForReverting=()=>{const{filteredSecurityMeasuresInstallationStatuses:e,selection:t}=this.state,{securityMeasures:n}=this.props,s=e.filter((e=>t.some((t=>t===e.id))));return n.filter((e=>e.rollbackAvailable&&s.some((t=>t.securityMeasures.some((t=>t.available&&t.status&&e.id===t.id))))))},this.state={securityCheckersSelection:[],showResolveSecurityCheckersDialog:!1,showRevertSecurityCheckersDialog:!1,backgroundTaskIds:[],checkSecurityBackgroundTaskIds:[],securingInstancesIds:[],checkSecurityInstancesIds:[],hasErrors:!1,selection:e.selectedInstallationsIds,search:"",filter:Vj,isLoading:!0,isListDisabled:!1,isCheckingSecurity:!1,isSecuring:!1,isReverting:!1,filteredSecurityMeasuresInstallationStatuses:[],installationsWithCriticalUnresolvedMeasuresCount:0,installationsWithRecommendedUnresolvedMeasuresCount:0,unableToLoad:!1}}componentDidMount(){this.loadSecurityMeasuresPerInstallations().finally(this.handleRunningTasks)}componentWillReceiveProps(e){e.tasks!==this.props.tasks&&(this.handleOnUpdateBackgroundTasks(e.tasks),this.handleOnReceiveCheckSecurityBackgroundTask(e.tasks)),e.securityMeasuresInstallationStatuses!==this.props.securityMeasuresInstallationStatuses&&this.setState({filteredSecurityMeasuresInstallationStatuses:this.filterSecurityMeasures(e.securityMeasuresInstallationStatuses),installationsWithCriticalUnresolvedMeasuresCount:this.getInstallationsWithCriticalUnresolvedMeasuresCount(e.securityMeasuresInstallationStatuses),installationsWithRecommendedUnresolvedMeasuresCount:this.getInstallationsWithRecommendedUnresolvedMeasuresCount(e.securityMeasuresInstallationStatuses)})}renderPaidFeatureDesc(){const{isUnpaid:e,upgradeUrl:t,premiumFeaturesUrl:n,currentInstallationId:s}=this.props;return e||this.hasAnyInstallationWithDisabledFeature()?(0,L.jsx)(pm,{uatAction:Cm,purchaseLicenseUrl:t,premiumFeaturesUrl:n,installationId:s,children:(0,L.jsx)(Ac,{content:"paidFeature.secureFeatureDescription"})}):null}renderToolbar(){const{isUnpaid:e,securityMeasuresInstallationStatuses:t}=this.props,{isCheckingSecurity:n,isSecuring:s,isReverting:i,selection:a,filter:r,filteredSecurityMeasuresInstallationStatuses:o,installationsWithCriticalUnresolvedMeasuresCount:l,installationsWithRecommendedUnresolvedMeasuresCount:c}=this.state,u=e||n||i||0===o.length||0===a.length||!this.hasAnySecurityMeasureToBeResolved(),d=s||i||n||0===o.length,p=e||s||n||0===o.length||0===a.length||!this.hasAnySecurityMeasureToBeReverted();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(Ss,{className:"wpt-mgt-10",children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{intent:"primary",state:s?"loading":void 0,disabled:u,onClick:this.handleToggleResolveSecurityCheckersDialog,tooltip:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.hintButtonSecure"}),children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonSecure"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{icon:"refresh",state:n?"loading":void 0,disabled:d,onClick:this.handleCheckSecurity,tooltip:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.hintButtonCheckSecurity"}),children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonCheckSecurity"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{icon:"reload",state:i?"loading":void 0,disabled:p,onClick:this.handleToggleRevertSecurityCheckersDialog,tooltip:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.hintButtonRevert"}),"data-test-id":"mass-security-revert-submit",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonRevert"})})}),(0,L.jsx)(ts,{}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)($r,{onTyping:this.handleSearch})})]}),(0,L.jsxs)(Ss,{className:"wpt-mgt-10 wpt-mgb-10",children:[(0,L.jsx)(ts,{},"toolbarExpander"),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)($n,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.filterByLabel"}),labelPlacement:"left",buttons:[{value:Vj,title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonShowAll",params:{count:t.length}}),disabled:0===t.length},{value:$j,title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonShowCritical",params:{count:l}}),disabled:0===l},{value:Wj,title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonShowRecommended",params:{count:c}}),disabled:0===c}],selected:r,onChange:this.handleFilter})},"toolbarShowInstances")]})]})}renderLastSecurityCheckDatePanel(){const{isCheckingSecurity:e}=this.state,{securityMeasuresInstallationStatuses:t}=this.props;if(e)return null;const n=t.reduce(((e,t)=>(t.lastSecurityCheckTimestamp&&e.push(t.lastSecurityCheckTimestamp),e)),[]);if(0===n.length)return(0,L.jsx)(Ar,{children:(0,L.jsx)(Wn,{className:"wpt-instances-security_last-security-check-date",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.lastSecurityCheckDateIsUnknown"})})});const s=new Date(1e3*Math.min(...n));return(0,L.jsx)(Ar,{children:(0,L.jsx)(Wn,{className:"wpt-instances-security_last-security-check-date",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.lastSecurityCheckDate",params:{lastSecurityCheckDate:s.toLocaleString()}})})})}renderInstancesList(){const{selection:e,isListDisabled:t,isCheckingSecurity:n}=this.state,s=this.getListData();return n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.checkingForSecurity"})]}):0===s.length?(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.noInstancesYet"}):(0,L.jsx)(Wa,{className:t?"hided-mass-checkbox wpt-mgt-15":"wpt-mgt-15",columns:this.getListColumns(),data:s,selection:e,rowKey:"id",onSelectionChange:e=>this.setState({selection:e})})}renderResolveSecurityCheckersDialog(){const{showResolveSecurityCheckersDialog:e}=this.state;return e?(0,L.jsx)(ji,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.resolveSecurityCheckers.dialogTitle"}),size:"sm",isOpen:e,onClose:this.handleToggleResolveSecurityCheckersDialog,buttons:(0,L.jsx)(Ue,{onClick:()=>{this.handleSecure(),this.handleToggleResolveSecurityCheckersDialog()},disabled:0===this.state.securityCheckersSelection.length,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonSecure"})}),children:(0,L.jsx)(OS,{securityMeasuresForResolving:this.getAvailableSecurityMeasuresForResolving(),setSecurityCheckersSelection:this.setSecurityCheckersSelection})}):null}renderRevertSecurityCheckersDialog(){const{showRevertSecurityCheckersDialog:e}=this.state;return e?(0,L.jsx)(ji,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.revertSecurityCheckers.dialogTitle"}),size:"sm",isOpen:e,onClose:this.handleToggleRevertSecurityCheckersDialog,buttons:(0,L.jsx)(Ue,{onClick:()=>{this.handleRevert(),this.handleToggleRevertSecurityCheckersDialog()},disabled:0===this.state.securityCheckersSelection.length,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.buttonRevert"})}),children:(0,L.jsx)(MS,{securityMeasuresForReverting:this.getAvailableSecurityMeasuresForReverting(),setSecurityCheckersSelection:this.setSecurityCheckersSelection})}):null}render(){return this.state.isLoading?(0,L.jsx)(It,{}):this.state.unableToLoad?(0,L.jsx)(ge,{intent:"danger",children:(0,L.jsx)(Ac,{content:"api.securityMeasures.failedToLoadPerInstance"})}):(0,L.jsxs)(L.Fragment,{children:[this.renderPaidFeatureDesc(),(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.headDescription"}),this.renderToolbar(),this.renderLastSecurityCheckDatePanel(),this.renderInstancesList(),this.renderResolveSecurityCheckersDialog(),this.renderRevertSecurityCheckersDialog()]})}}const qj=(0,so.$j)((e=>({securityMeasures:e.securityMeasures.securityMeasures,securityMeasuresInstallationStatuses:e.securityMeasures.securityMeasuresInstallationStatuses,tasks:e.backgroundTasks.tasks,isUnpaid:!!e.app.unpaidFeatures.secure,upgradeUrl:e.app.urls.featuresBuyLinks.secure,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl})),(e=>({checkSecurity:nh(Tg,e),resolveSecurityCheckers:nh(Cg,e),revertSecurityCheckers:nh(Dg,e),fetchBackgroundTasks:nh(ow,e),getSecurityMeasuresPerInstallations:nh(kg,e),reloadSecurityMeasuresPerInstallations:nh(jg,e)})))(zj),Gj="sites",Kj="vulnerabilities";class Xj extends U.Component{constructor(e){super(e),this.loadSecurityMeasures=()=>{this.props.securityMeasures&&this.props.securityMeasures.length>0?this.setState({isLoading:!1}):this.props.loadSecurityMeasures().catch((()=>{this.setState({unableToLoad:!0})})).finally((()=>{this.setState({isLoading:!1})}))},this.handleRefresh=()=>{this.setState({isLoading:!0,unableToLoad:!1},this.loadSecurityMeasures)},this.state={isLoading:!0,unableToLoad:!1}}componentDidMount(){this.loadSecurityMeasures()}render(){return this.state.isLoading?(0,L.jsx)(It,{}):this.state.unableToLoad?(0,L.jsxs)("div",{children:[(0,L.jsx)("h3",{children:(0,L.jsx)(Ac,{content:"api.securityMeasures.failedToLoad"})}),(0,L.jsx)("p",{children:(0,L.jsx)(Ue,{intent:"primary",onClick:this.handleRefresh,children:(0,L.jsx)(Ac,{content:"general-ui.react-js-error.refresh"})})})]}):this.props.children}}const Zj=(0,so.$j)((e=>({securityMeasures:e.securityMeasures.securityMeasures})),(e=>({loadSecurityMeasures:nh(_g,e)})))(Xj),Jj="wordpress",Qj="plugin",eT="theme",tT=e=>{const{deactivateButtonContent:t,target:n,onDeactivate:s,isOpen:i,onClose:a,children:r}=e;return(0,L.jsxs)(An,{target:n,visible:i,onClose:a,placement:"top",children:[(0,L.jsx)(as,{children:r}),(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{intent:"danger",onClick:()=>{s(),a()},"data-test-id":"instances-security-vulnerabilities-deactivate-confirmation-deactivate-button",children:t}),(0,L.jsx)(Ue,{onClick:a,ghost:!0,children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.deactivateConfirmation.cancelButton"})})]})]})},nT=e=>{const{target:t,onUpdate:n,isOpen:s,onClose:i,children:a,updateButtonContent:r}=e;return(0,L.jsxs)(An,{target:t,visible:s,onClose:i,placement:"top",children:[(0,L.jsx)(as,{children:a}),(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{onClick:()=>{n(),i()},"data-test-id":"instances-security-vulnerabilities-update-confirmation-update-button",children:r}),(0,L.jsx)(Ue,{onClick:i,ghost:!0,children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.cancelButton"})})]})]})},sT=({progressDescription:e,progress:t,button:n,baseClassName:s=`${gu}progress-with-action`})=>(0,L.jsxs)("div",{className:s,children:[(0,L.jsxs)("div",{className:`${s}__progress`,children:[(0,L.jsxs)("div",{className:`${s}__progress__description`,children:[(0,L.jsx)(he,{name:"web",size:"16",className:`${s}__progress-description-icon`}),(0,L.jsx)(je,{title:e,children:e})]}),(0,L.jsx)(Oi,{intent:"success",progress:t,className:`${s}__progress__bar`})]}),(0,L.jsx)("div",{className:`${s}__button`,children:n})]});const iT=e=>{var{baseClassName:t=`${gu}button-with-adaptive-content`,children:n,tooltip:s=null}=e,i=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["baseClassName","children","tooltip"]);return(0,L.jsx)(Ue,Object.assign({className:t,tooltip:null!=s?s:n},i,{children:n}))},aT=(0,so.$j)(((e,t)=>{const{vulnerabilities:n}=t,s=n.map((e=>e.id)),i=e.vulnerabilities.vulnerabilityMitigationsUpdatingStatuses.filter((e=>s.includes(e.vulnerabilityId)));return{securityMeasures:e.securityMeasures.securityMeasures,vulnerabilityMitigationsUpdatingStatuses:i}}),(e=>({mitigateVulnerabilities:nh($g,e)})))((({target:e,vulnerabilities:t,placement:n="top",popoverComment:s,baseClassName:i=`${gu}vuln-mitigations-popover`,securityMeasures:a,mitigateVulnerabilities:r,vulnerabilityMitigationsUpdatingStatuses:o})=>{const l=Mc(),[c,u]=(0,U.useState)(new Set),d=(0,U.useMemo)((()=>{const e=new Set;return o.forEach((t=>{t.mitigations.forEach((t=>{t.type===op.SecurityMeasure&&e.add(t.id)}))})),e}),[o]),[p,h]=(0,U.useMemo)((()=>{let e=new Set;const n=new Map;return t.forEach((t=>{const s=t.mitigations.filter((e=>e.type===op.SecurityMeasure));e=new Set([...e.values(),...t.installations.map((e=>e.id))]),s.forEach((e=>{var s,i;const a=null!==(s=n.get(e.id))&&void 0!==s?s:{vulnerabilities:new Map,installationsIdsAffected:new Set,installationsIdsApplied:new Set},r=null!==(i=a.vulnerabilities.get(t.id))&&void 0!==i?i:{vulnerabilityId:t.id,installationsIds:[],mitigations:[]};r.installationsIds=[...new Set([...r.installationsIds,...t.installations.map((e=>e.id))]).values()],a.vulnerabilities.set(t.id,r),a.installationsIdsAffected=new Set([...a.installationsIdsAffected.values(),...t.installations.map((e=>e.id))]),a.installationsIdsApplied=new Set([...a.installationsIdsApplied.values(),...t.installations.filter((t=>t.securityMeasuresApplied.includes(e.id))).map((e=>e.id))]),n.set(e.id,a)}))})),[e,n]}),[t]),m=e=>a.find((t=>t.id===e)),f=(e,t)=>{const n=h.get(e);if(!n)throw new Error(`Unable to find security measure by id ${e}`);const s=[];n.vulnerabilities.forEach((n=>{const i=structuredClone(n);i.mitigations.push({type:op.SecurityMeasure,id:e,applied:t}),s.push(i)}));const i=new Set(c);i.add(e),u(i),r(s).catch((()=>{})).finally((()=>{const t=new Set(c);t.delete(e),u(t)}))},g=e=>c.has(e)||d.has(e),b=()=>c.size>0||d.size>0;return(0,L.jsxs)(An,{target:e,placement:n,className:mm()(i),width:"xs",children:[s&&(0,L.jsx)(vi,{children:s}),(()=>{const e=[];return h.forEach(((t,n)=>{const s=p.size>1?((e,t)=>{const n=m(e),s=100*t.installationsIdsApplied.size/t.installationsIdsAffected.size,a=!(null==n?void 0:n.rollbackAvailable)||0===s;return n&&(0,L.jsxs)(Ks,{className:`${i}__section-item`,children:[(0,L.jsxs)("div",{className:`${i}__measure-title`,children:[(0,L.jsx)(Wn,{bold:!0,children:n.title}),(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-mgl-5"}),placement:"top-right",children:n.description}),n.rollbackAvailable&&(0,L.jsxs)(Wn,{className:"wpt-mgl-5",children:["(",(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.hasRollback"}),")"]})]}),(0,L.jsx)(sT,{progressDescription:g(e)?(0,L.jsx)(Ac,{content:"list-ui.instances.forms.securityMeasuresPopover.progress.undefined"}):(0,L.jsx)(Ac,{content:"list-ui.instances.forms.securityMeasuresPopover.progress.sitesCounter",params:{total:t.installationsIdsAffected.size,current:t.installationsIdsApplied.size}}),progress:g(e)?-1:s,button:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(iT,{onClick:()=>{f(e,!0)},disabled:100===s||b(),state:g(e)?"loading":void 0,intent:"primary",children:l("list-ui.instances.forms.securityMeasuresPopover.button.enableAll")})," ",(0,L.jsx)(iT,{onClick:()=>{f(e,!1)},disabled:a||b(),state:g(e)?"loading":void 0,children:l("list-ui.instances.forms.securityMeasuresPopover.button.disableAll")})]})})]},n.id)})(n,t):((e,t)=>{const n=m(e);return n&&(0,L.jsxs)(Ks,{className:`${i}__section-item`,title:((e,t)=>{const n=!e.rollbackAvailable,s=!!t&&n;return(0,L.jsx)(Nr,{loading:g(e.id),checked:t,disabled:s||b(),onChange:t=>{f(e.id,t)}})})(n,[...t.installationsIdsAffected.values()].every((e=>t.installationsIdsApplied.has(e)))),children:[n.title,(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-mgl-5"}),placement:"top-right",children:n.description}),n.rollbackAvailable&&(0,L.jsxs)(Wn,{className:"wpt-mgl-5",children:["(",(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.hasRollback"}),")"]})]},n.id)})(n,t);s&&e.push(s)})),0===e.length?(0,L.jsx)("div",{className:"wpt-mgt-10",children:(0,L.jsx)(It,{})}):(0,L.jsx)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.securityTabTitle"}),children:e})})()]})}));class rT extends U.Component{constructor(){super(...arguments),this.getActionText=()=>{const{vulnerability:e,isLoading:t,updatingMitigations:n}=this.props;return n.length>0||t?(0,L.jsx)(wS,{text:(0,L.jsx)(Ac,{content:"instanceVulnerabilities.mitigations.loading"})}):this.isMitigated(e)?(0,L.jsx)(Ac,{content:"instanceVulnerabilities.mitigations.mitigated"}):(0,L.jsx)(Ac,{content:"instanceVulnerabilities.mitigations.mitigate"})},this.getMitigateButtonIcon=()=>{const{vulnerability:e}=this.props;return this.isMitigated(e)?"power":"arrow-up-circle"}}isMitigated(e){return e.mitigations.some((e=>e.type===op.SecurityMeasure&&this.isSecurityMeasureApplied(e.id)))}isSecurityMeasureApplied(e){const{vulnerability:t}=this.props,n=t.mitigations.find((t=>t.id===e));return void 0!==n&&n.applied}render(){const{children:e,popoverClassName:t,vulnerability:n}=this.props;return n.mitigations.some((e=>e.type===op.SecurityMeasure))?(0,L.jsx)(aT,{target:(0,L.jsx)(fe,{ghost:!0,icon:this.getMitigateButtonIcon(),className:`${t}__action-text`,children:this.getActionText()}),popoverComment:(0,L.jsx)(Ac,{content:"instanceVulnerabilities.mitigations.mitigationAvailableText"}),vulnerabilities:[n]}):e}}rT.defaultProps={popoverClassName:`${gu}vuln-mitigations-popover`};const oT=(0,so.$j)(((e,t)=>{const{vulnerability:n}=t;return{updatingMitigations:e.vulnerabilities.vulnerabilityMitigationsUpdatingStatuses.filter((e=>e.vulnerabilityId===n.id)).map((e=>e.mitigations)).flat()}}))(rT);var lT;!function(e){e.Comma="comma-separator",e.Space="space-separator"}(lT||(lT={}));const cT=({separator:e,children:t,baseClassName:n=`${gu}separator`})=>(0,L.jsx)("span",{className:`${n}__${e}`,children:t}),uT=(0,so.$j)((e=>({publicUrl:e.app.urls.publicUrl})))((({publicUrl:e,baseClassName:t=`${gu}patchstack`})=>(0,L.jsx)("img",{className:`${t}__logo-color`,src:`${e}images/patchstack.svg`,alt:"Patchstack"}))),dT=(0,so.$j)((e=>({publicUrl:e.app.urls.publicUrl})))((({publicUrl:e})=>(0,L.jsx)("img",{src:`${e}images/wordfence.svg`,alt:"Wordfence"}))),pT=()=>(0,L.jsx)(Ac,{content:"controllers.index.detail.virtualPatches.poweredBy",params:{providerLogo:(0,L.jsx)(wn,{target:"_blank",href:"https://patchstack.com",children:(0,L.jsx)(uT,{})})}}),hT=e=>{const{dataTestId:t,localeKey:n,popoverLocaleKey:s,intent:i="success",caps:a=!0,icon:r,baseClassName:o=`${gu}mitigated-by-label`}=e;return s?(0,L.jsx)("div",{className:o,children:(0,L.jsx)(An,{target:(0,L.jsx)(ye,{caps:a,view:"outline",intent:i,icon:r,"data-test-id":t,children:(0,L.jsx)(Ac,{content:n})}),children:(0,L.jsx)(Ac,{content:s,params:{textWithLogoPoweredByPatchstack:(0,L.jsx)("div",{children:(0,L.jsx)(pT,{})})}})})}):(0,L.jsx)("div",{className:o,children:(0,L.jsx)(ye,{caps:a,view:"outline",intent:i,icon:r,"data-test-id":t,children:(0,L.jsx)(Ac,{content:n})})})},mT=({text:e,shortTextLength:t})=>{const[n,s]=(0,U.useState)(e.length<=t),i=n?e:e.slice(0,t).trim();return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Wn,{children:i}),!n&&(0,L.jsxs)(L.Fragment,{children:["... ",(0,L.jsx)(wn,{onClick:()=>s(!0),children:(0,L.jsx)(Ac,{content:"cuttableText.showMoreLink"})})]})]})},fT=({onHandleApplyVirtualPatches:e,isDisabled:t=!1,renderManagingComponent:n,Consent:s})=>{const[i,a]=(0,U.useState)(!1),[r,o]=(0,U.useState)(void 0),[l,c]=(0,U.useState)(!1),u=n(t,l,(()=>{c(!0),o(void 0),e(!0).catch((e=>{var t,n,s;422===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&(o(null===(s=null===(n=e.response.data)||void 0===n?void 0:n.meta)||void 0===s?void 0:s.message),a(!0))})).then((()=>{a(!0)})).finally((()=>{c(!1)}))}));return t||l?u:(0,L.jsx)(An,{visible:i,onClose:()=>a(!1),target:u,children:r?(0,L.jsx)("div",{style:{textAlign:"justify"},children:r}):(0,L.jsx)(s,{isButtonDisabled:t,isButtonLoading:l,onSubmit:()=>{c(!0),a(!1),e().finally((()=>c(!1)))},dataTestId:Qh})})},gT=(0,so.$j)(null,(e=>({instancesActions:nh({updateVulnerabilityFilteringSettings:Ry},e)})))((({installation:e,instancesActions:{updateVulnerabilityFilteringSettings:t}})=>{const[n,s]=(0,U.useState)(!1),i=(0,U.useCallback)((n=>{s(!0),t(e.id,{status:n}).catch((()=>{})).finally((()=>s(!1)))}),[e.id,t]);return(0,L.jsxs)(Wn,{children:[(0,L.jsx)(Ac,{content:"vulnerabilityFilteringSettings.featureEnabled"})," ",(0,L.jsx)(Nr,{checked:e.features.vulnerabilityFiltering.status||!1,onChange:i,disabled:n,tooltip:(0,L.jsx)(Ac,{content:"vulnerabilityFilteringSettings.featureEnabled.hint"})})]})})),bT=({onSubmit:e,dataTestId:t,isButtonDisabled:n=!1,isButtonLoading:s=!1,baseClassName:i=`${gu}virtual-patches-consent`})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:`${i}__popover-content`,children:[(0,L.jsx)(Ac,{component:as,content:"list-ui.instances.forms.security.virtualPatches.instancesWidget.consentForm.description"}),(0,L.jsx)("div",{className:`${i}__popover-content-item`,children:(0,L.jsx)(pT,{})})]}),(0,L.jsx)(Ue,{id:Fh,"data-test-id":t,disabled:n,state:s?"loading":void 0,onClick:e,icon:"shield",size:"md",intent:"primary",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.instancesWidget.consentForm.button"})})]}),vT=({features:{virtualPatches:e}},t,n)=>{const s=null!==e.subscription&&[Qd.Active,Qd.Suspended].includes(e.subscription.status),i=!e.restrictions.includes(Jd.LicenseAbsent),a=!e.restrictions.includes(Jd.WpToolkitDeluxeDisabled),r=!n&&e.restrictions.includes(Jd.DisabledForDomain)&&t;return i&&a&&!r||s},yT=(e,t,n)=>e.includes(Jd.FeatureDisabled)||e.includes(Jd.DisabledForDomain)&&!t&&!n,_T=(0,so.$j)((e=>({showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans,isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller})),(e=>({displayErrorMessageFromMeta:nh(_p,e)})))((({installation:e,baseClassName:t,hasActiveVirtualPatchesTasks:n,onHandleApplyVirtualPatches:s,onOpenUpsellDialog:i,displayErrorMessageFromMeta:a,showVirtualPatchesUpsellWhenRestrictedViaPlans:r,isAdmin:o})=>{const[l,c]=(0,U.useState)(!1),[u,d]=U.useState(!1),p=vT(e,r,o);return(0,L.jsx)(An,{target:(0,L.jsx)(fe,{ghost:!0,icon:p?"shield":"lock-closed",onClick:p?()=>c(!0):()=>i(Tm),className:`${t}__action-container`,progress:u||n,"data-test-id":"instances-security-vulnerabilities-virtual-patches-available-action",children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.virtualPatches.availableForPatches"})}),visible:l,onClose:()=>c(!1),children:(0,L.jsx)(bT,{onSubmit:()=>{c(!1),d(!0),s([e.id]).catch((e=>{var t;422===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&a(e)})).finally((()=>d(!1)))},isButtonDisabled:u||n,isButtonLoading:n,dataTestId:Qh})})}));class xT extends U.Component{constructor(e){super(e),this.handleTogglePopover=()=>this.setState((e=>({showPopover:!e.showPopover}))),this.getPopoverContent=()=>{const{isPermissionDenied:e,wordPressToolkitLiteEdition:t,purchaseDeluxeGuardianUrl:n,purchaseWordPressToolkitUrl:s,upgradePleskUrl:i,uatAction:a}=this.props;return e?(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.permissionDenied"}):t?(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.wordPressToolkitFullVersionAndDeluxeGuardianLicenseRequired",params:{purchaseDeluxeGuardianLicenseLink:(0,L.jsx)(wn,{href:n,target:"_blank",onClick:()=>lm(a),children:(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.purchaseDeluxeGuardianLicenseLink"})}),purchaseWordPressToolkitLink:(0,L.jsx)(wn,{href:s,target:"_blank",onClick:()=>lm(a),children:(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.purchaseWordPressToolkitLink"})}),upgradePleskLink:(0,L.jsx)(wn,{href:i,target:"_blank",children:(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.upgradePleskLink"})})}}):(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.descriptionForPlesk"})},this.getPopoverActions=()=>{const{purchaseDeluxeGuardianUrl:e,premiumFeaturesUrl:t,uatAction:n,wordPressToolkitLiteEdition:s,upgradePleskUrl:i,installationId:a}=this.props,r=s?i:e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(dm,{purchaseLicenseUrl:r,uatAction:n,onTogglePopover:this.handleTogglePopover,featureType:"virtualPatches",installationId:a,children:(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.purchaseButton"})}),t&&(0,L.jsx)(Ue,{ghost:!0,component:"a",target:"_blank",href:t,children:(0,L.jsx)(Ac,{content:"paidGuardianDeluxe.discoverAllPremiumFeaturesButton"})})]})},this.getPopover=()=>{const{renderManagingComponent:e,baseClassName:t}=this.props,{showPopover:n}=this.state;return(0,L.jsx)(An,{visible:n,width:"xs",onClose:this.handleTogglePopover,target:e((0,L.jsx)(fe,{onClick:this.handleTogglePopover,icon:"lock-closed"}),this.handleTogglePopover),children:(0,L.jsxs)(qi,{className:`${t}__popover-content`,children:[(0,L.jsxs)(Xi,{children:[(0,L.jsx)(he,{name:"lock-closed",size:"24",intent:"inactive"})," ",(0,L.jsx)(Wn,{children:(0,L.jsx)(Ac,{content:"premiumFeature.title"})})]}),(0,L.jsx)(Ki,{children:this.getPopoverContent()}),(0,L.jsx)(Gi,{children:this.getPopoverActions()})]})})},this.state={showPopover:!1}}render(){const{isPaid:e,renderManagingComponent:t,baseClassName:n,className:s}=this.props;return e?t():this.getPopover()}}xT.defaultProps={baseClassName:`${gu}paid-guardian-deluxe`};const ST=(0,so.$j)((e=>({purchaseDeluxeGuardianUrl:e.app.urls.purchaseDeluxeGuardianUrl,purchaseWordPressToolkitUrl:e.app.urls.purchaseWordPressToolkitUrl,upgradePleskUrl:e.app.urls.upgradePleskUrl,wordPressToolkitLiteEdition:e.app.options.wordPressToolkitLiteEdition,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,isPermissionDenied:!e.app.options.isAdmin||e.app.options.isReseller})))(xT),wT="exploited",kT="mitigated",jT="core",TT="plugin",CT="theme",DT="low-score",PT=({onTyping:e})=>{const t=Mc()("instancesVulnerabilities.instancesVulnerabilitiesList.searchBarPlaceholder");return(0,L.jsx)($r,{onTyping:e,inputProps:{placeholder:t}})},IT=({baseClassName:e,value:t,inactive:n})=>{const s=Mc("instancesVulnerabilities.instancesVulnerabilitiesList.riskRankColumn");let i;return i=n?`${e}__label-inactive`:t===rp.Critical?`${e}__label-danger`:t===rp.High?`${e}__label-danger-light`:`${e}__label-warning`,(0,L.jsx)(ye,{intent:"info",className:`${e}__label ${i}`,children:s(t)})};class OT extends U.Component{constructor(e){super(e),this.initListData=()=>{var e;const{installationsVulnerabilityStatuses:t,loadMitigationsStatuses:n,vulnerabilitiesList:{frankyVulnerabilities:s},securityMeasures:i,securityMeasuresInstallationStatuses:a}=this.props,r=null!==(e=null==t?void 0:t.map((e=>e.id)))&&void 0!==e?e:[];r.length>0&&null!==s&&(this.setState({isMitigationsDataLoading:!0}),n(r,s,i,a).catch((()=>{})).finally((()=>{this.setState({isMitigationsDataLoading:!1})}))),this.setState({listData:s},this.updateShowedListData)},this.initUpdatingState=()=>{this.setState({isUpdating:this.props.isUpdating})},this.initDeactivatingState=()=>{this.setState({isDeactivatingAsset:this.props.isDeactivatingAsset})},this.updateShowedListData=()=>{this.applyFilters(this.state.filters)},this.handleFilterClear=()=>{this.applyFilters([])},this.toggleFilter=e=>{const{filters:t}=this.state,n=t.includes(e)?t.filter((t=>t!==e)):[e,...t];this.setState({filters:n,showFilters:!0})},this.applyFilters=e=>{var t,n,s;const{listData:i,search:a}=this.state;let r=i;const o=a.toLowerCase();r=(null==r?void 0:r.filter((e=>!o||-1!==e.title.toLowerCase().indexOf(o))))||[],r=null==r?void 0:r.filter((t=>e.includes(wT)&&t.exploited||e.includes(kT)&&t.mitigations.length>0&&t.mitigations.some((e=>e.applied))||e.includes(jT)&&t.assetType===Jj||e.includes(TT)&&t.assetType===Qj||e.includes(CT)&&t.assetType===eT||0===e.length)),(null===(s=null===(n=null===(t=this.props.installation)||void 0===t?void 0:t.features)||void 0===n?void 0:n.vulnerabilityFiltering)||void 0===s?void 0:s.status)&&0!==e.length&&(r=null==r?void 0:r.filter((t=>e.includes(DT)||t.riskRank!==rp.Low))),this.setState({showedListData:r.map((e=>Object.assign(Object.assign({},e),{labels:this.getVulnerabilityLabels(e)})))||null,showFilters:!1,filters:e})},this.getSelectedVulnerabilitiesForAssetsUpdate=()=>{const{listData:e,selection:t}=this.state;return(null==e?void 0:e.filter((e=>(!t.length||t.includes(e.id))&&e.assets.some((e=>e.hasUpdates)))))||[]},this.handleCheckVulnerability=()=>{var e;const{instancesActions:{checkInstallationsVulnerability:t},installationsVulnerabilityStatuses:n}=this.props,s=null!==(e=null==n?void 0:n.map((e=>e.id)))&&void 0!==e?e:[];this.setState({isCheckingVulnerability:!0,instancesIdsForVulnerabilityStatusesUpdate:s}),t(s).then((e=>{this.setState({checkInstallationsVulnerabilityBackgroundTaskId:e.id})})).catch((()=>this.handleOnCompleteCheckInstallationsVulnerability()))},this.handleOnReceiveCheckInstallationsVulnerabilityBackgroundTaskData=e=>{const{onRefreshInstallationsVulnerabilityStatuses:t}=this.props,{checkInstallationsVulnerabilityBackgroundTaskId:n,instancesIdsForVulnerabilityStatusesUpdate:s}=this.state;if(!n)return;const i=iw(n,e);i&&tw(i)&&t(s).finally((()=>this.handleOnCompleteCheckInstallationsVulnerability()))},this.handleOnCompleteCheckInstallationsVulnerability=()=>{this.setState({isCheckingVulnerability:!1,checkInstallationsVulnerabilityBackgroundTaskId:null,instancesIdsForVulnerabilityStatusesUpdate:[]})},this.handleUpdateAll=()=>{this.handleMitigate(this.getSelectedVulnerabilitiesForAssetsUpdate(),op.Update)},this.handleMitigate=(e,t)=>{if(this.state.isUpdating||this.state.isDeactivatingAsset)return;const{mitigateVulnerabilities:n}=this.props,s=[];e.forEach((e=>{const n=e.mitigations.filter((e=>e.type===t&&!e.applied)).map((e=>({applied:!0,type:e.type,id:e.id})));n.length>0&&s.push({vulnerabilityId:e.id,installationsIds:e.installations.map((e=>e.id)),mitigations:n})})),0!==s.length&&(this.setState({isUpdating:t===op.Update,isDeactivatingAsset:t===op.DeactivateAsset}),n(s).catch((()=>this.setState({isUpdating:!1,isDeactivatingAsset:!1}))))},this.handleSelectionChange=e=>this.setState({selection:e}),this.handleSearch=e=>this.setState({search:e},this.updateShowedListData),this.handleOpenUpdateConfirmation=e=>{this.setState({showUpdateConfirmation:!0,updateConfirmationRowId:e})},this.handleCloseUpdateConfirmation=()=>{this.setState({showUpdateConfirmation:!1,updateConfirmationRowId:null})},this.handleOpenDeactivateConfirmation=e=>{this.setState({showDeactivateConfirmation:!0,deactivateConfirmationRowId:e})},this.handleCloseDeactivateConfirmation=()=>{this.setState({showDeactivateConfirmation:!1,deactivateConfirmationRowId:null})},this.handleFilterShowToggle=()=>{const{showFilters:e}=this.state;this.setState({showFilters:!e})},this.getFilterCheckBoxes=()=>{var e,t,n;const{listData:s,filters:i}=this.state,a=null==s?void 0:s.filter((e=>e.exploited)).length,r=null==s?void 0:s.filter((e=>e.assetType===Jj)).length,o=null==s?void 0:s.filter((e=>e.assetType===Qj)).length,l=null==s?void 0:s.filter((e=>e.assetType===eT)).length,c=null==s?void 0:s.filter((e=>e.mitigations.length>0&&e.mitigations.some((e=>e.applied)))).length,u=[{name:wT,count:a,translate:"instancesVulnerabilities.instancesVulnerabilitiesList.exploitedFilter"},{name:kT,count:c,translate:"instancesVulnerabilities.instancesVulnerabilitiesList.mitigatedFilter"},{name:jT,count:r,translate:"instancesVulnerabilities.instancesVulnerabilitiesList.coreFilter"},{name:TT,count:o,translate:"instancesVulnerabilities.instancesVulnerabilitiesList.pluginFilter"},{name:CT,count:l,translate:"instancesVulnerabilities.instancesVulnerabilitiesList.themeFilter"}];if(null===(n=null===(t=null===(e=this.props.installation)||void 0===e?void 0:e.features)||void 0===t?void 0:t.vulnerabilityFiltering)||void 0===n?void 0:n.status){const e=null==s?void 0:s.filter((e=>e.riskRank===rp.Low)).length;u.push({name:DT,count:e,translate:"instancesVulnerabilities.instancesVulnerabilitiesList.lowScoreFilter"})}return u.map((e=>(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:e.translate,params:{count:e.count}}),onChange:()=>this.toggleFilter(e.name),value:i.includes(e.name)},e.name)))},this.getFilterForm=()=>{const{filters:e}=this.state;return(0,L.jsx)(Ar,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.filterTitle"}),extra:[(0,L.jsx)(Ue,{ghost:!0,icon:"clean",onClick:this.handleFilterClear,children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.clearFilter"})},"button")],children:(0,L.jsx)(Si,{applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.applyFilter"}),fill:!0},onSubmit:()=>this.applyFilters(e),cancelButton:!1,children:this.getFilterCheckBoxes()})})},this.getToolbar=()=>{var e,t,n,s;const{isCheckingVulnerability:i,showFilters:a,filters:r,isUpdating:o,isDeactivatingAsset:l}=this.state,{onChangeListView:c,isVulnerabilityFeatureUnpaid:u,isVirtualPatchesFeatureEnabled:d,installation:p,vulnerabilitiesList:{installationsWithoutRestrictionsForVirtualPatches:h},isAdmin:m}=this.props,f=null===(e=this.props.installation)||void 0===e?void 0:e.id,g=this.getSelectedVulnerabilitiesForAssetsUpdate(),b=d&&!(null==p?void 0:p.id)&&!!(null==h?void 0:h.length);return(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.updateTitle"}),children:(0,L.jsx)(ls,{noSelectionText:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.noSelectionText"}),actionButtonText:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonUpdateAll"}),children:(0,L.jsx)(Ue,{intent:"primary",state:o?"loading":void 0,disabled:u||i||o||l||!g.length,onClick:this.handleUpdateAll,"data-test-id":"instances-security-vulnerabilities-update-button",children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonUpdate"})})})}),b&&(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.applyPatchesTitle"}),children:this.getVirtualPatchesToolbarButton()}),(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.checkVulnerabilityTitle"}),children:(0,L.jsx)(Ue,{icon:"refresh",state:i?"loading":void 0,disabled:o||l,onClick:this.handleCheckVulnerability,"data-test-id":"instances-security-vulnerabilities-scan-button",tooltip:this.getLastVulnerabilityCheckDate()})}),(0,L.jsx)(ts,{}),(0,L.jsx)(L.Fragment,{children:void 0===f&&(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.viewsTitle"}),children:(0,L.jsx)($n,{buttons:[{value:Kj,title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonVulnerabilities"}),"data-test-id":Zh},{value:Gj,title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonSites"}),"data-test-id":Xh}],selected:Kj,onChange:c})})}),(null===(s=null===(n=null===(t=this.props.installation)||void 0===t?void 0:t.features)||void 0===n?void 0:n.vulnerabilityFiltering)||void 0===s?void 0:s.available)&&(0,L.jsx)(_s,{title:"Settings",children:(0,L.jsx)(gT,{installation:this.props.installation})}),(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.filterTitle"}),children:(0,L.jsx)(_e,{intent:"info",hidden:0===r.length,children:(0,L.jsx)(Ue,{icon:"filter",tooltip:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.filterTitle"}),onClick:this.handleFilterShowToggle,state:a?"active":void 0})})}),(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.search"}),children:(0,L.jsx)(PT,{onTyping:this.handleSearch})})]})},this.getVirtualPatchesToolbarButton=()=>{const{selection:e,listData:t}=this.state,{isProtectionPaid:n}=this.props,s=(null==t?void 0:t.filter((t=>!e.length||e.includes(t.id))))||[],{unprotectedInstallationIds:i}=this.getInstallationIdsForVulnerabilitiesRelatedToVirtualPatches(s),a=!!i.length,r=null==t?void 0:t.some((e=>e.hasActiveVirtualPatchesTasks));return(0,L.jsx)(ST,{renderManagingComponent:(e,t)=>e?(0,L.jsx)(Ue,{icon:e?"lock-closed":void 0,intent:"secondary",onClick:e?t:void 0,"data-test-id":Jh,children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.ApplyVirtualPatchesButton"})}):this.buildVirtualPatchesWidget(i,r||!a,((e,t,n)=>(0,L.jsx)(Ue,{intent:"secondary",disabled:e,state:t?"loading":void 0,onClick:n,"data-test-id":Jh,children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.ApplyVirtualPatchesButton"})}))),isPaid:!!n,uatAction:Cm})},this.getHowToFixTheme=e=>{const{isVulnerabilityFeatureUnpaid:t,baseClassName:n,installation:s}=this.props,{showUpdateConfirmation:i,updateConfirmationRowId:a}=this.state,r=e.assets.some((e=>e.isActive)),o=[];return e.mitigations.some((e=>e.type===op.Update))&&o.push((0,L.jsx)("div",{className:`${n}__how-to-fix-action-block`,children:(0,L.jsx)(nT,{target:(0,L.jsx)(fe,{icon:t?"lock-closed":"arrow-up-circle",onClick:t?void 0:()=>{this.handleOpenUpdateConfirmation(e.id)},className:`${n}__how-to-fix-action`,"data-test-vulnerability-how-to-fix":"instances-security-vulnerabilities-theme-update-all-button",children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.themeUpdateButton",params:{updateVersion:e.assetUpdateVersion}}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.updateButtonAll"})}),onUpdate:()=>this.handleMitigate([e],op.Update),isOpen:i&&a===e.id,onClose:this.handleCloseUpdateConfirmation,updateButtonContent:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.updateButton"}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.updateAllButton"}),children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.themeOnSite",params:{updateVersion:e.assetUpdateVersion,themeSlug:e.assetSlug,siteSlug:s.displayTitle}}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.themeOnAllSites",params:{updateVersion:e.assetUpdateVersion,themeSlug:e.assetSlug}})},`key-how-to-fix-mitigate-theme-${e.id}`)},`key-how-to-fix-update-${e.id}`)),o.length?(o.push(this.virtualPatchesStatusElement(e)),o.push(this.getVirtualPatchesWidget(e)),o):(o.push(this.virtualPatchesStatusElement(e)),o.push(this.getVirtualPatchesWidget(e)),r?(o.push((0,L.jsxs)("div",{children:[(0,L.jsx)(Ac,{"data-test-vulnerability-how-to-fix":em,content:"instancesVulnerabilities.instancesVulnerabilitiesList.noUpdatesAvailable"})," ",(0,L.jsx)(An,{target:(0,L.jsx)(he,{name:"question-mark-circle"}),children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.noActionsAvailableForTheme"})})]},`key-how-to-fix-no-actions-available-theme-${e.id}`)),o):(o.push((0,L.jsxs)("div",{children:[(0,L.jsx)(Ac,{"data-test-vulnerability-how-to-fix":em,content:"instancesVulnerabilities.instancesVulnerabilitiesList.noUpdatesAvailable"})," ",(0,L.jsx)(An,{target:(0,L.jsx)(he,{name:"question-mark-circle"}),children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.noActionsAvailableForDeactivatedTheme"})})]},`key-how-to-fix-no-update-available-theme-${e.id}`)),o))},this.getHowToFixWordPressCore=e=>{const{isVulnerabilityFeatureUnpaid:t,baseClassName:n,installation:s}=this.props,{isMitigationsDataLoading:i,showUpdateConfirmation:a,updateConfirmationRowId:r}=this.state,o=[];return e.mitigations.some((e=>e.type===op.Update))&&o.push((0,L.jsx)("div",{className:`${n}__how-to-fix-action-block`,children:(0,L.jsx)(nT,{target:(0,L.jsx)(fe,{icon:t?"lock-closed":"arrow-up-circle",onClick:t?void 0:()=>{this.handleOpenUpdateConfirmation(e.id)},className:`${n}__how-to-fix-action`,"data-test-vulnerability-how-to-fix":"instances-security-vulnerabilities-wordpress-core-update-all-button",children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.coreUpdateButton",params:{updateVersion:e.assetUpdateVersion}}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.updateButtonAll"})}),onUpdate:()=>this.handleMitigate([e],op.Update),isOpen:a&&r===e.id,onClose:this.handleCloseUpdateConfirmation,updateButtonContent:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.updateButton"}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.updateAllButton"}),children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.wordPressCoreOnSite",params:{siteSlug:s.displayTitle,updateVersion:e.assetUpdateVersion}}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.wordPressCoreOnAllSites",params:{updateVersion:e.assetUpdateVersion}})},`key-how-to-fix-core-${e.id}`)},`key-how-to-fix-update-${e.id}`)),o.length?(o.push(this.virtualPatchesStatusElement(e)),o.push(this.getVirtualPatchesWidget(e)),o):(o.push(this.virtualPatchesStatusElement(e)),o.push(this.getVirtualPatchesWidget(e)),o.push((0,L.jsxs)(oT,{vulnerability:e,isLoading:i,children:[(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.noUpdatesAvailable"})," ",(0,L.jsx)(An,{target:(0,L.jsx)(he,{name:"question-mark-circle"}),children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.noActionsAvailableForWordPress"})})]},`key-how-to-fix-core-not-available-actions-${e.id}`)),o)},this.getHowToFixPlugin=e=>{const{isVulnerabilityFeatureUnpaid:t,baseClassName:n,installation:s}=this.props,{showUpdateConfirmation:i,updateConfirmationRowId:a,showDeactivateConfirmation:r,deactivateConfirmationRowId:o}=this.state,l=e.mitigations.some((e=>e.type===op.Update)),c=e.mitigations.some((e=>e.type===op.DeactivateAsset&&!1===e.applied)),u=[];return l&&u.push((0,L.jsx)("div",{className:`${n}__how-to-fix-action-block`,children:(0,L.jsx)(nT,{target:(0,L.jsx)(fe,{icon:t?"lock-closed":"arrow-up-circle",onClick:t?void 0:()=>{this.handleOpenUpdateConfirmation(e.id)},className:`${n}__how-to-fix-action`,"data-test-vulnerability-how-to-fix":"instances-security-vulnerabilities-plugin-update-all-button",children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.pluginUpdateButton",params:{updateVersion:e.assetUpdateVersion}}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.updateButtonAll"})}),onUpdate:()=>this.handleMitigate([e],op.Update),isOpen:i&&a===e.id,onClose:this.handleCloseUpdateConfirmation,updateButtonContent:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.updateButton"}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.updateAllButton"}),children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.pluginOnSite",params:{updateVersion:e.assetUpdateVersion,pluginSlug:e.assetSlug,siteSlug:s.displayTitle}}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.updateConfirmation.pluginOnAllSites",params:{updateVersion:e.assetUpdateVersion,pluginSlug:e.assetSlug}})})},`key-how-to-fix-update-${e.id}`)),u.push(this.virtualPatchesStatusElement(e)),u.push(this.getVirtualPatchesWidget(e)),c&&u.push((0,L.jsx)("div",{className:`${n}__how-to-fix-action-block`,children:(0,L.jsx)(tT,{target:(0,L.jsx)(fe,{ghost:!0,icon:"power",onClick:()=>{this.handleOpenDeactivateConfirmation(e.id)},className:`${n}__how-to-fix-action`,"data-test-vulnerability-how-to-fix":"instances-security-vulnerabilities-plugin-deactivate-all-button",children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.deactivateButton"}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.deactivateButtonAll"})}),deactivateButtonContent:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.deactivateConfirmation.deactivateButton"}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.deactivateConfirmation.deactivateAllButton"}),onDeactivate:()=>this.handleMitigate([e],op.DeactivateAsset),isOpen:r&&o===e.id,onClose:this.handleCloseDeactivateConfirmation,children:s?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.deactivateConfirmation.pluginOnSite",params:{siteSlug:s.displayTitle,pluginSlug:e.assetSlug}}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.deactivateConfirmation.pluginOnAllSites",params:{pluginSlug:e.assetSlug}})})},`key-how-to-fix-deactivate-${e.id}`)),l||c||u.push((0,L.jsx)(Pi,{intent:"inactive","data-test-id":"instances-security-vulnerabilities-plugin-deactivated-status",children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.deactivatedAllStatus"})},`key-how-to-fix-deactivated-all-status-${e.id}`)),u},this.virtualPatchesStatusElement=e=>{if(!this.props.installation)return null;const{onOpenVirtualPatchingUpsellDialog:t,baseClassName:n,showVirtualPatchesUpsellWhenRestrictedViaPlans:s}=this.props,i=e.mitigations.find((e=>e.type===op.VirtualPatch)),{features:{virtualPatches:{restrictions:a}}}=this.props.installation;return yT(a,this.props.isAdmin,s)||!i||i.applied?null:(0,L.jsx)("div",{className:`${n}__how-to-fix-action-block`,children:(0,L.jsx)(_T,{installation:this.props.installation,baseClassName:n,hasActiveVirtualPatchesTasks:e.hasActiveVirtualPatchesTasks,onHandleApplyVirtualPatches:this.handleApplyVirtualPatches,onOpenUpsellDialog:t},`key-how-to-fix-virtual-patches-status-${e.id}`)},`key-how-to-fix-virtual-patches-widget-${e.id}`)},this.getInstallationIdsForVulnerabilitiesRelatedToVirtualPatches=e=>{const t=new Set,n=new Set;e.forEach((e=>{e.installations.filter((e=>!0===e.virtualPatchAvailable)).forEach((e=>t.add(e.id))),e.installations.filter((e=>!0===e.virtualPatchApplied)).forEach((e=>n.add(e.id)))}));const s=Array.from(t),i=Array.from(n),a=s.filter((e=>!i.includes(e)));return{availableInstallationIds:s,appliedInstallationIds:i,unprotectedInstallationIds:a}},this.getVirtualPatchesWidget=e=>{const{isProtectionPaid:t,baseClassName:n}=this.props;if(void 0!==this.props.installation)return null;if(!e.mitigations.some((e=>e.type===op.VirtualPatch)))return null;const{availableInstallationIds:s,appliedInstallationIds:i,unprotectedInstallationIds:a}=this.getInstallationIdsForVulnerabilitiesRelatedToVirtualPatches([e]);if(0===a.length)return null;const r=this.props.virtualPatchesUpdatingStatuses.some((e=>e.installationIds.some((e=>s.includes(e)))));return(0,L.jsx)(ST,{renderManagingComponent:(t,o)=>t?(0,L.jsx)("div",{className:`${n}__how-to-fix-action-block`,children:(0,L.jsx)(fe,{onClick:t?o:void 0,ghost:!0,className:`${n}__how-to-fix-action`,intent:"primary",icon:t?"lock-closed":"shield",progress:r,"data-test-id":Kh,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.instancesWidget.button",params:{protectedInstancesCount:i.length,totalInstancesCount:s.length}})})},`key-how-to-fix-virtual-patches-widget-${e.id}`):(0,L.jsx)("div",{className:`${n}__how-to-fix-action-block`,children:this.buildVirtualPatchesWidget(a,!1,((e,t,a)=>(0,L.jsx)(fe,{onClick:a,ghost:!0,className:`${n}__how-to-fix-action`,intent:"primary",icon:"shield",progress:r||t,"data-test-id":Kh,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.instancesWidget.button",params:{protectedInstancesCount:i.length,totalInstancesCount:s.length}})})))},`key-how-to-fix-virtual-patches-widget-${e.id}`),isPaid:!!t,uatAction:Cm})},this.buildVirtualPatchesWidget=(e,t,n)=>(0,L.jsx)(fT,{onHandleApplyVirtualPatches:t=>this.handleApplyVirtualPatches(e,t),isDisabled:t,renderManagingComponent:n,Consent:bT}),this.handleApplyVirtualPatches=(e,t)=>{const{vulnerabilitiesActions:n}=this.props;return n.updateVirtualPatchesProtectionStatus({installationsIds:e,status:!0,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0},t)},this.getHowToFix=e=>{const t=[];return e.assetType===Jj?t.push(...this.getHowToFixWordPressCore(e)):e.assetType===eT?t.push(...this.getHowToFixTheme(e)):e.assetType===Qj&&t.push(...this.getHowToFixPlugin(e)),(0,L.jsxs)(L.Fragment,{children:[e.labels.length>0?(0,L.jsx)("div",{className:`${this.props.baseClassName}__mitigation-labels`,children:e.labels}):void 0,t.length>0?(0,L.jsx)("div",{className:`${this.props.baseClassName}__how-to-fix-elements`,children:t}):void 0]})},this.handleSitesClick=e=>{const{onChangeSiteViewInstallationsIds:t,onChangeListView:n}=this.props;n&&n(Gj),t&&t(e.installations.map((e=>e.id)))},this.getVulnerabilityType=e=>{var t,n;const{baseClassName:s}=this.props,i=null===(t=this.props.installation)||void 0===t?void 0:t.id,a=e.installations.length>1?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.sites"}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.site"}),r=null!==(n={[Jj]:{icon:"wordpress",translate:"instancesVulnerabilities.instancesVulnerabilitiesList.vulnerabilityTypeCore"},[Qj]:{icon:"puzzle",translate:"instancesVulnerabilities.instancesVulnerabilitiesList.vulnerabilityTypePlugin"},[eT]:{icon:"monitoring",translate:"instancesVulnerabilities.instancesVulnerabilitiesList.vulnerabilityTypeTheme"}}[e.assetType])&&void 0!==n?n:null;return null===r?null:(0,L.jsxs)("div",{className:`${s}__type-items`,children:[(0,L.jsxs)("div",{children:[(0,L.jsx)(he,{name:r.icon})," ",(0,L.jsx)(Ac,{content:r.translate})]}),(0,L.jsx)(L.Fragment,{children:void 0===i&&(0,L.jsxs)("div",{children:[(0,L.jsx)(he,{name:"site-page"})," ",(0,L.jsxs)(wn,{onClick:()=>this.handleSitesClick(e),"data-test-id":"instances-security-vulnerabilities-sites-link",children:[e.installations.length," ",a]})]})})]})},this.getMitigatedByLabels=({id:e,assetType:t,installations:n})=>{const s=[];let i=0,a=0,r=0,o=0;const l=n.length;return n.forEach((e=>{t!==Qj||e.assetIsActive||i++,t!==eT||e.assetIsActive||a++,e.securityMeasuresApplied.length>0&&r++,e.virtualPatchApplied&&o++})),o===l&&s.push((0,L.jsx)(hT,{dataTestId:"instances-security-vulnerabilities-mitigated-by-virtual-patches-label",localeKey:"instancesVulnerabilities.instancesVulnerabilitiesList.virtualPatches.labelMitigatedBy",popoverLocaleKey:"instancesVulnerabilities.instancesVulnerabilitiesList.virtualPatches.PopoverMitigatedBy",icon:"shield-filled"},`${e}-instances-security-vulnerabilities-mitigated-by-virtual-patches-label`)),r===l&&s.push((0,L.jsx)(hT,{dataTestId:"instances-security-vulnerabilities-mitigated-by-security-measures-label",localeKey:"instancesVulnerabilities.instancesVulnerabilitiesList.securityMeasure.labelMitigatedBy",popoverLocaleKey:"instancesVulnerabilities.instancesVulnerabilitiesList.securityMeasure.PopoverMitigatedBy"},`${e}-instances-security-vulnerabilities-mitigated-by-security-measures-label`)),i===l&&s.push((0,L.jsx)(hT,{dataTestId:"instances-security-vulnerabilities-mitigated-by-deactivate-asset-label",localeKey:"instancesVulnerabilities.instancesVulnerabilitiesList.deactivateAsset.labelMitigatedBy",popoverLocaleKey:"instancesVulnerabilities.instancesVulnerabilitiesList.deactivateAsset.PopoverMitigatedBy"},`${e}-instances-security-vulnerabilities-mitigated-by-deactivate-asset-label`)),a===l&&s.push((0,L.jsx)(hT,{dataTestId:"instances-security-vulnerabilities-mitigated-unused-theme-label",localeKey:"instancesVulnerabilities.instancesVulnerabilitiesList.unusedTheme.labelMitigatedBy",popoverLocaleKey:"instancesVulnerabilities.instancesVulnerabilitiesList.unusedTheme.PopoverMitigatedBy"},`${e}-instances-security-vulnerabilities-mitigated-unused-theme-label`)),n.every((e=>!e.assetIsActive||e.securityMeasuresApplied.length>0||e.virtualPatchApplied))&&!s.length&&s.push((0,L.jsx)(hT,{dataTestId:"instances-security-vulnerabilities-mitigated-by-multiply-types-label",localeKey:"instancesVulnerabilities.instancesVulnerabilitiesList.multiplyMitigation.labelMitigatedBy",popoverLocaleKey:"instancesVulnerabilities.instancesVulnerabilitiesList.multiplyMitigation.PopoverMitigatedBy"},`${e}-instances-security-vulnerabilities-mitigated-by-multiply-types-label`)),s},this.getVulnerabilityInfo=e=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Wn,{bold:!0,children:e.title}),(0,L.jsx)("br",{}),this.getVulnerabilityDescription(e)]}),this.getVulnerabilityRiskRank=e=>{const{baseClassName:t}=this.props;return(0,L.jsx)(IT,{baseClassName:t,value:e.riskRank,inactive:e.labels.length>0||e.assetType===eT&&e.installations.every((e=>!e.assetIsActive))||!1})},this.sortRows=(e,t)=>this.sortRowsByVulnerabilityActivity(e,t)||this.sortRowsByRiskRank(t,e)||this.sortRowsByCvss(t,e)||this.sortRowsByTitle(e,t),this.sortRowsByVulnerabilityActivity=(e,t)=>{const n=e.labels.length>0||e.assetType===eT&&e.installations.every((e=>!e.assetIsActive));return n===(t.labels.length>0||t.assetType===eT&&t.installations.every((e=>!e.assetIsActive)))?0:n?1:-1},this.sortRowsByRiskRank=(e,t)=>{const n={[rp.Critical]:4,[rp.High]:3,[rp.Medium]:2,[rp.Low]:1};return e.riskRank===t.riskRank?0:n[e.riskRank]<n[t.riskRank]?-1:1},this.sortRowsByCvss=(e,t)=>e.cvssScore===t.cvssScore?0:(e.cvssScore||0)<(t.cvssScore||0)?-1:1,this.sortRowsByTitle=(e,t)=>{const n=e.title.localeCompare(t.title);return 0===n?0:n>0?1:-1},this.getColumns=()=>[{key:"riskRank",width:"65px",style:{minWidth:"65px"},title:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.riskRankColumn"})," ",(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.riskRankColumnTooltip"}),children:(0,L.jsx)(he,{name:"question-mark-circle",size:"16"})})]}),render:e=>this.getVulnerabilityRiskRank(e),sort:(e,t)=>this.sortRows(e,t)},{key:"title",width:"55%",title:"",render:e=>this.getVulnerabilityInfo(e)},{key:"where",width:"10%",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.whereColumn"}),render:e=>this.getVulnerabilityType(e)},{key:"howToFix",width:"40%",align:"left",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.howToFixColumn"}),render:e=>this.getHowToFix(e)}],this.state={isCheckingVulnerability:!1,isMitigationsDataLoading:!1,selection:[],search:"",listData:null,showedListData:null,showUpdateConfirmation:!1,updateConfirmationRowId:null,showDeactivateConfirmation:!1,deactivateConfirmationRowId:null,instancesIdsForVulnerabilityStatusesUpdate:[],checkInstallationsVulnerabilityBackgroundTaskId:null,showFilters:!1,filters:[],isUpdating:e.isUpdating,isDeactivatingAsset:e.isDeactivatingAsset}}componentDidMount(){this.initListData()}componentDidUpdate(e){var t,n,s,i;e.tasks!==this.props.tasks&&this.handleOnReceiveCheckInstallationsVulnerabilityBackgroundTaskData(this.props.tasks),e.vulnerabilitiesList.frankyVulnerabilities!==this.props.vulnerabilitiesList.frankyVulnerabilities&&this.initListData(),(null===(n=null===(t=this.props.installation)||void 0===t?void 0:t.features)||void 0===n?void 0:n.vulnerabilityFiltering)!==(null===(i=null===(s=e.installation)||void 0===s?void 0:s.features)||void 0===i?void 0:i.vulnerabilityFiltering)&&this.applyFilters(this.state.filters),e.isUpdating!==this.props.isUpdating&&this.initUpdatingState(),e.isDeactivatingAsset!==this.props.isDeactivatingAsset&&this.initDeactivatingState()}getVulnerabilityLabels(e){var t,n,s;const i=this.getMitigatedByLabels(e);return(null===(s=null===(n=null===(t=this.props.installation)||void 0===t?void 0:t.features)||void 0===n?void 0:n.vulnerabilityFiltering)||void 0===s?void 0:s.status)&&e.riskRank===rp.Low&&i.push((0,L.jsx)(hT,{dataTestId:"instances-security-vulnerabilities-ignored-label",localeKey:"instancesVulnerabilities.instancesVulnerabilitiesList.labels.ignored",popoverLocaleKey:"instancesVulnerabilities.instancesVulnerabilitiesList.popovers.ignored",intent:"inactive"},`${e.id}-instances-security-vulnerabilities-ignored-label`)),i}getVulnerabilityDescription({description:e,providers:t,disclosedAt:n,id:s,installations:i,riskRank:a}){var r,o;const{baseClassName:l}=this.props,c=(null===(r=t[0])||void 0===r?void 0:r.provider)===lp.Wordfence,u=c?null===(o=t[0])||void 0===o?void 0:o.directUrl:"",d=t.map((e=>(0,L.jsx)(cT,{separator:lT.Space,children:(0,L.jsx)(wn,{href:e.directUrl,target:"_blank",className:`${l}__provider-link`,children:e.provider===lp.Wordfence?(0,L.jsx)(dT,{}):(0,L.jsx)(uT,{})})},e.provider)));return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(mT,{text:e,shortTextLength:100}),c&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("br",{}),(0,L.jsxs)(An,{target:(0,L.jsx)(Wn,{fontSize:"sm",children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.wordfenceCopyrightMessage"})}),placement:"top-right",children:[(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.wordfenceCopyrightText"})," ",(0,L.jsx)(wn,{target:"_blank",href:u,children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.wordfenceReadMore"})})]})]}),(0,L.jsx)("br",{}),(0,L.jsxs)(Wn,{fontSize:"sm",bold:!0,children:[(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.date"}),": ",n&&Xf()(new Date(n)).format("DD.MM.YYYY")," | ",(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.source"}),": ",d]})]})}getLastVulnerabilityCheckDate(){var e;const{installationsVulnerabilityStatuses:t}=this.props,n=null!==(e=null==t?void 0:t.reduce(((e,t)=>(t.lastVulnerabilityCheckTimestamp&&e.push(t.lastVulnerabilityCheckTimestamp),e)),[]))&&void 0!==e?e:[];if(0===n.length)return(0,L.jsx)(Ac,{content:"instancesVulnerabilities.lastVulnerabilityCheckDateIsUnknown"});const s=new Date(1e3*Math.min(...n)).toLocaleString();return(0,L.jsx)(Ac,{content:"instancesVulnerabilities.lastVulnerabilityCheckDate",params:{lastVulnerabilityCheckDate:s}})}render(){const{selection:e,isCheckingVulnerability:t,showedListData:n,showFilters:s,isUpdating:i,isDeactivatingAsset:a}=this.state,{vulnerabilitiesList:{isLoading:r}}=this.props;return r||!n?(0,L.jsx)(It,{}):(0,L.jsx)(Wa,{loading:i||a||t,columns:this.getColumns(),data:n,rowKey:"id",rowProps:e=>{var t;const n=e.assetType===Jj?{"data-test-vulnerability-product-type":e.assetType}:{"data-test-vulnerability-product-type":e.assetType,"data-test-vulnerability-product-slug":null===(t=e.assetSlug)||void 0===t?void 0:t.toLowerCase()};return(e.labels.length>0||e.assetType===eT&&e.installations.every((e=>!1===e.assetIsActive)))&&(n.className=`${this.props.baseClassName}__ignored-vulnerability`),n["data-vulnerability-id"]=e.id,n},emptyView:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.noVulnerabilities"}),toolbar:this.getToolbar(),selection:e,onSelectionChange:this.handleSelectionChange,filtered:!0,sidebar:s?this.getFilterForm():void 0,sortColumn:"riskRank",sortDirection:"ASC",totalRows:n.length})}}OT.defaultProps={baseClassName:`${gu}instances-vulnerabilities-list`};const LT=(0,so.$j)((e=>({installationsVulnerabilityStatuses:e.vulnerabilities.installationsVulnerabilityStatuses,isVirtualPatchesFeatureEnabled:e.app.options.virtualPatchesFeature,isVulnerabilityFeatureUnpaid:e.app.unpaidFeatures.vulnerability,securityMeasures:e.securityMeasures.securityMeasures,securityMeasuresInstallationStatuses:e.securityMeasures.securityMeasuresInstallationStatuses,tasks:e.backgroundTasks.tasks,virtualPatchesUpdatingStatuses:e.vulnerabilities.virtualPatchesUpdatingStatuses,vulnerabilityMitigationsUpdatingStatuses:e.vulnerabilities.vulnerabilityMitigationsUpdatingStatuses,isUpdating:e.vulnerabilities.vulnerabilityMitigationsUpdatingStatuses.some((e=>e.mitigations.some((e=>e.type===op.Update)))),isDeactivatingAsset:e.vulnerabilities.vulnerabilityMitigationsUpdatingStatuses.some((e=>e.mitigations.some((e=>e.type===op.DeactivateAsset)))),isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller,isClient:!e.app.options.isAdmin&&!e.app.options.isReseller,showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans})),(e=>({mitigateVulnerabilities:nh($g,e),instancesActions:nh({checkInstallationsVulnerability:jy},e),loadMitigationsStatuses:nh(Vg,e),vulnerabilitiesActions:nh({updateVirtualPatchesProtectionStatus:Wg},e)})))(OT),MT=e=>{switch(e){case"remove":return"recycle";case"circle-info":return"info-circle";default:return e}},AT=Nc(fS,"backups","limits"),ET=e=>t=>fp.getInstallationBackupsMeta(e).then((e=>{const n=e.data.value.map((({value:e})=>({fileName:e.fileName.value,fileSize:e.fileSize.value,createDate:e.createdAt.value})));return t({type:fS,backups:n,limits:{backupsLimit:e.data.meta.limit,backupsCount:n.length}}),e})),UT=()=>e=>e(AT([],void 0)),RT=(e,t)=>n=>fp.removeInstallationBackups(e,t).then((()=>(n({type:gS,fileNames:t}),t))),NT=e=>t=>fp.createInstallationBackup({installationId:e}).then((({data:e})=>(t(FT(e.task)),e))),FT=e=>t=>t({type:bS,task:e}),YT=()=>e=>e({type:"backup/BACKUP_CREATION_FINISHED_WITH_ERRORS"}),BT=e=>t=>{t(ET(e)).finally((()=>t({type:"backup/BACKUP_CREATION_FINISHED"})))},HT=(e,t)=>n=>fp.restoreInstallationBackup({installationId:e,fileName:t}).then((({data:e})=>(n(VT(e.task)),e))),VT=e=>t=>t({type:vS,task:e}),$T=()=>e=>e({type:"backup/BACKUP_RESTORING_FINISHED_WITH_ERRORS"}),WT=e=>t=>t(nv({instancesIds:[e]})).finally((()=>t({type:"backup/BACKUP_RESTORING_FINISHED"}))),zT="localCpanel",qT="remoteCpanel",GT="localPleskLinux",KT="localPleskWindows",XT="remoteGeneric",ZT="managedByPlugin",JT=e=>e===zT,QT=e=>eC(e)||tC(e),eC=e=>e===GT,tC=e=>e===KT,nC=e=>(e=>e===qT)(e)||e===XT,sC=e=>JT(e)||QT(e),iC=e=>e===ZT;class aC extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{installation:{features:{backups:e}},inNewWindow:t}=this.props;return e.backupManagerUrl?(0,L.jsx)("a",{href:e.backupManagerUrl,target:t?"_blank":"_self",children:(0,L.jsx)(Ac,{content:"backupManagerLink.text"})}):null},this.renderCpanel=()=>{const{installation:{features:{backups:e},owner:t},goToUri:n,inNewWindow:s}=this.props;if(!e.backupManagerUrl)return null;const i=bm({link:e.backupManagerUrl,inNewWindow:s,goToUri:n,accountUsername:t.login});return(0,L.jsx)("a",Object.assign({},i,{children:(0,L.jsx)(Ac,{content:"backupManagerLink.text"})}))}}render(){const{installation:{features:{backups:e},installationType:t}}=this.props;return e.panelBackupsAvailable?QT(t)?this.renderPlesk():JT(t)?this.renderCpanel():null:null}}aC.propTypes={installation:Vt().shape({features:Vt().shape({backups:Vt().shape({backupManagerUrl:Vt().string,panelBackupsAvailable:Vt().bool.isRequired})}).isRequired,installationType:Vt().string.isRequired,owner:Vt().shape({login:Vt().string.isRequired})}).isRequired,goToUri:Vt().func.isRequired,inNewWindow:Vt().bool},aC.defaultProps={inNewWindow:!1};const rC=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(aC);class oC extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{backupsUrl:e,backupsDirName:t,inNewWindow:n}=this.props;return e&&t?(0,L.jsx)("a",{href:e,target:n?"_blank":"_self",children:t}):null},this.renderCpanel=()=>{const{goToUri:e,installation:{owner:t},backupsUrl:n,backupsDirName:s,inNewWindow:i}=this.props;if(!n||!s)return null;const a=bm({link:n,inNewWindow:i,goToUri:e,accountUsername:null==t?void 0:t.login});return(0,L.jsx)("a",Object.assign({},a,{children:s}))}}render(){const{installation:{features:{fileManager:e},installationType:t}}=this.props;return e.available?QT(t)?this.renderPlesk():JT(t)?this.renderCpanel():null:null}}oC.propTypes={installation:Vt().shape({features:Vt().shape({fileManager:Vt().shape({available:Vt().bool.isRequired})}).isRequired,installationType:Vt().string.isRequired,owner:Vt().shape({login:Vt().string.isRequired})}).isRequired,backupsUrl:Vt().string.isRequired,backupsDirName:Vt().string.isRequired,goToUri:Vt().func.isRequired,inNewWindow:Vt().bool},oC.defaultProps={inNewWindow:!1};const lC=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(oC);class cC extends U.Component{constructor(e){super(e),this.getPleskBackupDownloadUrl=()=>{const{instance:{id:e},apiUrl:t,backup:{fileName:n}}=this.props,s=new URL(`${t}/download-instance-backups`,window.location.href),i=new URLSearchParams;return i.set("id",e),i.append("fileNames[]",n),s.search=i.toString(),s.toString()},this.getCpanelBackupDownloadUrl=()=>{const{installation:{id:e},apiUrl:t,backup:{fileName:n}}=this.props,s=new URL(t),i=new URLSearchParams;i.set("id",e),i.append("fileNames[]",n);const a=new URLSearchParams(s.search);return a.set("request",`/download-instance-backups?${i.toString()}`),s.search=a.toString(),s.toString()},this.getBackupDownloadUrl=()=>{const{installation:{installationType:e}}=this.props;return QT(e)?this.getPleskBackupDownloadUrl():JT(e)?this.getCpanelBackupDownloadUrl():null},this.handleToggleRestoreBackupConfirmationPopup=()=>this.setState((e=>({showRestoreBackupConfirmation:!e.showRestoreBackupConfirmation}))),this.handleToggleRemoveBackupConfirmationPopup=()=>this.setState((e=>({showRemoveBackupConfirmation:!e.showRemoveBackupConfirmation}))),this.renderPleskBackupsDownloadButton=()=>{const{disabled:e,backupsUrl:t}=this.props;return t?(0,L.jsx)(Ue,{icon:"arrow-down-tray",component:"a",href:t,disabled:e,tooltip:(0,L.jsx)(Ac,{content:"backupActions.tooltip.download"}),ghost:!0}):null},this.renderCpanelBackupsDownloadButton=()=>{const{disabled:e,goToUri:t,installation:{owner:n},backupsUrl:s}=this.props;if(!s)return null;const i=bm({link:s,inNewWindow:!1,goToUri:t,accountUsername:null==n?void 0:n.login});return(0,L.jsx)(Ue,Object.assign({icon:"arrow-down-tray",component:"a",href:s,disabled:e,tooltip:(0,L.jsx)(Ac,{content:"backupActions.tooltip.download"}),ghost:!0},i))},this.renderBackupsDownloadButton=()=>{const{installation:{features:{fileManager:e},installationType:t}}=this.props;return e.available?QT(t)?this.renderPleskBackupsDownloadButton():JT(t)?this.renderCpanelBackupsDownloadButton():null:null},this.state={showRestoreBackupConfirmation:!1}}renderRestoreBackupConfirmationPopup(){const{backup:{createDate:e},onCreateBackup:t,onRestoreBackup:n,disabled:s,baseClassName:i}=this.props,{showRestoreBackupConfirmation:a}=this.state;return(0,L.jsxs)(An,{visible:a,target:(0,L.jsx)(Ue,{"data-test-id":"instance-backups-drawer-restore-backup",icon:"reload",onClick:this.handleToggleRestoreBackupConfirmationPopup,disabled:s,tooltip:(0,L.jsx)(Ac,{content:"backupActions.tooltip.restore"}),ghost:!0}),onClose:this.handleToggleRestoreBackupConfirmationPopup,children:[(0,L.jsx)(kn,{level:4,children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{params:{createDate:e},content:"backupActions.restoreBackupConfirmationPopup.title"})})}),(0,L.jsx)(as,{className:`${i}__restore-backup-confirmation__desc`,children:(0,L.jsx)(Ac,{params:{link:(0,L.jsx)("a",{onClick:()=>{t(),this.handleToggleRestoreBackupConfirmationPopup()},children:(0,L.jsx)(Ac,{content:"backupActions.restoreBackupConfirmationPopup.createBackupLink"})})},content:"backupActions.restoreBackupConfirmationPopup.description"})}),(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{"data-test-id":"instance-backups-drawer-restore-backup-confirm",intent:"danger",size:"md",onClick:()=>{n(this.props.backup),this.handleToggleRestoreBackupConfirmationPopup()},children:(0,L.jsx)(Ac,{content:"backupActions.restoreBackupConfirmationPopup.buttonRestore"})}),(0,L.jsx)(Ue,{onClick:this.handleToggleRestoreBackupConfirmationPopup,size:"md",ghost:!0,className:`${i}__restore-backup-confirmation__button-cancel`,children:(0,L.jsx)(Ac,{content:"backupActions.restoreBackupConfirmationPopup.buttonCancel"})})]})]})}renderRemoveBackupConfirmationPopup(){const{backup:{fileName:e},onRemoveBackup:t,disabled:n,baseClassName:s}=this.props,{showRemoveBackupConfirmation:i}=this.state;return(0,L.jsxs)(An,{visible:i,target:(0,L.jsx)(Ue,{icon:MT("remove"),"data-test-id":Gh,onClick:this.handleToggleRemoveBackupConfirmationPopup,disabled:n,tooltip:(0,L.jsx)(Ac,{content:"backupActions.tooltip.delete"}),ghost:!0}),onClose:this.handleToggleRemoveBackupConfirmationPopup,children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"backupActions.removeBackupConfirmationPopup.text"})}),(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{"data-test-id":"instance-backups-drawer-remove-backup-confirm",intent:"danger",size:"md",onClick:()=>{t([e]),this.handleToggleRemoveBackupConfirmationPopup()},children:(0,L.jsx)(Ac,{content:"backupActions.removeBackupConfirmationPopup.buttonRemove"})}),(0,L.jsx)(Ue,{onClick:this.handleToggleRemoveBackupConfirmationPopup,size:"md",ghost:!0,className:`${s}__remove-backup-confirmation__button-cancel`,children:(0,L.jsx)(Ac,{content:"backupActions.removeBackupConfirmationPopup.buttonCancel"})})]})]})}render(){return(0,L.jsxs)(U.Fragment,{children:[this.renderRestoreBackupConfirmationPopup(),this.renderBackupsDownloadButton(),this.renderRemoveBackupConfirmationPopup()]})}}cC.propTypes={installation:Vt().shape({features:Vt().shape({fileManager:Vt().shape({available:Vt().bool.isRequired})}).isRequired,id:Vt().number.isRequired,installationType:Vt().string.isRequired,owner:Vt().shape({login:Vt().string.isRequired})}).isRequired,backup:Vt().shape({fileName:Vt().string.isRequired,createDate:Vt().string.isRequired}).isRequired,disabled:Vt().bool,onCreateBackup:Vt().func.isRequired,onRestoreBackup:Vt().func.isRequired,onRemoveBackup:Vt().func.isRequired,apiUrl:Vt().string.isRequired,goToUri:Vt().func.isRequired,baseClassName:Vt().string,backupsUrl:Vt().string.isRequired},cC.defaultProps={disabled:!1,baseClassName:`${gu}backup-actions`};const uC=(0,so.$j)((e=>({apiUrl:e.app.urls.apiUrl})),(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(cC),dC=e=>{const{columns:t,data:n,selection:s,onSelectionChange:i,onSortChange:a,sortColumn:r,sortDirection:o,className:l,rowProps:c,dataTestId:u}=e;return 0===n.length?(0,L.jsx)(as,{style:{"padding-top":"10px"},children:(0,L.jsx)(Wn,{intent:"muted",children:(0,L.jsx)(Ac,{content:"CardList.notFound"})})}):(0,L.jsx)(Wa,{columns:t,data:n,selection:s,onSelectionChange:i,onSortChange:a,sortColumn:r,sortDirection:o,className:l,rowProps:c,"data-test-id":u})},pC="running",hC=(e,t="danger")=>e.map((e=>(0,L.jsx)(Wn,{intent:t,children:e},e))),mC=(e,t,n="danger")=>{if(!e.errors||e.errors.length<1)return t;let s=!1;if(t=t.map((t=>(s||"error"!==t.status||(s=!0,t=Object.assign(Object.assign({},t),{children:hC(e.errors,n)})),t))),s)return t;let i=!1;if(t=t.map((t=>(i||"done"===t.status||(i=!0,t=Object.assign(Object.assign({},t),{children:hC(e.errors,n)})),t))),i)return t;const a=t.pop();return a?(t.push(Object.assign(Object.assign({},a),{children:hC(e.errors,n)})),t):t},fC=(e,t,n=[])=>null===e?null:(sw(e)&&n.push((0,L.jsx)(Ue,{intent:"secondary",onClick:t,children:(0,L.jsx)(Ac,{content:"forms.backToFormButton"})},"backToFormButton")),{title:e.title,steps:gC(e),autoCloseTimeout:3e3,cancellable:!1,buttons:tw(e)?n:[]}),gC=e=>{if(null===e)return[];let t=(n=e,Array.isArray(n.steps)?n.steps:Object.values(n.steps));var n;if(0===t.length&&t.push({title:e.title,status:e.status,progress:e.progress||-1}),t=(e=>e.map((e=>{let t={title:e.title,status:e.status,progress:e.progress};const n=t.status===pC;return n&&e.hint&&(t=Object.assign(Object.assign({},t),{children:(0,L.jsx)(Wn,{children:e.hint})})),n&&t.progress&&parseFloat(`${t.progress}`)>0&&(t=Object.assign(Object.assign({},t),{statusText:`${t.progress}%`})),t})))(t),(e=>e.length===e.filter((e=>"not_started"===e.status)).length)(t)){let e=t.shift();e=Object.assign(Object.assign({},e),{status:pC}),t.unshift(e)}return sw(e)?t=mC(e,t,"danger"):tw(e)&&(t=mC(e,t,"warning")),t},bC={backupCreationBackgroundTaskId:null,backupCreationBackgroundTask:null,showBackupCreationBackgroundTaskDetails:!1,isBackupCreationBackgroundTaskProcessing:!1},vC={backupRestoringBackgroundTaskId:null,backupRestoringBackgroundTask:null,showBackupRestoringBackgroundTaskDetails:!1,isBackupRestoringBackgroundTaskProcessing:!1};class yC extends U.Component{constructor(e){super(e),this.setListData=()=>{this.setState({listData:this.props.backups.map((e=>{return{key:e.fileName,createDate:(t=e.createDate,Xf().parseZone(t).format("YYYY-MM-DD HH:mm:ss")),fileSize:e.fileSize,fileName:e.fileName};var t}))})},this.getTotalSizeOfBackups=()=>{const{listData:e}=this.state,t=e.reduce(((e,t)=>e+Number(t.fileSize)),0);return this.formatBackupFileSize(t)},this.formatBackupFileSize=e=>`${Math.round(e/1048576)} MB`,this.isToolbarControlsDisabled=()=>this.state.isBackupCreationBackgroundTaskProcessing||this.state.isBackupRestoringBackgroundTaskProcessing,this.isBackupActionsDisabled=()=>this.state.isBackupCreationBackgroundTaskProcessing||this.state.isBackupRestoringBackgroundTaskProcessing,this.isBackupCreateActionDisabled=()=>this.props.limits.backupsLimitExceeded,this.handleUpdateBackupCreationBackgroundTaskOnFinish=()=>{const{backupCreationBackgroundTask:{steps:e,errors:t}}=this.state,n=Object.assign({},e);t&&0!==t.length?n.createBackup.title=(0,L.jsx)(Ac,{content:"backupList.backupCreationProgress.taskIsFailed"}):n.createBackup.title=(0,L.jsx)(Ac,{content:"backupList.backupCreationProgress.taskIsFinished"}),this.setState((e=>({backupCreationBackgroundTask:Object.assign(Object.assign({},e.backupCreationBackgroundTask),{steps:n})})))},this.handleOnReceiveBackupCreationBackgroundTaskData=()=>{const{backupCreationBackgroundTaskId:e,backupCreationBackgroundTask:t}=this.state,{installation:{id:n},tasks:s,backupActions:{instanceBackupCreationFinished:i,instanceBackupCreationFinishedWithError:a}}=this.props;if(!e)return;const r=iw(e,s);r&&t!==r&&this.setState({backupCreationBackgroundTask:r},(()=>{tw(r)&&(this.setState({isBackupCreationBackgroundTaskProcessing:!1}),this.handleUpdateBackupCreationBackgroundTaskOnFinish()),nw(r)?(this.setState({showBackupCreationBackgroundTaskDetails:!1}),i(n)):sw(r)&&a()}))},this.handleCreateBackup=()=>{const{isBackupCreationBackgroundTaskProcessing:e}=this.state,{backupActions:{createInstanceBackup:t},appActions:{addErrorMessage:n},installation:{id:s}}=this.props;e||(this.setState({isBackupCreationBackgroundTaskProcessing:!0}),t(s).then((e=>{if(!e)return;if(e.message)return void n(e.message);const{task:t}=e;t&&this.setState({showBackupCreationBackgroundTaskDetails:!0,backupCreationBackgroundTask:null,backupCreationBackgroundTaskId:t.id})})).catch((()=>{this.setState({isBackupCreationBackgroundTaskProcessing:!1})})))},this.handleUpdateBackupRestoringBackgroundTaskOnFinish=()=>{const{backupRestoringBackgroundTask:{steps:e,errors:t}}=this.state,n=Object.assign({},e);t&&0!==t.length?n.restoreBackup.title=(0,L.jsx)(Ac,{content:"backupList.backupRestoringProgress.taskIsFailed"}):n.restoreBackup.title=(0,L.jsx)(Ac,{content:"backupList.backupRestoringProgress.taskIsFinished"}),this.setState((e=>({backupRestoringBackgroundTask:Object.assign(Object.assign({},e.backupRestoringBackgroundTask),{steps:n})})))},this.handleOnReceiveBackupRestoringBackgroundTaskData=()=>{const{backupRestoringBackgroundTaskId:e,backupRestoringBackgroundTask:t}=this.state,{installation:{id:n},tasks:s,backupActions:{instanceBackupRestoringFinished:i,instanceBackupRestoringFinishedWithError:a}}=this.props;if(!e)return;const r=iw(e,s);r&&t!==r&&this.setState({backupRestoringBackgroundTask:r},(()=>{tw(r)&&(this.setState({isBackupRestoringBackgroundTaskProcessing:!1}),this.handleUpdateBackupRestoringBackgroundTaskOnFinish()),nw(r)?(this.setState({showBackupRestoringBackgroundTaskDetails:!1}),i(n).catch((()=>{}))):sw(r)&&a()}))},this.handleRestoreBackup=e=>{const{isBackupRestoringBackgroundTaskProcessing:t}=this.state,{backupActions:{restoreInstanceBackup:n},appActions:{addErrorMessage:s},installation:{id:i}}=this.props;t||(this.setState({isBackupRestoringBackgroundTaskProcessing:!0}),n(i,e.fileName).then((e=>{if(!e)return;if(e.message)return void s(e.message);const{task:t}=e;t&&this.setState({showBackupRestoringBackgroundTaskDetails:!0,backupRestoringBackgroundTask:null,backupRestoringBackgroundTaskId:t.id})})).catch((()=>{this.setState({isBackupRestoringBackgroundTaskProcessing:!1})})))},this.handleLoadInstanceBackupList=()=>{const{backupActions:{loadInstanceBackupsMetaData:e},installation:{id:t}}=this.props;this.setState({isBackupListLoading:!0}),e(t).then((({data:e})=>{this.setState({backupsDirName:e.meta.dirName,backupsUrl:e.meta.fileManagerUrl}),this.setListData()})).finally((()=>{this.setState({isBackupListLoading:!1})}))},this.handleSelectionChange=e=>this.setState({selection:e}),this.handleRemoveBackup=e=>{const{backupActions:{removeInstanceBackups:t},installation:{id:n}}=this.props;t(n,e).then((()=>{this.handleLoadInstanceBackupList()}))},this.handleToggleRemoveBackupConfirmationPopup=()=>this.setState((e=>({showRemoveBackupConfirmation:!e.showRemoveBackupConfirmation}))),this.getColumns=()=>[{key:"createDate",title:(0,L.jsx)(Ac,{content:"backupList.columns.createDate"}),width:"25%"},{key:"fileSize",title:(0,L.jsx)(Ac,{content:"backupList.columns.fileSize"}),width:"10%",render:e=>this.formatBackupFileSize(e.fileSize)},{key:"fileName",truncate:!0,title:(0,L.jsx)(Ac,{content:"backupList.columns.fileName"}),width:"50%",render:({fileName:e})=>(0,L.jsx)("span",{"data-test-id":"instance-backups-drawer-filename",children:e})},{key:"actions",width:"15%",align:"right",render:e=>(0,L.jsx)(uC,{backupsUrl:this.state.backupsUrl,installation:this.props.installation,backup:e,onCreateBackup:this.handleCreateBackup,onRestoreBackup:this.handleRestoreBackup,onRemoveBackup:this.handleRemoveBackup,disabled:this.isBackupActionsDisabled()})}],this.renderToolbar=()=>{const{showRemoveBackupConfirmation:e,selection:t}=this.state,{baseClassName:n}=this.props;return(0,L.jsxs)(Ss,{className:`${n}__toolbar`,children:[(0,L.jsx)(_s,{title:"Create Backup",children:(0,L.jsx)(Ue,{"data-test-id":"instance-backups-drawer-create-backup-button",intent:"primary",icon:MT("backup"),onClick:this.handleCreateBackup,disabled:this.isToolbarControlsDisabled()||this.isBackupCreateActionDisabled(),children:(0,L.jsx)(Ac,{content:"backupList.toolbar.buttonCreate"})})}),(0,L.jsx)(_s,{title:"Actions",children:(0,L.jsx)(An,{visible:e,target:(0,L.jsx)(Ue,{onClick:this.handleToggleRemoveBackupConfirmationPopup,disabled:this.isToolbarControlsDisabled(),className:`${n}__toolbar__button-remove`,"data-test-id":Gh,children:(0,L.jsx)(Ac,{content:"backupList.toolbar.buttonRemove"})}),onClose:this.handleToggleRemoveBackupConfirmationPopup,placement:"top",children:0===t.length?(0,L.jsx)(Pi,{intent:"info",children:(0,L.jsx)(Ac,{content:"backupList.removeBackupConfirmation.noBackupsToRemove"})}):(0,L.jsxs)("div",{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"backupList.removeBackupConfirmation.text"})}),(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{"data-test-id":"instance-backups-drawer-mass-remove-backup-confirm",intent:"danger",size:"md",onClick:()=>{this.handleRemoveBackup(t),this.handleToggleRemoveBackupConfirmationPopup()},children:(0,L.jsx)(Ac,{content:"backupList.removeBackupConfirmation.buttonRemove"})}),(0,L.jsx)(Ue,{onClick:this.handleToggleRemoveBackupConfirmationPopup,size:"md",ghost:!0,className:`${n}__remove-backup-confirmation__button-cancel`,children:(0,L.jsx)(Ac,{content:"backupList.removeBackupConfirmation.buttonCancel"})})]})]})})})]})},this.renderBackupList=()=>{const{listData:e,selection:t,isBackupListLoading:n}=this.state,{baseClassName:s}=this.props;return n?(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"backupList.backupListLoading"})}):0===e.length?(0,L.jsx)(Ac,{content:"backupList.noBackupsYet"}):(0,L.jsx)(dC,{columns:this.getColumns(),data:e,selection:t,onSelectionChange:this.handleSelectionChange,className:`${s}__list`,rowProps:e=>({"data-test-id":"instance-backups-drawer-item","data-test-filename":e.fileName})})},this.renderBackupInfo=()=>{const{installation:{features:{backups:e,fileManager:t},title:n},limits:{backupsLimit:s,backupsCount:i},baseClassName:a}=this.props,{backupsUrl:r,backupsDirName:o}=this.state;return(0,L.jsxs)("div",{children:[this.isBackupCreateActionDisabled()&&(0,L.jsx)(Rr,{intent:"warning",children:(0,L.jsx)(Ac,{params:{count:i,limit:s},content:"common.siteBackupsLimitExceeded"})}),e.panelBackupsAvailable&&(0,L.jsxs)(is,{image:(0,L.jsx)(he,{name:MT("circle-info")}),children:[(0,L.jsx)(Ac,{params:{siteName:n},content:"backupList.description"})," ",e.backupManagerUrl&&(0,L.jsx)(Ac,{params:{link:(0,L.jsx)(rC,{installation:this.props.installation})},content:"backupList.descriptionPanelBackups"})]}),(0,L.jsxs)(vi,{className:`${a}__section`,children:[t.available&&r&&o&&(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"backupList.sectionItems.backupLocation.title"}),children:(0,L.jsx)(Ac,{content:"backupList.sectionItems.backupLocation.content",params:{link:(0,L.jsx)(lC,{backupsUrl:this.state.backupsUrl,backupsDirName:this.state.backupsDirName,installation:this.props.installation})}})}),(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"backupList.sectionItems.totalSizeOfBackups"}),children:this.getTotalSizeOfBackups()})]})]})},this.state=Object.assign(Object.assign({backupsDirName:"",backupsUrl:"",listData:[],selection:[],showRemoveBackupConfirmation:!1,isBackupListLoading:!1},bC),vC)}componentDidMount(){this.props.isOpen&&this.handleLoadInstanceBackupList()}componentDidUpdate(e){!e.isOpen&&this.props.isOpen&&this.handleLoadInstanceBackupList(),e.isOpen&&!this.props.isOpen&&this.props.backupActions.resetInstanceBackupList(),e.tasks!==this.props.tasks&&(this.handleOnReceiveBackupCreationBackgroundTaskData(),this.handleOnReceiveBackupRestoringBackgroundTaskData()),e.backups!==this.props.backups&&this.setListData()}render(){const{installation:{title:e},onClose:t,isOpen:n}=this.props,{backupCreationBackgroundTask:s,showBackupCreationBackgroundTaskDetails:i,backupRestoringBackgroundTask:a,showBackupRestoringBackgroundTaskDetails:r}=this.state;let o=null;return i&&s?o=s:r&&a&&(o=a),(0,L.jsx)(zi,{title:(0,L.jsx)(Ac,{content:"backupList.drawerTitle"}),subtitle:e,progress:fC(o,(()=>{this.setState({backupCreationBackgroundTask:null,backupRestoringBackgroundTask:null})})),hideButton:!1,"data-test-id":"instance-backups-drawer","data-type":"instance-backup",onClose:t,size:"lg",isOpen:n,children:(0,L.jsxs)("div",{children:[this.renderBackupInfo(),this.renderToolbar(),this.renderBackupList()]})})}}yC.propTypes={installation:Vt().shape({features:Vt().shape({backups:Vt().shape({backupManagerUrl:Vt().string,panelBackupsAvailable:Vt().bool.isRequired}),fileManager:Vt().shape({available:Vt().bool.isRequired})}).isRequired,id:Vt().number.isRequired,title:Vt().string.isRequired}).isRequired,onClose:Vt().func.isRequired,backupActions:Vt().shape({loadInstanceBackupsMetaData:Vt().func.isRequired,resetInstanceBackupList:Vt().func.isRequired,createInstanceBackup:Vt().func.isRequired,instanceBackupCreationFinished:Vt().func.isRequired,instanceBackupCreationFinishedWithError:Vt().func.isRequired,restoreInstanceBackup:Vt().func.isRequired,instanceBackupRestoringFinished:Vt().func.isRequired,instanceBackupRestoringFinishedWithError:Vt().func.isRequired,removeInstanceBackups:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addErrorMessage:Vt().func.isRequired}).isRequired,tasks:Vt().array,backups:Vt().arrayOf(Vt().shape({createDate:Vt().string.isRequired,fileSize:Vt().number.isRequired,fileName:Vt().string.isRequired})).isRequired,limits:Vt().shape({backupsLimit:Vt().number,backupsCount:Vt().number.isRequired,backupsLimitExceeded:Vt().bool.isRequired}).isRequired,baseClassName:Vt().string,isOpen:Vt().bool.isRequired},yC.defaultProps={tasks:[],baseClassName:`${gu}backup-list`};const _C=(0,so.$j)((e=>({tasks:e.backgroundTasks.tasks,backups:e.backup.list,limits:e.backup.limits})),(t=>({backupActions:nh(l,t),appActions:nh(e,t)})))(yC);class xC extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{installation:{features:{backups:{backupManagerUrl:e}}}}=this.props;return e?(0,L.jsx)("a",{href:e,target:"_blank",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.backupLink"})}):null},this.renderCpanel=()=>{const{installation:{features:{backups:{backupManagerUrl:e}},owner:{login:t}},goToUri:n}=this.props;if(!e)return null;const s=bm({link:e,inNewWindow:!0,goToUri:n,accountUsername:t});return(0,L.jsx)("a",Object.assign({},s,{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.backupLink"})}))}}render(){const{installation:{features:{backups:{panelBackupsAvailable:e,backupManagerUrl:t}},installationType:n}}=this.props;return e&&t?QT(n)?this.renderPlesk():JT(n)?this.renderCpanel():null:null}}const SC=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(xC);class wC extends U.Component{constructor(e){super(e),this.handleDataLoaded=()=>{const{securityMeasuresInstallationStatus:e,fetchBackgroundTasks:t}=this.props;if(!e)return;const{checkSecurityTaskId:n,resolveSecurityTaskId:s,revertSecurityTaskId:i}=e;this.setState({securityCheckBackgroundTaskId:n,isCheckingSecurity:!!n,resolveCheckerBackgroundTaskId:s,isSecuring:!!s,revertCheckerBackgroundTaskId:i,isReverting:!!i}),this.setListData(),this.setDefaultSelection();let a=!1;if(n||s||i){const e=[];n&&e.push(n),s&&e.push(s),i&&e.push(i),t(Td.getTasksData,e.map((e=>({id:e,code:_S})))).then((e=>{0!==e.length?(a=!0,n&&this.handleOnReceiveSecurityCheckBackgroundTask(e),s&&this.handleOnReceiveResolveCheckerBackgroundTask(e),i&&this.handleOnReceiveRollbackCheckerBackgroundTask(e)):this.setState({isCheckingSecurity:!1,isSecuring:!1,isReverting:!1})}))}n||a||!this.isLastSecurityCheckTimestampInvalid()||this.handleCheckSecurity()},this.loadSecurityMeasuresInstallationStatus=()=>{const{reloadSecurityMeasuresPerInstallations:e,installation:{id:t}}=this.props;return e([t]).then((()=>{this.handleDataLoaded()})).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))},this.reloadInstallationSecurityMeasures=()=>{const{reloadSecurityMeasuresPerInstallations:e,installation:{id:t}}=this.props;return e([t])},this.handleOnReceiveSecurityCheckBackgroundTask=e=>{const{securityCheckBackgroundTaskId:t}=this.state;if(!t)return;const n=iw(t,e);n&&(tw(n)&&this.setState({selection:[],isCheckingSecurity:!1,securityCheckBackgroundTaskId:void 0},(()=>{this.reloadInstallationSecurityMeasures().finally(this.setDefaultSelection)})),nw(n)&&n.errors.length&&this.props.addErrorMessage(n.errors.join("\n")))},this.handleOnReceiveRollbackCheckerBackgroundTask=e=>{const{revertCheckerBackgroundTaskId:t}=this.state,{addSuccessMessage:n}=this.props;if(!t)return;const s=iw(t,e);s&&(tw(s)&&this.setState({selection:[],isReverting:!1,revertCheckerBackgroundTaskId:void 0},this.reloadInstallationSecurityMeasures),nw(s)&&(s.errors.length?this.props.addErrorMessage(s.errors.join("\n")):n("list-ui.instances.forms.security.revertSuccess",!0,"instanceSecurity")))},this.handleOnReceiveResolveCheckerBackgroundTask=e=>{const{resolveCheckerBackgroundTaskId:t}=this.state,{addSuccessMessage:n}=this.props;if(!t)return;const s=iw(t,e);s&&(tw(s)&&this.setState({selection:[],isSecuring:!1,resolveCheckerBackgroundTaskId:void 0},this.reloadInstallationSecurityMeasures),nw(s)&&(s.errors.length?this.props.addErrorMessage(s.errors.join("\n")):n("list-ui.instances.forms.security.resolveSuccess",!0,"instanceSecurity")))},this.setListData=()=>{const{isSecuring:e,isReverting:t}=this.state,{securityMeasures:n,securityMeasuresInstallationStatus:s}=this.props;if(!s)return;const i=new DS(n),a=[];n.forEach((n=>{i.isSecurityMeasureAvailable(n.id,s.securityMeasures)&&a.push(Object.assign(Object.assign({},n),{status:i.isSecurityMeasureResolvedForInstallation(n.id,s),key:n.id,disabled:e||t}))})),this.setState({listData:a})},this.setDefaultSelection=()=>{const{securityMeasures:e,securityMeasuresInstallationStatus:t}=this.props;if(!t)return;const n=new DS(e);this.setState({selection:n.getUnresolvedCriticalSecurityMeasures(t).map((e=>e.id))})},this.clearSelection=()=>{this.setState({selection:[]})},this.handleRevert=()=>{const{installation:e,revertSecurityCheckers:t,clearMessages:n}=this.props,{selection:s}=this.state;n(),this.setState({isReverting:!0}),t([e.id],s).then((e=>{this.setState({revertCheckerBackgroundTaskId:e.id})})).catch((()=>{this.setState({isReverting:!1})}))},this.handleSecure=()=>{const{installation:e,resolveSecurityCheckers:t,clearMessages:n}=this.props,{selection:s}=this.state;n(),this.setState({isSecuring:!0}),t([e.id],s).then((e=>{this.setState({resolveCheckerBackgroundTaskId:e.id})})).catch((()=>{this.setState({isSecuring:!1})}))},this.handleCheckSecurity=()=>{const{installation:e,checkSecurity:t,clearMessages:n}=this.props;n(),this.setState({isCheckingSecurity:!0}),t([e.id]).then((e=>{this.setState({securityCheckBackgroundTaskId:e.id})})).catch((()=>{this.setState({isCheckingSecurity:!1})}))},this.handleToggleBackupDrawer=()=>this.setState((e=>({showBackupDrawer:!e.showBackupDrawer}))),this.getAvailableInstallationSecurityMeasures=()=>{const{securityMeasuresInstallationStatus:e}=this.props;return e?e.securityMeasures.filter((e=>e.available)):[]},this.getListColumns=()=>[{key:"title",title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.securityMeasuresList.columns.title"}),render:e=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("span",{children:e.title}),e.description&&e.description.length>0&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-instance-security_security-form_item-info wpt-mgl-5"}),placement:"top-right",children:e.description}),e.rollbackAvailable&&(0,L.jsxs)(Wn,{className:"wpt-mgl-5",children:["(",(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.hasRollback"}),")"]})]})},{key:"status",title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.securityMeasuresList.columns.status"}),sortable:!0,sort:(e,t)=>{const n=this.getListStatusColumnWeight(e),s=this.getListStatusColumnWeight(t);return n>s?1:n<s?-1:e.id>t.id?1:-1},render:this.getStatusColumn}],this.getListStatusColumnWeight=e=>{let t=e.status?0:1;return 1===t&&e.critical&&(t=2),t},this.getStatusColumn=e=>e.status?(0,L.jsx)(An,{target:(0,L.jsx)(Pi,{icon:"circle-check-mark",intent:"success"}),placement:"top-left",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.alreadyResolved"})}):e.critical?(0,L.jsx)(An,{target:(0,L.jsx)(Pi,{icon:"circle-exclamation-mark",intent:"danger"}),placement:"top-left",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.requiredToResolve"})}):(0,L.jsx)(An,{target:(0,L.jsx)(Pi,{icon:"triangle-exclamation-mark",intent:"warning"}),placement:"top-left",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.recommendedToResolve"})}),this.state={securityCheckBackgroundTaskId:void 0,resolveCheckerBackgroundTaskId:void 0,revertCheckerBackgroundTaskId:void 0,listData:[],selection:[],isCheckingSecurity:!1,isSecuring:!1,isReverting:!1,isLoading:!0,showBackupDrawer:!1}}componentDidMount(){this.loadSecurityMeasuresInstallationStatus()}componentDidUpdate(e){e.securityMeasuresInstallationStatus!==this.props.securityMeasuresInstallationStatus&&this.setListData(),e.tasks!==this.props.tasks&&(this.handleOnReceiveSecurityCheckBackgroundTask(this.props.tasks),this.handleOnReceiveResolveCheckerBackgroundTask(this.props.tasks),this.handleOnReceiveRollbackCheckerBackgroundTask(this.props.tasks))}isLastSecurityCheckTimestampInvalid(){const{securityMeasuresInstallationStatus:e}=this.props;if(!e)return!0;const t=1e3*e.lastSecurityCheckTimestamp;return"unknown"===e.securityStatus||(new Date).getTime()-t>36e5||0===this.getAvailableInstallationSecurityMeasures().length}renderToolbar(){const{isUnpaid:e,securityMeasures:t,securityMeasuresInstallationStatus:n}=this.props;if(!n)return null;const{isSecuring:s,isReverting:i,isCheckingSecurity:a,selection:r}=this.state,o=n&&!n.resolveAndRevertAvailable,l=new DS(t),c=l.getUnresolvedSecurityMeasureAvailableForResolve(n.securityMeasures).some((e=>r.includes(e.id))),u=l.getResolvedSecurityMeasureAvailableForRevert(n.securityMeasures).some((e=>r.includes(e.id))),d=e||o||a||i||s||0===r.length||!c,p=s||i,h=e||o||a||s||i||0===r.length||!u;return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(Ss,{className:"wpt-mgt-10 wpt-mgb-10",children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{intent:"primary",state:s?"loading":void 0,disabled:d,onClick:this.handleSecure,"data-test-id":"security-check-submit",tooltip:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.hintButtonSecure"}),children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.buttonSecure"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{icon:"refresh",state:a?"loading":void 0,disabled:p,onClick:this.handleCheckSecurity,tooltip:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.hintButtonCheckSecurity"}),children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.buttonCheckSecurity"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{state:i?"loading":void 0,disabled:h,"data-test-id":"security-revert-submit",onClick:this.handleRevert,tooltip:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.hintButtonRevert"}),children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.buttonRevert"})})})]})})}renderLastSecurityCheckDatePanel(){const{securityMeasuresInstallationStatus:e}=this.props,{isCheckingSecurity:t}=this.state;if(t)return null;if(!e||!e.lastSecurityCheckTimestamp)return(0,L.jsx)(Ar,{children:(0,L.jsx)(Wn,{className:"wpt-instances-security_last-security-check-date",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.lastSecurityCheckDateIsUnknown"})})});const n=new Date(1e3*e.lastSecurityCheckTimestamp).toLocaleString();return(0,L.jsx)(Ar,{children:(0,L.jsx)(Wn,{className:"wpt-instances-security_last-security-check-date",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.lastSecurityCheckDate",params:{lastSecurityCheckDate:n}})})})}renderSecurityMeasuresList(){const{listData:e,selection:t,isCheckingSecurity:n,isSecuring:s,isReverting:i}=this.state,a=s||i;return n?(0,L.jsxs)("div",{className:"wpt-mgt-15",children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.checkingForSecurity"})]}):0===e.length?(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.noSecurityMeasures"}):(0,L.jsx)(Wa,{"data-test-id":"security-settings-list",className:a?"hided-mass-checkbox wpt-mgt-15":"wpt-mgt-15",columns:this.getListColumns(),data:e,selection:t,onSelectionChange:e=>this.setState({selection:e}),sortColumn:"status",sortDirection:"DESC"})}renderPaidFeatureDesc(){const{isUnpaid:e,upgradeUrl:t,installation:{id:n},premiumFeaturesUrl:s,securityMeasuresInstallationStatus:i}=this.props,a=i&&!i.resolveAndRevertAvailable;return e||a?(0,L.jsx)(pm,{uatAction:Tm,purchaseLicenseUrl:t,premiumFeaturesUrl:s,installationId:n,children:(0,L.jsx)(Ac,{content:"paidFeature.secureFeatureDescription"})}):null}renderBackupLink(){const{installation:{features:{backups:e}}}=this.props;return e.wptBackupsAvailable?(0,L.jsx)("a",{onClick:this.handleToggleBackupDrawer,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.backupLink"})}):e.panelBackupsAvailable?(0,L.jsx)(SC,{installation:this.props.installation}):(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.backupLink"})}render(){const{isCheckingSecurity:e,showBackupDrawer:t,isLoading:n}=this.state;return n?(0,L.jsx)(It,{}):(0,L.jsxs)(L.Fragment,{children:[this.renderPaidFeatureDesc(),(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.headDescription"}),this.renderToolbar(),this.renderLastSecurityCheckDatePanel(),!e&&(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.securityMeasuresListDescription",params:{link:this.renderBackupLink()}}),this.renderSecurityMeasuresList(),(0,L.jsx)(_C,{installation:this.props.installation,onClose:this.handleToggleBackupDrawer,isOpen:t})]})}}const kC=(0,so.$j)(((e,t)=>{const n=e.securityMeasures.securityMeasuresInstallationStatuses.find((e=>+e.id==+t.installation.id));return{securityMeasures:e.securityMeasures.securityMeasures,tasks:e.backgroundTasks.tasks,isUnpaid:!!e.app.unpaidFeatures.secure,upgradeUrl:e.app.urls.featuresBuyLinks.secure,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,securityMeasuresInstallationStatus:n}}),(e=>({checkSecurity:nh(Tg,e),resolveSecurityCheckers:nh(Cg,e),revertSecurityCheckers:nh(Dg,e),fetchBackgroundTasks:nh(ow,e),reloadSecurityMeasuresPerInstallations:nh(jg,e)})))(wC),jC=(0,so.$j)(((e,t)=>{const{installation:n}=t;return{hasActiveTasks:e.vulnerabilities.virtualPatchesUpdatingStatuses.some((e=>e.installationIds.includes(n.id))),showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans,isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller}}),(e=>({updateVirtualPatchesProtectionStatus:nh(Wg,e),displayErrorMessageFromMeta:nh(_p,e)})))((function({installation:e,hasActiveTasks:t,updateVirtualPatchesProtectionStatus:n,displayErrorMessageFromMeta:s,onOpenUpsellDialog:i,showVirtualPatchesUpsellWhenRestrictedViaPlans:a,isAdmin:r,baseClassName:o=`${gu}virtual-patches-banner`}){const[l,c]=U.useState(!1),u=vT(e,a,r);return(0,L.jsxs)(Rr,{intent:"info","data-test-id":"instance-security-vulnerabilities-virtual-patches-disabled-banner",children:[(0,L.jsx)(Wn,{bold:!0,component:"div",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.statusMessage.title"})}),(0,L.jsx)(Wn,{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.statusMessage.message",params:{providerLogo:(0,L.jsx)(uT,{})}})}),(0,L.jsx)("br",{}),(0,L.jsx)(Ue,{icon:u?"shield":"lock-closed",className:`${o}__top-margin10`,intent:"primary",onClick:u?()=>{c(!0),n({installationsIds:[e.id],status:!0,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0}).catch((e=>{var t;422===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&s(e)})).finally((()=>c(!1)))}:()=>i(Tm),state:l||t?"loading":void 0,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.statusMessage.patchBtn"})})]})})),TC=function(){return(0,L.jsx)(ye,{icon:"shield",intent:"success",view:"light",size:"lg","data-test-id":"instance-security-vulnerabilities-virtual-patches-enabled-banner",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.popover.enabled.title",params:{providerLogo:(0,L.jsx)(uT,{})}})})},CC=[{key:"noPatch",title:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.noPatch.title",description:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.noPatch.description"},{key:"unlikelyExploited",title:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.unlikelyExploited.title",description:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.unlikelyExploited.description"},{key:"dbMatch",title:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.dbMatch.title",description:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.dbMatch.description"}],DC=({target:e,baseClassName:t=`${gu}protect-info-popover`})=>(0,L.jsxs)(An,{target:e,placement:"bottom-right",width:"xs",children:[(0,L.jsx)(qi,{intent:"success",className:`${t}__message`,children:(0,L.jsxs)("div",{className:`${t}__messageBody`,children:[(0,L.jsx)(he,{name:"shield",size:"48",intent:"success",className:`${t}__messageIcon`}),(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.message"})]})}),CC.map((e=>(0,L.jsxs)("div",{className:`${t}__section`,children:[(0,L.jsx)(kn,{level:5,children:(0,L.jsx)(Ac,{content:e.title})}),(0,L.jsx)(Wn,{fontSize:"sm",children:(0,L.jsx)(Ac,{content:e.description})})]},e.key))),(0,L.jsx)("div",{children:(0,L.jsx)(pT,{})})]}),PC=function({status:e,installation:t,onOpenVirtualPatchingUpsellDialog:n,baseClassName:s=`${gu}virtual-patches`}){return e?(0,L.jsxs)("div",{className:`${s}__protected-container`,children:[(0,L.jsx)(TC,{}),(0,L.jsx)(DC,{target:(0,L.jsx)(ye,{intent:"inactive",icon:"question-mark-circle-filled",size:"lg",view:"outline",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.protectInfoPopover.title"})})})]}):(0,L.jsx)(jC,{installation:t,onOpenUpsellDialog:n})},IC=({contentLines:e=6,baseClassName:t=`${gu}security-drawer-widget`})=>(0,L.jsx)(Da,{className:mm()(t,`${t}-loading`),view:"card",title:(0,L.jsxs)("div",{className:`${t}__header`,children:[(0,L.jsx)(kn,{level:4,children:(0,L.jsx)(to,{width:"90%"})}),(0,L.jsx)(to,{width:24,height:24})]}),children:(0,L.jsx)(no,{lines:e})});const OC=e=>{var{title:t,titleIconProps:n,description:s,children:i,footer:a,itemCssClasses:r=[],baseClassName:o=`${gu}security-drawer-widget`}=e,l=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["title","titleIconProps","description","children","footer","itemCssClasses","baseClassName"]);return(0,L.jsx)(Da,Object.assign({className:mm()(o,r),title:(0,L.jsxs)("div",{className:`${o}__header`,children:[(0,L.jsx)(kn,{level:4,children:t}),(0,L.jsx)(he,Object.assign({size:"24"},n))]}),view:"card",description:s,footer:a},l,{children:(0,L.jsx)("div",{className:`${o}__body`,children:i})}))},LC=({items:e})=>{var t;return e.size>1?(0,L.jsx)("ul",{children:[...e.entries()].map((([e,t])=>t&&(0,L.jsx)("li",{children:t},e)))}):null!==(t=[...e.values()].shift())&&void 0!==t?t:null},MC=({installation:e,vulnerabilitiesList:{frankyVulnerabilities:t,relatedInstallationsIds:n,isLoading:s},baseClassName:i=`${gu}widget-active-vulnerabilities`})=>{var a,r,o;const l=Mc();if(s)return(0,L.jsxs)("div",{className:`${i}__wrapper`,children:[(0,L.jsx)(IC,{contentLines:6}),(0,L.jsx)(he,{name:"chevron-right",size:"32"})]});if(!n.length)return null;const c=null!==(o=null===(r=null===(a=null==e?void 0:e.features)||void 0===a?void 0:a.vulnerabilityFiltering)||void 0===r?void 0:r.status)&&void 0!==o&&o;let u=0,d=0,p=0,h=0,m=0,f=0;const g=new Map;t.forEach((e=>{if(!e.installations.length)return;e.installations.forEach((e=>{g.set(e.id,!0)}));let t=0;e.installations.forEach((e=>{e.virtualPatchApplied?m++:e.securityMeasuresApplied.length||!1===e.assetIsActive?f++:t++})),0!==t&&(c&&e.riskRank===rp.Low?h+=e.installations.length:(u+=t,e.riskRank===rp.Critical&&(d+=t),e.riskRank!==rp.Critical&&e.riskRank!==rp.High||(p+=t)))}));const b=new Map;return m>0&&b.set("addressedByProtection",(0,L.jsx)(as,{children:l("drawer.security.widget.activeVulnerabilities.content.vulnerabilitiesAddressedByProtection",{vulnerabilitiesCount:m})})),f>0&&b.set("addressedByOtherMeans",(0,L.jsx)(as,{children:l("drawer.security.widget.activeVulnerabilities.content.vulnerabilitiesAddressedByOtherMeans",{vulnerabilitiesCount:f})})),h>0&&b.set("ignored",(0,L.jsx)(as,{children:l("drawer.security.widget.activeVulnerabilities.content.vulnerabilitiesIgnored",{vulnerabilitiesCount:h})})),(0,L.jsxs)("div",{className:`${i}__wrapper`,children:[(0,L.jsx)(OC,{title:l("drawer.security.widget.activeVulnerabilities.title",{vulnerabilitiesActive:u}),titleIconProps:u>0?{name:"exclamation-mark-circle-filled",intent:"danger"}:{name:"check-mark-circle-filled",intent:"success"},itemCssClasses:{[`${i}-danger`]:p>0,[`${i}-warning`]:p<1&&u>0,[`${i}-success`]:u<1},description:u<1||m>0||f>0?null:(0,L.jsx)(Ac,{content:"drawer.security.widget.activeVulnerabilities.description"}),footer:(()=>{if(u<1)return e?(0,L.jsx)(Ac,{content:"drawer.security.widget.activeVulnerabilities.footer.allGood.single","data-test-id":am}):(0,L.jsx)(Ac,{content:"drawer.security.widget.activeVulnerabilities.footer.allGood.multiple","data-test-id":am});const t=[];return d>0&&t.push((0,L.jsxs)("span",{className:`${i}__footer_item`,children:[(0,L.jsx)(he,{name:"flag",intent:"danger"})," ",l("drawer.security.widget.activeVulnerabilities.footer.criticalVulnerabilitiesCounter",{vulnerabilitiesCount:d})]},"critical-counter")),!e&&g.size>0&&t.push((0,L.jsxs)("span",{className:`${i}__footer_item`,children:[(0,L.jsx)(he,{name:"globe"})," ",l("drawer.security.widget.activeVulnerabilities.footer.sitesCounter",{sitesCount:g.size})]},"sites-counter")),t.length?(0,L.jsx)("div",{children:t}):null})(),children:(0,L.jsx)(LC,{items:b})}),(0,L.jsx)(he,{name:"chevron-right",size:"32"})]})},AC=e=>{const t={vulnerabilities:[],vulnerabilitiesIds:new Set,idsOfInstallationsWithUpdatableComponents:new Set};return t.vulnerabilities=e.filter((e=>{const n=e.mitigations.some((e=>e.type===op.Update));return n&&(t.vulnerabilitiesIds.add(e.id),e.installations.forEach((e=>{t.idsOfInstallationsWithUpdatableComponents.add(e.id)}))),n})),t},EC=(e,t,n)=>(0,L.jsx)(OC,{title:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.title"}),titleIconProps:{name:"arrow-up-circle"},footer:e(),"data-test-id":"updates-widget",children:t>0?(0,L.jsx)(as,{children:n("drawer.security.widget.updates.content.vulnerabilitiesCanBeEliminatedCounter",{vulnerabilitiesCount:t})}):(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.content.noUpdates"})})}),UC=(e,t,n=!0)=>(0,L.jsx)(iT,{state:e?"loading":void 0,onClick:t,icon:e?null:"refresh",tooltip:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.button.recheck"}),"data-test-id":"recheck",children:n&&(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.button.recheck"})}),RC=e=>e.reduce(((e,t)=>e+t.installations.length),0),NC=({isLoading:e,buttonIcon:t=null,buttonContent:n=null,buttonTooltip:s=null,buttonDataTestId:i,onPopoverShow:a=(()=>Promise.resolve()),popoverTitle:r=null,popoverContent:o,popoverClassName:l="",confirmationButtonIntent:c,confirmationButtonContent:u,onConfirm:d})=>{const[p,h]=(0,U.useState)(!1);return(0,L.jsxs)(An,{title:r,visible:p,onClose:()=>{h(!1)},className:l,target:(0,L.jsx)(iT,Object.assign({state:e?"loading":void 0,icon:e?null:t,tooltip:s,onClick:()=>{a().then((()=>{h(!0)})).catch((()=>{}))}},i?{"data-test-id":i}:{},{children:n})),"data-test-id":"popover-with-confirmation",children:[o,(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{intent:c,onClick:()=>{h(!1),d()},"data-test-id":"submit",children:u})," ",(0,L.jsx)(Ue,{onClick:()=>{h(!1)},ghost:!0,"data-test-id":"cancel",children:(0,L.jsx)(Ac,{content:"drawer.security.widget.popover.button.cancel"})})]})]})},FC="true",YC="false",BC="disabledWithUpdates",HC="true",VC="false",$C="disabledWithUpdates";class WC extends U.Component{constructor(e){super(e),this.handleLoadData=()=>{const{installationId:e,getAutoUpdateSettings:t}=this.props;this.setState({isLoading:!0}),t(e).then((e=>{const{plugins:{forceUpdates:t,updateVulnerable:n,deactivateVulnerable:s},themes:{forceUpdates:i,updateVulnerable:a}}=e;this.setState(Object.assign(Object.assign({},e),{plugins:Object.assign(Object.assign({},e.plugins),{forceUpdates:t||!n&&!s?t.toString():BC}),themes:Object.assign(Object.assign({},e.themes),{forceUpdates:!i&&a?$C:i.toString()})}))})).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))},this.handleSubmit=({core:e,plugins:t,themes:n})=>{if(this.state.isProcessing)return;const{installationId:s,updateAutoUpdateSettings:i,onClose:a,addSuccessMessage:r,onClearDrawerMessages:o}=this.props;o(),this.setState({isProcessing:!0});const l={core:e,plugins:Object.assign(Object.assign({},t),{updateVulnerable:!1}),themes:Object.assign(Object.assign({},n),{updateVulnerable:!1})};t.forceUpdates===BC&&(l.plugins.forceUpdates=YC,l.plugins.updateVulnerable=!0),n.forceUpdates===$C&&(l.themes.forceUpdates=VC,l.themes.updateVulnerable=!0),t.forceUpdates===YC&&(l.plugins.deactivateVulnerable=!1),l.plugins.forceUpdates=l.plugins.forceUpdates===FC,l.themes.forceUpdates=l.themes.forceUpdates===HC,i(s,l).then((()=>{r("autoUpdatesSettings.autoUpdatesSettingsUpdatedSuccessfully",!0,"autoUpdatesSettingsUpdatedSuccessfully"),a()})).catch((()=>{})).finally((()=>{this.setState({isProcessing:!1})}))},this.getFormParams=()=>{const{core:e,plugins:t,themes:n,isProcessing:s,isLoading:i}=this.state;return i?null:{onSubmit:this.handleSubmit,requiredMark:!1,values:{core:e,plugins:t,themes:n},state:s?"submit":void 0,applyButton:!1,cancelButton:!1,submitButton:{"data-test-id":Rh}}},this.renderPluginsFormFields=()=>{const{plugins:{forceUpdates:e,newlyInstalledUpdates:t,deactivateVulnerable:n}}=this.state,{vulnerabilityFeatureEnabled:s}=this.props;return(0,L.jsx)(oa,{name:"plugins[forceUpdates]",label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdatesLabel"}),value:e,options:[{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledOptionLabel"}),value:YC,description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.newlyInstalledPluginsAutoUpdates"}),name:"plugins[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates")]},s?{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledWithSecureUpdatesOptionLabel"}),value:BC,description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledWithSecureUpdatesOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.newlyInstalledPluginsAutoUpdates"}),name:"plugins[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates"),(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.deactivateVulnerablePlugins"}),name:"plugins[deactivateVulnerable]",value:n,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{deactivateVulnerable:e})})))},"deactivateVulnerable")]}:null,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.enabledOptionLabel"}),value:FC,description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.enabledOptionDescription"}),indentFields:s?[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.pluginsAutoUpdates.deactivateVulnerablePlugins"}),name:"plugins[deactivateVulnerable]",value:n,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{deactivateVulnerable:e})})))},"deactivateVulnerable")]:[]}].filter((e=>e)),onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{forceUpdates:e})})))})},this.renderThemesFormFields=()=>{const{themes:{forceUpdates:e,newlyInstalledUpdates:t}}=this.state,{vulnerabilityFeatureEnabled:n}=this.props;return(0,L.jsx)(oa,{name:"themes[forceUpdates]",label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdatesLabel"}),value:e,options:[{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.disabledOptionLabel"}),value:VC,description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.disabledOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.newlyInstalledThemesAutoUpdates"}),name:"themes[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({themes:Object.assign(Object.assign({},t.themes),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates")]},n?{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.disabledWithSecureUpdatesOptionLabel"}),value:$C,description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.disabledWithSecureUpdatesOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.newlyInstalledThemesAutoUpdates"}),name:"themes[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({themes:Object.assign(Object.assign({},t.themes),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates")]}:null,{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.enabledOptionLabel"}),value:HC,description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.themesAutoUpdates.enabledOptionDescription"})}].filter((e=>e)),onChange:e=>this.setState((t=>({themes:Object.assign(Object.assign({},t.themes),{forceUpdates:e})})))})},this.renderCoreFormFields=()=>(0,L.jsx)(oa,{name:"core",label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.coreAutoUpdatesLabel"}),value:this.state.core,options:[{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.coreAutoUpdates.disabledOptionLabel"}),value:"disabled",description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.coreAutoUpdates.disabledOptionDescription"})},{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.coreAutoUpdates.minorOptionLabel"}),value:"minor",description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.coreAutoUpdates.minorOptionDescription"})},{label:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.coreAutoUpdates.majorOptionLabel"}),value:"major",description:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.coreAutoUpdates.majorOptionDescription"})}],onChange:e=>this.setState({core:e})}),this.renderFormFields=()=>{const{isLoading:e}=this.state;return e?(0,L.jsx)(It,{}):(0,L.jsxs)(U.Fragment,{children:[this.renderCoreFormFields(),this.renderPluginsFormFields(),this.renderThemesFormFields()]})},this.state={core:"",plugins:{forceUpdates:"",newlyInstalledUpdates:!1,updateVulnerable:!1,deactivateVulnerable:!1},themes:{forceUpdates:"",newlyInstalledUpdates:!1,updateVulnerable:!1},isProcessing:!1,isLoading:!1}}componentDidMount(){this.props.isOpen&&this.handleLoadData()}componentDidUpdate(e,t,n){!e.isOpen&&this.props.isOpen&&this.handleLoadData()}render(){const{title:e,subtitle:t,isOpen:n,onClose:s,renderDrawerMessages:i}=this.props;return(0,L.jsxs)(zi,{title:e,subtitle:t,isOpen:n,onClose:s,"data-type":"update-settings",form:this.getFormParams(),children:[i(),this.renderFormFields()]})}}WC.propTypes={installationId:Vt().number.isRequired,onClose:Vt().func.isRequired,addSuccessMessage:Vt().func.isRequired,getAutoUpdateSettings:Vt().func.isRequired,updateAutoUpdateSettings:Vt().func.isRequired,title:Vt().oneOfType([Vt().string,Vt().object]).isRequired,subtitle:Vt().oneOfType([Vt().string,Vt().object]).isRequired,isOpen:Vt().bool.isRequired,vulnerabilityFeatureEnabled:Vt().bool.isRequired,onClearDrawerMessages:Vt().func.isRequired,renderDrawerMessages:Vt().func.isRequired};const zC=(0,so.$j)((e=>({vulnerabilityFeatureEnabled:e.app.options.vulnerabilityFeature})),(e=>({getAutoUpdateSettings:nh(Cv,e),updateAutoUpdateSettings:nh(jv,e)})))(Lx(WC)),qC=({installation:e,baseClassName:t=`${gu}auto-updates-popover`})=>{const[n,s]=(0,U.useState)(!1),[i,a]=(0,U.useState)(!1);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(iT,{state:n?"loading":void 0,icon:n?null:"sliders",tooltip:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.button.updateSettings"}),onClick:()=>{a(!0)},"data-test-id":"settings-single",children:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.button.updateSettings"})}),(0,L.jsx)(zC,{title:e.displayTitle,subtitle:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.title"}),isOpen:i,installationId:e.id,onClose:()=>{a(!1)},addSuccessMessage:()=>{}})]})},GC=(0,so.$j)((e=>({vulnerabilityMitigationsUpdatingStatuses:e.vulnerabilities.vulnerabilityMitigationsUpdatingStatuses,runningCheckVulnerabilitiesTasks:e.vulnerabilities.runningCheckVulnerabilitiesTasks})),(e=>({checkInstallationsVulnerability:nh(jy,e),mitigateVulnerabilities:nh($g,e)})))((({installation:e,checkInstallationsVulnerability:t,mitigateVulnerabilities:n,vulnerabilityMitigationsUpdatingStatuses:s,runningCheckVulnerabilitiesTasks:i,vulnerabilitiesList:{frankyVulnerabilities:a,relatedInstallationsIds:r,isLoading:o}})=>{const[l,c]=(0,U.useState)(!1),u=Mc();if(o)return(0,L.jsx)(IC,{contentLines:3});if(!r.length)return null;const d=AC(a);return EC((()=>{const a=i.some((t=>t.installationsIds.includes(e.id)))||s.some((t=>d.vulnerabilitiesIds.has(t.vulnerabilityId)&&t.installationIds.includes(e.id))),r=new Map,o=[];d.vulnerabilities.forEach((t=>{var n,s,i;if(!t.assetUpdateVersion)return;const a=null!==(n=t.assetSlug)&&void 0!==n?n:"wordpress",l=`${t.assetType}:${a}`,c=null!==(s=r.get(l))&&void 0!==s?s:{componentType:t.assetType,title:null!==(i=t.assetTitle)&&void 0!==i?i:"",currentVersion:t.assetCurrentVersion,newVersion:t.assetUpdateVersion,vulnerabilitiesCounter:0};o.push({vulnerabilityId:t.id,installationsIds:[e.id],mitigations:[{type:op.Update,id:t.id,applied:!0}]}),c.vulnerabilitiesCounter++,r.set(l,c)}));const p=l||a;return(0,L.jsxs)(L.Fragment,{children:[d.vulnerabilities.length>0?(0,L.jsx)(NC,{isLoading:p,buttonIcon:"arrow-up-circle",buttonContent:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.button.reviewUpdates"}),buttonDataTestId:"review-single",popoverContent:(()=>{const e=[];return r.forEach(((t,n)=>{let s;switch(t.componentType){case Jj:s=u("drawer.security.widget.updates.single.popover.coreRow",{currentVersion:t.currentVersion,newVersion:t.newVersion,vulnerabilitiesCount:t.vulnerabilitiesCounter});break;case Qj:s=u("drawer.security.widget.updates.single.popover.pluginRow",{plugin:t.title,currentVersion:t.currentVersion,newVersion:t.newVersion,vulnerabilitiesCount:t.vulnerabilitiesCounter});break;case eT:s=u("drawer.security.widget.updates.single.popover.themeRow",{theme:t.title,currentVersion:t.currentVersion,newVersion:t.newVersion,vulnerabilitiesCount:t.vulnerabilitiesCounter})}e.push((0,L.jsx)("li",{children:s},n))})),(0,L.jsx)("ul",{children:e})})(),confirmationButtonIntent:"primary",confirmationButtonContent:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.popover.button.update"}),onConfirm:()=>{(e=>{c(!0),n(e).catch((()=>{})).finally((()=>{c(!1)}))})(o)}}):UC(p,(()=>{var n;n=[e.id],c(!0),t(n).catch((()=>{})).finally((()=>{c(!1)}))}))," ",(0,L.jsx)(qC,{installation:e})]})}),RC(d.vulnerabilities),u)})),KC="doNotChange",XC="true",ZC="false",JC="disabledWithUpdates",QC="true",eD="false";class tD extends U.Component{constructor(e){super(e),this.getPluginsAutoUpdateSettings=e=>{if(e.forceUpdates===KC)return null;const t=Object.assign(Object.assign({},e),{updateVulnerable:!1});return e.forceUpdates===JC&&(t.forceUpdates=ZC,t.updateVulnerable=!0),e.forceUpdates===ZC&&(t.deactivateVulnerable=!1),t.forceUpdates=e.forceUpdates===XC,t},this.getThemesAutoUpdateSettings=e=>{if(e.forceUpdates===KC)return null;const t=Object.assign(Object.assign({},e),{updateVulnerable:!1});return e.forceUpdates===JC&&(t.forceUpdates=ZC,t.updateVulnerable=!0),t.forceUpdates=e.forceUpdates===QC,t},this.handleSubmit=({core:e,plugins:t,themes:n})=>{if(this.state.isProcessing)return;const{updates:s,updateInstallationsAutoUpdatesSettings:i,onClose:a,addSuccessMessage:r,onClearDrawerMessages:o}=this.props;if(e===KC&&t.forceUpdates===KC&&n.forceUpdates===KC)return void a();const l={};e!==KC&&(l.core=e);const c=this.getPluginsAutoUpdateSettings(t);null!==c&&(l.plugins=c);const u=this.getThemesAutoUpdateSettings(n);null!==u&&(l.themes=u);const d=s.map((e=>e.id));o(),this.setState({isProcessing:!0}),i(d,l).then((()=>{r("autoUpdatesSettings.autoUpdatesSettingsUpdatedSuccessfully",!0,"autoUpdatesSettingsUpdatedSuccessfully"),a()})).catch((()=>{this.setState({isProcessing:!1})}))},this.isUpdateFeatureDisabled=()=>{const{isUnpaid:e,updates:t}=this.props;return!(!t||!t.length||!e&&t.some((e=>e.autoUpdate.available)))},this.renderPaidFeatureDesc=()=>{const{upgradeUrl:e,premiumFeaturesUrl:t}=this.props;return this.isUpdateFeatureDisabled()?(0,L.jsx)(pm,{uatAction:"CLICK_EXT_BUY_FROM_UPDATE_SETTINGS_FORM",purchaseLicenseUrl:e,premiumFeaturesUrl:t,children:(0,L.jsx)(Ac,{content:"paidFeature.updateFeatureDescription"})}):null},this.getFormParams=()=>{const{core:e,plugins:t,themes:n,isProcessing:s}=this.state;return{onSubmit:this.handleSubmit,requiredMark:!1,values:{core:e,plugins:t,themes:n},state:s?"submit":void 0,applyButton:!1,cancelButton:!1,submitButton:{"data-test-id":Rh,disabled:this.isUpdateFeatureDisabled()}}},this.renderPluginsFormFields=()=>{const{plugins:{forceUpdates:e,newlyInstalledUpdates:t,deactivateVulnerable:n}}=this.state,{vulnerabilityFeatureEnabled:s}=this.props;return(0,L.jsx)(oa,{name:"plugins[forceUpdates]",label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdatesLabel"}),value:e,options:[{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.doNotChangeOptionLabel"}),value:KC,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.doNotChangeOptionDescription"})},{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledOptionLabel"}),value:ZC,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.newlyInstalledPluginsAutoUpdates"}),name:"plugins[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates")]},s?{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledWithSecureUpdatesOptionLabel"}),value:JC,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.disabledWithSecureUpdatesOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.newlyInstalledPluginsAutoUpdates"}),name:"plugins[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates"),(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.deactivateVulnerablePlugins"}),name:"plugins[deactivateVulnerable]",value:n,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{deactivateVulnerable:e})})))},"deactivateVulnerable")]}:null,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.enabledOptionLabel"}),value:XC,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.enabledOptionDescription"}),indentFields:s?[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.pluginsAutoUpdates.deactivateVulnerablePlugins"}),name:"plugins[deactivateVulnerable]",value:n,onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{deactivateVulnerable:e})})))},"deactivateVulnerable")]:[]}].filter((e=>e)),onChange:e=>this.setState((t=>({plugins:Object.assign(Object.assign({},t.plugins),{forceUpdates:e})})))})},this.renderThemesFormFields=()=>{const{themes:{forceUpdates:e,newlyInstalledUpdates:t}}=this.state,{vulnerabilityFeatureEnabled:n}=this.props;return(0,L.jsx)(oa,{name:"themes[forceUpdates]",label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdatesLabel"}),value:e,options:[{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.doNotChangeOptionLabel"}),value:KC,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.doNotChangeOptionDescription"})},{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.disabledOptionLabel"}),value:eD,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.disabledOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.newlyInstalledThemesAutoUpdates"}),name:"themes[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({themes:Object.assign(Object.assign({},t.themes),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates")]},n?{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.disabledWithSecureUpdatesOptionLabel"}),value:"disabledWithUpdates",description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.disabledWithSecureUpdatesOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.newlyInstalledThemesAutoUpdates"}),name:"themes[newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({themes:Object.assign(Object.assign({},t.themes),{newlyInstalledUpdates:e})})))},"newlyInstalledUpdates")]}:null,{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.enabledOptionLabel"}),value:QC,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.themesAutoUpdates.enabledOptionDescription"})}].filter((e=>e)),onChange:e=>this.setState((t=>({themes:Object.assign(Object.assign({},t.themes),{forceUpdates:e})})))})},this.renderCoreFormFields=()=>{const{core:e}=this.state;return(0,L.jsx)(oa,{name:"core",label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdatesLabel"}),value:e,options:[{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.doNotChangeOptionLabel"}),value:KC,description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.doNotChangeOptionDescription"})},{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.disabledOptionLabel"}),value:"disabled",description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.disabledOptionDescription"})},{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.minorOptionLabel"}),value:"minor",description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.minorOptionDescription"})},{label:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.majorOptionLabel"}),value:"major",description:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.coreAutoUpdates.majorOptionDescription"})}],onChange:e=>this.setState({core:e})})},this.state={isProcessing:!1,core:KC,plugins:{forceUpdates:KC,newlyInstalledUpdates:!1,updateVulnerable:!1,deactivateVulnerable:!1},themes:{forceUpdates:KC,newlyInstalledUpdates:!1,updateVulnerable:!1}}}render(){const{title:e,subtitle:t,isOpen:n,onClose:s,renderDrawerMessages:i}=this.props;return(0,L.jsxs)(zi,{title:e,subtitle:t,isOpen:n,onClose:s,"data-type":"update-settings",form:this.getFormParams(),children:[this.renderPaidFeatureDesc(),i(),this.renderCoreFormFields(),this.renderPluginsFormFields(),this.renderThemesFormFields()]})}}tD.propTypes={updates:Vt().arrayOf(Vt().shape({id:Vt().number.isRequired,autoUpdate:Vt().shape({available:Vt().bool.isRequired}).isRequired})),onClose:Vt().func.isRequired,addSuccessMessage:Vt().func.isRequired,updateInstallationsAutoUpdatesSettings:Vt().func.isRequired,isUnpaid:Vt().bool.isRequired,upgradeUrl:Vt().string.isRequired,premiumFeaturesUrl:Vt().string,title:Vt().oneOfType([Vt().string,Vt().object]).isRequired,subtitle:Vt().oneOfType([Vt().string,Vt().object]).isRequired,isOpen:Vt().bool.isRequired,onClearDrawerMessages:Vt().func.isRequired,renderDrawerMessages:Vt().func.isRequired,vulnerabilityFeatureEnabled:Vt().bool},tD.defaultProps={updates:[],premiumFeaturesUrl:null,vulnerabilityFeatureEnabled:!1};const nD=(0,so.$j)((e=>({isUnpaid:e.app.unpaidFeatures.update,upgradeUrl:e.app.urls.featuresBuyLinks.update,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,vulnerabilityFeatureEnabled:e.app.options.vulnerabilityFeature})),(e=>({updateInstallationsAutoUpdatesSettings:nh(Tv,e)})))(Lx(tD)),sD=(0,so.$j)(((e,{installationsIds:t})=>({updates:t?e.updates.filter((e=>qc(t,e.id))):[]})))((({installationsIds:e,updates:t,onFetchInstallationsUpdates:n,baseClassName:s=`${gu}auto-updates-popover`})=>{const[i,a]=(0,U.useState)(!1),[r,o]=(0,U.useState)(!1);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(iT,{state:i?"loading":void 0,icon:i?null:"sliders",tooltip:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.button.updateSettings"}),onClick:()=>{a(!0),n().then((()=>{o(!0)})).catch((()=>{})).finally((()=>{a(!1)}))},"data-test-id":"settings-mass"}),(0,L.jsx)(nD,{title:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.title",params:{sitesCount:null==e?void 0:e.length}}),subtitle:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.subtitle"}),isOpen:r,updates:t,onClose:()=>{o(!1)},addSuccessMessage:()=>{}})]})})),iD=(0,so.$j)((e=>({vulnerabilityMitigationsUpdatingStatuses:e.vulnerabilities.vulnerabilityMitigationsUpdatingStatuses,runningCheckVulnerabilitiesTasks:e.vulnerabilities.runningCheckVulnerabilitiesTasks})),(e=>({checkInstallationsVulnerability:nh(jy,e),mitigateVulnerabilities:nh($g,e)})))((({checkInstallationsVulnerability:e,mitigateVulnerabilities:t,vulnerabilityMitigationsUpdatingStatuses:n,runningCheckVulnerabilitiesTasks:s,vulnerabilitiesList:{relatedInstallationsIds:i,frankyVulnerabilities:a,isLoading:r},onFetchInstallationsUpdates:o})=>{const[l,c]=(0,U.useState)(!1),u=Mc();if(r)return(0,L.jsx)(IC,{contentLines:3});if(!i.length)return null;const d=AC(a);return EC((()=>{const a=s.some((e=>e.installationsIds.some((e=>d.idsOfInstallationsWithUpdatableComponents.has(e)))))||n.some((e=>d.vulnerabilitiesIds.has(e.vulnerabilityId)&&e.installationIds.some((e=>d.idsOfInstallationsWithUpdatableComponents.has(e))))),r={cores:new Set,coresVulnerabilities:0,plugins:new Set,pluginsVulnerabilities:0,themes:new Set,themesVulnerabilities:0},p=[];d.vulnerabilities.forEach((e=>{e.assetUpdateVersion&&(e.installations.forEach((t=>{const n=`${t.id}:${e.assetType}:${e.assetSlug}`;switch(e.assetType){case Jj:r.cores.add(t.id),r.coresVulnerabilities++;break;case Qj:r.plugins.add(n),r.pluginsVulnerabilities++;break;case eT:r.themes.add(n),r.themesVulnerabilities++}})),p.push({vulnerabilityId:e.id,installationsIds:e.installations.map((e=>e.id)),mitigations:[{type:op.Update,id:e.id,applied:!0}]}))}));const h=100-d.idsOfInstallationsWithUpdatableComponents.size/i.length*100,m=i.length-d.idsOfInstallationsWithUpdatableComponents.size;return(0,L.jsx)(sT,{progressDescription:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.multi.footer.upToDateSitesCounter",params:{total:i.length,current:m}}),progress:l||a?-1:h,button:(0,L.jsxs)(L.Fragment,{children:[d.idsOfInstallationsWithUpdatableComponents.size>0?(0,L.jsx)(NC,{isLoading:l||a,buttonTooltip:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.button.reviewUpdates"}),buttonIcon:"arrow-up-circle",buttonDataTestId:"review-mass",popoverContent:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.multi.popover.summary"}),(0,L.jsxs)("ul",{children:[r.cores.size>0&&(0,L.jsx)("li",{children:u("drawer.security.widget.updates.multi.popover.coresCounter",{coresCounter:r.cores.size,vulnerabilitiesCounter:r.coresVulnerabilities})}),r.plugins.size>0&&(0,L.jsx)("li",{children:u("drawer.security.widget.updates.multi.popover.pluginsCounter",{pluginsCounter:r.plugins.size,vulnerabilitiesCounter:r.pluginsVulnerabilities})}),r.themes.size>0&&(0,L.jsx)("li",{children:u("drawer.security.widget.updates.multi.popover.themesCounter",{themesCounter:r.themes.size,vulnerabilitiesCounter:r.themesVulnerabilities})})]})]}),confirmationButtonIntent:"primary",confirmationButtonContent:(0,L.jsx)(Ac,{content:"drawer.security.widget.updates.popover.button.update"}),onConfirm:()=>{(e=>{c(!0),t(e).catch((()=>{})).finally((()=>{c(!1)}))})(p)}}):UC(l||a,(()=>{var t;t=[...i],c(!0),e(t).catch((()=>{})).finally((()=>{c(!1)}))}),!1)," ",(0,L.jsx)(sD,{installationsIds:i,onFetchInstallationsUpdates:o})]})})}),RC(d.vulnerabilities),u)})),aD=e=>{const t=new Map;if(!e)return t;const{daysSinceFirstProtection:n,thirtyDays:s,total:i}=e;return null!==n&&(n>=30?t.set("thirtyDaysStats",(0,L.jsx)(as,{"data-test-id":sm,children:(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.neutralized.thirtyDays",params:{vulnerabilitiesCount:s}})})):t.set("relativeDaysStats",(0,L.jsx)(as,{"data-test-id":sm,children:(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.neutralized.relativeDays",params:{vulnerabilitiesCount:s,daysCount:n}})}))),i>s&&t.set("totalStats",(0,L.jsx)(as,{"data-test-id":"blocked-all-time",children:(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.neutralized.allTime",params:{vulnerabilitiesCount:i}})})),t},rD=({installation:e,onOpenVirtualPatchingUpsellDialog:t,hasActiveTasks:n,numberOfCanBeNeutralizedVulnerabilities:s,usageStatistics:i,showVirtualPatchesUpsellWhenRestrictedViaPlans:a,isAdmin:r})=>{const o=Mc("drawer.security.widget.vulnerabilityProtection"),l=aD(i);if(e.features.virtualPatches.status)return(0,L.jsxs)(OC,{title:o("title.protectionEnabled.singleSite"),titleIconProps:{name:"shield-filled",intent:"success"},footer:(0,L.jsx)(cD,{buttonText:o("button.disable"),installationIds:[e.id],protectionStatus:!1,hasActiveTasks:n}),"data-test-id":im,children:[(0,L.jsx)(LC,{items:l}),(0,L.jsx)(mD,{})]});const c=vT(e,a,r)?(0,L.jsx)(cD,{buttonText:o("button.enable"),installationIds:[e.id],protectionStatus:!0,hasActiveTasks:n}):(0,L.jsx)(Ue,{icon:"lock-closed",intent:"primary",state:n?"loading":void 0,onClick:()=>t(Tm),children:o("button.enable")});let u=l;return u.set("canBeNeutralized",(0,L.jsx)(hD,{number:s})),u=new Map([...u,...l]),(0,L.jsxs)(OC,{title:o("title.disabled"),titleIconProps:{name:"shield",intent:"inactive"},footer:c,"data-test-id":im,children:[(0,L.jsx)(pD,{}),(0,L.jsx)(LC,{items:u})]})},oD=({installationsIdsWithInactiveProtection:e,installationsIdsWithActiveProtection:t,numberOfCanBeNeutralizedVulnerabilities:n,isProtectionPaid:s,hasActiveTasks:i,usageStatistics:a})=>{const r=Mc(),o=t.length,l=e.length,c=o+l,u=c>0?o/c*100:0,d=aD(a);if(l>0){const t=()=>(0,L.jsx)(ST,{renderManagingComponent:(t,n)=>t?(0,L.jsx)(iT,{icon:"lock-closed",state:i?"loading":void 0,onClick:t?n:void 0,disabled:i,children:r("drawer.security.widget.vulnerabilityProtection.button.enableAll")}):(0,L.jsx)(cD,{buttonText:r("drawer.security.widget.vulnerabilityProtection.button.enableAll"),installationIds:e,protectionStatus:!0,hasActiveTasks:i}),isPaid:s,uatAction:Cm});let a=new Map;return a.set("canBeNeutralized",(0,L.jsx)(hD,{number:n})),a=new Map([...a,...d]),(0,L.jsxs)(OC,{title:r("drawer.security.widget.vulnerabilityProtection.title.disabled"),titleIconProps:{name:"shield",intent:"inactive"},footer:(0,L.jsx)(sT,{progressDescription:(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.sitesProtected",params:{total:c,current:o}}),progress:u,button:t()}),"data-test-id":im,children:[0===o&&(0,L.jsx)(pD,{}),(0,L.jsx)(LC,{items:a}),o>0&&(0,L.jsx)(mD,{})]})}return(0,L.jsxs)(OC,{title:r("drawer.security.widget.vulnerabilityProtection.title.protectionEnabled.multipleSites"),titleIconProps:{name:"shield-filled",intent:"success"},footer:(0,L.jsx)(sT,{progressDescription:(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.sitesProtected",params:{total:c,current:o}}),progress:u,button:(0,L.jsx)(cD,{buttonText:r("drawer.security.widget.vulnerabilityProtection.button.disableAll"),installationIds:t,protectionStatus:!1,hasActiveTasks:i})}),"data-test-id":im,children:[(0,L.jsx)(LC,{items:d}),(0,L.jsx)(mD,{})]})},lD=({onSubmit:e,dataTestId:t,isButtonDisabled:n=!1,isButtonLoading:s=!1,baseClassName:i=`${gu}virtual-patches-consent`})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:`${i}__popover-content`,children:[(0,L.jsx)(Ac,{component:as,content:"list-ui.instances.forms.security.virtualPatches.instancesWidget.disablingConsentForm.description"}),(0,L.jsx)("div",{className:`${i}__popover-content-item`,children:(0,L.jsx)(pT,{})})]}),(0,L.jsx)(Ue,{id:Fh,"data-test-id":t,disabled:n,state:s?"loading":void 0,onClick:e,size:"md",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.virtualPatches.instancesWidget.disablingConsentForm.button"})})]}),cD=(0,so.$j)(void 0,(e=>({updateVirtualPatchesProtectionStatus:nh(Wg,e)})))((({buttonText:e,protectionStatus:t,installationIds:n,hasActiveTasks:s,updateVirtualPatchesProtectionStatus:i})=>(0,L.jsx)(fT,{onHandleApplyVirtualPatches:e=>i({installationsIds:n,status:t,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0},e),renderManagingComponent:(t,n,i)=>(0,L.jsx)(iT,{state:s||n?"loading":void 0,onClick:i,disabled:t,children:e}),Consent:t?bT:lD}))),uD=e=>{const{baseClassName:t=`${gu}vpatches-description`}=e;return Mc(),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:`${t}-description`,children:(0,L.jsxs)("ul",{children:[(0,L.jsx)("li",{children:(0,L.jsx)(Ac,{unsafe:!0,content:"controllers.index.detail.virtualPatches.description1"})}),(0,L.jsx)("li",{children:(0,L.jsx)(Ac,{unsafe:!0,content:"controllers.index.detail.virtualPatches.description2"})}),(0,L.jsx)("li",{children:(0,L.jsx)(Ac,{unsafe:!0,content:"controllers.index.detail.virtualPatches.description3"})})]})}),(0,L.jsx)("div",{className:`${t}-poweredBy`,children:(0,L.jsx)(pT,{})})]})},dD=e=>{const{target:t,baseClassName:n=`${gu}virtual-patches-info-popover`}=e;return(0,L.jsx)(An,{title:(0,L.jsx)(Ac,{unsafe:!0,content:"controllers.index.detail.virtualPatches.popoverTitle"}),target:t,children:(0,L.jsx)("div",{className:`${n}__content-item`,children:(0,L.jsx)(uD,{})})})},pD=()=>(0,L.jsxs)(as,{children:[(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.description"})," ",(0,L.jsx)(dD,{target:(0,L.jsx)(wn,{children:(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.description.activeText"})})})]}),hD=({number:e})=>{const t=Mc();return(0,L.jsx)(as,{"data-test-id":"can-block",children:t("drawer.security.widget.vulnerabilityProtection.canBeNeutralized",{number:e})})},mD=()=>(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(as,{children:(0,L.jsx)(DC,{target:(0,L.jsx)(wn,{children:(0,L.jsx)(Ac,{content:"drawer.security.widget.vulnerabilityProtection.somethingsNotNeutralized"})})})})}),fD=(0,so.$j)((e=>({showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans,isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller})),(e=>({calculateVulnerabilityProtectionUsageStatistics:nh($y,e)})))((e=>{const{installation:t,installationsIdsWithInactiveProtection:n,installationsIdsWithActiveProtection:s,onOpenVirtualPatchingUpsellDialog:i,isProtectionPaid:a,calculateVulnerabilityProtectionUsageStatistics:r,vulnerabilitiesList:{frankyVulnerabilities:o,relatedInstallationsIds:l,isLoading:c},showVirtualPatchesUpsellWhenRestrictedViaPlans:u,isAdmin:d}=e,[p,h]=(0,U.useState)(!1),[m,f]=(0,U.useState)(void 0);if((0,U.useEffect)((()=>{!c&&l.length&&(h(!0),r(l).then((e=>{f(e)})).catch((()=>{f(void 0)})).finally((()=>{h(!1)})))}),[c,r,l]),c||p)return(0,L.jsx)(IC,{contentLines:8});if(!l.length)return null;const g=o.flatMap((e=>e.installations.filter((e=>e.virtualPatchAvailable&&!e.virtualPatchApplied)))).length,b=o.some((e=>e.hasActiveVirtualPatchesTasks));return t?(0,L.jsx)(rD,{installation:t,onOpenVirtualPatchingUpsellDialog:i,numberOfCanBeNeutralizedVulnerabilities:g,hasActiveTasks:b,usageStatistics:m,showVirtualPatchesUpsellWhenRestrictedViaPlans:u,isAdmin:d}):(0,L.jsx)(oD,{installationsIdsWithInactiveProtection:n,installationsIdsWithActiveProtection:s,numberOfCanBeNeutralizedVulnerabilities:g,hasActiveTasks:b,isProtectionPaid:a,usageStatistics:m})}));var gD=r(74247),bD=r.n(gD);const vD=e=>{var t;const{installationsVulnerabilityStatuses:n,virtualPatchesUpdatingStatuses:s,installationsWithoutRestrictionsForVirtualPatches:i}=e,a=null===(t=e.installation)||void 0===t?void 0:t.id;return(0,U.useMemo)((()=>{const e=[],t=[];return n.forEach((n=>{if(void 0!==a&&a!==n.id)return;const s={installationId:n.id,instanceDisplayTitle:n.displayTitle};e.push(s.installationId),t.push(...n.core.vulnerabilities.map((e=>Object.assign({id:e.id,title:e.title,description:e.description,cvssScore:e.cvssScore,riskRank:e.riskRank,providers:e.providers,disclosedAt:e.disclosedAt,exploited:e.exploited,directUrl:e.directUrl,mitigations:e.mitigations.map((e=>Object.assign({},e))),assetType:Jj,assetId:n.id,assetSlug:null,assetTitle:null,assetVersion:n.core.version,assetHasUpdates:!!n.core.availableMinorVersion,assetUpdateVersion:n.core.availableMinorVersion,assetIsActive:!0},s)))),n.plugins.forEach((e=>{e.vulnerabilities.length>0&&t.push(...e.vulnerabilities.map((t=>Object.assign({id:t.id,title:t.title,description:t.description,cvssScore:t.cvssScore,riskRank:t.riskRank,providers:t.providers,disclosedAt:t.disclosedAt,exploited:t.exploited,directUrl:t.directUrl,mitigations:t.mitigations.map((e=>Object.assign({},e))),assetType:Qj,assetId:e.slug,assetSlug:e.slug,assetTitle:e.title,assetVersion:e.version,assetHasUpdates:!!e.availableVersion,assetUpdateVersion:e.availableVersion,assetIsActive:e.status},s))))})),n.themes.forEach((e=>{e.vulnerabilities.length>0&&t.push(...e.vulnerabilities.map((t=>Object.assign({id:t.id,title:t.title,description:t.description,cvssScore:t.cvssScore,riskRank:t.riskRank,providers:t.providers,disclosedAt:t.disclosedAt,exploited:t.exploited,directUrl:t.directUrl,mitigations:t.mitigations.map((e=>Object.assign({},e))),assetType:eT,assetId:e.slug,assetSlug:e.slug,assetTitle:e.title,assetVersion:e.version,assetHasUpdates:!!e.availableVersion,assetUpdateVersion:e.availableVersion,assetIsActive:e.status},s))))}))})),Object.values(t.reduce(((e,t)=>{if(Object.keys(e).includes(t.id)){const n=e[t.id];if(!n.installations.find((e=>e.id===t.installationId))){const e=t.mitigations.filter((e=>!0===e.applied)),s=e.filter((e=>e.type===op.SecurityMeasure));n.installations.push({id:t.installationId,displayTitle:t.instanceDisplayTitle,assetIsActive:t.assetIsActive,virtualPatchApplied:e.some((e=>e.type===op.VirtualPatch)),securityMeasuresApplied:s.map((e=>e.id)),virtualPatchAvailable:t.mitigations.some((e=>e.type===op.VirtualPatch))&&(null==i?void 0:i.includes(t.installationId))})}n.hasActiveVirtualPatchesTasks=s.some((e=>e.installationIds.filter((e=>n.installations.map((e=>e.id)).includes(e))))),n.assets.find((e=>e.id===t.assetId))||n.assets.push({id:t.assetId,slug:t.assetSlug,title:t.assetTitle,version:t.assetVersion,hasUpdates:t.assetHasUpdates,isActive:t.assetIsActive,type:t.assetType,installationId:t.installationId}),t.assetHasUpdates&&n.assetUpdateVersion&&t.assetUpdateVersion&&1===bD()(t.assetUpdateVersion,n.assetUpdateVersion)&&(n.assetUpdateVersion=t.assetUpdateVersion),t.mitigations.forEach((e=>{if(!e.applied){const t=n.mitigations.find((t=>t.id===e.id&&e.type===t.type));t&&(t.applied=!1)}}))}else{const n=t.mitigations.filter((e=>!0===e.applied)),a=n.filter((e=>e.type===op.SecurityMeasure));e[t.id]={id:t.id,title:t.title,description:t.description,cvssScore:t.cvssScore,riskRank:t.riskRank,providers:t.providers,disclosedAt:t.disclosedAt,exploited:t.exploited,directUrl:t.directUrl,mitigations:t.mitigations,assetType:t.assetType,assetSlug:t.assetSlug,assetTitle:t.assetTitle,assetUpdateVersion:t.assetUpdateVersion?t.assetUpdateVersion:null,assetCurrentVersion:t.assetVersion,assets:[{id:t.assetId,slug:t.assetSlug,title:t.assetTitle,version:t.assetVersion,hasUpdates:t.assetHasUpdates,isActive:t.assetIsActive,type:t.assetType,installationId:t.installationId}],installations:[{id:t.installationId,displayTitle:t.instanceDisplayTitle,assetIsActive:t.assetIsActive,virtualPatchApplied:n.some((e=>e.type===op.VirtualPatch)),securityMeasuresApplied:a.map((e=>e.id)),virtualPatchAvailable:t.mitigations.some((e=>e.type===op.VirtualPatch))&&(null==i?void 0:i.includes(t.installationId))}],hasActiveVirtualPatchesTasks:s.some((e=>e.installationIds.filter((e=>t.installationId===e))))}}return e}),{}))}),[n,s,i,a])},yD=e=>(0,U.useMemo)((()=>e.map((e=>e.id))),[e]),_D=(e,{installation:t,installationsIds:n})=>{var s;return{installationsVulnerabilityStatuses:e.vulnerabilities.installationsVulnerabilityStatuses,installationsWithoutRestrictionsForVirtualPatches:(null===(s=e.instances.installations)||void 0===s?void 0:s.filter((e=>t?e.id===t.id:!n.length||n.includes(e.id))).filter((({features:{virtualPatches:{restrictions:t}}})=>!yT(t,e.app.options.isAdmin&&!e.app.options.isReseller,e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans))).map((e=>e.id)))||[],virtualPatchesUpdatingStatuses:e.vulnerabilities.virtualPatchesUpdatingStatuses}},xD=e=>({fetchInstallationsVulnerabilityStatuses:nh(Yg,e)}),SD=e=>{const t=e.displayName||e.name||"Component",n=t=>{const{installationsVulnerabilityStatuses:n,virtualPatchesUpdatingStatuses:s,fetchInstallationsVulnerabilityStatuses:i,installationsWithoutRestrictionsForVirtualPatches:a}=t,r=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(t,["installationsVulnerabilityStatuses","virtualPatchesUpdatingStatuses","fetchInstallationsVulnerabilityStatuses","installationsWithoutRestrictionsForVirtualPatches"]),[o,l]=(0,U.useState)(!0),c={vulnerabilitiesList:{frankyVulnerabilities:vD(t),relatedInstallationsIds:yD(n),isLoading:o,onLoad:e=>(l(!0),i(e).catch((()=>{})).finally((()=>{l(!1)}))),installationsWithoutRestrictionsForVirtualPatches:a}};return(0,L.jsx)(e,Object.assign({},c,r))};return n.displayName=`withVulnerabilitiesList(${t})`,(0,so.$j)(_D,xD)(n)};class wD extends U.Component{constructor(e){super(e),this.handleClose=()=>{this.props.onClose()},this.setActiveTab=e=>this.setState({activeTab:e}),this.handleRefreshInstallationsVulnerabilityStatuses=e=>{const{reloadInstallationsVulnerabilityStatuses:t}=this.props;return t(e).catch((()=>{}))},this.renderSecurityForm=()=>{const{installation:e,onClearDrawerMessages:t,onAddDrawerErrorMessage:n,onAddDrawerSuccessMessage:s}=this.props;return(0,L.jsx)(Zj,{children:(0,L.jsx)(kC,{installation:e,clearMessages:t,addSuccessMessage:s,addErrorMessage:n})})},this.renderVulnerabilityProtectionHeader=()=>{const{installation:e,onOpenVirtualPatchingUpsellDialog:t,showWidgetsInVulnerabilitiesDrawer:n,vulnerabilitiesList:s,isAdmin:i,virtualPatchesFeatureEnabled:a}=this.props,{features:{virtualPatches:{restrictions:r}}}=e,o=a&&s.installationsWithoutRestrictionsForVirtualPatches.includes(e.id);return n?(0,L.jsxs)(Ia,{sm:3,gap:"xs",stretchable:!0,hoverable:!1,"data-test-id":nm,children:[(0,L.jsx)(MC,{vulnerabilitiesList:s,installation:e}),o?(0,L.jsx)(fD,{vulnerabilitiesList:s,onOpenVirtualPatchingUpsellDialog:t,installation:e}):null,(0,L.jsx)(GC,{vulnerabilitiesList:s,installation:e})]}):o?(0,L.jsx)(PC,{status:e.features.virtualPatches.status||!1,installation:e,onOpenVirtualPatchingUpsellDialog:t}):null},this.getContent=()=>{const{installation:e,vulnerabilityFeatureEnabled:t,onOpenVirtualPatchingUpsellDialog:n,vulnerabilitiesList:s}=this.props,{activeTab:i}=this.state;return t?(0,L.jsxs)(L.Fragment,{children:[this.renderVulnerabilityProtectionHeader(),(0,L.jsxs)(Br,{active:i,children:[(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.vulnerabilityTabTitle"}),onActivate:()=>this.setActiveTab(1),"data-test-id":"instance-security-tab-vulnerabilities",children:(0,L.jsx)(LT,{vulnerabilitiesList:s,onRefreshInstallationsVulnerabilityStatuses:this.handleRefreshInstallationsVulnerabilityStatuses,installation:e,onOpenVirtualPatchingUpsellDialog:n})}),(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.securityTabTitle"}),onActivate:()=>this.setActiveTab(2),children:this.renderSecurityForm()})]})]}):this.renderSecurityForm()},this.state={activeTab:e.activeTab?e.activeTab:2}}componentDidMount(){this.props.isOpen&&this.handleOpenAndLoadData()}componentDidUpdate(e){!e.isOpen&&this.props.isOpen&&this.handleOpenAndLoadData()}handleOpenAndLoadData(){this.setActiveTab(this.props.activeTab?this.props.activeTab:2),this.props.vulnerabilitiesList.onLoad([this.props.installation.id]).catch((()=>{}))}render(){const{isOpen:e,renderDrawerMessages:t,title:n,subtitle:s,baseClassName:i}=this.props;return(0,L.jsxs)(zi,{title:n,subtitle:s,isOpen:e,onClose:this.handleClose,"data-test-id":"security-check","data-type":"instance-security",size:"lg",className:i,children:[t(),this.getContent()]})}}wD.defaultProps={activeTab:2,baseClassName:`${gu}security-drawer`};const kD=(0,so.$j)((e=>({installations:e.instances.installations,vulnerabilityFeatureEnabled:e.app.options.vulnerabilityFeature,isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller,showWidgetsInVulnerabilitiesDrawer:e.app.options.showWidgetsInVulnerabilitiesDrawer,virtualPatchesFeatureEnabled:e.app.options.virtualPatchesFeature})),(e=>({reloadInstallationsVulnerabilityStatuses:nh(Bg,e)})))(SD(Lx(wD))),jD="activeVulnerable",TD="inactiveVulnerable";class CD extends U.Component{constructor(e){super(e),this.initListData=()=>{this.setState({listData:this.getListData()},this.updateShowedListData)},this.updateShowedListData=()=>{const e=this.applyFilter(),t=this.applySearch(e);this.setState({showedListData:t})},this.applyFilter=()=>{const{listData:e,filter:t}=this.state;return(e||[]).filter((e=>{switch(t){case jD:return e.vulnerable;case TD:return!e.vulnerable&&(e.inactiveVulnerablePlugins.length>0||e.inactiveVulnerableThemes.length>0);default:return!0}}))},this.applySearch=(e=null)=>{const{search:t}=this.state,n=t.toLowerCase();return e||({listData:e}=this.state),(e||[]).filter((e=>!n||-1!==e.websiteUrl.toLowerCase().indexOf(n)))},this.getSelectedInstancesForUpdate=()=>{const{showedListData:e,selection:t}=this.state;return(e||[]).filter((e=>(!t.length||t.includes(e.id))&&(e.hasUpdates||e.vulnerablePlugins.some((e=>!!e.availableVersion))||e.vulnerableThemes.some((e=>!!e.availableVersion)))&&e.applicable))},this.handleUpdate=()=>{const{instancesActions:{updateItems:e,vulnerabilityCheckerStatsUpdate:t}}=this.props,{isUpdating:n}=this.state;if(n)return;const s=this.getSelectedInstancesForUpdate();if(!s.length)return;const i=s.map((e=>({installationId:+e.id,core:{update:e.hasUpdates,restorePoint:!1},plugins:e.vulnerablePlugins.filter((e=>!!e.availableVersion)).map((e=>e.slug)),themes:e.vulnerableThemes.filter((e=>!!e.availableVersion)).map((e=>e.slug))})));t(Hd.Update),this.setState({isUpdating:!0,instancesIdsForVulnerabilityStatusesUpdate:s.map((e=>e.id))}),e(i).then((e=>{this.setState({updateBackgroundTaskId:e.id})})).catch(this.handleOnCompleteUpdate)},this.handleOnReceiveUpdateBackgroundTaskData=e=>{const{onRefreshInstallationsVulnerabilityStatuses:t}=this.props,{updateBackgroundTaskId:n,instancesIdsForVulnerabilityStatusesUpdate:s}=this.state;if(!n)return;const i=iw(n,e);i&&tw(i)&&t(s).finally((()=>this.handleOnCompleteUpdate()))},this.handleOnCompleteUpdate=()=>{this.setState({isUpdating:!1,updateBackgroundTaskId:null,instancesIdsForVulnerabilityStatusesUpdate:[]})},this.handleCheckVulnerability=()=>{const{instancesActions:{checkInstallationsVulnerability:e}}=this.props,{showedListData:t,selection:n}=this.state,s=n.length?n:(t||[]).map((e=>e.id));this.setState({isCheckingVulnerability:!0,instancesIdsForVulnerabilityStatusesUpdate:s}),e(s).then((e=>{this.setState({checkInstallationsVulnerabilityBackgroundTaskId:e.id})})).catch((()=>this.handleOnCompleteCheckInstallationsVulnerability()))},this.handleOnReceiveCheckInstallationsVulnerabilityBackgroundTaskData=e=>{const{onRefreshInstallationsVulnerabilityStatuses:t}=this.props,{checkInstallationsVulnerabilityBackgroundTaskId:n,instancesIdsForVulnerabilityStatusesUpdate:s}=this.state;if(!n)return;const i=iw(n,e);i&&tw(i)&&t(s).finally((()=>this.handleOnCompleteCheckInstallationsVulnerability()))},this.handleOnCompleteCheckInstallationsVulnerability=()=>{this.setState({isCheckingVulnerability:!1,checkInstallationsVulnerabilityBackgroundTaskId:null,instancesIdsForVulnerabilityStatusesUpdate:[]})},this.handleSelectionChange=e=>this.setState({selection:e}),this.handleSearch=e=>this.setState({search:e},this.updateShowedListData),this.handleFilter=e=>this.setState({filter:e},this.updateShowedListData),this.getListData=()=>{const{installationsVulnerabilityStatuses:e}=this.props;return e.map((e=>{const t=[],n=[],s=[];e.plugins.forEach((e=>{e.vulnerabilities.length>0&&t.push(e),e.vulnerabilities.length>0&&e.status&&n.push(e),e.vulnerabilities.length>0&&!e.status&&s.push(e)}));const i=[],a=[],r=[];return e.themes.forEach((e=>{e.vulnerabilities.length>0&&i.push(e),e.vulnerabilities.length>0&&e.status&&a.push(e),e.vulnerabilities.length>0&&!e.status&&r.push(e)})),{id:e.id,websiteUrl:e.displayTitle,vulnerable:e.vulnerable,vulnerabilities:e.core.vulnerabilities,hasUpdates:!!e.core.availableVersion,applicable:e.applicable,vulnerablePlugins:t,activeVulnerablePlugins:n,inactiveVulnerablePlugins:s,vulnerableThemes:i,activeVulnerableThemes:a,inactiveVulnerableThemes:r}}))},this.getToolbar=()=>{const{isUpdating:e,isCheckingVulnerability:t,listData:n,filter:s}=this.state,{onChangeListView:i,isVulnerabilityFeatureUnpaid:a,isSitesFilterEnabled:r,onClearSitesFilter:o}=this.props,l=(n||[]).filter((e=>e.vulnerable)).length,c=(n||[]).filter((e=>!e.vulnerable&&(e.inactiveVulnerablePlugins.length>0||e.inactiveVulnerableThemes.length>0))).length,u=this.getSelectedInstancesForUpdate(),d=l>1?(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.sites"}):(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.site"});return(0,L.jsxs)(L.Fragment,{children:[r&&(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(Wn,{component:"h2",children:[null==n?void 0:n.length," ",d," ",(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.affected"}),(0,L.jsx)(Ue,{ghost:!0,icon:"filter",onClick:o,children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.instancesVulnerabilitiesList.showAll"})},"button")]})}),(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"Update",children:(0,L.jsx)(ls,{noSelectionText:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.noSelectionText"}),actionButtonText:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonUpdateAll"}),children:(0,L.jsx)(Ue,{intent:"primary",state:e?"loading":void 0,disabled:a||t||!u.length,onClick:this.handleUpdate,"data-test-id":"instances-security-sites-update-button",children:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonUpdate"})})})}),(0,L.jsx)(_s,{title:"Check Vulnerability",children:(0,L.jsx)(Ue,{icon:"refresh",state:t?"loading":void 0,disabled:e,onClick:this.handleCheckVulnerability,"data-test-id":"instances-security-sites-scan-button",tooltip:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonCheckVulnerability"})})}),(0,L.jsx)(ts,{}),(0,L.jsx)(_s,{title:"Views",children:(0,L.jsx)($n,{multiple:!1,buttons:[{value:Kj,title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonVulnerabilities"}),"data-test-id":Zh},{value:Gj,title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.buttonSites"}),"data-test-id":Xh}],selected:Gj,onChange:i})}),(0,L.jsx)(_s,{title:"Search",children:(0,L.jsx)($r,{onTyping:this.handleSearch})})]}),(0,L.jsxs)(Ss,{children:[(0,L.jsx)(ts,{}),(0,L.jsx)(_s,{title:"Filter",children:(0,L.jsx)($n,{label:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.filterByLabel"}),labelPlacement:"left",buttons:[{value:"all",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.filter.showAllButton",params:{count:(null==n?void 0:n.length)||0}}),"data-test-id":"instances-security-sites-filter-all",disabled:!(null==n?void 0:n.length)},{value:jD,title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.filter.activeVulnerableButton",params:{count:l}}),"data-test-id":"instances-security-sites-filter-active-vulnerable",disabled:0===l},{value:TD,title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.filter.inactiveVulnerableButton",params:{count:c}}),"data-test-id":"instances-security-sites-filter-inactive-vulnerable",disabled:0===c}],selected:s,onChange:this.handleFilter})})]})]})},this.getColumns=()=>[{key:"websiteUrl",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.websiteUrlColumn"})},{key:"wordPressCore",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.wordPressCoreColumn"}),render:e=>e.vulnerabilities.length>0?(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:"danger","data-test-id":"instances-security-vulnerable-wordpress-core-icon"}):(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.noWordPressCoreVulnerabilities"}),children:(0,L.jsx)(he,{name:"check-mark-circle",intent:"success"})})},{key:"plugins",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.pluginsColumn"}),render:e=>{const t=e.vulnerablePlugins.length,n=e.activeVulnerablePlugins.length,s=e.inactiveVulnerablePlugins.length;return t>0?(0,L.jsxs)(L.Fragment,{children:[n>0&&(0,L.jsx)("span",{"data-test-id":"instances-security-active-vulnerable-plugins-status",children:(0,L.jsx)(Pi,{intent:"danger",children:n})}),s>0&&(0,L.jsx)("span",{"data-test-id":"instances-security-inactive-vulnerable-plugins-status",children:(0,L.jsx)(Pi,{intent:"warning",children:s})})]}):(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.noVulnerablePlugins"}),children:(0,L.jsx)(he,{name:"check-mark-circle",intent:"success"})})}},{key:"themes",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.themesColumn"}),render:e=>{const t=e.vulnerableThemes.length,n=e.activeVulnerableThemes.length,s=e.inactiveVulnerableThemes.length;return t>0?(0,L.jsxs)(L.Fragment,{children:[n>0&&(0,L.jsx)("span",{"data-test-id":"instances-security-active-vulnerable-themes-status",children:(0,L.jsx)(Pi,{intent:"danger",children:n})}),s>0&&(0,L.jsx)("span",{"data-test-id":"instances-security-inactive-vulnerable-themes-status",children:(0,L.jsx)(Pi,{intent:"warning",children:s})})]}):(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.noVulnerableThemes"}),children:(0,L.jsx)(he,{name:"check-mark-circle",intent:"success"})})}},{key:"details",title:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.detailsColumn"}),render:e=>(0,L.jsx)(fe,{icon:"chevron-right",onClick:()=>this.props.onOpenInstanceSecurityDrawer(e.id,1)})}],this.state={isUpdating:!1,isCheckingVulnerability:!1,selection:[],search:"",filter:"all",listData:null,showedListData:null,updateBackgroundTaskId:null,checkInstallationsVulnerabilityBackgroundTaskId:null,instancesIdsForVulnerabilityStatusesUpdate:[]}}componentDidMount(){this.initListData()}componentDidUpdate(e){e.tasks!==this.props.tasks&&(this.handleOnReceiveUpdateBackgroundTaskData(this.props.tasks),this.handleOnReceiveCheckInstallationsVulnerabilityBackgroundTaskData(this.props.tasks)),e.installationsVulnerabilityStatuses!==this.props.installationsVulnerabilityStatuses&&this.initListData()}render(){const{selection:e,showedListData:t,isUpdating:n,isCheckingVulnerability:s}=this.state;return t?(0,L.jsx)(Wa,{loading:n||s,columns:this.getColumns(),data:t,rowKey:"id",rowProps:e=>({"data-test-vulnerable-instance-id":e.id}),emptyView:(0,L.jsx)(Ac,{content:"instancesVulnerabilities.vulnerableWebsitesList.noVulnerableWebsites"}),toolbar:this.getToolbar(),selection:e,onSelectionChange:this.handleSelectionChange,sortColumn:"websiteUrl",filtered:!0,"data-test-id":"instances-security-vulnerability-instances"}):(0,L.jsx)(It,{})}}CD.defaultProps={tasks:[]};const DD=(0,so.$j)((e=>({isVulnerabilityFeatureUnpaid:e.app.unpaidFeatures.vulnerability,tasks:e.backgroundTasks.tasks})),(e=>({instancesActions:nh(i,e)})))(CD);class PD extends U.Component{constructor(e){super(e),this.handleChangeListView=e=>this.setState({listView:e,shownInstallationsForSitesView:[]}),this.handleRefreshInstallationsVulnerabilityStatuses=e=>{const{reloadInstallationsVulnerabilityStatuses:t}=this.props;return t(e).catch((()=>{}))},this.getPaidFeatureDesc=()=>{const{isVulnerabilityFeatureUnpaid:e,upgradeUrl:t,premiumFeaturesUrl:n}=this.props;return e?(0,L.jsx)(pm,{purchaseLicenseUrl:t,premiumFeaturesUrl:n,children:(0,L.jsx)(Ac,{content:"paidFeature.vulnerabilityFeatureDescription"})}):null},this.handleChangeSiteViewInstallationsIds=e=>{this.setState({shownInstallationsForSitesView:e})},this.handleClearSitesFilter=()=>{this.setState({shownInstallationsForSitesView:[]})},this.getList=()=>{var e,t;const{onOpenInstanceSecurityDrawer:n,installationsVulnerabilityStatuses:s,isProtectionPaid:i,vulnerabilitiesList:a}=this.props,{shownInstallationsForSitesView:r}=this.state;return this.state.listView===Kj?(0,L.jsx)(LT,{vulnerabilitiesList:a,onChangeListView:this.handleChangeListView,onRefreshInstallationsVulnerabilityStatuses:this.handleRefreshInstallationsVulnerabilityStatuses,onChangeSiteViewInstallationsIds:this.handleChangeSiteViewInstallationsIds,isProtectionPaid:i}):(0,L.jsx)(DD,{onChangeListView:this.handleChangeListView,onOpenInstanceSecurityDrawer:n,onRefreshInstallationsVulnerabilityStatuses:this.handleRefreshInstallationsVulnerabilityStatuses,installationsVulnerabilityStatuses:r.length>0?null!==(e=null==s?void 0:s.filter((e=>r.includes(e.id))))&&void 0!==e?e:[]:null!=s?s:[],isSitesFilterEnabled:r.length>0&&r.length<(null!==(t=null==s?void 0:s.length)&&void 0!==t?t:0),onClearSitesFilter:this.handleClearSitesFilter})},this.state={listView:e.instancesVulnerabilitiesListView||Kj,shownInstallationsForSitesView:[]}}render(){return this.props.vulnerabilitiesList.isLoading?(0,L.jsx)(It,{}):(0,L.jsxs)(L.Fragment,{children:[this.getPaidFeatureDesc(),this.getList()]})}}PD.defaultProps={baseClassName:`${gu}instances-vulnerabilities`};const ID=(0,so.$j)((e=>({instancesVulnerabilitiesListView:e.app.options.vulnerabilityFeatureSettings.instancesVulnerabilitiesListView,isVulnerabilityFeatureUnpaid:e.app.unpaidFeatures.vulnerability,upgradeUrl:e.app.urls.featuresBuyLinks.vulnerability,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,installationsVulnerabilityStatuses:e.vulnerabilities.installationsVulnerabilityStatuses})),(e=>({reloadInstallationsVulnerabilityStatuses:nh(Bg,e)})))(PD);class OD extends U.Component{constructor(e){super(e),this.initializeVulnerabilities=()=>{this.props.vulnerabilitiesList.onLoad(this.props.installationsIds).catch((()=>{}))},this.setActiveTab=e=>this.setState({activeTab:e}),this.getInstallationById=e=>{var t;return null===(t=this.props.installations)||void 0===t?void 0:t.find((t=>t.id===e))},this.handleOpenInstanceSecurityDrawer=(e,t)=>{this.setState({showInstanceSecurityDrawerForInstanceId:e,showInstanceSecurityForm:!0,securityDrawerActiveTab:t})},this.handleCloseInstanceSecurityDrawer=()=>{this.initializeVulnerabilities(),this.setState({showInstanceSecurityForm:!1,securityDrawerActiveTab:void 0})},this.getInstanceSecurityDrawer=()=>{const{showInstanceSecurityDrawerForInstanceId:e,showInstanceSecurityForm:t,securityDrawerActiveTab:n}=this.state;if(!e)return null;const s=this.getInstallationById(e);return s?(0,L.jsx)(kD,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.instanceSecurityDrawerSubTitle"}),subtitle:s.title,installation:s,isOpen:t,onClose:this.handleCloseInstanceSecurityDrawer,activeTab:n,onOpenVirtualPatchingUpsellDialog:e=>this.props.onOpenVirtualPatchingUpsellDialog(s.id,e)}):null},this.renderInstancesSecurityForm=()=>{const{installationsIds:e,onClearDrawerMessages:t,onAddDrawerSuccessMessage:n,onAddDrawerErrorMessage:s}=this.props,{showInstanceSecurityDrawerForInstanceId:i}=this.state;return(0,L.jsx)(Zj,{children:(0,L.jsx)(qj,{selectedInstallationsIds:e,clearMessages:t,addSuccessMessage:n,addErrorMessage:s,currentInstallationId:i||void 0,onOpenInstanceSecurityDrawer:this.handleOpenInstanceSecurityDrawer})})},this.getContent=()=>{var e;const{vulnerabilityFeatureEnabled:t,showWidgetsInVulnerabilitiesDrawer:n,virtualPatchesFeatureEnabled:s,virtualPatchesLicenseInfo:i,isAdmin:a,showVirtualPatchesUpsellWhenRestrictedViaPlans:r,vulnerabilitiesList:o}=this.props,{activeTab:l}=this.state,c=(null===(e=this.props.installations)||void 0===e?void 0:e.filter((e=>o.relatedInstallationsIds.includes(e.id))))||[],u=!(({installations:e,virtualPatchesLicenseInfo:t,isAdmin:n,showVirtualPatchesUpsellWhenRestrictedViaPlans:s})=>{const i=e.some((e=>e.features.virtualPatches.restrictions.includes(Jd.WpToolkitDeluxeDisabled)))||!1,a=e.filter((e=>null!==e.features.virtualPatches.subscription&&[Qd.Active,Qd.Suspended].includes(e.features.virtualPatches.subscription.status))).map((e=>e.id))||[],r=e.every((({features:{virtualPatches:{restrictions:e}}})=>e.includes(Jd.DisabledForDomain)));return!(a.length>0)&&(!t||0===(null==t?void 0:t.installationsLimit)||!n&&(i||r&&s))})({installations:c,virtualPatchesLicenseInfo:i,isAdmin:a,showVirtualPatchesUpsellWhenRestrictedViaPlans:r}),d=s&&!!o.installationsWithoutRestrictionsForVirtualPatches.length,p=c.filter((e=>e.features.virtualPatches.status)).filter((e=>o.installationsWithoutRestrictionsForVirtualPatches.includes(e.id))).map((e=>e.id)),h=c.filter((e=>!e.features.virtualPatches.status)).filter((e=>o.installationsWithoutRestrictionsForVirtualPatches.includes(e.id))).map((e=>e.id));if(t){const{fetchAvailableUpdates:e,installationsIds:t}=this.props,s=()=>e(t);return(0,L.jsxs)(L.Fragment,{children:[n&&(0,L.jsxs)(Ia,{sm:3,gap:"xs",stretchable:!0,hoverable:!1,"data-test-id":nm,children:[(0,L.jsx)(MC,{vulnerabilitiesList:o}),d?(0,L.jsx)(fD,{vulnerabilitiesList:o,installationsIdsWithActiveProtection:p,installationsIdsWithInactiveProtection:h,isProtectionPaid:u}):null,(0,L.jsx)(iD,{vulnerabilitiesList:o,onFetchInstallationsUpdates:s})]}),(0,L.jsxs)(Br,{active:l,children:[(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.vulnerabilityTabTitle"}),onActivate:()=>this.setActiveTab(1),"data-test-id":"instances-security-tab-vulnerabilities",children:(0,L.jsx)(ID,{vulnerabilitiesList:o,onOpenInstanceSecurityDrawer:this.handleOpenInstanceSecurityDrawer,isProtectionPaid:u})}),(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.securityTabTitle"}),onActivate:()=>this.setActiveTab(2),children:this.renderInstancesSecurityForm()})]})]})}return this.renderInstancesSecurityForm()},this.state={showInstanceSecurityForm:!1,showInstanceSecurityDrawerForInstanceId:null,activeTab:e.activeTab?e.activeTab:2,securityDrawerActiveTab:void 0}}componentDidMount(){this.props.isOpen&&this.initializeVulnerabilities()}componentDidUpdate(e){!e.isOpen&&this.props.isOpen&&(this.setActiveTab(this.props.activeTab?this.props.activeTab:2),this.initializeVulnerabilities())}render(){const{isOpen:e,onClose:t,renderDrawerMessages:n,baseClassName:s}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.drawerTitle"}),subtitle:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.instancesSecurity.drawerSubTitle"}),isOpen:e,size:"lg",onClose:t,"data-type":"instances-security",className:s,children:[n(),this.getContent()]}),this.getInstanceSecurityDrawer()]})}}OD.defaultProps={activeTab:2,baseClassName:`${gu}instances-security-drawer`};const LD=SD(Lx((0,so.$j)((e=>({installations:e.instances.installations,vulnerabilityFeatureEnabled:e.app.options.vulnerabilityFeature,virtualPatchesFeatureEnabled:e.app.options.virtualPatchesFeature,virtualPatchesLicenseInfo:e.app.licenseInfo.virtualPatches,showWidgetsInVulnerabilitiesDrawer:e.app.options.showWidgetsInVulnerabilitiesDrawer,isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller,showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans})),(e=>({fetchAvailableUpdates:nh(qb,e)})))(OD)));class MD extends U.Component{renderAssetUpdateVersion(){const{asset:e,updateAvailableTitle:t,handleUpdateAsset:n,blocked:s,baseClassName:i}=this.props;return!e.updateVersion||s?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("br",{}),(0,L.jsx)(Pi,{intent:"warning"})," ",t,(0,L.jsx)("br",{}),(0,L.jsxs)("div",{className:`${i}__action_wrapper`,children:[" [",(0,L.jsx)(fe,{onClick:()=>n(e),children:(0,L.jsx)(Ac,{content:"list.assets.linkUpdateToVersion",params:{version:e.updateVersion}})}),"]"]}),e.updateDetailsUrl&&(0,L.jsxs)(L.Fragment,{children:[" [",(0,L.jsx)("a",{href:e.updateDetailsUrl,target:"_blank",children:(0,L.jsx)(Ac,{content:"list.assets.linkUpdatesDetails"})}),"]"]})]})}render(){const{asset:e,publicUrl:t,uploadedTitle:n,onOpenSecurityDialog:s}=this.props,i=e.instances.map((e=>e.id)),a=e.instances.some((e=>e.isAssetActive));return(0,L.jsxs)(L.Fragment,{children:[e.isUploaded&&(0,L.jsx)(je,{title:n,children:(0,L.jsx)("img",{src:`${t}images/uploaded.png`,style:{marginRight:"5px"}})}),`${e.title} ${e.version}`,this.renderAssetUpdateVersion(),e.isVulnerable&&(0,L.jsx)("div",{children:i.length>0&&a?(0,L.jsx)(fe,{icon:(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:"danger",size:"16"}),onClick:()=>s(i,1),children:(0,L.jsx)(Ac,{content:"titleListColumn.vulnerableLink"})}):(0,L.jsx)(An,{target:(0,L.jsx)(Pi,{intent:"danger",children:(0,L.jsx)(Ac,{content:"titleListColumn.vulnerableStatus"})}),children:e.vulnerabilities.map((e=>(0,L.jsxs)("p",{children:[e.title," ",(0,L.jsx)(je,{title:e.description,children:(0,L.jsx)(he,{name:"info-circle"})})]},e.id)))})})]})}}MD.defaultProps={blocked:!1,baseClassName:`${gu}asset-name-column`};const AD=(0,so.$j)((e=>({publicUrl:e.app.urls.publicUrl})))(MD);class ED extends U.Component{constructor(e){super(e),this.handleInstallClick=()=>{this.setState({showInstallDrawer:!0})},this.handleCloseInstallDrawer=()=>{this.setState({showInstallDrawer:!1})},this.handleSubmitInstall=(e,t)=>{const{onSubmitInstall:n}=this.props;return this.setState({showInstallDrawer:!1}),n(e,t)},this.state={showInstallDrawer:!1}}render(){const{asset:e,instances:t,selectInstancesText:n,activateAfterInstallationText:s,instanceNameListTitle:i,instanceUrlListTitle:a,tooltip:r,disabled:o}=this.props,{showInstallDrawer:l}=this.state;return!e.isUploaded||e.instances.length>0?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ue,{onClick:this.handleInstallClick,tooltip:r,disabled:o,children:(0,L.jsx)(Ac,{content:"list.assets.buttonInstall"})}),l&&(0,L.jsx)(cx,{selectInstancesText:n,instanceNameListTitle:i,instanceUrlListTitle:a,showActivateAfterInstallation:!0,activateAfterInstallationText:s,drawerTitle:(0,L.jsx)(Ac,{content:"list.assets.selectInstancesDrawerTitle"}),asset:e,instances:t,onCloseDrawer:this.handleCloseInstallDrawer,onSubmitInstall:this.handleSubmitInstall})]})}}ED.defaultProps={tooltip:null,disabled:!1};const UD=ED,RD=e=>{const{menu:t}=e;return(0,L.jsx)(Tt,{menu:t,menuPlacement:"bottom-end",children:(0,L.jsx)(fe,{icon:{name:"three-dots-horizontal",size:"24"}})})};class ND extends U.Component{constructor(e){super(e),this.handleInstallClick=()=>{this.setState({showInstallDrawer:!0})},this.handleUninstallClick=()=>{this.setState({showUninstallConfirmationDialog:!0})},this.handleRemoveClick=()=>{this.setState({showRemoveConfirmationDialog:!0})},this.handleCloseUninstallConfirmation=()=>{this.setState({showUninstallConfirmationDialog:!1})},this.handleCloseRemoveConfirmation=()=>{this.setState({showRemoveConfirmationDialog:!1})},this.handleCloseInstallDrawer=()=>{this.setState({showInstallDrawer:!1})},this.handleSubmitInstall=(e,t)=>{const{onSubmitInstall:n}=this.props;return this.setState({showInstallDrawer:!1}),n(e,t)},this.handleSubmitUninstall=()=>{const{onSubmitUninstall:e}=this.props;this.setState({showUninstallConfirmationDialog:!1}),e()},this.handleSubmitRemove=()=>{const{onSubmitRemove:e}=this.props;this.setState({showRemoveConfirmationDialog:!1}),e()},this.state={showInstallDrawer:!1,showUninstallConfirmationDialog:!1,showRemoveConfirmationDialog:!1}}renderInstallDrawer(){const{asset:e,instances:t,selectInstancesText:n,activateAfterInstallationText:s,instanceNameListTitle:i,instanceUrlListTitle:a}=this.props;return(0,L.jsx)(cx,{selectInstancesText:n,instanceNameListTitle:i,instanceUrlListTitle:a,showActivateAfterInstallation:!0,activateAfterInstallationText:s,drawerTitle:(0,L.jsx)(Ac,{content:"list.assets.selectInstancesDrawerTitle"}),asset:e,instances:t,onCloseDrawer:this.handleCloseInstallDrawer,onSubmitInstall:this.handleSubmitInstall})}renderUninstallConfirmationDialog(){const{uninstallDialogConfirmationText:e,uninstallDialogYesButtonText:t,uninstallDialogNoButtonText:n}=this.props;return(0,L.jsx)(ji,{isOpen:!0,buttons:(0,L.jsx)(Ue,{onClick:this.handleSubmitUninstall,children:t}),size:"sm",onClose:this.handleCloseUninstallConfirmation,cancelTitle:n,children:e})}renderRemoveConfirmationDialog(){const{removeDialogConfirmationText:e,removeDialogYesButtonText:t,removeDialogNoButtonText:n}=this.props;return(0,L.jsx)(ji,{isOpen:!0,buttons:(0,L.jsx)(Ue,{onClick:this.handleSubmitRemove,children:t}),size:"sm",onClose:this.handleCloseRemoveConfirmation,cancelTitle:n,children:e})}render(){const{asset:e,instances:t,disableInstalling:n}=this.props,{showInstallDrawer:s,showUninstallConfirmationDialog:i,showRemoveConfirmationDialog:a}=this.state;if(!e||!e.isUploaded)return null;const r=[];if(e.instances.length<t.length&&!n&&r.push((0,L.jsx)(ft,{onClick:this.handleInstallClick,children:(0,L.jsx)(Ac,{content:"list.assets.buttonInstall"})})),e.instances.length>0&&r.push((0,L.jsx)(ft,{onClick:this.handleUninstallClick,children:(0,L.jsx)(Ac,{content:"list.assets.buttonUninstall"})})),e.isAllowedToManage&&r.push((0,L.jsx)(ft,{onClick:this.handleRemoveClick,children:(0,L.jsx)(Ac,{content:"list.assets.buttonRemove"})})),0===r.length)return null;const o=(0,L.jsx)(Nn,{children:r});return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(RD,{menu:o}),s&&this.renderInstallDrawer(),i&&this.renderUninstallConfirmationDialog(),a&&this.renderRemoveConfirmationDialog()]})}}ND.defaultProps={disableInstalling:!1};const FD=ND,YD=e=>({name:e.name,version:e.version,isUploaded:e.isUploaded,ownerGuid:e.ownerGuid});const BD=e=>{var{target:t,onActivate:n,isOpen:s,onClose:i,children:a}=e,r=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["target","onActivate","isOpen","onClose","children"]);return(0,L.jsxs)(An,Object.assign({target:t,visible:s,onClose:i,placement:"top"},r,{children:[a,(0,L.jsxs)("div",{children:[(0,L.jsx)(Ue,{onClick:()=>{n(),i()},"data-test-id":"activate-vulnerable-asset-confirmation-activate-button",children:(0,L.jsx)(Ac,{content:"activateVulnerableAssetConfirmation.activateButton"})}),(0,L.jsx)(Ue,{onClick:i,ghost:!0,children:(0,L.jsx)(Ac,{content:"activateVulnerableAssetConfirmation.cancelButton"})})]})]}))};class HD extends U.Component{constructor(e){super(e),this.handleRefresh=()=>{const{pluginsActions:{getPluginsList:e}}=this.props;this.setState({isPluginsListLoading:!0}),e().finally((()=>{this.setState({isPluginsListLoading:!1})}))},this.onUpdatePlugin=e=>{const{pluginsActions:{updatePlugins:t}}=this.props;t([YD(e)])},this.handleSortChange=({sortColumn:e,sortDirection:t})=>{this.setState({sortColumn:e,sortDirection:t})},this.handleOpenSecurityDialog=(e,t=null)=>{const{pushUrl:n}=this.props;n(`/list/instancesIds/${e.join(",")}/checkSecurity/1${t?`/activeTab/${t}`:""}`)},this.handleOpenActivateVulnerablePluginsConfirmation=()=>{this.setState({showActivateVulnerablePluginsConfirmation:!0})},this.handleCloseActivateVulnerablePluginsConfirmation=()=>{this.setState({showActivateVulnerablePluginsConfirmation:!1})},this.renderActivateButton=()=>{const{isSelectedOnlyBlockedPlugins:e,showActivateVulnerablePluginsConfirmation:t}=this.state,{baseClassName:n}=this.props,s=this.getSelectedPlugins(),i=s?s.filter((e=>e.isVulnerable)):[];return i.length?(0,L.jsxs)(BD,{target:(0,L.jsx)(Ue,{onClick:this.handleOpenActivateVulnerablePluginsConfirmation,"data-test-id":$h,disabled:e,className:`${n}__activate-button`,children:(0,L.jsx)(Ac,{content:"list.assets.buttonActivate"})}),onActivate:this.handleActivate,isOpen:t,onClose:this.handleCloseActivateVulnerablePluginsConfirmation,children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.activateVulnerablePluginsOnAllInstancesConfirmation"})}),(0,L.jsx)("ul",{className:`${n}__activate-vulnerable-plugins-confirmation__plugins-list`,children:i.map((e=>(0,L.jsx)("li",{children:`${e.title} ${e.version}`},this.getRowKey(e))))})]}):(0,L.jsx)(Ue,{onClick:this.handleActivate,"data-test-id":$h,disabled:e,children:(0,L.jsx)(Ac,{content:"list.assets.buttonActivate"})})},this.renderToolbar=()=>{const{instances:e,isAdmin:t,isReseller:n}=this.props,{isSelectedOnlyBlockedPlugins:s}=this.state;return(0,L.jsxs)(Ss,{children:[e.length>0&&(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"list.assets.buttonInstall"}),children:(0,L.jsx)(Ue,{onClick:this.handleOpenInstall,"data-test-id":"toolbar-install-button",children:(0,L.jsx)(Ac,{content:"list.assets.buttonInstall"})})}),(t||n||e.length>0)&&(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"list.assets.pluginsUpload"}),children:(0,L.jsx)(Ue,{onClick:this.handleOpenUploadPlugin,"data-test-id":"toolbar-upload-button",children:(0,L.jsx)(Ac,{content:"list.assets.pluginsUpload"})})}),e.length>0&&(0,L.jsxs)(_s,{title:(0,L.jsx)(Ac,{content:"list.assets.buttonActions"}),children:[this.renderActivateButton(),(0,L.jsx)(Ue,{onClick:this.handleDeactivate,"data-test-id":"toolbar-deactivate-button",children:(0,L.jsx)(Ac,{content:"list.assets.buttonDeactivate"})}),(0,L.jsx)(Ue,{onClick:this.handleUninstall,"data-test-id":"toolbar-uninstall-button",children:(0,L.jsx)(Ac,{content:"list.assets.buttonUninstall"})}),(0,L.jsx)(Ue,{onClick:this.handleUpdate,"data-test-id":"toolbar-update-button",disabled:s,children:(0,L.jsx)(Ac,{content:"list.assets.buttonUpdate"})})]})]})},this.handleSubmitInstall=(e,t,n)=>{const{pluginsActions:{installPlugins:s}}=this.props;return s(e.map((e=>({name:e,version:null,isUploaded:!1}))),t,n).then((e=>(e.status===nu&&this.setState({showInstallDrawer:!1}),e)))},this.handleSubmitUpload=({uploadFile:e,setId:t,instanceIds:n,isActivateAfterInstallation:s})=>{const{pluginsActions:{uploadPluginToStorage:i,uploadAndInstallPlugin:a,reloadPlugins:r},appActions:{addSuccessMessage:o},isAdmin:l,isReseller:c}=this.props;return l||c?i(e,t).then((e=>(e.status===nu&&e.data&&e.data.assetName&&e.data.assetVersion&&(r([{name:e.data.assetName,version:e.data.assetVersion}]).finally((()=>o((0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.uploadSuccess"})))),this.setState({showUploadDrawer:!1})),e))):a(e,n,s).then((e=>(e.status===nu&&this.setState({showUploadDrawer:!1}),e)))},this.renderUploadPluginDrawer=()=>{const{isAdmin:e,isReseller:t,sets:n,instances:s}=this.props;return(0,L.jsx)(Px,{onClose:this.handleCloseUpload,onUpload:this.handleSubmitUpload,selectLabel:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.selectLabel"}),drawerTitle:(0,L.jsx)(Ac,{content:"list.assets.pluginsUpload"}),activateAfterInstallationLabel:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.activateAfterInstall"}),noInstancesSelectedErrorMessage:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.errorNoInstancesSelectedToUpload"}),uploadHintForSet:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.selectSetDescription"}),uploadHintForInstances:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.uploadSelectedInstances"}),sets:e?n:[],instances:e||t?[]:s})},this.handleSearchPlugins=e=>{const{pluginsActions:{searchPlugins:t}}=this.props;return t(e).then((({data:e})=>e&&e.plugins?e.plugins:null))},this.handleActivate=()=>{const{pluginsActions:{activatePlugins:e}}=this.props,t=this.getSelectedPluginsForAction();this.resetSelection(),t&&e(t)},this.handleDeactivate=()=>{const{pluginsActions:{deactivatePlugins:e}}=this.props,t=this.getSelectedPluginsForAction();this.resetSelection(),t&&e(t)},this.handleUninstall=()=>{this.getSelectedPluginsForAction()&&this.setState({showUninstallConfirmationDialog:!0})},this.handleSubmitUninstall=()=>{const{pluginsActions:{uninstallPlugins:e}}=this.props;this.setState({showUninstallConfirmationDialog:!1},(()=>{const t=this.getSelectedPluginsForAction();this.resetSelection(),t&&e(t)}))},this.handleCloseUninstallConfirmation=()=>{this.setState({showUninstallConfirmationDialog:!1})},this.handleUpdate=()=>{const{pluginsActions:{updatePlugins:e}}=this.props,t=this.getSelectedPluginsForAction();this.resetSelection(),t&&e(t)},this.handleOpenUploadPlugin=()=>{this.setState({showUploadDrawer:!0})},this.handleCloseUpload=()=>{this.setState({showUploadDrawer:!1})},this.handleOpenInstall=()=>{this.setState({showInstallDrawer:!0})},this.handleCloseInstall=()=>{this.setState({showInstallDrawer:!1})},this.handleSubmitUploadedAssetInstall=(e,t,n)=>{const{pluginsActions:{installPlugins:s}}=this.props;return s([YD(e)],t,n)},this.handleSubmitUninstallUploadedAsset=e=>{const{pluginsActions:{uninstallPlugins:t}}=this.props;t([YD(e)])},this.handleSubmitRemoveUploadedAsset=e=>{const{pluginsActions:{removePlugins:t}}=this.props;t([YD(e)])},this.handleSelectionChange=e=>{const{blockedPlugins:t}=this.props;this.setState({selectedPluginsKeys:e},(()=>{const e=this.getSelectedPlugins(),n=!!e&&!e.some((e=>!t.includes(e.name)));this.setState({isSelectedOnlyBlockedPlugins:n})}))},this.resetSelection=()=>{this.setState({selectedPluginsKeys:[]})},this.getRowKey=e=>`${e.name}-${e.version}-${e.isUploaded}-${e.ownerGuid}`,this.state={selectedPluginsKeys:[],isPluginsListLoading:!1,showInstallDrawer:!1,showUploadDrawer:!1,showUninstallConfirmationDialog:!1,sortColumn:null,sortDirection:"ASC",isSelectedOnlyBlockedPlugins:!1,showActivateVulnerablePluginsConfirmation:!1}}componentWillMount(){const{plugins:e,instances:t}=this.props;null!==e&&null!==t||this.handleRefresh()}componentWillUnmount(){const{pluginsActions:{resetPluginsList:e}}=this.props;e()}filterPlugins(e){const{search:t}=this.props;if(!t||""===t.trim())return e;const n=t.trim().toLowerCase();return e.filter((e=>-1!==e.name.toLowerCase().indexOf(n)||-1!==e.title.toLowerCase().indexOf(n)))}getSelectedPlugins(){const{selectedPluginsKeys:e}=this.state,{plugins:t}=this.props;return 0===e.length?null:t.filter((t=>qc(e,this.getRowKey(t))))}getSelectedPluginsForAction(){const{appActions:{addWarningMessage:e}}=this.props,t=this.getSelectedPlugins();return t?t.map((e=>YD(e))):(e((0,L.jsx)(Ac,{content:"lists.noItemsSelectedToast"})),null)}renderPluginsList(){const{plugins:e,blockedPlugins:t}=this.props,{selectedPluginsKeys:n,showInstallDrawer:s,showUploadDrawer:i,showUninstallConfirmationDialog:a,sortColumn:r,sortDirection:o}=this.state,l=[{key:"title",title:(0,L.jsx)(Ac,{content:"list.assets.name"}),width:"20%",sortable:!0,sort:(e,t)=>{const n=`${e.name} ${e.version}`,s=`${t.name} ${t.version}`;return n.localeCompare(s)},render:e=>{const n=t.includes(e.name);return(0,L.jsxs)(U.Fragment,{children:[n&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.blacklistedPluginHint"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:16})})," ",(0,L.jsx)(AD,{asset:e,updateAvailableTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.updateAvailable"}),uploadedTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.custom"}),handleUpdateAsset:this.onUpdatePlugin,blocked:n,onOpenSecurityDialog:this.handleOpenSecurityDialog})]})}},{key:"instances",width:"80%",title:(0,L.jsx)(Ac,{content:"list.assets.installedAt"}),render:e=>this.renderInstancesColumn(e)},{key:"menu",title:"",render:e=>this.renderUploadedAssetMenu(e)}],c=this.filterPlugins(e.filter((e=>!e.isMustUse))).map((e=>Object.assign(Object.assign({},e),{key:this.getRowKey(e)})));return(0,L.jsxs)(U.Fragment,{children:[s&&this.renderInstallDrawer(),i&&this.renderUploadPluginDrawer(),a&&this.renderUninstallConfirmationDialog(),(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.plugins-list.hint"})}),this.renderToolbar(),(0,L.jsx)(dC,{columns:l,data:c,selection:n,onSelectionChange:this.handleSelectionChange,onSortChange:this.handleSortChange,sortColumn:r,sortDirection:o,dataTestId:"found-plugins-list"})]})}renderUninstallConfirmationDialog(){return(0,L.jsx)(ji,{isOpen:!0,buttons:(0,L.jsx)(Ue,{onClick:this.handleSubmitUninstall,children:(0,L.jsx)(Ac,{content:"list.assets.UninstallPluginConfirmationYes"})}),size:"sm",onClose:this.handleCloseUninstallConfirmation,cancelTitle:(0,L.jsx)(Ac,{content:"list.assets.UninstallPluginConfirmationNo"}),children:(0,L.jsx)(Ac,{content:"list.assets.pluginsConfirmOnUninstall"})})}renderInstallDrawer(){const{instances:e}=this.props;return(0,L.jsx)(dx,{onClose:this.handleCloseInstall,onSearchAssets:this.handleSearchPlugins,onInstall:this.handleSubmitInstall,drawerTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.installTitleAll"}),headDescription:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.installHeadDescription"}),searchDescription:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.tryToSearch"}),tableTitleTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldName"}),tableVersionTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldVersion"}),tableRatingTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldRating"}),nothingFoundText:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.nothingFound"}),selectInstancesText:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.selectInstancesHeadDescription"}),instanceNameListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldName"}),instanceUrlListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldUrl"}),showActivateAfterInstallation:!0,activateAfterInstallationText:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.activateAfterInstall"}),instances:e})}renderUploadedAssetInstallButton(e){const{instances:t,blockedPlugins:n}=this.props;return 0===t.length?null:(0,L.jsx)(UD,{asset:e,instances:t,disabled:n.includes(e.name),tooltip:n.includes(e.name)&&(0,L.jsx)(Ac,{content:"controllers.index.install-plugin.pluginBlacklistedError"}),selectInstancesText:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.installPopupHeadDescription"}),instanceNameListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldName"}),instanceUrlListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldUrl"}),activateAfterInstallationText:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.activateAfterInstall"}),onSubmitInstall:(t,n)=>this.handleSubmitUploadedAssetInstall(e,t,n)})}renderInstancesColumn(e){return(0,L.jsxs)(U.Fragment,{children:[this.renderUploadedAssetInstallButton(e),this.renderInstancesList(e.instances)]})}renderUploadedAssetMenu(e){const{instances:t,blockedPlugins:n}=this.props;return(0,L.jsx)(FD,{asset:e,instances:t,disableInstalling:n.includes(e.name),selectInstancesText:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.installPopupHeadDescription"}),instanceNameListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldName"}),instanceUrlListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldUrl"}),uninstallDialogConfirmationText:(0,L.jsx)(Ac,{content:"list.assets.UninstallPluginConfirmationDescription"}),uninstallDialogYesButtonText:(0,L.jsx)(Ac,{content:"list.assets.UninstallPluginConfirmationYes"}),uninstallDialogNoButtonText:(0,L.jsx)(Ac,{content:"list.assets.UninstallPluginConfirmationNo"}),removeDialogConfirmationText:(0,L.jsx)(Ac,{content:"list.assets.RemovePluginConfirmationDescription"}),removeDialogYesButtonText:(0,L.jsx)(Ac,{content:"list.assets.RemovePluginConfirmationYes"}),removeDialogNoButtonText:(0,L.jsx)(Ac,{content:"list.assets.RemovePluginConfirmationNo"}),activateAfterInstallationText:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.activateAfterInstall"}),onSubmitInstall:(t,n)=>this.handleSubmitUploadedAssetInstall(e,t,n),onSubmitUninstall:()=>this.handleSubmitUninstallUploadedAsset(e),onSubmitRemove:()=>this.handleSubmitRemoveUploadedAsset(e)})}renderInstancesList(e){return 0===e.length?"":ax(e.map((e=>this.renderInstance(e))),", ")}renderInstance(e){return e.isAssetActive?(0,L.jsx)("a",{onClick:()=>this.props.pushUrl(`/list/id/${e.id}`),children:e.name}):(0,L.jsxs)(Wn,{intent:"muted",children:[(0,L.jsx)("a",{onClick:()=>this.props.pushUrl(`/list/id/${e.id}`),children:(0,L.jsx)(Wn,{intent:"muted",children:e.name})})," ",(0,L.jsx)(Ac,{content:"list.assets.inactive"})]})}render(){const{isPluginsListLoading:e}=this.state;return(0,L.jsxs)(a_,{activeTab:e_,children:[e&&(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.listLoading"})}),!e&&this.renderPluginsList()]})}}HD.propTypes={search:Vt().string,plugins:Vt().array,instances:Vt().array,sets:Vt().array,pluginsActions:Vt().shape({resetPluginsList:Vt().func.isRequired,getPluginsList:Vt().func.isRequired,searchPlugins:Vt().func.isRequired,installPlugins:Vt().func.isRequired,activatePlugins:Vt().func.isRequired,deactivatePlugins:Vt().func.isRequired,uninstallPlugins:Vt().func.isRequired,removePlugins:Vt().func.isRequired,updatePlugins:Vt().func.isRequired,uploadPluginToStorage:Vt().func.isRequired,uploadAndInstallPlugin:Vt().func.isRequired,reloadPlugins:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addSuccessMessage:Vt().func.isRequired,addWarningMessage:Vt().func.isRequired}).isRequired,isAdmin:Vt().bool,isReseller:Vt().bool,pushUrl:Vt().func.isRequired,blockedPlugins:Vt().array.isRequired,baseClassName:Vt().string},HD.defaultProps={search:"",plugins:null,instances:null,sets:[],isAdmin:!0,isReseller:!1,baseClassName:`${gu}plugins-page`};const VD=(0,so.$j)((e=>({search:e.app.search,plugins:e.plugins.list,instances:e.plugins.instances,sets:e.plugins.sets,isAdmin:e.app.options.isAdmin,isReseller:e.app.options.isReseller,blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})),(t=>({pluginsActions:nh(a,t),appActions:nh(e,t),pushUrl:e=>t(Ao(e))})))(v_(HD)),$D=Nc(rS,"themes","instances","sets"),WD=()=>Hf(_d.getThemesList,(e=>$D(e.data.themes,e.data.instances,e.data.sets))),zD=Nc(oS),qD=Nc(lS,"themesToUpdate","newThemesData"),GD=(e,t)=>Bf((()=>_d.loadThemesData(e)),((n,s)=>{n(qD(e,s.data.themes)),t&&t()})),KD=Nc("themes/SEARCH_THEMES_FINISHED"),XD=e=>Hf((()=>_d.searchThemes(e)),KD),ZD=Nc(cS,"task"),JD=Nc("themes/INSTALL_THEMES_FINISHED"),QD=(e,t,n)=>Hf((()=>_d.installThemes(e,t,n)),(e=>ZD(e.data.task))),eP=Nc("themes/UPLOAD_THEME_TO_STORAGE_FINISHED","data"),tP=(e,t)=>Hf((()=>_d.uploadThemeToStorage(e,t)),(e=>eP(e.data))),nP=Nc("plugins/UPLOAD_AND_INSTALL_THEME_TASK_FINISHED"),sP=Nc(mS,"task"),iP=(e,t,n)=>Hf((()=>_d.uploadAndInstallTheme(e,t,n)),(e=>sP(e.data.task))),aP=Nc(dS,"task"),rP=Nc("themes/UNINSTALL_THEMES_FINISHED"),oP=e=>Hf((()=>_d.uninstallThemes(e)),(e=>aP(e.data.task))),lP=Nc(pS,"task"),cP=Nc("themes/REMOVE_THEMES_FINISHED"),uP=e=>Hf((()=>_d.removeThemes(e)),(e=>lP(e.data.task))),dP=Nc(uS,"task"),pP=Nc("themes/UPDATE_THEMES_FINISHED"),hP=e=>Hf((()=>_d.updateThemes(e)),(e=>dP(e.data.task))),mP=Nc(hS,"task"),fP=Nc("themes/ACTIVATE_THEME_FINISHED"),gP=e=>Hf((()=>_d.activateThemeOnAllInstances(e)),(e=>mP(e.data.task)));class bP extends U.Component{constructor(e){super(e),this.handleRefresh=()=>{const{themesActions:{getThemesList:e}}=this.props;this.setState({isThemesListLoading:!0}),e().finally((()=>{this.setState({isThemesListLoading:!1})}))},this.handleSelectionChange=e=>{this.setState({selectedThemesKeys:e})},this.handleOpenInstall=()=>{this.setState({showInstallDrawer:!0})},this.handleSearchThemes=e=>{const{themesActions:{searchThemes:t}}=this.props;return t(e).then((({data:e})=>e&&e.themes?e.themes:[]))},this.handleSubmitInstall=(e,t)=>{const{themesActions:{installThemes:n}}=this.props;return n(e.map((e=>({name:e,version:null,isUploaded:!1}))),t).then((e=>(e.status===nu&&this.setState({showInstallDrawer:!1}),e)))},this.handleCloseInstall=()=>{this.setState({showInstallDrawer:!1})},this.handleOpenUpload=()=>{this.setState({showUploadDrawer:!0})},this.handleCloseUpload=()=>{this.setState({showUploadDrawer:!1})},this.handleUninstall=()=>{this.getSelectedThemesForAction()&&this.setState({showUninstallConfirmationDialog:!0})},this.handleSubmitUninstall=()=>{const{themesActions:{uninstallThemes:e}}=this.props;this.setState({showUninstallConfirmationDialog:!1},(()=>{const t=this.getSelectedThemesForAction();this.resetSelection(),t&&e(t)}))},this.handleCloseUninstallConfirmation=()=>{this.setState({showUninstallConfirmationDialog:!1})},this.handleUpdate=()=>{const{themesActions:{updateThemes:e}}=this.props,t=this.getSelectedThemesForAction();this.resetSelection(),t&&e(t)},this.handleSubmitUpload=({uploadFile:e,setId:t,instanceIds:n,isActivateAfterInstallation:s})=>{const{themesActions:{uploadThemeToStorage:i,uploadAndInstallTheme:a,reloadThemes:r},appActions:{addSuccessMessage:o},isAdmin:l,isReseller:c}=this.props;return l||c?i(e,t).then((e=>(e.status===nu&&e.data&&e.data.assetName&&e.data.assetVersion&&(r([{name:e.data.assetName,version:e.data.assetVersion}]).finally((()=>o((0,L.jsx)(Ac,{content:"controllers.index.manage-themes.uploadSuccess"})))),this.setState({showUploadDrawer:!1})),e))):a(e,n,s).then((e=>(e.status===nu&&this.setState({showUploadDrawer:!1}),e)))},this.handleActivateTheme=e=>{const{themesActions:{activateThemeOnAllInstances:t}}=this.props;t(YD(e))},this.onUpdateTheme=e=>{const{themesActions:{updateThemes:t}}=this.props;t([YD(e)])},this.handleSortChange=({sortColumn:e,sortDirection:t})=>{this.setState({sortColumn:e,sortDirection:t})},this.renderUploadThemeDrawer=()=>{const{isAdmin:e,isReseller:t,sets:n,instances:s}=this.props;return(0,L.jsx)(Px,{onClose:this.handleCloseUpload,onUpload:this.handleSubmitUpload,selectLabel:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.selectLabel"}),drawerTitle:(0,L.jsx)(Ac,{content:"list.assets.themesUpload"}),uploadHintForSet:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.selectSetDescription"}),uploadHintForInstances:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.uploadSelectedInstances"}),activateAfterInstallationLabel:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.activateAfterInstall"}),noInstancesSelectedErrorMessage:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.errorNoInstancesSelectedToUpload"}),sets:e?n:[],instances:e||t?[]:s})},this.handleSubmitUploadedAssetInstall=(e,t,n)=>{const{themesActions:{installThemes:s}}=this.props;return s([YD(e)],t,n)},this.handleSubmitUninstallUploadedAsset=e=>{const{themesActions:{uninstallThemes:t}}=this.props;t([YD(e)])},this.handleSubmitRemoveUploadedAsset=e=>{const{themesActions:{removeThemes:t}}=this.props;t([YD(e)])},this.handleOpenSecurityDialog=(e,t=null)=>{const{pushUrl:n}=this.props;n(`/list/instancesIds/${e.join(",")}/checkSecurity/1${t?`/activeTab/${t}`:""}`)},this.handleOpenActivateVulnerableThemeConfirmation=e=>{this.setState({showActivateVulnerableThemeConfirmation:!0,activateVulnerableThemeConfirmationThemeId:e})},this.handleCloseActivateVulnerableThemeConfirmation=()=>{this.setState({showActivateVulnerableThemeConfirmation:!1,activateVulnerableThemeConfirmationThemeId:null})},this.renderToolbar=()=>{const{instances:e,isAdmin:t,isReseller:n}=this.props;return(0,L.jsxs)(Ss,{children:[e.length>0&&(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"list.assets.buttonInstall"}),children:(0,L.jsx)(Ue,{onClick:this.handleOpenInstall,"data-test-id":"toolbar-install-button",children:(0,L.jsx)(Ac,{content:"list.assets.buttonInstall"})})}),(t||n||e.length>0)&&(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"list.assets.themesUpload"}),children:(0,L.jsx)(Ue,{onClick:this.handleOpenUpload,"data-test-id":"toolbar-upload-button",children:(0,L.jsx)(Ac,{content:"list.assets.themesUpload"})})}),e.length>0&&(0,L.jsxs)(_s,{title:(0,L.jsx)(Ac,{content:"list.assets.buttonActions"}),children:[(0,L.jsx)(Ue,{onClick:this.handleUninstall,"data-test-id":"toolbar-uninstall-button",children:(0,L.jsx)(Ac,{content:"list.assets.buttonUninstall"})}),(0,L.jsx)(Ue,{onClick:this.handleUpdate,"data-test-id":"toolbar-update-button",children:(0,L.jsx)(Ac,{content:"list.assets.buttonUpdate"})})]})]})},this.resetSelection=()=>{this.setState({selectedThemesKeys:[]})},this.getRowKey=e=>`${e.name}-${e.version}-${e.isUploaded}-${e.ownerGuid}`,this.state={selectedThemesKeys:[],isThemesListLoading:!1,showInstallDrawer:!1,showUploadDrawer:!1,showUninstallConfirmationDialog:!1,sortColumn:null,sortDirection:"ASC",showActivateVulnerableThemeConfirmation:!1,activateVulnerableThemeConfirmationThemeId:null}}componentWillMount(){const{themes:e,instances:t}=this.props;null!==e&&null!==t||this.handleRefresh()}componentWillUnmount(){const{themesActions:{resetThemesList:e}}=this.props;e()}filterThemes(e){const{search:t}=this.props;if(!t||""===t.trim())return e;const n=t.trim().toLowerCase();return e.filter((e=>-1!==e.name.toLowerCase().indexOf(n)||-1!==e.title.toLowerCase().indexOf(n)))}getSelectedThemesForAction(){const{selectedThemesKeys:e}=this.state,{themes:t,appActions:{addWarningMessage:n}}=this.props;return 0===e.length?(n((0,L.jsx)(Ac,{content:"lists.noItemsSelectedToast"})),null):t.filter((t=>qc(e,this.getRowKey(t)))).map((e=>YD(e)))}renderUninstallConfirmationDialog(){return(0,L.jsx)(ji,{isOpen:!0,buttons:(0,L.jsx)(Ue,{onClick:this.handleSubmitUninstall,children:(0,L.jsx)(Ac,{content:"list.assets.UninstallThemeConfirmationYes"})}),size:"sm",onClose:this.handleCloseUninstallConfirmation,cancelTitle:(0,L.jsx)(Ac,{content:"list.assets.UninstallThemeConfirmationNo"}),children:(0,L.jsx)(Ac,{content:"list.assets.themesConfirmOnUninstall"})})}renderInstallDrawer(){const{instances:e}=this.props;return(0,L.jsx)(dx,{onClose:this.handleCloseInstall,onSearchAssets:this.handleSearchThemes,onInstall:this.handleSubmitInstall,drawerTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.installTitleAll"}),headDescription:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.installHeadDescription"}),searchDescription:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.tryToSearch"}),tableTitleTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldName"}),tableVersionTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldVersion"}),tableRatingTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldRating"}),nothingFoundText:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.nothingFound"}),selectInstancesText:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.selectInstancesHeadDescription"}),instanceNameListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldName"}),instanceUrlListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldUrl"}),instances:e})}renderInstance(e){return e.isAssetActive?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("a",{onClick:()=>this.props.pushUrl(`/list/id/${e.id}`),children:e.name})," ",(0,L.jsx)(Ac,{content:"list.assets.active"})]}):(0,L.jsx)("a",{onClick:()=>this.props.pushUrl(`/list/id/${e.id}`),children:(0,L.jsx)(Wn,{intent:"muted",children:e.name})})}renderInstancesColumn(e){return(0,L.jsxs)(U.Fragment,{children:[this.renderUploadedAssetInstallButton(e),this.renderInstancesList(e.instances)]})}renderUploadedAssetInstallButton(e){const{instances:t}=this.props;return 0===t.length?null:(0,L.jsx)(UD,{asset:e,instances:t,selectInstancesText:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.installPopupHeadDescription"}),instanceNameListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldName"}),instanceUrlListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldUrl"}),activateAfterInstallationText:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.activateAfterInstall"}),onSubmitInstall:(t,n)=>this.handleSubmitUploadedAssetInstall(e,t,n)})}renderUploadedAssetMenu(e){const{instances:t}=this.props;return(0,L.jsx)(FD,{asset:e,instances:t,selectInstancesText:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.installPopupHeadDescription"}),instanceNameListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldName"}),instanceUrlListTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldUrl"}),uninstallDialogConfirmationText:(0,L.jsx)(Ac,{content:"list.assets.UninstallThemeConfirmationDescription"}),uninstallDialogYesButtonText:(0,L.jsx)(Ac,{content:"list.assets.UninstallThemeConfirmationYes"}),uninstallDialogNoButtonText:(0,L.jsx)(Ac,{content:"list.assets.UninstallThemeConfirmationNo"}),removeDialogConfirmationText:(0,L.jsx)(Ac,{content:"list.assets.RemoveThemeConfirmationDescription"}),removeDialogYesButtonText:(0,L.jsx)(Ac,{content:"list.assets.RemoveThemeConfirmationYes"}),removeDialogNoButtonText:(0,L.jsx)(Ac,{content:"list.assets.RemoveThemeConfirmationNo"}),activateAfterInstallationText:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.activateAfterInstall"}),onSubmitInstall:(t,n)=>this.handleSubmitUploadedAssetInstall(e,t,n),onSubmitUninstall:()=>this.handleSubmitUninstallUploadedAsset(e),onSubmitRemove:()=>this.handleSubmitRemoveUploadedAsset(e)})}renderInstancesList(e){return 0===e.length?"":ax(e.map((e=>this.renderInstance(e))),", ")}renderActivateAction(e){const{publicUrl:t}=this.props,{showActivateVulnerableThemeConfirmation:n,activateVulnerableThemeConfirmationThemeId:s}=this.state;return 0===e.instances.length?null:e.isVulnerable?(0,L.jsx)(BD,{target:(0,L.jsx)(fe,{icon:(0,L.jsx)("img",{src:`${t}images/activate.png`,alt:"Activate",style:{maxWidth:16,maxHeight:16}}),onClick:()=>this.handleOpenActivateVulnerableThemeConfirmation(e.id),children:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldActivate"})}),onActivate:()=>this.handleActivateTheme(e),isOpen:n&&s===e.id,onClose:this.handleCloseActivateVulnerableThemeConfirmation,children:(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.activateVulnerableThemeOnAllInstancesConfirmation",params:{themeName:`${e.title} ${e.version}`}})})}):(0,L.jsx)(fe,{icon:(0,L.jsx)("img",{src:`${t}images/activate.png`,alt:"Activate",style:{maxWidth:16,maxHeight:16}}),onClick:()=>this.handleActivateTheme(e),children:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldActivate"})})}renderThemesList(){const{themes:e}=this.props,{selectedThemesKeys:t,showInstallDrawer:n,showUploadDrawer:s,showUninstallConfirmationDialog:i,sortColumn:a,sortDirection:r}=this.state,o=[{key:"title",title:(0,L.jsx)(Ac,{content:"list.assets.name"}),width:"20%",sortable:!0,sort:(e,t)=>{const n=`${e.name} ${e.version}`,s=`${t.name} ${t.version}`;return n.localeCompare(s)},render:e=>(0,L.jsx)(AD,{asset:e,updateAvailableTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.updateAvailable"}),uploadedTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.custom"}),handleUpdateAsset:this.onUpdateTheme,onOpenSecurityDialog:this.handleOpenSecurityDialog})},{key:"instances",title:(0,L.jsx)(Ac,{content:"list.assets.installedAt"}),width:"60%",render:e=>this.renderInstancesColumn(e)},{key:"actions",width:"20%",title:"",render:e=>this.renderActivateAction(e)},{key:"menu",title:"",render:e=>this.renderUploadedAssetMenu(e)}],l=this.filterThemes(e).map((e=>{const t=this.getRowKey(e);return Object.assign(Object.assign({},e),{key:t,id:t})}));return(0,L.jsxs)(U.Fragment,{children:[n&&this.renderInstallDrawer(),s&&this.renderUploadThemeDrawer(),i&&this.renderUninstallConfirmationDialog(),(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.themes-list.hint"})}),this.renderToolbar(),(0,L.jsx)(dC,{columns:o,data:l,selection:t,onSelectionChange:this.handleSelectionChange,onSortChange:this.handleSortChange,sortColumn:a,sortDirection:r})]})}render(){const{isThemesListLoading:e}=this.state;return(0,L.jsxs)(a_,{activeTab:t_,children:[e&&(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.listLoading"})}),!e&&this.renderThemesList()]})}}bP.propTypes={search:Vt().string,themes:Vt().array,instances:Vt().array,sets:Vt().array,themesActions:Vt().shape({resetThemesList:Vt().func.isRequired,reloadThemes:Vt().func.isRequired,getThemesList:Vt().func.isRequired,searchThemes:Vt().func.isRequired,installThemes:Vt().func.isRequired,uninstallThemes:Vt().func.isRequired,removeThemes:Vt().func.isRequired,updateThemes:Vt().func.isRequired,uploadThemeToStorage:Vt().func.isRequired,uploadAndInstallTheme:Vt().func.isRequired,activateThemeOnAllInstances:Vt().func.isRequired,installThemesFinished:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addSuccessMessage:Vt().func.isRequired,addWarningMessage:Vt().func.isRequired}).isRequired,publicUrl:Vt().string.isRequired,isAdmin:Vt().bool,isReseller:Vt().bool,pushUrl:Vt().func.isRequired},bP.defaultProps={search:"",themes:null,instances:null,sets:[],isAdmin:!0,isReseller:!1};const vP=(0,so.$j)((e=>({search:e.app.search,themes:e.themes.list,instances:e.themes.instances,sets:e.themes.sets,publicUrl:e.app.urls.publicUrl,isAdmin:e.app.options.isAdmin,isReseller:e.app.options.isReseller})),(t=>({themesActions:nh(u,t),appActions:nh(e,t),pushUrl:e=>t(Ao(e))})))(v_(bP)),yP="sets/UPDATE_SETS_PAGE",_P="sets/RESET_SETS_PAGE",xP="sets/ADD_SET",SP="sets/REMOVE_SETS",wP="sets/RENAME_SET",kP="sets/CHANGE_PLUGIN_ACTIVATION_STATE_STARTED",jP="sets/CHANGE_PLUGIN_ACTIVATION_STATE_FINISHED",TP="sets/CHANGE_THEME_ACTIVATION_STATE_STARTED",CP="sets/CHANGE_THEME_ACTIVATION_STATE_FINISHED",DP="sets/ADD_PLUGINS_TO_SET",PP="sets/ADD_THEMES_TO_SET",IP="sets/UPLOAD_PLUGIN_TO_SET",OP="sets/UPLOAD_THEME_TO_SET",LP="sets/REMOVE_PLUGIN_FROM_SET",MP="sets/REMOVE_THEME_FROM_SET",AP="sets/REMOVE_SET_FINISHED",EP="sets/REMOVE_ALL_PLUGINS_FROM_SET_FINISHED",UP="sets/REMOVE_ALL_THEMES_FROM_SET_FINISHED",RP=Nc(yP,"sets","instances"),NP=()=>Hf(xd.getSetsList,(e=>RP(e.data.sets,e.data.instances))),FP=Nc(_P),YP=Nc(xP,"addedSet"),BP=e=>Hf((()=>xd.addSet(e)),(e=>YP(e.data.addedSet))),HP=Nc(SP,"removedSetIds"),VP=e=>Hf((()=>xd.removeSets(e)),(e=>HP(e.data.removedSetIds))),$P=Nc(wP,"setId","newName"),WP=(e,t)=>Hf((()=>xd.renameSet(e,t)),(e=>$P(e.data.setId,e.data.newName))),zP=Nc(DP,"setId","plugins"),qP=(e,t)=>Hf((()=>xd.addPluginsToSet(e,t)),(e=>zP(e.data.setId,e.data.plugins))),GP=Nc(kP,"setId","assetId"),KP=Nc(jP,"setId","assetId","active"),XP=Nc(TP,"setId","assetId"),ZP=Nc(CP,"setId","assetId","active"),JP=(e,t,n)=>s=>(s(GP(e,t)),Hf((()=>xd.setPluginActivationState(e,t,n)),(e=>KP(e.data.setId,t,n)))(s)),QP=(e,t,n)=>s=>(s(XP(e,t)),Hf((()=>xd.setThemeActivationState(e,t,n)),(e=>ZP(e.data.setId,t,n)))(s)),eI=Nc(PP,"setId","themes"),tI=(e,t)=>Hf((()=>xd.addThemesToSet(e,t)),(e=>eI(e.data.setId,e.data.themes))),nI=Nc(LP,"setId","pluginId"),sI=(e,t)=>Hf((()=>xd.removePluginFromSet(e,t)),(e=>nI(e.data.setId,e.data.pluginId))),iI=Nc(MP,"setId","themeId"),aI=(e,t)=>Hf((()=>xd.removeThemeFromSet(e,t)),(e=>iI(e.data.setId,e.data.themeId))),rI=Nc(IP,"setId","pluginId","pluginTitle","pluginName"),oI=(e,t)=>Hf((()=>yd.uploadPluginToStorage(e,t)),(e=>rI(e.data.setId,e.data.assetId,e.data.assetTitle,e.data.assetName))),lI=Nc(OP,"setId","themeId","themeTitle","themeName"),cI=(e,t)=>Hf((()=>_d.uploadThemeToStorage(e,t)),(e=>lI(e.data.setId,e.data.assetId,e.data.assetTitle,e.data.assetName))),uI=(e,t)=>Hf((()=>xd.installInto(e,t)),(e=>lw(e.data.tasks))),dI=Nc("sets/SEARCH_PLUGINS_FINISHED"),pI=e=>Hf((()=>xd.searchPlugins(e)),(()=>dI())),hI=Nc("sets/SEARCH_THEMES_FINISHED"),mI=e=>Hf((()=>xd.searchThemes(e)),(()=>hI())),fI=Nc(AP,"setId"),gI=e=>Hf((()=>xd.removeSet(e)),(e=>fI(e.data.setId))),bI=Nc(EP,"setId"),vI=e=>Hf((()=>xd.removeAllPluginsFromSet(e)),(e=>bI(e.data.setId))),yI=Nc(UP,"setId"),_I=e=>Hf((()=>xd.removeAllThemesFromSet(e)),(e=>yI(e.data.setId))),xI=Nc("sets/GET_PLUGIN_DESCRIPTION_FINISHED"),SI=e=>Hf((()=>xd.getPluginDescription(e)),(()=>xI())),wI=Nc("sets/GET_THEME_DESCRIPTION_FINISHED"),kI=e=>Hf((()=>xd.getThemeDescription(e)),(()=>wI())),jI=()=>e=>e({type:"sets/INSTALL_SET_FINISHED"}),TI=(0,so.$j)((e=>({publicUrl:e.app.urls.publicUrl})))((function(e){const{publicUrl:t,uploadedTitle:n,asset:s}=e;return(0,L.jsxs)(L.Fragment,{children:[s.isUploaded&&(0,L.jsx)(je,{title:n,children:(0,L.jsx)("img",{alt:n,src:`${t}images/uploaded.png`,style:{marginRight:"5px"}})}),s.title]})}));class CI extends U.Component{constructor(e){super(e),this.handleSearchTermChange=e=>{this.setState({searchTerm:e.target.value})},this.handleSearchKeyDown=e=>{"Enter"===e.key&&this.isSearchCanBeSubmitted()&&this.handleSearch()},this.handleSearch=()=>{const{onSearchAssets:e,onSelectedAssetsChange:t}=this.props,{searchTerm:n}=this.state;t([]),this.setState({isSearching:!0,availableAssets:null},(()=>{e(n).then((e=>{this.setState({availableAssets:e})})).finally((()=>{this.setState({isSearching:!1})}))}))},this.handleSelectionChange=e=>{const{onSelectedAssetsChange:t}=this.props,{availableAssets:n}=this.state;t(n.filter(((t,n)=>qc(e,n.toString())))),this.setState({selectedAssetIndexes:e})},this.renderAvailableAssetsList=()=>{const{availableAssets:e}=this.state;return e.length>0?this.renderAvailableAssetsListWithItems():this.renderAvailableAssetsEmptyList()},this.state={availableAssets:null,selectedAssetIndexes:[],isSearching:!1,searchTerm:""}}renderRatingColumn(e){return null===e.rating||void 0===e.rating?null:(0,L.jsx)(Ur,{value:this.normalizeRating(e.rating)})}normalizeRating(e){return e/100*5}renderTitleColumn(e){const{uploadedTitle:t,alreadyPresentedAssets:n}=this.props;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(TI,{asset:e,uploadedTitle:t})," ",qc(n,e.name)&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"manage-sets.duplicateItemHint"})})," "]}),e.description&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info"}),children:e.description})]})}renderAvailableAssetsListWithItems(){const{availableAssets:e,selectedAssetIndexes:t}=this.state,{alreadyPresentedAssets:n,isShowVersion:s,tableTitleTitle:i,tableVersionTitle:a,tableRatingTitle:r,blockedPlugins:o}=this.props,l=[];l.push({key:"title",title:i,render:e=>(0,L.jsxs)(U.Fragment,{children:[o.includes(e.name)&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"controllers.index.install-plugin.pluginBlacklistedError"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:16})})," ",e.title]})}),s&&l.push({key:"version",title:a}),l.push({key:"rating",title:r});const c=e.map(((e,t)=>({key:t.toString(),name:e.name,disabled:qc(n,e.name)||o.includes(e.name),title:this.renderTitleColumn(e),version:s?e.version:void 0,rating:this.renderRatingColumn(e)})));return(0,L.jsx)(Wa,{columns:l,data:c,selection:t,onSelectionChange:this.handleSelectionChange,"data-test-id":qh})}renderAvailableAssetsEmptyList(){const{nothingFoundText:e}=this.props;return(0,L.jsx)(as,{children:e})}isSearchCanBeSubmitted(){const{isSearching:e}=this.state;return!e&&this.isSearchFieldValid()}isSearchFieldValid(){const{searchTerm:e}=this.state;return e.trim().length>=3}renderSearchingProgress(){return(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"list.assets.loading"})})}render(){const{availableAssets:e,searchTerm:t,isSearching:n}=this.state,{searchDescription:s}=this.props;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(as,{children:[(0,L.jsx)(vn,{value:t,onChange:this.handleSearchTermChange,onKeyDown:this.handleSearchKeyDown,"data-test-id":Wh})," ",(0,L.jsx)(Ue,{disabled:!this.isSearchCanBeSubmitted(),icon:"search",onClick:this.handleSearch,"data-test-id":zh}),(0,L.jsx)("br",{}),(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"list.sets.minAssetSearchLength",params:{count:3}})})]}),(0,L.jsx)(as,{children:s}),n&&this.renderSearchingProgress(),e&&this.renderAvailableAssetsList()]})}}CI.propTypes={onSearchAssets:Vt().func.isRequired,alreadyPresentedAssets:Vt().array,searchDescription:Vt().node.isRequired,tableTitleTitle:Vt().node.isRequired,isShowVersion:Vt().bool,tableVersionTitle:Vt().node,tableRatingTitle:Vt().node.isRequired,nothingFoundText:Vt().node.isRequired,onSelectedAssetsChange:Vt().func.isRequired,uploadedTitle:Vt().node.isRequired,blockedPlugins:Vt().array.isRequired},CI.defaultProps={alreadyPresentedAssets:[],isShowVersion:!0,tableVersionTitle:""};const DI=(0,so.$j)((e=>({blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})))(CI);class PI extends U.Component{constructor(e){super(e),this.handleSelectedAssetsChange=e=>{this.setState({selectedAssets:e})},this.handleSubmitAdd=()=>{const{onAddAssets:e}=this.props,{selectedAssets:t,isAdding:n}=this.state;n||(this.setState({isAdding:!0}),e(t).finally((()=>this.setState({isAdding:!1}))))},this.state={selectedAssets:[],isAdding:!1}}render(){const{selectedAssets:e,isAdding:t}=this.state,{drawerTitle:n,hint:s,onClose:i,dataType:a,onSearchAssets:r,searchDescription:o,tableTitleTitle:l,tableRatingTitle:c,nothingFoundText:u,alreadyPresentedAssets:d,uploadedTitle:p}=this.props,h={onSubmit:e.length>0?this.handleSubmitAdd:void 0,applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"manage-sets.buttonInstall"}),"data-test-id":"add-asset-drawer-add-button",disabled:0===e.length||t,state:t?"loading":"active"},cancelButton:{disabled:t,"data-test-id":"add-asset-drawer-cancel-button"}};return(0,L.jsxs)(zi,{title:n,onClose:i,"data-type":a,isOpen:!0,backButton:!0,form:h,size:"sm",children:[(0,L.jsx)(as,{children:s}),(0,L.jsx)(DI,{onSearchAssets:r,searchDescription:o,tableTitleTitle:l,isShowVersion:!1,tableRatingTitle:c,nothingFoundText:u,onSelectedAssetsChange:this.handleSelectedAssetsChange,alreadyPresentedAssets:d,uploadedTitle:p})]})}}PI.propTypes={alreadyPresentedAssets:Vt().array,drawerTitle:Vt().node.isRequired,hint:Vt().node.isRequired,onClose:Vt().func.isRequired,onAddAssets:Vt().func.isRequired,dataType:Vt().string.isRequired,onSearchAssets:Vt().func.isRequired,searchDescription:Vt().node.isRequired,tableTitleTitle:Vt().node.isRequired,tableRatingTitle:Vt().node.isRequired,nothingFoundText:Vt().node.isRequired,uploadedTitle:Vt().node.isRequired},PI.defaultProps={alreadyPresentedAssets:[]};const II=PI;class OI extends U.Component{constructor(e){super(e),this.handleAcceptUploadFiles=e=>{this.setState({uploadFile:e[0]})},this.handleSubmitUpload=()=>{const{onUpload:e}=this.props,{uploadFile:t,isUploading:n}=this.state;n||(t?(this.setState({isUploading:!0,formErrors:void 0}),e(t).then((e=>{e.status===su&&e.formErrors&&this.setState({formErrors:{fileUpload:e.formErrors}})})).finally((()=>this.setState({isUploading:!1})))):this.setState({formErrors:{fileUpload:{noFile:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.errorEmptyArchive"})}}}))},this.state={uploadFile:null,isUploading:!1,formErrors:void 0}}getUploadFileHint(){const{uploadFile:e}=this.state;return e?e.name:(0,L.jsx)(Ac,{content:"list.assets.uploadNoFileSelected"})}render(){const{isUploading:e,formErrors:t}=this.state,{drawerTitle:n,hint:s,uploadButtonTitle:i,selectLabel:a,onClose:r,dataType:o,baseClassName:l}=this.props,c={onSubmit:this.handleSubmitUpload,applyButton:!1,submitButton:{children:i,state:e?"loading":"active",disabled:e},cancelButton:{disabled:e}};return(0,L.jsx)(zi,{title:n,onClose:r,"data-type":o,isOpen:!0,backButton:!0,form:c,size:"sm",children:(0,L.jsxs)(as,{children:[(0,L.jsx)(ui,{label:a,description:this.getUploadFileHint(),errors:t&&t.hasOwnProperty("fileUpload")?t.fileUpload:void 0,children:(0,L.jsx)(Cx,{className:`${l}__dropzone`,onDrop:this.handleAcceptUploadFiles,multiple:!1,children:(0,L.jsx)(Ue,{children:(0,L.jsx)(Ac,{content:"list.assets.uploadBrowseButton"})})})}),(0,L.jsx)(as,{children:s})]})})}}OI.defaultProps={baseClassName:`${gu}upload-asset-drawer`};const LI=OI;class MI extends U.Component{constructor(e){super(e),this.handleOpenAddCatalogAssetDrawer=()=>{this.setState({isShowAddCatalogAssetDrawer:!0})},this.handleOpenUploadAssetDrawer=()=>{this.setState({isShowUploadAssetDrawer:!0})},this.handleAddAssets=e=>{const{onAddAssets:t}=this.props;return t(e.map((e=>({id:e.id,name:e.name,title:e.title,isUploaded:e.isUploaded})))).then((e=>(e.status===nu&&this.setState({isShowAddCatalogAssetDrawer:!1}),e)))},this.handleUploadAsset=e=>{const{onUpload:t}=this.props;return t(e).then((e=>(e.status===nu&&this.setState({isShowUploadAssetDrawer:!1}),e)))},this.handleCloseAddCatalogAssetDrawer=()=>{this.setState({isShowAddCatalogAssetDrawer:!1})},this.handleCloseUploadAssetDrawer=()=>{this.setState({isShowUploadAssetDrawer:!1})},this.handleLoadAssetInfo=e=>{const{getAssetDescription:t}=this.props,{assetDescriptions:n}=this.state;this.setState({assetIdOfOpenedDescriptionHint:e},(()=>{void 0===n[e]&&t(e).then((t=>{t.data.description&&this.setState((n=>({assetDescriptions:Object.assign(Object.assign({},n.assetDescriptions),{[e]:t.data.description})})))}))}))},this.handleCloseAssetDescriptionHint=()=>{this.setState({assetIdOfOpenedDescriptionHint:null})},this.state={isShowAddCatalogAssetDrawer:!1,isShowUploadAssetDrawer:!1,assetDescriptions:{},assetIdOfOpenedDescriptionHint:null}}renderAddAssetDrawer(){const{assetsList:e,addAssetFromCatalogDrawerTitle:t,addAssetFromCatalogDrawerHint:n,addAssetFromCatalogDrawerDataType:s,onSearchAssets:i,addAssetFromCatalogDrawerSearchDescription:a,addAssetFromCatalogDrawerTableTitleTitle:r,addAssetFromCatalogDrawerTableRatingTitle:o,addAssetFromCatalogDrawerNothingFoundText:l,uploadedTitle:c}=this.props,u=e.map((e=>e.name));return(0,L.jsx)(II,{drawerTitle:t,hint:n,onClose:this.handleCloseAddCatalogAssetDrawer,dataType:s,onSearchAssets:i,searchDescription:a,tableTitleTitle:r,tableRatingTitle:o,nothingFoundText:l,onAddAssets:this.handleAddAssets,alreadyPresentedAssets:u,uploadedTitle:c})}renderUploadAssetDrawer(){const{uploadAssetDrawerTitle:e,uploadAssetDrawerHint:t,uploadAssetSelectLabel:n,uploadAssetDrawerDataType:s,uploadAssetDrawerUploadButtonTitle:i}=this.props;return(0,L.jsx)(LI,{drawerTitle:e,hint:t,selectLabel:n,uploadButtonTitle:i,onUpload:this.handleUploadAsset,onClose:this.handleCloseUploadAssetDrawer,dataType:s})}renderToolbar(){const{addButtonTitle:e,uploadButtonTitle:t}=this.props;return(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:e,children:(0,L.jsx)(Ue,{onClick:this.handleOpenAddCatalogAssetDrawer,"data-test-id":"asset-drawer-add-asset-button",children:e})}),(0,L.jsx)(_s,{title:t,children:(0,L.jsx)(Ue,{onClick:this.handleOpenUploadAssetDrawer,"data-test-id":"asset-drawer-upload-asset-button",children:t})})]})}renderDrawerContents(){const{headText:e}=this.props;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(as,{children:e}),this.renderToolbar(),this.renderAssetsList()]})}renderTitleColumn(e){const{uploadedTitle:t}=this.props,{assetDescriptions:n,assetIdOfOpenedDescriptionHint:s}=this.state,i=n[e.id];return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(TI,{asset:e,uploadedTitle:t}),!e.isUploaded&&(0,L.jsxs)(U.Fragment,{children:[" ",(0,L.jsxs)(An,{visible:e.id===s,target:(0,L.jsx)(fe,{icon:"circle-info",onClick:()=>this.handleLoadAssetInfo(e.id)}),onClose:this.handleCloseAssetDescriptionHint,children:[void 0===i&&(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"manage-sets.loadingAssetDescription"})}),void 0!==i&&(0,L.jsx)(Wn,{children:i})]})]})]})}renderAssetsList(){const{assetsList:e,isAssetProcessing:t,onRemoveAsset:n,onChangeAssetActivationStatus:s,blockedPlugins:i}=this.props;if(0===e.length)return(0,L.jsxs)(as,{children:[(0,L.jsx)("br",{}),(0,L.jsx)(Ac,{content:"manage-sets.noItems"})]});const a=[{key:"title",title:(0,L.jsx)(Ac,{content:"list.sets.assetName"}),render:e=>(0,L.jsxs)(U.Fragment,{children:[e.isBlocked&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"controllers.index.install-plugin.pluginBlacklistedError"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:16})})," ",e.title]})},{key:"state",title:"State",render:e=>e.isBlocked?(0,L.jsx)(Ac,{content:"list.sets.blocked-plugin-state"}):(0,L.jsx)(Nr,{checked:e.asset.active,"data-test-id":"toggle-asset-activation-status","data-asset-name":e.asset.name,onChange:t=>s(e.asset.id,t),loading:t(e.asset.id)})},{key:"remove",title:"",width:"24px"}],r=e.map((e=>({asset:e,title:this.renderTitleColumn(e),remove:(0,L.jsx)(fe,{icon:"cross-mark",onClick:()=>n(e.id)}),isBlocked:i.includes(e.name)})));return(0,L.jsx)(Wa,{columns:a,data:r})}render(){const{drawerTitle:e,onClose:t,dataType:n}=this.props,{isShowAddCatalogAssetDrawer:s,isShowUploadAssetDrawer:i}=this.state;return(0,L.jsxs)(zi,{title:e,onClose:t,"data-type":n,isOpen:!0,children:[this.renderDrawerContents(),s&&this.renderAddAssetDrawer(),i&&this.renderUploadAssetDrawer()]})}}MI.propTypes={assetsList:Vt().array.isRequired,drawerTitle:Vt().string.isRequired,onClose:Vt().func.isRequired,dataType:Vt().string.isRequired,headText:Vt().string.isRequired,addButtonTitle:Vt().string.isRequired,uploadButtonTitle:Vt().string.isRequired,addAssetFromCatalogDrawerTitle:Vt().node.isRequired,addAssetFromCatalogDrawerHint:Vt().node.isRequired,addAssetFromCatalogDrawerDataType:Vt().string.isRequired,isAssetProcessing:Vt().func.isRequired,onChangeAssetActivationStatus:Vt().func.isRequired,onSearchAssets:Vt().func.isRequired,onRemoveAsset:Vt().func.isRequired,onAddAssets:Vt().func.isRequired,addAssetFromCatalogDrawerSearchDescription:Vt().node.isRequired,addAssetFromCatalogDrawerTableTitleTitle:Vt().node.isRequired,addAssetFromCatalogDrawerTableRatingTitle:Vt().node.isRequired,addAssetFromCatalogDrawerNothingFoundText:Vt().node.isRequired,uploadAssetDrawerTitle:Vt().node.isRequired,uploadAssetDrawerHint:Vt().node.isRequired,uploadAssetSelectLabel:Vt().node.isRequired,uploadAssetDrawerUploadButtonTitle:Vt().node.isRequired,uploadAssetDrawerDataType:Vt().string.isRequired,onUpload:Vt().func.isRequired,getAssetDescription:Vt().func.isRequired,uploadedTitle:Vt().node.isRequired,blockedPlugins:Vt().array.isRequired};const AI=(0,so.$j)((e=>({blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})))(MI);class EI extends U.Component{constructor(e){super(e),this.handleOpenAddDrawer=()=>this.setState({isShowAddDrawer:!0}),this.handleRemoveAsset=e=>this.props.onRemoveAsset(e),this.handleCloseAddDrawer=()=>{this.setState({isShowAddDrawer:!1})},this.state={isShowAddDrawer:!1}}renderAddAssetDrawer(){const{addAssetDrawerDataType:e,addAssetDrawerTitle:t,addAssetDrawerHeadText:n,addAssetDrawerAddButtonTitle:s,addAssetDrawerUploadButtonTitle:i,assetsList:a,addAssetFromCatalogDrawerTitle:r,addAssetFromCatalogDrawerHint:o,addAssetFromCatalogDrawerDataType:l,onSearchAssets:c,onAddAssets:u,isAssetProcessing:d,onChangeAssetActivationStatus:p,addAssetFromCatalogDrawerSearchDescription:h,addAssetFromCatalogDrawerTableTitleTitle:m,addAssetFromCatalogDrawerTableRatingTitle:f,addAssetFromCatalogDrawerNothingFoundText:g,uploadAssetDrawerTitle:b,uploadAssetDrawerHint:v,uploadAssetSelectLabel:y,uploadAssetDrawerUploadButtonTitle:_,uploadAssetDrawerDataType:x,onUpload:S,getAssetDescription:w,uploadedTitle:k}=this.props;return(0,L.jsx)(AI,{drawerTitle:t,headText:n,addButtonTitle:s,uploadButtonTitle:i,onClose:this.handleCloseAddDrawer,dataType:e,assetsList:a,addAssetFromCatalogDrawerTitle:r,addAssetFromCatalogDrawerHint:o,addAssetFromCatalogDrawerDataType:l,onSearchAssets:c,onRemoveAsset:this.handleRemoveAsset,onAddAssets:u,isAssetProcessing:d,onChangeAssetActivationStatus:p,addAssetFromCatalogDrawerSearchDescription:h,addAssetFromCatalogDrawerTableTitleTitle:m,addAssetFromCatalogDrawerTableRatingTitle:f,addAssetFromCatalogDrawerNothingFoundText:g,uploadAssetDrawerTitle:b,uploadAssetDrawerHint:v,uploadAssetSelectLabel:y,uploadAssetDrawerUploadButtonTitle:_,uploadAssetDrawerDataType:x,onUpload:S,getAssetDescription:w,uploadedTitle:k})}renderAddAssetAction(){const{setId:e,setType:t,addActionTitle:n,isUnpaid:s}=this.props;return(0,L.jsx)(wn,{onClick:this.handleOpenAddDrawer,"data-test-set-id":e,"data-test-set-type":t,"data-test-set-action":"button-add-asset",disabled:s,children:n})}renderAssetTitle(e){const{uploadedTitle:t}=this.props;return e.isUploaded?(0,L.jsx)(U.Fragment,{children:(0,L.jsx)(TI,{asset:e,uploadedTitle:t})}):e.title}renderAssetsList(e){const{isUnpaid:t,blockedPlugins:n}=this.props,s=[{key:"title",title:(0,L.jsx)(Ac,{content:"list.sets.assetName"}),render:e=>(0,L.jsxs)(U.Fragment,{children:[e.isBlocked&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.blacklistedPluginHint"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:16})})," ",e.title]})},{key:"remove",title:"",width:"24px"}],i=e.map((e=>({key:e.id,isBlocked:n.includes(e.name),title:this.renderAssetTitle(e),remove:(0,L.jsx)(Ue,{ghost:!0,icon:"cross-mark",onClick:()=>this.handleRemoveAsset(e.id),disabled:t})})));return(0,L.jsx)(Wa,{columns:s,data:i,vertical:!1})}renderAssetColumn(){const{assetsList:e,isExpanded:t,onToggleExpanded:n}=this.props;return 1===e.length?(0,L.jsxs)(U.Fragment,{children:[e[0].title," [",this.renderAddAssetAction()," ]"]}):e.length>1?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(fe,{onClick:n,children:(0,L.jsx)(Ac,{content:"list.sets.itemsSetCount",params:{total:e.length}})})," [",this.renderAddAssetAction()," ]",t&&this.renderAssetsList(e)]}):this.renderAddAssetAction()}render(){const{isShowAddDrawer:e}=this.state;return(0,L.jsxs)(U.Fragment,{children:[e&&this.renderAddAssetDrawer(),this.renderAssetColumn()]})}}EI.propTypes={setId:Vt().number.isRequired,setType:Vt().string.isRequired,assetsList:Vt().array.isRequired,isExpanded:Vt().bool,onToggleExpanded:Vt().func.isRequired,addActionTitle:Vt().node.isRequired,addAssetDrawerDataType:Vt().node.isRequired,addAssetDrawerTitle:Vt().node.isRequired,addAssetDrawerHeadText:Vt().node.isRequired,addAssetDrawerAddButtonTitle:Vt().node.isRequired,addAssetDrawerUploadButtonTitle:Vt().node.isRequired,addAssetFromCatalogDrawerHint:Vt().node.isRequired,addAssetFromCatalogDrawerTitle:Vt().node.isRequired,isAssetProcessing:Vt().func.isRequired,onChangeAssetActivationStatus:Vt().func.isRequired,addAssetFromCatalogDrawerDataType:Vt().string.isRequired,onSearchAssets:Vt().func.isRequired,onAddAssets:Vt().func.isRequired,onRemoveAsset:Vt().func.isRequired,addAssetFromCatalogDrawerSearchDescription:Vt().node.isRequired,addAssetFromCatalogDrawerTableTitleTitle:Vt().node.isRequired,addAssetFromCatalogDrawerTableRatingTitle:Vt().node.isRequired,addAssetFromCatalogDrawerNothingFoundText:Vt().node.isRequired,uploadAssetDrawerTitle:Vt().node.isRequired,uploadAssetDrawerHint:Vt().node.isRequired,uploadAssetSelectLabel:Vt().node.isRequired,uploadAssetDrawerUploadButtonTitle:Vt().node.isRequired,uploadAssetDrawerDataType:Vt().string.isRequired,onUpload:Vt().func.isRequired,getAssetDescription:Vt().func.isRequired,isUnpaid:Vt().bool.isRequired,uploadedTitle:Vt().node.isRequired,blockedPlugins:Vt().array},EI.defaultProps={isExpanded:!1,blockedPlugins:[]};const UI=EI,RI=e=>{const{onSubmitRemove:t,onCancelRemove:n,buttonSubmitTitle:s,buttonCancelTitle:i,confirmationText:a}=e;return(0,L.jsx)(ji,{isOpen:!0,buttons:(0,L.jsx)(Ue,{onClick:t,children:s}),size:"sm",onClose:n,cancelTitle:i,children:a})};class NI extends U.Component{constructor(e){super(e),this.handleRemoveSetClick=()=>this.setState({showRemoveSetConfirmation:!0}),this.handleCloseRemoveSetConfirmation=()=>{this.setState({showRemoveSetConfirmation:!1})},this.handleRemoveAllPluginsClick=()=>this.setState({showRemoveAllPluginsConfirmation:!0}),this.handleCloseRemoveAllPluginsConfirmation=()=>{this.setState({showRemoveAllPluginsConfirmation:!1})},this.handleRemoveAllThemesClick=()=>this.setState({showRemoveAllThemesConfirmation:!0}),this.handleCloseRemoveAllThemesConfirmation=()=>{this.setState({showRemoveAllThemesConfirmation:!1})},this.handleSubmitRemoveSet=()=>{const{onSubmitRemoveSet:e}=this.props;this.setState({showRemoveSetConfirmation:!1}),e()},this.handleSubmitRemoveAllPlugins=()=>{const{onSubmitRemoveAllPlugins:e}=this.props;this.setState({showRemoveAllPluginsConfirmation:!1}),e()},this.handleSubmitRemoveAllThemes=()=>{const{onSubmitRemoveAllThemes:e}=this.props;this.setState({showRemoveAllThemesConfirmation:!1}),e()},this.state={showRemoveSetConfirmation:!1,showRemoveAllPluginsConfirmation:!1,showRemoveAllThemesConfirmation:!1}}renderRemoveSetConfirmationDialog(){return(0,L.jsx)(RI,{onSubmitRemove:this.handleSubmitRemoveSet,onCancelRemove:this.handleCloseRemoveSetConfirmation,buttonSubmitTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveSetConfirmationYes"}),buttonCancelTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveSetConfirmationNo"}),confirmationText:(0,L.jsx)(Ac,{content:"list.sets.RemoveSetConfirmationDescription"})})}renderRemoveAllPluginsConfirmationDialog(){return(0,L.jsx)(RI,{onSubmitRemove:this.handleSubmitRemoveAllPlugins,onCancelRemove:this.handleCloseRemoveAllPluginsConfirmation,buttonSubmitTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveAllPluginsConfirmationYes"}),buttonCancelTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveAllPluginsConfirmationNo"}),confirmationText:(0,L.jsx)(Ac,{content:"list.sets.RemoveAllPluginsConfirmationDescription"})})}renderRemoveAllThemesConfirmationDialog(){return(0,L.jsx)(RI,{onSubmitRemove:this.handleSubmitRemoveAllThemes,onCancelRemove:this.handleCloseRemoveAllThemesConfirmation,buttonSubmitTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveAllThemesConfirmationYes"}),buttonCancelTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveAllThemesConfirmationNo"}),confirmationText:(0,L.jsx)(Ac,{content:"list.sets.RemoveAllThemesConfirmationDescription"})})}render(){const{set:e,instances:t,onInstallSetInto:n,isUnpaid:s}=this.props,{showRemoveSetConfirmation:i,showRemoveAllPluginsConfirmation:a,showRemoveAllThemesConfirmation:r}=this.state,o=[];t.length>0&&(e.plugins.length>0||e.themes.length>0)&&(o.push((0,L.jsx)(ft,{onClick:()=>n(),children:(0,L.jsx)(Ac,{content:"list.sets.installInto"})},"installInto")),o.push((0,L.jsx)(ht,{},"divider-1")));const l=e.plugins.length>0,c=e.themes.length>0;(l||c)&&(l&&o.push((0,L.jsx)(ft,{onClick:this.handleRemoveAllPluginsClick,disabled:s,children:(0,L.jsx)(Ac,{content:"list.sets.removeAllPlugins"})},"removeAllPlugins")),c&&o.push((0,L.jsx)(ft,{onClick:this.handleRemoveAllThemesClick,disabled:s,children:(0,L.jsx)(Ac,{content:"list.sets.removeAllThemes"})},"removeAllThemes")),o.push((0,L.jsx)(ht,{},"divider-2"))),o.push((0,L.jsx)(ft,{onClick:this.handleRemoveSetClick,disabled:s,children:(0,L.jsx)(Ac,{content:"list.sets.removeSet"})},"removeSet"));const u=(0,L.jsx)(Nn,{children:o});return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(RD,{menu:u}),i&&this.renderRemoveSetConfirmationDialog(),a&&this.renderRemoveAllPluginsConfirmationDialog(),r&&this.renderRemoveAllThemesConfirmationDialog()]})}}NI.propTypes={set:Vt().shape({plugins:Vt().array,themes:Vt().array}).isRequired,instances:Vt().array,onInstallSetInto:Vt().func.isRequired,onSubmitRemoveSet:Vt().func.isRequired,onSubmitRemoveAllThemes:Vt().func.isRequired,onSubmitRemoveAllPlugins:Vt().func.isRequired,isUnpaid:Vt().bool.isRequired},NI.defaultProps={instances:[]};const FI=(0,so.$j)((e=>({instances:e.sets.instances})),null)(NI);class YI extends U.Component{constructor(e){super(e),this.handleRefresh=()=>{const{sets:e,setsActions:{getSetsList:t}}=this.props;e||this.setState({isSetsListLoading:!0}),t().finally((()=>{this.setState({isSetsListLoading:!1})}))},this.handleShowRemoveSetsConfirmation=()=>{this.setState({isShowRemoveSetsConfirmation:!0})},this.handleCloseRemoveSetsConfirmation=()=>{this.setState({isShowRemoveSetsConfirmation:!1})},this.handleSubmitRemoveSets=()=>{const{setsActions:{removeSets:e},appActions:{addSuccessMessage:t}}=this.props,n=this.getSelectedSetIdsForAction();null!==n&&e(n).then((()=>t((0,L.jsx)(Ac,{content:"controllers.index.remove-set.removeSuccess"})))).finally((()=>{this.resetSelection(),this.handleCloseRemoveSetsConfirmation()}))},this.handleRemove=()=>{null!==this.getSelectedSetIdsForAction()&&this.handleShowRemoveSetsConfirmation()},this.handleAdd=()=>{this.setState({isShowCreateSetDrawer:!0,addSetName:""})},this.handleAddSetNameChange=e=>{this.setState({addSetName:e})},this.handleCloseAddDrawer=()=>{this.setState({isShowCreateSetDrawer:!1,formErrors:null})},this.handleSubmitAdd=()=>{const{setsActions:{addSet:e},appActions:{addSuccessMessage:t}}=this.props,{addSetName:n,isAdding:s}=this.state;s||this.setState({formErrors:null,isAdding:!0},(()=>{e(n).then((e=>{e.status===su&&e.data&&e.data.formErrors?this.setState({formErrors:e.data.formErrors}):e.status===nu&&(t((0,L.jsx)(Ac,{content:"controllers.index.add-set.addSuccess"})),this.setState({isShowCreateSetDrawer:!1}))})).finally((()=>this.setState({isAdding:!1})))}))},this.handleSelectionChange=e=>{this.setState({selectedSetIds:e})},this.resetSelection=()=>{this.setState({selectedSetIds:[]})},this.handleSortChange=({sortColumn:e,sortDirection:t})=>{this.setState({sortColumn:e,sortDirection:t})},this.renderToolbar=()=>(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"list.sets.buttonAdd"}),children:(0,L.jsx)(Ue,{onClick:this.handleAdd,"data-test-id":"toolbar-create-button",disabled:this.props.isUnpaid,children:(0,L.jsx)(Ac,{content:"list.sets.buttonAdd"})})}),(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"list.sets.buttonRemove"}),children:(0,L.jsx)(Ue,{onClick:this.handleRemove,"data-test-id":"toolbar-remove-button",disabled:this.props.isUnpaid,children:(0,L.jsx)(Ac,{content:"list.sets.buttonRemove"})})})]}),this.handleInPlaceRenameSetNameChanged=e=>{this.setState({inPlaceRenameSetName:e.target.value})},this.handleCloseInPlaceRename=()=>{this.setState({inPlaceRenameOpenedSetId:null,inPlaceRenameSetName:""})},this.handleInPlaceRename=()=>{const{sets:e,setsActions:{renameSet:t},appActions:{addSuccessMessage:n}}=this.props,{inPlaceRenameOpenedSetId:s,inPlaceRenameSetName:i}=this.state;e.find((e=>e.id===s)).name.trim()===i.trim()?this.handleCloseInPlaceRename():t(s,i).then((e=>{e.status===nu&&(this.handleCloseInPlaceRename(),n((0,L.jsx)(Ac,{content:"manage-sets.setRenamedSuccessfully"})))}))},this.handleInPlaceRenameKeyDown=e=>{"Enter"===e.key&&this.isInPlaceRenameCanBeSubmitted()?this.handleInPlaceRename():"Escape"===e.key&&this.handleInPlaceRenameCancel()},this.handleSearchPlugins=e=>{const{setsActions:{searchPlugins:t}}=this.props;return t(e).then((e=>e&&e.data&&e.data.plugins?e.data.plugins:null))},this.handleSearchThemes=e=>{const{setsActions:{searchThemes:t}}=this.props;return t(e).then((e=>e&&e.data&&e.data.themes?e.data.themes:null))},this.handleAddPlugins=(e,t)=>{const{setsActions:{addPluginsToSet:n},appActions:{addSuccessMessage:s}}=this.props;return n(e,t).then((e=>(e.status===nu&&s((0,L.jsx)(Ac,{content:"manage-sets.pluginAddedToSet"})),e)))},this.handleChangePluginActivationStatus=(e,t,n)=>{const{setsActions:{setPluginActivationState:s},appActions:{addSuccessMessage:i}}=this.props;return s(e,t,n).then((e=>(e.status===nu&&i(n?(0,L.jsx)(Ac,{content:"manage-sets.pluginWasActivatedByDefaultForSet"}):(0,L.jsx)(Ac,{content:"manage-sets.pluginWasDeactivatedByDefaultForSet"})),e)))},this.handleChangeThemeActivationStatus=(e,t,n)=>{const{setsActions:{setThemeActivationState:s},appActions:{addSuccessMessage:i}}=this.props;return s(e,t,n).then((e=>(e.status===nu&&i(n?(0,L.jsx)(Ac,{content:"manage-sets.themeWasActivatedByDefaultForSet"}):(0,L.jsx)(Ac,{content:"manage-sets.themeWasDeactivatedByDefaultForSet"})),e)))},this.handleAddThemes=(e,t)=>{const{setsActions:{addThemesToSet:n},appActions:{addSuccessMessage:s}}=this.props;return n(e,t).then((e=>(e.status===nu&&s((0,L.jsx)(Ac,{content:"manage-sets.themeAddedToSet"})),e)))},this.handleSubmitUploadPlugin=(e,t)=>{const{setsActions:{uploadPlugin:n},appActions:{addSuccessMessage:s}}=this.props;return n(e,t).then((e=>(e.status===nu&&s((0,L.jsx)(Ac,{content:"manage-sets.pluginUploadedToSet"})),e)))},this.handleSubmitUploadTheme=(e,t)=>{const{setsActions:{uploadTheme:n},appActions:{addSuccessMessage:s}}=this.props;return n(e,t).then((e=>(e.status===nu&&s((0,L.jsx)(Ac,{content:"manage-sets.themeUploadedToSet"})),e)))},this.handleRemovePlugin=(e,t)=>{const{setsActions:{removePluginFromSet:n},appActions:{addSuccessMessage:s}}=this.props;return n(e,t).then((e=>(e.status===nu&&s((0,L.jsx)(Ac,{content:"manage-sets.pluginRemovedFromSet"})),e)))},this.handleRemoveTheme=(e,t)=>{const{setsActions:{removeThemeFromSet:n},appActions:{addSuccessMessage:s}}=this.props;return n(e,t).then((e=>(e.status===nu&&s((0,L.jsx)(Ac,{content:"manage-sets.themeRemovedFromSet"})),e)))},this.handleRemoveSet=e=>{const{setsActions:{removeSet:t},appActions:{addSuccessMessage:n}}=this.props;t(e.id).then((t=>{t.status===nu&&n((0,L.jsx)(Ac,{content:"manage-sets.setRemoved",params:{setName:e.name}}))}))},this.handleRemoveAllPlugins=e=>{const{setsActions:{removeAllPluginsFromSet:t},appActions:{addSuccessMessage:n}}=this.props;t(e.id).then((t=>{t.status===nu&&n((0,L.jsx)(Ac,{content:"manage-sets.allPluginsRemovedFromSet",params:{setName:e.name}}))}))},this.handleRemoveAllThemes=e=>{const{setsActions:{removeAllThemesFromSet:t},appActions:{addSuccessMessage:n}}=this.props;t(e.id).then((t=>{t.status===nu&&n((0,L.jsx)(Ac,{content:"manage-sets.allThemesRemovedFromSet",params:{setName:e.name}}))}))},this.renderMenu=e=>(0,L.jsx)(FI,{set:e,onInstallSetInto:()=>this.setState({showSelectInstances:!0,selectedSet:e}),onSubmitRemoveSet:()=>this.handleRemoveSet(e),onSubmitRemoveAllPlugins:()=>this.handleRemoveAllPlugins(e),onSubmitRemoveAllThemes:()=>this.handleRemoveAllThemes(e),isUnpaid:this.props.isUnpaid}),this.handleSubmitInstall=e=>(this.setState({showSelectInstances:!1}),this.props.setsActions.installSetInto(this.state.selectedSet.id,e)),this.state={isSetsListLoading:!1,isShowCreateSetDrawer:!1,isShowRemoveSetsConfirmation:!1,formErrors:null,addSetName:"",selectedSetIds:[],expandedPlugins:{},expandedThemes:{},inPlaceRenameOpenedSetId:null,inPlaceRenameSetName:"",sortColumn:null,sortDirection:"ASC",showSelectInstances:!1,selectedSet:null,isAdding:!1}}componentWillMount(){this.handleRefresh()}getSelectedSetIdsForAction(){const{appActions:{addWarningMessage:e}}=this.props,{selectedSetIds:t}=this.state;return 0===t.length?(e((0,L.jsx)(Ac,{content:"lists.noItemsSelectedToast"})),null):t}renderAddDrawer(){const{addSetName:e,formErrors:t,isAdding:n}=this.state,s={onSubmit:this.handleSubmitAdd,applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"manage-sets.buttonCreate"}),"data-test-id":"create-set-drawer-create-button",state:n?"loading":"active",disabled:n},cancelButton:{disabled:n}};return(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"manage-sets.titleCreateSet"}),"data-type":"select-instances",onClose:this.handleCloseAddDrawer,isOpen:!0,form:s,children:[(0,L.jsxs)(as,{children:[!1,(0,L.jsx)(Ac,{content:"manage-sets.hintCreateSet"})]}),(0,L.jsx)(ga,{"data-test-id":"create-set-drawer-name-input",label:(0,L.jsx)(Ac,{content:"manage-sets.name"}),value:e,errors:t&&t.hasOwnProperty("name")?t.name:void 0,required:!0,size:"lg",onChange:this.handleAddSetNameChange})]})}openInPlaceSetNameEdit(e){this.setState({inPlaceRenameOpenedSetId:e.id,inPlaceRenameSetName:e.name})}handleInPlaceRenameCancel(){this.handleCloseInPlaceRename()}isInPlaceRenameCanBeSubmitted(){const{inPlaceRenameSetName:e}=this.state;return e.trim().length>0}renderSetNameColumn(e){const{isUnpaid:t}=this.props,{inPlaceRenameOpenedSetId:n,inPlaceRenameSetName:s}=this.state;return e.id===n?(0,L.jsxs)("div",{style:{whiteSpace:"nowrap"},children:[(0,L.jsx)(vn,{value:s,onChange:this.handleInPlaceRenameSetNameChanged,onKeyDown:this.handleInPlaceRenameKeyDown})," ",(0,L.jsx)(Ue,{icon:"check-mark",disabled:!this.isInPlaceRenameCanBeSubmitted(),onClick:this.handleInPlaceRename})]}):(0,L.jsx)(wn,{onClick:()=>this.openInPlaceSetNameEdit(e),"data-test-set-id":e.id,disabled:t,children:(0,L.jsx)("span",{style:{borderBottom:"1px dashed"},children:e.name})})}toggleExpandedPlugins(e){this.setState((t=>({expandedPlugins:Object.assign(Object.assign({},t.expandedPlugins),{[e]:!t.expandedPlugins[e]})})))}toggleExpandedThemes(e){this.setState((t=>({expandedThemes:Object.assign(Object.assign({},t.expandedThemes),{[e]:!t.expandedThemes[e]})})))}renderRemoveSetsConfirmation(){return(0,L.jsx)(RI,{onSubmitRemove:this.handleSubmitRemoveSets,onCancelRemove:this.handleCloseRemoveSetsConfirmation,buttonSubmitTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveSetConfirmationYes"}),buttonCancelTitle:(0,L.jsx)(Ac,{content:"list.sets.RemoveSetConfirmationNo"}),confirmationText:(0,L.jsx)(Ac,{content:"list.sets.ConfirmRemove"})})}filterSets(e){const{search:t}=this.props;if(!t||""===t.trim())return e;const n=t.trim().toLowerCase();return e.filter((e=>-1!==e.name.toLowerCase().indexOf(n)))}renderSetsList(){const{sets:e,setsActions:{getPluginDescription:t,getThemeDescription:n},isUnpaid:s,blockedPlugins:i}=this.props,{isShowRemoveSetsConfirmation:a,isShowCreateSetDrawer:r,selectedSetIds:o,expandedPlugins:l,expandedThemes:c,sortColumn:u,sortDirection:d,showSelectInstances:p}=this.state,h=[{key:"name",title:(0,L.jsx)(Ac,{content:"list.sets.sets"}),width:"20%",sortable:!0,sort:(e,t)=>e.rawName.localeCompare(t.rawName),render:e=>(0,L.jsxs)(U.Fragment,{children:[e.containsBlockedAsset&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"list.sets.hasBlockedPlugin"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:16})})," ",e.name]})},{key:"plugins",title:(0,L.jsx)(Ac,{content:"list.sets.plugins"}),width:"40%"},{key:"themes",title:(0,L.jsx)(Ac,{content:"list.sets.themes"}),width:"40%"},{key:"menu",title:""}],m=e=>e.plugins.map((e=>e.name)).filter((e=>i.includes(e))).length>0,f=this.filterSets(e).map((e=>({key:e.id,rawName:e.name,name:this.renderSetNameColumn(e),containsBlockedAsset:m(e),plugins:(0,L.jsx)(UI,{setId:parseInt(e.id),setType:"plugin",assetsList:e.plugins,isExpanded:l[e.id],onToggleExpanded:()=>this.toggleExpandedPlugins(e.id),isAssetProcessing:t=>e.plugins.some((({id:e,isProcessing:n})=>e===t&&n)),addActionTitle:(0,L.jsx)(Ac,{content:"list.sets.buttonAddPlugin"}),addAssetDrawerDataType:"add-plugin-drawer",addAssetDrawerTitle:(0,L.jsx)(Ac,{content:"manage-sets.managePluginsTitle",params:{name:e.name}}),addAssetDrawerHeadText:(0,L.jsx)(Ac,{content:"manage-sets.headDescriptionSetCurrentPlugins"}),addAssetDrawerAddButtonTitle:(0,L.jsx)(Ac,{content:"manage-sets.addPlugin"}),addAssetDrawerUploadButtonTitle:(0,L.jsx)(Ac,{content:"manage-sets.uploadPlugin"}),addAssetFromCatalogDrawerTitle:(0,L.jsx)(Ac,{content:"manage-sets.titleAddPluginSet",params:{name:e.name}}),addAssetFromCatalogDrawerHint:(0,L.jsx)(Ac,{content:"manage-sets.hintAddPluginSet"}),addAssetFromCatalogDrawerDataType:"add-plugin-from-catalog-drawer",onSearchAssets:e=>this.handleSearchPlugins(e),onAddAssets:t=>this.handleAddPlugins(e.id,t),onChangeAssetActivationStatus:(t,n)=>this.handleChangePluginActivationStatus(e.id,t,n),onRemoveAsset:t=>this.handleRemovePlugin(e.id,t),addAssetFromCatalogDrawerSearchDescription:(0,L.jsx)(Ac,{content:"manage-sets.tryToSearchPlugins"}),addAssetFromCatalogDrawerTableTitleTitle:(0,L.jsx)(Ac,{content:"manage-sets.fieldName"}),addAssetFromCatalogDrawerTableRatingTitle:(0,L.jsx)(Ac,{content:"manage-sets.fieldRating"}),addAssetFromCatalogDrawerNothingFoundText:(0,L.jsx)(Ac,{content:"manage-sets.noItems"}),uploadAssetDrawerTitle:(0,L.jsx)(Ac,{content:"manage-sets.uploadPlugin"}),uploadAssetDrawerHint:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.selectSetDescription"}),uploadAssetSelectLabel:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.selectLabel"}),uploadAssetDrawerUploadButtonTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.buttonUpload"}),uploadAssetDrawerDataType:"upload-asset",onUpload:t=>this.handleSubmitUploadPlugin(t,e.id),getAssetDescription:t,isUnpaid:s,uploadedTitle:(0,L.jsx)(Ac,{content:"manage-sets.customPlugin"}),blockedPlugins:i}),themes:(0,L.jsx)(UI,{setId:parseInt(e.id),setType:"theme",assetsList:e.themes,isExpanded:c[e.id],isAssetProcessing:()=>e.themes.some((({isProcessing:e})=>e)),onToggleExpanded:()=>this.toggleExpandedThemes(e.id),addActionTitle:(0,L.jsx)(Ac,{content:"list.sets.buttonAddTheme"}),addAssetDrawerDataType:"add-theme-drawer",addAssetDrawerTitle:(0,L.jsx)(Ac,{content:"manage-sets.manageThemesTitle",params:{name:e.name}}),addAssetDrawerHeadText:(0,L.jsx)(Ac,{content:"manage-sets.headDescriptionSetCurrentThemes"}),addAssetDrawerAddButtonTitle:(0,L.jsx)(Ac,{content:"manage-sets.addTheme"}),addAssetDrawerUploadButtonTitle:(0,L.jsx)(Ac,{content:"manage-sets.uploadTheme"}),addAssetFromCatalogDrawerTitle:(0,L.jsx)(Ac,{content:"manage-sets.titleAddThemeSet",params:{name:e.name}}),addAssetFromCatalogDrawerHint:(0,L.jsx)(Ac,{content:"manage-sets.hintAddThemeSet"}),addAssetFromCatalogDrawerDataType:"add-theme-from-catalog-drawer",onSearchAssets:e=>this.handleSearchThemes(e),onChangeAssetActivationStatus:(t,n)=>this.handleChangeThemeActivationStatus(e.id,t,n),onAddAssets:t=>this.handleAddThemes(e.id,t),onRemoveAsset:t=>this.handleRemoveTheme(e.id,t),addAssetFromCatalogDrawerSearchDescription:(0,L.jsx)(Ac,{content:"manage-sets.tryToSearchThemes"}),addAssetFromCatalogDrawerTableTitleTitle:(0,L.jsx)(Ac,{content:"manage-sets.fieldName"}),addAssetFromCatalogDrawerTableRatingTitle:(0,L.jsx)(Ac,{content:"manage-sets.fieldRating"}),addAssetFromCatalogDrawerNothingFoundText:(0,L.jsx)(Ac,{content:"manage-sets.noItems"}),uploadAssetDrawerTitle:(0,L.jsx)(Ac,{content:"manage-sets.uploadTheme"}),uploadAssetDrawerHint:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.selectSetDescription"}),uploadAssetSelectLabel:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.selectLabel"}),uploadAssetDrawerUploadButtonTitle:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.buttonUpload"}),uploadAssetDrawerDataType:"upload-theme-drawer",onUpload:t=>this.handleSubmitUploadTheme(t,e.id),getAssetDescription:n,isUnpaid:s,uploadedTitle:(0,L.jsx)(Ac,{content:"manage-sets.customTheme"})}),menu:this.renderMenu(e)})));return(0,L.jsxs)(U.Fragment,{children:[a&&this.renderRemoveSetsConfirmation(),r&&this.renderAddDrawer(),this.renderToolbar(),p&&this.renderShowSelectInstances(),(0,L.jsx)(dC,{columns:h,data:f,selection:o,onSelectionChange:this.handleSelectionChange,onSortChange:this.handleSortChange,sortColumn:u,sortDirection:d})]})}renderShowSelectInstances(){return(0,L.jsx)(cx,{onCloseDrawer:()=>this.setState({showSelectInstances:!1}),instances:this.props.instances,onSubmitInstall:this.handleSubmitInstall,selectInstancesText:(0,L.jsx)(Ac,{content:"list.sets.selectInstancesHeadDescription"}),instanceNameListTitle:(0,L.jsx)(Ac,{content:"list.sets.selectInstancesInstanceName"}),instanceUrlListTitle:(0,L.jsx)(Ac,{content:"list.sets.selectInstancesInstanceUrl"}),drawerTitle:(0,L.jsx)(Ac,{content:"list.sets.selectInstancesDrawerTitle"}),backButton:!0})}renderPaidFeatureDesc(){const{isUnpaid:e,upgradeUrl:t,premiumFeaturesUrl:n}=this.props;return e?(0,L.jsx)(pm,{uatAction:"CLICK_EXT_BUY_FROM_SETS",purchaseLicenseUrl:t,premiumFeaturesUrl:n,children:(0,L.jsx)(Ac,{content:"paidFeature.setsFeatureDescription"})}):null}render(){const{isSetsListLoading:e}=this.state;return(0,L.jsxs)(a_,{activeTab:n_,children:[e&&(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"manage-sets.loading"})}),this.renderPaidFeatureDesc(),!e&&this.renderSetsList()]})}}YI.propTypes={search:Vt().string,sets:Vt().array,instances:Vt().array,setsActions:Vt().shape({resetSetsList:Vt().func.isRequired,getSetsList:Vt().func.isRequired,addSet:Vt().func.isRequired,installSetInto:Vt().func.isRequired,removeSets:Vt().func.isRequired,renameSet:Vt().func.isRequired,addPluginsToSet:Vt().func.isRequired,setPluginActivationState:Vt().func.isRequired,setThemeActivationState:Vt().func.isRequired,addThemesToSet:Vt().func.isRequired,removePluginFromSet:Vt().func.isRequired,removeThemeFromSet:Vt().func.isRequired,uploadPlugin:Vt().func.isRequired,uploadTheme:Vt().func.isRequired,searchPlugins:Vt().func.isRequired,searchThemes:Vt().func.isRequired,removeSet:Vt().func.isRequired,removeAllPluginsFromSet:Vt().func.isRequired,removeAllThemesFromSet:Vt().func.isRequired,getPluginDescription:Vt().func.isRequired,getThemeDescription:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addSuccessMessage:Vt().func.isRequired,addWarningMessage:Vt().func.isRequired}).isRequired,isUnpaid:Vt().bool.isRequired,upgradeUrl:Vt().string.isRequired,premiumFeaturesUrl:Vt().string,blockedPlugins:Vt().array.isRequired},YI.defaultProps={search:"",sets:[],instances:[],premiumFeaturesUrl:null};const BI=(0,so.$j)((e=>({search:e.app.search,sets:e.sets.list,instances:e.sets.instances,isUnpaid:e.app.unpaidFeatures.sets,upgradeUrl:e.app.urls.featuresBuyLinks.sets,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})),(t=>({setsActions:nh(d,t),appActions:nh(e,t),pluginsActions:nh(a,t),themesActions:nh(u,t)})))(YI),HI=Nc(Hx,"serverIds"),VI=Nc(Nx,"scanningServers"),$I=Nc(Fx,"servers"),WI=Nc(Yx),zI=Nc("server/DETACH_FINISHED"),qI=Nc("servers/ACCEPT_FINGERPRINT_FINISHED"),GI=e=>t=>{const n=cO(e);return Sd.detachServers(n).then((({data:e})=>(t(xp(e,(()=>{t(HI(e.data.detachedServers)),t(zI())}))),e)))},KI=e=>t=>Sd.getServer(e).then((({data:e})=>(t(xp(e)),e))),XI=(e,t=!0)=>n=>Sd.acceptFingerprint(e).then((({data:e})=>(t&&n(xp(e)),n(qI()),e))),ZI=e=>t=>{const n=cO(e);return t(VI(e)),Sd.scanServers(n).then((({data:e})=>(t(xp(e,(()=>t(JI(e.data.task))))),e)))},JI=e=>t=>t({type:Ux,task:e}),QI=e=>t=>t({type:Rx,updatedServers:e}),eO=({host:e,login:t,authType:n,password:s="",sshKeyInputType:i="",keyPath:a="",keyPlainText:r="",port:o,pathType:l,path:c=[],scan:u,description:d="",directoriesWithPhpInterpreters:p=[],id:h})=>m=>{const f=new FormData;let g;return g="password"===n?"password":i===Gx?"keyPath":"keyPlainText",f.append("pathType",l),c.forEach(((e,t)=>{f.append(`path[${t}]`,e)})),p.forEach(((e,t)=>{f.append(`directoriesWithPhpInterpreters[${t}]`,e)})),f.append("host",e),f.append("login",t),f.append("authType",g),f.append("password",s),f.append("keyPath",a),f.append("keyPlainText",r),f.append("port",`${o}`),f.append("scan",u),f.append("description",d),h&&f.append("id",`${h}`),Sd.addServer(f).then((({data:e})=>(m(xp(e,(()=>m(tO(e.data.task))))),e)))},tO=e=>t=>t({type:Mx,task:e}),nO=e=>t=>t({type:Ax,server:e}),sO=e=>t=>t({type:Ex,server:e}),iO=()=>e=>e({type:"servers/ADD_SERVER_FINISHED"}),aO=()=>e=>e({type:"servers/ADD_SERVER_FINISHED_WITH_ERROR"}),rO=Nc(Bx),oO=()=>e=>Sd.getServersList().then((({data:t})=>(e(xp(t,(()=>e($I(t.data.servers))))),t))),lO=()=>e=>Sd.disableBetaDialog().then((({data:t})=>(e(xp(t,(()=>e(WI())))),t))),cO=e=>{const t=new FormData;return e.length&&e.forEach(((e,n)=>t.append(`ids[${n}]`,`${e}`))),t},uO=e=>t=>Sd.getInstancesLog(e).then((({data:n})=>(t(xp(n,(()=>t(dO(e,n.data.instancesLog))))),n))),dO=Nc(Wx,"serverId","remoteInstancesLog"),pO=Nc(zx,"serverId");class hO extends U.Component{constructor(){super(...arguments),this.setValueByIndex=(e,t)=>{const{values:n}=this.props;n[t]=e,this.setValues(n)},this.getInputName=()=>{const{name:e}=this.props;return e||(this.props.children.props.name?this.props.children.props.name:null)},this.removeFieldByIndex=e=>{let{values:t}=this.props;t=t.filter(((t,n)=>n!==e)),this.setValues(t)},this.getSingleField=({value:e,index:t})=>{const{baseClassName:n,size:s,disabled:i}=this.props;return(0,L.jsxs)("div",{className:mm()(`${n}__single`),children:[(0,U.cloneElement)(this.props.children,{onChange:e=>this.setValueByIndex(e.target.value,t),name:`${this.getInputName()}[${t}]`,className:mm()({[this.props.children.props.className]:this.props.children.props.className},`${n}--size-${s}`),value:e,size:s,disabled:i}),this.isSeveralFieldsExists()&&(0,L.jsx)(Ue,{className:mm()(`${n}__remove`),icon:"cross-mark",tooltip:(0,L.jsx)(Ac,{content:"remote-servers.serverFormRemoveFieldPath"}),onClick:()=>this.removeFieldByIndex(t),disabled:i})]},t)},this.isAddMoreInactive=()=>{const{values:e,disabled:t}=this.props;return t||0===e.length||e.map((e=>`${e}`)).some((e=>""===e.trim()))},this.isSeveralFieldsExists=()=>this.props.values.length>1,this.addEmptyField=()=>{const{values:e}=this.props;e.push(""),this.setValues(e)},this.setValues=e=>this.props.onChange(e),this.getFields=()=>{const e=[];return this.props.values.forEach(((t,n)=>{e.push(this.getSingleField({value:t,index:n}))})),e.push((0,L.jsx)(fe,{onClick:()=>this.addEmptyField(),className:mm()(`${this.props.baseClassName}__add-more`,{[`${this.props.baseClassName}__add-more-disabled`]:this.isAddMoreInactive()}),children:(0,L.jsx)("small",{children:(0,L.jsx)(Ac,{content:"remote-servers.serverFormAddFieldPath"})})},"add-more")),e}}render(){const e=this.props,{baseClassName:t}=e,n=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["baseClassName"]);return(0,L.jsx)(ui,Object.assign({},n,{children:this.getFields()}))}}hO.propTypes={children:Vt().node.isRequired,values:Vt().array,name:Vt().string,label:Vt().any,disabled:Vt().bool,size:Vt().oneOf(["md","lg","xl","fill"]),baseClassName:Vt().string,onChange:Vt().func.isRequired,errors:Vt().array},hO.defaultProps={values:null,name:null,label:void 0,disabled:!1,size:"md",baseClassName:`${gu}form-field-multiple`,errors:[]};const mO=hO,fO=e=>{const{text:t}=e;if(!t)return null;let n="";return n=(0,U.isValidElement)(t)?t:t.split("\n").map((e=>(0,L.jsxs)("span",{children:[e,(0,L.jsx)("br",{})]},$c(4)))),(0,L.jsx)(as,{children:n})},gO=e=>{const{id:t,text:n,type:s,onAcceptFingerprint:i}=e;return n?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(fO,{text:n}),"fingerprint"===s&&(0,L.jsx)(as,{children:(0,L.jsx)(fe,{onClick:e=>i(e,t),"data-test-id":"remote-server-form-apply-fingerprint",children:(0,L.jsx)(Ac,{content:"remote-servers.resetPreviousFingerprint"})})})]}):null};gO.propTypes={id:Vt().number,text:Vt().string,type:Vt().string,onAcceptFingerprint:Vt().func},gO.defaultProps={id:null,text:null,type:null,onAcceptFingerprint:()=>{}};const bO=gO;const vO=e=>{var{disabled:t=!1,className:n,baseClassName:s=`${gu}form-field-password`}=e,i=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["disabled","className","baseClassName"]);return(0,L.jsx)(ra,Object.assign({},i,{className:mm()(n,{[`${s}__disabled`]:t})}))},yO=e=>{const{name:t,label:n,"data-test-id":s=null,disabled:i=!1,rows:a=5,cols:r=46,onChange:o}=e;return(0,L.jsx)(ui,{name:t,label:n,"data-test-id":s,disabled:i,onChange:o,children:({getId:e,getName:t,getValue:n,setValue:s})=>(0,L.jsx)("textarea",{id:e(),name:t(),value:n(),rows:a,cols:r,onChange:e=>s(e.target.value),disabled:i})})},_O="host",xO="description",SO="port",wO="login",kO="authType",jO="password",TO="sshKeyInputType",CO="keyPath",DO="keyPlainText",PO="pathType",IO="path",OO="scan",LO="directoriesWithPhpInterpreters";class MO extends U.Component{constructor(){super(...arguments),this.isAuthByPassword=()=>!this.props.values||this.props.values.authType===Xx,this.isInstancePathsAutodetectEnabled=()=>!this.props.values||this.props.values.pathType===Zx,this.getPasswordIndentField=()=>{if(!this.isAuthByPassword())return[];const{values:e,isFormSending:t,onFormFieldChange:n}=this.props,s=e&&e.privateKeyExist;return[(0,L.jsx)(vO,{name:jO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldSshPassword"}),hideShowButton:!0,hideGenerateButton:!0,hidePasswordMeter:!0,required:!s,size:"lg","data-test-id":"remote-server-form-field-password",disabled:t,onChange:e=>n(jO,e)},"password")]},this.getSshKeyInputTypeSelect=(e,t,n)=>{const{values:{sshKeyInputType:s},isFormSending:i}=this.props,a=[(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldKeyPathToKeyFile",component:"option",value:Gx,selected:Gx===s},Gx),(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldKeyEnterKeyManually",component:"option",value:Kx,selected:Kx===s},Kx)];return(0,L.jsx)("select",{id:e(),name:t(),onChange:e=>n(e.target.value),disabled:i,children:a})},this.getKeyIndentField=()=>{if(this.isAuthByPassword())return[];const{values:e,isAuthTypeByKeyPathDisabled:t,isFormSending:n,onFormFieldChange:s}=this.props,i=e&&e.privateKeyExist,a=[];return t||a.push((0,L.jsx)(ui,{name:TO,"data-test-id":"remote-server-form-field-key-input-type",disabled:n,onChange:e=>s(TO,e),children:({getId:e,getName:t,setValue:n})=>this.getSshKeyInputTypeSelect(e,t,n)},TO)),e.sshKeyInputType===Gx&&a.push((0,L.jsx)(ga,{name:CO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldKeyPath"}),required:!i,"data-test-id":"remote-server-form-field-key-path",size:"lg",disabled:n,onChange:e=>s(CO,e)},CO)),e.sshKeyInputType===Kx&&a.push((0,L.jsx)(yO,{name:DO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldKeyPlainText"}),required:!i,"data-test-id":"remote-server-form-field-key-contents",disabled:n,rows:5,cols:46,onChange:e=>s(DO,e)},DO)),a},this.getInstancePathsIndentField=()=>{if(this.isInstancePathsAutodetectEnabled())return[];const{isFormSending:e,onFormFieldChange:t,values:n,errors:s}=this.props;return[(0,L.jsx)(mO,{"data-test-id":"remote-server-form-field-paths",size:"lg",disabled:e,onChange:e=>t(IO,e),values:Gc(n,IO,[""]),errors:Gc(s,IO,[]),children:(0,L.jsx)(vn,{name:IO})},IO)]},this.getBackgroundTaskErrors=e=>{if(!e||!e.publicParams||!e.publicParams.error)return[];const{onAcceptFingerprint:t,values:n}=this.props,{publicParams:{error:{text:s,type:i}}}=e;return[(0,L.jsx)(bO,{id:n.id,onAcceptFingerprint:t,text:s,type:i},i)]},this.getErrorBlock=()=>{const{isDataLoading:e,error:t,backgroundTask:n,values:s,onAcceptFingerprint:i}=this.props;return e||n&&0!==this.getBackgroundTaskErrors(n).length||!t||!t.text?null:(0,L.jsx)(ge,{intent:"danger","data-test-id":"remote-server-form-errors",children:(0,L.jsx)(bO,{id:s.id,text:t.text,type:t.type,onAcceptFingerprint:i})})},this.getSuccessBlock=()=>{const{isDataLoading:e,success:t}=this.props;return e||!t?null:(0,L.jsx)(ge,{intent:"success","data-test-id":"remote-server-form-success",children:t})}}render(){const{values:e,errors:t,isDataLoading:n,isEditServer:s,isFormVisible:i,isAdditionalParametersCollapsible:a,isFormSending:r,onFormFieldChange:o}=this.props,l=e&&e.privateKeyExist;return(0,L.jsxs)("div",{"data-test-id":"remote-server-form",className:bu,children:[n&&(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"remote-servers.serverEditLoading"})}),this.getErrorBlock(),this.getSuccessBlock(),i&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"remote-servers.serverFormSectionSettings"}),children:[(0,L.jsx)(ga,{name:_O,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldHost"}),size:"lg",required:!0,"data-test-id":"remote-server-form-field-host",disabled:r,onChange:e=>o(_O,e)}),(0,L.jsx)(yO,{name:xO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldDescription"}),"data-test-id":"remote-server-form-field-description",disabled:r,rows:5,cols:46,onChange:e=>o(xO,e)}),(0,L.jsx)(ga,{name:SO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldPort"}),size:"lg",required:!0,"data-test-id":"remote-server-form-field-port",disabled:r,onChange:e=>o(SO,e)}),(0,L.jsx)(ga,{name:wO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldSshLogin"}),size:"lg",required:!0,"data-test-id":"remote-server-form-field-login",disabled:r,onChange:e=>o(wO,e)})]}),(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"remote-servers.serverFormSectionAuth"}),children:[(0,L.jsx)(as,{children:(0,L.jsx)(Xs,{children:l?(0,L.jsx)(Ac,{content:"remote-servers.hintServerHasGeneratedSshKey"}):(0,L.jsx)(Ac,{content:"remote-servers.hintSshKeyWillBeGenerated"})})}),(0,L.jsx)(oa,{name:kO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldAuthType"}),options:[{label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldAuthTypePassword","data-test-id":"remote-server-form-field-auth-password"}),value:Xx,indentFields:this.getPasswordIndentField()},{label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldAuthTypeKey","data-test-id":"remote-server-form-field-auth-key"}),value:"key",indentFields:this.getKeyIndentField()}],onChange:e=>o(kO,e),disabled:r,value:e.authType})]}),(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"remote-servers.serverFormSectionInstances"}),children:[(0,L.jsx)(oa,{name:PO,label:" ",options:[{label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldPathTypeAutodetect","data-test-id":"remote-server-form-field-path-type-autodetect"}),value:Zx},{label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldPathTypePaths","data-test-id":"remote-server-form-field-path-type-paths"}),value:Jx,indentFields:this.getInstancePathsIndentField()}],onChange:e=>o(PO,e),"data-test-id":"remote-server-form-field-path-type",disabled:r,value:e.pathType}),(0,L.jsx)(Zi,{name:OO,label:s?(0,L.jsx)(Ac,{content:"remote-servers.serverFormScanImmediatelyAfterUpdate"}):(0,L.jsx)(Ac,{content:"remote-servers.serverFormScanImmediatelyAfterAdd"}),checkedValue:"1",uncheckedValue:"0","data-test-id":"remote-server-form-field-scan",disabled:r,onChange:e=>o(OO,e)})]}),(0,L.jsx)(vi,{title:(0,L.jsx)(Ac,{content:"remote-servers.serverFormAdditionalParameters"}),collapsible:a,collapsed:!0,children:(0,L.jsx)(mO,{name:LO,label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldDirectoriesWithPhpInterpreters"}),size:"lg",required:!0,"data-test-id":"remote-server-form-field-directories-with-php-interpreters",disabled:r,onChange:e=>o(LO,e),values:Gc(e,LO,[""]),errors:Gc(t,LO,[]),children:(0,L.jsx)(vn,{name:LO})})}),s&&(0,L.jsx)(ga,{name:"id",label:(0,L.jsx)(Ac,{content:"remote-servers.serverFormFieldId"}),style:{display:"none"}})]})]})}}MO.propTypes={onAcceptFingerprint:Vt().func.isRequired,values:Vt().shape({id:Vt().string,host:Vt().string,login:Vt().string,authType:Vt().oneOf([Xx,"key"]),pathType:Vt().oneOf([Zx,Jx]),password:Vt().string,keyPath:Vt().string,port:Vt().string,path:Vt().array,directoriesWithPhpInterpreters:Vt().array,scan:Vt().string,privateKeyExist:Vt().bool,sshKeyInputType:Vt().string}),errors:Vt().shape({path:Vt().array,directoriesWithPhpInterpreters:Vt().array}),error:Vt().shape({text:Vt().string,type:Vt().string}),success:Vt().string,isDataLoading:Vt().bool.isRequired,isEditServer:Vt().bool.isRequired,isFormVisible:Vt().bool.isRequired,isFormSending:Vt().bool.isRequired,isAdditionalParametersCollapsible:Vt().bool,backgroundTask:Vt().shape({title:Vt().string.isRequired,steps:Vt().object.isRequired}),isAuthTypeByKeyPathDisabled:Vt().bool.isRequired,onFormFieldChange:Vt().func.isRequired},MO.defaultProps={error:null,success:null,values:null,errors:null,backgroundTask:null,isAdditionalParametersCollapsible:!0};const AO=MO,EO=e=>{const{onSubmit:t,onCancel:n}=e;return(0,L.jsx)(ji,{isOpen:!0,title:(0,L.jsx)(Ac,{content:"remote-servers.detachServerDialogTitle"}),buttons:(0,L.jsx)(Ue,{onClick:t,"data-test-id":"remote-server-confirm-detach-btn",children:(0,L.jsx)(Ac,{content:"remote-servers.detachServerDialogDetachButton"})}),size:"sm",onClose:n,children:(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"remote-servers.detachServerDialogConfirmation"})})})};EO.propTypes={onSubmit:Vt().func.isRequired,onCancel:Vt().func.isRequired};const UO=EO,RO=e=>(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(he,{size:"16",children:(0,L.jsx)("svg",{height:"8",width:"8",children:(0,L.jsx)("circle",{cx:"8",cy:"8",r:"4",fill:e.iconFillColor})})})," ",e.text]}),NO=e=>{const{text:t,textDataTestId:n}=e,s=(0,L.jsx)("span",{style:{position:"relative",display:"block"},children:(0,L.jsx)("span",{"data-test-id":n,style:{position:"absolute",left:"0px",right:"0px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t})});return(0,L.jsx)(An,{target:s,children:(0,L.jsx)("span",{style:{wordBreak:"break-word"},children:t})})};class FO extends U.Component{constructor(){super(...arguments),this.getColumnsList=()=>[{key:"host",width:"150px",sortable:!0,title:(0,L.jsx)(Ac,{content:"remote-servers.serverCardGeneralInfoHost"}),render:e=>(0,L.jsx)("span",{"data-test-id":"remote-server","data-test-server-id":e.id,"data-test-server-hostname":e.host,children:e.host})},{key:"status",width:"150px",sortable:!0,title:(0,L.jsx)(Ac,{content:"remote-servers.serverCardGeneralInfoStatus"}),render:e=>e.status===qx?(0,L.jsx)(RO,{iconFillColor:"green",text:(0,L.jsx)(Ac,{content:"remote-servers.serverCardGeneralInfoStatusActive"})}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(RO,{iconFillColor:"red",text:(0,L.jsx)(Ac,{content:"remote-servers.serverCardGeneralInfoStatusError"})})," ",(0,L.jsx)(An,{target:(0,L.jsx)(fe,{children:(0,L.jsx)(Ac,{content:"remote-servers.openEditServerDialog"})}),intent:"danger",children:(0,L.jsx)(bO,{id:e.id,text:e.errorText,type:e.status,onAcceptFingerprint:this.props.onAcceptFingerprint})})]})},{key:"instances",width:"100px",sortable:!0,title:(0,L.jsx)(Ac,{content:"remote-servers.serverCardGeneralInfoInstances"}),render:e=>(0,L.jsx)("span",{"data-test-id":"remote-server-instances-counter",children:e.instances})},{key:"description",title:(0,L.jsx)(Ac,{content:"remote-servers.serverCardGeneralInfoDescription"}),render:e=>(0,L.jsx)(NO,{text:e.description,textDataTestId:"remote-server-description"})},{key:"buttons",width:"20px",render:e=>(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"remote-servers.toolbarGroupEditServer"}),children:(0,L.jsx)(fe,{onClick:t=>this.props.onEditClick(t,e.id),"data-test-id":"remote-server-edit-btn",icon:"pencil"})})}],this.getServers=()=>{const{search:e,servers:t,selectedFilter:n}=this.props,s=e.toLowerCase();let i=t;return e&&(i=i.filter((({host:e,description:t})=>-1!==e.toLowerCase().indexOf(s)||-1!==t.toLowerCase().indexOf(s)))),i.filter((e=>n===Vx||(n===$x?e.status===qx:e.status!==qx))).map((e=>Object.assign(Object.assign({},e),{key:e.id})))}}render(){const{selectedServerIds:e,onSelectionChange:t}=this.props,n=this.getServers();return 0===n.length?(0,L.jsx)(Ac,{content:"list.remote-servers.notFound"}):(0,L.jsx)(Wa,{columns:this.getColumnsList(),data:n,selection:e,onSelectionChange:t,"data-test-id":"remote-servers-list"})}}FO.propTypes={search:Vt().string.isRequired,servers:Vt().array.isRequired,selectedServerIds:Vt().array.isRequired,selectedFilter:Vt().string.isRequired,onEditClick:Vt().func.isRequired,onSelectionChange:Vt().func.isRequired,onAcceptFingerprint:Vt().func.isRequired};const YO=FO;class BO extends U.Component{constructor(){super(...arguments),this.getFiltersList=()=>[{value:Vx,title:(0,L.jsx)(Ac,{content:"remote-servers.serversFilter.all"})},{value:$x,title:(0,L.jsx)(RO,{iconFillColor:"green",text:(0,L.jsx)(Ac,{content:"remote-servers.serversFilter.active"})})},{value:"server/FILTERS_ERROR",title:(0,L.jsx)(RO,{iconFillColor:"red",text:(0,L.jsx)(Ac,{content:"remote-servers.serversFilter.error"})})}]}render(){const{hasSelectedServers:e,selectedFilter:t,onAddServersClick:n,onScanClick:s,onRefreshClick:i,onDetachClick:a,onFilterChange:r}=this.props;return(0,L.jsxs)(Ss,{children:[(0,L.jsxs)(_s,{title:(0,L.jsx)(Ac,{content:"list.instances.collapsedToolbarActions"}),children:[(0,L.jsx)(Ue,{onClick:n,"data-test-id":"add-remote-server-btn",children:(0,L.jsx)(Ac,{content:"remote-servers.toolbarButtonAddServer"})}),(0,L.jsx)(Ue,{onClick:i,"data-test-id":"refresh-remote-server-btn",icon:"refresh",children:(0,L.jsx)(Ac,{content:"remote-servers.toolbarButtonRefreshServers"})}),(0,L.jsx)(Ue,{onClick:s,disabled:!e,"data-test-id":"scan-remote-server-btn",icon:"search",children:(0,L.jsx)(Ac,{content:"remote-servers.toolbarButtonScanServers"})}),(0,L.jsx)(Ue,{onClick:a,disabled:!e,"data-test-id":"detach-remote-server-btn",children:(0,L.jsx)(Ac,{content:"remote-servers.toolbarButtonDetachServers"})})]},"toolbar-group-add-server"),(0,L.jsx)(ts,{}),(0,L.jsx)($n,{buttons:this.getFiltersList(),selected:t,onChange:r})]})}}BO.propTypes={hasSelectedServers:Vt().bool.isRequired,selectedFilter:Vt().string.isRequired,onAddServersClick:Vt().func.isRequired,onScanClick:Vt().func.isRequired,onRefreshClick:Vt().func.isRequired,onDetachClick:Vt().func.isRequired,onFilterChange:Vt().func.isRequired};const HO=BO,VO="pending",$O="registered",WO="warning",zO="error",qO="any",GO="info",KO="success",XO="warning",ZO="danger";class JO extends U.Component{constructor(){super(...arguments),this.getFiltersList=()=>{const{filterInstancesCount:e}=this.props;return[{value:qO,title:this.formatFilterTitle((0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.any"}),e.any)},{value:VO,title:(0,L.jsx)(RO,{iconFillColor:"blue",text:this.formatFilterTitle((0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.pending"}),e.pending)})},{value:$O,title:(0,L.jsx)(RO,{iconFillColor:"green",text:this.formatFilterTitle((0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.registered"}),e.registered)})},{value:WO,title:(0,L.jsx)(RO,{iconFillColor:"orange",text:this.formatFilterTitle((0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.warning"}),e.warning)})},{value:zO,title:(0,L.jsx)(RO,{iconFillColor:"red",text:this.formatFilterTitle((0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.error"}),e.error)})}]}}formatFilterTitle(e,t){return null!=t?(0,L.jsx)("span",{children:`${e} (${t})`}):(0,L.jsx)("span",{children:e})}render(){const{selectedFilter:e,onSearchChange:t,onFilterChange:n}=this.props;return(0,L.jsxs)(Ss,{children:[(0,L.jsx)($r,{maxWidth:270,onTyping:t,onSearch:t}),(0,L.jsx)(ts,{}),(0,L.jsx)($n,{buttons:this.getFiltersList(),selected:e,onChange:n})]})}}JO.propTypes={selectedFilter:Vt().string.isRequired,onSearchChange:Vt().func.isRequired,onFilterChange:Vt().func.isRequired,filterInstancesCount:Vt().object.isRequired};const QO=JO;class eL extends U.Component{constructor(e){super(e),this.getColumnsList=()=>{const{expandedDetails:e}=this.state;return[{key:"path",sortable:!0,title:(0,L.jsx)(Ac,{content:"remote-servers.logTablePath"}),render:e=>(0,L.jsx)("span",{children:(0,L.jsx)(NO,{text:e.path,textDataTestId:"remote-server-instance-path"})})},{key:"status",width:"150px",sortable:!0,title:(0,L.jsx)(Ac,{content:"remote-servers.logTableStatus"}),render:e=>(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Pi,{intent:this.getIntent(e.status)})," ",(0,L.jsx)("span",{children:this.getStatusMessage(e.status)})]}),sort:(e,t)=>{const n=this.getSeverityLevel(t.status)-this.getSeverityLevel(e.status);return Math.sign(n)}},{key:"shortDetails",width:"250px",sortable:!0,title:(0,L.jsx)(Ac,{content:"remote-servers.logTableDetails"}),render:t=>(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("div",{children:t.shortDetails}),e[t.id]&&(0,L.jsx)("div",{children:t.fullDetails})]})},{key:"expand",width:"30px",title:"",render:t=>(0,L.jsx)(U.Fragment,{children:t.fullDetails&&(0,L.jsx)("span",{children:(0,L.jsx)("a",{onClick:()=>this.toggleDetails(t),children:(0,L.jsx)(he,{name:e[t.id]?"chevron-up":"chevron-down",size:16})})})})}]},this.handleFilterChange=e=>{this.setState({selectedFilter:e})},this.handleSearchChange=e=>{this.setState({search:e})},this.handleSortChange=({sortColumn:e,sortDirection:t})=>{this.setState({sortColumn:e,sortDirection:t})},this.getListData=()=>{const{selectedFilter:e,search:t}=this.state;return this.getInstancesByFilter(e,t).map((e=>Object.assign(Object.assign({},e),{key:e.id})))},this.getFilterInstancesCount=()=>{const{search:e}=this.state;return zc([qO,VO,$O,WO,zO],(t=>({key:t,value:this.getInstancesByFilter(t,e).length})))},this.getInstancesByFilter=(e,t)=>{const{remoteInstancesLog:n,serverId:s}=this.props;return n[s]?n[s].filter((t=>e===qO||e===t.status)).filter((e=>{if(!t)return!0;const n=t.toLowerCase();return qc(e.path.toLowerCase(),n)||e.shortDetails&&qc(e.shortDetails.toLowerCase(),n)||e.fullDetails&&qc(e.fullDetails.toLowerCase(),n)})):[]},this.isLogMounted=!1,this.state={isLoading:!0,expandedDetails:null,selectedFilter:qO,search:null,timer:null,sortColumn:null,sortDirection:null}}componentWillMount(){this.isLogMounted=!0,this.startRefresh()}componentWillReceiveProps(e){const{remoteInstancesLog:t,serverId:n}=e;t[n]&&this.setState((e=>{const{expandedDetails:s}=e;return{isLoading:!1,expandedDetails:zc(t[n],(e=>({key:e.id,value:s&&s[e.id]})))}}))}componentWillUnmount(){const{serversActions:{resetInstancesLog:e},serverId:t}=this.props,{timer:n}=this.state;this.isLogMounted=!1,e(t),n&&clearTimeout(n)}schedulePeriodicRefresh(){this.isLogMounted&&this.setState({timer:setTimeout((()=>{this.doRefresh().finally((()=>this.schedulePeriodicRefresh()))}),5e3)})}doRefresh(){const{serversActions:{refreshInstancesLog:e},serverId:t}=this.props;return t?e(t):new Promise((e=>e()))}startRefresh(){this.doRefresh().finally((()=>{this.schedulePeriodicRefresh(),this.setState({isLoading:!1})}))}toggleDetails(e){this.setState((t=>{const{expandedDetails:n}=t;return{expandedDetails:Object.assign({},n,{[e.id]:!n[e.id]})}}))}getIntent(e){let t="inactive";switch(e){case VO:t=GO;break;case $O:t=KO;break;case WO:t=XO;break;case zO:t=ZO}return t}getStatusMessage(e){let t=(0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.info"});switch(e){case VO:t=(0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.pending"});break;case $O:t=(0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.registered"});break;case WO:t=(0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.warning"});break;case zO:t=(0,L.jsx)(Ac,{content:"remote-servers.instanceLogStatus.error"})}return t}getSeverityLevel(e){let t=2;switch(e){case VO:t=1;break;case $O:t=0;break;case WO:t=3;break;case zO:t=4}return t}renderLoading(){return(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"remote-servers.instancesLogLoading"})})}renderList(){const{selectedFilter:e,sortColumn:t,sortDirection:n}=this.state,s=this.getListData(),i=s&&s.length>0;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(QO,{selectedFilter:e,onFilterChange:this.handleFilterChange,onSearchChange:this.handleSearchChange,filterInstancesCount:this.getFilterInstancesCount()}),(0,L.jsx)("br",{}),i&&(0,L.jsx)(Wa,{columns:this.getColumnsList(),data:s,onSortChange:this.handleSortChange,sortColumn:t,sortDirection:n}),!i&&(0,L.jsx)(Ac,{content:"remote-servers.instancesLogNoItemsFound"})]})}render(){const{isLoading:e}=this.state;return(0,L.jsxs)(U.Fragment,{children:[e&&this.renderLoading(),!e&&this.renderList()]})}}eL.propTypes={serverId:Vt().string,remoteInstancesLog:Vt().object.isRequired,serversActions:Vt().shape({refreshInstancesLog:Vt().func.isRequired,resetInstancesLog:Vt().func.isRequired}).isRequired},eL.defaultProps={serverId:null};const tL=(0,so.$j)((e=>({remoteInstancesLog:e.servers.remoteInstancesLog})),(e=>({serversActions:nh(p,e)})))(v_(eL)),nL={addUpdateBackgroundTaskId:null,addUpdateBackgroundTask:null,isAddUpdateTaskProcessing:!1,isAddUpdateTaskFinished:!1,isAddUpdateTaskFinishedWithError:!1};class sL extends U.Component{constructor(e){super(e),this.handleOnReceiveAddUpdateBackgroundTaskData=e=>{const{addUpdateBackgroundTaskId:t,addUpdateBackgroundTask:n}=this.state;if(!t)return;const s=iw(t,e);s&&n!==s&&this.setState({addUpdateBackgroundTask:s},(()=>{this.handleUpdateBackgroundTaskData(this.state.addUpdateBackgroundTask),nw(s)?this.handleConnectingServerSuccess(s):sw(s)&&this.handleConnectingServerFailed(s)}))},this.handleConnectingServerSuccess=e=>{if(this.setState({isAddUpdateTaskProcessing:!1,isAddUpdateTaskFinished:!0,isAddUpdateTaskFinishedWithError:!1}),e.publicParams.server&&e.publicParams.server.id){const t=e.publicParams.server.id;this.props.servers.some((e=>e.id===t))?this.props.serversActions.updateServerInList(e.publicParams.server):this.props.serversActions.addServerToList(e.publicParams.server),this.props.serversActions.addServerFinished()}},this.handleConnectingServerFailed=e=>{this.setState((t=>{let n=t.formValues;return e&&e.publicParams.server&&(n=Object.assign(Object.assign({},n),e.publicParams.server)),{formValues:n,isServerFormOpened:!0,isFormSending:!1,isServerFormLoading:!1,isAddUpdateTaskProcessing:!1,serverDialogSuccess:null}})),e.publicParams.server&&e.publicParams.server.id&&(this.props.servers.some((t=>t.id===e.publicParams.server.id))?this.props.serversActions.updateServerInList(e.publicParams.server):this.props.serversActions.addServerToList(e.publicParams.server),this.setState({isAddUpdateTaskFinished:!0,isAddUpdateTaskFinishedWithError:!0})),this.props.serversActions.addServerFinishedWithError()},this.handleAddServerErrors=e=>{const t=e&&e.data&&e.data.formErrors?e.data.formErrors:null;let n=e&&e.message?{text:e.message,type:"internal-error"}:null;t||n||(n={text:(0,L.jsx)(Ac,{content:"remote-servers.addServerInternalError"}),type:"internal-error"}),this.setState((s=>{let i=s.formValues;return e&&e.data&&e.data.server&&(i=Object.assign(Object.assign({},i),e.data.server)),{formErrors:t,serverDialogError:n,formValues:i,isServerFormOpened:!0,isFormSending:!1,isServerFormLoading:!1,isAddUpdateTaskProcessing:!1,serverDialogSuccess:null}}))},this.getDefaultSshAuthType=()=>{const{isAuthTypeByKeyPathDisabled:e}=this.props;return e?Kx:Gx},this.handleFormFieldChange=(e,t)=>this.setState((n=>({formValues:Object.assign(Object.assign({},n.formValues),{[e]:t})}))),this.handleAddServer=()=>{this.setState({formValues:{host:"",login:"root",authType:Xx,password:"",sshKeyInputType:this.getDefaultSshAuthType(),keyPath:"",keyPlainText:"",port:"22",pathType:Zx,path:[""],scan:"1",privateKeyExist:!1,directoriesWithPhpInterpreters:["/opt","/usr"]},isFormSending:!1,isServerFormOpened:!0,activeTab:1,serverId:null,isServerSaved:!1})},this.handleEditServer=(e,t)=>{this.setState({serverId:t,isServerFormLoading:!0,isServerFormOpened:!0,activeTab:1,isServerSaved:!1});let n=t;if(!n){const{selectedServerIds:e}=this.state;n=e.pop()}const{serversActions:{getServer:s}}=this.props;s(n).then((e=>{const t=e.data;"error"===e.status?this.handleAddServerErrors(e):this.setState({formValues:Object.assign(Object.assign({},t.server),{authType:Xx,sshKeyInputType:this.getDefaultSshAuthType(),pathType:t.server.path.length<1?Zx:Jx,scan:"1"}),formErrors:null,serverDialogError:{text:t.server.errorText,type:t.server.status},isFormSending:!1})})).finally((()=>{this.setState({isServerFormLoading:!1})}))},this.handleAcceptFingerprint=(e,t,n=!0)=>{const{serversActions:{acceptFingerprint:s,getServersList:i}}=this.props;return s(t,n).then((e=>(i(),e))).finally((e=>(this.resetBackgroundTaskData(),e)))},this.handleAcceptFingerprintAndOpenServerForm=(e,t)=>(this.setState({isServerFormLoading:!0}),this.handleAcceptFingerprint(e,t,!1).then((n=>(this.handleEditServer(e,t),n&&n.status===nu&&n.message&&this.setState({serverDialogSuccess:n.message}),n)))),this.resetBackgroundTaskData=()=>this.setState(Object.assign({},nL)),this.handleUpdateBackgroundTaskData=e=>{const{publicParams:t}=e;t.server&&t.server.id&&!this.state.serverId&&this.setState({serverId:t.server.id}),t.hasOwnProperty("isServerSaved")&&this.setState({isServerSaved:t.isServerSaved})},this.handleSubmitAddServerDialog=()=>{this.setState({isFormSending:!0});const{serversActions:{addServer:e}}=this.props,{formValues:t}=this.state;e(t).then((e=>{const{status:t,data:n}=e;if(t===nu){const{task:e}=n;this.setState({addUpdateBackgroundTaskId:e.id,formErrors:null,serverDialogError:null,serverDialogSuccess:null,isFormSending:!1,isAddUpdateTaskProcessing:!0})}else this.handleAddServerErrors(e)}))},this.handleCloseAddServerDialog=()=>{this.resetBackgroundTaskData(),this.setState({isServerFormOpened:!1,formErrors:null,serverDialogError:null,serverDialogSuccess:null,isFormSending:!1})},this.handleSelectionChange=e=>{this.setState({selectedServerIds:e})},this.handleFilterChange=e=>{this.setState({selectedFilter:e})},this.checkSelectionNotEmpty=e=>0!==e.length||(this.props.appActions.addWarningMessage((0,L.jsx)(Ac,{content:"remote-servers.noItemsSelected"})),!1),this.handleOnReceiveScanBackgroundTaskData=e=>{const{scanBackgroundTasksIds:t}=this.state;t.length&&t.forEach((t=>{const n=iw(t,e);n&&tw(n)&&this.setState((e=>({scanBackgroundTasksIds:e.scanBackgroundTasksIds.filter((e=>e!==n.id))})),(()=>{let e=[];n.publicParams.servers&&(e=n.publicParams.servers),this.props.serversActions.scanServersFinished(e)}))}))},this.handleBulkScan=()=>{const{serversActions:{scanServers:e}}=this.props,{selectedServerIds:t}=this.state;this.checkSelectionNotEmpty(t)&&e(t).then((e=>{e.status===nu&&this.setState((t=>({scanBackgroundTasksIds:t.scanBackgroundTasksIds.concat(e.data.task.id)})))})).finally((()=>{this.setState({selectedServerIds:[]})}))},this.handleRefresh=()=>{const{serversActions:{getServersList:e}}=this.props;this.setState({isServersListLoading:!0}),e().finally((()=>{this.setState({isServersListLoading:!1})}))},this.handleBulkDetach=()=>{const{selectedServerIds:e}=this.state;this.checkSelectionNotEmpty(e)&&this.setState({isDetachConfirmDialogOpen:!0})},this.handleSubmitDetachConfirmDialog=()=>{const{serversActions:{detachServers:e}}=this.props,{selectedServerIds:t}=this.state;return this.setState({isDetachConfirmDialogOpen:!1,isServersListLoading:!0}),e(t).finally((()=>{this.setState({selectedServerIds:[],isServersListLoading:!1})}))},this.handleCloseDetachConfirmDialog=()=>{this.setState({isDetachConfirmDialogOpen:!1})},this.isFormVisible=()=>{const{formValues:e,isServerFormLoading:t}=this.state;return Boolean(!t&&e)},this.getSubmitButton=()=>{const{isFormSending:e,isAddUpdateTaskProcessing:t,isAddUpdateTaskFinished:n,isAddUpdateTaskFinishedWithError:s,formValues:i}=this.state;if(!this.isFormVisible()||n&&!s)return!1;let a=i.id?(0,L.jsx)(Ac,{content:"remote-servers.serverFormButtonUpdate"}):(0,L.jsx)(Ac,{content:"remote-servers.serverFormButtonStartAdding"});return s&&(a=(0,L.jsx)(Ac,{content:"remote-servers.serverFormButtonRetry"})),{children:a,state:e||t?"loading":"active","data-test-id":"remote-server-form-submit-btn",onClick:e=>Rc(e,this.handleSubmitAddServerDialog)}},this.getCancelButton=()=>{const{isFormSending:e,isAddUpdateTaskProcessing:t,isAddUpdateTaskFinished:n,isServerSaved:s}=this.state;return{children:n&&s?(0,L.jsx)(Ac,{content:"remote-servers.serverFormButtonClose"}):(0,L.jsx)(Ac,{content:"remote-servers.serverFormButtonCancel"}),disabled:e||t}},this.isAdditionalParametersCollapsible=()=>{const{formErrors:e}=this.state;return!e||!e.directoriesWithPhpInterpreters},this.handleCloseBetaDialog=()=>this.props.serversActions.disableBetaDialog().finally((()=>{this.setState({showBetaDialog:!1})})),this.setActiveTab=e=>{this.setState({activeTab:e})},this.state=Object.assign({selectedServerIds:[],selectedFilter:Vx,isServersListLoading:!1,isServerFormOpened:!1,isDetachConfirmDialogOpen:!1,formValues:null,formErrors:null,serverId:null,isFormSending:!1,serverDialogError:null,serverDialogSuccess:null,isServerFormLoading:!1,showBetaDialog:e.isRemoteWptBetaDialogVisible,activeTab:1,isServerSaved:!1,scanBackgroundTasksIds:[]},nL)}componentWillMount(){const{servers:e}=this.props;null===e&&this.handleRefresh()}componentWillReceiveProps(e){this.handleOnReceiveAddUpdateBackgroundTaskData(e.tasks),this.handleOnReceiveScanBackgroundTaskData(e.tasks)}componentWillUnmount(){const{serversActions:{resetServersList:e}}=this.props;e()}render(){const{search:e,servers:t,isAuthTypeByKeyPathDisabled:n,publicUrl:s}=this.props,{selectedServerIds:i,selectedFilter:a,isServerFormOpened:r,isDetachConfirmDialogOpen:o,formValues:l,formErrors:c,serverDialogError:u,serverDialogSuccess:d,isServerFormLoading:p,showBetaDialog:h,isFormSending:m,isAddUpdateTaskProcessing:f,serverId:g,activeTab:b,addUpdateBackgroundTask:v}=this.state,y=Boolean(l&&l.id)||p;let _=null;1===b&&(_={onSubmit:this.handleSubmitAddServerDialog,applyButton:!1,values:l,errors:c,vertical:!0,submitButton:this.getSubmitButton(),cancelButton:this.getCancelButton()});const x=[];_&&_.submitButton&&x.push((0,L.jsx)(Ue,Object.assign({intent:"primary"},_.submitButton),"submit"));let S=v;if(S&&S.publicParams&&S.publicParams.error){const{publicParams:{error:{text:e,type:t}}}=S;S=Object.assign(Object.assign({},S),{errors:[(0,L.jsx)(bO,{id:l.id,onAcceptFingerprint:this.handleAcceptFingerprint,text:e,type:t},t)]})}return(0,L.jsxs)(a_,{activeTab:s_,children:[this.state.isServersListLoading&&(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"remote-servers.serverPageLoading"})}),!this.state.isServersListLoading&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Xn,{gap:"sm",children:(0,L.jsx)(Zn,{children:(0,L.jsx)(HO,{hasSelectedServers:i.length>0,selectedFilter:a,onAddServersClick:this.handleAddServer,onScanClick:this.handleBulkScan,onRefreshClick:this.handleRefresh,onDetachClick:this.handleBulkDetach,onFilterChange:this.handleFilterChange})})}),(0,L.jsx)(Xn,{gap:"sm",children:(0,L.jsx)(Zn,{children:(0,L.jsx)(YO,{search:e,servers:t,selectedServerIds:i,selectedFilter:a,onEditClick:this.handleEditServer,onSelectionChange:this.handleSelectionChange,onAcceptFingerprint:this.handleAcceptFingerprint})})}),o&&(0,L.jsx)(UO,{onSubmit:this.handleSubmitDetachConfirmDialog,onCancel:this.handleCloseDetachConfirmDialog}),r&&(0,L.jsx)(zi,{className:vu,title:y?(0,L.jsx)(Ac,{content:"remote-servers.editServerDrawerTitle"}):(0,L.jsx)(Ac,{content:"remote-servers.addServerDrawerTitle"}),onClose:this.handleCloseAddServerDialog,"data-test-id":Oh,"data-type":Oh,form:this.isFormVisible()?_:null,progress:fC(S,(()=>{this.setState({addUpdateBackgroundTask:null})}),x),hideButton:!1,isOpen:!0,children:(0,L.jsxs)(Br,{active:b,children:[(0,L.jsxs)(Fr,{title:(0,L.jsx)(Ac,{content:"remote-servers.settingsTabTitle"}),onActivate:()=>this.setActiveTab(1),children:[!y&&(0,L.jsxs)(ge,{intent:"info",children:[(0,L.jsx)(he,{name:"circle-exclamation-mark",size:"16"})," ",(0,L.jsx)(Ac,{content:"remote-servers.addServerFirewallWarning"})]}),(0,L.jsx)(AO,{onAcceptFingerprint:this.handleAcceptFingerprintAndOpenServerForm,values:l,errors:c,error:u,success:d,isDataLoading:p,isEditServer:y,isFormVisible:this.isFormVisible(),isAdditionalParametersCollapsible:this.isAdditionalParametersCollapsible(),isAuthTypeByKeyPathDisabled:n,isFormSending:m||f,backgroundTask:v,onFormFieldChange:this.handleFormFieldChange})]}),(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"remote-servers.logTabTitle"}),onActivate:()=>this.setActiveTab(2),children:(0,L.jsx)(tL,{serverId:g})})]})})]}),h&&(0,L.jsx)(ji,{size:"sm",banner:`${s}images/wptr-beta.png`,isOpen:!0,onClose:this.handleCloseBetaDialog,cancelTitle:(0,L.jsx)(Ac,{content:"remote-servers.betaDialog.gotItButton"}),children:(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"remote-servers.betaDialog.description",unsafe:!0})})})]})}}sL.propTypes={search:Vt().string.isRequired,servers:Vt().array,serversActions:Vt().shape({getServersList:Vt().func.isRequired,detachServers:Vt().func.isRequired,scanServers:Vt().func.isRequired,scanServersFinished:Vt().func.isRequired,addServer:Vt().func.isRequired,resetServersList:Vt().func.isRequired,addServerToList:Vt().func.isRequired,updateServerInList:Vt().func.isRequired,addServerFinished:Vt().func.isRequired,addServerFinishedWithError:Vt().func.isRequired,disableBetaDialog:Vt().func.isRequired,getServer:Vt().func.isRequired,acceptFingerprint:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addWarningMessage:Vt().func.isRequired}).isRequired,isAuthTypeByKeyPathDisabled:Vt().bool.isRequired,isRemoteWptBetaDialogVisible:Vt().bool.isRequired,publicUrl:Vt().string.isRequired,tasks:Vt().array},sL.defaultProps={servers:null,tasks:[]};const iL=(0,so.$j)((e=>({search:e.app.search,servers:e.servers.list,isAuthTypeByKeyPathDisabled:e.app.options.isAuthTypeByKeyPathDisabled,isRemoteWptBetaDialogVisible:e.app.options.isRemoteWptBetaDialogVisible,publicUrl:e.app.urls.publicUrl,tasks:e.backgroundTasks.tasks})),(t=>({serversActions:nh(p,t),appActions:nh(e,t)})))(v_(sL)),aL="success",rL="warning",oL="failed",lL="notExist",cL=e=>[aL,rL,oL].includes(e),uL=(e,t)=>e.filter((e=>!t.includes(e))),dL="instance-change-remote-instance-properties",pL="instance-change-remote-agent-instance-properties",hL="restore-button",mL="link-wp-login",fL="instance-link-security",gL="current-php-version",bL="instance-name",vL=e=>{const{children:t,handleLoginToInstance:n,installationId:s,onOpenAdminSettings:i,hasAdminCredentials:a=!0,tooltip:r=null,disabled:o=!1}=e,[l,c]=(0,U.useState)(!1);return(0,L.jsx)(Ue,{icon:"key",intent:"primary",disabled:o,onClick:a?e=>((e,t)=>{c(!0),n(e,t).finally((()=>c(!1)))})(s,e):i,state:l?"loading":void 0,"data-test-id":mL,style:{whiteSpace:"normal"},tooltip:r,children:t})},yL=e=>{const{handleLoginToInstance:t,children:n,installationId:s,tooltip:i=null,disabled:a=!1}=e,[r,o]=(0,U.useState)(!1);if(r)return(0,L.jsxs)("span",{"data-test-id":mL,children:[n," ",(0,L.jsx)(wS,{})]});const l=(0,L.jsx)(wn,{disabled:a,onClick:e=>((e,n)=>{o(!0),t(e,n).finally((()=>o(!1)))})(s,e),"data-test-id":mL,target:"_blank",children:n});return i?(0,L.jsx)(je,{title:i,children:l}):l},_L=e=>{const{loginToInstance:t,getAdminCredentials:n,children:s,onOpenAdminSettings:i,type:a="link",loadingTranslateKey:r="general-ui.login.windowPreloadMessage"}=e,o=Mc()(r).toString(),l=(e,s)=>new Promise(((i,a)=>{s.persist();const r=s.timeStamp.toString(),l=window.open("",r);l&&(l.document.body.innerText=o),n(e).then((({credentials:n,loginUrl:s})=>{t(e,s,n,r),i()})).catch((()=>{l&&l.close(),a()}))}));return"button"===a&&void 0!==i?(0,L.jsx)(vL,Object.assign({},e,{handleLoginToInstance:l,onOpenAdminSettings:i,children:s})):(0,L.jsx)(yL,Object.assign({},e,{handleLoginToInstance:l,children:s}))},xL={loginToInstance:dy,getAdminCredentials:vy},SL=(0,so.$j)(null,xL)((({disabled:e=!1,children:t,instanceId:n,loginToInstance:s,getAdminCredentials:i,type:a="link",hasAdminCredentials:r=!0,tooltip:o=null,onOpenAdminSettings:l=(()=>{})})=>(0,L.jsx)(_L,{disabled:e,installationId:n,loginToInstance:s,getAdminCredentials:i,type:a,hasAdminCredentials:r,tooltip:o,onOpenAdminSettings:l,children:(0,L.jsx)(L.Fragment,{children:t})})));class wL extends U.Component{renderPlesk(){const{render:e,children:t,settingsData:{webAdminUrl:n}}=this.props;return e((0,L.jsx)(wn,{href:n,target:"_blank",children:t}))}renderCpanel(){const{render:e,children:t,instance:{cpanelAccountUsername:n},settingsData:{webAdminUrl:s},goToUri:i}=this.props;if(!n||!s)return null;const a=bm({link:s,inNewWindow:!0,goToUri:i,accountUsername:n});return e((0,L.jsx)(wn,Object.assign({},a,{children:t})))}render(){const{instance:{instanceType:e},settingsData:{webAdminUrl:t}}=this.props;return t?QT(e)?this.renderPlesk():JT(e)?this.renderCpanel():null:null}}const kL=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(wL);class jL extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{render:e,children:t,instance:{filesUrl:n}}=this.props;return e((0,L.jsx)(wn,{href:n,target:"_blank",children:t}))},this.renderCpanel=()=>{const{render:e,children:t,goToUri:n,instance:{filesUrl:s,cpanelAccountUsername:i}}=this.props;if(!i)return null;const a=bm({link:s,inNewWindow:!1,goToUri:n,accountUsername:i});return e((0,L.jsx)(wn,Object.assign({},a,{children:t})))}}render(){const{instance:{isFileManagerAvailable:e,instanceType:t,filesUrl:n}}=this.props;return e&&n?QT(t)?this.renderPlesk():JT(t)?this.renderCpanel():null:null}}const TL=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(jL),CL=r(54998),DL=r(3689),PL=e=>e.replace("https://","").replace("http://",""),IL=e=>DL.toUnicode(e),OL=e=>DL.toASCII(e),LL=e=>{try{const t=new CL(e);return t.hostname(IL(t.hostname())),decodeURIComponent(t.toString())}catch(t){return console.error(t),e}};class ML extends U.Component{constructor(e){super(e),this.state={isLoading:!0,cpanelAccountUsername:null,isFileManagerAvailable:null,filesUrl:null,webAdminUrl:null,instanceType:null}}componentWillMount(){const{getDbSettings:e,getInstancesData:t,smartUpdatesCloneInstanceId:n}=this.props;this.setState({isLoading:!0}),Promise.all([e(n).then((e=>{if(e&&e.data){const{webAdminUrl:t}=e.data;this.setState({webAdminUrl:t})}})),t({instancesIds:[n],skipUpdateInstanceList:!0}).then((e=>{if(e&&e.length>0){const[t]=e;this.setState({cpanelAccountUsername:t.owner.login,isFileManagerAvailable:t.features.fileManager.available,filesUrl:t.features.fileManager.url,instanceType:t.installationType})}}))]).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))}renderFileManagerLinkSection(){const{cpanelAccountUsername:e,isFileManagerAvailable:t,instanceType:n,filesUrl:s}=this.state;return e&&t&&n&&s?(0,L.jsx)(TL,{render:e=>(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.stagingWebsiteCredentials.fileManager.title"}),children:e}),instance:{isFileManagerAvailable:t,instanceType:n,filesUrl:s,cpanelAccountUsername:e},children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.stagingWebsiteCredentials.fileManager.action"})}):null}renderDatabaseLinkSection(){const{cpanelAccountUsername:e,instanceType:t,webAdminUrl:n}=this.state;return t&&n?(0,L.jsx)(kL,{render:e=>(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.stagingWebsiteCredentials.database.title"}),children:e}),instance:{cpanelAccountUsername:e,instanceType:t},settingsData:{webAdminUrl:n},children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.stagingWebsiteCredentials.database.action"})}):null}renderLoginLink(){const{smartUpdatesCloneInstanceId:e}=this.props;return(0,L.jsx)(SL,{instanceId:e,type:"link",children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.stagingWebsiteCredentials.wpAdminPanel.action"})})}renderLoginLinkSection(){return(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.stagingWebsiteCredentials.wpAdminPanel.title"}),children:this.renderLoginLink()})}renderClonedSiteLinkSection(){const{smartUpdatesCloneUrl:e}=this.props;return(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.stagingWebsiteCredentials.url.title"}),children:(0,L.jsx)(wn,{href:e,target:"_blank",children:LL(e)})})}renderContent(){return(0,L.jsxs)(vi,{children:[this.renderClonedSiteLinkSection(),this.renderLoginLinkSection(),this.renderDatabaseLinkSection(),this.renderFileManagerLinkSection()]})}renderLoader(){return(0,L.jsx)(It,{})}render(){const{isLoading:e}=this.state;return e?this.renderLoader():this.renderContent()}}const AL={getDbSettings:sv,getInstancesData:nv},EL=(0,so.$j)(null,AL)(ML);class UL extends U.Component{constructor(e){super(e),this.handlePageChange=e=>{this.setState({page:e})},this.handleItemsPerPageChange=e=>{this.setState({page:1,itemsPerPage:e})},this.CHECK_KEY_PAGE_TITLE_CHANGED="pageTitleChanged",this.CHECK_KEY_HTTP_CODE_SURVIVED="httpCodeSurvived",this.CHECK_KEY_HTTP_CODE_NEW="httpCodeNew",this.CHECK_KEY_PHP_ERRORS_SURVIVED="phpErrorsSurvived",this.CHECK_KEY_PHP_ERRORS_NEW="phpErrorsNew",this.CHECK_KEY_PHP_WARNINGS_SURVIVED="phpWarningsSurvived",this.CHECK_KEY_PHP_WARNINGS_NEW="phpWarningsNew",this.CHECK_KEY_PHP_NOTICES_SURVIVED="phpNoticesSurvived",this.CHECK_KEY_PHP_NOTICES_NEW="phpNoticesNew",this.CHECK_KEY_SHORTCODES_SURVIVED="shortcodesSurvived",this.CHECK_KEY_SHORTCODES_NEW="shortcodesNew",this.TAB_WEBSITE_SUMMARY=1,this.TAB_PAGE_ISSUES_REPORT=2,this.TAB_STAGING_WEBSITE_CREDENTIALS=3,this.handleChangeTab=e=>{this.setState({activeTab:e})},this.state={page:1,itemsPerPage:25,activeTab:1}}isBadHttpCode(e){return e<200||e>=400}renderPageIssuesReportTab(){const{smartUpdatesStatus:{details:e=[]},instanceUrl:t,smartUpdatesCloneUrl:n,baseClassName:s}=this.props,{page:i,itemsPerPage:a}=this.state,r=[{key:"check",title:"",width:"108px"},{key:"before",title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.mainList.beforeUpdate"}),width:""},{key:"after",title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.mainList.afterUpdate"}),width:""}],o=e.filter((e=>this.getPageIssues(e).length>0)).map((e=>{const s=n?e.pageUrl.replace(PL(t),PL(n)):null,i=s?`https://${s}`:null,a=e.pageUrl,r=`https://${e.pageUrl}`;return{key:e.pageUrl,check:"",before:(0,L.jsx)(wn,{href:r,target:"_blank",children:a}),after:i&&s?(0,L.jsx)(wn,{href:i,target:"_blank",children:s}):null,pageDetails:{before:e.before,after:e.after}}})),l="all"===a?o:o.slice((i-1)*a,i*a),c=o.map((e=>e.key)),u="all"===a?1:Math.ceil(o.length/a);return(0,L.jsx)(Wa,{data:l,columns:r,renderRowBody:e=>{const t=[{key:"check",title:(0,L.jsx)("strong",{children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.rowList.checkName"})}),width:"108px"},{key:"before",title:(0,L.jsx)("strong",{children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.rowList.beforeUpdate"})}),width:""},{key:"after",title:(0,L.jsx)("strong",{children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.rowList.afterUpdate"})}),width:""}];return this.getPageIssues(e.pageDetails).map((n=>{const i=[{key:n.key,check:n.check,before:n.before,after:n.after}];return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Wa,{columns:t,data:i,style:{tableLayout:"fixed"}}),(0,L.jsxs)("div",{className:`${s}__issue_alert_container`,children:[(0,L.jsx)("div",{className:`${s}__issue_alert_spacer`}),(0,L.jsx)("div",{className:`${s}__issue_alert_content`,children:(0,L.jsxs)(ge,{intent:n.alertIntent,children:[(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:n.alertIntent})," ",n.alertText]})})]})]},`${e.key}__${n.key}`)}))},expandedRows:c,style:{tableLayout:"fixed"},pagination:(0,L.jsx)(Gn,{current:i,total:u,onSelect:this.handlePageChange,itemsPerPageOptions:[25,100,"all"],itemsPerPage:a,onItemsPerPageChange:this.handleItemsPerPageChange}),totalRows:o.length})}getPageIssues(e){const t=[];return e.before.pageTitle!==e.after.pageTitle&&t.push({key:this.CHECK_KEY_PAGE_TITLE_CHANGED,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.pageTitle.title"}),before:e.before.pageTitle,after:e.after.pageTitle,alertIntent:ZO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.pageTitle.issueChanged"})}),this.isSurvivedBadHttpCode(e)&&t.push({key:this.CHECK_KEY_HTTP_CODE_SURVIVED,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.httpResponseCode.title"}),before:e.before.httpStatus,after:e.after.httpStatus,alertIntent:XO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.httpResponseCode.issueSurvived"})}),this.isNewBadHttpCode(e)&&t.push({key:this.CHECK_KEY_HTTP_CODE_NEW,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.httpResponseCode.title"}),before:e.before.httpStatus,after:e.after.httpStatus,alertIntent:ZO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.httpResponseCode.issueChanged"})}),this.areSurvivedPhpErrors(e)&&t.push({key:this.CHECK_KEY_PHP_ERRORS_SURVIVED,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpError.title"}),before:e.before.phpErrors,after:e.after.phpErrors,alertIntent:XO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpError.issueSurvived"})}),this.areNewPhpErrors(e)&&t.push({key:this.CHECK_KEY_PHP_ERRORS_NEW,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpError.title"}),before:e.before.phpErrors,after:e.after.phpErrors,alertIntent:ZO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpError.issueNew"})}),this.areSurvivedPhpWarnings(e)&&t.push({key:this.CHECK_KEY_PHP_WARNINGS_SURVIVED,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpWarning.title"}),before:e.before.phpWarnings,after:e.after.phpWarnings,alertIntent:XO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpWarning.issueSurvived"})}),this.areNewPhpWarnings(e)&&t.push({key:this.CHECK_KEY_PHP_WARNINGS_NEW,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpWarning.title"}),before:e.before.phpWarnings,after:e.after.phpWarnings,alertIntent:ZO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpWarning.issueNew"})}),this.areSurvivedPhpNotices(e)&&t.push({key:this.CHECK_KEY_PHP_NOTICES_SURVIVED,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpNotice.title"}),before:e.before.phpNotices,after:e.after.phpNotices,alertIntent:XO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpNotice.issueSurvived"})}),this.areNewPhpNotices(e)&&t.push({key:this.CHECK_KEY_PHP_NOTICES_NEW,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpNotice.title"}),before:e.before.phpNotices,after:e.after.phpNotices,alertIntent:ZO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.phpNotice.issueNew"})}),this.areSurvivedShortcodes(e)&&t.push({key:this.CHECK_KEY_SHORTCODES_SURVIVED,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.shortcode.title"}),before:e.before.shortcodes,after:e.after.shortcodes,alertIntent:XO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.shortcode.issueSurvived"})}),this.areNewShortcodes(e)&&t.push({key:this.CHECK_KEY_SHORTCODES_NEW,check:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.shortcode.title"}),before:e.before.shortcodes,after:e.after.shortcodes,alertIntent:ZO,alertText:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.pageIssuesReport.issue.shortcode.issueNew"})}),t}renderDownloadSummaryButton(){const{downloadSummaryUrl:e}=this.props;return e?(0,L.jsx)(Ue,{onClick:()=>{window.location.href=e},style:{marginBottom:"10px"},children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.buttonDownloadSummary"})}):null}renderNoChanges(){return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(he,{name:"check-mark",intent:KO})," ",(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.noChanges"})]})}renderChanges(e){return 0===e?this.renderNoChanges():(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:ZO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.changes",params:{count:e}})})})}renderHttpResponseCodeChanges(e,t){return e>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:ZO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.httpResponseCode",params:{count:e}})})}):t>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:XO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.httpResponseCode",params:{count:t}})})}):this.renderNoChanges()}renderPhpErrorChanges(e,t){return e>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:ZO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.phpErrors",params:{count:e}})})}):t>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:XO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.phpErrors",params:{count:t}})})}):this.renderNoChanges()}renderPhpWarningChanges(e,t){return e>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:ZO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.phpWarnings",params:{count:e}})})}):t>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:XO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.phpWarnings",params:{count:t}})})}):this.renderNoChanges()}renderPhpNoticeChanges(e,t){return e>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:ZO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.phpNotices",params:{count:e}})})}):t>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:XO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.phpNotices",params:{count:t}})})}):this.renderNoChanges()}renderShortcodeChanges(e,t){return e>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:ZO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.shortcodes",params:{count:e}})})}):t>0?(0,L.jsx)(fe,{onClick:()=>this.handleChangeTab(this.TAB_PAGE_ISSUES_REPORT),children:(0,L.jsx)(ye,{intent:XO,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.counts.shortcodes",params:{count:t}})})}):this.renderNoChanges()}isNewBadHttpCode(e){return!this.isBadHttpCode(e.before.httpStatus)&&this.isBadHttpCode(e.after.httpStatus)}isSurvivedBadHttpCode(e){return this.isBadHttpCode(e.before.httpStatus)&&this.isBadHttpCode(e.after.httpStatus)}areNewPhpIssues(e,t){return t.length>e.length}areSurvivedPhpIssues(e,t){return t.length>0&&!this.areNewPhpIssues(e,t)}areNewPhpErrors(e){return this.areNewPhpIssues(e.before.phpErrors,e.after.phpErrors)}areSurvivedPhpErrors(e){return this.areSurvivedPhpIssues(e.before.phpErrors,e.after.phpErrors)}areNewPhpWarnings(e){return this.areNewPhpIssues(e.before.phpWarnings,e.after.phpWarnings)}areSurvivedPhpWarnings(e){return this.areSurvivedPhpIssues(e.before.phpWarnings,e.after.phpWarnings)}areNewPhpNotices(e){return this.areNewPhpIssues(e.before.phpNotices,e.after.phpNotices)}areSurvivedPhpNotices(e){return this.areSurvivedPhpIssues(e.before.phpNotices,e.after.phpNotices)}areNewShortcodes(e){return uL(e.after.shortcodes,e.before.shortcodes).length>0}areSurvivedShortcodes(e){return e.after.shortcodes.length>0&&(t=e.before.shortcodes,n=e.after.shortcodes,0===uL(n,t).length);var t,n}renderWebsiteSummaryList(){const{smartUpdatesStatus:{details:e=[]}}=this.props,t=e,n=t.filter((e=>e.before.pageTitle!==e.after.pageTitle)).length,s=t.filter((e=>e.before.httpStatus!==e.after.httpStatus)).length,i=t.filter((e=>this.isBadHttpCode(e.before.httpStatus))).length,a=t.filter((e=>this.isNewBadHttpCode(e))).length,r=t.filter((e=>this.isSurvivedBadHttpCode(e))).length,o=t.filter((e=>e.before.phpErrors.length>0)).length,l=t.filter((e=>this.areNewPhpErrors(e))).length,c=t.filter((e=>this.areSurvivedPhpErrors(e))).length,u=t.filter((e=>e.before.phpWarnings.length>0)).length,d=t.filter((e=>this.areNewPhpWarnings(e))).length,p=t.filter((e=>this.areSurvivedPhpWarnings(e))).length,h=t.filter((e=>e.before.phpWarnings.length>0)).length,m=t.filter((e=>this.areNewPhpNotices(e))).length,f=t.filter((e=>this.areSurvivedPhpNotices(e))).length,g=t.filter((e=>e.before.shortcodes.length>0)).length,b=t.filter((e=>this.areNewShortcodes(e))).length,v=t.filter((e=>this.areSurvivedShortcodes(e))).length,y=[{key:"checkType",title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.tableHeader.checkType"})},{key:"beforeUpdate",title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.tableHeader.beforeUpdate"})},{key:"afterUpdate",title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.tableHeader.afterUpdate"})}],_=[{key:"pageTitleChanges",checkType:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.checkType.pageTitleChanges"}),beforeUpdate:(0,L.jsx)(he,{name:"minus"}),afterUpdate:this.renderChanges(n)},{key:"httpResponseCodeChanges",checkType:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.checkType.httpResponseCodeChanges"}),beforeUpdate:(0,L.jsx)(he,{name:"minus"}),afterUpdate:this.renderChanges(s)},{key:"httpResponseCodeErrors",checkType:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.checkType.httpResponseCodeErrors"}),beforeUpdate:i,afterUpdate:this.renderHttpResponseCodeChanges(a,r)},{key:"phpErrors",checkType:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.checkType.phpErrors"}),beforeUpdate:o,afterUpdate:this.renderPhpErrorChanges(l,c)},{key:"phpWarnings",checkType:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.checkType.phpWarnings"}),beforeUpdate:u,afterUpdate:this.renderPhpWarningChanges(d,p)},{key:"phpNotices",checkType:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.checkType.phpNotices"}),beforeUpdate:h,afterUpdate:this.renderPhpNoticeChanges(m,f)},{key:"shortcodes",checkType:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.websiteSummary.checkType.shortcodes"}),beforeUpdate:g,afterUpdate:this.renderShortcodeChanges(b,v)}];return(0,L.jsx)(Wa,{columns:y,data:_})}renderWebsiteSummaryTab(){const{isPublic:e}=this.props;return(0,L.jsxs)(U.Fragment,{children:[this.renderWebsiteSummaryList(),!e&&this.renderDownloadSummaryButton()]})}render(){const{smartUpdatesCloneInstanceId:e,smartUpdatesCloneUrl:t,isPublic:n}=this.props,{activeTab:s}=this.state;return(0,L.jsxs)(Br,{active:s,children:[(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.tab.websiteSummary"}),children:this.renderWebsiteSummaryTab()},this.TAB_WEBSITE_SUMMARY),(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.tab.pageIssuesReport"}),children:this.renderPageIssuesReportTab()},this.TAB_PAGE_ISSUES_REPORT),!n&&e&&t&&(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.tab.stagingWebsiteCredentials"}),children:(0,L.jsx)(EL,{smartUpdatesCloneInstanceId:e,smartUpdatesCloneUrl:t})},this.TAB_STAGING_WEBSITE_CREDENTIALS)]})}}UL.defaultProps={baseClassName:`${gu}smart-update-result-tabs`,isPublic:!1};const RL=UL,NL=(0,so.$j)((e=>({restApiUrl:e.app.urls.restApiUrl})))((({instanceId:e,smartUpdatesStatus:t,instanceUrl:n,smartUpdatesCloneInstanceId:s,smartUpdatesCloneUrl:i,isPublic:a,instanceLink:r=null,restApiUrl:o=""})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(kn,{level:3,children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.header"})}),a&&r?(0,L.jsx)(wn,{href:r,target:"_blank","data-test-id":"view-details",children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.linkToPanel"})}):null,(()=>{if(!n||!i)return null;const e=PL(LL(i));return(0,L.jsxs)(ge,{intent:GO,children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.topNotice.main",params:{originalSiteLink:(0,L.jsx)(wn,{href:n,target:"_blank",children:PL(LL(n))}),stagingSiteLink:(0,L.jsx)(wn,{href:i,target:"_blank",children:e})}})}),(0,L.jsxs)(as,{children:[(0,L.jsx)("strong",{children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.topNotice.reviewStaging"})})," ",(0,L.jsx)(wn,{href:i,target:"_blank",children:e})]})]})})(),(()=>{let e,n;switch(t.status){case aL:e=(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.updatePrognosis.success"}),n=KO;break;case rL:e=(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.updatePrognosis.warning"}),n=XO;break;case oL:e=(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.updatePrognosis.failed"}),n=ZO}return e?(0,L.jsxs)(ge,{intent:n,children:[(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:n})," ",e]}):null})(),(0,L.jsx)(RL,{instanceUrl:n,smartUpdatesStatus:t,smartUpdatesCloneInstanceId:s,smartUpdatesCloneUrl:i,isPublic:a,downloadSummaryUrl:Wu(o,e)})]}))),FL=(0,so.$j)((e=>({smartUpdateResults:e.smartUpdateResultsPublic.smartUpdateResults,instanceId:e.smartUpdateResultsPublic.instanceId,instanceUrl:e.smartUpdateResultsPublic.instanceUrl,instanceLink:e.smartUpdateResultsPublic.instanceLink})))((({smartUpdateResults:e,instanceId:t,instanceUrl:n,instanceLink:s,baseClassName:i=`${gu}smart-update-results-public`})=>(0,L.jsx)("div",{className:i,children:null!==e&&n&&t&&e.taskStatus&&cL(e.taskStatus)?(0,L.jsx)(NL,{smartUpdatesStatus:e,instanceUrl:n,instanceLink:s,smartUpdatesCloneInstanceId:null==e?void 0:e.clone.id,smartUpdatesCloneUrl:null==e?void 0:e.clone.url,instanceId:t,isPublic:!0}):(0,L.jsx)(Ac,{content:"smartUpdateResultsPublic.pageNotFound"})}))),YL=()=>(0,L.jsx)(Ac,{content:"general-ui.notFound"});class BL extends U.Component{constructor(){super(...arguments),this.toaster=null,this.setToasterRef=e=>{this.toaster=e}}componentWillReceiveProps(e){if(null===this.props.message&&e.message&&this.toaster){const{intent:t,message:n}=e.message,s=this.toaster.add({intent:"error"===t?"danger":t,message:"string"==typeof n?(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(n,Object.assign(Object.assign({},Ix.defaults),{exclusiveFilter:e=>!("a"!==e.tag||e.text.trim()&&e.attribs.href.trim())})).replaceAll("\n","<br/><br/>")}}):n});t===nu&&setTimeout((()=>{var e;return null===(e=this.toaster)||void 0===e?void 0:e.remove(s)}),3e3),this.props.clearAppMessage()}}render(){return(0,L.jsx)(eo,{ref:this.setToasterRef,className:this.props.baseClassName})}}BL.defaultProps={message:void 0,baseClassName:`${gu}toaster`};const HL={clearAppMessage:Dp},VL=(0,so.$j)((e=>({message:e.app.message})),HL)(BL);class $L extends U.Component{constructor(e){super(e),this.componentDidUpdate=()=>{null!==this.props.applicationUri&&null!==this.props.accountUsername&&this.handleGotoUri(this.props.applicationUri,this.props.accountUsername)},this.formRef=null,this.handleGotoUri=(e,t)=>{const{resetGoToCpanel:n}=this.props;n(),this.setState({applicationUri:e,accountUsername:t},(()=>{const{applicationUri:e,accountUsername:t}=this.state;e&&t&&(_m()?this.formRef&&this.formRef.submit():window.open(`${vm()}/${e}`))}))},this.state={applicationUri:null,accountUsername:null}}render(){return null}}$L.defaultProps={applicationUri:null,accountUsername:null};const WL=(0,so.$j)((e=>({applicationUri:e.app.cpanel.applicationUri,accountUsername:e.app.cpanel.accountUsername})),(e=>({resetGoToCpanel:()=>e((e=>e({type:$f})))})))($L);class zL extends U.Component{constructor(e){super(e),this.handleChangeRemoveOptions=()=>{const{changeRemoveOptions:e}=this.props,{dbChecked:t,dbUserChecked:n,actionLogChecked:s}=this.state;e({Db:t,DbUser:n,ActionLog:s})},this.renderDatabaseOption=()=>{const{db:e,dbUser:t,installationId:n,isDatabaseWillBeRemovedAutomatically:s,isInstanceDatabaseDeletionAllowed:i}=this.props,{dbChecked:a}=this.state;return i&&e?e.sharedWithInstallationsIds.length?(0,L.jsx)(Zn,{children:(0,L.jsx)(Ac,{content:"remove-confirmation.warningDbUsed",params:{name:e.name}})}):(0,L.jsx)(Zn,{children:(0,L.jsx)(it,{checked:a,onChange:e=>{this.setState((n=>{let s=n.dbUserChecked;return t&&!t.sharedWithInstallationsIds.length&&this.isDatabaseUserWillBeRemovedWithDatabase(e)&&(s=!0),{dbChecked:e,dbUserChecked:s}}),this.handleChangeRemoveOptions)},disabled:s,children:(0,L.jsx)(Ac,{content:"remove-confirmation.removeDb",params:{name:e.name}})})}):null},this.isDatabaseUserWillBeRemovedWithDatabase=(e=null)=>{const{db:t,dbUser:n}=this.props;let{dbChecked:s}=this.state;return null!==e&&(s=e),s&&n&&n.willBeRemovedAutomatically&&t&&!t.sharedWithInstallationsIds.length},this.renderDabaseUserRemovalHint=()=>{const{db:e,dbUser:t}=this.props;return t&&t.willBeRemovedAutomatically?e&&e.sharedWithInstallationsIds.length?null:(0,L.jsx)(Ac,{content:"remove-confirmation.hintAssociatedDbUser"}):(0,L.jsx)(Ac,{content:"remove-confirmation.hintDbUserMaybeUsedInAnotherApp"})},this.renderDatabaseUserOption=()=>{const{dbUser:e,installationId:t,isInstanceDatabaseDeletionAllowed:n}=this.props,{dbUserChecked:s}=this.state;return n&&e?e.sharedWithInstallationsIds.length?(0,L.jsx)(Zn,{children:(0,L.jsx)(Ac,{content:"remove-confirmation.warningDbUserUsed",params:{name:e.name}})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Zn,{children:(0,L.jsx)(it,{checked:s,disabled:this.isDatabaseUserWillBeRemovedWithDatabase(),onChange:e=>{this.setState({dbUserChecked:e},this.handleChangeRemoveOptions)},children:(0,L.jsx)(Ac,{content:"remove-confirmation.removeDbUser",params:{name:e.name}})})}),(0,L.jsx)(Zn,{children:this.renderDabaseUserRemovalHint()})]}):null},this.renderActionLogOption=()=>{const{installationId:e}=this.props,{actionLogChecked:t}=this.state;return(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Zn,{children:(0,L.jsx)(it,{checked:t,onChange:e=>{this.setState({actionLogChecked:e},this.handleChangeRemoveOptions)},children:(0,L.jsx)(Ac,{content:"remove-confirmation.removeActionLog"})})})})},this.renderRemoveOptions=()=>{const{isActionLogAvailable:e}=this.props;return(0,L.jsxs)(L.Fragment,{children:[this.renderDatabaseOption(),this.renderDatabaseUserOption(),e&&this.renderActionLogOption()]})},this.state={dbChecked:!!e.db&&!e.db.sharedWithInstallationsIds.length,dbUserChecked:!!e.dbUser&&!e.dbUser.sharedWithInstallationsIds.length,actionLogChecked:!0}}render(){const{installationTitle:e,isInstanceDatabaseDeletionAllowed:t}=this.props,n=(0,L.jsx)(Wn,{bold:!0,children:e}),s=t?(0,L.jsx)(Ac,{content:"remove-confirmation.hintWillRemoveSuccess",params:{site:n}}):(0,L.jsx)(Ac,{content:"remove-confirmation.hintWillRemoveSuccessRemote"});return(0,L.jsxs)(Xn,{gap:"xs",children:[(0,L.jsx)(Zn,{children:s}),this.renderRemoveOptions()]})}}zL.defaultProps={isInstanceDatabaseDeletionAllowed:!1};const qL=zL,GL=({installationId:e,assetsType:t,page:n,pageSize:s,term:i="",token:a,compatible:r=!1,rating:o=0,lastUpdated:l="all",numberOfInstallations:c=0})=>u=>(t===au?fp.getInstallationsPlugins(e,n,s,r,c,l,o,i,{cancelToken:a}):fp.getInstallationsThemes(e,n,s,r,c,l,o,i,{cancelToken:a})).then((({data:e})=>(u(KL(t,e.items)),e))).catch((e=>(u(_p(e)),Promise.reject()))),KL=Nc(tS,"assetsType","items"),XL=(e,t,n)=>s=>(s(ZL(t,[e.slug])),{[au]:()=>fp.instalationsPluginsInstall(t,{slug:e.slug,status:!0}).then((({data:n})=>(s(JL(t,e.slug)),s({type:tg,installationId:t,data:n}),n))).catch((n=>(s(JL(t,e.slug)),s(_p(n)),Promise.reject()))),[iu]:()=>fp.instalationsThemesInstall(t,{slug:e.slug,status:!1}).then((({data:n})=>(s(JL(t,e.slug)),s({type:Mg,installationId:t,data:n}),n))).catch((n=>(s(JL(t,e.slug)),s(_p(n)),Promise.reject())))}[n]()),ZL=Nc(nS,"instanceId","itemsIds"),JL=Nc(sS,"instanceId","slug"),QL=(e,t,n)=>s=>(t===au?fp.instalationsPluginsUploadAndInstall(e,n,!0):fp.instalationsThemesUploadAndInstall(e,n,!1)).then((({data:e})=>(s(eM(e.task)),e))).catch((e=>422===e.response.status?(s(yp(e)),Promise.reject(e)):(s(_p(e)),Promise.reject()))),eM=e=>t=>t({type:iS,task:e}),tM=()=>e=>e({type:"asset/UPLOAD_AND_INSTALL_ASSET_TO_SINGLE_INSTANCE_FINISHED_WITH_ERRORS"}),nM=(e,t)=>n=>t===au?n(nv({instancesIds:[e]})).then((()=>n(tb(e)))).finally((()=>n({type:aS}))):n(nv({instancesIds:[e]})).then((()=>n(pb(e)))).finally((()=>n({type:aS}))),sM=e=>{const t=Number(e);e=String(e);let n=null,s=null;return t>1e6?(n=Math.round(t/1e6),s=(0,L.jsx)(Ac,{content:"general-ui.native-assets.numMillions"})):t>1e3&&(n=Math.round(t/1e3),s=(0,L.jsx)(Ac,{content:"general-ui.native-assets.numThousands"})),n&&s&&(e=(0,L.jsx)(Ac,{content:"general-ui.native-assets.downloaded",params:{number:n,word:s}})),e},iM=(e,t)=>e.some((e=>!(t.name!==e.name||t.version&&e.version&&t.version!==e.version)));class aM extends U.Component{constructor(){super(...arguments),this.state={imageUrl:!1,showFullDescription:!1,isRefreshingProductId:!1},this.isThemes=()=>this.props.type===iu,this.handleInstallAsset=()=>{const{item:e,installation:t,type:n,install:s,isInstalling:i}=this.props;i||s(e,t.id,n).then((e=>{const t=n===au?"controllers.index.install-plugin.itemInstalled":"controllers.index.install-theme.itemInstalled",s=(0,L.jsx)(Ac,{content:t,params:{title:e.title}});this.props.addSuccessMessage(s)})).catch((()=>{}))},this.getTitle=e=>{const t=sM(e.downloaded),{name:n,profile:s}=e.author;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(je,{className:"maximum-z-index",title:(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(e.title)}}),children:(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(e.title)}})}),(0,L.jsx)("br",{}),(0,L.jsx)(Ur,{value:e.rating.score})," ",(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.numberOfRatings",params:{numRatings:e.rating.amount}})}),(0,L.jsx)("br",{}),(0,L.jsxs)(Xs,{children:[(0,L.jsx)(je,{className:"maximum-z-index",title:(0,L.jsx)(Ac,{content:"general-ui.native-assets.tooltipDownloaded"}),children:(0,L.jsx)(he,{name:"arrow-down-tray"})})," ",t]}),(0,L.jsx)("br",{}),n&&s&&(0,L.jsxs)(Xs,{className:"wpt-mgr-20",children:[(0,L.jsx)(he,{name:"user"})," ",(0,L.jsx)(fe,{target:"_blank",href:s,children:n})]})]})},this.getSiteHeader=(e,t)=>(0,L.jsx)(U.Fragment,{children:(0,L.jsx)(At,{image:this.state.imageUrl,children:e.previewUrl&&(0,L.jsx)(Ue,{intent:"primary",component:"a",href:e.previewUrl,target:"_blank",children:(0,L.jsx)(Ac,{content:`general-ui.native-${t}.previewUrl`})})})}),this.getRowContent=(e,t,n)=>{const s=Ox()(e.shortDescription),{showFullDescription:i}=this.state,a=(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:s}}),r=(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:s.substring(0,300)}}),{type:o,blockedPlugins:l}=this.props;let c=r;if(s.length>320&&(c=i?(0,L.jsxs)(U.Fragment,{children:[a," ",(0,L.jsx)(fe,{onClick:()=>this.setState({showFullDescription:!1}),children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.showLess"})})]}):(0,L.jsxs)(U.Fragment,{children:[r,"... ",(0,L.jsx)(fe,{onClick:()=>this.setState({showFullDescription:!0}),children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.showMore"})})]})),o===au&&l.includes(e.slug)){const t=e.isInstalled||n&&n.find((t=>t.slug===e.slug));c=(0,L.jsx)(Wn,{intent:"danger",children:(0,L.jsx)(Ac,{content:t?"general-ui.native-assets.installedBlacklistedPluginHint":"general-ui.native-assets.blacklistedPluginHint"})})}return(0,L.jsxs)("div",{className:"wpt-display-flex",children:[(0,L.jsx)("div",{className:"list-assets-description",children:(0,L.jsx)(as,{component:"div",children:c})}),(0,L.jsxs)("div",{className:"list-assets-actions",children:[this.getInstallActionContent(e,t,n),this.props.type===au&&this.getDetailsActionContent(e),this.getRequiresActionContent(e)]})]})},this.getInstallActionContent=(e,t,n)=>{const{type:s,blockedPlugins:i}=this.props;return e.isInstalled||n&&n.find((t=>t.slug===e.slug))?(0,L.jsx)("div",{className:"list-assets-actions-item","data-test-id":"plugendio-asset-installed-label",children:(0,L.jsxs)(Wn,{intent:"success",children:[(0,L.jsx)(he,{name:"circle-check-mark"})," ",(0,L.jsx)(Ac,{content:"general-ui.native-assets.labelInstalled"})]})}):(0,L.jsx)("div",{className:"list-assets-actions-item",children:(0,L.jsx)(Ue,{disabled:s===au&&i.includes(e.slug),tooltip:s===au&&i.includes(e.slug)&&(0,L.jsx)(Ac,{content:"general-ui.native-assets.blacklistedPluginHint"}),state:this.props.isInstalling?"loading":void 0,onClick:this.handleInstallAsset,"data-test-id":"plugendio-install-button",children:(0,L.jsx)(Ac,{content:this.props.isInstalling?"general-ui.native-assets.buttonInstalling":"general-ui.native-assets.buttonInstall"})})})},this.getDetailsActionContent=()=>(0,L.jsx)("div",{className:"list-assets-actions-item",children:(0,L.jsx)(fe,{onClick:this.props.handleDetailsClick,"data-test-id":"plugendio-details-link",children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.buttonDetails"})})}),this.getRequiresActionContent=e=>e.requires&&(0,L.jsxs)("div",{className:"list-assets-actions-item",children:[(0,L.jsx)(je,{className:"maximum-z-index",title:(0,L.jsx)(Ac,{content:"general-ui.native-assets.tooltipVersion",params:{version:e.requires}}),children:(0,L.jsx)(he,{src:e.logoUrl})})," ",e.requires]})}componentWillMount(){if(this.isThemes())return void this.setState({imageUrl:this.props.item.screenshotUrl});this.setState({imageUrl:this.props.urls.defaultAssetImageUrl});const e=new Image;e.src=this.props.item.screenshotUrl,e.onerror=()=>{const t=new Image;t.src=e.src.replace(".png",".jpg"),t.onload=()=>this.setState({imageUrl:t.src})},e.onload=()=>this.setState({imageUrl:e.src})}componentDidMount(){try{const e=document.querySelector("#native-assets-list");e&&e.querySelectorAll(`.${_u}card__buttons`).forEach((e=>{e.style.display="none"}))}catch(e){}}render(){const{item:e,installation:t,type:n,installedAssets:s}=this.props;return(0,L.jsx)(Ft,{view:"row",title:this.getTitle(e),className:`native-asset-${t.id}-${e.slug} ${this.props.className}`,sideHeader:this.getSiteHeader(e,n),rowContent:this.getRowContent(e,t.id,s)})}}aM.propTypes={type:Vt().oneOf([au,iu]).isRequired,installation:Vt().shape({id:Vt().number.isRequired}).isRequired,className:Vt().string,install:Vt().func.isRequired,item:Vt().shape({author:Vt().shape({name:Vt().string.isRequired,profile:Vt().string.isRequired}),downloaded:Vt().number.isRequired,installed:Vt().bool.isRequired,logoUrl:Vt().string.isRequired,previewUrl:Vt().string.isRequired,rating:Vt().shape({amount:Vt().number.isRequired,score:Vt().number.isRequired}),requires:Vt().string.isRequired,screenshotUrl:Vt().string.isRequired,shortDescription:Vt().string.isRequired,slug:Vt().string.isRequired,tested:Vt().string.isRequired,title:Vt().string.isRequired,updated:Vt().string.isRequired,version:Vt().string.isRequired}),isInstalling:Vt().bool.isRequired,handleDetailsClick:Vt().func.isRequired,installedAssets:Vt().array,urls:Vt().shape({defaultAssetImageUrl:Vt().string.isRequired}).isRequired,blockedPlugins:Vt().array.isRequired,addSuccessMessage:Vt().func.isRequired},aM.defaultProps={installedAssets:null,className:""};const rM=(0,so.$j)((e=>({urls:e.app.urls,themes:e.instances.themes,blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})),(e=>({install:nh(XL,e),addSuccessMessage:nh(wp,e)})))(aM);class oM extends U.Component{constructor(e){super(e),this.handleMoveLeft=()=>{const e=Object.keys(this.props.screenshots),{activeKey:t}=this.state,n=e.length-1;if(t===e[0])return this.setState({activeKey:e[n]});const s=e.findIndex((e=>e===t));return this.setState({activeKey:e[s-1]})},this.handleMoveRight=()=>{const e=Object.keys(this.props.screenshots),{activeKey:t}=this.state,n=e.length-1;if(t===e[n])return this.setState({activeKey:e[0]});const s=e.findIndex((e=>e===t));return this.setState({activeKey:e[s+1]})};const t=Object.keys(e.screenshots);this.state={activeKey:t[0]}}render(){const{activeKey:e}=this.state,t=this.props.screenshots[e],n=Object.keys(this.props.screenshots).length,{maxPictureHeight:s}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("div",{className:"wpt-screenshot-wrapper",children:[n>1&&(0,L.jsx)("div",{onClick:this.handleMoveLeft,className:"slider-prev-control",children:(0,L.jsx)("i",{className:"left-arrow"})}),(0,L.jsx)("div",{className:"slider-wrapper",children:(0,L.jsx)("img",{style:{maxHeight:s},src:t.src})}),n>1&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{onClick:this.handleMoveRight,className:"slider-next-control",children:(0,L.jsx)("i",{className:"right-arrow"})}),(0,L.jsx)("div",{className:"slider-dot-control",children:Object.keys(this.props.screenshots).reduce(((t,n)=>(t.push((0,L.jsx)("div",{onClick:()=>this.setState({activeKey:n}),className:"slider-dot-control-image "+(n===e?"slider-dot-control-image__selected":"")},`dot-image-${n}`)),t)),[])})]})]}),t.caption&&(0,L.jsx)("div",{className:"wpt-screenshot-info",children:(0,L.jsx)("h3",{children:Ox()(t.caption,{allowedTags:[]})})})]})}}oM.defaultProps={maxPictureHeight:0};const lM=oM;class cM extends U.Component{constructor(e){super(e),this.state={imageUrl:!1,itemDetails:null,pictureHeight:null},this.calcPictureSize=()=>{const e=document.documentElement.clientHeight,t=(e,t=!0)=>{try{const n=document.querySelectorAll(`.assetDetailDrawer ${e}`).item(0);return t?n.clientHeight:n.clientWidth}catch(e){return 0}},n=t(`.${_u}drawer-header`),s=t(`.${_u}drawer__subheader`),i=t(".asset-detail-container--short-description");this.setState({pictureHeight:e-n-s-i-118})},this.handleInstallAsset=()=>{const{item:e,instanceId:t,install:n,isInstalling:s}=this.props;s||n(e,t,au).catch((()=>{}))},this.getSiteHeader=e=>(0,L.jsx)(At,{image:this.state.imageUrl,children:e.previewUrl&&(0,L.jsx)(Ue,{intent:"primary",component:"a",href:e.previewUrl,target:"_blank",children:(0,L.jsx)(Ac,{content:"general-ui.native-plugins.previewUrl"})})}),this.getInstallActionContent=(e,t)=>e.installed||t&&t.find((t=>t.slug===e.slug))?(0,L.jsxs)(Wn,{intent:"success","data-test-id":"plugendio-details-installed-label",children:[(0,L.jsx)(he,{name:"circle-check-mark"})," ",(0,L.jsx)(Ac,{content:"general-ui.native-assets.labelInstalled"})," ",this.props.blockedPlugins.includes(e.slug)&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"general-ui.native-assets.installedBlacklistedPluginHint"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:16})})]}):(0,L.jsx)(Ue,{state:this.props.isInstalling?"loading":void 0,onClick:this.handleInstallAsset,"data-test-id":"plugendio-details-install-button",disabled:this.props.blockedPlugins.includes(e.slug),tooltip:this.props.blockedPlugins.includes(e.slug)&&(0,L.jsx)(Ac,{content:"general-ui.native-assets.blacklistedPluginHint"}),children:(0,L.jsx)(Ac,{content:this.props.isInstalling?"general-ui.native-assets.buttonInstalling":"general-ui.native-assets.buttonInstall"})}),this.getRating=e=>(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Ur,{value:e.score})," ",(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.numberOfRatings",params:{numRatings:e.amount}})})]}),this.getTabs=(e,t)=>{let n=[],s=1;const i=this.getInfoCols();return e.sections.length&&(n=e.sections.map((e=>(0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:`general-ui.native-assets.${e.type}`}),children:(0,L.jsxs)("div",{style:{display:"flex"},children:[(0,L.jsx)("div",{style:{flex:1},dangerouslySetInnerHTML:{__html:Ox()(e.content,Object.assign(Object.assign({},Ix.defaults),{transformTags:{a:(e,t)=>({tagName:"a",attribs:Object.assign(Object.assign({},t),{target:"_blank"})})}}))}}),i&&(0,L.jsx)("div",{style:{width:320},children:(0,L.jsx)(Xn,{xs:2,style:{paddingLeft:40},children:i})})]})},s++)))),t&&n.push((0,L.jsx)(Fr,{title:(0,L.jsx)(Ac,{content:"general-ui.native-assets.screenshoots"}),children:(0,L.jsx)(lM,{maxPictureHeight:this.state.pictureHeight,screenshots:e.screenshots})},"screenshoots")),n},window.addEventListener("resize",this.calcPictureSize,!1),this.props.getPluginInfo({slug:this.props.item.slug,instanceId:this.props.instanceId}).then((e=>this.setState({itemDetails:e}))).catch((()=>{})),this.setState({imageUrl:this.props.urls.defaultAssetImageUrl});const t=new Image;t.src=this.props.item.screenshotUrl,t.onerror=()=>{const e=new Image;e.src=t.src.replace(".png",".jpg"),e.onload=()=>this.setState({imageUrl:e.src})},t.onload=()=>this.setState({imageUrl:t.src})}componentDidMount(){setTimeout((()=>this.calcPictureSize()),1e3)}componentWillUnmount(){window.removeEventListener("resize",this.calcPictureSize)}getInfoCols(){const{itemDetails:e}=this.state,{version:t,updated:n,requires:s,rating:i,tested:a}=e,r=sM(e.downloaded);let o=0;const l=[];return t&&l.push((0,L.jsx)(Zn,{className:"detail-row-info",children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.cols.version"})},++o+"-col"),(0,L.jsx)(Zn,{className:"detail-row-info",children:t},++o+"-col")),n&&l.push((0,L.jsx)(Zn,{className:"detail-row-info",children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.cols.lastUpdated"})},++o+"-col"),(0,L.jsx)(Zn,{className:"detail-row-info",children:Xf()(n).fromNow()},++o+"-col")),r&&l.push((0,L.jsx)(Zn,{className:"detail-row-info",children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.cols.activeInstallations"})},++o+"-col"),(0,L.jsx)(Zn,{className:"detail-row-info",children:r},++o+"-col")),s&&l.push((0,L.jsx)(Zn,{className:"detail-row-info",children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.cols.requires"})},++o+"-col"),(0,L.jsx)(Zn,{className:"detail-row-info",children:s},++o+"-col")),a&&l.push((0,L.jsx)(Zn,{className:"detail-row-info",children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.cols.tested"})},++o+"-col"),(0,L.jsx)(Zn,{className:"detail-row-info",children:a},++o+"-col")),i&&l.push((0,L.jsx)(Zn,{className:"detail-row-info",children:(0,L.jsx)(Ac,{content:"general-ui.native-assets.cols.ratings"})},++o+"-col"),(0,L.jsx)(Zn,{className:"detail-row-info",children:this.getRating(i)},++o+"-col")),l}render(){const{installedAssets:e}=this.props,{itemDetails:t}=this.state;if(null===t)return null;const n=t.screenshots&&Object.keys(t.screenshots).length>0,{author:s,title:i}=t;return(0,L.jsxs)("div",{className:"asset-detail-container","data-test-id":"plugendio-details-drawer",children:[(0,L.jsxs)("div",{className:"asset-detail-container--short-description",children:[(0,L.jsx)("div",{className:"short-description-logo",children:this.getSiteHeader(t)}),(0,L.jsxs)("div",{className:"short-description-main-section",children:[(0,L.jsx)("h2",{dangerouslySetInnerHTML:{__html:Ox()(i)}}),s&&(0,L.jsx)("div",{className:"list-assets-description-author",children:(0,L.jsxs)(Xs,{children:[(0,L.jsx)(he,{name:"user"})," ",(0,L.jsx)(fe,{href:s.profile,target:"_blank",children:s.name})]})}),(0,L.jsx)("div",{className:"short-description-install-button",style:{marginTop:15},children:this.getInstallActionContent(t,e)})]})]}),(0,L.jsx)("div",{className:"asset-details-tabs",children:t||n?(0,L.jsx)(Br,{children:this.getTabs(t,n)}):(0,L.jsx)(wS,{})})]})}}cM.propTypes={instanceId:Vt().string.isRequired,install:Vt().func.isRequired,item:Vt().shape({id:Vt().string.isRequired,name:Vt().string.isRequired,slug:Vt().string.isRequired,shortDescription:Vt().string.isRequired,author:Vt().string,num_ratings:Vt().any,authorProfile:Vt().string,screenshotUrl:Vt().string.isRequired,logoUrl:Vt().string.isRequired,requires:Vt().string,isInstalled:Vt().bool.isRequired,rating:Vt().number.isRequired,previewUrl:Vt().string,version:Vt().string,downloaded:Vt().string,tested:Vt().string}).isRequired,isInstalling:Vt().bool.isRequired,installedAssets:Vt().array,getPluginInfo:Vt().func.isRequired,urls:Vt().shape({defaultAssetImageUrl:Vt().string.isRequired}).isRequired,blockedPlugins:Vt().array.isRequired},cM.defaultProps={installedAssets:null};const uM={install:XL,getPluginInfo:nb},dM=(0,so.$j)((e=>({urls:e.app.urls,blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList})),uM)(cM),pM={hideRatingFilter:!1,rating:0,numberOfInstallations:0,compatible:!1,lastUpdated:"all"};class hM extends U.Component{constructor(e){super(e),this.isFiltered=()=>0!==this.state.numberOfInstallations||!1!==this.state.compatible||0!==this.state.rating||"all"!==this.state.lastUpdated,this.resetState=()=>this.setState(Object.assign({},pM)),this.handleClearFilter=()=>{this.resetState(),this.props.onClearFilter()},this.handleRunFilter=()=>{const{rating:e,compatible:t,lastUpdated:n,numberOfInstallations:s}=this.state,{setLoading:i,setFiltered:a,updateFilterState:r}=this.props;return i(!0),a(this.isFiltered()),r({rating:e,compatible:t,lastUpdated:n,numberOfInstallations:s})},this.handleClickRatingItem=e=>{this.setState({rating:e},(()=>this.handleRunFilter()))},this.handleSetMinNumberOfInstallations=e=>{this.setState({numberOfInstallations:e},(()=>this.handleRunFilter()))},this.handleCompatibleChange=e=>{this.setState({compatible:e},(()=>this.handleRunFilter()))},this.handleSetLastUpdatedFilter=e=>{this.setState({lastUpdated:e},(()=>this.handleRunFilter()))},this.ratingArr=[2,3,4,4.5],this.minNubmerOfInstallationsArr=[0,1e5,1e6],this.lastUpdatedAttr=["all","3M","6M","1y","2y"],this.state=Object.assign({},pM)}componentDidUpdate(e){e.type!==this.props.type&&this.resetState()}render(){const{type:e,version:t}=this.props,{rating:n,compatible:s,lastUpdated:i,numberOfInstallations:a}=this.state;return(0,L.jsx)(U.Fragment,{children:(0,L.jsxs)(vi,{vertical:!0,title:(0,L.jsxs)("div",{className:"wpt-display-flex",children:[(0,L.jsx)("div",{children:(0,L.jsx)(Ac,{content:"general-ui.native-filter.title"})}),this.isFiltered()&&(0,L.jsx)("div",{className:"wpt-assets-filter-clear",children:(0,L.jsx)(fe,{icon:{style:{marginTop:2},name:"cross-mark",size:"16"},onClick:this.handleClearFilter,children:(0,L.jsx)(Ac,{content:"general-ui.native-filter.clear"})})})]}),className:"wpt-assets-filter",children:[e===au?(0,L.jsx)(Ks,{children:(0,L.jsx)(it,{checked:s,onChange:e=>this.handleCompatibleChange(e),children:(0,L.jsx)(Ac,{content:"general-ui.native-filter.compatible",params:{version:t}})})}):null,(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"general-ui.native-filter.minNubmerOfInstallationsArr.title"}),children:(0,L.jsx)(Re,{children:(0,L.jsx)($n,{buttons:this.minNubmerOfInstallationsArr.map((e=>({title:(0,L.jsx)(Ac,{content:`general-ui.native-filter.minNubmerOfInstallationsArr.>${e}`}),value:e}))),onChange:e=>this.handleSetMinNumberOfInstallations(e),selected:a})})}),(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"general-ui.native-filter.ratings.title"}),children:(0,L.jsxs)("div",{className:"wpt-native-assets-filter-item",children:[(0,L.jsxs)("label",{children:[(0,L.jsx)("input",{value:0,checked:0===n,type:"radio",name:"ratingFilterOn",onChange:()=>this.handleClickRatingItem(0)})," ",(0,L.jsx)(Ac,{content:"general-ui.native-filter.ratings.all"})]}),this.ratingArr.map((e=>(0,L.jsxs)("label",{children:[(0,L.jsx)("input",{value:e,checked:n===e,type:"radio",name:"ratingFilterOn",onChange:()=>this.handleClickRatingItem(e)})," ",(0,L.jsx)(Ur,{value:e})]},`filter-${e}`)))]})}),e===au?(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"general-ui.native-filter.lastUpdated.title"}),children:(0,L.jsx)("div",{className:"wpt-native-assets-filter-item",children:this.lastUpdatedAttr.map((e=>(0,L.jsxs)("label",{children:[(0,L.jsx)("input",{onChange:e=>this.handleSetLastUpdatedFilter(e.target.value),value:e,checked:e===i,type:"radio",name:"lastUpdated"})," ",(0,L.jsx)(Ac,{content:`general-ui.native-filter.lastUpdated.${e}`})]},`last-updated-${e}`)))})}):null]})})}}hM.propTypes={type:Vt().oneOf([au,iu]).isRequired,version:Vt().string.isRequired,onClearFilter:Vt().func.isRequired,setLoading:Vt().func.isRequired,setFiltered:Vt().func.isRequired,updateFilterState:Vt().func.isRequired};const mM=hM,fM=["zip"];class gM extends U.Component{constructor(e){super(e),this.state={}}render(){const{assetType:e,disabled:t,onUpload:n,onUploadRejected:s,baseClassName:i}=this.props,a=fM.map((e=>`.${e}`)).join(", "),r=fM.map((e=>`*.${e}`)).join(", ");return(0,L.jsxs)(Cx,{className:`${i}__dropzone`,onDrop:n,multiple:!1,onDropRejected:s,accept:a,disabled:t,inputProps:{"data-test-id":"custom-asset-file-upload"},children:[(0,L.jsx)(Ue,{className:`${i}__upload-button`,disabled:t,children:e===au?(0,L.jsx)(Ac,{content:"general-ui.native-assets-upload.buttonUploadCustomPlugin"}):(0,L.jsx)(Ac,{content:"general-ui.native-assets-upload.buttonUploadCustomTheme"})}),(0,L.jsx)("span",{children:r})]})}}gM.propTypes={assetType:Vt().oneOf([au,iu]).isRequired,disabled:Vt().bool,onUpload:Vt().func.isRequired,onUploadRejected:Vt().func.isRequired,baseClassName:Vt().string},gM.defaultProps={disabled:!1,baseClassName:`${gu}native-assets-upload`};const bM=gM,vM=({onRemove:e,isProcessing:t,showProcessing:n})=>n?(0,L.jsx)(wS,{}):(0,L.jsx)(fe,{icon:MT("remove"),onClick:t?()=>{}:e}),yM=({asset:e,onDeactivate:t,onActivate:n,isProcessing:s,showProcessing:i,title:a=null,disabled:r=!1})=>{const o=e.status,l=o?t:n;return(0,L.jsx)(Nr,{tooltip:a,checked:o,disabled:e.disabled||s||r,onChange:s?()=>{}:l,loading:i,"data-test-status":e.status})};class _M extends U.Component{constructor(e){super(e),this.setMustUsePopoverVisible=e=>this.setState({isMustUsePopoverVisible:e}),this.state={isMustUsePopoverVisible:!1}}renderMustUseLabel(){const{isMustUsePopoverVisible:e}=this.state;return(0,L.jsxs)(An,{target:(0,L.jsx)(ye,{view:"outline",intent:"info",onClick:()=>{this.setMustUsePopoverVisible(!e)},children:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.mustUseLabel"})}),visible:e,onClose:()=>this.setMustUsePopoverVisible(!1),children:[(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.mustUseDescriptionText"})," ",(0,L.jsx)(wn,{href:"https://developer.wordpress.org/advanced-administration/plugins/mu-plugins/",target:"_blank",onClick:()=>{this.setMustUsePopoverVisible(!1)},children:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.mustUseDescriptionLink"})})]})}render(){const{asset:e,installationId:t,showVulnerableWarning:n,onOpenSecurityDialog:s,baseClassName:i}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("span",{children:[`${e.title} ${e.version}`," ",(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:MT("circle-info")}),placement:"bottom",children:(0,L.jsx)("p",{children:e.description})}),e.mustUse?(0,L.jsxs)(L.Fragment,{children:[" ",this.renderMustUseLabel()]}):null]}),n&&(0,L.jsx)("span",{className:`${i}__vulnerable-status`,children:(0,L.jsx)(fe,{icon:e.status?(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:"danger",size:"16"}):(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),onClick:()=>s(t,1),"data-test-id":"instance-asset-vulnerable-link",children:(0,L.jsx)(Ac,{content:"titleListColumn.vulnerableLink"})})})]})}}_M.defaultProps={baseClassName:`${gu}title-list-column`};const xM=_M,SM=({hasUpdates:e,onUpdatesOpen:t})=>e?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fe,{onClick:t,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesSectionTitle"})})," "]}):null,wM=({disabled:e=!1,installationId:t,hasAdminCredentials:n,localeKey:s,tooltip:i=null})=>n?(0,L.jsx)(Ac,{params:{url:(0,L.jsx)(SL,{disabled:e,instanceId:t,tooltip:i,children:(0,L.jsx)(Ac,{content:"general-ui.WordPress"})})},content:s}):null,kM=({onAddItem:e,onRemoveItems:t,isRemoveItemsDisabled:n,installationId:s,hasAdminCredentials:i,addLocaleKey:a,removeLocaleKey:r,manageLocaleKey:o,isWordPressLoginDisabled:l=!1,tooltipWordPressLogin:c=null,autoUpdateAllAssetsLocaleKey:u,autoUpdateAllAssetsSwitchChecked:d=!1,autoUpdateAllAssetsSwitchDisabled:p=!1,autoUpdateAllAssetsSwitchLoading:h=!1,autoUpdateAllAssetsSwitchTooltip:m=null,onChangeAutoUpdates:f})=>(0,L.jsx)(Ks,{children:(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:a}),children:(0,L.jsx)(Ue,{onClick:e,icon:"plus","data-test-id":"install-button",children:(0,L.jsx)(Ac,{content:a})})}),(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:r}),children:(0,L.jsx)(Ue,{onClick:t,icon:"remove",disabled:n,children:(0,L.jsx)(Ac,{content:r})})}),(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:o}),children:(0,L.jsx)(wM,{disabled:l,installationId:s,hasAdminCredentials:i,localeKey:o,tooltip:c})}),(0,L.jsx)(ts,{}),(0,L.jsxs)(_s,{title:"autoUpdateAllAssets",children:[(0,L.jsx)(Nr,{checked:d,disabled:p,onChange:f,loading:h,tooltip:m})," ",(0,L.jsx)(Ac,{content:u})]})]})}),jM=({dialog:e,type:t,onClose:n})=>e.isOpen?(0,L.jsx)(ji,{isOpen:e.isOpen,cancelTitle:(0,L.jsx)(Ac,{content:`controllers.index.manage-${t}.removeDialogButtonNo`}),buttons:(0,L.jsx)(Ue,{intent:"primary",onClick:e.handleSubmit,"data-test-id":"button-yes",children:(0,L.jsx)(Ac,{content:`controllers.index.manage-${t}.removeDialogButtonYes`})}),size:"sm",onClose:n,"data-test-id":"confirmation-remove-dialog",children:e.content}):null,TM=({current:e,total:t,onSelect:n})=>t>1?(0,L.jsx)(Gn,{current:e,total:t,onSelect:n}):null,CM=(e,t)=>e.filter((e=>t.some((t=>e.slug===t.slug&&e.version===t.version)))).length!==e.length,DM={isOpen:!1,handleSubmit:()=>{},content:(0,L.jsx)(L.Fragment,{})};class PM extends U.Component{constructor(e){super(e),this.handleAddItem=()=>{this.props.checkSession().then((()=>this.props.onOpenNativePlugins()))},this.handleRemoveItems=e=>{const{installation:{id:t},pluginsV2:n}=this.props;if(0===e.length)return;const s=n.filter((t=>-1!==e.indexOf(t.slug))).map((e=>e.slug));this.setState({dialog:{isOpen:!0,handleSubmit:()=>{this.props.pluginsActions.remove(t,s).then((()=>{this.props.addSuccessMessage((0,L.jsx)(Ac,{content:"controllers.index.uninstall-plugins.itemsUpdated"}));const{pages:t}=Vc(this.getAssets(),this.state.currentPage,10),n=this.state.selection.filter((t=>-1===e.indexOf(t)));this.state.currentPage>t?this.setState({currentPage:t||1,selection:n}):this.setState({selection:n})})).catch((()=>{})),this.handleCloseDialog()},content:1===e.length?(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.confirmRemoveItem"}):(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.confirmRemoveItems"})}})},this.handleCloseDialog=()=>this.setState({dialog:Object.assign({},DM)}),this.handleOpenActivateVulnerablePluginConfirmation=e=>{this.setState({showActivateVulnerablePluginConfirmation:!0,activateVulnerablePluginConfirmationPluginId:e})},this.handleCloseActivateVulnerablePluginConfirmation=()=>{this.setState({showActivateVulnerablePluginConfirmation:!1,activateVulnerablePluginConfirmationPluginId:null})},this.getAssets=()=>{const{installation:{id:e},pluginsV2:t,blockedPlugins:n}=this.props;let s=[];return t&&(s=t.sort(((e,t)=>Qc(e.title,t.title))).map((t=>{const s=t.slug;return Object.assign(Object.assign({key:s},t),{instanceId:e,meta:{autoUpdates:{canBeEnabled:!t.autoUpdates&&!n.includes(t.slug),canBeDisabled:t.autoUpdates&&(t.autoUpdatesAvailable||n.includes(t.slug))}},isAssetVulnerableWhenEnabled:Ug(t.slug,this.props.pluginsVulnerabilityStatuses,[op.DeactivateAsset])})}))),s},this.filterOutMustUsePluginKeys=e=>{const t=this.getAssets().filter((e=>e.mustUse)).map((e=>e.key));return e.filter((e=>!t.includes(e)))},this.handlePluginStatusChange=(e,t)=>{this.props.pluginsActions.activateOrDeactivatePlugin(e,t).then((t=>{const n=t?"asset.plugin.activated":"asset.plugin.deactivated",s=(0,L.jsx)(Ac,{content:n,params:{pluginTitle:e.title}});this.props.addSuccessMessage(s)})).catch((()=>{}))},this.addPluginsToChangingPluginsAutoUpdates=e=>{this.setState((t=>{const n=new Set(t.changingPluginsAutoUpdates.values());return e.forEach((e=>{n.add(e)})),{changingPluginsAutoUpdates:n}}))},this.removePluginsFromChangingPluginsAutoUpdates=e=>{this.setState((t=>{const n=new Set(t.changingPluginsAutoUpdates.values());return e.forEach((e=>{n.delete(e)})),{changingPluginsAutoUpdates:n}}))},this.isAutoUpdateAllPluginsSwitchChecked=()=>this.getAssets().filter((e=>!e.mustUse)).every((e=>!e.meta.autoUpdates.canBeEnabled)),this.isAutoUpdateAllPluginsSwitchDisabled=()=>!this.props.installation.features.updates.autoUpdatesAvailable||(this.isAutoUpdateAllPluginsSwitchChecked()?!this.getAssets().some((e=>e.meta.autoUpdates.canBeDisabled)):!this.getAssets().some((e=>e.meta.autoUpdates.canBeEnabled))),this.getAutoUpdateAllAssetsSwitchTooltip=()=>this.isAutoUpdateAllPluginsSwitchDisabled()?(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.pluginsAutoUpdatesEnabledHint"}):this.isAutoUpdateAllPluginsSwitchChecked()?(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.autoUpdateAllPluginsTurnedOnHint"}):(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.autoUpdateAllPluginsTurnedOffHint"}),this.renderList=()=>{const{isPaginationEnabled:e}=this.props,{currentPage:t,selection:n,dialog:s,isLoading:i}=this.state;if(i)return(0,L.jsx)(It,{});const{pages:a,currentItems:r}=e?Vc(this.getAssets(),t,10):{pages:1,currentItems:this.getAssets()};return 0===r.length?(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.noPluginsYet"}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Wa,{columns:this.getColumns(),data:r,selection:n,onSelectionChange:e=>this.setState({selection:e}),"data-test-id":Mh,rowProps:e=>({"data-test-plugin-slug":e.slug.toLowerCase()})}),e&&(0,L.jsx)(TM,{current:this.state.currentPage,total:a,onSelect:e=>this.setState({currentPage:e,selection:[]})}),(0,L.jsx)(jM,{dialog:s,type:au,onClose:this.handleCloseDialog})]})},this.state={currentPage:1,selection:[],dialog:Object.assign({},DM),isLoading:!this.props.pluginsV2||0===Object.keys(this.props.pluginsV2).length,changingPluginsAutoUpdates:new Set,isAutoUpdateAllPluginsSwitchLoading:!1,showActivateVulnerablePluginConfirmation:!1,activateVulnerablePluginConfirmationPluginId:null}}componentDidMount(){this.state.isLoading&&this.loadPlugins()}componentDidUpdate(e){const t=CM(e.pluginsV2,this.props.pluginsV2),n=CM(this.props.pluginsV2,e.pluginsV2);(t||n)&&this.props.getInstallationsVulnerabilityStatuses([this.props.installation.id]).catch((()=>{}))}loadPlugins(){Promise.all([this.props.pluginsActions.getInstallationPlugins(this.props.installation.id).catch((()=>{})),this.props.reloadInstallationsVulnerabilityStatuses([this.props.installation.id])]).catch((()=>{})).finally((()=>this.setState({isLoading:!1})))}getColumns(){const{installation:e,blockedPlugins:t,pluginsActions:{setPluginsAutoUpdates:n},onOpenSecurityDialog:s}=this.props,{isAutoUpdateAllPluginsSwitchLoading:i,showActivateVulnerablePluginConfirmation:a,activateVulnerablePluginConfirmationPluginId:r}=this.state;return[{key:"title",width:"60%",title:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldName"}),render:n=>(0,L.jsxs)(U.Fragment,{children:[t.includes(n.slug)&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.blacklistedPluginHint"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"})})," ",(0,L.jsx)(xM,{asset:n,showVulnerableWarning:n.isAssetVulnerableWhenEnabled,installationId:e.id,onOpenSecurityDialog:s})]})},{key:"state",width:"10%",title:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldState"}),render:e=>{const n=Bc(e),s=this.props.assetsToChangingStatus.has(n),i=s||this.props.assetsToRemove.has(n),o=t.includes(e.slug);return e.mustUse?null:e.isAssetVulnerableWhenEnabled&&!e.status?(0,L.jsx)(BD,{target:(0,L.jsx)(yM,{title:o&&(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.blacklistedPluginHint"}),disabled:o&&!e.status,asset:e,isProcessing:i,showProcessing:s,onActivate:()=>this.handleOpenActivateVulnerablePluginConfirmation(e.key),onDeactivate:()=>this.handlePluginStatusChange(e,!1)}),onActivate:()=>this.handlePluginStatusChange(e,!0),isOpen:a&&r===e.key,onClose:this.handleCloseActivateVulnerablePluginConfirmation,children:(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.activateVulnerablePluginConfirmation",params:{pluginName:e.title}})})}):(0,L.jsx)(yM,{title:o&&(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.blacklistedPluginHint"}),disabled:o&&!e.status,asset:e,isProcessing:i,showProcessing:s,onActivate:()=>this.handlePluginStatusChange(e,!0),onDeactivate:()=>this.handlePluginStatusChange(e,!1)})}},{key:"autoUpdate",width:"10%",title:(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.fieldAutoUpdates"}),align:"center",render:t=>{const s=Bc(t),a=this.props.assetsToChangingStatus.has(s)||this.props.assetsToRemove.has(s),r=!e.features.updates.autoUpdatesAvailable||t.autoUpdates&&!t.meta.autoUpdates.canBeDisabled||!t.autoUpdates&&!t.meta.autoUpdates.canBeEnabled;return!t.mustUse&&(0,L.jsx)(Nr,{tooltip:t.autoUpdates&&!t.autoUpdatesAvailable&&(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.pluginsAutoUpdatesEnabledHint"}),checked:t.autoUpdates,disabled:r||a,onChange:s=>{this.addPluginsToChangingPluginsAutoUpdates([t.slug]),n(e.id,[t],s).catch((()=>{})).finally((()=>this.removePluginsFromChangingPluginsAutoUpdates([t.slug])))},loading:this.state.changingPluginsAutoUpdates.has(t.slug)||i})}},{key:"update",width:"10%",render:e=>{const t=Bc(e),n=this.props.assetsToRemove.has(t);return!e.mustUse&&!n&&(0,L.jsx)(SM,{onUpdatesOpen:this.props.onUpdatesOpen,hasUpdates:null!==e.availableVersion})}},{key:"action",width:"10%",render:e=>{const t=Bc(e),n=this.props.assetsToRemove.has(t),s=n||this.props.assetsToChangingStatus.has(t);return!e.mustUse&&(0,L.jsx)(vM,{onRemove:t=>Rc(t,this.handleRemoveItems,[e.slug]),isProcessing:s,showProcessing:n})}}]}render(){const{installation:{id:e,features:{maintenance:t,credentials:n}},pluginsActions:{setPluginsAutoUpdates:s},showTitle:i}=this.props,{selection:a,isAutoUpdateAllPluginsSwitchLoading:r}=this.state,o=t.status&&t.fullMode?(0,L.jsx)(Ac,{content:"controllers.index.manage-plugins.tooltipPluginsInsideWordpressLink"}):null;return(0,L.jsxs)(vi,{title:i?(0,L.jsx)(Ac,{content:"controllers.index.detail.pluginsTabTitle"}):void 0,collapsed:!this.props.isCollapsible,collapsible:this.props.isCollapsible,children:[(0,L.jsx)(kM,{installationId:e,hasAdminCredentials:n.available,onAddItem:this.handleAddItem,onRemoveItems:()=>this.handleRemoveItems(this.filterOutMustUsePluginKeys(a)),isRemoveItemsDisabled:0===this.filterOutMustUsePluginKeys(a).length,manageLocaleKey:"controllers.index.manage-plugins.managePluginsInsideWordpressLink",addLocaleKey:"controllers.index.manage-plugins.installItem",removeLocaleKey:"controllers.index.manage-plugins.removeItems",isWordPressLoginDisabled:t.status&&t.fullMode||!1,tooltipWordPressLogin:o,autoUpdateAllAssetsLocaleKey:"controllers.index.manage-plugins.autoUpdateAllPlugins",autoUpdateAllAssetsSwitchChecked:this.isAutoUpdateAllPluginsSwitchChecked(),autoUpdateAllAssetsSwitchDisabled:this.isAutoUpdateAllPluginsSwitchDisabled(),autoUpdateAllAssetsSwitchLoading:r,onChangeAutoUpdates:t=>{this.setState({isAutoUpdateAllPluginsSwitchLoading:!0});const n=this.getAssets().filter((e=>t?e.meta.autoUpdates.canBeEnabled:e.meta.autoUpdates.canBeDisabled));s(e,n,t).catch((()=>{})).finally((()=>this.setState({isAutoUpdateAllPluginsSwitchLoading:!1})))},autoUpdateAllAssetsSwitchTooltip:this.getAutoUpdateAllAssetsSwitchTooltip()}),(0,L.jsx)(Ks,{children:this.renderList()})]})}}PM.defaultProps={pluginsV2:[],isPaginationEnabled:!0,showTitle:!0};const IM=(0,so.$j)(((e,t)=>{var n,s;const i=e.instances.pluginsV2[t.installation.id],a=(null===(s=null===(n=e.vulnerabilities.installationsVulnerabilityStatuses)||void 0===n?void 0:n.find((e=>e.id===t.installation.id)))||void 0===s?void 0:s.plugins)||[];return{pluginsV2:i,blockedPlugins:e.app.options.pluginsBlocklistFeatureSettings.pluginsList,assetsToChangingStatus:e.instances.assetsToChangingStatus,assetsToRemove:e.instances.assetsToRemove,pluginsVulnerabilityStatuses:a}}),(e=>({pluginsActions:nh({activateOrDeactivatePlugin:Jg,setPluginsAutoUpdates:eb,getInstallationPlugins:tb,remove:Qg},e),reloadInstallationsVulnerabilityStatuses:nh(Bg,e),getInstallationsVulnerabilityStatuses:nh(Hg,e),checkSession:()=>e(Sp()),addSuccessMessage:nh(wp,e)})))(PM),OM={isOpen:!1,handleSubmit:()=>{},content:(0,L.jsx)(L.Fragment,{})};class LM extends U.Component{constructor(e){super(e),this.handleAddItem=()=>this.props.checkSession().then((()=>this.props.onOpenNativeThemes())),this.getAssets=()=>{const{installation:{id:e},themesV2:t}=this.props;let n=[];return t&&(n=t.sort(((e,t)=>Qc(e.title,t.title))).map((t=>Object.assign(Object.assign({key:t.slug},t),{instanceId:e,isAssetVulnerableWhenEnabled:Ug(t.slug,this.props.themesVulnerabilityStatuses,[op.DeactivateAsset])})))),n},this.handleRemoveItems=e=>{const{installation:{id:t},themesV2:n}=this.props;if(!Array.isArray(e)||!e.length)return;const s=n.filter((t=>-1!==e.indexOf(t.slug))).map((e=>e.slug));this.setState({dialog:{isOpen:!0,handleSubmit:()=>{this.props.themesActions.remove(t,s).then((()=>{this.props.addSuccessMessage((0,L.jsx)(Ac,{content:"controllers.index.uninstall-themes.itemsUpdated"}));const{pages:t}=Vc(this.getAssets(),this.state.currentPage,10),n=this.state.selection.filter((t=>-1===e.indexOf(t)));this.state.currentPage>t?this.setState({currentPage:t||1,selection:n}):this.setState({selection:n})})).catch((()=>{})),this.handleCloseDialog()},content:1===e.length?(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.confirmRemoveItem"}):(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.confirmRemoveItems"})}})},this.handleCloseDialog=()=>this.setState({dialog:Object.assign({},OM)}),this.handleOpenActivateVulnerableThemeConfirmation=e=>{this.setState({showActivateVulnerableThemeConfirmation:!0,activateVulnerableThemeConfirmationThemeId:e})},this.handleCloseActivateVulnerableThemeConfirmation=()=>{this.setState({showActivateVulnerableThemeConfirmation:!1,activateVulnerableThemeConfirmationThemeId:null})},this.handleActivateTheme=e=>{this.props.themesActions.activateTheme({slug:e.slug,instanceId:this.props.installation.id}).then((t=>{t&&this.props.addSuccessMessage((0,L.jsx)(Ac,{content:"asset.theme.activated",params:{themeTitle:e.title}}))})).catch((()=>{}))},this.addThemesToChangingThemesAutoUpdates=e=>{this.setState((t=>{const n=new Set(t.changingThemesAutoUpdates.values());return e.forEach((e=>{n.add(e)})),{changingThemesAutoUpdates:n}}))},this.removeThemesFromChangingThemesAutoUpdates=e=>{this.setState((t=>{const n=new Set(t.changingThemesAutoUpdates.values());return e.forEach((e=>{n.delete(e)})),{changingThemesAutoUpdates:n}}))},this.isAutoUpdateAllThemesSwitchChecked=()=>this.getAssets().every((e=>e.autoUpdates)),this.isAutoUpdateAllThemesSwitchDisabled=()=>{const{installation:{features:{updates:{autoUpdatesAvailable:e}}}}=this.props;return!e||this.getAssets().every((e=>e.autoUpdates&&!e.autoUpdatesAvailable))},this.getAutoUpdateAllThemesSwitchTooltip=()=>this.isAutoUpdateAllThemesSwitchDisabled()?(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.themesAutoUpdatesEnabledHint"}):this.isAutoUpdateAllThemesSwitchChecked()?(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.autoUpdateAllThemesTurnedOnHint"}):(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.autoUpdateAllThemesTurnedOffHint"}),this.renderList=()=>{const{isPaginationEnabled:e}=this.props,{currentPage:t,selection:n,dialog:s,isLoading:i}=this.state;if(i)return(0,L.jsx)(It,{});const{pages:a,currentItems:r}=e?Vc(this.getAssets(),t,10):{pages:1,currentItems:this.getAssets()};return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Wa,{columns:this.getColumns(),data:r,selection:n,onSelectionChange:e=>this.setState({selection:e}),"data-test-id":Mh,rowProps:e=>({"data-test-theme-slug":e.slug.toLowerCase()})}),e&&(0,L.jsx)(TM,{current:t,total:a,onSelect:e=>this.setState({currentPage:e,selection:[]})}),(0,L.jsx)(jM,{dialog:s,type:iu,onClose:this.handleCloseDialog})]})},this.state={currentPage:1,selection:[],dialog:Object.assign({},OM),isLoading:!this.props.themesV2||0===Object.keys(this.props.themesV2).length,changingThemesAutoUpdates:new Set,isAutoUpdateAllThemesSwitchLoading:!1,showActivateVulnerableThemeConfirmation:!1,activateVulnerableThemeConfirmationThemeId:null}}componentDidMount(){this.state.isLoading&&this.loadThemes()}componentDidUpdate(e){const t=CM(e.themesV2,this.props.themesV2),n=CM(this.props.themesV2,e.themesV2);(t||n)&&this.props.getInstallationsVulnerabilityStatuses([this.props.installation.id]).catch((()=>{}))}loadThemes(){Promise.all([this.props.themesActions.getInstallationThemes(this.props.installation.id),this.props.reloadInstallationsVulnerabilityStatuses([this.props.installation.id])]).catch((()=>{})).finally((()=>this.setState({isLoading:!1})))}getColumns(){const{installation:e,themesActions:{setThemesAutoUpdates:t},onOpenSecurityDialog:n}=this.props,{isAutoUpdateAllThemesSwitchLoading:s,showActivateVulnerableThemeConfirmation:i,activateVulnerableThemeConfirmationThemeId:a}=this.state;return[{key:"title",width:"60%",title:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldName"}),render:t=>(0,L.jsx)(xM,{asset:t,installationId:e.id,onOpenSecurityDialog:n,showVulnerableWarning:t.isAssetVulnerableWhenEnabled})},{key:"state",width:"10%",title:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldState"}),render:e=>{const t=Bc(e),n=this.props.themesV2.some((e=>{const t=Bc({slug:e.slug,instanceId:this.props.installation.id});return this.props.assetsToChangingStatus.has(t)})),s=n||this.props.assetsToRemove.has(t);return e.isAssetVulnerableWhenEnabled&&!e.status?(0,L.jsx)(BD,{target:(0,L.jsx)(yM,{asset:e,isProcessing:s,showProcessing:n,onActivate:()=>this.handleOpenActivateVulnerableThemeConfirmation(e.slug),onDeactivate:()=>{}}),onActivate:()=>this.handleActivateTheme(e),isOpen:i&&a===e.slug,onClose:this.handleCloseActivateVulnerableThemeConfirmation,children:(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.activateVulnerableThemeConfirmation",params:{themeName:e.title}})})}):(0,L.jsx)(yM,{asset:e,isProcessing:s,showProcessing:n,onActivate:()=>this.handleActivateTheme(e),onDeactivate:()=>{}})}},{key:"autoUpdate",width:"10%",title:(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.fieldAutoUpdates"}),align:"center",render:n=>{const i=Bc(n),a=this.props.assetsToChangingStatus.has(i)||this.props.assetsToRemove.has(i),r=!e.features.updates.autoUpdatesAvailable||n.autoUpdates&&!n.autoUpdatesAvailable||this.props.assetsToRemove.has(i);return(0,L.jsx)(Nr,{checked:n.autoUpdates,onChange:s=>{this.addThemesToChangingThemesAutoUpdates([n.slug]),t(e.id,[n],s).catch((()=>{})).finally((()=>this.removeThemesFromChangingThemesAutoUpdates([n.slug])))},disabled:r||a,loading:this.state.changingThemesAutoUpdates.has(n.slug)||s,tooltip:n.autoUpdates&&(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.themesAutoUpdatesEnabledHint"})})}},{key:"update",width:"10%",render:e=>{const t=Bc(e);return!1===this.props.assetsToRemove.has(t)&&(0,L.jsx)(SM,{onUpdatesOpen:this.props.onUpdatesOpen,hasUpdates:null!==e.availableVersion})}},{key:"action",width:"10%",render:e=>{const t=Bc(e);if(e.status)return null;const n=this.props.assetsToRemove.has(t),s=n||this.props.assetsToChangingStatus.has(t);return(0,L.jsx)(vM,{isProcessing:s,showProcessing:n,onRemove:t=>Rc(t,this.handleRemoveItems,[e.slug])})}}]}getSelectedThemesForRemove(){const{themesV2:e}=this.props;return e?this.state.selection.filter((t=>{const n=e.find((e=>e.slug===t));return!!n&&!n.status})):[]}render(){const{installation:{id:e,features:{credentials:t,maintenance:n}},themesActions:{setThemesAutoUpdates:s},showTitle:i}=this.props,{isAutoUpdateAllThemesSwitchLoading:a}=this.state,r=n.status&&n.fullMode?(0,L.jsx)(Ac,{content:"controllers.index.manage-themes.tooltipThemesInsideWordpressLink"}):null,o=this.getSelectedThemesForRemove();return(0,L.jsxs)(vi,{title:i?(0,L.jsx)(Ac,{content:"controllers.index.detail.themesTabTitle"}):void 0,collapsed:!this.props.isCollapsible,collapsible:this.props.isCollapsible,children:[(0,L.jsx)(kM,{installationId:e,hasAdminCredentials:t.available,onAddItem:this.handleAddItem,onRemoveItems:()=>this.handleRemoveItems(o),isRemoveItemsDisabled:0===o.length,manageLocaleKey:"controllers.index.manage-themes.manageThemesInsideWordpressLink",addLocaleKey:"controllers.index.manage-themes.installItem",removeLocaleKey:"controllers.index.manage-plugins.removeItems",isWordPressLoginDisabled:n.status&&n.fullMode||!1,tooltipWordPressLogin:r,autoUpdateAllAssetsLocaleKey:"controllers.index.manage-themes.autoUpdateAllThemes",autoUpdateAllAssetsSwitchChecked:this.isAutoUpdateAllThemesSwitchChecked(),autoUpdateAllAssetsSwitchDisabled:this.isAutoUpdateAllThemesSwitchDisabled(),autoUpdateAllAssetsSwitchLoading:a,onChangeAutoUpdates:t=>{this.setState({isAutoUpdateAllThemesSwitchLoading:!0}),s(e,this.getAssets(),t).catch((()=>{})).finally((()=>this.setState({isAutoUpdateAllThemesSwitchLoading:!1})))},autoUpdateAllAssetsSwitchTooltip:this.getAutoUpdateAllThemesSwitchTooltip()}),(0,L.jsx)(Ks,{children:this.renderList()})]})}}LM.defaultProps={themesV2:[],isPaginationEnabled:!0,showTitle:!0};const MM=(0,so.$j)(((e,t)=>{var n,s;const i=e.instances.themesV2[t.installation.id],a=(null===(s=null===(n=e.vulnerabilities.installationsVulnerabilityStatuses)||void 0===n?void 0:n.find((e=>e.id===t.installation.id)))||void 0===s?void 0:s.themes)||[];return{themesV2:i,assetsToChangingStatus:e.instances.assetsToChangingStatus,assetsToRemove:e.instances.assetsToRemove,themesVulnerabilityStatuses:a}}),(e=>({themesActions:nh({remove:ub,activateTheme:cb,getInstallationThemes:pb,setThemesAutoUpdates:db},e),reloadInstallationsVulnerabilityStatuses:nh(Bg,e),getInstallationsVulnerabilityStatuses:nh(Hg,e),checkSession:()=>e(Sp()),addSuccessMessage:nh(wp,e)})))(LM);class AM extends U.Component{constructor(e){super(e),this.handleSubmit=e=>{const{setDbSettings:t,onSetDbUserName:n,installationId:s,onClosePopover:i}=this.props;this.state.isProcessing||(this.setState({dbUserName:e.dbUserName,dbUserPassword:e.dbUserPassword,isProcessing:!0,errors:null}),t(s,e).then((t=>{t.status===su?t.formErrors&&this.setState({errors:t.formErrors}):(n(e.dbUserName),i())})).finally((()=>{this.setState({isProcessing:!1})})))},this.state={dbUserName:e.dbUserName||"",dbUserPassword:"",isProcessing:!1,errors:{}}}render(){const{dbHost:e,dbName:t}=this.props,{dbUserName:n,dbUserPassword:s,isProcessing:i,errors:a}=this.state;return(0,L.jsxs)(Si,{onSubmit:this.handleSubmit,hideRequiredLegend:!0,values:{dbUserName:n,dbUserPassword:s},state:i?"submit":null,errors:a,applyButton:!1,cancelButton:!1,submitButton:{"data-test-id":"instance-database-settings-submit-button"},children:[(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.db-settings.dbServer"}),children:e}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.db-settings.dbName"}),children:t}),(0,L.jsx)(ga,{name:"dbUserName",label:(0,L.jsx)(Ac,{content:"forms.db-settings.dbUserName"})}),(0,L.jsx)(ra,{name:"dbUserPassword",label:(0,L.jsx)(Ac,{content:"forms.db-settings.dbUserPassword"})})]})}}AM.propTypes={installationId:Vt().number.isRequired,dbHost:Vt().string.isRequired,dbName:Vt().string.isRequired,dbUserName:Vt().string.isRequired,onSetDbUserName:Vt().func.isRequired,onClosePopover:Vt().func.isRequired,setDbSettings:Vt().func.isRequired};const EM=AM;class UM extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{settingsData:{dbName:e,dbListUrl:t,webAdminUrl:n}}=this.props;return(0,L.jsxs)(L.Fragment,{children:[t?(0,L.jsx)("a",{href:t,target:"_blank",children:e}):e,n&&(0,L.jsxs)(L.Fragment,{children:[" [",(0,L.jsx)("a",{href:n,target:"_blank","data-test-id":Ah,children:(0,L.jsx)(Ac,{content:"databaseNameAndWebAdmin.openInPhpMyAdmin"})}),"]"]})]})},this.renderCpanel=()=>{const{installation:{owner:{login:e}},settingsData:{dbName:t,dbListUrl:n,webAdminUrl:s},goToUri:i}=this.props,a=bm({link:n||"",inNewWindow:!0,goToUri:i,accountUsername:e}),r=bm({link:s||"",inNewWindow:!0,goToUri:i,accountUsername:e});return(0,L.jsxs)(L.Fragment,{children:[n?(0,L.jsx)("a",Object.assign({},a,{children:t})):t,s&&(0,L.jsxs)(L.Fragment,{children:[" [",(0,L.jsx)("a",Object.assign({},r,{"data-test-id":Ah,children:(0,L.jsx)(Ac,{content:"databaseNameAndWebAdmin.openInPhpMyAdmin"})})),"]"]})]})},this.renderPlainText=()=>this.props.settingsData&&this.props.settingsData.dbName?(0,L.jsx)(L.Fragment,{children:this.props.settingsData.dbName}):null}render(){const{installation:{installationType:e}}=this.props;return QT(e)?this.renderPlesk():JT(e)?this.renderCpanel():this.renderPlainText()}}const RM=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(UM);class NM extends U.Component{constructor(e){super(e),this.handleOnErrorWithTimeout=()=>{setTimeout((()=>{this.props.onError()}),1e3)},this.handleSetDbUserName=e=>this.setState((t=>({settingsData:t.settingsData?Object.assign(Object.assign({},t.settingsData),{dbUserName:e}):void 0}))),this.handleToggleDbSettingsPopover=()=>this.setState((e=>({showDbSettingsPopover:!e.showDbSettingsPopover}))),this.state={isLoading:!1,getDbSettingsError:void 0,settingsData:void 0,showDbSettingsPopover:!1}}componentWillMount(){const{getDbSettings:e,installation:t}=this.props;this.setState({isLoading:!0}),e(t.id).then((e=>{e.status&&e.status===su?this.setState({getDbSettingsError:e.message},this.handleOnErrorWithTimeout):this.setState({settingsData:e.data})})).finally((()=>{this.setState({isLoading:!1})}))}renderChangeLink(){const{settingsData:e,showDbSettingsPopover:t}=this.state,{installation:n,setDbSettings:s}=this.props;return sC(n.installationType)&&e?(0,L.jsxs)(L.Fragment,{children:[" [",(0,L.jsx)(An,{title:(0,L.jsx)(Ac,{content:"instanceDatabaseTab.dbSettingsPopoverTitle"}),placement:"bottom",visible:t,onClose:this.handleToggleDbSettingsPopover,target:(0,L.jsx)("a",{onClick:this.handleToggleDbSettingsPopover,"data-test-id":"instance-database-settings-link",children:(0,L.jsx)(Ac,{content:"instanceDatabaseTab.changeDbSettingsLink"})}),"data-test-id":"instance-database-settings-popover",children:(0,L.jsx)(EM,{dbHost:e.dbHost,dbName:e.dbName,dbUserName:e.dbUserName,installationId:n.id,onSetDbUserName:this.handleSetDbUserName,setDbSettings:s,onClosePopover:this.handleToggleDbSettingsPopover})}),"]"]}):null}render(){const{settingsData:e,isLoading:t,getDbSettingsError:n}=this.state,{installation:s,showTitle:i}=this.props;return t||!e?(0,L.jsx)(wS,{}):n?(0,L.jsx)("div",{children:n}):(0,L.jsxs)(vi,{title:i?(0,L.jsx)(Ac,{content:"controllers.index.detail.databaseTabTitle"}):void 0,children:[(0,L.jsx)(Ks,{className:"wpt-compact-section-item",title:(0,L.jsx)(Ac,{content:"instanceDatabaseTab.dbName"}),children:(0,L.jsx)(RM,{installation:s,settingsData:e})}),(0,L.jsx)(Ks,{className:"wpt-compact-section-item",title:(0,L.jsx)(Ac,{content:"instanceDatabaseTab.tablePrefix"}),children:e.tablePrefix?e.tablePrefix:(0,L.jsxs)(L.Fragment,{children:["[",(0,L.jsx)(Ac,{content:"instanceDatabaseTab.noneTablePrefix"}),"]"]})}),e.dbUserName&&(0,L.jsxs)(Ks,{className:"wpt-compact-section-item",title:(0,L.jsx)(Ac,{content:"instanceDatabaseTab.dbUserName"}),children:[e.dbUserName,this.renderChangeLink()]}),e.dbHost&&(0,L.jsx)(Ks,{className:"wpt-compact-section-item",title:(0,L.jsx)(Ac,{content:"instanceDatabaseTab.dbServer"}),children:e.dbHost})]})}}NM.defaultProps={showTitle:!0};const FM={getDbSettings:sv,setDbSettings:iv},YM=(0,so.$j)(null,FM)(NM);class BM extends U.Component{constructor(){super(...arguments),this.getColumns=()=>{const e="update-list-settings-",t=this.props.type===au?"controllers.index.manage-plugins.fieldName":"controllers.index.manage-themes.fieldName",n=this.props.getSelection();return[{width:"45%",key:`${e}-title`,title:(0,L.jsx)(Ac,{content:t}),render:e=>(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Wn,{children:e.title})," ",(0,L.jsxs)(An,{target:(0,L.jsx)(fe,{icon:"circle-info"}),placement:"top-right",children:[e.description.substring(0,150),"..."]})]})},{width:"20%",key:`${e}versions`,title:(0,L.jsx)(Ac,{content:"list.instances.versions"}),render:e=>(0,L.jsxs)(Wn,{children:[e.version," ","→"," ",e.availableVersion]})},{width:"25%",key:`${e}-changelog`,align:"center",render:e=>e.changeLogUrl&&(0,L.jsx)(fe,{href:e.changeLogUrl,target:"_blank",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesItemChangeLogLink"})})},{width:"10%",key:`${e}-update-status`,align:"center",render:e=>-1!==n.indexOf(e.key)&&this.props.isUpdating&&(0,L.jsx)(wS,{})}]},this.getListData=()=>{const{assets:e,smartUpdatesInProgress:t,isUpdating:n}=this.props;return e.map((e=>Object.assign({key:e.slug,disabled:n||t},e)))}}render(){const e=this.getListData(),{getSelection:t,setSelection:n,isCollapsed:s,assets:i,hideMassCheckbox:a,type:r}=this.props,o=r===au?"controllers.index.detail.updatesPluginsTitle":"controllers.index.detail.updatesThemesTitle";return e.length>0?(0,L.jsx)(vi,{collapsed:s,collapsible:!0,title:(0,L.jsx)(Ac,{content:o,params:{updates:e.length,all:i.length}}),children:(0,L.jsx)(Wa,{className:a?"hided-mass-checkbox":"",columns:this.getColumns(),data:e,selection:t(),onSelectionChange:e=>n(e)})}):null}}BM.propTypes={isCollapsed:Vt().bool.isRequired,type:Vt().string.isRequired,assets:Vt().array.isRequired,isUpdating:Vt().bool.isRequired,smartUpdatesInProgress:Vt().bool.isRequired,hideMassCheckbox:Vt().bool.isRequired,getSelection:Vt().func.isRequired,setSelection:Vt().func.isRequired};const HM=BM;class VM extends U.Component{constructor(){super(...arguments),this.getColumns=()=>{const e="update-instances-",{core:{version:t,availableVersion:n},getSelection:s,isUpdating:i}=this.props,a=s();return[{key:`${e}title`,width:"45%",title:(0,L.jsx)(Ac,{content:"list.instances.name"}),render:e=>(0,L.jsx)(Wn,{children:e.title})},{key:`${e}version`,width:"20%",title:(0,L.jsx)(Ac,{content:"list.instances.versions"}),render:()=>(0,L.jsxs)(Wn,{children:[t," ","→"," ",n]})},{key:`${e}-update-blank-column`,width:"25%",align:"center",render:()=>this.renderRestorePoint()},{key:`${e}-update-status`,width:"10%",align:"center",render:e=>i&&-1!==a.indexOf(e.key)&&(0,L.jsx)(wS,{})}]},this.getListData=()=>{const{instanceId:e,instanceName:t,core:n,isUpdating:s,smartUpdatesInProgress:i}=this.props,a=[];return n.availableVersion&&a.push({key:e.toString(),disabled:s||i,title:t}),a},this.renderRestorePoint=()=>{var e;const{isUpdating:t,smartUpdatesInProgress:n,getMakeRestorePoint:s,setMakeRestorePoint:i,core:a}=this.props;return(null===(e=null==a?void 0:a.restorePoint)||void 0===e?void 0:e.available)?(0,L.jsxs)("div",{children:[(0,L.jsx)(it,{"data-test-id":"make-snapshot-checkbox",disabled:t||n,checked:s(),onChange:e=>i(e),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesRestorePoint"})})," ",(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info"}),placement:"top-right",children:(0,L.jsx)(Ac,{content:"snapshot-confirmation.updatesDescription"})})]},"restorePointItem"):null}}render(){const e=this.getListData(),{getSelection:t,setSelection:n,isCollapsed:s,hideMassCheckbox:i}=this.props;return e.length>0?(0,L.jsx)(vi,{collapsed:s,collapsible:!0,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesInstancesTabHeader"}),children:(0,L.jsx)(Wa,{"data-test-id":"core-update-list",className:i?"hided-mass-checkbox":"",columns:this.getColumns(),data:e,selection:t(),onSelectionChange:e=>n(e)})}):null}}VM.propTypes={instanceId:Vt().number.isRequired,instanceName:Vt().string.isRequired,core:Vt().shape({version:Vt().string,availableVersion:Vt().string,restorePoint:Vt().shape({available:Vt().bool.isRequired})}),getSelection:Vt().func.isRequired,setSelection:Vt().func.isRequired,setMakeRestorePoint:Vt().func.isRequired,getMakeRestorePoint:Vt().func.isRequired,isCollapsed:Vt().bool.isRequired,hideMassCheckbox:Vt().bool.isRequired,isUpdating:Vt().bool.isRequired,smartUpdatesInProgress:Vt().bool.isRequired};const $M=VM;class WM extends U.Component{constructor(e){super(e),this.handleTogglePopover=()=>this.setState((e=>({showPopover:!e.showPopover}))),this.getPopoverContent=()=>{const{isPermissionDenied:e,wordPressToolkitLiteEdition:t,purchaseDeluxeUrl:n,purchaseWordPressToolkitUrl:s,upgradePleskUrl:i,installationType:a,uatAction:r,panelUpdateRequired:o,updatePleskUrl:l,isSmartPhpUpdates:c}=this.props;return e?(0,L.jsx)(Ac,{content:"premiumFeature.permissionDenied"}):QT(a)&&t&&o?(0,L.jsx)(Ac,{content:"premiumFeature.wordPressToolkitFullVersionAndPleskUpdateRequired",params:{purchaseDeluxeLicenseLink:(0,L.jsx)("a",{href:n,target:"_blank",onClick:()=>lm(r),children:(0,L.jsx)(Ac,{content:"premiumFeature.purchaseDeluxeLicenseLink"})}),purchaseWordPressToolkitLink:(0,L.jsx)("a",{href:s,target:"_blank",onClick:()=>lm(r),children:(0,L.jsx)(Ac,{content:"premiumFeature.purchaseWordPressToolkitLink"})}),upgradePleskLink:(0,L.jsx)("a",{href:i,target:"_blank",children:(0,L.jsx)(Ac,{content:"premiumFeature.upgradePleskLink"})}),updatePleskLink:(0,L.jsx)("a",{href:l,target:"_blank",children:(0,L.jsx)(Ac,{content:"premiumFeature.updatePleskLink"})})}}):QT(a)&&t?(0,L.jsx)(Ac,{content:"premiumFeature.wordPressToolkitFullVersionAndDeluxeLicenseRequired",params:{purchaseDeluxeLicenseLink:(0,L.jsx)("a",{href:n,target:"_blank",onClick:()=>lm(r),children:(0,L.jsx)(Ac,{content:"premiumFeature.purchaseDeluxeLicenseLink"})}),purchaseWordPressToolkitLink:(0,L.jsx)("a",{href:s,target:"_blank",onClick:()=>lm(r),children:(0,L.jsx)(Ac,{content:"premiumFeature.purchaseWordPressToolkitLink"})}),upgradePleskLink:(0,L.jsx)("a",{href:i,target:"_blank",children:(0,L.jsx)(Ac,{content:"premiumFeature.upgradePleskLink"})})}}):QT(a)&&o?(0,L.jsx)(Ac,{content:"premiumFeature.pleskUpdateRequired"}):QT(a)?(0,L.jsx)(Ac,{content:"premiumFeature.descriptionForPlesk"}):c?(0,L.jsx)(Ac,{content:"premiumFeature.smartPhpUpdatesDescription"}):(0,L.jsx)(Ac,{content:"premiumFeature.description"})},this.getPopoverActions=()=>{const{purchaseDeluxeUrl:e,premiumFeaturesUrl:t,uatAction:n,wordPressToolkitLiteEdition:s,installationType:i,installationId:a,upgradePleskUrl:r,panelUpdateRequired:o,updatePleskUrl:l}=this.props;if(QT(i)&&o)return(0,L.jsx)(Ue,{component:"a",href:l,target:"_blank",intent:"success",children:(0,L.jsx)(Ac,{content:"premiumFeature.updatePleskButton"})});const c=QT(i)&&s?r:e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(dm,{purchaseLicenseUrl:c,uatAction:n,onTogglePopover:this.handleTogglePopover,installationId:a,children:(0,L.jsx)(Ac,{content:"premiumFeature.purchaseButton"})}),t&&(0,L.jsx)(Ue,{ghost:!0,component:"a",target:"_blank",href:t,children:(0,L.jsx)(Ac,{content:"premiumFeature.discoverAllPremiumFeaturesButton"})})]})},this.getPopover=()=>{const{installationType:e,panelUpdateRequired:t,baseClassName:n}=this.props,{showPopover:s}=this.state;return(0,L.jsx)(An,{visible:s,width:"xs",onClose:this.handleTogglePopover,target:(0,L.jsx)(fe,{onClick:this.handleTogglePopover,icon:"lock-closed"}),children:(0,L.jsxs)(qi,{className:`${n}__popover-content`,children:[(0,L.jsxs)(Xi,{children:[(0,L.jsx)(he,{name:"lock-closed",size:"24",intent:"inactive"})," ",(0,L.jsx)(Wn,{children:QT(e)&&t?(0,L.jsx)(Ac,{content:"premiumFeature.pleskUpdateRequiredTitle"}):(0,L.jsx)(Ac,{content:"premiumFeature.title"})})]}),(0,L.jsx)(Ki,{children:this.getPopoverContent()}),(0,L.jsx)(Gi,{children:this.getPopoverActions()})]})})},this.state={showPopover:!1}}render(){const{applicable:e,className:t,baseClassName:n,children:s}=this.props;return e?(0,L.jsx)("span",{className:mm()(n,t),children:s}):(0,L.jsxs)("span",{className:mm()(n,t),children:[this.getPopover()," ",s]})}}WM.defaultProps={baseClassName:`${gu}premium-feature`};const zM=(0,so.$j)((e=>({purchaseDeluxeUrl:e.app.urls.purchaseDeluxeUrl,purchaseWordPressToolkitUrl:e.app.urls.purchaseWordPressToolkitUrl,upgradePleskUrl:e.app.urls.upgradePleskUrl,wordPressToolkitLiteEdition:e.app.options.wordPressToolkitLiteEdition,panelUpdateRequired:e.app.options.panelUpdateRequired,updatePleskUrl:e.app.urls.updatePleskUrl,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,isPermissionDenied:!e.app.options.isAdmin||e.app.options.isReseller})),null,null,{forwardRef:!0})(WM),qM=({smartUpdatesOn:e,isUpdating:t,isRefreshing:n,onRefresh:s,openUpdateSettingsForm:i,toggleSmartUpdatesSwitch:a,isMultisite:r,smartUpdatesInProgress:o,isSmartUpdatesSwitching:l,isSmartUpdatesUnpaid:c,isSmartUpdatesDisabled:u,showAutoUpdates:d,showSmartUpdates:p,installationId:h,installationType:m,installationFeatures:f})=>{const g=e?!1===t&&!1===o:!1===t&&!1===r&&!1===c&&!u;return(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{icon:"refresh",disabled:n||t||o,onClick:s,tooltip:(0,L.jsx)(Ac,{content:"controllers.index.detail.hintRefreshButton"}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.refreshButton"})})}),d&&(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{"data-test-id":"update-settings-button",onClick:i,disabled:n||t||o,ghost:!0,icon:"gear",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.updateSettingsButton"})})}),(0,L.jsx)(ts,{}),(()=>{var t,n;if(!d||!p)return null;const s=(0,L.jsx)(Nr,{"data-test-id":"updates-drawer-smart-update",checked:e,disabled:!1===g,onChange:e=>a(e),loading:l});return r?(0,L.jsx)(_s,{title:"Right Group",children:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesSmartUpdatesAreUnavailable"})," ",(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:MT("circle-info")}),placement:"top-right",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesSmartUpdatesAreUnavailableHint"})})," ",s]})}):(0,L.jsx)(_s,{title:"Right Group",children:(0,L.jsxs)(zM,{uatAction:"CLICK_LICENSE_PURCHASE_FROM_UPDATE_FORM",installationId:h,installationType:m,applicable:!0===(null===(n=null===(t=null==f?void 0:f.updates)||void 0===t?void 0:t.smart)||void 0===n?void 0:n.applicable),children:[(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesSmartUpdates"})," ",s,(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{icon:"question-mark-circle",ghost:!0}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.description"})})]})})})()]})},GM=({isOpen:e,smartUpdatesStatus:t,instanceUrl:n,smartUpdatesCloneInstanceId:s,shortInstanceUrl:i,smartUpdatesCloneUrl:a,onClose:r,onUpdate:o,onDiscard:l,instanceId:c,baseClassName:u=`${gu}smart-update-results-drawer`})=>{const[d,p]=(0,U.useState)(!1),[h,m]=(0,U.useState)(!1);return(0,L.jsx)(zi,{title:(0,L.jsx)(Ac,{content:"smartUpdateResultsDrawer.title"}),subtitle:i,isOpen:e,onClose:r,size:"lg","data-type":"smart-update-results",className:u,form:{cancelButton:!1,applyButton:!1,submitButton:!1,additionalButtons:[(0,L.jsxs)(An,{target:(0,L.jsx)(Ue,{"data-test-id":"apply-smart-update",intent:"primary",onClick:()=>p(!0),size:"lg",children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.submitButtons.buttonApply"})}),placement:"bottom",visible:d,onClose:()=>p(!1),children:[(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.updateConfirmationDialog.description",component:"p"}),(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>{p(!1),o()},"data-test-id":"confirm-apply-smart-update",intent:"primary",children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.updateConfirmationDialog.buttonOk"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>p(!1),children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.updateConfirmationDialog.buttonCancel"})})})]})]},"apply-button"),(0,L.jsxs)(An,{target:(0,L.jsx)(Ue,{"data-test-id":"discard-smart-update",onClick:()=>m(!0),size:"lg",children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.submitButtons.buttonDiscard"})}),placement:"bottom",visible:h,onClose:()=>m(!1),children:[(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.discardConfirmationDialog.description",component:"p"}),(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>{m(!1),l()},"data-test-id":"confirm-discard-smart-update",intent:"danger",children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.discardConfirmationDialog.buttonOk"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>m(!1),children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.discardConfirmationDialog.buttonCancel"})})})]})]},"discard-button")]},children:(0,L.jsx)(NL,{smartUpdatesStatus:t,instanceUrl:n,smartUpdatesCloneInstanceId:s,smartUpdatesCloneUrl:a,instanceId:c,isPublic:!1})})};class KM extends U.Component{constructor(e){super(e),this.handleToggleSmartUpdatePromoPopover=()=>this.setState((e=>({showSmartUpdatePromoPopover:!e.showSmartUpdatePromoPopover}))),this.getSmartUpdatePromoPopover=()=>{const{showSmartUpdatePromoPopover:e}=this.state,{uatActions:t,smartUpdateFeatureUpgradeLink:n,baseClassName:s}=this.props;return(0,L.jsxs)(An,{visible:e,target:(0,L.jsx)(fe,{className:`${s}__why-link`,onClick:()=>{this.handleToggleSmartUpdatePromoPopover(),lm(t.showPopover)},children:(0,L.jsx)(Ac,{content:`updatesSmartUpdatePromo.${this.props.smartUpdatePromoCustomTextKey}.popoverTrigger`,fallback:"%%fallback%%",params:{fallback:(0,L.jsx)(Ac,{content:"updatesSmartUpdatePromo.default.popoverTrigger"})}})}),onClose:this.handleToggleSmartUpdatePromoPopover,className:`${s}__popover`,children:[(0,L.jsx)(Ac,{content:`updatesSmartUpdatePromo.${this.props.smartUpdatePromoCustomTextKey}.popoverText`,fallback:"%%fallback%%",params:{fallback:(0,L.jsx)(Ac,{content:"updatesSmartUpdatePromo.default.popoverText"})}}),(0,L.jsxs)("div",{className:`${s}__popover__button-group`,children:[(0,L.jsx)(Ue,{component:"a",href:n,target:"_blank",onClick:()=>{this.handleToggleSmartUpdatePromoPopover(),lm(t.clickOpenStoreButton)},className:`${s}__popover__open-store-button`,intent:"primary",children:(0,L.jsx)(Ac,{content:"updatesSmartUpdatePromoPopover.openStoreButton"})}),(0,L.jsx)(fe,{onClick:()=>{this.handleToggleSmartUpdatePromoPopover(),lm(t.clickPopoverCloseButton)},className:`${s}__popover__close-link`,children:(0,L.jsx)(Ac,{content:"updatesSmartUpdatePromoPopover.closeLink"})})]})]})},this.state={showSmartUpdatePromoPopover:!1}}getSmartUpdatePromoText(){const e={popover:this.getSmartUpdatePromoPopover()},t=(0,L.jsx)(Ac,{content:"updatesSmartUpdatePromo.default.text",params:e});return(0,L.jsx)(Ac,{content:`updatesSmartUpdatePromo.${this.props.smartUpdatePromoCustomTextKey}.text`,params:Object.assign(Object.assign({},e),{defaultText:t}),fallback:"%%defaultText%%"})}render(){const{isOpen:e,onClose:t,smartUpdateFeatureUpgradeLink:n,baseClassName:s,publicUrl:i,uatActions:a}=this.props;return e?(0,L.jsxs)("div",{className:s,children:[(0,L.jsx)("span",{className:`${s}__close-button`,onClick:t}),(0,L.jsx)(is,{image:(0,L.jsx)(he,{size:"64",src:`${i}images/smart-update-promo-calendar.svg`}),children:(0,L.jsxs)(Xn,{sm:2,gap:"md",children:[(0,L.jsx)(Zn,{sm:10,children:this.getSmartUpdatePromoText()}),(0,L.jsx)(Zn,{sm:2,children:(0,L.jsx)(Ue,{component:"a",href:cm(n),target:"_blank",className:`${s}__try-now-button`,onClick:()=>lm(a.clickTryNowButton),children:(0,L.jsx)(Ac,{content:"updatesSmartUpdatePromo.tryNowButton"})})})]})})]}):null}}KM.defaultProps={smartUpdatePromoCustomTextKey:null,baseClassName:`${gu}smart-update-promo`};const XM=(0,so.$j)((e=>({smartUpdatePromoCustomTextKey:e.app.options.smartUpdatePromoCustomTextKey,smartUpdateFeatureUpgradeLink:e.app.urls.featuresBuyLinks.smart_update,publicUrl:e.app.urls.publicUrl})))(KM),ZM=e=>{var t,n,s;return!!(null===(t=e.core)||void 0===t?void 0:t.availableVersion)||(null===(n=e.plugins)||void 0===n?void 0:n.length)>0||(null===(s=e.themes)||void 0===s?void 0:s.length)>0},JM={selectionInstances:[],selectionPlugins:[],selectionThemes:[]},QM={isUpdating:!1,isRefreshing:!1,checkUpdatesTaskId:null,updateTaskId:null,backgroundTask:null,showTasksDetails:!1,isSmartUpdatesSwitching:!1,isSelectedAllUpdates:!1,selectionInstances:[],selectionPlugins:[],selectionThemes:[],makeRestorePoint:!0,showSmartUpdatePromoBanner:!1,showSmartUpdateResults:!1,isInitialDataLoading:!0,isConfirmationVisible:!1,smartUpdateResults:null,isSmartUpdateResultsLoading:!1};class eA extends U.Component{constructor(e){var t,n;super(e),this.handleUpdateSmartUpdateFeatureStatus=e=>{var t,n;this.setState({isSmartUpdateEnabled:!0===(null===(n=null===(t=e.installation.features.updates)||void 0===t?void 0:t.smart)||void 0===n?void 0:n.status)})},this.handleLoadData=()=>{const{installation:{id:e}}=this.props;this.setState({isInitialDataLoading:!0}),this.props.instancesActions.fetchAvailableUpdates([e]).then((t=>{const n=t.find((t=>t.id===e));this.setState({isInitialDataLoading:!1,showSmartUpdatePromoBanner:n&&this.isSmartUpdatePromoBannerVisible(n)},this.handleOnUpdateReceived)})).catch((()=>{this.setState({isInitialDataLoading:!1})}))},this.handleOpen=()=>this.setState(Object.assign({},QM)),this.handleOnUpdateReceived=()=>{const{updateData:{tasks:{check:e,update:t}},isOpen:n}=this.props,s=null==e?void 0:e.id,i=null==t?void 0:t.id,a=null==t?void 0:t.code;e&&this.setState({checkUpdatesTaskId:s}),t&&this.setState({updateTaskId:i}),i&&a?this.fetchAndProcessExistentUpdateTask(i,a):s?this.fetchAndProcessExistentCheckUpdateTask(s):!this.hasUpdates()&&n&&this.isLastCheckUpdateTimestampInvalid()&&this.handleCheckUpdates(),this.dispatchSmartUpdatePromoUAT()},this.isLastCheckUpdateTimestampInvalid=()=>{const{updateData:e}=this.props;return e&&e.lastCheckUpdateTimestamp&&(new Date).getTime()-1e3*e.lastCheckUpdateTimestamp>36e5},this.fetchAndProcessExistentUpdateTask=(e,t)=>{const{backgroundTasksActions:{fetchBackgroundTask:n},onAddDrawerSuccessMessage:s}=this.props;n(Td.getTaskData,e,t).then((e=>{if(null===e)return this.setState({isUpdating:!1}),void(this.state.showSmartUpdateResults||this.handleCheckUpdates());tw(e)||this.isInstanceUpdatedInMassUpdate(e)?this.handleOnCompleteBackGroundUpdateTask(e):this.setState({updateTaskId:e.id,isUpdating:!0},(()=>{e.code!==mb&&s(e.title)}))}))},this.fetchAndProcessExistentCheckUpdateTask=e=>{const{backgroundTasksActions:{fetchBackgroundTask:t}}=this.props;t(Td.getTaskData,e,xS).then((e=>{null!==e?tw(e)?this.handleOnCompleteBackGroundCheckUpdateTask(e):this.setState({checkUpdatesTaskId:e.id,isRefreshing:!0}):this.setState({isRefreshing:!1,checkUpdatesTaskId:null})}))},this.dispatchSmartUpdatePromoUAT=()=>this.state.showSmartUpdatePromoBanner&&lm("SHOW_UPDATES_DRAWER_SMART_UPDATE_PROMO"),this.isSmartUpdatePromoBannerVisible=e=>{const{installation:{installationType:t,features:{updates:n}},showSmartUpdatePromo:s,isSmartUpdatePromoAvailableForUpdatesScreen:i}=this.props;return!!(QT(t)&&ZM(e)&&s)&&(!!i||n.smart.promoAvailable)},this.handleUpdateBackgroundTask=e=>{const{updateTaskId:t}=this.state;if(!t)return;const n=iw(t,e);if(n){if(n.code===mb&&n.publicParams.currentlyUpdatingInstallationId!==this.props.installation.id&&!n.publicParams.successfullyUpdatedInstallationsIds.includes(this.props.installation.id))return void this.setState({isUpdating:!1});this.setState((e=>({backgroundTask:n,showTasksDetails:!e.showSmartUpdateResults&&n.code!==mb}))),this.handleOnCompleteBackGroundUpdateTask(n)}},this.handleCheckUpdateBackgroundTask=e=>{const{checkUpdatesTaskId:t,backgroundTask:n}=this.state;if(!t)return;const s=iw(t,e);s&&n!==s&&(this.setState({backgroundTask:s}),this.handleOnCompleteBackGroundCheckUpdateTask(s))},this.handleLoadSmartUpdateResults=()=>{const{isSmartUpdateResultsLoading:e}=this.state;if(e)return;const{instancesActions:{getSmartUpdateResult:t},installation:{id:n}}=this.props;this.setState({isSmartUpdateResultsLoading:!0}),t(n).then((e=>{this.setState({smartUpdateResults:e,isSmartUpdateResultsLoading:!1})})).catch((()=>{this.setState({smartUpdateResults:null,isSmartUpdateResultsLoading:!1})}))},this.handleShowSmartUpdateResults=e=>{const{updateData:t}=e;if(!t)return;const{smartUpdate:{status:n,taskStatus:s}}=t,{isSmartUpdateResultsLoading:i,smartUpdateResults:a}=this.state,r=this.isSmartUpdateResultsVisible(n,s);!r||a||i||this.handleLoadSmartUpdateResults(),this.setState({isSmartUpdateEnabled:n,showSmartUpdateResults:r})},this.handleOnCompleteBackGroundUpdateTask=e=>{if(!tw(e)&&!this.isInstanceUpdatedInMassUpdate(e))return;const{instancesActions:{instanceUpdateFailed:t},onAddDrawerErrorMessage:n,onAddDrawerSuccessMessage:s,onAddDrawerWarningMessage:i}=this.props;if(e.publicParams.hasOwnProperty("nonBlockError")&&i(e.publicParams.nonBlockError),this.setState({updateTaskId:null,backgroundTask:null,isUpdating:!1}),e.code!==mb&&sw(e))return n(e.errors.join("\n")),void t();if((nw(e)||this.isInstanceUpdatedInMassUpdate(e))&&e.code!==mb)if(e.errors.length){const t=e.errors.map((e=>`- ${e}`)).join("\n");i(`${e.title}\n${t}`)}else s(e.title)},this.handleOnCompleteBackGroundCheckUpdateTask=e=>{if(!tw(e))return;const{onAddDrawerErrorMessage:t,onAddDrawerSuccessMessage:n,onAddDrawerWarningMessage:s}=this.props;if(sw(e))t(e.errors.join("\n"));else if(nw(e))if(this.setState({checkUpdatesTaskId:null,backgroundTask:null,isRefreshing:!1}),e.errors.length){const t=e.errors.map((e=>`- ${e}`)).join("\n");s(`${e.title}\n${t}`)}else n(e.title)},this.isInstanceUpdatedInMassUpdate=e=>e.code===mb&&e.publicParams.successfullyUpdatedInstallationsIds.includes(this.props.installation.id),this.isSmartUpdateResultsVisible=(e=!1,t)=>e&&null!==t&&cL(t),this.handleCheckUpdates=()=>{if(this.state.isRefreshing)return;const{installation:{id:e},instancesActions:{checkUpdates:t}}=this.props;this.setState(Object.assign({isSelectedAllUpdates:!1,backgroundTask:null},JM)),t([e]).then((e=>{const t=e.id;this.setState({isRefreshing:!0,checkUpdatesTaskId:t})})).catch((()=>{}))},this.toggleSmartUpdatesSwitch=e=>{if(this.state.isSmartUpdatesSwitching)return;const{installation:{id:t},instancesActions:{setSmartUpdatesStatus:n},addSuccessMessage:s}=this.props;this.setState({isSmartUpdatesSwitching:!0}),n(t,e).then((e=>{s(e.status?(0,L.jsx)(Ac,{content:"features.updates.smart.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.updates.smart.disabledSuccessfully"})),this.state.showSmartUpdateResults&&!e.status&&this.setState({showSmartUpdateResults:e.status}),this.setState({isSmartUpdateEnabled:e.status})})).catch((()=>{})).finally((()=>{this.setState({isSmartUpdatesSwitching:!1})}))},this.getNeedToUpdateAssetsGroupsCount=()=>{const{updateData:{core:e,plugins:t,themes:n}}=this.props;let s=0;return e.availableVersion&&s++,t.length&&s++,n.length&&s++,s},this.handleUpdate=()=>{var e;const{selectionInstances:t,selectionPlugins:n,selectionThemes:s,makeRestorePoint:i}=this.state,{installation:{id:a},instancesActions:{updateItems:r},updateData:{core:o},onClearDrawerMessages:l,onAddDrawerSuccessMessage:c}=this.props;return l(),this.setState({isUpdating:!0,updateTaskId:null,backgroundTask:null}),r([{installationId:a,core:{update:t.includes(a.toString()),restorePoint:!!(null===(e=o.restorePoint)||void 0===e?void 0:e.available)&&i},plugins:n,themes:s}]).then((e=>{this.setState({updateTaskId:e.id},(()=>c(e.title)))})).catch((()=>{this.setState({isUpdating:!1})})).finally((()=>this.closeSmartUpdateResultsDrawer()))},this.handleSmartUpdate=()=>{const{installation:{id:e},instancesActions:{applySmartUpdate:t},onClearDrawerMessages:n,onAddDrawerSuccessMessage:s}=this.props;return n(),this.setState({isUpdating:!0,updateTaskId:null,backgroundTask:null,showSmartUpdateResults:!1}),t(e).then((e=>{this.setState({updateTaskId:e.id,smartUpdateResults:null},(()=>s(e.title)))})).catch((()=>{this.setState({isUpdating:!1})}))},this.getSelectionInstances=()=>this.state.selectionInstances,this.getSelectionThemes=()=>this.state.selectionThemes,this.getSelectionPlugins=()=>this.state.selectionPlugins,this.getMakeRestorePoint=()=>this.state.makeRestorePoint,this.fixSelections=()=>{const{updateData:{core:e,plugins:t,themes:n}}=this.props,{selectionInstances:s,selectionThemes:i,selectionPlugins:a}=this.state,r=Kc(i,n),o=Kc(a,t);s.length>0&&!e.availableVersion&&this.setSelectionInstances([]),r!==i&&this.setSelectionThemes(r),o!==a&&this.setSelectionPlugins(o)},this.checkIsSelectedAllAssetsUpdates=()=>{const{updateData:{core:e,plugins:t,themes:n}}=this.props,{selectionThemes:s,selectionInstances:i,selectionPlugins:a}=this.state,r=s.length+i.length+a.length;let o=t.length+n.length;e.availableVersion&&o++,this.setState({isSelectedAllUpdates:o===r})},this.setSelectionThemes=e=>this.setState({selectionThemes:e},this.checkIsSelectedAllAssetsUpdates),this.setSelectionPlugins=e=>this.setState({selectionPlugins:e},this.checkIsSelectedAllAssetsUpdates),this.setSelectionInstances=e=>this.setState({selectionInstances:e},this.checkIsSelectedAllAssetsUpdates),this.setMakeRestorePoint=e=>this.setState({makeRestorePoint:e}),this.handleDiscard=()=>{const{installation:{id:e},instancesActions:{discardSmartUpdate:t},onClearDrawerMessages:n,onAddDrawerSuccessMessage:s}=this.props;n(),this.closeSmartUpdateResultsDrawer(),t(e).then((()=>{s("forms.smart-updates.discardedSuccessfully",!0,"discardedSuccessfully")})).catch((()=>{})).finally((()=>{this.setState({smartUpdateResults:null})}))},this.handleSelectAllUpdates=()=>{const{installation:{id:e},updateData:{core:t,plugins:n,themes:s}}=this.props;this.state.isSelectedAllUpdates?this.setState(Object.assign(Object.assign({},JM),{isSelectedAllUpdates:!1})):this.setState({selectionPlugins:n.map((e=>e.slug)),selectionThemes:s.map((e=>e.slug)),selectionInstances:t.availableVersion?[e.toString()]:[],isSelectedAllUpdates:!0})},this.closeSmartUpdateResultsDrawer=()=>this.setState({showSmartUpdateResults:!1}),this.handleDisableSmartUpdatePromo=()=>{this.setState({showSmartUpdatePromoBanner:!1}),this.props.appActions.disableSmartUpdatePromoForUpdatesScreen({instanceId:this.props.installation.id}),lm("CLICK_UPDATES_DRAWER_SMART_UPDATE_PROMO_CLOSE_BUTTON")},this.renderSmartUpdatesDrawer=()=>{if(!this.props.updateData)return null;const{updateData:{displayTitle:e,smartUpdate:t},installation:{id:n,url:s},onClose:i}=this.props,{showSmartUpdateResults:a,smartUpdateResults:r}=this.state;return cL(t.taskStatus)&&r?(0,L.jsx)(GM,{isOpen:a,smartUpdatesStatus:r,instanceUrl:s,shortInstanceUrl:e,smartUpdatesCloneInstanceId:r.clone.id,smartUpdatesCloneUrl:r.clone.url,onClose:()=>{this.closeSmartUpdateResultsDrawer(),i()},onUpdate:this.handleSmartUpdate,onDiscard:this.handleDiscard,instanceId:n}):null},this.handleOpenConfirmation=()=>this.setState({isConfirmationVisible:!0}),this.handleCloseConfirmation=()=>this.setState({isConfirmationVisible:!1}),this.isSelectionEmpty=()=>{const{selectionInstances:e,selectionPlugins:t,selectionThemes:n}=this.state;return 0===e.length&&0===t.length&&0===n.length},this.handleSelectAllAndUpdate=()=>{this.handleCloseConfirmation(),this.handleSelectAllUpdates(),setTimeout(this.handleUpdate,100)},this.hasUpdates=()=>{const{updateData:e}=this.props;return!!e&&ZM(e)},this.renderSubmitButtonWithConfirmation=()=>{const{isSmartUpdateEnabled:e,isConfirmationVisible:t}=this.state;return(0,L.jsxs)(An,{target:this.renderUpdateButtonWithConfirmation(),placement:"bottom",visible:t,onClose:this.handleCloseConfirmation,children:[e?(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateConfirmationText",component:"p"}):(0,L.jsx)(Ac,{content:"controllers.index.detail.updateConfirmationText",component:"p"}),(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{intent:"primary",onClick:this.handleSelectAllAndUpdate,children:e?(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateConfirmationAccept"}):(0,L.jsx)(Ac,{content:"controllers.index.detail.updateConfirmationAccept"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:this.handleCloseConfirmation,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.updateConfirmationCancel"})})})]})]},"popover-with-confirmation-to-update-all-items")},this.renderSubmitSimpleButton=e=>{const{isUpdating:t,isSmartUpdateEnabled:n}=this.state;return(0,L.jsx)(Ue,{disabled:e,"data-test-id":Eh,onClick:this.handleUpdate,state:t?"loading":void 0,intent:"primary",children:n?(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateButton"}):(0,L.jsx)(Ac,{content:"controllers.index.detail.updateButton"})},Eh)},this.renderSubmitButton=()=>{const{installation:{status:{multisite:e}}}=this.props,{isUpdating:t,isRefreshing:n,showSmartUpdateResults:s,isSmartUpdateEnabled:i}=this.state,a=!this.hasUpdates()||s||i&&e||t||n;return!a&&this.isSelectionEmpty()?this.renderSubmitButtonWithConfirmation():this.renderSubmitSimpleButton(a)},this.renderLoadingState=()=>{const{isInitialDataLoading:e}=this.state;return e?(0,L.jsx)(It,{}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.loading"})]})},this.renderFailedToLoadUpdateData=()=>(0,L.jsx)(ge,{intent:"danger",children:(0,L.jsx)(Ac,{content:"updates.failedToLoad"})}),this.getUpdatesContent=()=>{const{updateData:e,installation:{id:t},openUpdatesType:n}=this.props,{isUpdating:s,isRefreshing:i,showSmartUpdateResults:a}=this.state,{title:r,core:o,plugins:l,themes:c}=e;return i?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesRefreshData"})]}):this.hasUpdates()?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)($M,{instanceId:t,instanceName:r,core:o,getSelection:this.getSelectionInstances,setSelection:this.setSelectionInstances,isCollapsed:n===Uf||n===Rf,getMakeRestorePoint:this.getMakeRestorePoint,setMakeRestorePoint:this.setMakeRestorePoint,isUpdating:s,smartUpdatesInProgress:a,hideMassCheckbox:s||a}),(0,L.jsx)(HM,{assets:l,type:au,isCollapsed:n===Ef||n===Rf,getSelection:this.getSelectionPlugins,setSelection:this.setSelectionPlugins,isUpdating:s,smartUpdatesInProgress:a,hideMassCheckbox:s||a}),(0,L.jsx)(HM,{assets:c,type:iu,isCollapsed:n===Ef||n===Uf,getSelection:this.getSelectionThemes,setSelection:this.setSelectionThemes,isUpdating:s,smartUpdatesInProgress:a,hideMassCheckbox:s||a})]}):(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesNotFound"})},this.getDrawerContent=()=>{var e,t;const{updateData:n,installation:{id:s,installationType:i,features:a},showSmartUpdates:r,onOpenUpdatesSettingsDialog:o}=this.props,{isSmartUpdateEnabled:l,isUpdating:c,isRefreshing:u,showSmartUpdateResults:d,isSmartUpdatesSwitching:p,isSelectedAllUpdates:h,showSmartUpdatePromoBanner:m,isInitialDataLoading:f,isSmartUpdateResultsLoading:g,smartUpdateResults:b}=this.state,v=f||g,y=!f&&!this.props.updateData;if(v||y)return(0,L.jsxs)(L.Fragment,{children:[v&&this.renderLoadingState(),y&&this.renderFailedToLoadUpdateData()]});const{multisite:_,autoUpdate:x}=n,S=r&&a.updates.smart.available;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(XM,{isOpen:m,onClose:this.handleDisableSmartUpdatePromo,uatActions:{showPopover:"SHOW_UPDATES_DRAWER_SMART_UPDATE_PROMO_POPOVER",clickPopoverCloseButton:"CLICK_UPDATES_DRAWER_SMART_UPDATE_PROMO_POPOVER_CLOSE_BUTTON",clickOpenStoreButton:"CLICK_UPDATES_DRAWER_SMART_UPDATE_PROMO_POPOVER_OPEN_STORE_BUTTON",clickTryNowButton:"CLICK_UPDATES_DRAWER_SMART_UPDATE_PROMO_TRY_NOW_BUTTON"}}),(0,L.jsx)(vi,{children:(0,L.jsx)(qM,{smartUpdatesOn:l,isUpdating:c,isRefreshing:u,showAutoUpdates:null==x?void 0:x.available,showSmartUpdates:S,onRefresh:this.handleCheckUpdates,isSmartUpdatesUnpaid:this.props.isSmartUpdatesUnpaid,isSmartUpdatesDisabled:!1===(null===(t=null===(e=this.props.updateData)||void 0===e?void 0:e.smartUpdate)||void 0===t?void 0:t.applicable),openUpdateSettingsForm:o,toggleSmartUpdatesSwitch:this.toggleSmartUpdatesSwitch,isMultisite:_,smartUpdatesInProgress:d,isSmartUpdatesSwitching:p,installationId:s,installationType:i,installationFeatures:a})}),!u&&this.getNeedToUpdateAssetsGroupsCount()>1&&(0,L.jsx)(vi,{children:(0,L.jsx)(Ss,{children:(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(it,{onChange:this.handleSelectAllUpdates,checked:h,disabled:c||d,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.selectAllUpdatesButton"})})})})}),d&&!b&&!g&&(0,L.jsx)(ge,{intent:"danger",children:(0,L.jsx)(Ac,{content:"updates.smartUpdates.results.failedToLoad"})}),this.getUpdatesContent()]})};const{installation:{features:s}}=this.props;this.state=Object.assign(Object.assign({},QM),{isSmartUpdateEnabled:!0===(null===(n=null===(t=s.updates)||void 0===t?void 0:t.smart)||void 0===n?void 0:n.status)})}componentDidMount(){this.props.isOpen&&(this.handleOpen(),this.handleLoadData(),this.handleShowSmartUpdateResults(this.props))}componentDidUpdate(e,t,n){!e.isOpen&&this.props.isOpen&&(this.handleOpen(),this.handleLoadData(),this.handleShowSmartUpdateResults(this.props)),this.props.isOpen&&(this.props.updateData!==e.updateData&&(this.fixSelections(),this.handleShowSmartUpdateResults(this.props)),e.tasks!==this.props.tasks&&(this.handleUpdateBackgroundTask(this.props.tasks),this.handleCheckUpdateBackgroundTask(this.props.tasks))),e.installation!==this.props.installation&&this.handleUpdateSmartUpdateFeatureStatus(this.props)}renderAutoUpdatesSettingsDrawer(){const{installation:{id:e,displayTitle:t},isUpdateSettingsFormOpen:n,onCloseUpdatesSettingsDialog:s,onAddDrawerSuccessMessage:i}=this.props;return(0,L.jsx)(zC,{title:t,subtitle:(0,L.jsx)(Ac,{content:"autoUpdatesSettingsDrawer.title"}),isOpen:n,installationId:e,onClose:s,addSuccessMessage:i})}renderUpdateButtonWithConfirmation(){const{isSmartUpdateEnabled:e}=this.state;return(0,L.jsx)(Ue,{"data-test-id":Uh,intent:"primary",onClick:this.handleOpenConfirmation,size:"lg",children:e?(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateButton"}):(0,L.jsx)(Ac,{content:"controllers.index.detail.updateButton"})},Uh)}render(){const{installation:{displayTitle:e,id:t},isOpen:n,onClose:s,title:i,backButton:a}=this.props,{backgroundTask:r,showTasksDetails:o}=this.state;let l=null;o&&r&&(l=fC(r,(()=>{this.setState({backgroundTask:null})})));const c=i||(0,L.jsx)(Ac,{content:"controllers.index.detail.updatesFormSubtitle"});return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(zi,{"data-test-id":"updates-drawer-section",title:c,subtitle:e,isOpen:n,onClose:s,backButton:a,"data-type":"updates",progress:l,hideButton:!1,form:{cancelButton:!1,applyButton:!1,submitButton:!1,additionalButtons:[this.renderSubmitButton()]},children:[this.props.renderDrawerMessages(),this.getDrawerContent()]}),this.renderAutoUpdatesSettingsDrawer(),this.renderSmartUpdatesDrawer()]})}}eA.propTypes={updateData:Vt().shape({applicable:Vt().bool,title:Vt().string,displayTitle:Vt().string,lastCheckUpdateTimestamp:Vt().number,multisite:Vt().bool,core:Vt().shape({version:Vt().string,availableVersion:Vt().string,restorePoint:Vt().shape({available:Vt().bool.isRequired})}),plugins:Vt().array,themes:Vt().array,tasks:Vt().object,autoUpdate:Vt().shape({available:Vt().bool}),smartUpdate:Vt().shape({status:Vt().bool.isRequired,taskStatus:Vt().string.isRequired})}),installation:Vt().shape({id:Vt().number.isRequired,url:Vt().string.isRequired,displayTitle:Vt().string.isRequired,installationType:Vt().oneOf(Object.values(c)).isRequired,features:Vt().shape({updates:Vt().shape({smart:Vt().shape({available:Vt().bool.isRequired,status:Vt().bool,promoAvailable:Vt().bool.isRequired}).isRequired}).isRequired}).isRequired}).isRequired,isSmartUpdatesUnpaid:Vt().bool.isRequired,onClose:Vt().func.isRequired,isOpen:Vt().bool.isRequired,openUpdatesType:Vt().string,backButton:Vt().bool,title:Vt().oneOfType([Vt().string,Vt().object]),showSmartUpdates:Vt().bool.isRequired,tasks:Vt().array,backgroundTasksActions:Vt().shape({fetchBackgroundTask:Vt().func.isRequired}).isRequired,appActions:Vt().shape({disableSmartUpdatePromoForUpdatesScreen:Vt().func.isRequired}).isRequired,instancesActions:Vt().shape({checkUpdates:Vt().func.isRequired,updateItems:Vt().func.isRequired,applySmartUpdate:Vt().func.isRequired,setSmartUpdatesStatus:Vt().func.isRequired,discardSmartUpdate:Vt().func.isRequired,instanceUpdateFinished:Vt().func.isRequired,instanceUpdateFailed:Vt().func.isRequired,getInstancesData:Vt().func.isRequired,fetchAvailableUpdates:Vt().func.isRequired}).isRequired,showSmartUpdatePromo:Vt().bool.isRequired,isSmartUpdatePromoAvailableForUpdatesScreen:Vt().bool.isRequired,isUpdateSettingsFormOpen:Vt().bool.isRequired,onOpenUpdatesSettingsDialog:Vt().func.isRequired,onCloseUpdatesSettingsDialog:Vt().func.isRequired,onAddDrawerSuccessMessage:Vt().func.isRequired,onAddDrawerErrorMessage:Vt().func.isRequired,onAddDrawerWarningMessage:Vt().func.isRequired,onClearDrawerMessages:Vt().func.isRequired,renderDrawerMessages:Vt().func.isRequired,addSuccessMessage:Vt().func.isRequired},eA.defaultProps={title:null,backButton:!1,tasks:null,openUpdatesType:null,updateData:null};const tA=(0,so.$j)(((e,t)=>({updateData:e.updates.find((e=>e.id===t.installation.id)),isSmartUpdatesUnpaid:e.app.unpaidFeatures.smart_update,assetsToChangingStatus:e.instances.assetsToChangingStatus,assetsToRemove:e.instances.assetsToRemove,showSmartUpdates:e.app.options.showSmartUpdates,tasks:e.backgroundTasks.tasks,showSmartUpdatePromo:e.app.options.showSmartUpdatePromo,isSmartUpdatePromoAvailableForUpdatesScreen:e.app.options.isSmartUpdatePromoAvailableForUpdatesScreen})),(t=>({appActions:nh(e,t),instancesActions:nh({checkUpdates:zb,updateItems:pv,applySmartUpdate:hv,getSmartUpdateResult:fv,setSmartUpdatesStatus:Rb,discardSmartUpdate:mv,instanceUpdateFinished:ny,instanceUpdateFailed:sy,getInstancesData:nv,fetchAvailableUpdates:qb},t),backgroundTasksActions:nh({fetchBackgroundTask:rw},t),addSuccessMessage:nh(wp,t)})))(Lx(eA)),nA=({isOpen:e,onSubmit:t,onClose:n,titleKey:s,descriptionKey:i,buttonYesKey:a,buttonNoKey:r,version:o=null})=>e?(0,L.jsx)(ji,{isOpen:e,cancelTitle:(0,L.jsx)(Ac,{content:r}),title:(0,L.jsx)(Ac,{content:s}),buttons:(0,L.jsx)(Ue,{"data-test-id":Bh,onClick:t,children:(0,L.jsx)(Ac,{content:a})}),size:"sm",onClose:n,children:(0,L.jsx)(Ac,{content:i,params:{version:o}})}):null;class sA extends U.Component{constructor(e){super(e),this.openRestore=()=>this.setState({isRestoreDialogOpen:!0}),this.openDelete=()=>this.setState({isDeleteDialogOpen:!0}),this.handleCloseRestore=()=>this.setState({isRestoreDialogOpen:!1}),this.handleCloseDelete=()=>this.setState({isDeleteDialogOpen:!1}),this.handleRestoreSnapshot=()=>{this.handleCloseRestore(),this.props.restoreSnapshot(this.props.installationId).then((e=>{e.status===nu&&this.setState({backgroundTaskId:e.data.task.id})}))},this.handleDeleteSnapshot=()=>{const{installationId:e,disableInstances:t,enableInstances:n,deleteSnapshot:s}=this.props;return this.handleCloseDelete(),t([e]),s(e).then((t=>(n([e]),t)))},this.state={isRestoreDialogOpen:!1,isDeleteDialogOpen:!1,backgroundTaskId:null}}componentWillReceiveProps(e){const{backgroundTaskId:t}=this.state;if(!t)return;const n=iw(t,e.tasks);n&&tw(n)&&"task\\restore"===n.code&&this.setState({backgroundTaskId:null},(()=>{this.props.restoreSnapshotFinished(n.publicParams.instanceId).catch((()=>{}))}))}render(){if(!this.props.restorePoint)return null;const{displayTimestamp:e,fullSnapshot:t,message:n,previousVersion:s}=this.props.restorePoint,{baseClassName:i}=this.props;return(0,L.jsxs)("span",{className:i,children:[e," ",(0,L.jsxs)(An,{target:(0,L.jsx)(Ue,{icon:"circle-info",ghost:!0}),children:[(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(n||"",Object.assign(Object.assign({},Ix.defaults),{transformTags:{a:(e,t)=>({tagName:"a",attribs:Object.assign(Object.assign({},t),{target:"_blank"})})}}))}}),!t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("br",{}),(0,L.jsx)("br",{}),(0,L.jsx)(Ac,{content:"controllers.index.detail.snapshotNote"})]})]})," ",(0,L.jsx)(Ue,{icon:"refresh",tooltip:(0,L.jsx)(Ac,{content:"controllers.index.detail.restorePointRestoreButton"}),"data-test-id":hL,onClick:e=>Rc(e,this.openRestore),ghost:!0})," ",(0,L.jsx)(Ue,{icon:"recycle",tooltip:(0,L.jsx)(Ac,{content:"controllers.index.detail.restorePointDeleteButton"}),onClick:e=>Rc(e,this.openDelete),ghost:!0}),(0,L.jsx)(nA,{isOpen:this.state.isRestoreDialogOpen,onClose:this.handleCloseRestore,onSubmit:this.handleRestoreSnapshot,buttonYesKey:"controllers.index.detail.snapshotRollback.buttonYes",buttonNoKey:"controllers.index.detail.snapshotRollback.buttonNo",titleKey:"controllers.index.detail.snapshotRollback.title",descriptionKey:s?"controllers.index.detail.snapshotRollback.descriptionVersion":"controllers.index.detail.snapshotRollback.description",version:s}),(0,L.jsx)(nA,{isOpen:this.state.isDeleteDialogOpen,onClose:this.handleCloseDelete,onSubmit:this.handleDeleteSnapshot,buttonYesKey:"controllers.index.detail.snapshotDelete.buttonYes",buttonNoKey:"controllers.index.detail.snapshotDelete.buttonNo",titleKey:"controllers.index.detail.snapshotDelete.title",descriptionKey:"controllers.index.detail.snapshotDelete.description"})]})}}sA.defaultProps={baseClassName:`${gu}restore-point-item`,restorePoint:null};const iA={restoreSnapshot:Kb,restoreSnapshotFinished:Zb,deleteSnapshot:Jb},aA=(0,so.$j)((e=>({tasks:e.backgroundTasks.tasks})),iA)(sA);class rA extends U.Component{constructor(){super(...arguments),this.getIcon=()=>{const{showIcon:e,baseClassName:t}=this.props;if(e)return(0,L.jsx)(he,{name:"folder-closed",className:`${t}__file-manager-link`})},this.renderPlesk=()=>{const{installation:{features:{fileManager:e}},children:t}=this.props;return(0,L.jsx)(fe,{href:e.url,icon:this.getIcon(),"data-test-id":Hh,children:t})},this.renderCpanel=()=>{const{goToUri:e,installation:{features:{fileManager:t},owner:n},children:s}=this.props;if(!t.url)return null;const i=bm({link:t.url,inNewWindow:!1,goToUri:e,accountUsername:null==n?void 0:n.login});return(0,L.jsx)(fe,Object.assign({},i,{icon:this.getIcon(),"data-test-id":Hh,children:s}))}}render(){const{installation:{features:{fileManager:e},installationType:t}}=this.props;return e.available&&e.url?QT(t)?this.renderPlesk():JT(t)?this.renderCpanel():null:null}}rA.defaultProps={baseClassName:`${gu}instance-file-manager`,showIcon:!0};const oA=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(rA);class lA extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{installation:{features:{backups:e}}}=this.props;return e.backupManagerUrl?(0,L.jsx)(Ue,{component:"a",href:e.backupManagerUrl,"data-test-id":hL,children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.buttonRestore"})})}):null},this.renderCpanel=()=>{const{installation:{features:{backups:e},owner:t},goToUri:n}=this.props;if(!e.backupManagerUrl)return null;const s=bm({link:e.backupManagerUrl,inNewWindow:!0,goToUri:n,accountUsername:t.login});return(0,L.jsx)(Ue,Object.assign({component:"a","data-test-id":hL},s,{children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.buttonRestore"})})}))}}render(){const{installation:{features:{backups:e},installationType:t}}=this.props;return e.panelBackupsAvailable&&e.backupManagerUrl?QT(t)?this.renderPlesk():JT(t)?this.renderCpanel():null:null}}const cA=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(lA);class uA extends U.Component{constructor(e){super(e),this.getRemoteInstanceLocation=()=>{const{installation:{installationType:e,server:t,url:n}}=this.props;return iC(e)?n:nC(e)?t:null},this.handleToggleBackupDrawer=()=>this.setState((e=>({showBackupDrawer:!e.showBackupDrawer}))),this.renderRemoteInstanceActions=()=>{const{installation:{id:e},onToggleRemoteInstanceSettings:t,onDetach:n,checkWordPressIntegrityFeatureEnabled:s,onOpenCheckWordPressIntegrityDialog:i}=this.props;return(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"detach",children:(0,L.jsx)(Ue,{onClick:()=>n([e]),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenRemoteInstance.buttonDetach"})})}),(0,L.jsx)(_s,{title:"properties",children:(0,L.jsx)(fe,{onClick:t,"data-test-id":dL,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenRemoteInstance.linkProperties"})})}),s&&(0,L.jsx)(_s,{title:"checkWordPressIntegrity",children:(0,L.jsx)(fe,{onClick:()=>i(e),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenRemoteInstance.linkCheckWordPressIntegrity"})})})]})},this.renderRemoteAgentInstanceActions=()=>{const{installation:{id:e},onToggleRemoteAgentInstanceSettings:t,onDetach:n,checkWordPressIntegrityFeatureEnabled:s,onOpenCheckWordPressIntegrityDialog:i}=this.props;return(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"detach",children:(0,L.jsx)(Ue,{onClick:()=>n([e]),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenRemoteAgentInstance.buttonDetach"})})}),(0,L.jsx)(_s,{title:"properties",children:(0,L.jsx)(fe,{onClick:t,"data-test-id":pL,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenRemoteAgentInstance.linkProperties"})})}),s&&(0,L.jsx)(_s,{title:"checkWordPressIntegrity",children:(0,L.jsx)(fe,{onClick:()=>i(e),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenRemoteAgentInstance.linkCheckWordPressIntegrity"})})})]})},this.renderActions=()=>{const{installation:{domain:e,id:t,installationType:n,features:{backups:s,fileManager:i,malwareScan:a},status:{infected:r}},onOpenCheckWordPressIntegrityDialog:o,checkWordPressIntegrityFeatureEnabled:l}=this.props;return iC(n)?this.renderRemoteAgentInstanceActions():nC(n)?this.renderRemoteInstanceActions():r?(0,L.jsxs)(Ss,{children:[a.available&&a.url&&(0,L.jsx)(_s,{title:"malwareScan",children:(0,L.jsx)(Ue,{component:"a",href:a.url,children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.buttonMalwareScan"})})})})||null,i.available&&i.url&&(0,L.jsx)(_s,{title:"fileManager",children:(0,L.jsx)(oA,{installation:this.props.installation,showIcon:!1,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.linkFileManager"})})})||null,(null==e?void 0:e.url)&&(0,L.jsx)(_s,{title:"domain",children:(0,L.jsx)(fe,{href:null==e?void 0:e.url,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.linkDomain"})})})||null,l&&(0,L.jsx)(_s,{title:"checkWordPressIntegrity",children:(0,L.jsx)(fe,{onClick:()=>o(t),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.linkCheckWordPressIntegrity"})})})]}):(0,L.jsxs)(Ss,{children:[s.panelBackupsAvailable&&!s.wptBackupsAvailable&&(0,L.jsx)(_s,{title:"restore",children:(0,L.jsx)(cA,{installation:this.props.installation})})||null,s.wptBackupsAvailable&&(0,L.jsx)(_s,{title:"restore",children:(0,L.jsx)(Ue,{component:"a",onClick:this.handleToggleBackupDrawer,"data-test-id":hL,children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.buttonRestore"})})})})||null,i.available&&i.url&&(0,L.jsx)(_s,{title:"fileManager",children:(0,L.jsx)(oA,{installation:this.props.installation,showIcon:!1,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.linkFileManager"})})})||null,(null==e?void 0:e.url)&&(0,L.jsx)(_s,{title:"domain",children:(0,L.jsx)(fe,{href:null==e?void 0:e.url,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.linkDomain"})})})||null,l&&(0,L.jsx)(_s,{title:"checkWordPressIntegrity",children:(0,L.jsx)(fe,{onClick:()=>o(t),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.linkCheckWordPressIntegrity"})})})]})},this.state={showBackupDrawer:!1}}render(){const{installation:{errorMessage:e,features:{restorePoint:t},id:n,path:s,status:{alive:i,infected:a}},disableInstances:r,enableInstances:o,baseClassName:l}=this.props;if(i&&!a)return null;const c=this.getRemoteInstanceLocation();return a?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.description",params:{refreshIcon:(0,L.jsx)(he,{name:"refresh"})}})}),(0,L.jsx)(Ar,{className:`${l}__panel`,children:(0,L.jsxs)(vi,{className:`${l}__section`,children:[c&&(0,L.jsx)(Ks,{className:`${l}__section-item`,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.remoteInstanceLocation"}),children:c})||null,(0,L.jsx)(Ks,{className:`${l}__section-item`,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.path"}),children:s})]})}),this.renderActions()]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(as,{children:[(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.filesFound"}),":"]}),(0,L.jsx)(Ar,{className:`${l}__panel`,children:(0,L.jsxs)(vi,{className:`${l}__section`,children:[c&&(0,L.jsx)(Ks,{className:`${l}__section-item`,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.remoteInstanceLocation"}),children:c})||null,(0,L.jsx)(Ks,{className:`${l}__section-item`,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.path"}),children:s})]})}),(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.description"})}),e&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{className:`${l}__error-details`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.errorDetails"})}),children:e})||null,t&&t.restorePointTimestamp&&(0,L.jsx)(vi,{children:(0,L.jsx)(Ks,{className:"wpt-compact-section-item",title:(0,L.jsx)(Ac,{content:"controllers.index.detail.restorePointTitle"}),children:(0,L.jsx)(aA,{installationId:n,restorePoint:t,disableInstances:r,enableInstances:o})})})||null,this.renderActions(),(0,L.jsx)(_C,{installation:this.props.installation,onClose:this.handleToggleBackupDrawer,isOpen:this.state.showBackupDrawer})]})}}uA.defaultProps={checkWordPressIntegrityFeatureEnabled:!1,baseClassName:`${gu}problem-instance-details`};const dA=uA;class pA extends U.Component{constructor(e){super(e),this.clearMessages=()=>this.setState({messages:[]}),this.clearMessage=e=>{this.setState((t=>({messages:t.messages.filter((({key:t})=>t!==e))})))},this.setMessages=e=>this.setState((t=>{const n=[...e],s=e.map((e=>e.key));return t.messages.forEach((e=>{s.length&&-1===s.indexOf(e.key)&&n.push(e)})),{messages:n}})),this.addSuccessMessage=(e,t,n=$c(4))=>{this.setMessages([{key:n,status:ru,message:e,isTranslate:t}])},this.addErrorMessage=(e,t,n=$c(4))=>{this.setMessages([{key:n,status:lu,message:e,isTranslate:t}])},this.addWarningMessage=(e,t,n=$c(4))=>{this.setMessages([{key:n,status:ou,message:e,isTranslate:t}])},this.state={messages:[]}}renderMessage(){const{messages:e}=this.state;return e.length?e.map((({key:e,status:t,message:n,icon:s=null,isTranslate:i=!1})=>{if(!t||!n)return null;const a=i?(0,L.jsx)(Ac,{content:n}):(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(n,Object.assign(Object.assign({},Ix.defaults),{transformTags:{a:(e,t)=>({tagName:"a",attribs:Object.assign(Object.assign({},t),{target:"_blank"})})}}))}}),r=t===su?lu:t;return(0,L.jsxs)(ge,{intent:r,className:"wpt-drawer-alert",onClose:()=>this.clearMessage(e),children:[s&&(0,L.jsxs)(L.Fragment,{children:[s," "]}),a]},$c(4))})):null}render(){return(0,L.jsxs)(zi,Object.assign({},this.props,{children:[this.renderMessage(),(0,U.cloneElement)(this.props.children,{setMessages:this.setMessages,clearMessages:this.clearMessages,addSuccessMessage:this.addSuccessMessage,addErrorMessage:this.addErrorMessage,addWarningMessage:this.addWarningMessage})]}))}}const hA=pA;class mA extends U.Component{constructor(e){super(e),this.loadProperties=()=>this.props.getRemoteServerInstallationProperties(this.props.installation.id).then((e=>{this.setState({values:{remoteInstanceIp:e.ip||"",remoteInstanceSystemUser:e.systemUser||"",remoteInstancePhpBin:e.php.bin||"",remoteInstancePhpIni:e.php.ini||""}})})).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})})),this.handleSubmit=e=>{this.setState({isSending:!0});const{installation:{id:t},updateRemoteInstanceProperties:n}=this.props;this.drawer.clearMessages(),n(t,e).then((e=>{const t=e.data;e.status===su?(e.message&&this.drawer.addErrorMessage(e.message),t&&t.formErrors&&this.setState({errors:t.formErrors})):(this.drawer.addSuccessMessage("list-ui.instances.forms.remoteInstanceProperties.successfullySaved",!0,"remoteInstancePropertiesSuccessfullySaved"),this.setState({errors:null}))})).catch((()=>{})).finally((()=>{this.setState({isSending:!1})}))},this.handleRedetectInstanceProperties=()=>{this.setState({isLoading:!0});const{installation:{id:e},redetectRemoteInstanceProperties:t}=this.props;this.drawer.clearMessages(),t(e).then((e=>{e.status===su?e.message&&this.drawer.addErrorMessage(e.message):(this.setState({errors:null}),this.loadProperties().then((()=>{this.drawer.addSuccessMessage("list-ui.instances.forms.remoteInstanceProperties.successfullyRedetected",!0,"remoteInstancePropertiesSuccessfullyRedetected")})))})).catch((()=>{this.setState({isLoading:!1})}))},this.state={values:{remoteInstanceIp:"",remoteInstanceSystemUser:"",remoteInstancePhpBin:"",remoteInstancePhpIni:""},errors:null,isSending:!1,isLoading:!0}}componentDidMount(){this.loadProperties()}render(){const{values:e,errors:t,isSending:n,isLoading:s}=this.state,{onToggleRemoteInstancePropertiesForm:i,installation:a}=this.props;return(0,L.jsx)(hA,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.drawerTitle"}),subtitle:a.displayTitle,isOpen:!0,onClose:i,"data-test-id":Ih,size:"sm","data-type":Ih,form:s?null:{state:n?"submit":void 0,submitButton:{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.submitButton"}),"data-test-id":"remote-instance-submit-button"},cancelButton:{onClick:i},applyButton:!1,onSubmit:this.handleSubmit,values:e,errors:t,vertical:!0,"data-test-id":"remote-instance-properties-form"},ref:e=>this.drawer=e,children:s?(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.redetectingInstanceProperties"})}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("div",{children:(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.headDescription"})})}),(0,L.jsx)("div",{style:{margin:"8px 0 8px 0"},children:(0,L.jsx)(Ue,{onClick:this.handleRedetectInstanceProperties,"data-test-id":"remote-instance-redetect-button",icon:"reload",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.redetectInstanceProperties"})})}),(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.fieldRemoteInstanceIp"}),"data-test-id":"remote-instance-field-ip",name:"remoteInstanceIp",size:"lg",required:!0}),(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.fieldRemoteInstanceSystemUser"}),"data-test-id":"remote-instance-field-system-user",name:"remoteInstanceSystemUser",size:"lg",required:!0}),(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.fieldRemoteInstancePhpBin"}),"data-test-id":"remote-instance-field-php-bin",name:"remoteInstancePhpBin",size:"lg",required:!0}),(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteInstanceProperties.fieldRemoteInstancePhpIni"}),"data-test-id":"remote-instance-field-php-ini",name:"remoteInstancePhpIni",size:"lg",required:!0})]})},"remote-instance-properties-drawer")}}mA.propTypes={installation:Vt().shape({id:Vt().number.isRequired,displayTitle:Vt().string.isRequired}).isRequired,updateRemoteInstanceProperties:Vt().func.isRequired,redetectRemoteInstanceProperties:Vt().func.isRequired,onToggleRemoteInstancePropertiesForm:Vt().func.isRequired,getRemoteServerInstallationProperties:Vt().func.isRequired};const fA={updateRemoteInstanceProperties:Lv,redetectRemoteInstanceProperties:Uv,getRemoteServerInstallationProperties:Ay},gA=(0,so.$j)(null,fA)(mA);class bA extends U.Component{constructor(e){super(e),this.loadProperties=()=>this.props.getRemoteAgentInstallationProperties(this.props.installation.id).then((e=>{this.setState({values:{pluginUrl:e.pluginUrl||"",token:e.token||"",ip:e.ip||""}})})).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})})),this.handleSubmit=e=>{this.setState({isSending:!0});const{installation:{id:t},updateRemoteAgentInstanceProperties:n}=this.props;this.drawer.clearMessages(),n(t,e).then((e=>{const t=e.data;e.status===su?(e.message&&this.drawer.addErrorMessage(e.message),t&&t.formErrors&&this.setState({errors:t.formErrors})):(this.drawer.addSuccessMessage("list-ui.instances.forms.remoteAgentInstanceProperties.successfullySaved",!0,"remoteAgentInstancePropertiesSuccessfullySaved"),this.setState({errors:null}))})).catch((()=>{})).finally((()=>{this.setState({isSending:!1})}))},this.state={values:{pluginUrl:"",token:"",ip:""},errors:null,isSending:!1,isLoading:!0}}componentDidMount(){this.loadProperties()}render(){const{values:e,errors:t,isSending:n,isLoading:s}=this.state,{onToggleRemoteAgentInstancePropertiesForm:i,installation:a}=this.props;return(0,L.jsx)(hA,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteAgentInstanceProperties.drawerTitle"}),subtitle:a.displayTitle,isOpen:!0,onClose:i,"data-test-id":Lh,size:"sm","data-type":Lh,form:s?null:{state:n?"submit":void 0,onSubmit:this.handleSubmit,submitButton:{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteAgentInstanceProperties.submitButton"}),"data-test-id":"remote-agent-instance-submit-button"},cancelButton:{onClick:i},applyButton:!1,values:e,errors:t,vertical:!0},ref:e=>this.drawer=e,children:s?(0,L.jsx)(It,{}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("div",{children:(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteAgentInstanceProperties.headDescription"})})}),(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteAgentInstanceProperties.fieldPluginUrl"}),"data-test-id":"remote-agent-instance-field-plugin-url",name:"pluginUrl",size:"lg",required:!0}),(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteAgentInstanceProperties.fieldToken"}),"data-test-id":"remote-agent-instance-field-token",name:"token",size:"lg",required:!0}),(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.remoteAgentInstanceProperties.fieldIp"}),"data-test-id":"remote-agent-instance-field-ip",name:"ip",size:"lg"})]})},"remote-agent-instance-properties-drawer")}}bA.propTypes={installation:Vt().shape({id:Vt().number.isRequired,displayTitle:Vt().string.isRequired}).isRequired,updateRemoteAgentInstanceProperties:Vt().func.isRequired,onToggleRemoteAgentInstancePropertiesForm:Vt().func.isRequired,getRemoteAgentInstallationProperties:Vt().func.isRequired};const vA={updateRemoteAgentInstanceProperties:Mv,getRemoteAgentInstallationProperties:Ey},yA=(0,so.$j)(null,vA)(bA);class _A extends U.Component{constructor(e){super(e),this.getContent=()=>{const{url:e,urlToSynchronize:t,isLoading:n}=this.state;return n?(0,L.jsx)(It,{}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"synchronizeSiteUrlDialog.description"})}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"synchronizeSiteUrlDialog.currentSiteUrl"}),children:(0,L.jsx)("a",{href:e,children:e})}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"synchronizeSiteUrlDialog.siteUrlAfterSynchronization"}),children:(0,L.jsx)("a",{href:t,children:t})})]})},this.state={url:void 0,urlToSynchronize:void 0,isInstanceUrlMatchesActualDomainUrl:!1,isLoading:!0}}componentDidUpdate(e){!e.isOpen&&this.props.isOpen&&this.handleLoadData()}handleLoadData(){this.setState({isLoading:!0}),this.props.getSynchronizeSiteUrlParams(this.props.installationId).then((({data:e})=>{this.setState({url:e?e.url:void 0,urlToSynchronize:e?e.urlToSynchronize:void 0,isInstanceUrlMatchesActualDomainUrl:!!e&&e.isInstanceUrlMatchesActualDomainUrl})})).finally((()=>{this.setState({isLoading:!1})}))}render(){const{isOpen:e,onClose:t,onSynchronizeSiteUrl:n}=this.props,{isInstanceUrlMatchesActualDomainUrl:s,isLoading:i}=this.state;return(0,L.jsx)(ji,{title:(0,L.jsx)(Ac,{content:"synchronizeSiteUrlDialog.title"}),size:"xs",isOpen:e,onClose:t,cancelTitle:(0,L.jsx)(Ac,{content:"synchronizeSiteUrlDialog.buttonBack"}),form:{vertical:!0,requiredMark:!1,onSubmit:n,submitButton:{children:(0,L.jsx)(Ac,{content:"synchronizeSiteUrlDialog.buttonSynchronize"}),"data-test-id":"synchronize-site-url-button-synchronize",disabled:s||i,tooltip:s?(0,L.jsx)(Ac,{content:"synchronizeSiteUrlDialog.siteUrlMatchesCurrentDomain"}):null}},closable:!0,children:this.getContent()})}}const xA=(0,so.$j)(null,(e=>({getSynchronizeSiteUrlParams:t=>e(by(t))})))(_A),SA=(0,so.$j)(((e,t)=>{const{installation:{id:n}}=t;return{apiUrl:e.app.urls.apiUrl,isScreenshotLoading:e.instances.installationsWithScreenshotLoading.has(n)}}),(e=>({instancesActions:nh({refreshScreenshot:Nb},e)})))((e=>{const{apiUrl:t,baseClassName:n=`${gu}instance-screenshot-preview-panel`,installation:{screenshot:s},isScreenshotLoading:i=!1}=e;return(0,L.jsxs)("div",{className:`${n}-wrapper`,children:[(0,L.jsx)(At,{className:n,image:(null==s?void 0:s.url)?`${t}/${null==s?void 0:s.url}`:null,style:i?{opacity:.2}:null,children:!i&&(()=>{const{installation:{url:t}}=e,i=(null==s?void 0:s.createdAt)?new Date(s.createdAt):null;return(0,L.jsxs)(L.Fragment,{children:[t&&(0,L.jsx)(Ue,{intent:"primary",component:"a",href:t,target:"_blank",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.linkViewSite"})}),(0,L.jsx)("div",{className:`${n}__datetime`,children:i&&(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.screenshotPreview.datetime.description"}),children:(0,L.jsxs)("span",{children:[(0,L.jsx)(he,{name:"clock"}),(0,L.jsx)("span",{children:i.toLocaleString()})]})})}),(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.screenshotPreview.refreshNow"}),children:(0,L.jsx)(he,{className:`${n}__refresh-button`,name:"refresh",size:"16",onClick:()=>(()=>{const{installation:{id:t},instancesActions:{refreshScreenshot:n}}=e;n(t)})()})})]})})()}),i&&(0,L.jsx)("div",{className:`${n}__loader-spinner`,children:(0,L.jsx)(It,{})})]})})),wA=(0,so.$j)((e=>({isOwnerColumnAvailable:e.app.options.isOwnerColumnAvailable})))((function(e){var t;const{isOwnerColumnAvailable:n,installation:s,installation:{status:{alive:i,unsupported:a},owner:r,server:o,installationType:l},onToggleRemoteInstanceSettings:c,baseClassName:u=`${gu}instance-left-column`,initialShowAdminSettingsDrawer:d=!1}=e;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:`${u}-preview-panel`,children:(0,L.jsx)(SA,{installation:s})}),!a&&(0,L.jsxs)(vi,{vertical:!1,children:[i&&(0,L.jsx)("div",{className:`${u}-admin-buttons`,children:(0,L.jsx)(UA,{installation:s,initialShowAdminSettingsDrawer:d})}),n&&(null==r?void 0:r.name)&&(0,L.jsx)(YA,{installation:s,baseClassName:u}),(null===(t=s.domain)||void 0===t?void 0:t.name)&&(0,L.jsx)(CA,{installation:s,baseClassName:u}),o&&!sC(l)&&(0,L.jsx)(BA,{installation:s,onToggleRemoteInstanceSettings:c,baseClassName:u}),(0,L.jsx)(zA,{installation:s,baseClassName:u})]})]})})),kA="instance-link-to-domain";class jA extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{installation:{domain:e},baseClassName:t}=this.props;return(null==e?void 0:e.url)?(0,L.jsx)(fe,{href:null==e?void 0:e.url,className:t,"data-test-id":kA,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.manageDomain"})}):(0,L.jsx)("span",{className:t,"data-test-id":kA,children:null==e?void 0:e.name})},this.renderCpanel=()=>{const{installation:{domain:e},baseClassName:t}=this.props;return(0,L.jsx)("span",{className:t,"data-test-id":kA,children:null==e?void 0:e.name})}}render(){const{installation:{installationType:e,domain:t}}=this.props;if(!(null==t?void 0:t.name))return null;let n=null==t?void 0:t.name;return QT(e)?n=this.renderPlesk():JT(e)&&(n=this.renderCpanel()),n}}jA.defaultProps={baseClassName:`${gu}instance-domain-link`};const TA=jA,CA=e=>{const{installation:t,baseClassName:n=`${gu}instance-left-column`}=e;return(0,L.jsx)(Ks,{className:`${n}-section-item`,children:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"web",size:"16"}),title:(0,L.jsx)(TA,{installation:t}),tooltip:(0,L.jsx)(Ac,{content:"list-ui.instances.generalTab.linkDomain"})})})};const DA=e=>{var t,{children:n,onChange:s,value:i}=e,a=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["children","onChange","value"]);if(!n||1!==n.length)return(0,L.jsx)(ui,Object.assign({},a,{children:(0,L.jsx)(Ta,{value:i,onChange:s,children:n})}));const[r]=n;return(0,L.jsx)(ui,Object.assign({},a,{children:null===(t=null==r?void 0:r.props)||void 0===t?void 0:t.children}))};class PA extends U.Component{constructor(e){super(e),this.handleSubmit=e=>{this.state.isProcessing||(this.setState({values:e,errors:{},isProcessing:!0}),this.props.setAdminSettings(this.props.instanceId,this.state.values).then((()=>{this.props.onClose()})).catch((e=>{var t,n;(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors)&&this.setState({errors:e.response.data.formErrors})})).finally((()=>{this.setState({isProcessing:!1})})))},this.handleSwitchShowPassword=()=>(this.setState((e=>({showCurrentPassword:!e.showCurrentPassword}))),!1),this.handleChangeUser=e=>{this.setState((t=>({values:Object.assign(Object.assign({},t.values),{login:e,password:""}),errors:{}})))};const{adminSettings:{currentLanguage:t,currentEmail:n,availableLogins:s}}=this.props;let i=s.find((e=>e.login===this.props.adminSettings.currentLogin));i||(s.length>0?[i]=this.props.adminSettings.availableLogins:i={login:"",title:""}),this.state={isProcessing:!1,errors:{},values:{email:n,language:t,login:i.login,password:""},showCurrentPassword:!1},0===this.props.adminSettings.availableLogins.length&&(this.state.errors.login={isEmpty:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.errorAdminAccountDoesntExists"})})}render(){const{values:e,errors:t,showCurrentPassword:n}=this.state,{adminSettings:{loginUrl:s,availableLogins:i,availableLanguages:a,currentLogin:r,currentPassword:o},isOpen:l,onClose:c,baseClassName:u}=this.props;return(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.title"}),onClose:c,"data-test-id":"admin-settings-popover","data-type":"admin-settings",size:"xs",className:u,isOpen:l,form:{onSubmit:this.handleSubmit,applyButton:!1,submitButton:{"data-test-id":"admin-settings-change-settings",children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.change"})},values:e,errors:t,state:this.state.isProcessing?"submit":void 0,vertical:!0},children:[(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.loginUrl"}),description:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.loginUrlHint"}),children:[(0,L.jsx)(Wn,{children:s}),(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"toolbar.openInNewTab"}),children:(0,L.jsx)(wn,{href:s||"",target:"_blank",children:""})})]}),(0,L.jsx)(DA,{"data-test-id":"admin-settings-current-login",label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.Administrator"}),onChange:this.handleChangeUser,name:"login",disabled:!i.length||this.state.isProcessing,children:i.map((e=>(0,L.jsx)(wa,{value:e.login,children:e.login},e.login)))}),e.login===r&&o&&(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.currentPassword"}),children:[n?(0,L.jsx)("strong",{"data-test-id":"admin-settings-current-password",children:o}):o.replace(/./g,"*")," ",(0,L.jsx)(he,{"data-test-id":"admin-settings-show-password-button",name:n?"eye-closed":"eye",style:{cursor:"pointer"},onClick:this.handleSwitchShowPassword})]}),(0,L.jsx)(ra,{size:"fill",name:"password",onChange:t=>this.setState({values:Object.assign(Object.assign({},e),{password:t})}),label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.newPassword"}),disabled:!i.length||this.state.isProcessing,required:e.login!==r}),(0,L.jsx)(ga,{size:"fill",name:"email",onChange:t=>this.setState({values:Object.assign(Object.assign({},e),{email:t})}),label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.adminEmail"}),disabled:!i.length||this.state.isProcessing,required:!0}),(0,L.jsx)(DA,{name:"language",label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.language"}),"data-test-id":"admin-settings-language-select",onChange:t=>this.setState({values:Object.assign(Object.assign({},e),{language:t})}),value:e.language?e.language:void 0,children:a.map((e=>(0,L.jsx)(wa,{"data-test-value":e.code,value:e.code,children:e.title},e.code)))})]})}}PA.defaultProps={baseClassName:`${gu}admin-settings-form`};const IA=PA;class OA extends U.Component{constructor(e){var t;super(e),this.handleSubmit=e=>{if(this.state.isProcessing)return;const{setWpUser:t}=this.props;this.setState({values:e,errors:{},isProcessing:!0},(()=>t(this.props.instanceId,this.state.values).then((()=>{this.props.onClose()})).catch((e=>{var t,n;(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors)&&this.setState({errors:e.response.data.formErrors})})).finally((()=>{this.setState({isProcessing:!1})}))))},this.handleSwitchShowPassword=()=>{this.setState((e=>({showCurrentPassword:!e.showCurrentPassword})))};const{wpUser:n}=this.props;this.state={isProcessing:!1,errors:{},values:{email:n.email,login:n.login,password:null!==(t=n.password)&&void 0!==t?t:""},showCurrentPassword:!1}}render(){const{values:e,errors:t,showCurrentPassword:n}=this.state,{onClose:s,baseClassName:i,isOpen:a,wpUser:r}=this.props;return(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.wp-account.title"}),onClose:s,"data-type":"admin-settings",size:"xs",className:i,isOpen:a,form:{onSubmit:this.handleSubmit,applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.wp-account.submit"})},values:e,errors:t,state:this.state.isProcessing?"submit":void 0,vertical:!0},children:[(0,L.jsx)(ga,{size:"fill",label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.wp-account.login"}),name:"login",disabled:!0}),(0,L.jsx)(ra,{size:"fill",name:"password",onChange:t=>this.setState({values:Object.assign(Object.assign({},e),{password:t})}),label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.wp-account.password"}),disabled:this.state.isProcessing,required:!0}),(0,L.jsx)(ga,{size:"fill",name:"email",onChange:t=>this.setState({values:Object.assign(Object.assign({},e),{email:t})}),label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.wp-account.email"}),disabled:this.state.isProcessing,required:!0})]})}}OA.defaultProps={baseClassName:`${gu}wp-account-settings-form`};const LA={setWpUser:_v},MA=(0,so.$j)(null,LA)(OA);class AA extends U.Component{constructor(e){super(e),this.handleCloseAdminSettingsDrawer=()=>this.setState({showAdminSettingsDrawer:!1}),this.handleOpenAdminSettingsForm=()=>{this.state.showLoadingAdminSettings||(this.setState({showLoadingAdminSettings:!0}),this.props.getAdminSettings(this.props.installation.id).then((e=>{this.setState({adminSettingsFormData:Object.assign({},e),showAdminSettingsDrawer:!0})})).catch((()=>{})).finally((()=>{this.setState({showLoadingAdminSettings:!1})})))},this.handleCloseWpAccountSettingsDrawer=()=>this.setState({showWpAccountSettingsDrawer:!1}),this.handleOpenWpAccountSettingsDrawer=()=>{this.state.showLoadingWpAccountSettings||(this.setState({wpAccountFormData:null,showLoadingWpAccountSettings:!0}),this.props.getWpUser(this.props.installation.id).then((e=>{this.setState({wpAccountFormData:Object.assign({},e),showWpAccountSettingsDrawer:!0})})).catch((()=>{})).finally((()=>{this.setState({showLoadingWpAccountSettings:!1})})))},this.renderLoginButton=()=>{const{installation:{id:e,features:{maintenance:t,credentials:n}},isAuxiliaryUser:s}=this.props,i=t.status&&t.fullMode?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.leftColumn.tooltip.loginToWordpress"}):null;return(0,L.jsx)(SL,{disabled:!!t.status&&!!t.fullMode,instanceId:e,type:"button",hasAdminCredentials:null==n?void 0:n.available,onOpenAdminSettings:s?this.handleOpenWpAccountSettingsDrawer:this.handleOpenAdminSettingsForm,tooltip:i,children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.leftColumn.loginToWordpress"})})},this.renderAdminSettings=()=>{const{installation:{id:e}}=this.props;return(0,L.jsxs)(L.Fragment,{children:[this.state.showLoadingAdminSettings?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.setup"})," ",(0,L.jsx)(wS,{})]}):(0,L.jsx)(wn,{"data-test-id":"admin-settings-button",onClick:e=>Rc(e,this.handleOpenAdminSettingsForm),tabIndex:0,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.setup"})}),this.state.adminSettingsFormData&&(0,L.jsx)(IA,{instanceId:e,adminSettings:this.state.adminSettingsFormData,setAdminSettings:this.props.setAdminSettings,isOpen:this.state.showAdminSettingsDrawer,onClose:this.handleCloseAdminSettingsDrawer})]})},this.renderWpAccountSettings=()=>{const{installation:{id:e}}=this.props,{showLoadingWpAccountSettings:t,showWpAccountSettingsDrawer:n,wpAccountFormData:s}=this.state;return(0,L.jsxs)(L.Fragment,{children:[t?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.setup"})," ",(0,L.jsx)(wS,{})]}):(0,L.jsx)(wn,{onClick:e=>Rc(e,this.handleOpenWpAccountSettingsDrawer),tabIndex:0,children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.settings.setup"})}),s&&(0,L.jsx)(MA,{instanceId:e,wpUser:s,isOpen:n,onClose:this.handleCloseWpAccountSettingsDrawer})]})},this.state={showAdminSettingsDrawer:!1,showWpAccountSettingsDrawer:!1,showLoadingAdminSettings:!1,showLoadingWpAccountSettings:!1,adminSettingsFormData:null,wpAccountFormData:null}}componentDidMount(){const{initialShowAdminSettingsDrawer:e}=this.props;e&&this.handleOpenAdminSettingsForm()}render(){const{installation:{status:{unsupported:e}},baseClassName:t,isAuxiliaryUser:n}=this.props;return e?null:(0,L.jsxs)(Ks,{className:t,children:[this.renderLoginButton(),!n&&this.renderAdminSettings(),n&&this.renderWpAccountSettings()]})}}AA.defaultProps={baseClassName:`${gu}admin-buttons-section-item`,initialShowAdminSettingsDrawer:!1};const EA={getAdminSettings:gv,setAdminSettings:bv,getWpUser:yv},UA=(0,so.$j)((e=>({isAuxiliaryUser:e.app.isAuxiliaryUser})),EA)(AA),RA="instance-link-to-owner";class NA extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{installation:{owner:e},baseClassName:t}=this.props;return(null==e?void 0:e.url)?(0,L.jsx)(fe,{href:e.url,className:t,"data-test-id":RA,children:null==e?void 0:e.name}):(0,L.jsx)("span",{className:t,"data-test-id":RA,children:null==e?void 0:e.name})},this.renderCpanel=()=>{const{installation:{owner:e},goToUri:t,baseClassName:n}=this.props;return _m()?(0,L.jsx)(fe,{onClick:()=>t("/",e.login),className:n,"data-test-id":RA,children:null==e?void 0:e.name}):(0,L.jsx)("span",{className:n,"data-test-id":RA,children:null==e?void 0:e.name})}}render(){const{installation:{installationType:e,owner:t}}=this.props;if(!(null==t?void 0:t.name))return null;let n=t.name;return QT(e)?n=this.renderPlesk():JT(e)&&(n=this.renderCpanel()),n}}NA.defaultProps={baseClassName:`${gu}instance-owner-link`};const FA=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(NA),YA=e=>{const{installation:t,baseClassName:n=`${gu}instance-left-column`}=e;return(0,L.jsx)(Ks,{className:`${n}-section-item`,children:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"user",size:"16"}),title:(0,L.jsx)(FA,{installation:t}),tooltip:(0,L.jsx)(Ac,{content:"list.instances.owner"})})})},BA=e=>{const{installation:{server:t,installationType:n},onToggleRemoteInstanceSettings:s,baseClassName:i=`${gu}instance-left-column`}=e;return(0,L.jsxs)(Ks,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.generalTab.server"}),className:`${i}-section-item-tight`,children:[(0,L.jsx)("span",{"data-test-id":"instance-remote-server-host",children:t}),(0,L.jsx)(Ue,{icon:"sliders",onClick:s,"data-test-id":iC(n)?pL:dL,className:`${i}-server-settings`,ghost:!0})]})},HA=function(e,t,n,s){const i=(0,U.useRef)(t);VA((()=>{i.current=t}),[t]),(0,U.useEffect)((()=>{var t;const a=null!==(t=null==n?void 0:n.current)&&void 0!==t?t:window;if(!a||!a.addEventListener)return;const r=e=>i.current(e);return a.addEventListener(e,r,s),()=>{a.removeEventListener(e,r,s)}}),[e,n,s])},VA="undefined"!=typeof window?U.useLayoutEffect:U.useEffect,$A=({id:e,children:t,ttl:n=2592e3,showSince:s,showUntil:i,forciblyHidden:a})=>{const[r,o]=function(e,t){const n=(0,U.useCallback)((()=>{if("undefined"==typeof window)return t;try{const n=window.localStorage.getItem(e);return n?function(e){try{return"undefined"===e?void 0:JSON.parse(null!=e?e:"")}catch(t){return void console.log("parsing error on",{value:e})}}(n):t}catch(n){return console.warn(`Error reading localStorage key “${e}”:`,n),t}}),[t,e]),[s,i]=(0,U.useState)(n),a=function(e){const t=(0,U.useRef)((()=>{throw new Error("Cannot call an event handler while rendering.")}));return VA((()=>{t.current=e}),[e]),(0,U.useCallback)(((...e)=>t.current(...e)),[t])}((t=>{"undefined"==typeof window&&console.warn(`Tried setting localStorage key “${e}” even though environment is not a client`);try{const n=t instanceof Function?t(s):t;window.localStorage.setItem(e,JSON.stringify(n)),i(n),window.dispatchEvent(new Event("local-storage"))}catch(t){console.warn(`Error setting localStorage key “${e}”:`,t)}}));(0,U.useEffect)((()=>{i(n())}),[]);const r=(0,U.useCallback)((t=>{(null==t?void 0:t.key)&&t.key!==e||i(n())}),[e,n]);return HA("storage",r),HA("local-storage",r),[s,a]}("wpt-shown-items",{}),l=new Date,c=Date.now(),u=(()=>{var t,a;return!((null!==(t=r[e])&&void 0!==t?t:c)<0||c>(null!==(a=r[e])&&void 0!==a?a:c)+1e3*n||s&&l<s||i&&l>i)})();return(0,U.useEffect)((()=>{u&&a?o((t=>Object.assign(Object.assign({},t),{[e]:-1}))):u&&!r.hasOwnProperty(e)&&o((t=>Object.assign(Object.assign({},t),{[e]:c})))}),[r,e,o,c,u,a]),u?(0,L.jsx)(L.Fragment,{children:t}):null},WA=(0,so.$j)((e=>{var t;return{hireDeveloperFeatureEnabled:e.app.options.hireDeveloperFeature,href:null===(t=e.app.options.hireDeveloperFeatureSettings)||void 0===t?void 0:t.href,canManageSettings:e.app.options.isAdmin}}),(e=>({instancesActions:nh({recordHireDeveloperTransition:Uy},e)})))((e=>{const{hireDeveloperFeatureEnabled:t,installation:n,href:s,instancesActions:i,canManageSettings:a}=e,[r,o]=(0,U.useState)(!1);return t&&s?(0,L.jsx)(Da,{className:"hire-developer-link",icon:(0,L.jsx)(he,{name:"code",size:"16"}),title:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(An,{target:(0,L.jsx)(wn,{onClick:()=>o(!r),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.leftColumn.hireDeveloper.action"})}),placement:"bottom",visible:r,onClose:()=>o(!1),children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.leftColumn.hireDeveloper.description"})}),(0,L.jsx)(wn,{href:s,target:"_blank",onClick:()=>{i.recordHireDeveloperTransition(n.id).catch((()=>{})),o(!1)},children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.leftColumn.hireDeveloper.action"})}),a&&(0,L.jsx)(An,{target:(0,L.jsxs)("span",{style:{float:"right"},children:[(0,L.jsx)(Ac,{content:"instancesList.instanceCard.leftColumn.hireDeveloper.hide"})," ",(0,L.jsx)(he,{name:"question-mark-circle"})]}),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.leftColumn.hireDeveloper.howToHide"})})]}),(0,L.jsxs)($A,{id:"hire-developer-link",showUntil:new Date("2024-04-21"),children:[" ",(0,L.jsx)(ye,{intent:"success",size:"sm",children:(0,L.jsx)(Ac,{content:"common.label.new"})})]})]})}):null})),zA=(0,so.$j)((e=>{var t;return{hidden:!e.app.options.hireDeveloperFeature||!(null===(t=e.app.options.hireDeveloperFeatureSettings)||void 0===t?void 0:t.href)}}))((e=>{const{installation:t,baseClassName:n=`${gu}instance-left-column`,hidden:s}=e;return s?null:(0,L.jsx)(Ks,{className:`${n}-section-item`,children:(0,L.jsx)(WA,{installation:t})})})),qA="view",GA="edit",KA="processing";class XA extends U.Component{constructor(e){super(e),this.setElementState=e=>this.setState({elementState:e}),this.handleOpenEdit=()=>this.setState({newName:this.props.name,elementState:GA}),this.handleChange=e=>this.setState({newName:e.target.value}),this.handleEditKey=e=>{"Escape"===e.key?this.setElementState(qA):"Enter"===e.key&&this.handleSubmit()},this.handleSubmit=()=>{const{newName:e,elementState:t}=this.state;t!==KA&&this.setState({elementState:KA},(()=>{this.props.setInstanceName(this.props.installationId,e.trim()).then((e=>{if("error"===e.status&&e.formErrors){const t=[];Object.values(e.formErrors).forEach((e=>{Object.values(e).forEach((e=>{t.push(e)}))})),t.length>0&&this.props.addErrorMessage(t.join(". "))}})).finally((()=>{this.setState({elementState:qA})}))}))},this.state={elementState:qA,newName:""}}render(){const{newName:e,elementState:t}=this.state,{name:n,baseClassName:s,additionalButtons:i}=this.props,a=t===qA,r=t===GA,o=t===KA;let l=n.trim();return o&&(l=e.trim()),l||(l=(0,L.jsx)(Ac,{content:"instancesList.instanceCard.noNameWebsite"})),(0,L.jsxs)("div",{className:`${s}__large`,children:[(a||o)&&(0,L.jsx)("span",{"data-test-id":bL,children:l}),r&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(vn,{className:`${s}-input`,value:e,onChange:this.handleChange,onKeyDown:this.handleEditKey,autoFocus:!0}),(0,L.jsxs)("div",{className:`${s}-buttons`,children:[(0,L.jsx)(Ue,{onClick:this.handleSubmit,tooltip:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.saveWebsiteName"}),icon:"check-mark",ghost:!0}),(0,L.jsx)(Ue,{onClick:()=>this.setElementState(qA),tooltip:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.cancelWebsiteName"}),icon:"cross-mark",ghost:!0})]})]}),a&&(0,L.jsx)("div",{className:`${s}-buttons`,children:(0,L.jsx)(Ue,{onClick:this.handleOpenEdit,tooltip:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.editWebsiteName"}),icon:"pencil",ghost:!0})}),o&&(0,L.jsx)(wS,{className:`${s}__loader`}),i&&(0,L.jsx)("div",{className:`${s}-buttons`,children:i})]})}}XA.defaultProps={baseClassName:`${gu}instance-name-form`};const ZA=XA;class JA extends U.Component{constructor(){super(...arguments),this.renderPlesk=e=>(0,L.jsx)(wn,{href:e,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.phpPopover.linkName"})}),this.renderCpanel=e=>{const{installation:{owner:t},goToUri:n}=this.props,s=bm({link:e,inNewWindow:!1,goToUri:n,accountUsername:t.login});return(0,L.jsx)(wn,Object.assign({},s,{children:(0,L.jsx)(Ac,{content:"controllers.index.detail.phpPopover.linkName"})}))}}render(){const{installation:{features:{php:e},installationType:t}}=this.props;return e.settingsUrl?QT(t)?this.renderPlesk(e.settingsUrl):JT(t)?this.renderCpanel(e.settingsUrl):null:null}}const QA=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(JA),eE=e=>{var t,n,s,i;const{installation:{id:a,installationType:r,features:{php:o,updates:l}},minimalSupportedPhpVersion:c,onOpenSmartPhpUpdatesDrawer:u}=e;let d;if(!o.eoled&&!o.unsupported)return null;const p={phpVersion:null===(t=o.handler)||void 0===t?void 0:t.version,minimalSupportedPhpVersion:c};return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ac,{content:o.unsupported?"controllers.index.detail.phpPopover.unsupportedPhpText":"controllers.index.detail.phpPopover.outdatedPhpText",params:p,unsafe:!0}),nC(r)&&(0,L.jsx)(Ac,{content:"controllers.index.detail.phpPopover.remoteInstancesNote",unsafe:!0,params:p}),(0,L.jsx)("br",{}),(0,L.jsx)(QA,{installation:e.installation}),(null===(n=null==l?void 0:l.php)||void 0===n?void 0:n.available)&&!o.unsupported&&(0,L.jsxs)(L.Fragment,{children:[" ",(0,L.jsx)(Ac,{content:"instancesList.issues.updatePhp.openSettingsOrTryAnother"})," ",(0,L.jsx)(zM,{installationId:a,installationType:r,applicable:!0===(null===(s=null==l?void 0:l.php)||void 0===s?void 0:s.applicable),ref:e=>d=e,children:(0,L.jsx)(wn,{onClick:(null===(i=null==l?void 0:l.php)||void 0===i?void 0:i.applicable)?u:()=>d&&d.handleTogglePopover(),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.php.tryAnotherVersion"})})})]})]})},tE=e=>{const{target:t,actionLinkAttributes:n,baseClassName:s=`${yu}`}=e;return(0,L.jsx)(An,{target:t,children:n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notEnabled.description"})}),(0,L.jsx)(wn,Object.assign({},n,{className:`${s}__action-enable-ssl`,"data-test-id":"instance-ssl-status-popover__action-enable-ssl",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notEnabled.action"})}))]}):(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeEnabled"})})},"ssl-disabled")},nE=e=>{const{target:t,actionLinkAttributes:n,instanceType:s,baseClassName:i=`${yu}`}=e;return(0,L.jsx)(An,{target:t,children:n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateNotInstalled.description"})}),(0,L.jsx)(wn,Object.assign({},n,{className:`${i}__action-get-certificate ${i}_no-certificate`,"data-test-id":"instance-ssl-status-popover__action-get-certificate",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.buyOrInstallAction"})}))]}):(0,L.jsx)(as,{children:(a=s,JT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledCpanel"}):QT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledPlesk"}):(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateNotInstalled.description"}))})},"certificate-not-installed");var a},sE=e=>{const{target:t,actionLinkAttributes:n,instanceType:s,baseClassName:i=`${yu}`}=e;return(0,L.jsx)(An,{target:t,children:n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.selfSigned.description"})}),(0,L.jsx)(wn,Object.assign({},n,{className:`${i}__action-get-certificate ${i}_self-signed`,"data-test-id":"instance-ssl-status-popover__action-get-certificate",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.buyOrInstallAction"})}))]}):(0,L.jsx)(as,{children:(a=s,JT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledCpanel"}):QT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledPlesk"}):(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.selfSigned.description"}))})},"self-signed");var a},iE=e=>{const{target:t,actionLinkAttributes:n,instanceType:s,baseClassName:i=`${yu}`}=e;return(0,L.jsx)(An,{target:t,children:n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateExpired.description"})}),(0,L.jsx)(wn,Object.assign({},n,{className:`${i}__action-get-certificate ${i}_expired`,"data-test-id":"instance-ssl-status-popover__action-get-certificate",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.buyOrInstallAction"})}))]}):(0,L.jsx)(as,{children:(a=s,JT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledCpanel"}):QT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledPlesk"}):(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateExpired.description"}))})},"expired");var a},aE=e=>{const{target:t,actionLinkAttributes:n,instanceType:s,baseClassName:i=`${yu}`}=e;return(0,L.jsx)(An,{target:t,children:n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notSuitableForDomain.description"})}),(0,L.jsx)(wn,Object.assign({},n,{className:`${i}__action-get-certificate ${i}_no-suitable`,"data-test-id":"instance-ssl-status-popover__action-get-certificate",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.buyOrInstallAction"})}))]}):(0,L.jsx)(as,{children:(a=s,JT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledCpanel"}):QT(a)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.cannotBeInstalledPlesk"}):(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notSuitableForDomain.description"}))})},"not-suitable");var a},rE=e=>{const{target:t,actionLinkAttributes:n,baseClassName:s=`${yu}`}=e;return(0,L.jsxs)(An,{target:t,children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.redirectToHttpsDisabled.description"})}),n&&(0,L.jsx)(wn,Object.assign({},n,{className:`${s}__action-enable-redirect`,"data-test-id":"instance-ssl-status-popover__action-enable-redirect",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.redirectToHttpsDisabled.action"})}))]},"redirect-disabled")},oE=(0,so.$j)(null,(e=>({synchronizeSiteUrlSync:t=>e(my(t))})))((e=>{const{target:t,installationId:n,synchronizeSiteUrlSync:s,baseClassName:i=`${yu}`}=e,[a,r]=(0,U.useState)(void 0);return(0,L.jsxs)(An,{target:t,children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.mismatchUrlProtocol.description"})}),(0,L.jsx)(Ue,{intent:"primary",onClick:()=>{r("loading"),s(n).then((()=>{r(void 0)}))},state:a,className:`${i}__action-sync-url`,"data-test-id":"instance-ssl-status-popover__action-sync-url",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.mismatchUrlProtocol.action"})})]},"ssl-mismatch-protocol")})),lE=({url:e,instanceType:t,cpanelAccountUsername:n,goToUri:s})=>null===e?null:JT(t)?bm({link:e,inNewWindow:!1,goToUri:s,accountUsername:n}):{href:e,target:"_self"},cE=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))((e=>{var t,n,s,i,a,r,o,l,c,u,d,p,h,m,f,g,b,v,y,_,x,S;const{installation:{domain:w,id:k,installationType:j,owner:T},goToUri:C,baseClassName:D=`${gu}instance-card-ssl-status`}=e;return(null===(t=null==w?void 0:w.ssl)||void 0===t?void 0:t.enabled)?(null===(i=null===(s=null==w?void 0:w.ssl)||void 0===s?void 0:s.certificate)||void 0===i?void 0:i.installed)?(null===(o=null===(r=null==w?void 0:w.ssl)||void 0===r?void 0:r.certificate)||void 0===o?void 0:o.selfSigned)?(0,L.jsx)(sE,{target:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{"data-test-id":"instance-card-ssl_self-signed",className:`${D} ${D}_self-signed`,children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.selfSigned"})})}),actionLinkAttributes:(null===(l=null==w?void 0:w.ssl)||void 0===l?void 0:l.buyOrInstallSslActionUrl)?lE({url:w.ssl.buyOrInstallSslActionUrl,instanceType:j,cpanelAccountUsername:null==T?void 0:T.login,goToUri:C}):null,instanceType:j}):(null===(u=null===(c=null==w?void 0:w.ssl)||void 0===c?void 0:c.certificate)||void 0===u?void 0:u.actual)?(null===(h=null===(p=null==w?void 0:w.ssl)||void 0===p?void 0:p.certificate)||void 0===h?void 0:h.suitableForDomain)?(null===(f=null==w?void 0:w.ssl)||void 0===f?void 0:f.redirectToHttpsEnabled)?(null===(y=null==w?void 0:w.ssl)||void 0===y?void 0:y.redirectToHttpsEnabled)&&!(null===(_=null==w?void 0:w.ssl)||void 0===_?void 0:_.urlProtocolHttps)?(0,L.jsx)(oE,{installationId:k,target:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{"data-test-id":"instance-card-ssl_mismatch-protocol",className:`${D} ${D}_mismatch-protocol`,children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.mismatchUrlProtocol"})})})}):(null===(S=null===(x=null==w?void 0:w.ssl)||void 0===x?void 0:x.certificate)||void 0===S?void 0:S.issuerName)?(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"lock-closed-check",intent:"success",size:"16"}),title:w.ssl.certificate.issuerName}):null:(0,L.jsx)(rE,{target:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{"data-test-id":"instance-card-ssl_redirect-disabled",className:`${D} ${D}_redirect-disabled`,children:null===(b=null===(g=null==w?void 0:w.ssl)||void 0===g?void 0:g.certificate)||void 0===b?void 0:b.issuerName})}),actionLinkAttributes:(null===(v=null==w?void 0:w.ssl)||void 0===v?void 0:v.enableRedirectToHttpsActionUrl)?lE({url:w.ssl.enableRedirectToHttpsActionUrl,instanceType:j,cpanelAccountUsername:null==T?void 0:T.login,goToUri:C}):null}):(0,L.jsx)(aE,{target:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{"data-test-id":"instance-card-ssl_no-suitable",className:`${D} ${D}_no-suitable`,children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notSuitableForDomain"})})}),actionLinkAttributes:(null===(m=null==w?void 0:w.ssl)||void 0===m?void 0:m.buyOrInstallSslActionUrl)?lE({url:w.ssl.buyOrInstallSslActionUrl,instanceType:j,cpanelAccountUsername:null==T?void 0:T.login,goToUri:C}):null,instanceType:j}):(0,L.jsx)(iE,{target:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{"data-test-id":"instance-card-ssl_expired",className:`${D} ${D}_expired`,children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateExpired"})})}),actionLinkAttributes:(null===(d=null==w?void 0:w.ssl)||void 0===d?void 0:d.buyOrInstallSslActionUrl)?lE({url:w.ssl.buyOrInstallSslActionUrl,instanceType:j,cpanelAccountUsername:null==T?void 0:T.login,goToUri:C}):null,instanceType:j}):(0,L.jsx)(nE,{target:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{"data-test-id":"instance-card-ssl_no-certificate",className:`${D} ${D}_no-certificate`,children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateNotInstalled"})})}),actionLinkAttributes:(null===(a=null==w?void 0:w.ssl)||void 0===a?void 0:a.buyOrInstallSslActionUrl)?lE({url:w.ssl.buyOrInstallSslActionUrl,instanceType:j,cpanelAccountUsername:null==T?void 0:T.login,goToUri:C}):null,instanceType:j}):(0,L.jsx)(tE,{target:(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{"data-test-id":"instance-card-ssl_disabled",className:`${D} ${D}_disabled`,children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notEnabled"})})}),actionLinkAttributes:(null===(n=null==w?void 0:w.ssl)||void 0===n?void 0:n.enableSslActionUrl)?lE({url:w.ssl.enableSslActionUrl,instanceType:j,cpanelAccountUsername:null==T?void 0:T.login,goToUri:C}):null})}));class uE extends U.Component{constructor(){super(...arguments),this.smartPhpUpdateUnpaidMarkRef=null,this.renderError=()=>{const{installation:{errorMessage:e,status:{alive:t}}}=this.props;return t||!e?null:(0,L.jsx)(ge,{intent:"danger",children:e},"problemInstanceDetailsInfo")},this.renderWordpress=()=>{const{installation:{features:{updates:e},status:{alive:t},version:n},openUpdates:s,baseClassName:i}=this.props;if(!t||!n)return null;let a=n;return e.availableVersion&&(a=(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsxs)(as,{className:`${i}-paragraph`,children:[n," ",(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>s(Ef))),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.wordpressCoreVersion.hasUpdate",params:{updateVersion:e.availableVersion}})})]})})),(0,L.jsx)(Ks,{"data-test-id":"current-version-label",title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.wordpressCoreVersion.title"}),className:`${i}-item`,children:a},"version")},this.renderPlugins=()=>{const{installation:{features:{updates:e},status:{alive:t}},openUpdates:n,baseClassName:s}=this.props;if(!t)return null;let i=(0,L.jsx)(Ac,{content:"instancesList.instanceCard.pluginsUpdates.upToDate"});return e.amountOfPluginsWithUpdates>0&&(i=(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>n(Uf))),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.pluginsUpdates.hasUpdate"})})})),(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.pluginsUpdates.title"}),className:`${s}-item`,children:i},"pluginsUpdates")},this.renderThemes=()=>{const{installation:{features:{updates:e},status:{alive:t}},openUpdates:n,baseClassName:s}=this.props;if(!t)return null;let i=(0,L.jsx)(Ac,{content:"instancesList.instanceCard.themesUpdates.upToDate"});return e.amountOfThemesWithUpdates>0&&(i=(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),title:(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>n(Rf))),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.themesUpdates.hasUpdate"})})})),(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.themesUpdates.title"}),className:`${s}-item`,children:i},"themesUpdates")},this.renderSecurity=()=>{const{installation:{features:{security:e,vulnerability:t},id:n,status:{alive:s}},onOpenSecurityDialog:i,baseClassName:a}=this.props;if(!s||!e.available)return null;let r,o=!1;if(t.available&&t.vulnerable)r=(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>i(n,1))),"data-test-id":fL,"data-test-security":"security-status-vulnerable",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.securityStatus.vulnerable"})})});else switch(e.status){case"secureFull":r=(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>i(n))),"data-test-id":fL,"data-test-security":"security-status-success",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.securityStatus.secureFull"})});break;case"secureRecommended":r=(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>i(n))),"data-test-id":fL,"data-test-security":"security-status-warning",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.securityStatus.secureRecommended"})});break;case"insecure":o=!0,r=(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>i(n))),"data-test-id":fL,"data-test-security":"security-status-danger",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.securityStatus.insecure"})});break;case"unknown":o=!0,r=(0,L.jsx)(wn,{onClick:e=>Rc(e,(()=>i(n))),"data-test-id":fL,"data-test-security":"security-status-inactive",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.securityStatus.performCheckSecurity"})});break;default:throw new Error(`Unexpected status: ${e.status}`)}return(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.securityStatus.title"}),className:`${a}-item`,children:(0,L.jsx)(Da,{icon:t.vulnerable?(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:"danger",size:"16"}):o?(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}):null,title:r,tooltip:(null==t?void 0:t.vulnerable)?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.securityStatus.vulnerableWordPressHint"}):null})},"securityStatus")},this.renderSnapshot=()=>{const{installation:{features:{restorePoint:e},id:t},enableInstances:n,disableInstances:s,baseClassName:i}=this.props;return e.restorePointTimestamp?(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"controllers.index.detail.restorePointTitle"}),className:`${i}-item`,children:(0,L.jsx)(aA,{installationId:t,restorePoint:e,disableInstances:s,enableInstances:n})},"restorePoint"):null},this.renderPhp=()=>{var e,t;const{installation:{id:n,installationType:s,features:{php:i,updates:a},status:{alive:r}},minimalSupportedPhpVersion:o,onOpenSmartPhpUpdates:l,baseClassName:c}=this.props;if(!r||!(null===(e=i.handler)||void 0===e?void 0:e.version))return null;const u=()=>cL(a.php.taskStatus),d=()=>{var e,t;return(0,L.jsx)(zM,{installationId:n,installationType:s,applicable:!0===(null===(e=null==a?void 0:a.php)||void 0===e?void 0:e.applicable),ref:e=>this.smartPhpUpdateUnpaidMarkRef=e,isSmartPhpUpdates:!0,children:(0,L.jsx)(fe,{onClick:(null===(t=null==a?void 0:a.php)||void 0===t?void 0:t.applicable)?l:()=>this.smartPhpUpdateUnpaidMarkRef&&this.smartPhpUpdateUnpaidMarkRef.handleTogglePopover(),"data-test-id":"try-another-php-version-link",children:u()?(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.checkResult"}):i.eoled||i.unsupported?(0,L.jsx)(Ac,{content:"instancesList.instanceCard.php.update"}):(0,L.jsx)(Ac,{content:"instancesList.instanceCard.php.tryAnotherVersion"})})})};return(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.php.title"}),className:`${c}-item`,children:(0,L.jsx)(Da,{icon:u()?(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.smartPhpUpdateConflict.card"}),children:(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"})}):null,title:i.eoled?(()=>{var e,t;return(0,L.jsx)(Da,{icon:!u()&&(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning",size:"16"}),className:`${c}-outdated-php`,title:(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(as,{className:`${c}-paragraph`,children:[(0,L.jsx)(Wn,{"data-test-id":gL,children:null===(e=i.handler)||void 0===e?void 0:e.version})," ",(0,L.jsxs)(Wn,{className:`${c}-outdated-php__smart-php`,children:[(0,L.jsx)(An,{target:(0,L.jsx)(wn,{children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.php.details"})}),children:(0,L.jsx)(eE,{installation:this.props.installation,minimalSupportedPhpVersion:o,onOpenSmartPhpUpdatesDrawer:l})}),(null===(t=null==a?void 0:a.php)||void 0===t?void 0:t.available)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(he,{name:"minus",rotate:90,intent:"inactive"}),d()]})]})]})})})})():(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Wn,{"data-test-id":gL,children:i.handler.version}),(null===(t=null==a?void 0:a.php)||void 0===t?void 0:t.available)&&(0,L.jsxs)(L.Fragment,{children:[" ",d()]})]})})},"php")},this.renderSslStatus=()=>{const{installation:{domain:e,status:{alive:t}},baseClassName:n}=this.props;return(null==e?void 0:e.ssl)&&t?(0,L.jsx)(Ks,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.title"}),className:`${n}-item`,children:(0,L.jsx)(cE,{installation:this.props.installation})},"ssl"):null}}render(){const{isCollapsible:e}=this.props;return(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"controllers.index.detail.GeneralTabInfoSectionTitle"}),className:"wpt-instance-card-section",collapsible:e,children:[this.renderError(),this.renderWordpress(),this.renderPlugins(),this.renderThemes(),this.renderSecurity(),this.renderSnapshot(),this.renderPhp(),this.renderSslStatus()]})}}uE.defaultProps={baseClassName:`${gu}instance-info-section`};const dE=(0,so.$j)((e=>({minimalSupportedPhpVersion:e.app.options.minimalSupportedPhpVersion})))(uE);class pE extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>(0,L.jsx)(fe,{href:this.props.wpContentUrl,children:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpContentDirName"})}),this.renderCpanel=()=>{const{goToUri:e,installation:{owner:t},wpContentUrl:n}=this.props;if(!n)return null;const s=bm({link:n,inNewWindow:!1,goToUri:e,accountUsername:t.login});return(0,L.jsx)(fe,Object.assign({},s,{children:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpContentDirName"})}))}}render(){const{installation:{features:{fileManager:e},installationType:t},wpContentUrl:n}=this.props,s=(0,L.jsx)(Ac,{content:"forms.debugSettings.wpContentDirName"});return e.available&&n?QT(t)?this.renderPlesk():JT(t)?this.renderCpanel():s:s}}const hE=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(pE);class mE extends U.Component{constructor(e){super(e),this.handleChangeWpDebug=e=>{this.setState((t=>({values:Object.assign(Object.assign({},t.values),{wpDebugLog:e,wpDebugDisplay:e,wpDebug:e})})))},this.handleChangeWpDebugLog=e=>{this.setState((t=>({values:Object.assign(Object.assign({},t.values),{wpDebugLog:e})}))),e?this.setState((t=>({values:Object.assign(Object.assign({},t.values),{wpDebug:e})}))):this.state.values.wpDebugDisplay||this.setState((e=>({values:Object.assign(Object.assign({},e.values),{wpDebug:!1})})))},this.handleChangeWpDebugDisplay=e=>{this.setState((t=>({values:Object.assign(Object.assign({},t.values),{wpDebugDisplay:e})}))),e?this.setState((t=>({values:Object.assign(Object.assign({},t.values),{wpDebug:e})}))):this.state.values.wpDebugLog||this.setState((e=>({values:Object.assign(Object.assign({},e.values),{wpDebug:!1})})))},this.handleSubmit=e=>{const{onSetDebugSettings:t,onClose:n,isProcessing:s}=this.props;s||t(e).then((()=>n()))},this.renderForm=()=>{const{values:e,debugLogUrl:t,wpContentUrl:n,isLoading:s}=this.state,{installation:i,baseClassName:a}=this.props;return s?(0,L.jsx)(It,{}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpDebugLabel"}),children:(0,L.jsx)(it,{name:"wpDebug",onChange:this.handleChangeWpDebug,checked:e.wpDebug,children:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpDebugDescription"})})}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpDebugLogLabel"}),children:(0,L.jsx)(it,{name:"wpDebugLog",className:`${a}__wp-debug-log`,onChange:this.handleChangeWpDebugLog,checked:e.wpDebugLog,children:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpDebugLogDescription",params:{debugLogFile:t?(0,L.jsx)(wn,{href:t,children:(0,L.jsx)(Ac,{content:"forms.debugSettings.debugLogFilename"})}):(0,L.jsx)(Ac,{content:"forms.debugSettings.debugLogFilename"}),wpContentDir:(0,L.jsx)(hE,{installation:i,wpContentUrl:n})}})})}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpDebugDisplayLabel"}),children:(0,L.jsx)(it,{name:"wpDebugDisplay",className:`${a}__wp-debug-display`,onChange:this.handleChangeWpDebugDisplay,checked:e.wpDebugDisplay,children:(0,L.jsx)(Ac,{content:"forms.debugSettings.wpDebugDisplayDescription"})})}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.debugSettings.scriptDebugLabel"}),children:(0,L.jsx)(it,{name:"scriptDebug",onChange:e=>this.setState((t=>({values:Object.assign(Object.assign({},t.values),{scriptDebug:e})}))),checked:e.scriptDebug,children:(0,L.jsx)(Ac,{content:"forms.debugSettings.scriptDebugDescription"})})}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.debugSettings.saveQueriesLabel"}),children:(0,L.jsx)(it,{name:"saveQueries",onChange:e=>this.setState((t=>({values:Object.assign(Object.assign({},t.values),{saveQueries:e})}))),checked:e.saveQueries,children:(0,L.jsx)(Ac,{content:"forms.debugSettings.saveQueriesDescription"})})})]})},this.state={values:{wpDebug:!1,wpDebugLog:!1,wpDebugDisplay:!1,scriptDebug:!1,saveQueries:!1},debugLogUrl:null,wpContentUrl:null,isLoading:!1}}componentDidUpdate(e){!e.isOpen&&this.props.isOpen&&this.handleLoadData()}handleLoadData(){const{installation:{id:e},installationActions:{getWordPressDebugSettings:t}}=this.props;this.setState({isLoading:!0}),t(e).then((e=>{this.setState({values:{wpDebug:e.value.wpDebug.value,wpDebugLog:e.value.wpDebugLog.value,wpDebugDisplay:e.value.wpDebugDisplay.value,scriptDebug:e.value.scriptDebug.value,saveQueries:e.value.saveQueries.value},debugLogUrl:e.meta.debugLogUrl,wpContentUrl:e.meta.wpContentUrl})})).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))}render(){const{values:e}=this.state,{installation:{displayTitle:t},debugCodexUrl:n,onClose:s,isOpen:i,isProcessing:a}=this.props;return(0,L.jsxs)(zi,{title:t,subtitle:(0,L.jsx)(Ac,{content:"controllers.index.debugSettings.formSubtitle"}),isOpen:i,onClose:s,"data-type":"debug-settings",form:{onSubmit:this.handleSubmit,values:e,state:a?"submit":void 0,submitButton:{"data-test-id":"submit-button"},applyButton:!1,cancelButton:!1},children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"forms.debugSettings.title",params:{debugCodexUrl:(0,L.jsx)(wn,{href:n,target:"_blank",children:(0,L.jsx)(Ac,{content:"forms.debugSettings.debuggingInWordPress"})})}})}),this.renderForm()]})}}mE.defaultProps={baseClassName:`${gu}debug-settings-form`};const fE=(0,so.$j)((e=>({debugCodexUrl:e.app.urls.debugCodexUrl})),(e=>({installationActions:nh({getWordPressDebugSettings:ky},e)})))(mE);var gE=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n};const bE=e=>IL(e),vE=e=>{try{return new URL(e).host}catch(e){}return OL(String.prototype.trim.apply(e||"")).toLowerCase()},yE=e=>e,_E=e=>String.prototype.trim.apply(e||""),xE=e=>{var{opened:t,loading:n,onCancel:s,onReset:i,domains:a,readonlyDomains:r,fileExtensions:o,readonlyFileExtensions:l,defaultValues:c}=e,u=gE(e,["opened","loading","onCancel","onReset","domains","readonlyDomains","fileExtensions","readonlyFileExtensions","defaultValues"]);const[d,p]=(0,U.useState)({domains:[],fileExtensions:[],readonlyFileExtensions:[],readonlyDomains:[]}),[h,m]=(0,U.useState)({}),[f,g]=(0,U.useState)(),b=Mc();return(0,U.useEffect)((()=>{p({domains:a.filter((e=>!r.includes(e))).map(bE),readonlyDomains:r.map(bE),fileExtensions:o.filter((e=>!l.includes(e))).map(yE),readonlyFileExtensions:l.map(yE)}),m({}),g(void 0)}),[a,r,o,l,t]),n?(0,L.jsx)(zi,{className:u.baseClassName,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.options.title",params:{instanceUrl:u.installation.displayTitle}}),onClose:s,size:"sm",isOpen:t,"data-type":"hotlink-protection-options",children:(0,L.jsx)(wS,{})}):(0,L.jsxs)(zi,{className:u.baseClassName,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.options.title",params:{instanceUrl:u.installation.displayTitle}}),onClose:s,size:"sm",isOpen:t,form:{onSubmit:e=>{p(e);const t={domains:e.domains.map(vE).filter((e=>!!e)),fileExtensions:e.fileExtensions.map(_E).filter((e=>!!e)),readonlyDomains:r,readonlyFileExtensions:l};(e=>{const t={};let n=!1;return e.domains.forEach(((e,s)=>{var i;t.domains=null!==(i=t.domains)&&void 0!==i?i:[],(e=>/^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/.test(e))(e)||(t.domains[s]={domainName:b("controllers.index.detail.hotlinkProtection.options.domains.validations.invalidName")},n=!0)})),e.fileExtensions.forEach(((e,s)=>{var i;t.fileExtensions=null!==(i=t.fileExtensions)&&void 0!==i?i:[],(e=>/^[a-z0-9]+$/i.test(e))(e)||(t.fileExtensions[s]={fileExtension:b("controllers.index.detail.hotlinkProtection.options.fileExtensions.validations.invalidName")},n=!0)})),e.readonlyFileExtensions.length+e.fileExtensions.length===0&&(t.fileExtensions=[{min:b("controllers.index.detail.hotlinkProtection.options.fileExtensions.validations.min")}],n=!0),m(t),!n})(t)&&(g("submit"),u.onSubmit({domains:r.concat(t.domains),fileExtensions:l.concat(t.fileExtensions)}).finally((()=>g(void 0))))},additionalButtons:[(0,L.jsx)(Ue,{onClick:()=>(g("submit"),p((e=>Object.assign(Object.assign({},e),{domains:c.domains.filter((e=>!r.includes(e))).map(bE),fileExtensions:c.fileExtensions.filter((e=>!l.includes(e))).map(yE)}))),i().finally((()=>g(void 0)))),disabled:"submit"===f,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.options.resetToDefault"})},"reset")],errors:h,values:d,applyButton:!1,state:f},"data-type":"hotlink-protection-options",children:[r.length>0&&(0,L.jsx)(ga,{name:"readonlyDomains",label:(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.options.domains.title"}),fullDescription:b("controllers.index.detail.hotlinkProtection.options.domains.description"),disabled:!0,multi:{max:r.length},size:"md"}),(0,L.jsx)(ga,{name:"domains",multi:!0,label:0===r.length&&(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.options.domains.title"}),fullDescription:0===r.length&&b("controllers.index.detail.hotlinkProtection.options.domains.description"),size:"md",onRemoveRow:()=>m(Object.assign(Object.assign({},h),{domains:[]}))}),l.length>0&&(0,L.jsx)(ga,{name:"readonlyFileExtensions",label:(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.options.fileExtensions.title"}),fullDescription:b("controllers.index.detail.hotlinkProtection.options.fileExtensions.description"),disabled:!0,multi:{max:l.length},size:"md"}),(0,L.jsx)(ga,{name:"fileExtensions",label:0===l.length&&(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.options.fileExtensions.title"}),fullDescription:0===l.length&&b("controllers.index.detail.hotlinkProtection.options.fileExtensions.description"),multi:!0,size:"md",onRemoveRow:()=>m(Object.assign(Object.assign({},h),{fileExtensions:[]}))})]})},SE=(0,so.$j)(void 0,(e=>({instanceActions:nh({toggleHotlinkProtection:Ob,getHotlinkProtectionSettingsMeta:Lb,setHotlinkProtectionSettings:Mb},e),addSuccessMessage:nh(wp,e)})))((e=>{var t,n,{installation:s,instanceActions:i,addSuccessMessage:a}=e,r=gE(e,["installation","instanceActions","addSuccessMessage"]);const[o,l]=(0,U.useState)(!1),[c,u]=(0,U.useState)(!1),[d,p]=(0,U.useState)(!1),[h,m]=(0,U.useState)({domains:[],fileExtensions:[],readonlyDomains:[],readonlyFileExtensions:[]}),[f,g]=(0,U.useState)({domains:[],fileExtensions:[]}),b=(0,U.useCallback)((e=>{u(!0),i.toggleHotlinkProtection(s.id,e).then((e=>{a(e?(0,L.jsx)(Ac,{content:"features.hotlinkProtection.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.hotlinkProtection.disabledSuccessfully"}))})).catch((()=>{})).finally((()=>{u(!1)}))}),[s.id,a,i]),v=(0,U.useCallback)((e=>i.setHotlinkProtectionSettings(s.id,e).then((e=>(l(!1),m((t=>Object.assign(Object.assign({},t),e))),e))).catch((()=>{}))),[s.id,i]),y=(0,U.useCallback)((()=>Promise.resolve()),[]);return(0,U.useEffect)((()=>{o&&!d&&(u(!0),i.getHotlinkProtectionSettingsMeta(s.id).finally((()=>u(!1))).then((e=>{m({domains:e.value.domains.value.map((e=>e.value)),fileExtensions:e.value.fileExtensions.value.map((e=>e.value)),readonlyDomains:e.value.domains.value.filter((e=>e.meta.persistent)).map((e=>e.value)),readonlyFileExtensions:[]}),g({domains:e.value.domains.meta.defaults,fileExtensions:e.value.fileExtensions.meta.defaults}),p(!0)})).catch((()=>l(!1))))}),[s.id,i,d,o]),(null===(t=s.features.hotlinkProtection)||void 0===t?void 0:t.available)&&null!==(null===(n=s.features.hotlinkProtection)||void 0===n?void 0:n.status)?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Nr,{checked:s.features.hotlinkProtection.status,loading:c,onChange:b,"data-test-id":"hotlink-protection-switcher",className:`${r.baseClassName}-section-item-element`})," ",(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.title",className:`${r.baseClassName}-section-item-element`})," ",(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{className:`${r.baseClassName}-section-item-element`,icon:"question-mark-circle",ghost:!0}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.hotlinkProtection.description"})})," ",(0,L.jsx)(Ue,{className:`${r.baseClassName}-section-item-element`,icon:"sliders",onClick:()=>l(!0),disabled:c,ghost:!0,"data-test-id":"hotlink-protection-settings-opener"}),(0,L.jsx)(xE,{opened:o,loading:c,onCancel:()=>l(!1),onSubmit:v,onReset:y,domains:h.domains,fileExtensions:h.fileExtensions,readonlyDomains:h.readonlyDomains,readonlyFileExtensions:h.readonlyFileExtensions,defaultValues:f,baseClassName:r.baseClassName,installation:s})]}):null})),wE=e=>{const{subscriptionStatus:t}=e;let n;if(t===Qd.Terminated&&(n=(0,L.jsx)(ye,{className:e.baseClassName,icon:"exclamation-mark-circle-filled",size:"sm",view:"light",intent:"danger",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.virtualPatches.labels.terminated"})})),t===Qd.Suspended&&(n=(0,L.jsx)(ye,{className:e.baseClassName,icon:"triangle-exclamation-mark-filled",size:"sm",view:"light",intent:"warning",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.virtualPatches.labels.overdue"})})),n){const s=t===Qd.Terminated?"controllers.index.detail.virtualPatches.labels.terminated.hint":"controllers.index.detail.virtualPatches.labels.overdue.hint";return(0,L.jsxs)(An,{target:n,children:[(0,L.jsx)("div",{style:{marginBottom:10},children:(0,L.jsx)(Ac,{content:s})}),(0,L.jsx)(Ue,{onClick:()=>e.onOpenVirtualPatchingLicenseInfoDrawer(),intent:"primary",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.virtualPatches.labels.popover.button.text"})})]})}return null},kE=e=>{const{isOpen:t,isButtonLocked:n,handleClose:s,handleEnableProtection:i,target:a,baseClassName:r=`${gu}virtual-patches-enable-popover`}=e;return(0,L.jsxs)(An,{visible:t,onClose:s,target:a,children:[(0,L.jsx)("div",{className:`${r}__content-item`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.virtualPatches.consentForm.description"})}),(0,L.jsx)("div",{className:`${r}__content-item`,children:(0,L.jsx)(pT,{})}),(0,L.jsx)(Ue,{id:Fh,disabled:n,onClick:i,icon:"shield",size:"md",intent:"primary",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.virtualPatches.consentForm.submitButtonTitle",unsafe:!0})})]})},jE=(0,so.$j)(((e,t)=>{const{installation:n}=t;return{hasActiveTasks:e.vulnerabilities.virtualPatchesUpdatingStatuses.some((e=>e.installationIds.includes(n.id))),showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans,isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller}}),(e=>({instanceActions:nh({updateVirtualPatchesProtectionStatus:Wg},e),displayErrorMessageFromMeta:nh(_p,e)})))((({installation:e,instanceActions:t,displayErrorMessageFromMeta:n,hasActiveTasks:s,onOpenVirtualPatchingUpsellDialog:i,onOpenVirtualPatchingLicenseInfoDrawer:a,showVirtualPatchesUpsellWhenRestrictedViaPlans:r,isAdmin:o,baseClassName:l=`${gu}instance-settings-section-virtual-patches`})=>{var c,u,d;const[p,h]=(0,U.useState)(!1),[m,f]=(0,U.useState)(!1),[g,b]=(0,U.useState)(!1),v=vT(e,r,o),y=!!(null===(c=e.features.virtualPatches)||void 0===c?void 0:c.status),_=()=>h(!1),x=(0,U.useCallback)((s=>{f(!0),t.updateVirtualPatchesProtectionStatus({installationsIds:[e.id],status:s,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0}).catch((e=>{var t;422===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&n(e)})).finally((()=>{_(),f(!1)}))}),[n,e.id,t]),S=()=>b(!0);if(null===(null===(u=e.features.virtualPatches)||void 0===u?void 0:u.status))return null;const w=(e,t)=>{const n=(0,L.jsx)(Nr,{className:`${l}-section-item-element`,checked:y,loading:s||m,onChange:()=>{S(),e&&!y?t&&t():y?x(!1):h(!0)},"data-test-id":"virtual-patches-switcher"});return e?(0,L.jsxs)("span",{children:[n," ",e]}):y?(0,L.jsx)("span",{children:n}):(0,L.jsx)(kE,{isOpen:p,isButtonLocked:m,handleClose:_,handleEnableProtection:()=>x(!0),target:n})};return(0,L.jsxs)(U.Fragment,{children:[v?w():w((0,L.jsx)(fe,{"data-test-id":"virtual-patching-lock-icon",onClick:()=>{S(),i(km)},icon:"lock-closed"}),(()=>{i(km)}))," ",(0,L.jsx)(Ac,{className:`${l}-section-item-element`,content:"controllers.index.detail.virtualPatches.title"})," ",(0,L.jsxs)($A,{id:"virtual-patching-switcher",forciblyHidden:g,children:[" ",(0,L.jsx)(ye,{className:`${l}-section-item-element`,intent:"success",view:"light",size:"sm",icon:(0,L.jsx)(he,{name:"check-mark-circle-filled",intent:"success"}),children:(0,L.jsx)(Ac,{content:"common.label.new"})})]})," ",!!(null===(d=e.features.virtualPatches.subscription)||void 0===d?void 0:d.status)&&(0,L.jsx)(wE,{baseClassName:`${l}-section-item-element`,subscriptionStatus:e.features.virtualPatches.subscription.status,onOpenVirtualPatchingLicenseInfoDrawer:a})," ",(0,L.jsx)(dD,{target:(0,L.jsx)(Ue,{className:`${l}-section-item-element`,icon:"question-mark-circle",ghost:!0})})," ",e.features.virtualPatches.subscription&&(0,L.jsx)(Ue,{className:`${l}-section-item-element`,icon:"sliders",onClick:()=>a(),ghost:!0})]})}));const TE=({credentials:e,onSubmit:t})=>{const[n,s]=(0,U.useState)(!1),[i,a]=(0,U.useState)({username:(null==e?void 0:e.username)||"",password:""}),[r,o]=(0,U.useState)(),[l,c]=(0,U.useState)(),u=(0,U.useCallback)((()=>i.username.length&&i.password.length&&!(null==l?void 0:l.username)&&!(null==l?void 0:l.password)),[i,l]),d=(0,U.useCallback)(((e,t)=>{a(Object.assign(Object.assign({},i),{[e]:t})),c(Object.assign(Object.assign({},l),{[e]:null}))}),[i,l]),p=(0,U.useCallback)((e=>u()?(o("submit"),t(e).catch((e=>(o(void 0),e.formErrors&&c(e.formErrors),Promise.reject(e))))):Promise.reject()),[u,t]);return(0,L.jsxs)(Si,{onSubmit:p,onFieldChange:d,values:i,hideRequiredLegend:!0,submitButton:{id:Bh,children:(null==e?void 0:e.username)?(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.update"}):(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.protect"}),disabled:!u()},state:r,errors:l,applyButton:!1,cancelButton:!1,children:[(null==e?void 0:e.username)&&(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.username"}),children:(0,L.jsx)("strong",{children:e.username})}),!(null==e?void 0:e.username)&&(0,L.jsx)(ga,{name:"username",label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.username"}),size:"fill"}),(null==e?void 0:e.password)&&(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.currentPassword"}),children:[n?(0,L.jsx)("strong",{children:e.password}):e.password.replace(/./g,"*")," ",(0,L.jsx)(Ue,{icon:n?"i-eye-02":"i-eye-03",onClick:()=>s(!n),ghost:!0,style:{float:"right"}})]}),(0,L.jsx)(ra,{name:"password",label:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.newPassword"})})]})},CE=(0,so.$j)(void 0,(e=>({instanceActions:nh({getPasswordProtection:Fv,updatePasswordProtection:Yv,togglePasswordProtectionStatus:Bv},e),addSuccessMessage:nh(wp,e)})))((e=>{var t,{installation:n,addSuccessMessage:s,instanceActions:i}=e,a=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["installation","addSuccessMessage","instanceActions"]);const[r,o]=(0,U.useState)(!1),[l,c]=(0,U.useState)(!1),[u,d]=(0,U.useState)(!1),[p,h]=(0,U.useState)({username:"",password:""}),m=(0,U.useCallback)((e=>{e?o(!0):(c(!0),i.togglePasswordProtectionStatus(n.id,e).then((e=>(e||h({username:"",password:""}),s(e?(0,L.jsx)(Ac,{content:"features.passwordProtection.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.passwordProtection.disabledSuccessfully"})),e))).catch((()=>{})).finally((()=>{c(!1)})))}),[n.id,s,i]),f=(0,U.useCallback)((e=>(c(!0),i.updatePasswordProtection(n.id,{credentials:e}).finally((()=>c(!1))).catch((e=>{var t;return Promise.reject((null===(t=null==e?void 0:e.formErrors)||void 0===t?void 0:t.credentials)&&{formErrors:e.formErrors.credentials}||e)})).then((e=>{if(e.status){if(!e.credentials)return Promise.reject();h(e.credentials)}return o(!1),s(e.status?(0,L.jsx)(Ac,{content:"features.passwordProtection.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.passwordProtection.disabledSuccessfully"})),e.credentials})))),[n.id,s,i]);if((0,U.useEffect)((()=>{r&&!u&&(c(!0),i.getPasswordProtection(n.id).then((e=>{e.credentials&&h(e.credentials),d(!0)})).catch((()=>o(!1))).finally((()=>c(!1))))}),[n.id,i,u,r]),!(null===(t=n.features.passwordProtection)||void 0===t?void 0:t.available))return null;const g=(0,L.jsx)(Ue,{onClick:()=>o(!0),icon:"sliders","data-test-id":"password-protection-settings",className:`${a.baseClassName}-section-item-element`,state:l?"loading":void 0,ghost:!0});return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Nr,{checked:!!n.features.passwordProtection.status,loading:l,onChange:m,"data-test-id":"password-protection-toggle",className:`${a.baseClassName}-section-item-element`})," ",(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.title",className:`${a.baseClassName}-section-item-element`})," ",(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{className:`${a.baseClassName}-section-item-element`,icon:"question-mark-circle",ghost:!0}),children:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.password-protection.fullDescription"})})," ",u&&(0,L.jsx)(An,{visible:r,onClose:()=>o(!1),target:g,children:(0,L.jsx)(TE,{credentials:p,onSubmit:f})}),!u&&g]})}));class DE extends U.Component{constructor(){super(...arguments),this.renderPlesk=e=>(0,L.jsx)(Ue,{onClick:t=>Rc(t,(()=>window.open(e))),icon:"sliders",ghost:!0}),this.renderCpanel=e=>{const{installation:{owner:t},goToUri:n}=this.props,{href:s,onClick:i}=bm({link:e,inNewWindow:!1,goToUri:n,accountUsername:t.login});return(0,L.jsx)(Ue,{onClick:s?e=>Rc(e,(()=>window.open(s))):i,icon:"sliders",ghost:!0})}}render(){const{installation:{installationType:e,owner:t},scheduleTaskSettingsUrl:n}=this.props;return n?QT(e)?this.renderPlesk(n):JT(e)&&(null==t?void 0:t.login)?this.renderCpanel(n):null:null}}const PE=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(DE),IE=(0,so.$j)(void 0,(e=>({getWpCronTakeoverMeta:nh(Ib,e)})))((({installation:e,onSubmit:t,loading:n,getWpCronTakeoverMeta:s,baseClassName:i=`${gu}wp-cron-task-replacement-popover`})=>{const[a,r]=(0,U.useState)(null),[o,l]=(0,U.useState)(!1);return(0,U.useEffect)((()=>{o&&(e.features.wpCronTakeover.taskReplacementStatus&&e.features.wpCronTakeover.status?s(e.id).then((({value:{taskReplacementStatus:e}})=>{r(e?e.meta.managementUri:null)})).catch((()=>{})):r(null))}),[e.id,o,e.features.wpCronTakeover,s]),(0,L.jsxs)(An,{target:(0,L.jsx)(Ue,{icon:"sliders",ghost:!0,onClick:()=>l(!0),"data-test-id":"wp-cron-task-replacement-button",className:`${i}-section-item-element`}),"data-test-id":"wp-cron-task-replacement-popover",children:[(0,L.jsx)(Nr,{checked:!!e.features.wpCronTakeover.taskReplacementStatus,loading:n,onChange:t,"data-test-id":"wp-cron-task-replacement-switcher",className:`${i}-section-item-element`}),(0,L.jsx)(Ac,{content:"controllers.index.detail.wpCronTaskReplacement.title",className:`${i}-section-item-element`}),(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{icon:"question-mark-circle",ghost:!0,className:`${i}-section-item-element`}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.wpCronTaskReplacement.description"})}),e.features.wpCronTakeover.taskReplacementStatus&&e.features.wpCronTakeover.status&&(0,L.jsx)("span",{className:`${i}-section-item-element`,children:(0,L.jsx)(PE,{installation:e,scheduleTaskSettingsUrl:a})})]})})),OE=(0,so.$j)(void 0,(e=>({instanceActions:nh({toggleWpCronTakeoverStatus:Db,toggleWpCronTakeoverTaskStatus:Pb},e),addSuccessMessage:nh(wp,e)})))((({installation:e,addSuccessMessage:t,instanceActions:n,baseClassName:s=`${gu}wp-cron`})=>{const[i,a]=(0,U.useState)(!1),r=(0,U.useCallback)((s=>{a(!0),n.toggleWpCronTakeoverStatus(e.id,s).finally((()=>a(!1))).then((e=>(t(e?(0,L.jsx)(Ac,{content:"features.wpCronTakeover.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.wpCronTakeover.disabledSuccessfully"})),e))).catch((()=>{}))}),[e.id,t,n]),o=(0,U.useCallback)((s=>(a(!0),n.toggleWpCronTakeoverTaskStatus(e.id,s).finally((()=>a(!1))).then((n=>(e.features.wpCronTakeover.status?t(n?(0,L.jsx)(Ac,{content:"features.wpCronTakeover.taskReplacement.taskCreatedSuccessfully"}):(0,L.jsx)(Ac,{content:"features.wpCronTakeover.taskReplacement.taskRemovedSuccessfully"})):t(n?(0,L.jsx)(Ac,{content:"features.wpCronTakeover.taskReplacement.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.wpCronTakeover.taskReplacement.disabledSuccessfully"})),n))).catch((()=>{})))),[e.id,e.features.wpCronTakeover.status,t,n]);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Nr,{checked:!!e.features.wpCronTakeover.status,loading:i,onChange:r,"data-test-id":"reschedule-wp-cron-toggle",className:`${s}-section-item-element`})," ",(0,L.jsx)(Ac,{content:"controllers.index.detail.disableWpCron.title",className:`${s}-section-item-element`})," ",(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{icon:"question-mark-circle",className:`${s}-section-item-element`,ghost:!0}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.disableWpCron.description"})})," ",(0,L.jsx)(IE,{installation:e,onSubmit:o,loading:i})]})}));class LE extends U.Component{constructor(e){super(e),this.fetchMaintenanceSettings=()=>{this.props.instanceActions.getMaintenanceSettings(this.props.installation.id).then((e=>{this.setMaintenanceSettingsData(e)})).catch((()=>{this.props.onClose()}))},this.setMaintenanceSettingsData=e=>{const{fullMode:t,timer:n,texts:s,socialNetworks:i,defaultSocialNetworks:a,templateFilePath:r}=e,o={facebook:i.facebook,instagram:i.instagram,twitter:i.twitter},l={facebook:a.facebook,instagram:a.instagram,twitter:a.twitter},c={fullMode:t,isTimerEnabled:n.enabled,title:s.title,header:s.header,subheader:s.subheader,days:n.days,hours:n.hours,minutes:n.minutes,socialNetworks:o,defaultSocialNetworks:l,templateFilePath:r,isLoaded:!0};this.setState(c)},this.isFormProcessing=()=>this.state.isProcessing||this.state.isPreviewProcessing,this.onFullModeEnable=e=>this.setState({fullMode:e}),this.onTimerEnable=e=>this.setState({isTimerEnabled:e}),this.handleFormFieldChange=(e,t)=>this.setState((n=>Object.assign(Object.assign({},n),{[e]:t}))),this.handleSocialLinksFieldChange=(e,t)=>this.setState((n=>({socialNetworks:Object.assign(Object.assign({},n.socialNetworks),{[e]:t})}))),this.handleSubmit=e=>{if(this.state.isProcessing)return;const{onClose:t,installation:{id:n,title:s},instanceActions:{setMaintenanceFullMode:i,updateMaintenanceSettings:a},addSuccessMessage:r}=this.props;this.setState({isProcessing:!0}),this.state.errors&&this.setState({errors:void 0}),a(n,e).then((e=>{i(n,e.fullMode),t(),r((0,L.jsx)(Ac,{content:"controllers.index.maintenance-mode.updateSuccess",params:{name:s}}))})).catch((e=>{var t,n;(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors)&&this.setState({errors:e.response.data.formErrors})})).finally((()=>{this.setState({isProcessing:!1})}))},this.getSocialNetworks=()=>{const e=[];return Object.keys(this.state.socialNetworks).forEach((t=>{e.push((0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:`forms.maintenance-mode.socialNetworks.${t}`}),name:`socialNetworks[${t}]`,onChange:e=>this.handleSocialLinksFieldChange(t,e),size:"fill"},`maintenance-socialNetworks-${t}`))})),e},this.handleRestoreValues=()=>{if(this.state.isTemplateRestoring)return;const{installation:{id:e},instanceActions:{restoreMaintenanceTemplate:t},addSuccessMessage:n}=this.props;this.setState({isTemplateRestoring:!0}),t(e).then((()=>{n((0,L.jsx)(Ac,{content:"controllers.index.restore-maintenance-template.success"}))})).catch((()=>{})).finally((()=>this.setState({isTemplateRestoring:!1})))},this.handleDeleteSocialNetworks=()=>{this.setState((e=>{const t=Object.assign({},e.socialNetworks);return Object.keys(t).forEach((e=>{t[e]=""})),{socialNetworks:t}}))},this.handleRestoreSocialNetworks=()=>{const{defaultSocialNetworks:e}=this.state,t={};Object.keys(e).forEach((n=>{t[n]=e[n]})),this.setState({socialNetworks:Object.assign({},t)})},this.handleCustomizeValues=()=>{const{installation:e,instanceActions:{getMaintenanceTemplateCustomizationUrl:t}}=this.props;this.setState({isProcessing:!0},(()=>{t(e.id,e.owner.login).catch((()=>{})).finally((()=>{this.setState({isProcessing:!1})}))}))},this.handlePreview=()=>{const{installation:{id:e},instanceActions:{createMaintenancePreview:t}}=this.props,n=this.getFormValues(),{fullMode:s}=n,i=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(n,["fullMode"]);this.setState({isPreviewProcessing:!0},(()=>{t(e,i).catch((()=>{})).finally((()=>{this.setState({isPreviewProcessing:!1})}))}))},this.getFormValues=()=>({texts:{title:this.state.title,header:this.state.header,subheader:this.state.subheader},timer:{enabled:this.state.isTimerEnabled,days:this.state.days,hours:this.state.hours,minutes:this.state.minutes},socialNetworks:{facebook:this.state.socialNetworks.facebook,instagram:this.state.socialNetworks.instagram,twitter:this.state.socialNetworks.twitter},fullMode:this.state.fullMode}),this.state={isLoaded:!1,isProcessing:!1,isPreviewProcessing:!1,isTemplateRestoring:!1,fullMode:!1,errors:void 0,isTimerEnabled:!1,title:"",header:"",subheader:"",days:0,hours:0,minutes:0,socialNetworks:{},defaultSocialNetworks:{},templateFilePath:null}}componentDidUpdate(e){this.props.isOpen!==e.isOpen&&this.props.isOpen&&this.fetchMaintenanceSettings()}getIntValue(e,t){if(!e)return 0;const n=parseInt(e.toString());return isNaN(n)?t:n}renderFullModeSection(){return(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.fullMode.description"})}),(0,L.jsx)(ui,{name:"fullMode",label:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.fullMode.enable"}),children:(0,L.jsx)(Nr,{"data-test-id":"wpt-maintenance-fullMode-switch",checked:this.state.fullMode,onChange:e=>{this.onFullModeEnable(e)}})})]})}renderTemplateSection(){const{installation:{installationType:e}}=this.props;let t;return t=nC(e)?this.renderRemoteTemplateSectionContent("forms.maintenance-mode.template.remoteDescription"):iC(e)?this.renderRemoteTemplateSectionContent("forms.maintenance-mode.template.remoteAgentDescription"):this.renderLocalTemplateSectionContent(),(0,L.jsx)(vi,{title:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.template.legend"}),children:t})}renderLocalTemplateSectionContent(){const{installation:{features:{fileManager:e}}}=this.props;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.template.localDescription"})}),(0,L.jsxs)(Ks,{title:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.template.fieldTitle"}),actions:!0,children:[e.available&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Ue,{onClick:this.handleCustomizeValues,disabled:this.isFormProcessing(),children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.template.customizeButtonTitle"})})," "]}),(0,L.jsx)(Ue,{onClick:this.handleRestoreValues,state:this.state.isTemplateRestoring?"loading":void 0,disabled:this.isFormProcessing(),children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.template.restoreButtonTitle"})})]})]})}renderRemoteTemplateSectionContent(e){return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{content:e,params:{templateFilePath:this.state.templateFilePath,server:this.props.installation.server}})}),(0,L.jsx)(Ks,{actions:!0,children:(0,L.jsx)(Ue,{onClick:this.handleRestoreValues,state:this.state.isTemplateRestoring?"loading":void 0,disabled:this.isFormProcessing(),children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.template.restoreButtonTitle"})})})]})}renderTextSection(){return(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.texts.legend"}),vertical:!0,children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.texts.description"})}),(0,L.jsx)(ga,{size:"fill",label:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.texts.title"}),name:"texts[title]",onChange:e=>this.handleFormFieldChange("title",e)}),(0,L.jsx)(ga,{multiline:!0,size:"fill",name:"texts[header]",label:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.texts.header"}),onChange:e=>this.handleFormFieldChange("header",e),disabled:this.isFormProcessing()}),(0,L.jsx)(ga,{multiline:!0,size:"fill",name:"texts[subheader]",label:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.texts.subheader"}),onChange:e=>this.handleFormFieldChange("subheader",e),disabled:this.isFormProcessing()})]})}renderTimerSection(){const{baseClassName:e}=this.props;return(0,L.jsxs)(vi,{vertical:!0,children:[(0,L.jsx)(Nr,{"data-test-id":"wpt-maintenance-timer-switch",checked:this.state.isTimerEnabled,onChange:e=>{this.onTimerEnable(e)},children:(0,L.jsx)(kn,{level:3,children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.timer.enabled"})})}),(0,L.jsx)(Ks,{children:(0,L.jsxs)(Xn,{sm:3,gap:"sm",className:`${e}-timers-grid`,children:[(0,L.jsx)(Zn,{children:(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.timer.days"}),children:(0,L.jsx)(Sn,{"data-test-id":"wpt-maintenance-timer-days",min:0,max:99,onChange:e=>this.handleFormFieldChange("days",this.getIntValue(e,this.state.days)),disabled:!this.state.isTimerEnabled,value:this.state.days})})}),(0,L.jsx)(Zn,{children:(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.timer.hours"}),children:(0,L.jsx)(Sn,{"data-test-id":"wpt-maintenance-timer-hours",min:0,max:23,onChange:e=>this.handleFormFieldChange("hours",this.getIntValue(e,this.state.hours)),disabled:!this.state.isTimerEnabled,value:this.state.hours})})}),(0,L.jsx)(Zn,{children:(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.timer.minutes"}),children:(0,L.jsx)(Sn,{"data-test-id":"wpt-maintenance-timer-minutes",min:0,max:59,onChange:e=>this.handleFormFieldChange("minutes",this.getIntValue(e,this.state.minutes)),disabled:!this.state.isTimerEnabled,value:this.state.minutes})})})]})})]})}renderSocialLinksSection(){const{baseClassName:e}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(vi,{className:`${e}-social-links-section-1`,title:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.socialNetworks.legend"}),children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.socialNetworks.descriptionNoPlaceholders"})}),(0,L.jsxs)(Ks,{className:`${e}-social-links-section-1-last-item`,title:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.socialNetworks.NetworksFieldTitle"}),actions:!0,children:[(0,L.jsx)(Ue,{onClick:this.handleDeleteSocialNetworks,disabled:this.isFormProcessing(),children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.socialNetworks.removeButtonTitle"})})," ",(0,L.jsx)(Ue,{onClick:this.handleRestoreSocialNetworks,disabled:this.isFormProcessing(),children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.socialNetworks.restoreButtonTitle"})})]})]}),(0,L.jsx)(vi,{vertical:!0,children:this.getSocialNetworks()})]})}renderPreviewButton(){return(0,L.jsx)(Ue,{"data-test-id":"wpt-maintenance-button-preview",onClick:this.handlePreview,state:this.state.isPreviewProcessing?"loading":void 0,disabled:this.isFormProcessing(),children:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.preview"})},"maintenancePreviewButton")}render(){const{installation:{displayTitle:e},isOpen:t,onClose:n}=this.props,{isLoaded:s}=this.state;return(0,L.jsxs)(zi,{size:"sm",title:e,subtitle:(0,L.jsx)(Ac,{content:"forms.maintenance-mode.maintenanceMode"}),isOpen:t,onClose:n,"data-type":"maintenance-mode",form:s?{onSubmit:this.handleSubmit,values:this.getFormValues(),state:this.isFormProcessing()?"submit":void 0,errors:this.state.errors,applyButton:!1,cancelButton:!1,submitButton:{id:Bh,state:this.state.isProcessing?"loading":void 0},additionalButtons:[this.renderPreviewButton()]}:void 0,children:[s&&(0,L.jsxs)(L.Fragment,{children:[this.renderFullModeSection(),this.renderTemplateSection(),this.renderTextSection(),this.renderTimerSection(),this.renderSocialLinksSection()]}),!s&&(0,L.jsx)(It,{})]})}}LE.defaultProps={baseClassName:`${gu}maintenance-mode-drawer`};const ME=(0,so.$j)(null,(e=>({instanceActions:nh({createMaintenancePreview:Sb,getMaintenanceTemplateCustomizationUrl:kb,setMaintenanceFullMode:wb,updateMaintenanceSettings:cv,restoreMaintenanceTemplate:uv,getMaintenanceSettings:yy},e),addSuccessMessage:t=>e(wp(t))})))(LE),AE=(0,so.$j)(null,(e=>({updateMaintenanceStatus:nh(Eb,e),addSuccessMessage:nh(wp,e)})))((e=>{const{installation:t,installation:{id:n,features:{maintenance:s}},updateMaintenanceStatus:i,addSuccessMessage:a,baseClassName:r=`${gu}maintenance-mode-control`}=e,[o,l]=(0,U.useState)(!1),[c,u]=(0,U.useState)(!1);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Nr,{checked:!!s.status,loading:o,onChange:()=>{l(!0);const e=!0===(null==s?void 0:s.status);i(n,!e,e).then((e=>{a((0,L.jsx)(Ac,{content:e.status?"controllers.index.toggle-maintenance.enabledSuccessfully":"controllers.index.toggle-maintenance.disabledSuccessfully"}))})).catch((()=>{})).finally((()=>{l(!1)}))},"data-test-id":"maintenance-mode-toggle",className:`${r}-section-item-element`})," ",(0,L.jsx)(Ac,{content:"controllers.index.detail.fieldMaintenance",className:`${r}-section-item-element`})," ",(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{className:`${r}-section-item-element`,icon:"question-mark-circle",ghost:!0}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.hintMaintenanceText"})})," ",(0,L.jsx)(Ue,{className:`${r}-section-item-element`,icon:"sliders",onClick:e=>Rc(e,(()=>u(!0))),"data-test-id":"maintenance-mode-settings",ghost:!0})]}),(0,L.jsx)(ME,{installation:t,isOpen:c,onClose:()=>u(!1)})]})})),EE=(0,so.$j)((e=>({purchaseDeluxeUrl:e.app.urls.purchaseDeluxeUrl,smartUpdateFeatureUpgradeLink:e.app.urls.featuresBuyLinks.smart_update})),(e=>({appActions:nh({disableSmartUpdatePromoForInstances:Op},e)})))((e=>{const{baseClassName:t=`${gu}smart-update-trial-popover`,appActions:{disableSmartUpdatePromoForInstances:n},purchaseDeluxeUrl:s,smartUpdateFeatureUpgradeLink:i}=e,[a,r]=(0,U.useState)(!1);return(0,L.jsxs)(An,{visible:a,onClose:()=>{r(!1),lm("CLICK_INSTANCES_SMART_UPDATE_PROMO_POPOVER_CLOSE_BUTTON")},target:(0,L.jsx)(ye,{intent:"warning",className:`${t}__smart-update__promo-label`,onClick:()=>{r(!0),lm("SHOW_INSTANCES_SMART_UPDATE_PROMO_POPOVER")},tabIndex:0,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.smartUpdatePromoLabel"})}),className:`${t}__smart-update__promo-popover`,children:[(0,L.jsx)(Ac,{content:"instancesSmartUpdatePromoPopover.text"}),(0,L.jsxs)("div",{className:`${t}__smart-update__promo-popover__button-group`,children:[(0,L.jsx)(Ue,{component:"a",href:cm(i),target:"_blank",onClick:()=>{r(!0),lm("CLICK_INSTANCES_SMART_UPDATE_PROMO_POPOVER_TRY_NOW_BUTTON",{target:s})},className:`${t}__smart-update__promo-popover__try-now-button`,intent:"primary",children:(0,L.jsx)(Ac,{content:"instancesSmartUpdatePromoPopover.tryNowButton"})}),(0,L.jsx)(fe,{onClick:()=>{r(!1),n(),lm("CLICK_INSTANCES_SMART_UPDATE_PROMO_POPOVER_DO_NOT_SHOW_AGAIN_BUTTON")},className:`${t}__smart-update__promo-popover__do-not-show-again-link`,children:(0,L.jsx)(Ac,{content:"instancesSmartUpdatePromoPopover.doNotShowAgainLink"})})]})]})}));class UE extends U.Component{constructor(e){super(e),this.smartUpdateUnpaidMarkRef=null,this.updateIsUpdating=()=>{var e,t;const n=null===(t=null===(e=this.props.installation.features.updates)||void 0===e?void 0:e.smart)||void 0===t?void 0:t.taskStatus;n===lL||cL(n)?this.setState({isUpdating:!1}):this.setState({isUpdating:!0})},this.isSmartUpdatesPreviewAvailable=(e,t)=>e&&!!t&&cL(t),this.handleToggleSmartUpdate=e=>{const{installation:{id:t,features:{updates:n}},instancesActions:{setSmartUpdatesStatus:s}}=this.props,{isSmartUpdateSwitchLoading:i}=this.state;i||(n.smart.status||n.smart.applicable?(this.setState({isSmartUpdateSwitchLoading:!0}),s(t,e).then((e=>{this.props.addSuccessMessage(e.status?(0,L.jsx)(Ac,{content:"features.updates.smart.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.updates.smart.disabledSuccessfully"}))})).catch((()=>{})).finally((()=>{this.setState({isSmartUpdateSwitchLoading:!1})}))):this.smartUpdateUnpaidMarkRef&&this.smartUpdateUnpaidMarkRef.handleTogglePopover())},this.showForecastAvailable=()=>{const{baseClassName:e,onOpenUpdates:t,installation:{features:{updates:n}}}=this.props,s=n.smart.taskStatus&&!!n.smart.initiatedByAutoUpdater;return(0,L.jsx)(je,{title:s?(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.smartUpdateStartedByAutoUpdaterConflictWarning"}):(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.smartUpdateConflictWarning"}),children:(0,L.jsx)(fe,{className:`${e}-section-item-element`,icon:(0,L.jsx)(he,{size:"16",name:"signal-light",intent:"success"}),onClick:()=>t(),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.smartUpdateTestsDone.title"})})})},this.state={isSmartUpdateSwitchLoading:!1,isUpdating:!1}}componentDidMount(){this.updateIsUpdating()}componentDidUpdate(e){var t,n,s,i;(null===(n=null===(t=this.props.installation.features.updates)||void 0===t?void 0:t.smart)||void 0===n?void 0:n.taskStatus)!==(null===(i=null===(s=e.installation.features.updates)||void 0===s?void 0:s.smart)||void 0===i?void 0:i.taskStatus)&&this.updateIsUpdating()}render(){var e;const{installation:{id:t,installationType:n,status:s,features:{updates:i}},baseClassName:a,showSmartUpdatePromo:r,isSmartUpdatePromoAvailableForInstancesScreen:o}=this.props,{isSmartUpdateSwitchLoading:l,isUpdating:c}=this.state,u=s.multisite,d=!!i.smart.status,p=i.smart.taskStatus,h=this.isSmartUpdatesPreviewAvailable(d,p),m=d?c||h:c||u;let f=(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.description"});return u?f=(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.smartUpdateIsNotAvailableForMultisiteDescription"}):(c||h)&&(f=(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.inProgressDescription"})),(0,L.jsxs)(L.Fragment,{children:[c?(0,L.jsx)(he,{name:"refresh",animation:"spin",size:"16",className:`${a}-section-item-element`}):(0,L.jsx)(Nr,{checked:d,disabled:m,loading:l,onChange:this.handleToggleSmartUpdate,"data-test-id":"smart-update-toggle",className:`${a}-section-item-element`})," ",u?(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.title",className:`${a}-section-item-element`}):(0,L.jsx)(zM,{uatAction:km,className:`${a}-section-item-element`,ref:e=>this.smartUpdateUnpaidMarkRef=e,installationId:t,installationType:n,applicable:!0===(null===(e=null==i?void 0:i.smart)||void 0===e?void 0:e.applicable),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.smartUpdateSwitchesPanelItem.title"})})," ",h&&this.showForecastAvailable(),r&&o&&(0,L.jsx)(EE,{}),(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{className:`${a}-section-item-element`,icon:"question-mark-circle",ghost:!0}),children:f})]})}}UE.defaultProps={baseClassName:`${gu}smart-updates-control`};const RE=(0,so.$j)((e=>{const t=e.app.urls.featuresBuyLinks.smart_update,{showSmartUpdatePromo:n,isSmartUpdatePromoAvailableForInstancesScreen:s}=e.app.options;return{purchaseDeluxeUrl:e.app.urls.purchaseDeluxeUrl,smartUpdateFeatureUpgradeLink:t,showSmartUpdatePromo:n,isSmartUpdatePromoAvailableForInstancesScreen:s}}),(e=>({instancesActions:nh({setSmartUpdatesStatus:Rb},e),addSuccessMessage:nh(wp,e)})))(UE);class NE extends U.Component{constructor(e){super(e),this.openDebugForm=()=>{this.props.appActions.checkSession().then((()=>this.setState({isDebugFormOpen:!0})))},this.handleCloseDebugForm=()=>this.setState({isDebugFormOpen:!1}),this.handleToggleIndexing=()=>{const{addSuccessMessage:e,installation:{id:t,features:{indexing:n}}}=this.props;this.setState({isIndexingProcessing:!0}),this.props.instanceActions.setIndexingStatus(t,!n.status).then((t=>{e(t?(0,L.jsx)(Ac,{content:"controllers.index.feature.search-indexing.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"controllers.index.feature.search-indexing.disabledSuccessfully"}))})).catch((()=>{})).finally((()=>{this.setState({isIndexingProcessing:!1})}))},this.handleToggleDebug=e=>{this.setState({isDebugProcessing:!0}),this.props.instanceActions.toggleDebug(this.props.installation.id,e).then((e=>{this.props.addSuccessMessage(e?(0,L.jsx)(Ac,{content:"features.debug.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.debug.disabledSuccessfully"}))})).catch((()=>{})).finally((()=>{this.setState({isDebugProcessing:!1})}))},this.handleSetDebugSettings=e=>(this.setState({isDebugProcessing:!0}),this.props.instanceActions.setDebugSettings(this.props.installation.id,e).catch((()=>{})).finally((()=>{this.setState({isDebugProcessing:!1})}))),this.handleNginxCachingChanged=e=>{this.setState({isCachingProcessing:!0}),this.props.instanceActions.setNginxCachingStatus(this.props.installation.id,e).then((()=>{this.props.addSuccessMessage(e?(0,L.jsx)(Ac,{content:"features.nginxCaching.enabledSuccessfully"}):(0,L.jsx)(Ac,{content:"features.nginxCaching.disabledSuccessfully"}))})).catch((()=>{})).finally((()=>{this.setState({isCachingProcessing:!1})}))},this.getSwitchesPanel=()=>{var e;const{installation:t,installation:{features:n,features:{virtualPatches:{restrictions:s}}},baseClassName:i,isWpMode:a,onOpenUpdates:r,showVirtualPatchesUpsellWhenRestrictedViaPlans:o}=this.props,{isIndexingProcessing:l,isCachingProcessing:c,isDebugProcessing:u}=this.state,d=[];if(d.push((0,L.jsxs)(Ks,{className:`${i}-item`,children:[(0,L.jsx)(Nr,{checked:!!n.indexing.status,loading:l,onChange:this.handleToggleIndexing,"data-test-id":"search-engine-indexing-toggle",className:`${i}-section-item-element`})," ",(0,L.jsx)("span",{className:`${i}-section-item-element`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.fieldBlogPublic"})})," ",(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{className:`${i}-section-item-element`,icon:"question-mark-circle",ghost:!0}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.hintBlogPublicText"})})]},"toggle-index")),null===(e=n.nginxCaching)||void 0===e?void 0:e.available){const{webServerSettingsUrl:e,status:t}=n.nginxCaching;d.push((0,L.jsxs)(Ks,{className:`${i}-item`,children:[(0,L.jsx)(Nr,{checked:!!t,loading:c,onChange:this.handleNginxCachingChanged,"data-test-id":"caching-toggle",className:`${i}-section-item-element`})," ",(0,L.jsx)(Ac,{content:"controllers.index.detail.fieldCaching",className:`${i}-section-item-element`})," ",(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{className:`${i}-section-item-element`,icon:"question-mark-circle",ghost:!0}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.hintCachingText"})})," ",e&&(0,L.jsx)(Ue,{className:`${i}-section-item-element`,icon:"sliders",onClick:t=>Rc(t,(()=>window.open(e))),ghost:!0})]},"nginxCaching"))}return d.push((0,L.jsxs)(Ks,{className:`${i}-item`,children:[(0,L.jsx)(Nr,{checked:!!n.debug.status,loading:u,onChange:this.handleToggleDebug,"data-test-id":"debugging-toggle",className:`${i}-section-item-element`})," ",(0,L.jsx)("span",{className:`${i}-section-item-element`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.fieldDebug"})})," ",(0,L.jsx)(An,{target:(0,L.jsx)(Ue,{className:`${i}-section-item-element`,icon:"question-mark-circle",ghost:!0}),children:(0,L.jsx)(Ac,{content:"controllers.index.detail.hintDebugText"})})," ",(0,L.jsx)(Ue,{className:`${i}-section-item-element`,icon:"sliders",onClick:e=>Rc(e,this.openDebugForm),"data-test-id":"debugging-settings",ghost:!0})]},"debug")),n.passwordProtection.available&&d.push((0,L.jsx)(Ks,{className:`${i}-item`,children:(0,L.jsx)(CE,{installation:this.props.installation,baseClassName:`${i}`})},"password-protection")),n.wpCronTakeover.available&&d.push((0,L.jsx)(Ks,{className:`${i}-item`,children:(0,L.jsx)(OE,{installation:this.props.installation,baseClassName:i})},"wp-cron")),n.hotlinkProtection.available&&d.push((0,L.jsx)(Ks,{className:`${i}-item`,children:(0,L.jsx)(SE,{installation:this.props.installation,baseClassName:`${i}`})},"hotlink-protection")),a&&(d.push((0,L.jsx)(Ks,{className:`${i}-item`,children:(0,L.jsx)(AE,{installation:t,baseClassName:i})},"maintenance-mode")),n.updates.smart.available&&d.push((0,L.jsx)(Ks,{className:`${i}-item`,children:(0,L.jsx)(RE,{installation:t,baseClassName:i,onOpenUpdates:r})},"smart-updates"))),!yT(s,this.props.isAdmin,o)&&d.push((0,L.jsx)(Ks,{className:`${i}-item`,children:(0,L.jsx)(jE,{baseClassName:i,installation:t,onOpenVirtualPatchingUpsellDialog:this.props.onOpenVirtualPatchingUpsellDialog,onOpenVirtualPatchingLicenseInfoDrawer:this.props.onOpenVirtualPatchingLicenseInfoDrawer})},"virtual-patches")),d},this.state={isDebugFormOpen:!1,isIndexingProcessing:!1,isCachingProcessing:!1,isDebugProcessing:!1}}render(){const{isDebugProcessing:e,isDebugFormOpen:t}=this.state,{installation:n,isCollapsible:s}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(vi,{title:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.siteConfiguration"}),className:"wpt-instance-card-section",collapsible:s,children:this.getSwitchesPanel()}),(0,L.jsx)(fE,{isOpen:t,installation:n,isProcessing:e,onSetDebugSettings:this.handleSetDebugSettings,onClose:this.handleCloseDebugForm})]})}}NE.defaultProps={baseClassName:`${gu}instance-settings-section`,isWpMode:!1};const FE=(0,so.$j)((e=>({isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller,showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans})),(e=>({appActions:nh({checkSession:Sp},e),instanceActions:nh({toggleDebug:kv,setDebugSettings:wv,setNginxCachingStatus:Sv,setIndexingStatus:Cb},e),addSuccessMessage:nh(wp,e)})))(NE);class YE extends U.Component{constructor(e){super(e),this.handleChangeColumns=e=>this.setState((t=>t.columnsCount===e?null:{columnsCount:e})),this.state={columnsCount:null}}render(){const{isWpMode:e,installation:t,enableInstances:n,disableInstances:s,openUpdates:i,onOpenSecurityDialog:a,onOpenSmartPhpUpdates:r,onOpenVirtualPatchingUpsellDialog:o,onOpenVirtualPatchingLicenseInfoDrawer:l}=this.props,{columnsCount:c}=this.state;return(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(Xn,{gap:"md",minColumnWidth:280,onColumnsChange:this.handleChangeColumns,children:[(0,L.jsx)(Zn,{xs:12,sm:12,md:12,lg:6,xl:5,children:(0,L.jsx)(dE,{installation:t,disableInstances:s,enableInstances:n,openUpdates:i,onOpenSecurityDialog:a,onOpenSmartPhpUpdates:r,isCollapsible:null===c||c<2})}),(0,L.jsx)(Zn,{xs:12,sm:12,md:12,lg:6,xl:5,children:(0,L.jsx)(FE,{isWpMode:e,installation:t,isCollapsible:null===c||c<2,onOpenUpdates:i,onOpenVirtualPatchingUpsellDialog:o,onOpenVirtualPatchingLicenseInfoDrawer:l})})]})})}}YE.defaultProps={onOpenSmartPhpUpdates:void 0,isWpMode:!1};const BE=(0,so.$j)(null,(e=>({instanceActions:nh({setIndexingStatus:Cb,toggleHotlinkProtection:Ob,synchronizeSiteUrl:hy,setInstanceName:Rv},e)})))(YE),HE=e=>(0,L.jsx)(fe,{className:`${gu}check-wordpress-integrity-link`,icon:"shield-chain",onClick:e.onOpenCheckWpIntegrityDialog,"data-test-id":"check-wordpress-integrity",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.footer.checkWordPressIntegrity"})});class VE extends U.Component{constructor(){super(...arguments),this.renderCheckUpdates=()=>{const{onOpenUpdatesDialog:e}=this.props;return(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"refresh",size:"16"}),title:(0,L.jsx)(fe,{onClick:t=>Rc(t,(()=>e())),"data-test-id":"updates-link",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.footer.checkUpdates"})})})},this.renderAutoUpdatesSettings=()=>{const{installation:{features:{updates:e}},onOpenUpdatesDialog:t}=this.props;return e.autoUpdatesAvailable?(0,L.jsx)(Da,{title:(0,L.jsx)(fe,{onClick:e=>Rc(e,(()=>t(Af,!0))),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.footer.autoUpdateSettings.title"})})}):null},this.renderMaintenance=()=>{const{installation:e,baseClassName:t}=this.props;return(0,L.jsx)(Ks,{children:(0,L.jsx)(AE,{installation:e,baseClassName:t})},"maintenance")},this.renderCheckWordPressIntegrity=()=>{const{installation:{features:{integrity:e}},onOpenCheckWordPressIntegrityDialog:t,baseClassName:n}=this.props;return e.available?(0,L.jsx)("div",{className:`${n}__check-wordpress-integrity`,children:(0,L.jsx)(HE,{onOpenCheckWpIntegrityDialog:t})}):null},this.renderSmartUpdates=()=>{const{installation:e,installation:{features:{updates:{autoUpdatesAvailable:t,smart:{available:n}}}},baseClassName:s,onOpenUpdatesDialog:i}=this.props;return t&&n?(0,L.jsx)(Da,{title:(0,L.jsx)(Ks,{children:(0,L.jsx)(RE,{installation:e,baseClassName:s,onOpenUpdates:i})},"smart-update-toggle")}):null}}render(){const{baseClassName:e}=this.props;return(0,L.jsx)("div",{className:e,children:(0,L.jsxs)("div",{className:`${e}__list`,children:[this.renderCheckUpdates(),this.renderAutoUpdatesSettings(),this.renderSmartUpdates(),(0,L.jsx)(Da,{title:(0,L.jsxs)(L.Fragment,{children:[this.renderCheckWordPressIntegrity()," ",this.renderMaintenance()]})})]})})}}VE.defaultProps={baseClassName:`${gu}instance-card-footer`};const $E=VE,WE=e=>{const{installation:{status:{unsupported:t},version:n},upgradingInstanceInstructionsUrl:s}=e;return n&&t?(0,L.jsxs)("div",{className:`${gu}unsupported-instance-details`,children:[(0,L.jsx)(Rr,{intent:"danger",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.unsupportedInstance.description",params:{version:n}})}),s&&(0,L.jsxs)("div",{children:[(0,L.jsx)(Ac,{content:"controllers.index.detail.unsupportedInstance.upgradingInstanceInstructionsLabel"}),":",(0,L.jsx)("br",{}),(0,L.jsx)(wn,{href:s,children:s})]}),(0,L.jsx)(WA,{installation:e.installation})]}):null},zE=(0,so.$j)(null,(e=>({instancesActions:nh({getAvailablePhpHandlers:_b},e)})))((e=>{const[t,n]=(0,U.useState)(),[s,i]=(0,U.useState)(),[a]=(0,U.useState)(),[r,o]=(0,U.useState)(!1),l=Mc(),{installation:{id:c,features:{php:{handler:u}}},instancesActions:{getAvailablePhpHandlers:d}}=e;return(0,L.jsxs)(An,{target:(0,L.jsx)(Ue,{onClick:()=>{void 0===s&&(o(!0),d(c).then((e=>i(e))).catch((()=>{})).finally((()=>o(!1))))},children:(0,L.jsx)(Ac,{content:"instancesList.phpSelector.changePhpHandlerButton"})}),placement:"bottom",children:[r&&(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"instancesList.phpSelector.loadingListOfPhpHandlers"})}),!r&&s&&s.length>0&&(0,L.jsxs)(Si,{vertical:!0,submitButton:{children:(0,L.jsx)(Ac,{content:t?"phpVersionsForm.submitting":"phpVersionsForm.submit"}),intent:"primary",size:"md"},applyButton:!1,cancelButton:!1,state:t,values:{phpHandler:a},onSubmit:({phpHandler:t})=>{t&&(n("submit"),e.onSwitchPHPHandler(t).finally((()=>{n(void 0)})))},children:[u&&(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"phpVersionsForm.currentVersion.label"}),children:(0,L.jsx)(Wn,{children:u.name})}),(0,L.jsx)(Ca,{name:"phpHandler",label:l("phpVersionsForm.versions.label"),children:s.map((e=>(0,L.jsx)(wa,{value:e.identifier,children:e.name},e.identifier)))})]}),!r&&s&&0===s.length&&(0,L.jsx)(ge,{intent:"warning",children:(0,L.jsx)(Ac,{content:"instancesList.phpSelector.noPhpHandlers"})}),(0,L.jsx)(QA,{installation:e.installation})]})})),qE=e=>{var t;return(0,L.jsxs)(Rs,{gap:"md",children:[(0,L.jsx)(Fs,{width:"300px",children:(0,L.jsx)(SA,{installation:e.installation})}),(0,L.jsxs)(Fs,{fill:!0,className:`${gu}unsupported-wide-column`,children:[(0,L.jsxs)(Rr,{intent:"danger",children:[(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"instancesList.issues.errorUnsupportedPHP.title",params:{phpVersion:null===(t=e.installation.features.php.handler)||void 0===t?void 0:t.version}})})," ",(0,L.jsx)(Ac,{content:"instancesList.issues.errorUnsupportedPHP.description",unsafe:!0})]}),(0,L.jsx)(zE,{installation:e.installation,onSwitchPHPHandler:e.onChangePHPHandler}),(0,L.jsx)(WA,{installation:e.installation})]})]})},GE=(e,t=null)=>()=>Cd.getInstanceActionLogRecords(e,t),KE=e=>t=>Cd.onOpenActionLogBrowser(e).then((({data:e})=>(t(xp(e)),e))),XE=e=>()=>Cd.onEnableRealTimeUpdates(e),ZE=e=>()=>Cd.getInstanceActionLogRotationSettings(e),JE=(e,t)=>n=>Cd.saveInstanceActionLogRotationSettings(e,t).then((({data:e})=>(n(xp(e)),e)));var QE=r(9198),eU=r.n(QE);const tU=(0,U.forwardRef)((({value:e,onClick:t,disabled:n},s)=>{const i=Mc();return(0,L.jsx)("span",{ref:s,children:(0,L.jsx)(vn,{disabled:n,placeholder:i("actionLog.filterDate.dateFrom"),onClick:t,value:e,readOnly:"readOnly"})})}));tU.displayName="InputDateFrom";const nU=(0,U.forwardRef)((({value:e,onClick:t,disabled:n},s)=>{const i=Mc();return(0,L.jsx)("span",{ref:s,children:(0,L.jsx)(vn,{disabled:n,placeholder:i("actionLog.filterDate.dateTo"),onClick:t,value:e,readOnly:"readOnly"})})}));nU.displayName="InputDateTo";const sU=({title:e,disabled:t,onClick:n,onClear:s})=>{const i=Mc();return(0,L.jsx)(vn,{size:"fill",disabled:t,placeholder:i("actionLog.filterDate.inputDate"),readOnly:"readOnly",suffix:(0,L.jsx)(Ue,{ghost:!0,icon:"cross-mark",disabled:t,onClick:s}),onClick:n,value:e?i(e):""})};sU.propTypes={title:Vt().string,disabled:Vt().bool,onClick:Vt().func.isRequired,onClear:Vt().func.isRequired},sU.defaultProps={title:null,disabled:!1};const iU=e=>{const{filterDateFrom:t,filterDateTo:n,onChangeDateFrom:s,onChangeDateTo:i,disabled:a,title:r,onChangeTitle:o,isVisible:l,onToggleDateFilterVisibility:c}=e,u=Mc(),d=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].map((e=>u(`actionLog.filterDate.months.${e}`))),p=["Su","Mo","Tu","We","Th","Fr","Sa"].map((e=>u(`actionLog.filterDate.days.${e}`)));var h;const m="yyyy-MM-dd HH:mm:ss",f="HH:mm",g={localize:{month:e=>d[e],day:e=>p[e]},options:{weekStartsOn:(h=parseInt(u("actionLog.filterDate.firstDayOfWeek")))>=0&&h<=6?parseInt(u("actionLog.filterDate.firstDayOfWeek")):0},formatLong:{}};return(0,L.jsxs)(An,{placement:"bottom-right",visible:l,canCloseOnOutsideClick:!1,wide:!0,target:(0,L.jsx)(sU,{disabled:a,title:r,onClick:e=>{e.stopPropagation(),c()},onClear:e=>{e.stopPropagation(),c(),o(""),s(null),i(null)}}),onClick:e=>e.stopPropagation(),onClose:c,children:[(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"Filter Date From",children:(0,L.jsx)(eU(),{showTimeInput:!0,isClearable:!0,selected:t?Xf().unix(t).toDate():null,onChange:e=>{o("actionLog.filterDate.range"),s(null===e?null:Xf()(e).unix())},timeInputLabel:(0,L.jsx)(Ac,{content:"actionLog.filterDate.timeInputLabel"}),dateFormat:m,timeFormat:f,customInput:(0,L.jsx)(tU,{disabled:a}),locale:g})}),(0,L.jsx)(_s,{title:"Filter Date To",children:(0,L.jsx)(eU(),{showTimeInput:!0,isClearable:!0,selected:n?Xf().unix(n).toDate():null,onChange:e=>{o("actionLog.filterDate.range"),i(null===e?null:Xf()(e).unix())},timeInputLabel:(0,L.jsx)(Ac,{content:"actionLog.filterDate.timeInputLabel"}),dateFormat:m,timeFormat:f,customInput:(0,L.jsx)(nU,{disabled:a}),locale:g})})]}),(0,L.jsxs)(Re,{children:[[{key:"hour",title:"actionLog.filterDate.hour",from:Xf()().subtract(1,"hour"),to:Xf()()},{key:"today",title:"actionLog.filterDate.today",from:Xf()().startOf("day"),to:Xf()()},{key:"yesterday",title:"actionLog.filterDate.yesterday",from:Xf()().startOf("day").subtract(1,"day"),to:Xf()().startOf("day").subtract(1,"second")},{key:"week",title:"actionLog.filterDate.week",from:Xf()().subtract(1,"week"),to:Xf()()}].map((e=>(0,L.jsx)(Ue,{disabled:a,onClick:()=>{c(),o(e.title),s(e.from.unix()),i(e.to.unix())},children:(0,L.jsx)(Ac,{content:e.title})},e.key))),(0,L.jsx)(Ue,{intent:"primary",onClick:()=>c(),children:(0,L.jsx)(Ac,{content:"actionLog.filterDate.closeButton"})})]})]})};iU.propTypes={filterDateFrom:Vt().number,filterDateTo:Vt().number,disabled:Vt().bool,onChangeDateFrom:Vt().func.isRequired,onChangeDateTo:Vt().func.isRequired,title:Vt().string,onChangeTitle:Vt().func.isRequired,isVisible:Vt().bool,onToggleDateFilterVisibility:Vt().func.isRequired},iU.defaultProps={filterDateFrom:null,filterDateTo:null,disabled:!1,isVisible:!1,title:""};const aU=iU,rU="size",oU="time",lU="daily";class cU extends U.Component{constructor(e){super(e),this.loadLogRotationSettings=()=>{const{actionLogActions:{loadLogRotationSettings:e},installation:{id:t},appActions:{addErrorMessage:n}}=this.props;return this.setState({isLoadingLogRotationSettings:!0}),e(t).then((({data:e})=>{if(!e)return null;const{status:t,data:s}=e;return t===nu?s&&s.actionLogRotationOptions?s.actionLogRotationOptions:null:(e.message&&n(e.message),null)})).finally((()=>{this.setState({isLoadingLogRotationSettings:!1})}))},this.handleSubmit=()=>{const{alwaysRotateLogs:e,maxNumberOfLogFiles:t,logRotationFileSize:n,logRotationTimePeriod:s,logRotationType:i,compressLogFiles:a}=this.state,{actionLogActions:{saveLogRotationSettings:r},installation:{id:o},onCloseLogRotationSettingsDrawer:l}=this.props,c={};0===n&&(c.logRotationFileSize={minValue:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationFileSizeMinValueError",params:{minValue:0}})}),0===t&&(c.maxNumberOfLogFiles={minValue:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.maxNumberOfLogFilesMinValueError",params:{minValue:0}})}),Object.keys(c).length?this.setState({formErrors:c}):r(o,{enabled:e,rotateCount:t,size:n,timePeriod:s,type:i,compress:a}).finally(l)},this.getDrawerContent=()=>{const{compressLogFiles:e,alwaysRotateLogs:t,logRotationType:n,logRotationTimePeriod:s,formErrors:i,isLoadingLogRotationSettings:a,maxNumberOfLogFiles:r,logRotationFileSize:o}=this.state,{baseClassName:l}=this.props;return a?(0,L.jsx)(It,{}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationCondition"}),name:"logRotationCondition",children:[(0,L.jsx)("div",{className:`${l}__always-rotate-logs`,children:(0,L.jsx)(it,{checked:t,onChange:e=>this.setState({alwaysRotateLogs:e}),children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.alwaysRotateLogs"})})}),(0,L.jsx)("p",{children:(0,L.jsx)(Ms,{name:"logRotationType",checked:n===rU,onChange:()=>this.setState({logRotationType:rU}),disabled:!t,children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationBySize"})})}),(0,L.jsxs)(ui,{name:"logRotationFileSize",label:null,children:[(0,L.jsx)(Sn,{className:`${l}__log-file-size`,defaultValue:200,step:100,min:0,disabled:!t||n!==rU,value:o,onChange:e=>this.setState({logRotationFileSize:e,formErrors:Object.assign(Object.assign({},i),{logRotationFileSize:{}})})})," ",(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.kbUnit"})]}),(0,L.jsx)("p",{children:(0,L.jsx)(Ms,{name:"logRotationType",checked:n===oU,onChange:()=>this.setState({logRotationType:oU}),disabled:!t,children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationByTime"})})}),(0,L.jsx)("div",{children:(0,L.jsxs)(Ta,{className:`${l}__log-rotation-by-tyme-select`,size:"sm",value:s,onChange:e=>this.setState({logRotationTimePeriod:e}),disabled:!t||n!==oU,children:[(0,L.jsx)(wa,{value:lU,label:"daily",children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationDaily"})}),(0,L.jsx)(wa,{value:"weekly",label:"weekly",children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationWeekly"})}),(0,L.jsx)(wa,{value:"monthly",label:"monthly",children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationMonthly"})}),(0,L.jsx)(wa,{value:"yearly",label:"yearly",children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.logRotationYearly"})})]})})]}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.maxNumberOfLogFiles"}),name:"maxNumberOfLogFiles",children:(0,L.jsx)(Sn,{defaultValue:10,min:0,disabled:!t,value:r,onChange:e=>this.setState({maxNumberOfLogFiles:e,formErrors:Object.assign(Object.assign({},i),{maxNumberOfLogFiles:{}})})})}),(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.diskSpaceEconomy"}),name:"diskSpaceEconomy",children:[(0,L.jsx)("p",{children:(0,L.jsx)(Ms,{name:"diskSpaceEconomy",checked:e,onChange:()=>this.setState({compressLogFiles:!0}),disabled:!t,children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.compressLogFiles"})})}),(0,L.jsx)("p",{children:(0,L.jsx)(Ms,{name:"diskSpaceEconomy",checked:!e,onChange:()=>this.setState({compressLogFiles:!1}),disabled:!t,children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.doNotCompressLogFiles"})})})]})]})},this.state={isLoadingLogRotationSettings:!1,alwaysRotateLogs:!0,maxNumberOfLogFiles:10,logRotationFileSize:200,logRotationTimePeriod:lU,logRotationType:rU,compressLogFiles:!0,formErrors:{}}}componentDidUpdate(e,t,n){!e.isOpen&&this.props.isOpen&&this.handleOpenAndLoadData()}handleOpenAndLoadData(){this.loadLogRotationSettings().then((e=>{e&&this.setState({alwaysRotateLogs:e.enabled,maxNumberOfLogFiles:e.rotateCount,logRotationFileSize:e.size,logRotationTimePeriod:e.timePeriod?e.timePeriod:lU,logRotationType:e.type,compressLogFiles:e.compress})}))}render(){const{formErrors:e}=this.state,{isOpen:t,onCloseLogRotationSettingsDrawer:n}=this.props;return(0,L.jsx)(zi,{title:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettingsDrawerTitle"}),onClose:n,size:"sm",isOpen:t,form:{onSubmit:this.handleSubmit,applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"actionLog.logRotationSettings.saveButton"})},errors:e},"data-type":"log-rotation-settings-drawer",children:this.getDrawerContent()})}}cU.propTypes={installation:Vt().shape({id:Vt().number.isRequired}).isRequired,onCloseLogRotationSettingsDrawer:Vt().func.isRequired,actionLogActions:Vt().shape({loadLogRotationSettings:Vt().func.isRequired,saveLogRotationSettings:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addErrorMessage:Vt().func.isRequired}).isRequired,baseClassName:Vt().string,isOpen:Vt().bool.isRequired},cU.defaultProps={baseClassName:`${gu}log-rotation-settings-drawer`};const uU=(0,so.$j)(null,(t=>({actionLogActions:nh(m,t),appActions:nh(e,t)})))(cU),dU="error",pU="warning",hU="info",mU="severity",fU="actor",gU="message",bU="dateFrom",vU="dateTo",yU=e=>!e||e.scrollHeight>e.clientHeight?e:yU(e.parentNode),_U=({onChange:e,message:t,className:n})=>{const s=Mc();return(0,L.jsx)(vn,{type:"text",placeholder:s("actionLog.list.messageColumnTitle"),size:"fill",onChange:t=>{t.persist(),e(t.target.value)},className:n,suffix:(0,L.jsx)(U.Fragment,{children:(0,L.jsx)(Ue,{ghost:!0,fill:!0,icon:"cross-mark",onClick:()=>e("")})}),value:t})};_U.propTypes={onChange:Vt().func.isRequired,message:Vt().string,className:Vt().string},_U.defaultProps={className:null,message:""};const xU=[{eventUid:$c(4),isFake:!0,datetime:"",severity:"",event:"",actor:"",message:""}];class SU extends U.Component{constructor(e){super(e),this.getListData=e=>e.map((e=>Object.assign(Object.assign({},e),{eventUid:$c(15),ref:(0,U.createRef)(),isFake:!1}))),this.getActors=e=>Array.isArray(e)?e.reduce(((e,t)=>(t.actor&&-1===e.indexOf(t.actor)&&e.push(t.actor),e)),[]):[],this.getColumns=()=>[{key:"datetime",className:`${this.props.baseClassName}__datetime-column-header`,title:(0,L.jsx)(aU,{onChangeDateFrom:e=>{const{filters:{[bU]:t,[vU]:n}}=this.state;t!==e&&this.setState((t=>({filters:Object.assign(Object.assign({},t.filters),{[bU]:e})})),(()=>this.setState({listData:this.fetchListData()}))),e||n||this.setState({dateFilterTitle:null})},onChangeDateTo:e=>{const{filters:{[bU]:t,[vU]:n}}=this.state;n!==e&&this.setState((t=>({filters:Object.assign(Object.assign({},t.filters),{[vU]:e})})),(()=>this.setState({listData:this.fetchListData()}))),e||t||this.setState({dateFilterTitle:null})},title:this.state.dateFilterTitle,onChangeTitle:e=>this.setState({dateFilterTitle:e}),filterDateFrom:this.state.filters[bU],filterDateTo:this.state.filters[vU],isVisible:this.state.isDateFilterVisible,onToggleDateFilterVisibility:this.handleToggleDateFilterVisibility}),type:"controls",render:e=>e.isFake?(0,L.jsx)(Ac,{content:"actionLog.list.noItemsFound"}):Xf().parseZone(e.datetime).local().format("YYYY-MM-DD HH:mm:ss"),sortable:!0,sort:(e,t)=>Xf().parseZone(e.datetime).isAfter(Xf().parseZone(t.datetime))?1:Xf().parseZone(e.datetime).isBefore(Xf().parseZone(t.datetime))?-1:0},{key:"severity",className:`${this.props.baseClassName}__severity-column-header`,title:(0,L.jsxs)(Ta,{placeholder:(0,L.jsx)(Ac,{content:"actionLog.list.severityColumnTitle"}),size:"sm",clearable:!0,onChange:e=>this.setState((t=>({filters:Object.assign(Object.assign({},t.filters),{[mU]:e})})),(()=>this.setState({listData:this.fetchListData()}))),value:this.state.filters.severity||null,"data-test-id":"action-log-filter-severity",children:[(0,L.jsx)(wa,{value:dU,label:dU,children:(0,L.jsx)(ye,{intent:"danger",children:dU})}),(0,L.jsx)(wa,{value:pU,label:pU,children:(0,L.jsx)(ye,{intent:"warning",children:pU})}),(0,L.jsx)(wa,{value:hU,label:hU,children:(0,L.jsx)(ye,{intent:"info",children:hU})})]}),type:"controls",render:e=>{if(!e.severity)return"";let t;switch(e.severity.toLowerCase()){case dU:t="danger";break;case pU:t="warning";break;case hU:t="info";break;default:t="inactive"}return(0,L.jsx)(ye,{className:`${this.props.baseClassName}__severity-label`,intent:t,children:e.severity},e.severity)},align:"center"},{key:"event",className:`${this.props.baseClassName}__event-column-header`,title:(0,L.jsx)(Ac,{content:"actionLog.list.eventColumnTitle"}),type:"title"},{key:"actor",className:`${this.props.baseClassName}__actor-column-header`,title:(0,L.jsx)(Ta,{placeholder:(0,L.jsx)(Ac,{content:"actionLog.list.actorColumnTitle"}),size:"md",clearable:!0,onChange:e=>this.setState((t=>({filters:Object.assign(Object.assign({},t.filters),{[fU]:e})})),(()=>this.setState({listData:this.fetchListData()}))),value:this.state.filters.actor||null,disabled:0===this.state.actors.length,"data-test-id":"action-log-filter-actor",children:this.state.actors.map((e=>(0,L.jsx)(wa,{value:e,children:e},e)))}),type:"controls",render:e=>(0,L.jsx)(Wn,{className:`${this.props.baseClassName}__actor-column`,children:e.actor})},{key:"message",className:`${this.props.baseClassName}__message-column-header`,title:(0,L.jsx)(_U,{message:this.state.filters.message?this.state.filters.message:"",className:`${this.props.baseClassName}__message-column`,onChange:e=>{this.setState((t=>({filters:Object.assign(Object.assign({},t.filters),{[gU]:e})})),(()=>this.setState({listData:this.fetchListData()})))}}),type:"controls",render:e=>(0,L.jsx)(Wn,{className:`${this.props.baseClassName}__message-column`,children:this.renderMessage(e.eventUid,e.message)})},{key:"actions",className:`${this.props.baseClassName}__actions-column-header`,type:"actions",render:e=>e.isFake||(0,L.jsx)("div",{ref:e.ref,children:(0,L.jsx)(qa,{children:this.hasFilters()&&(0,L.jsx)(za,{icon:"arrows-outward",primary:!0,onClick:()=>this.handleTransitionTo(e.ref),"data-test-id":"action-log-actions-go-to-record",children:(0,L.jsx)(Ac,{content:"actionLog.list.actions.goToRecord"})})})})}],this.handleTransitionTo=e=>{this.ref=e,this.refOffset=e.current.getBoundingClientRect().top,this.setState({filters:{}})},this.renderMessage=(e,t)=>t.length<=300?t:this.state.showFullMessage[e]?(0,L.jsxs)(U.Fragment,{children:[t," ",(0,L.jsx)(fe,{onClick:()=>this.setState((t=>({showFullMessage:Object.assign(Object.assign({},t.showFullMessage),{[e]:!1})}))),children:(0,L.jsx)(Ac,{content:"actionLog.list.messageShowLess"})})]}):(0,L.jsxs)(U.Fragment,{children:[t.substring(0,300),"... ",(0,L.jsx)(fe,{onClick:()=>this.setState((t=>({showFullMessage:Object.assign(Object.assign({},t.showFullMessage),{[e]:!0})}))),children:(0,L.jsx)(Ac,{content:"actionLog.list.messageShowMore"})})]}),this.getToolbar=()=>(0,L.jsxs)(Ss,{children:[(0,L.jsxs)(_s,{title:"Refresh",groupable:!1,children:[(0,L.jsx)(fe,{children:(0,L.jsx)(Nr,{onChange:()=>this.handleToggleAutoRefreshEnabled(),checked:this.state.isAutoRefreshEnabled,tooltip:(0,L.jsx)(Ac,{content:"actionLog.toolbar.autoRefreshSwitcher.tooltip",params:{seconds:this.props.actionLogRealTimeUpdatePeriod}})})}),(0,L.jsx)("span",{children:(0,L.jsx)(Ac,{content:"actionLog.toolbar.autoRefreshSwitcher"})}),(0,L.jsx)(Ue,{onClick:()=>this.handleRefresh(),icon:(0,L.jsx)(he,{name:"refresh",animation:this.state.isActionLogRecordsListLoading||this.state.isAutoRefreshEnabled?"spin":"none"}),children:(0,L.jsx)(Ac,{content:"actionLog.toolbar.refreshButton"})}),this.state.isAutoRefreshEnabled&&(0,L.jsx)(Ue,{onClick:()=>this.handleClearItems(),icon:"clean",children:(0,L.jsx)(Ac,{content:"actionLog.toolbar.clearButton"})})]}),(0,L.jsx)(ts,{}),(0,L.jsx)(_s,{title:"Download as file",groupable:!1,children:(0,L.jsx)(fe,{icon:"arrow-down-tray",href:`${this.props.apiUrl}/action-logs-file/id/${this.props.installation.id}`,children:(0,L.jsx)(Ac,{content:"actionLog.toolbar.linkDownloadLogFile"})})}),!tC(this.props.installation.installationType)&&(0,L.jsx)(_s,{title:"Log Rotation",groupable:!1,children:(0,L.jsx)(Ue,{onClick:()=>this.handleOpenLogRotationSettingsDrawer(),children:(0,L.jsx)(Ac,{content:"actionLog.toolbar.logRotationButton"})})})]}),this.handleToggleAutoRefreshEnabled=()=>{this.setState((e=>({isAutoRefreshEnabled:!e.isAutoRefreshEnabled})),(()=>{!0===this.state.isAutoRefreshEnabled?(this.props.actionLogActions.onEnableRealTimeUpdates(this.props.installation.id),this.handleAutoRefresh(),this.updateInterval=setInterval((()=>{this.handleAutoRefresh()}),1e3*this.props.actionLogRealTimeUpdatePeriod)):(clearInterval(this.updateInterval),this.setState({lastClearedRecord:null}))}))},this.handleToggleDateFilterVisibility=()=>this.setState((e=>({isDateFilterVisible:!e.isDateFilterVisible}))),this.loadInstanceActionLogRecords=(e=!0,t=null)=>{const{actionLogActions:{loadInstanceActionLogRecords:n},installation:{id:s},appActions:{addErrorMessage:i}}=this.props;return this.setState({isActionLogRecordsListLoading:e}),n(s,t).then((({data:e})=>{if(!e)return[];const{status:t,data:n}=e;return t===nu?n&&n.actionLogRecords?n.actionLogRecords:[]:(e.message&&i(e.message),[])})).finally((()=>{this.setState({isActionLogRecordsListLoading:!1})}))},this.handleClearItems=()=>{this.setState({lastClearedRecord:this.getLastRecord()},(()=>{this.setState({listData:this.fetchListData()})}))},this.handleOpenLogRotationSettingsDrawer=()=>this.setState({isLogRotationSettingsDrawerVisible:!0}),this.handleCloseLogRotationSettingsDrawer=()=>this.setState({isLogRotationSettingsDrawerVisible:!1}),this.hasFilters=()=>Object.values(this.state.filters).some((e=>!!e)),this.fetchListData=()=>{const{filters:e,initialListData:t,lastClearedRecord:n}=this.state;let s=[...t];if(null!==n&&(s=s.slice(s.indexOf(n)+1)),Object.keys(this.state.filters).length){const t=s.filter((({datetime:t,severity:n,actor:s,message:i,isFake:a})=>Object.keys(e).every((r=>{if(a)return!0;const o=e[r];switch(r){case mU:return void 0===o||-1!==o.indexOf(n.toLowerCase());case fU:return void 0===o||o===s;case gU:return-1!==i.toLowerCase().indexOf(o.toLowerCase());case bU:return null===o||Xf()(t).isAfter(Xf().unix(o));case vU:return null===o||Xf()(t).isBefore(Xf().unix(o))}return!0}))));return t.length?t:xU}return 0===s.length&&(s=xU),s},this.handleRefresh=(e=!0)=>{const{isAutoRefreshEnabled:t}=this.state;let n=null;const s=this.getLastRecord();null!==s&&t&&(n=s.hashSum),this.loadInstanceActionLogRecords(e,n).then((e=>{this.setState((n=>{const s=[...t?n.initialListData:[],...this.getListData(e)];return{actors:this.getActors(s),initialListData:s}}),(()=>this.setState({listData:this.fetchListData()})))}))},this.getLastRecord=()=>{const{initialListData:e}=this.state;return e.length>0?e[e.length-1]:null},this.renderLogRotationSettingsDrawer=()=>this.props.isOpen?(0,L.jsx)(uU,{isOpen:this.state.isLogRotationSettingsDrawerVisible,installation:this.props.installation,onCloseLogRotationSettingsDrawer:this.handleCloseLogRotationSettingsDrawer}):null,this.ref=null,this.refOffset=0,this.state={initialListData:null,listData:null,actors:[],isActionLogRecordsListLoading:!1,filters:{},showFullMessage:{},isAutoRefreshEnabled:!1,lastClearedRecord:null,dateFilterTitle:null,isDateFilterVisible:!1,isLogRotationSettingsDrawerVisible:!1}}componentDidMount(){this.props.isOpen&&this.handleLoadData()}componentDidUpdate(e,t){if(!e.isOpen&&this.props.isOpen&&this.handleLoadData(),e.isOpen&&!this.props.isOpen&&this.resetStateOnClose(),this.state.filters[bU]||this.state.filters[vU]||!this.state.dateFilterTitle||this.setState({dateFilterTitle:null}),this.state.filters!==t.filters&&this.state.listData&&this.state.listData===t.listData)this.setState({listData:this.fetchListData()});else if(this.ref){this.ref.current.scrollIntoView();const e=yU(this.ref.current);e&&e.scrollBy(0,this.ref.current.getBoundingClientRect().top-this.refOffset),this.ref=null}}componentWillUnmount(){clearInterval(this.updateInterval)}handleLoadData(){this.loadInstanceActionLogRecords().then((e=>{this.setState({actors:this.getActors(e),initialListData:this.getListData(e)},(()=>{this.setState({listData:this.fetchListData()})}))}))}resetStateOnClose(){this.setState({isAutoRefreshEnabled:!1})}handleAutoRefresh(){this.state.isAutoRefreshEnabled&&this.handleRefresh(!1)}render(){const{isActionLogRecordsListLoading:e,listData:t}=this.state,{installation:{url:n},onCloseActionLogDrawer:s,isOpen:i}=this.props;return(0,L.jsxs)(zi,{className:this.props.baseClassName,title:(0,L.jsx)(Ac,{content:"actionLog.drawerTitle",params:{instanceUrl:n}}),onClose:()=>s(),size:"lg",isOpen:i,"data-type":"action-log-drawer",children:[t?(0,L.jsx)(Wa,{data:t,loading:e,columns:this.getColumns(),rowKey:e=>e.eventUid,toolbar:this.getToolbar(),sortColumn:"datetime",sortDirection:"DESC"}):(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"actionLog.actionlogRecordsLoading"})}),this.renderLogRotationSettingsDrawer()]})}}SU.propTypes={installation:Vt().shape({id:Vt().number.isRequired,url:Vt().string.isRequired,installationType:Vt().string.isRequired,owner:Vt().shape({login:Vt().string.isRequired}).isRequired}).isRequired,actionLogActions:Vt().shape({loadInstanceActionLogRecords:Vt().func.isRequired,onEnableRealTimeUpdates:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addErrorMessage:Vt().func.isRequired}).isRequired,onCloseActionLogDrawer:Vt().func.isRequired,baseClassName:Vt().string,apiUrl:Vt().string.isRequired,actionLogRealTimeUpdatePeriod:Vt().number.isRequired,isOpen:Vt().bool.isRequired},SU.defaultProps={baseClassName:`${gu}action-log-drawer`};const wU=(0,so.$j)((e=>({actionLogRealTimeUpdatePeriod:e.app.options.actionLogRealTimeUpdatePeriod,apiUrl:e.app.urls.apiUrl})),(t=>({actionLogActions:nh(m,t),appActions:nh(e,t)})))(SU);class kU extends U.Component{constructor(e){super(e),this.getBackupLink=()=>{const{installation:{features:{backups:{panelBackupsAvailable:e,wptBackupsAvailable:t}}},onOpenBackupDrawer:n}=this.props;return t?(0,L.jsx)(wn,{onClick:n,children:(0,L.jsx)(Ac,{content:"reinstallCoreConfirmationDialog.backupLink"})}):e?(0,L.jsx)(SC,{installation:this.props.installation}):(0,L.jsx)(Ac,{content:"reinstallCoreConfirmationDialog.backupLink"})},this.state={}}render(){const{onCloseReinstallCoreConfirmationDialog:e,onReinstallCore:t,isOpen:n}=this.props;return(0,L.jsx)(ji,{size:"xs",isOpen:n,onClose:e,buttons:[(0,L.jsx)(Ue,{intent:"danger",onClick:()=>{t(),e()},children:(0,L.jsx)(Ac,{content:"reinstallCoreConfirmationDialog.reinstallCoreButton"})},"reinstallCoreButton")],cancelButton:{children:(0,L.jsx)(Ac,{content:"reinstallCoreConfirmationDialog.cancelButton"})},children:(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"reinstallCoreConfirmationDialog.description",params:{link:this.getBackupLink()}})})})}}kU.propTypes={installation:Vt().shape({features:Vt().shape({backups:Vt().shape({panelBackupsAvailable:Vt().bool.isRequired,wptBackupsAvailable:Vt().bool.isRequired}).isRequired}).isRequired}).isRequired,onCloseReinstallCoreConfirmationDialog:Vt().func.isRequired,onReinstallCore:Vt().func.isRequired,onOpenBackupDrawer:Vt().func.isRequired,isOpen:Vt().bool.isRequired};const jU=kU,TU=e=>()=>Dd.verifyChecksums(e),CU=e=>t=>Dd.reinstallCore(e).then((({data:n})=>(t(xp(n,(()=>t(DU(n.data.task,e))))),n))),DU=(e,t)=>n=>n({type:yS,task:e,instanceId:t}),PU=()=>e=>e({type:"checkWordPressIntegrity/INSTANCE_CORE_REINSTALLATION_FINISHED"}),IU=()=>e=>e({type:"checkWordPressIntegrity/INSTANCE_CORE_REINSTALLATION_FINISHED_WITH_ERRORS"}),OU=e=>t=>fp.getIntegrity(e).then((({data:n})=>(t({type:If,installationId:e,available:n.available}),n))).catch((e=>(t(_p(e)),Promise.reject())));class LU extends U.Component{constructor(e){super(e),this.fetchAndProcessExistingReinstallCoreBackgroundTask=(e,t)=>{const{backgroundTasksActions:{fetchBackgroundTask:n}}=this.props;n(Td.getTaskData,e,t).then((e=>{null!==e?tw(e)?this.handleOnCompleteReinstallCoreBackgroundTask(e):this.setState({reinstallCoreBackgroundTask:e,reinstallCoreBackgroundTaskId:e.id,isReinstallCoreBackgroundTaskProcessing:!0,isReinstallCoreBackgroundTaskProgressVisible:!0}):this.setState({reinstallCoreBackgroundTask:null,reinstallCoreBackgroundTaskId:null,isReinstallCoreBackgroundTaskProcessing:!1,isReinstallCoreBackgroundTaskProgressVisible:!1})}))},this.handleOnCompleteReinstallCoreBackgroundTask=()=>{this.setState({isReinstallCoreBackgroundTaskProcessing:!1})},this.handleOnReceiveReinstallCoreBackgroundTaskData=()=>{const{reinstallCoreBackgroundTaskId:e,reinstallCoreBackgroundTask:t}=this.state,{tasks:n}=this.props;if(!e)return;const s=iw(e,n);s&&t!==s&&this.setState({reinstallCoreBackgroundTask:s},(()=>{tw(s)&&this.handleOnCompleteReinstallCoreBackgroundTask()}))},this.handleCloseReinstallCoreConfirmationDialog=()=>this.setState({isReinstallCoreConfirmationDialogVisible:!1}),this.handleOpenReinstallCoreConfirmationDialog=()=>this.setState({isReinstallCoreConfirmationDialogVisible:!0}),this.handleCloseChecksumsVerificationResult=()=>this.setState({isChecksumsVerificationResultVisible:!1}),this.handleVerifyChecksums=()=>{const{checkWordPressIntegrityActions:{verifyChecksums:e},installation:{id:t}}=this.props;this.resetResults(),this.setState({isVerifyingChecksums:!0,isChecksumsVerificationResultVisible:!1}),e(t).then((({data:e})=>{const{status:t,data:n}=e;this.setState({isChecksumsVerificationResultVisible:!0,checksumsMatch:t===nu,checksumsVerificationResult:n?Object.values(n):null})})).finally((()=>{this.setState({isVerifyingChecksums:!1})}))},this.handleReinstallCore=()=>{const{isReinstallCoreBackgroundTaskProcessing:e}=this.state,{checkWordPressIntegrityActions:{reinstallCore:t},appActions:{addErrorMessage:n},installation:{id:s}}=this.props;e||(this.resetResults(),this.setState({isReinstallCoreBackgroundTaskProcessing:!0}),t(s).then((e=>{const{status:t,data:s}=e;if(t!==nu)e.message&&n(e.message);else{const{task:e}=s;if(!e)return;this.setState({reinstallCoreBackgroundTask:null,reinstallCoreBackgroundTaskId:e.id,isReinstallCoreBackgroundTaskProgressVisible:!0})}})).catch((()=>{this.setState({isReinstallCoreBackgroundTaskProcessing:!1})})))},this.resetResults=()=>{this.setState({isReinstallCoreBackgroundTaskProgressVisible:!1,isChecksumsVerificationResultVisible:!1})},this.getReinstallCoreConfirmationDialog=()=>{const{isReinstallCoreConfirmationDialogVisible:e}=this.state,{onOpenBackupDrawer:t}=this.props;return(0,L.jsx)(jU,{isOpen:e,installation:this.props.installation,onCloseReinstallCoreConfirmationDialog:this.handleCloseReinstallCoreConfirmationDialog,onReinstallCore:this.handleReinstallCore,onOpenBackupDrawer:t})},this.getChecksumsVerificationResult=()=>{const{isChecksumsVerificationResultVisible:e,checksumsMatch:t,checksumsVerificationResult:n}=this.state;return e?t?(0,L.jsx)(Rr,{intent:"success",onClose:this.handleCloseChecksumsVerificationResult,children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.successfullyVerifiedAgainstChecksums"})}):(0,L.jsxs)(Rr,{intent:"danger",onClose:this.handleCloseChecksumsVerificationResult,children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.verificationAgainstChecksumsFailedWithErrors"})}),n&&n.map((e=>(0,L.jsx)("p",{children:e},$c(5))))]}):null},this.getReinstallCoreBackgroundTaskResults=()=>{if(!this.state.reinstallCoreBackgroundTask)return null;const{reinstallCoreBackgroundTask:{publicParams:{coreReinstallationResult:e}},isReinstallCoreBackgroundTaskResultsVisible:t}=this.state,{baseClassName:n}=this.props;return(0,L.jsxs)("div",{children:[(0,L.jsx)("div",{className:`${n}__divider`}),(0,L.jsx)(kn,{level:3,children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.coreReinstallationFinishedSuccessfullyHeader"})}),t&&e?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(fe,{onClick:()=>this.setState({isReinstallCoreBackgroundTaskResultsVisible:!1}),children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.hideReinstallCoreResults"})}),(0,L.jsxs)("div",{className:`${n}__reinstall-core-results`,children:[(0,L.jsx)("p",{children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.coreReinstallationFinishedSuccessfully"})}),e.map((e=>(0,L.jsx)("p",{children:e},$c(5))))]})]}):(0,L.jsx)(U.Fragment,{children:(0,L.jsx)(fe,{onClick:()=>this.setState({isReinstallCoreBackgroundTaskResultsVisible:!0}),children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.showReinstallCoreResults"})})})]})},this.getReinstallCoreBackgroundTaskProgress=()=>{const{reinstallCoreBackgroundTask:e,isReinstallCoreBackgroundTaskProgressVisible:t}=this.state,{baseClassName:n}=this.props;if(!e)return null;if(!t)return null;if(nw(e))return this.getReinstallCoreBackgroundTaskResults();const s=gC(e);return(0,L.jsxs)("div",{children:[(0,L.jsx)("div",{className:`${n}__divider`}),(0,L.jsx)(kn,{level:3,children:e.title}),(0,L.jsx)(Yi,{children:s.map((e=>(0,L.jsx)(Ni,{title:e.title,status:e.status,progress:e.progress,statusText:e.statusText,children:e.children},$c(5))))})]})},this.state={isVerifyingChecksums:!1,checksumsMatch:!1,checksumsVerificationResult:null,isChecksumsVerificationResultVisible:!1,isReinstallCoreConfirmationDialogVisible:!1,reinstallCoreBackgroundTaskId:null,reinstallCoreBackgroundTask:null,isReinstallCoreBackgroundTaskProgressVisible:!1,isReinstallCoreBackgroundTaskResultsVisible:!1,isReinstallCoreBackgroundTaskProcessing:!1,isLoading:!0}}componentDidUpdate(e){e.tasks!==this.props.tasks&&this.handleOnReceiveReinstallCoreBackgroundTaskData(),e.isOpen!==this.props.isOpen&&this.props.isOpen&&this.props.checkWordPressIntegrityActions.getIntegrity(this.props.installation.id).then((e=>{e.tasks.reinstall&&(this.setState({reinstallCoreBackgroundTask:e.tasks.reinstall,reinstallCoreBackgroundTaskId:e.tasks.reinstall.id,isReinstallCoreBackgroundTaskProcessing:!0,isReinstallCoreBackgroundTaskProgressVisible:!0}),this.fetchAndProcessExistingReinstallCoreBackgroundTask(e.tasks.reinstall.id,e.tasks.reinstall.code))})).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))}render(){const{isLoading:e,isVerifyingChecksums:t,isReinstallCoreBackgroundTaskProcessing:n}=this.state,{onCloseCheckWordPressIntegrityDialog:s,wordPressOrgUrl:i,publicUrl:a,baseClassName:r,isOpen:o,installation:l}=this.props;return(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(ji,{title:l.title,subtitle:LL(l.url),size:"sm",banner:`${a}images/check-wordpress-integrity.png`,isOpen:o,onClose:s,buttons:[(0,L.jsx)(Ue,{className:`${r}__dialog-button`,onClick:this.handleVerifyChecksums,state:t?"loading":void 0,disabled:t||n||e,children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.verifyChecksumsButton"})},"verifyChecksumsButton"),(0,L.jsx)(Ue,{className:`${r}__dialog-button`,onClick:this.handleOpenReinstallCoreConfirmationDialog,disabled:t||n||e,children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.reinstallCoreButton"})},"reinstallCoreButton")],cancelButton:{children:n?(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.minimizeButton"}):(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.closeButton"}),className:`${r}__dialog-button`,disabled:e},children:[e&&(0,L.jsx)(It,{}),!e&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(kn,{level:3,children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.title"})}),(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.description",params:{link:(0,L.jsx)(wn,{href:i,target:"_blank",children:(0,L.jsx)(Ac,{content:"checkWordPressIntegrityDialog.wordPressOrgLink"})})}})}),this.getChecksumsVerificationResult(),this.getReinstallCoreBackgroundTaskProgress()]})]}),this.getReinstallCoreConfirmationDialog()]})}}LU.propTypes={installation:Vt().shape({id:Vt().number.isRequired,title:Vt().string.isRequired,url:Vt().string.isRequired}).isRequired,onCloseCheckWordPressIntegrityDialog:Vt().func.isRequired,onOpenBackupDrawer:Vt().func.isRequired,wordPressOrgUrl:Vt().string.isRequired,checkWordPressIntegrityActions:Vt().shape({verifyChecksums:Vt().func.isRequired,reinstallCore:Vt().func.isRequired,getIntegrity:Vt().func.isRequired}).isRequired,appActions:Vt().shape({addErrorMessage:Vt().func.isRequired}).isRequired,backgroundTasksActions:Vt().shape({fetchBackgroundTask:Vt().func.isRequired}).isRequired,tasks:Vt().array,publicUrl:Vt().string.isRequired,baseClassName:Vt().string,isOpen:Vt().bool.isRequired},LU.defaultProps={baseClassName:`${gu}check-wordpress-integrity-dialog`,tasks:[]};const MU=(0,so.$j)((e=>({wordPressOrgUrl:e.app.urls.checkWordPressIntegrityWordpressOrgUrl,tasks:e.backgroundTasks.tasks,publicUrl:e.app.urls.publicUrl})),(t=>({checkWordPressIntegrityActions:nh(f,t),appActions:nh(e,t),backgroundTasksActions:nh({fetchBackgroundTask:rw},t)})))(LU),AU=e=>{var t,n,s;const{installation:i,installation:{id:a,installationType:r,features:{updates:o}},baseClassName:l=`${gu}installation-card-status-message`,onOpenSmartPhpUpdatesDrawer:c}=e;let u=null;return(0,L.jsxs)(Rr,{intent:"warning",className:`${l}-phpWarning`,children:[(0,L.jsx)(Ac,{content:"controllers.index.detail.warningPhpReachedEndOfLife",unsafe:!0})," ",(0,L.jsx)(QA,{installation:i}),(null===(t=null==o?void 0:o.php)||void 0===t?void 0:t.available)&&(0,L.jsxs)(L.Fragment,{children:[" ",(0,L.jsx)(Ac,{content:"instancesList.issues.updatePhp.openSettingsOrTryAnother"})," ",(0,L.jsx)(zM,{installationId:a,installationType:r,applicable:!0===(null===(n=null==o?void 0:o.php)||void 0===n?void 0:n.applicable),ref:e=>u=e,children:(0,L.jsx)(wn,{onClick:(null===(s=null==o?void 0:o.php)||void 0===s?void 0:s.applicable)?c:()=>u&&u.handleTogglePopover(),children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.php.tryAnotherVersion"})})})]})]})},EU=()=>(0,L.jsx)(Rr,{intent:"warning",children:(0,L.jsx)(Ac,{content:"controllers.index.detail.outdatedInstance.description"})}),UU=e=>()=>jd.getSyncSettings(e),RU=e=>t=>t({type:eS,task:e}),NU=e=>t=>jd.syncInstance((e=>{const t=new FormData;return Object.keys(e).forEach((n=>t.append(n,`${e[n]}`))),t})(e)).then((({data:e})=>(t(xp(e,(()=>t(RU(e.data.task))))),e))),FU=Nc("sync/SYNC_FINISHED","instanceId"),YU={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},BU=function(e){function t(e,s,l,c,p){for(var h,m,f,g,_,S=0,w=0,k=0,j=0,T=0,L=0,A=f=h=0,U=0,R=0,N=0,F=0,Y=l.length,B=Y-1,H="",V="",$="",W="";U<Y;){if(m=l.charCodeAt(U),U===B&&0!==w+j+k+S&&(0!==w&&(m=47===w?10:47),j=k=S=0,Y++,B++),0===w+j+k+S){if(U===B&&(0<R&&(H=H.replace(d,"")),0<H.trim().length)){switch(m){case 32:case 9:case 59:case 13:case 10:break;default:H+=l.charAt(U)}m=59}switch(m){case 123:for(h=(H=H.trim()).charCodeAt(0),f=1,F=++U;U<Y;){switch(m=l.charCodeAt(U)){case 123:f++;break;case 125:f--;break;case 47:switch(m=l.charCodeAt(U+1)){case 42:case 47:e:{for(A=U+1;A<B;++A)switch(l.charCodeAt(A)){case 47:if(42===m&&42===l.charCodeAt(A-1)&&U+2!==A){U=A+1;break e}break;case 10:if(47===m){U=A+1;break e}}U=A}}break;case 91:m++;case 40:m++;case 34:case 39:for(;U++<B&&l.charCodeAt(U)!==m;);}if(0===f)break;U++}if(f=l.substring(F,U),0===h&&(h=(H=H.replace(u,"").trim()).charCodeAt(0)),64===h){switch(0<R&&(H=H.replace(d,"")),m=H.charCodeAt(1)){case 100:case 109:case 115:case 45:R=s;break;default:R=O}if(F=(f=t(s,R,f,m,p+1)).length,0<M&&(_=o(3,f,R=n(O,H,N),s,D,C,F,m,p,c),H=R.join(""),void 0!==_&&0===(F=(f=_.trim()).length)&&(m=0,f="")),0<F)switch(m){case 115:H=H.replace(x,r);case 100:case 109:case 45:f=H+"{"+f+"}";break;case 107:f=(H=H.replace(b,"$1 $2"))+"{"+f+"}",f=1===I||2===I&&a("@"+f,3)?"@-webkit-"+f+"@"+f:"@"+f;break;default:f=H+f,112===c&&(V+=f,f="")}else f=""}else f=t(s,n(s,H,N),f,c,p+1);$+=f,f=N=R=A=h=0,H="",m=l.charCodeAt(++U);break;case 125:case 59:if(1<(F=(H=(0<R?H.replace(d,""):H).trim()).length))switch(0===A&&(h=H.charCodeAt(0),45===h||96<h&&123>h)&&(F=(H=H.replace(" ",":")).length),0<M&&void 0!==(_=o(1,H,s,e,D,C,V.length,c,p,c))&&0===(F=(H=_.trim()).length)&&(H="\0\0"),h=H.charCodeAt(0),m=H.charCodeAt(1),h){case 0:break;case 64:if(105===m||99===m){W+=H+l.charAt(U);break}default:58!==H.charCodeAt(F-1)&&(V+=i(H,h,m,H.charCodeAt(2)))}N=R=A=h=0,H="",m=l.charCodeAt(++U)}}switch(m){case 13:case 10:47===w?w=0:0===1+h&&107!==c&&0<H.length&&(R=1,H+="\0"),0<M*E&&o(0,H,s,e,D,C,V.length,c,p,c),C=1,D++;break;case 59:case 125:if(0===w+j+k+S){C++;break}default:switch(C++,g=l.charAt(U),m){case 9:case 32:if(0===j+S+w)switch(T){case 44:case 58:case 9:case 32:g="";break;default:32!==m&&(g=" ")}break;case 0:g="\\0";break;case 12:g="\\f";break;case 11:g="\\v";break;case 38:0===j+w+S&&(R=N=1,g="\f"+g);break;case 108:if(0===j+w+S+P&&0<A)switch(U-A){case 2:112===T&&58===l.charCodeAt(U-3)&&(P=T);case 8:111===L&&(P=L)}break;case 58:0===j+w+S&&(A=U);break;case 44:0===w+k+j+S&&(R=1,g+="\r");break;case 34:case 39:0===w&&(j=j===m?0:0===j?m:j);break;case 91:0===j+w+k&&S++;break;case 93:0===j+w+k&&S--;break;case 41:0===j+w+S&&k--;break;case 40:0===j+w+S&&(0===h&&(2*T+3*L==533||(h=1)),k++);break;case 64:0===w+k+j+S+A+f&&(f=1);break;case 42:case 47:if(!(0<j+S+k))switch(w){case 0:switch(2*m+3*l.charCodeAt(U+1)){case 235:w=47;break;case 220:F=U,w=42}break;case 42:47===m&&42===T&&F+2!==U&&(33===l.charCodeAt(F+2)&&(V+=l.substring(F,U+1)),g="",w=0)}}0===w&&(H+=g)}L=T,T=m,U++}if(0<(F=V.length)){if(R=s,0<M&&void 0!==(_=o(2,V,R,e,D,C,F,c,p,c))&&0===(V=_).length)return W+V+$;if(V=R.join(",")+"{"+V+"}",0!=I*P){switch(2!==I||a(V,2)||(P=0),P){case 111:V=V.replace(y,":-moz-$1")+V;break;case 112:V=V.replace(v,"::-webkit-input-$1")+V.replace(v,"::-moz-$1")+V.replace(v,":-ms-input-$1")+V}P=0}}return W+V+$}function n(e,t,n){var i=t.trim().split(f);t=i;var a=i.length,r=e.length;switch(r){case 0:case 1:var o=0;for(e=0===r?"":e[0]+" ";o<a;++o)t[o]=s(e,t[o],n).trim();break;default:var l=o=0;for(t=[];o<a;++o)for(var c=0;c<r;++c)t[l++]=s(e[c]+" ",i[o],n).trim()}return t}function s(e,t,n){var s=t.charCodeAt(0);switch(33>s&&(s=(t=t.trim()).charCodeAt(0)),s){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function i(e,t,n,s){var r=e+";",o=2*t+3*n+4*s;if(944===o){e=r.indexOf(":",9)+1;var l=r.substring(e,r.length-1).trim();return l=r.substring(0,e).trim()+l+";",1===I||2===I&&a(l,1)?"-webkit-"+l+l:l}if(0===I||2===I&&!a(r,1))return r;switch(o){case 1015:return 97===r.charCodeAt(10)?"-webkit-"+r+r:r;case 951:return 116===r.charCodeAt(3)?"-webkit-"+r+r:r;case 963:return 110===r.charCodeAt(5)?"-webkit-"+r+r:r;case 1009:if(100!==r.charCodeAt(4))break;case 969:case 942:return"-webkit-"+r+r;case 978:return"-webkit-"+r+"-moz-"+r+r;case 1019:case 983:return"-webkit-"+r+"-moz-"+r+"-ms-"+r+r;case 883:if(45===r.charCodeAt(8))return"-webkit-"+r+r;if(0<r.indexOf("image-set(",11))return r.replace(T,"$1-webkit-$2")+r;break;case 932:if(45===r.charCodeAt(4))switch(r.charCodeAt(5)){case 103:return"-webkit-box-"+r.replace("-grow","")+"-webkit-"+r+"-ms-"+r.replace("grow","positive")+r;case 115:return"-webkit-"+r+"-ms-"+r.replace("shrink","negative")+r;case 98:return"-webkit-"+r+"-ms-"+r.replace("basis","preferred-size")+r}return"-webkit-"+r+"-ms-"+r+r;case 964:return"-webkit-"+r+"-ms-flex-"+r+r;case 1023:if(99!==r.charCodeAt(8))break;return"-webkit-box-pack"+(l=r.substring(r.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+r+"-ms-flex-pack"+l+r;case 1005:return h.test(r)?r.replace(p,":-webkit-")+r.replace(p,":-moz-")+r:r;case 1e3:switch(t=(l=r.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=r.replace(_,"tb");break;case 232:l=r.replace(_,"tb-rl");break;case 220:l=r.replace(_,"lr");break;default:return r}return"-webkit-"+r+"-ms-"+l+r;case 1017:if(-1===r.indexOf("sticky",9))break;case 975:switch(t=(r=e).length-10,o=(l=(33===r.charCodeAt(t)?r.substring(0,t):r).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:r=r.replace(l,"-webkit-"+l)+";"+r;break;case 207:case 102:r=r.replace(l,"-webkit-"+(102<o?"inline-":"")+"box")+";"+r.replace(l,"-webkit-"+l)+";"+r.replace(l,"-ms-"+l+"box")+";"+r}return r+";";case 938:if(45===r.charCodeAt(5))switch(r.charCodeAt(6)){case 105:return l=r.replace("-items",""),"-webkit-"+r+"-webkit-box-"+l+"-ms-flex-"+l+r;case 115:return"-webkit-"+r+"-ms-flex-item-"+r.replace(w,"")+r;default:return"-webkit-"+r+"-ms-flex-line-pack"+r.replace("align-content","").replace(w,"")+r}break;case 973:case 989:if(45!==r.charCodeAt(3)||122===r.charCodeAt(4))break;case 931:case 953:if(!0===j.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?i(e.replace("stretch","fill-available"),t,n,s).replace(":fill-available",":stretch"):r.replace(l,"-webkit-"+l)+r.replace(l,"-moz-"+l.replace("fill-",""))+r;break;case 962:if(r="-webkit-"+r+(102===r.charCodeAt(5)?"-ms-"+r:"")+r,211===n+s&&105===r.charCodeAt(13)&&0<r.indexOf("transform",10))return r.substring(0,r.indexOf(";",27)+1).replace(m,"$1-webkit-$2")+r}return r}function a(e,t){var n=e.indexOf(1===t?":":"{"),s=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),A(2!==t?s:s.replace(k,"$1"),n,t)}function r(e,t){var n=i(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(S," or ($1)").substring(4):"("+t+")"}function o(e,t,n,s,i,a,r,o,l,u){for(var d,p=0,h=t;p<M;++p)switch(d=L[p].call(c,e,h,n,s,i,a,r,o,l,u)){case void 0:case!1:case!0:case null:break;default:h=d}if(h!==t)return h}function l(e){return void 0!==(e=e.prefix)&&(A=null,e?"function"!=typeof e?I=1:(I=2,A=e):I=0),l}function c(e,n){var s=e;if(33>s.charCodeAt(0)&&(s=s.trim()),s=[s],0<M){var i=o(-1,n,s,s,D,C,0,0,0,0);void 0!==i&&"string"==typeof i&&(n=i)}var a=t(O,s,n,0,0);return 0<M&&void 0!==(i=o(-2,a,s,s,D,C,a.length,0,0,0))&&(a=i),P=0,C=D=1,a}var u=/^\0+/g,d=/[\0\r\f]/g,p=/: */g,h=/zoo|gra/,m=/([,: ])(transform)/g,f=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,v=/::(place)/g,y=/:(read-only)/g,_=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,S=/([\s\S]*?);/g,w=/-self|flex-/g,k=/[^]*?(:[rp][el]a[\w-]+)[^]*/,j=/stretch|:\s*\w+\-(?:conte|avail)/,T=/([^-])(image-set\()/,C=1,D=1,P=0,I=1,O=[],L=[],M=0,A=null,E=0;return c.use=function e(t){switch(t){case void 0:case null:M=L.length=0;break;default:switch(t.constructor){case Array:for(var n=0,s=t.length;n<s;++n)e(t[n]);break;case Function:L[M++]=t;break;case Boolean:E=0|!!t}}return e},c.set=l,void 0!==e&&l(e),c};var HU=r(71427),VU=r.n(HU),$U=/[A-Z]|^ms/g,WU=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return e.replace($U,"-$&").toLowerCase()})),zU=function(e,t){return null==t||"boolean"==typeof t?"":1===YU[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"},qU=function e(t){for(var n=t.length,s=0,i="";s<n;s++){var a=t[s];if(null!=a){var r=void 0;switch(typeof a){case"boolean":break;case"function":r=e([a()]);break;case"object":if(Array.isArray(a))r=e(a);else for(var o in r="",a)a[o]&&o&&(r&&(r+=" "),r+=o);break;default:r=a}r&&(i&&(i+=" "),i+=r)}}return i},GU="undefined"!=typeof document;function KU(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var XU=function(){function e(e){this.isSpeedy=!0,this.tags=[],this.ctr=0,this.opts=e}var t=e.prototype;return t.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=KU(this.opts),this.injected=!0},t.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},t.insert=function(e,t){if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else{var s=KU(this.opts);this.tags.push(s),s.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3==0&&this.tags.push(KU(this.opts))},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0,this.injected=!1},e}();var ZU=function(e,t){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===t&&(t={});var n,s,i=t.key||"css",a=VU()((function(e){n+=e,GU&&o.insert(e,c)}));void 0!==t.prefix&&(s={prefix:t.prefix});var r={registered:{},inserted:{},nonce:t.nonce,key:i},o=new XU(t);GU&&o.inject();var l=new BU(s);l.use(t.stylisPlugins)(a);var c="";function u(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":return void 0!==e.__emotion_styles?e.toString():u.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return m.call(this,e);default:var n=r.registered[e];return!1===t&&void 0!==n?n:e}}var d,p,h=new WeakMap;function m(e){if(h.has(e))return h.get(e);var t="";return Array.isArray(e)?e.forEach((function(e){t+=u.call(this,e,!1)}),this):Object.keys(e).forEach((function(n){"object"!=typeof e[n]?void 0!==r.registered[e[n]]?t+=n+"{"+r.registered[e[n]]+"}":t+=WU(n)+":"+zU(n,e[n])+";":Array.isArray(e[n])&&"string"==typeof e[n][0]&&void 0===r.registered[e[n][0]]?e[n].forEach((function(e){t+=WU(n)+":"+zU(n,e)+";"})):t+=n+"{"+u.call(this,e[n],!1)+"}"}),this),h.set(e,t),t}var f=/label:\s*([^\s;\n{]+)\s*;/g,g=function(e,t){return function(e){for(var t,n=e.length,s=n^n,i=0;n>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),s=1540483477*(65535&s)+((1540483477*(s>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),n-=4,++i;switch(n){case 3:s^=(255&e.charCodeAt(i+2))<<16;case 2:s^=(255&e.charCodeAt(i+1))<<8;case 1:s=1540483477*(65535&(s^=255&e.charCodeAt(i)))+((1540483477*(s>>>16)&65535)<<16)}return s=1540483477*(65535&(s^=s>>>13))+((1540483477*(s>>>16)&65535)<<16),((s^=s>>>15)>>>0).toString(36)}(e+t)+t},b=function(e){var t=!0,n="",s="";null==e||void 0===e.raw?(t=!1,n+=u.call(this,e,!1)):n+=e[0];for(var i=arguments.length,a=new Array(i>1?i-1:0),r=1;r<i;r++)a[r-1]=arguments[r];return a.forEach((function(s,i){n+=u.call(this,s,46===n.charCodeAt(n.length-1)),!0===t&&void 0!==e[i+1]&&(n+=e[i+1])}),this),p=n,n=n.replace(f,(function(e,t){return s+="-"+t,""})),d=g(n,s),n};function v(e,t){void 0===r.inserted[d]&&(n="",l(e,t),r.inserted[d]=n)}var y=function(){var e=b.apply(this,arguments),t=i+"-"+d;return void 0===r.registered[t]&&(r.registered[t]=p),v("."+t,e),t};function _(e,t){var n="";return t.split(" ").forEach((function(t){void 0!==r.registered[t]?e.push(t):n+=t+" "})),n}function x(e,t){var n=[],s=_(n,e);return n.length<2?e:s+y(n,t)}function S(e){r.inserted[e]=!0}if(GU){var w=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(w,(function(e){o.tags[0].parentNode.insertBefore(e,o.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(S)}))}var k={flush:function(){GU&&(o.flush(),o.inject()),r.inserted={},r.registered={}},hydrate:function(e){e.forEach(S)},cx:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return x(qU(t))},merge:x,getRegisteredStyles:_,injectGlobal:function(){var e=b.apply(this,arguments);v("",e)},keyframes:function(){var e=b.apply(this,arguments),t="animation-"+d;return v("","@keyframes "+t+"{"+e+"}"),t},css:y,sheet:o,caches:r};return e.__SECRET_EMOTION__=k,k}(void 0!==r.g?r.g:{}),JU=(ZU.flush,ZU.hydrate,ZU.cx,ZU.merge,ZU.getRegisteredStyles,ZU.injectGlobal),QU=(ZU.keyframes,ZU.css),eR=(ZU.sheet,ZU.caches,r(54087)),tR=r.n(eR),nR=r(35639),sR=r(64317);function iR(e){return iR="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},iR(e)}function aR(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rR(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function oR(e,t,n){return t&&rR(e.prototype,t),n&&rR(e,n),e}function lR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cR(){return cR=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},cR.apply(this,arguments)}function uR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},s=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),s.forEach((function(t){lR(e,t,n[t])}))}return e}function dR(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hR(e,t)}function pR(e){return pR=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pR(e)}function hR(e,t){return hR=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},hR(e,t)}function mR(e,t){if(null==e)return{};var n,s,i=function(e,t){if(null==e)return{};var n,s,i={},a=Object.keys(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)n=a[s],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function fR(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gR(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?fR(e):t}function bR(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var vR=function(){};function yR(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function _R(e,t,n,s){var i=[t,s];if(n&&e)for(var a in n)n.hasOwnProperty(a)&&n[a]&&i.push("".concat(yR(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var xR=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===iR(e)&&null!==e?[e]:[]};function SR(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function wR(e){return SR(e)?window.pageYOffset:e.scrollTop}function kR(e,t){SR(e)?window.scrollTo(0,t):e.scrollTop=t}function jR(e,t,n,s){return n*((e=e/s-1)*e*e+1)+t}function TR(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vR,i=wR(e),a=t-i,r=10,o=0;function l(){var t=jR(o+=r,i,a,n);kR(e,t),o<n?tR()(l):s(e)}l()}function CR(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function DR(e){var t=e.maxHeight,n=e.menuEl,s=e.minHeight,i=e.placement,a=e.shouldScroll,r=e.isFixedPosition,o=e.theme.spacing,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,s=/(auto|scroll)/,i=document.documentElement;if("fixed"===t.position)return i;for(var a=e;a=a.parentElement;)if(t=getComputedStyle(a),(!n||"static"!==t.position)&&s.test(t.overflow+t.overflowY+t.overflowX))return a;return i}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect().height,d=n.getBoundingClientRect(),p=d.bottom,h=d.height,m=d.top,f=n.offsetParent.getBoundingClientRect().top,g=window.innerHeight,b=wR(l),v=parseInt(getComputedStyle(n).marginBottom,10),y=parseInt(getComputedStyle(n).marginTop,10),_=f-y,x=g-m,S=_+b,w=u-b-m,k=p-g+b+v,j=b+m-y,T=160;switch(i){case"auto":case"bottom":if(x>=h)return{placement:"bottom",maxHeight:t};if(w>=h&&!r)return a&&TR(l,k,T),{placement:"bottom",maxHeight:t};if(!r&&w>=s||r&&x>=s)return a&&TR(l,k,T),{placement:"bottom",maxHeight:r?x-v:w-v};if("auto"===i||r){var C=t,D=r?_:S;return D>=s&&(C=Math.min(D-v-o.controlHeight,t)),{placement:"top",maxHeight:C}}if("bottom"===i)return kR(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(_>=h)return{placement:"top",maxHeight:t};if(S>=h&&!r)return a&&TR(l,j,T),{placement:"top",maxHeight:t};if(!r&&S>=s||r&&_>=s){var P=t;return(!r&&S>=s||r&&_>=s)&&(P=r?_-y:S-y),a&&TR(l,j,T),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}var PR=function(e){return"auto"===e?"bottom":e},IR=function(e){function t(){var e,n;aR(this,t);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return lR(fR(fR(n=gR(this,(e=pR(t)).call.apply(e,[this].concat(i))))),"state",{maxHeight:n.props.maxMenuHeight,placement:null}),lR(fR(fR(n)),"getPlacement",(function(e){var t=n.props,s=t.minMenuHeight,i=t.maxMenuHeight,a=t.menuPlacement,r=t.menuPosition,o=t.menuShouldScrollIntoView,l=t.theme,c=n.context.getPortalPlacement;if(e){var u="fixed"===r,d=DR({maxHeight:i,menuEl:e,minHeight:s,placement:a,shouldScroll:o&&!u,isFixedPosition:u,theme:l});c&&c(d),n.setState(d)}})),lR(fR(fR(n)),"getUpdatedProps",(function(){var e=n.props.menuPlacement,t=n.state.placement||PR(e);return uR({},n.props,{placement:t,maxHeight:n.state.maxHeight})})),n}return dR(t,e),oR(t,[{key:"render",value:function(){return(0,this.props.children)({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),t}(U.Component);lR(IR,"contextTypes",{getPortalPlacement:Vt().func});var OR=function(e){var t=e.theme,n=t.spacing.baseUnit;return{color:t.colors.neutral40,padding:"".concat(2*n,"px ").concat(3*n,"px"),textAlign:"center"}},LR=OR,MR=OR,AR=function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.innerProps;return U.createElement("div",cR({className:s(QU(i("noOptionsMessage",e)),{"menu-notice":!0,"menu-notice--no-options":!0},n)},a),t)};AR.defaultProps={children:"No options"};var ER=function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.innerProps;return U.createElement("div",cR({className:s(QU(i("loadingMessage",e)),{"menu-notice":!0,"menu-notice--loading":!0},n)},a),t)};ER.defaultProps={children:"Loading..."};var UR=function(e){function t(){var e,n;aR(this,t);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return lR(fR(fR(n=gR(this,(e=pR(t)).call.apply(e,[this].concat(i))))),"state",{placement:null}),lR(fR(fR(n)),"getPortalPlacement",(function(e){var t=e.placement;t!==PR(n.props.menuPlacement)&&n.setState({placement:t})})),n}return dR(t,e),oR(t,[{key:"getChildContext",value:function(){return{getPortalPlacement:this.getPortalPlacement}}},{key:"render",value:function(){var e=this.props,t=e.appendTo,n=e.children,s=e.controlElement,i=e.menuPlacement,a=e.menuPosition,r=e.getStyles,o="fixed"===a;if(!t&&!o||!s)return null;var l=this.state.placement||PR(i),c=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(s),u=o?0:window.pageYOffset,d={offset:c[l]+u,position:a,rect:c},p=U.createElement("div",{className:QU(r("menuPortal",d))},n);return t?(0,M.createPortal)(p,t):p}}]),t}(U.Component);lR(UR,"childContextTypes",{getPortalPlacement:Vt().func});var RR=Array.isArray,NR=Object.keys,FR=Object.prototype.hasOwnProperty;function YR(e,t){if(e===t)return!0;if(e&&t&&"object"==iR(e)&&"object"==iR(t)){var n,s,i,a=RR(e),r=RR(t);if(a&&r){if((s=e.length)!=t.length)return!1;for(n=s;0!=n--;)if(!YR(e[n],t[n]))return!1;return!0}if(a!=r)return!1;var o=e instanceof Date,l=t instanceof Date;if(o!=l)return!1;if(o&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,u=t instanceof RegExp;if(c!=u)return!1;if(c&&u)return e.toString()==t.toString();var d=NR(e);if((s=d.length)!==NR(t).length)return!1;for(n=s;0!=n--;)if(!FR.call(t,d[n]))return!1;for(n=s;0!=n--;)if(!("_owner"===(i=d[n])&&e.$$typeof||YR(e[i],t[i])))return!1;return!0}return e!=e&&t!=t}function BR(e,t){try{return YR(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}var HR=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],VR=function(e){for(var t=0;t<HR.length;t++)e=e.replace(HR[t].letters,HR[t].base);return e},$R=function(e){return e.replace(/^\s+|\s+$/g,"")},WR=function(e){return"".concat(e.label," ").concat(e.value)},zR=function(e){return U.createElement("span",cR({className:QU({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},qR=function(e){function t(){return aR(this,t),gR(this,pR(t).apply(this,arguments))}return dR(t,e),oR(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),n=(e.emotion,mR(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return U.createElement("input",cR({ref:t},n,{className:QU({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(U.Component),GR=function(e){function t(){return aR(this,t),gR(this,pR(t).apply(this,arguments))}return dR(t,e),oR(t,[{key:"componentDidMount",value:function(){this.props.innerRef((0,M.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(U.Component),KR=["boxSizing","height","overflow","paddingRight","position"],XR={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ZR(e){e.preventDefault()}function JR(e){e.stopPropagation()}function QR(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function eN(){return"ontouchstart"in window||navigator.maxTouchPoints}var tN=!("undefined"==typeof window||!window.document||!window.document.createElement),nN=0,sN=function(e){function t(){var e,n;aR(this,t);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return lR(fR(fR(n=gR(this,(e=pR(t)).call.apply(e,[this].concat(i))))),"originalStyles",{}),lR(fR(fR(n)),"listenerOptions",{capture:!1,passive:!1}),n}return dR(t,e),oR(t,[{key:"componentDidMount",value:function(){var e=this;if(tN){var t=this.props,n=t.accountForScrollbars,s=t.touchScrollTarget,i=document.body,a=i&&i.style;if(n&&KR.forEach((function(t){var n=a&&a[t];e.originalStyles[t]=n})),n&&nN<1){var r=parseInt(this.originalStyles.paddingRight,10)||0,o=document.body?document.body.clientWidth:0,l=window.innerWidth-o+r||0;Object.keys(XR).forEach((function(e){var t=XR[e];a&&(a[e]=t)})),a&&(a.paddingRight="".concat(l,"px"))}i&&eN()&&(i.addEventListener("touchmove",ZR,this.listenerOptions),s&&(s.addEventListener("touchstart",QR,this.listenerOptions),s.addEventListener("touchmove",JR,this.listenerOptions))),nN+=1}}},{key:"componentWillUnmount",value:function(){var e=this;if(tN){var t=this.props,n=t.accountForScrollbars,s=t.touchScrollTarget,i=document.body,a=i&&i.style;nN=Math.max(nN-1,0),n&&nN<1&&KR.forEach((function(t){var n=e.originalStyles[t];a&&(a[t]=n)})),i&&eN()&&(i.removeEventListener("touchmove",ZR,this.listenerOptions),s&&(s.removeEventListener("touchstart",QR,this.listenerOptions),s.removeEventListener("touchmove",JR,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),t}(U.Component);lR(sN,"defaultProps",{accountForScrollbars:!0});var iN=function(e){function t(){var e,n;aR(this,t);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return lR(fR(fR(n=gR(this,(e=pR(t)).call.apply(e,[this].concat(i))))),"state",{touchScrollTarget:null}),lR(fR(fR(n)),"getScrollTarget",(function(e){e!==n.state.touchScrollTarget&&n.setState({touchScrollTarget:e})})),lR(fR(fR(n)),"blurSelectInput",(function(){document.activeElement&&document.activeElement.blur()})),n}return dR(t,e),oR(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.isEnabled,s=this.state.touchScrollTarget;return n?U.createElement("div",null,U.createElement("div",{onClick:this.blurSelectInput,className:QU({position:"fixed",left:0,bottom:0,right:0,top:0})}),U.createElement(GR,{innerRef:this.getScrollTarget},t),s?U.createElement(sN,{touchScrollTarget:s}):null):t}}]),t}(U.PureComponent),aN=function(e){function t(){var e,n;aR(this,t);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return lR(fR(fR(n=gR(this,(e=pR(t)).call.apply(e,[this].concat(i))))),"isBottom",!1),lR(fR(fR(n)),"isTop",!1),lR(fR(fR(n)),"scrollTarget",void 0),lR(fR(fR(n)),"touchStart",void 0),lR(fR(fR(n)),"cancelScroll",(function(e){e.preventDefault(),e.stopPropagation()})),lR(fR(fR(n)),"handleEventDelta",(function(e,t){var s=n.props,i=s.onBottomArrive,a=s.onBottomLeave,r=s.onTopArrive,o=s.onTopLeave,l=n.scrollTarget,c=l.scrollTop,u=l.scrollHeight,d=l.clientHeight,p=n.scrollTarget,h=t>0,m=u-d-c,f=!1;m>t&&n.isBottom&&(a&&a(e),n.isBottom=!1),h&&n.isTop&&(o&&o(e),n.isTop=!1),h&&t>m?(i&&!n.isBottom&&i(e),p.scrollTop=u,f=!0,n.isBottom=!0):!h&&-t>c&&(r&&!n.isTop&&r(e),p.scrollTop=0,f=!0,n.isTop=!0),f&&n.cancelScroll(e)})),lR(fR(fR(n)),"onWheel",(function(e){n.handleEventDelta(e,e.deltaY)})),lR(fR(fR(n)),"onTouchStart",(function(e){n.touchStart=e.changedTouches[0].clientY})),lR(fR(fR(n)),"onTouchMove",(function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)})),lR(fR(fR(n)),"getScrollTarget",(function(e){n.scrollTarget=e})),n}return dR(t,e),oR(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return U.createElement(GR,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(U.Component),rN=function(e){function t(){return aR(this,t),gR(this,pR(t).apply(this,arguments))}return dR(t,e),oR(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=mR(e,["isEnabled"]);return t?U.createElement(aN,n):this.props.children}}]),t}(U.Component);lR(rN,"defaultProps",{isEnabled:!0});var oN=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,s=t.isMulti,i=t.label,a=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(a?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(i||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(s?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},lN=function(e,t){var n=t.value,s=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return"option ".concat(n,s?" is disabled. Select another option.":", selected.")}},cN=function(e){return!!e.isDisabled},uN=function(e){function t(){return aR(this,t),gR(this,pR(t).apply(this,arguments))}return dR(t,e),oR(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,s=e.cx,i=e.isMulti,a=e.getStyles,r=e.hasValue;return U.createElement("div",{className:s(QU(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":r},n)},t)}}]),t}(U.Component),dN=function(e){var t=e.size,n=mR(e,["size"]);return U.createElement("svg",cR({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:QU({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},n))},pN=function(e){return U.createElement(dN,cR({size:20},e),U.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},hN=function(e){return U.createElement(dN,cR({size:20},e),U.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},mN=function(e){var t=e.isFocused,n=e.theme,s=n.spacing.baseUnit,i=n.colors;return{label:"indicatorContainer",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*s,transition:"color 150ms",":hover":{color:t?i.neutral80:i.neutral40}}},fN=mN,gN=mN,bN="react-select-loading-indicator",vN=!1,yN=function(e){var t=e.color,n=e.delay,s=e.offset;return U.createElement("span",{className:QU({animationDuration:"1s",animationDelay:"".concat(n,"ms"),animationIterationCount:"infinite",animationName:bN,animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:s?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},_N=function(e){var t=e.className,n=e.cx,s=e.getStyles,i=e.innerProps,a=e.isFocused,r=e.isRtl,o=e.theme.colors,l=a?o.neutral80:o.neutral20;return vN||(JU("@keyframes ",bN,"{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),vN=!0),U.createElement("div",cR({},i,{className:n(QU(s("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),U.createElement(yN,{color:l,delay:0,offset:r}),U.createElement(yN,{color:l,delay:160,offset:!0}),U.createElement(yN,{color:l,delay:320,offset:!r}))};_N.defaultProps={size:4};var xN=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},SN=function(e){var t=e.children,n=e.innerProps;return U.createElement("div",n,t)},wN=SN,kN=SN,jN=function(e){function t(){return aR(this,t),gR(this,pR(t).apply(this,arguments))}return dR(t,e),oR(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return U.createElement("div",n,t||U.createElement(pN,{size:14}))}}]),t}(U.Component),TN=function(e){function t(){return aR(this,t),gR(this,pR(t).apply(this,arguments))}return dR(t,e),oR(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,s=e.components,i=e.cx,a=e.data,r=e.getStyles,o=e.innerProps,l=e.isDisabled,c=e.removeProps,u=e.selectProps,d=s.Container,p=s.Label,h=s.Remove,m=uR({className:i(QU(r("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":l},n)},o),f={className:i(QU(r("multiValueLabel",this.props)),{"multi-value__label":!0},n)},g=uR({className:i(QU(r("multiValueRemove",this.props)),{"multi-value__remove":!0},n)},c);return U.createElement(d,{data:a,innerProps:m,selectProps:u},U.createElement(p,{data:a,innerProps:f,selectProps:u},t),U.createElement(h,{data:a,innerProps:g,selectProps:u}))}}]),t}(U.Component);lR(TN,"defaultProps",{cropWithEllipsis:!0});var CN={ClearIndicator:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.innerProps;return U.createElement("div",cR({},a,{className:s(QU(i("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},n)}),t||U.createElement(pN,null))},Control:function(e){var t=e.children,n=e.cx,s=e.getStyles,i=e.className,a=e.isDisabled,r=e.isFocused,o=e.innerRef,l=e.innerProps,c=e.menuIsOpen;return U.createElement("div",cR({ref:o,className:n(QU(s("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":r,"control--menu-is-open":c},i)},l),t)},DropdownIndicator:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.innerProps;return U.createElement("div",cR({},a,{className:s(QU(i("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},n)}),t||U.createElement(hN,null))},DownChevron:hN,CrossIcon:pN,Group:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.Heading,r=e.headingProps,o=e.label,l=e.theme,c=e.selectProps;return U.createElement("div",{className:s(QU(i("group",e)),{group:!0},n)},U.createElement(a,cR({},r,{selectProps:c,theme:l,getStyles:i,cx:s}),o),U.createElement("div",null,t))},GroupHeading:function(e){var t=e.className,n=e.cx,s=e.getStyles,i=e.theme,a=(e.selectProps,mR(e,["className","cx","getStyles","theme","selectProps"]));return U.createElement("div",cR({className:n(QU(s("groupHeading",uR({theme:i},a))),{"group-heading":!0},t)},a))},IndicatorsContainer:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles;return U.createElement("div",{className:s(QU(i("indicatorsContainer",e)),{indicators:!0},n)},t)},IndicatorSeparator:function(e){var t=e.className,n=e.cx,s=e.getStyles,i=e.innerProps;return U.createElement("span",cR({},i,{className:n(QU(s("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},Input:function(e){var t=e.className,n=e.cx,s=e.getStyles,i=e.innerRef,a=e.isHidden,r=e.isDisabled,o=e.theme,l=(e.selectProps,mR(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return U.createElement("div",{className:QU(s("input",uR({theme:o},l)))},U.createElement(nR.Z,cR({className:n(null,{input:!0},t),inputRef:i,inputStyle:xN(a),disabled:r},l)))},LoadingIndicator:_N,Menu:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.innerRef,r=e.innerProps,o=s(QU(i("menu",e)),{menu:!0},n);return U.createElement("div",cR({className:o},r,{ref:a}),t)},MenuList:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.isMulti,r=e.innerRef;return U.createElement("div",{className:s(QU(i("menuList",e)),{"menu-list":!0,"menu-list--is-multi":a},n),ref:r},t)},MenuPortal:UR,LoadingMessage:ER,NoOptionsMessage:AR,MultiValue:TN,MultiValueContainer:wN,MultiValueLabel:kN,MultiValueRemove:jN,Option:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.isDisabled,r=e.isFocused,o=e.isSelected,l=e.innerRef,c=e.innerProps;return U.createElement("div",cR({ref:l,className:s(QU(i("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":r,"option--is-selected":o},n)},c),t)},Placeholder:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.innerProps;return U.createElement("div",cR({className:s(QU(i("placeholder",e)),{placeholder:!0},n)},a),t)},SelectContainer:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.innerProps,r=e.isDisabled,o=e.isRtl;return U.createElement("div",cR({className:s(QU(i("container",e)),{"--is-disabled":r,"--is-rtl":o},n)},a),t)},SingleValue:function(e){var t=e.children,n=e.className,s=e.cx,i=e.getStyles,a=e.isDisabled,r=e.innerProps;return U.createElement("div",cR({className:s(QU(i("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},n)},r),t)},ValueContainer:uN},DN=function(e){return uR({},CN,e.components)},PN={clearIndicator:gN,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},control:function(e){var t=e.isDisabled,n=e.isFocused,s=e.theme,i=s.colors,a=s.borderRadius,r=s.spacing;return{label:"control",alignItems:"center",backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?i.primary:i.neutral30}}},dropdownIndicator:fN,group:function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},groupHeading:function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e){var t=e.isDisabled,n=e.theme,s=n.spacing.baseUnit,i=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?i.neutral10:i.neutral20,marginBottom:2*s,marginTop:2*s,width:1}},input:function(e){var t=e.isDisabled,n=e.theme,s=n.spacing,i=n.colors;return{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,visibility:t?"hidden":"visible",color:i.neutral80}},loadingIndicator:function(e){var t=e.isFocused,n=e.size,s=e.theme,i=s.colors,a=s.spacing.baseUnit;return{label:"loadingIndicator",color:t?i.neutral60:i.neutral20,display:"flex",padding:2*a,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},loadingMessage:MR,menu:function(e){var t,n=e.placement,s=e.theme,i=s.borderRadius,a=s.spacing,r=s.colors;return lR(t={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(n),"100%"),lR(t,"backgroundColor",r.neutral0),lR(t,"borderRadius",i),lR(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),lR(t,"marginBottom",a.menuGutter),lR(t,"marginTop",a.menuGutter),lR(t,"position","absolute"),lR(t,"width","100%"),lR(t,"zIndex",1),t},menuList:function(e){var t=e.maxHeight,n=e.theme.spacing.baseUnit;return{maxHeight:t,overflowY:"auto",paddingBottom:n,paddingTop:n,position:"relative",WebkitOverflowScrolling:"touch"}},menuPortal:function(e){var t=e.rect,n=e.offset,s=e.position;return{left:t.left,position:s,top:n,width:t.width,zIndex:1}},multiValue:function(e){var t=e.theme,n=t.spacing,s=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:s/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},multiValueLabel:function(e){var t=e.theme,n=t.borderRadius,s=t.colors,i=e.cropWithEllipsis;return{borderRadius:n/2,color:s.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:i?"ellipsis":null,whiteSpace:"nowrap"}},multiValueRemove:function(e){var t=e.theme,n=t.spacing,s=t.borderRadius,i=t.colors;return{alignItems:"center",borderRadius:s/2,backgroundColor:e.isFocused&&i.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}}},noOptionsMessage:LR,option:function(e){var t=e.isDisabled,n=e.isFocused,s=e.isSelected,i=e.theme,a=i.spacing,r=i.colors;return{label:"option",backgroundColor:s?r.primary:n?r.primary25:"transparent",color:t?r.neutral20:s?r.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(s?r.primary:r.primary50)}}},placeholder:function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},singleValue:function(e){var t=e.isDisabled,n=e.theme,s=n.spacing,i=n.colors;return{label:"singleValue",color:t?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2,maxWidth:"calc(100% - ".concat(2*s.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},valueContainer:function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}}},IN={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},ON={backspaceRemovesValue:!0,blurInputOnSelect:CR(),captureMenuScroll:!CR(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){var n=uR({ignoreCase:!0,ignoreAccents:!0,stringify:WR,trim:!0,matchFrom:"any"},void 0),s=n.ignoreCase,i=n.ignoreAccents,a=n.stringify,r=n.trim,o=n.matchFrom,l=r?$R(t):t,c=r?$R(a(e)):a(e);return s&&(l=l.toLowerCase(),c=c.toLowerCase()),i&&(l=VR(l),c=VR(c)),"start"===o?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:cN,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},LN=1,MN=function(e){function t(e){var n;aR(this,t),lR(fR(fR(n=gR(this,pR(t).call(this,e)))),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),lR(fR(fR(n)),"blockOptionHover",!1),lR(fR(fR(n)),"isComposing",!1),lR(fR(fR(n)),"clearFocusValueOnUpdate",!1),lR(fR(fR(n)),"commonProps",void 0),lR(fR(fR(n)),"components",void 0),lR(fR(fR(n)),"hasGroups",!1),lR(fR(fR(n)),"initialTouchX",0),lR(fR(fR(n)),"initialTouchY",0),lR(fR(fR(n)),"inputIsHiddenAfterUpdate",void 0),lR(fR(fR(n)),"instancePrefix",""),lR(fR(fR(n)),"openAfterFocus",!1),lR(fR(fR(n)),"scrollToFocusedOptionOnUpdate",!1),lR(fR(fR(n)),"userIsDragging",void 0),lR(fR(fR(n)),"controlRef",null),lR(fR(fR(n)),"getControlRef",(function(e){n.controlRef=e})),lR(fR(fR(n)),"focusedOptionRef",null),lR(fR(fR(n)),"getFocusedOptionRef",(function(e){n.focusedOptionRef=e})),lR(fR(fR(n)),"menuListRef",null),lR(fR(fR(n)),"getMenuListRef",(function(e){n.menuListRef=e})),lR(fR(fR(n)),"inputRef",null),lR(fR(fR(n)),"getInputRef",(function(e){n.inputRef=e})),lR(fR(fR(n)),"cacheComponents",(function(e){n.components=DN({components:e})})),lR(fR(fR(n)),"focus",n.focusInput),lR(fR(fR(n)),"blur",n.blurInput),lR(fR(fR(n)),"onChange",(function(e,t){var s=n.props;(0,s.onChange)(e,uR({},t,{name:s.name}))})),lR(fR(fR(n)),"setValue",(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",s=arguments.length>2?arguments[2]:void 0,i=n.props,a=i.closeMenuOnSelect,r=i.isMulti;n.onInputChange("",{action:"set-value"}),a&&(n.inputIsHiddenAfterUpdate=!r,n.onMenuClose()),n.clearFocusValueOnUpdate=!0,n.onChange(e,{action:t,option:s})})),lR(fR(fR(n)),"selectOption",(function(e){var t=n.props,s=t.blurInputOnSelect,i=t.isMulti,a=n.state.selectValue;if(i)if(n.isOptionSelected(e,a)){var r=n.getOptionValue(e);n.setValue(a.filter((function(e){return n.getOptionValue(e)!==r})),"deselect-option",e),n.announceAriaLiveSelection({event:"deselect-option",context:{value:n.getOptionLabel(e)}})}else n.isOptionDisabled(e,a)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue([].concat(bR(a),[e]),"select-option",e),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));else n.isOptionDisabled(e,a)?n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e),isDisabled:!0}}):(n.setValue(e,"select-option"),n.announceAriaLiveSelection({event:"select-option",context:{value:n.getOptionLabel(e)}}));s&&n.blurInput()})),lR(fR(fR(n)),"removeValue",(function(e){var t=n.state.selectValue,s=n.getOptionValue(e);n.onChange(t.filter((function(e){return n.getOptionValue(e)!==s})),{action:"remove-value",removedValue:e}),n.announceAriaLiveSelection({event:"remove-value",context:{value:e?n.getOptionLabel(e):""}}),n.focusInput()})),lR(fR(fR(n)),"clearValue",(function(){var e=n.props.isMulti;n.onChange(e?[]:null,{action:"clear"})})),lR(fR(fR(n)),"popValue",(function(){var e=n.state.selectValue,t=e[e.length-1];n.announceAriaLiveSelection({event:"pop-value",context:{value:t?n.getOptionLabel(t):""}}),n.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})})),lR(fR(fR(n)),"getOptionLabel",(function(e){return n.props.getOptionLabel(e)})),lR(fR(fR(n)),"getOptionValue",(function(e){return n.props.getOptionValue(e)})),lR(fR(fR(n)),"getStyles",(function(e,t){var s=PN[e](t);s.boxSizing="border-box";var i=n.props.styles[e];return i?i(s,t):s})),lR(fR(fR(n)),"getElementId",(function(e){return"".concat(n.instancePrefix,"-").concat(e)})),lR(fR(fR(n)),"getActiveDescendentId",(function(){var e=n.props.menuIsOpen,t=n.state,s=t.menuOptions,i=t.focusedOption;if(i&&e){var a=s.focusable.indexOf(i),r=s.render[a];return r&&r.key}})),lR(fR(fR(n)),"announceAriaLiveSelection",(function(e){var t=e.event,s=e.context;n.setState({ariaLiveSelection:lN(t,s)})})),lR(fR(fR(n)),"announceAriaLiveContext",(function(e){var t=e.event,s=e.context;n.setState({ariaLiveContext:oN(t,uR({},s,{label:n.props["aria-label"]}))})})),lR(fR(fR(n)),"onMenuMouseDown",(function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),n.focusInput())})),lR(fR(fR(n)),"onMenuMouseMove",(function(e){n.blockOptionHover=!1})),lR(fR(fR(n)),"onControlMouseDown",(function(e){var t=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?"INPUT"!==e.target.tagName&&n.onMenuClose():t&&n.openMenu("first"):(t&&(n.openAfterFocus=!0),n.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()})),lR(fR(fR(n)),"onDropdownIndicatorMouseDown",(function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||n.props.isDisabled)){var t=n.props,s=t.isMulti,i=t.menuIsOpen;n.focusInput(),i?(n.inputIsHiddenAfterUpdate=!s,n.onMenuClose()):n.openMenu("first"),e.preventDefault(),e.stopPropagation()}})),lR(fR(fR(n)),"onClearIndicatorMouseDown",(function(e){e&&"mousedown"===e.type&&0!==e.button||(n.clearValue(),e.stopPropagation(),n.openAfterFocus=!1,setTimeout((function(){return n.focusInput()})))})),lR(fR(fR(n)),"onScroll",(function(e){"boolean"==typeof n.props.closeMenuOnScroll?e.target instanceof HTMLElement&&SR(e.target)&&n.props.onMenuClose():"function"==typeof n.props.closeMenuOnScroll&&n.props.closeMenuOnScroll(e)&&n.props.onMenuClose()})),lR(fR(fR(n)),"onCompositionStart",(function(){n.isComposing=!0})),lR(fR(fR(n)),"onCompositionEnd",(function(){n.isComposing=!1})),lR(fR(fR(n)),"onTouchStart",(function(e){var t=e.touches.item(0);t&&(n.initialTouchX=t.clientX,n.initialTouchY=t.clientY,n.userIsDragging=!1)})),lR(fR(fR(n)),"onTouchMove",(function(e){var t=e.touches.item(0);if(t){var s=Math.abs(t.clientX-n.initialTouchX),i=Math.abs(t.clientY-n.initialTouchY);n.userIsDragging=s>5||i>5}})),lR(fR(fR(n)),"onTouchEnd",(function(e){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(e.target)&&n.menuListRef&&!n.menuListRef.contains(e.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)})),lR(fR(fR(n)),"onControlTouchEnd",(function(e){n.userIsDragging||n.onControlMouseDown(e)})),lR(fR(fR(n)),"onClearIndicatorTouchEnd",(function(e){n.userIsDragging||n.onClearIndicatorMouseDown(e)})),lR(fR(fR(n)),"onDropdownIndicatorTouchEnd",(function(e){n.userIsDragging||n.onDropdownIndicatorMouseDown(e)})),lR(fR(fR(n)),"handleInputChange",(function(e){var t=e.currentTarget.value;n.inputIsHiddenAfterUpdate=!1,n.onInputChange(t,{action:"input-change"}),n.onMenuOpen()})),lR(fR(fR(n)),"onInputFocus",(function(e){var t=n.props,s=t.isSearchable,i=t.isMulti;n.props.onFocus&&n.props.onFocus(e),n.inputIsHiddenAfterUpdate=!1,n.announceAriaLiveContext({event:"input",context:{isSearchable:s,isMulti:i}}),n.setState({isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1})),lR(fR(fR(n)),"onInputBlur",(function(e){n.menuListRef&&n.menuListRef.contains(document.activeElement)?n.inputRef.focus():(n.props.onBlur&&n.props.onBlur(e),n.onInputChange("",{action:"input-blur"}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1}))})),lR(fR(fR(n)),"onOptionHover",(function(e){n.blockOptionHover||n.state.focusedOption===e||n.setState({focusedOption:e})})),lR(fR(fR(n)),"shouldHideSelectedOptions",(function(){var e=n.props,t=e.hideSelectedOptions,s=e.isMulti;return void 0===t?s:t})),lR(fR(fR(n)),"onKeyDown",(function(e){var t=n.props,s=t.isMulti,i=t.backspaceRemovesValue,a=t.escapeClearsValue,r=t.inputValue,o=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,h=n.state,m=h.focusedOption,f=h.focusedValue,g=h.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(n.blockOptionHover=!0,e.key){case"ArrowLeft":if(!s||r)return;n.focusValue("previous");break;case"ArrowRight":if(!s||r)return;n.focusValue("next");break;case"Delete":case"Backspace":if(r)return;if(f)n.removeValue(f);else{if(!i)return;s?n.popValue():o&&n.clearValue()}break;case"Tab":if(n.isComposing)return;if(e.shiftKey||!c||!d||!m||p&&n.isOptionSelected(m,g))return;n.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(n.isComposing)return;n.selectOption(m);break}return;case"Escape":c?(n.inputIsHiddenAfterUpdate=!1,n.onInputChange("",{action:"menu-close"}),n.onMenuClose()):o&&a&&n.clearValue();break;case" ":if(r)return;if(!c){n.openMenu("first");break}if(!m)return;n.selectOption(m);break;case"ArrowUp":c?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":c?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!c)return;n.focusOption("pageup");break;case"PageDown":if(!c)return;n.focusOption("pagedown");break;case"Home":if(!c)return;n.focusOption("first");break;case"End":if(!c)return;n.focusOption("last");break;default:return}e.preventDefault()}}));var s=e.value;n.cacheComponents=Ma(n.cacheComponents,BR).bind(fR(fR(n))),n.cacheComponents(e.components),n.instancePrefix="react-select-"+(n.props.instanceId||++LN);var i=xR(s),a=n.buildMenuOptions(e,i);return n.state.menuOptions=a,n.state.selectValue=i,n}return dR(t,e),oR(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,s=t.value,i=t.inputValue;if(this.cacheComponents(e.components),e.value!==s||e.options!==n||e.inputValue!==i){var a=xR(e.value),r=this.buildMenuOptions(e,a),o=this.getNextFocusedValue(a),l=this.getNextFocusedOption(r.focusable);this.setState({menuOptions:r,selectValue:a,focusedOption:l,focusedValue:o})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t,n,s,i,a,r=this.props,o=r.isDisabled,l=r.menuIsOpen,c=this.state.isFocused;(c&&!o&&e.isDisabled||c&&l&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(t=this.menuListRef,n=this.focusedOptionRef,s=t.getBoundingClientRect(),i=n.getBoundingClientRect(),a=n.offsetHeight/3,i.bottom+a>s.bottom?kR(t,Math.min(n.offsetTop+n.clientHeight-t.offsetHeight+a,t.scrollHeight)):i.top-a<s.top&&kR(t,Math.max(n.offsetTop-a,0))),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,s=t.selectValue,i=t.isFocused,a=this.props.isMulti,r="first"===e?0:n.focusable.length-1;if(!a){var o=n.focusable.indexOf(s[0]);o>-1&&(r=o)}this.scrollToFocusedOptionOnUpdate=!(i&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[r]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,s=t.isSearchable,i=this.state,a=i.selectValue,r=i.focusedValue;if(n){this.setState({focusedOption:null});var o=a.indexOf(r);r||(o=-1,this.announceAriaLiveContext({event:"value"}));var l=a.length-1,c=-1;if(a.length){switch(e){case"previous":c=0===o?0:-1===o?l:o-1;break;case"next":o>-1&&o<l&&(c=o+1)}-1===c&&this.announceAriaLiveContext({event:"input",context:{isSearchable:s,isMulti:n}}),this.setState({inputIsHidden:-1!==c,focusedValue:a[c]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,s=n.focusedOption,i=n.menuOptions,a=i.focusable;if(a.length){var r=0,o=a.indexOf(s);s||(o=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?r=o>0?o-1:a.length-1:"down"===e?r=(o+1)%a.length:"pageup"===e?(r=o-t)<0&&(r=0):"pagedown"===e?(r=o+t)>a.length-1&&(r=a.length-1):"last"===e&&(r=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[r],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:cN(a[r])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(IN):uR({},IN,this.props.theme):IN}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,s=this.selectOption,i=this.props,a=i.classNamePrefix,r=i.isMulti,o=i.isRtl,l=i.options,c=this.state.selectValue,u=this.hasValue();return{cx:_R.bind(null,a),clearValue:e,getStyles:t,getValue:function(){return c},hasValue:u,isMulti:r,isRtl:o,options:l,selectOption:s,setValue:n,selectProps:i,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,s=t.selectValue.indexOf(n);if(s>-1){if(e.indexOf(n)>-1)return n;if(s<e.length)return e[s]}return null}},{key:"getNextFocusedOption",value:function(e){var t=this.state.focusedOption;return t&&e.indexOf(t)>-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var s=this.getOptionValue(e);return t.some((function(e){return n.getOptionValue(e)===s}))}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:s})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,s=e.inputValue,i=void 0===s?"":s,a=e.options,r=function(e,s){var a=n.isOptionDisabled(e,t),r=n.isOptionSelected(e,t),o=n.getOptionLabel(e),l=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&r||!n.filterOption({label:o,value:l,data:e},i))){var c=a?void 0:function(){return n.onOptionHover(e)},u=a?void 0:function(){return n.selectOption(e)},d="".concat(n.getElementId("option"),"-").concat(s);return{innerProps:{id:d,onClick:u,onMouseMove:c,onMouseOver:c,tabIndex:-1},data:e,isDisabled:a,isSelected:r,key:d,label:o,type:"option",value:l}}};return a.reduce((function(e,t,s){if(t.options){n.hasGroups||(n.hasGroups=!0);var i=t.options.map((function(t,n){var i=r(t,"".concat(s,"-").concat(n));return i&&e.focusable.push(t),i})).filter(Boolean);if(i.length){var a="".concat(n.getElementId("group"),"-").concat(s);e.render.push({type:"group",key:a,data:t,options:i})}}else{var o=r(t,"".concat(s));o&&(e.render.push(o),e.focusable.push(t))}return e}),{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,s=e.focusedValue,i=e.focusedOption,a=this.props,r=a.options,o=a.menuIsOpen,l=a.inputValue,c=a.screenReaderStatus,u=s?function(e){var t=e.focusedValue,n=e.selectValue;return"value ".concat((0,e.getOptionLabel)(t)," focused, ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedValue:s,getOptionLabel:this.getOptionLabel,selectValue:n}):"",d=i&&o?function(e){var t=e.focusedOption,n=e.options;return"option ".concat((0,e.getOptionLabel)(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(n.indexOf(t)+1," of ").concat(n.length,".")}({focusedOption:i,getOptionLabel:this.getOptionLabel,options:r}):"",p=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")}({inputValue:l,screenReaderMessage:c({count:this.countOptions()})});return"".concat(u," ").concat(d," ").concat(p," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,s=e.inputId,i=e.inputValue,a=e.tabIndex,r=this.components.Input,o=this.state.inputIsHidden,l=s||this.getElementId("input");if(!n)return U.createElement(qR,{id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:vR,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:a,value:""});var c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},u=this.commonProps,d=u.cx,p=u.theme,h=u.selectProps;return U.createElement(r,cR({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:d,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:o,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:a,theme:p,type:"text",value:i},c))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,s=t.MultiValueContainer,i=t.MultiValueLabel,a=t.MultiValueRemove,r=t.SingleValue,o=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,p=c.isMulti,h=c.inputValue,m=c.placeholder,f=this.state,g=f.selectValue,b=f.focusedValue,v=f.isFocused;if(!this.hasValue()||!u)return h?null:U.createElement(o,cR({},l,{key:"placeholder",isDisabled:d,isFocused:v}),m);if(p){var y=g.map((function(t){var r=t===b;return U.createElement(n,cR({},l,{components:{Container:s,Label:i,Remove:a},isFocused:r,isDisabled:d,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))}));return y}if(h)return null;var _=g[0];return U.createElement(r,cR({},l,{data:_,isDisabled:d}),this.formatOptionLabel(_,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,s=n.isDisabled,i=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||s||!this.hasValue()||i)return null;var r={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return U.createElement(e,cR({},t,{innerProps:r,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,s=n.isDisabled,i=n.isLoading,a=this.state.isFocused;return e&&i?U.createElement(e,cR({},t,{innerProps:{"aria-hidden":"true"},isDisabled:s,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var s=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return U.createElement(n,cR({},s,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,s=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return U.createElement(e,cR({},t,{innerProps:i,isDisabled:n,isFocused:s}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,s=t.GroupHeading,i=t.Menu,a=t.MenuList,r=t.MenuPortal,o=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state,p=d.focusedOption,h=d.menuOptions,m=this.props,f=m.captureMenuScroll,g=m.inputValue,b=m.isLoading,v=m.loadingMessage,y=m.minMenuHeight,_=m.maxMenuHeight,x=m.menuIsOpen,S=m.menuPlacement,w=m.menuPosition,k=m.menuPortalTarget,j=m.menuShouldBlockScroll,T=m.menuShouldScrollIntoView,C=m.noOptionsMessage,D=m.onMenuScrollToTop,P=m.onMenuScrollToBottom;if(!x)return null;var I,O=function(t){var n=p===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,U.createElement(c,cR({},u,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())I=h.render.map((function(t){if("group"===t.type){t.type;var i=mR(t,["type"]),a="".concat(t.key,"-heading");return U.createElement(n,cR({},u,i,{Heading:s,headingProps:{id:a},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return O(e)})))}if("option"===t.type)return O(t)}));else if(b){var L=v({inputValue:g});if(null===L)return null;I=U.createElement(o,u,L)}else{var M=C({inputValue:g});if(null===M)return null;I=U.createElement(l,u,M)}var A={minMenuHeight:y,maxMenuHeight:_,menuPlacement:S,menuPosition:w,menuShouldScrollIntoView:T},E=U.createElement(IR,cR({},u,A),(function(t){var n=t.ref,s=t.placerProps,r=s.placement,o=s.maxHeight;return U.createElement(i,cR({},u,A,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:r}),U.createElement(rN,{isEnabled:f,onTopArrive:D,onBottomArrive:P},U.createElement(iN,{isEnabled:j},U.createElement(a,cR({},u,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:o}),I))))}));return k||"fixed"===w?U.createElement(r,cR({},u,{appendTo:k,controlElement:this.controlRef,menuPlacement:S,menuPosition:w}),E):E}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,s=t.isDisabled,i=t.isMulti,a=t.name,r=this.state.selectValue;if(a&&!s){if(i){if(n){var o=r.map((function(t){return e.getOptionValue(t)})).join(n);return U.createElement("input",{name:a,type:"hidden",value:o})}var l=r.length>0?r.map((function(t,n){return U.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):U.createElement("input",{name:a,type:"hidden"});return U.createElement("div",null,l)}var c=r[0]?this.getOptionValue(r[0]):"";return U.createElement("input",{name:a,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?U.createElement(zR,{"aria-live":"assertive"},U.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),U.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,s=e.SelectContainer,i=e.ValueContainer,a=this.props,r=a.className,o=a.id,l=a.isDisabled,c=a.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return U.createElement(s,cR({},d,{className:r,innerProps:{id:o,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),U.createElement(t,cR({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),U.createElement(i,cR({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),U.createElement(n,cR({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(U.Component);lR(MN,"defaultProps",ON);var AN={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},EN=function(e){var t,n;return n=t=function(t){function n(){var e,t;aR(this,n);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return lR(fR(fR(t=gR(this,(e=pR(n)).call.apply(e,[this].concat(i))))),"select",void 0),lR(fR(fR(t)),"state",{inputValue:void 0!==t.props.inputValue?t.props.inputValue:t.props.defaultInputValue,menuIsOpen:void 0!==t.props.menuIsOpen?t.props.menuIsOpen:t.props.defaultMenuIsOpen,value:void 0!==t.props.value?t.props.value:t.props.defaultValue}),lR(fR(fR(t)),"onChange",(function(e,n){t.callProp("onChange",e,n),t.setState({value:e})})),lR(fR(fR(t)),"onInputChange",(function(e,n){var s=t.callProp("onInputChange",e,n);t.setState({inputValue:void 0!==s?s:e})})),lR(fR(fR(t)),"onMenuOpen",(function(){t.callProp("onMenuOpen"),t.setState({menuIsOpen:!0})})),lR(fR(fR(t)),"onMenuClose",(function(){t.callProp("onMenuClose"),t.setState({menuIsOpen:!1})})),t}return dR(n,t),oR(n,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(e){return void 0!==this.props[e]?this.props[e]:this.state[e]}},{key:"callProp",value:function(e){if("function"==typeof this.props[e]){for(var t,n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];return(t=this.props)[e].apply(t,s)}}},{key:"render",value:function(){var t=this,n=this.props,s=(n.defaultInputValue,n.defaultMenuIsOpen,n.defaultValue,mR(n,["defaultInputValue","defaultMenuIsOpen","defaultValue"]));return U.createElement(e,cR({},s,{ref:function(e){t.select=e},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),n}(U.Component),lR(t,"defaultProps",AN),n},UN={cacheOptions:!1,defaultOptions:!1,filterOption:null},RN=function(e){var t,n;return n=t=function(t){function n(e){var t;return aR(this,n),lR(fR(fR(t=gR(this,pR(n).call(this)))),"select",void 0),lR(fR(fR(t)),"lastRequest",void 0),lR(fR(fR(t)),"mounted",!1),lR(fR(fR(t)),"optionsCache",{}),lR(fR(fR(t)),"handleInputChange",(function(e,n){var s=t.props,i=s.cacheOptions,a=function(e,t,n){if(n){var s=n(e,t);if("string"==typeof s)return s}return e}(e,n,s.onInputChange);if(!a)return delete t.lastRequest,void t.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});if(i&&t.optionsCache[a])t.setState({inputValue:a,loadedInputValue:a,loadedOptions:t.optionsCache[a],isLoading:!1,passEmptyOptions:!1});else{var r=t.lastRequest={};t.setState({inputValue:a,isLoading:!0,passEmptyOptions:!t.state.loadedInputValue},(function(){t.loadOptions(a,(function(e){t.mounted&&(e&&(t.optionsCache[a]=e),r===t.lastRequest&&(delete t.lastRequest,t.setState({isLoading:!1,loadedInputValue:a,loadedOptions:e||[],passEmptyOptions:!1})))}))}))}return a})),t.state={defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0,inputValue:void 0!==e.inputValue?e.inputValue:"",isLoading:!0===e.defaultOptions,loadedOptions:[],passEmptyOptions:!1},t}return dR(n,t),oR(n,[{key:"componentDidMount",value:function(){var e=this;this.mounted=!0;var t=this.props.defaultOptions,n=this.state.inputValue;!0===t&&this.loadOptions(n,(function(t){if(e.mounted){var n=!!e.lastRequest;e.setState({defaultOptions:t||[],isLoading:n})}}))}},{key:"componentWillReceiveProps",value:function(e){e.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),e.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(e.defaultOptions)?e.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(e,t){var n=this.props.loadOptions;if(!n)return t();var s=n(e,t);s&&"function"==typeof s.then&&s.then(t,(function(){return t()}))}},{key:"render",value:function(){var t=this,n=this.props,s=(n.loadOptions,mR(n,["loadOptions"])),i=this.state,a=i.defaultOptions,r=i.inputValue,o=i.isLoading,l=i.loadedInputValue,c=i.loadedOptions,u=i.passEmptyOptions?[]:r&&l?c:a||[];return U.createElement(e,cR({},s,{ref:function(e){t.select=e},options:u,isLoading:o,onInputChange:this.handleInputChange}))}}]),n}(U.Component),lR(t,"defaultProps",UN),n},NN=(RN(EN(MN)),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),s=String(t.value).toLowerCase(),i=String(t.label).toLowerCase();return s===n||i===n}),FN=uR({allowCreateWhileLoading:!1,createOptionPosition:"last"},{formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some((function(t){return NN(e,t)}))||n.some((function(t){return NN(e,t)})))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}}),YN=function(e){var t,n;return n=t=function(t){function n(e){var t;aR(this,n),lR(fR(fR(t=gR(this,pR(n).call(this,e)))),"select",void 0),lR(fR(fR(t)),"onChange",(function(e,n){var s=t.props,i=s.getNewOptionData,a=s.inputValue,r=s.isMulti,o=s.onChange,l=s.onCreateOption,c=s.value;if("select-option"!==n.action)return o(e,n);var u=t.state.newOption,d=Array.isArray(e)?e:[e];if(d[d.length-1]!==u)o(e,n);else if(l)l(a);else{var p=i(a,a);o(r?[].concat(bR(xR(c)),[p]):p,{action:"create-option"})}}));var s=e.options||[];return t.state={newOption:void 0,options:s},t}return dR(n,t),oR(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,s=e.formatCreateLabel,i=e.getNewOptionData,a=e.inputValue,r=e.isLoading,o=e.isValidNewOption,l=e.value,c=e.options||[],u=this.state.newOption;u=o(a,xR(l),c)?i(a,s(a)):void 0,this.setState({newOption:u,options:!t&&r||!u?c:"first"===n?[u].concat(bR(c)):[].concat(bR(c),[u])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=cR({},this.props),s=this.state.options;return U.createElement(e,cR({},n,{ref:function(e){t.select=e},options:s,onChange:this.onChange}))}}]),n}(U.Component),lR(t,"defaultProps",FN),n},BN=(EN(YN(MN)),RN(EN(YN(MN))),function(e){return function(t){t.in,t.onExited,t.appear,t.enter,t.exit;var n=mR(t,["in","onExited","appear","enter","exit"]);return U.createElement(e,n)}}),HN=function(e){var t=e.component,n=e.duration,s=void 0===n?1:n,i=e.in,a=(e.onExited,mR(e,["component","duration","in","onExited"])),r={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(s,"ms")},exiting:{opacity:0},exited:{opacity:0}};return U.createElement(sR.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:i,timeout:s},(function(e){var n={style:uR({},r[e])};return U.createElement(t,cR({innerProps:n},a))}))},VN=function(e){function t(){var e,n;aR(this,t);for(var s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return lR(fR(fR(n=gR(this,(e=pR(t)).call.apply(e,[this].concat(i))))),"duration",260),lR(fR(fR(n)),"rafID",void 0),lR(fR(fR(n)),"state",{width:"auto"}),lR(fR(fR(n)),"transition",{exiting:{width:0,transition:"width ".concat(n.duration,"ms ease-out")},exited:{width:0}}),lR(fR(fR(n)),"getWidth",(function(e){e&&isNaN(n.state.width)&&(n.rafID=window.requestAnimationFrame((function(){var t=e.getBoundingClientRect().width;n.setState({width:t})})))})),lR(fR(fR(n)),"getStyle",(function(e){return{overflow:"hidden",whiteSpace:"nowrap",width:e}})),lR(fR(fR(n)),"getTransition",(function(e){return n.transition[e]})),n}return dR(t,e),oR(t,[{key:"componentWillUnmount",value:function(){this.rafID&&window.cancelAnimationFrame(this.rafID)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,s=t.in,i=this.state.width;return U.createElement(sR.Transition,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:s,timeout:this.duration},(function(t){var s=uR({},e.getStyle(i),e.getTransition(t));return U.createElement("div",{ref:e.getWidth,style:s},n)}))}}]),t}(U.Component),$N=function(e){return function(t){var n=t.in,s=t.onExited,i=mR(t,["in","onExited"]);return U.createElement(VN,{in:n,onExited:s},U.createElement(e,cR({cropWithEllipsis:n},i)))}},WN=function(e){return function(t){return U.createElement(HN,cR({component:e,duration:t.isMulti?260:1},t))}},zN=function(e){return function(t){return U.createElement(HN,cR({component:e},t))}},qN=function(e){return function(t){return U.createElement(sR.TransitionGroup,cR({component:e},t))}},GN=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=DN({components:e}),n=t.Input,s=t.MultiValue,i=t.Placeholder,a=t.SingleValue,r=t.ValueContainer,o=mR(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return uR({Input:BN(n),MultiValue:$N(s),Placeholder:WN(i),SingleValue:zN(a),ValueContainer:qN(r)},o)},KN=GN();KN.Input,KN.MultiValue,KN.Placeholder,KN.SingleValue,KN.ValueContainer,Ma(GN,BR);const XN=EN(MN),ZN={container:e=>Object.assign(Object.assign({},e),{width:"100%",maxWidth:"250px",display:"inline-block",verticalAlign:"middle"}),input:e=>Object.assign(Object.assign({},e),{margin:0,padding:0,"& input":{boxSizing:"border-box"}}),valueContainer:e=>Object.assign(Object.assign({},e),{padding:0}),singleValue:e=>Object.assign(Object.assign({},e),{marginRight:0,marginLeft:0,padding:"3px 0 4px"}),control:(e,{isFocused:t})=>Object.assign(Object.assign({},e),{height:"26px",minHeight:"26px",maxWidth:"100%",padding:"0 6px",borderStyle:"solid",borderColor:t?"#0f7faf":"#afbac1","&:hover":{borderColor:t?"#0f7faf":"#afbac1"},borderRadius:0,borderWidth:"0 0 1px",backgroundColor:t?"#ecf5f9":"#ededed",color:"#020202",outline:0,boxShadow:"none"}),indicatorSeparator:e=>Object.assign(Object.assign({},e),{display:"none"}),dropdownIndicator:e=>Object.assign(Object.assign({},e),{color:"#020202",padding:0,"&::before":{content:'""',display:"inline-block",width:0,height:0,marginLeft:"6px",borderTop:"4px solid currentColor",borderRight:"4px solid transparent",borderLeft:"4px solid transparent"},"& > svg":{display:"none"}}),menu:e=>Object.assign(Object.assign({},e),{backgroundColor:"#dedede",borderRadius:0,marginTop:"3px",marginBottom:"3px",padding:0,border:"none",boxShadow:"none"}),menuList:e=>Object.assign(Object.assign({},e),{padding:"5px 0"}),option:(e,{isFocused:t})=>Object.assign(Object.assign({},e),{backgroundColor:t?"#5aadd1":"#dedede",color:t?"#fff":"#373737",padding:"7px 10px",cursor:"pointer"})},JN="selected";class QN extends U.Component{constructor(e){super(e),this.componentDidMount=()=>{this.updateSelectAll()},this.handleSearch=e=>this.setState({search:e},this.setShowedTables),this.handleFilter=e=>this.setState({filter:e},this.setShowedTables),this.applySearch=(e=null)=>{const{search:t}=this.state,n=t.toLowerCase();return e||({tables:e}=this.state),e.filter((e=>!n||-1!==e.title.toLowerCase().indexOf(n)))},this.applyFilter=()=>{const{tables:e,selectedTables:t,filter:n}=this.state;return e.filter((e=>n!==JN||t[e.id]))},this.setShowedTables=()=>{const e=this.applyFilter(),t=this.applySearch(e);this.setState({showedTables:t},this.updateSelectAll)},this.updateSelectAll=()=>{const{showedTables:e}=this.state,t=this.getSelectedTablesIds();this.setState({isSelectAll:e.length&&e.every((e=>-1!==t.indexOf(e.id)))})},this.getSelectedTablesIds=()=>Object.keys(this.state.selectedTables).filter((e=>this.state.selectedTables[e])),this.handleSelectTable=(e,t)=>this.setState((n=>{const s=Object.assign({},n.selectedTables);return s[e]=t,{selectedTables:s}}),this.setShowedTables),this.handleSelectAll=e=>this.setState((t=>({isSelectAll:e,selectedTables:t.showedTables.reduce(((t,n)=>(t[n.id]=e,t)),{})})),this.setShowedTables),this.handleSubmit=()=>{const{selectedTables:e}=this.state,{onClose:t,setSelectedTables:n}=this.props;n(e),t()},this.renderTablesList=()=>{const{selectedTables:e,showedTables:t,isSelectAll:n}=this.state,{baseClassName:s}=this.props;return t.length?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)("div",{className:`${s}__separator`}),(0,L.jsx)("div",{className:`${s}__select-all`,children:(0,L.jsx)(it,{onChange:this.handleSelectAll,checked:n,"data-test-id":"available-tables-all",children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTables.selectAll"})})}),t.map((t=>(0,L.jsx)("div",{className:`${s}__table-item`,children:(0,L.jsx)(it,{checked:e[t.id],onChange:e=>this.handleSelectTable(t.id,e),"data-test-id":`available-table-checkbox-${t.title.toLowerCase()}`,children:t.title})},t.id)))]}):(0,L.jsx)("div",{className:"wpt-mgt-15",children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTables.noItems"})})},this.state={isSelectAll:!1,filter:"all",search:"",tables:e.tables,showedTables:e.tables,selectedTables:e.selectedTables}}render(){const{filter:e,tables:t}=this.state,{baseClassName:n,onClose:s}=this.props,i=this.getSelectedTablesIds().length;return(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTables.drawerTitle"}),subtitle:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTables.drawerSubTitle"}),backButton:!0,isOpen:!0,onClose:s,size:"sm","data-type":"instance-sync-db-tables",form:{className:n,onSubmit:this.handleSubmit,hideRequiredLegend:!0,vertical:!0,applyButton:!1,cancelButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTables.selectButton"}),disabled:0===i,"data-test-id":"confirm-select-button"}},children:[(0,L.jsx)($r,{onTyping:this.handleSearch}),(0,L.jsx)("span",{className:"separate-span"}),(0,L.jsx)($n,{buttons:[{value:"all",title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTables.buttonShowAll",params:{count:t.length}}),disabled:0===t.length},{value:JN,title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTables.buttonShowSelected",params:{count:i}}),disabled:0===i}],selected:e,onChange:this.handleFilter}),this.renderTablesList()]})}}QN.propTypes={tables:Vt().array.isRequired,selectedTables:Vt().array.isRequired,setSelectedTables:Vt().func.isRequired,onClose:Vt().func.isRequired,baseClassName:Vt().string},QN.defaultProps={baseClassName:`${gu}sync-db-tables-form`};const eF=QN,tF="files",nF="all",sF="selected",iF="except-tables-hint-action",aF={isLoading:!0,isValidating:!1,isProcessing:!1,isCompletedSuccessfully:!1,isFailed:!1,formErrors:null,syncTaskId:null,syncTask:null,showSyncDbTablesDrawer:!1,targetInstanceId:null,targetInstancesOptions:[],syncType:"all",syncTypeOptions:[],syncOptions:[],syncDbType:nF,syncDbTypeOptions:[],exceptTables:[],isExceptTables:!1,tables:[],selectedTables:{},isSnapshotRequired:!1,isFullSnapshot:!1,isSubmitButtonDisabled:!1};class rF extends U.Component{constructor(e){super(e),this.initSyncSettings=e=>{const{onAddDrawerErrorMessage:t}=this.props,{targetInstancesOptions:n,syncDbType:s,tables:i}=e;let a=!1;n&&0!==n.length||(t("list-ui.instanceSync.errorNoTarget",!0,"errorNoTarget"),a=!0);const r=s===sF?i.reduce(((e,t)=>(e[t.id]=t.selected,e)),{}):{};this.setState(Object.assign(Object.assign(Object.assign(Object.assign({},e),{targetInstancesOptions:this.getTargetInstanceOptions(n),syncOptions:Object.keys(e.syncOptions)}),e.syncOptions),{selectedTables:r,isSubmitButtonDisabled:a}),this.updateStatusMessages)},this.getTargetInstanceOptions=e=>e?e.map((({id:e,title:t,fullPath:n,isAlive:s,sameDb:i,cmpVersion:a,updatePrefix:r,refreshAfterSync:o})=>({value:e,label:t,fullPath:n,isAlive:s,sameDb:i,cmpVersion:a,updatePrefix:r,refreshAfterSync:o}))):[],this.getSelectedTargetInstance=()=>this.state.targetInstancesOptions.find((e=>e.value===this.state.targetInstanceId)),this.getSelectedTargetInstanceName=()=>{const e=this.getSelectedTargetInstance();return e?e.label:""},this.isSubmitDisabled=()=>{const{isSubmitButtonDisabled:e,isProcessing:t,isValidating:n}=this.state,{isUnpaid:s,isFeatureDisabled:i}=this.props;return e||t||n||s||i},this.setSelectedTables=e=>this.setState({selectedTables:e}),this.getSelectedTablesIds=()=>Object.keys(this.state.selectedTables).filter((e=>this.state.selectedTables[e])),this.getSelectedTablesTitles=()=>{const{tables:e}=this.state,t=this.getSelectedTablesIds();return e.filter((e=>-1!==t.indexOf(e.id))).map((e=>e.title))},this.getSyncDbTables=()=>{const{syncDbType:e,tables:t,isExceptTables:n,exceptTables:s}=this.state;let i={};switch(e){case"new":i=t.reduce(((e,t)=>(e[t.id]=!1,e)),{});break;case nF:i=t.reduce(((e,t)=>(e[t.id]=!!n&&!s.find((e=>e.toLowerCase()===t.id.toLowerCase())),e)),{});break;case sF:{const e=this.getSelectedTablesIds();i=t.reduce(((t,n)=>(t[n.id]=-1!==e.indexOf(n.id),t)),{});break}}return JSON.stringify(i)},this.setFormErrors=e=>{e&&this.setState({formErrors:Object.keys(e).reduce(((t,n)=>("tables"===n&&(t.syncDbType=e[n]),t)),Object.assign({},e))})},this.updateStatusMessages=()=>{const{onClearDrawerMessages:e,onAddDrawerErrorMessage:t,onAddDrawerWarningMessage:n}=this.props,{syncType:s}=this.state,i=this.getSelectedTargetInstance();if(!i)return;e(),this.setState({isSubmitButtonDisabled:!1});const a=s!==tF;return i.sameDb&&a?(t("list-ui.instanceSync.errorSameDb",!0,"errorSameDb"),void this.setState({isSubmitButtonDisabled:!0})):i.cmpVersion>0?(t("list-ui.instanceSync.errorSourceIsOlder",!0,"errorSameDb"),void this.setState({isSubmitButtonDisabled:!0})):(i.isAlive||this.setState({isSnapshotRequired:!1}),i.isAlive&&i.cmpVersion<0&&n("list-ui.instanceSync.warningTargetOlder",!0,"errorSameDb"),i.isAlive&&i.updatePrefix&&a&&n("list-ui.instanceSync.warningTargetHasOtherPrefix",!0,"warningTargetHasOtherPrefix"),void(i.isAlive||n("list-ui.instanceSync.warningTargetIsBroken",!0,"warningTargetIsBroken")))},this.handleChangeTargetInstance=e=>this.setState({targetInstanceId:e},this.updateStatusMessages),this.handleChangeSyncType=e=>this.setState({syncType:e},this.updateStatusMessages),this.handleToggleSyncDbTablesDrawer=()=>this.setState((e=>({showSyncDbTablesDrawer:!e.showSyncDbTablesDrawer}))),this.handleSubmit=()=>{if(this.isSubmitDisabled())return;const{installation:{id:e},instanceSyncActions:{syncInstance:t,syncFinished:n},onSetDrawerMessages:s,onClearDrawerMessages:i}=this.props,{targetInstanceId:a,syncType:r,syncDbType:o,syncOptions:l,isSnapshotRequired:c,isExceptTables:u}=this.state,d=l.reduce(((e,t)=>(e[t]=Number(this.state[t]),e)),{}),p=Object.assign(Object.assign({id:e,targetInstanceId:a||"",syncType:r},d),{syncDbType:o,tables:this.getSyncDbTables(),snapshot:c,isExceptTables:Number(u)});i(),this.setState({formErrors:null,isValidating:!0,syncTask:null}),t(p).then((e=>{if(e.status===su)return s(Fc(e)),e.formErrors&&this.setFormErrors(e.formErrors),void this.setState({isValidating:!1});this.setState({isValidating:!1,isProcessing:!0,syncTaskId:e.data.task.id})})).catch((()=>{n(e),this.setState({isValidating:!1,isProcessing:!1})}))},this.getSubmitButtonConfig=()=>{const{isValidating:e,isProcessing:t,isCompletedSuccessfully:n,isLoading:s}=this.state;return!s&&!n&&{onClick:e=>Rc(e,this.handleSubmit),children:t||e?(0,L.jsx)(Ac,{content:"list-ui.instanceSync.processingButton"}):(0,L.jsx)(Ac,{content:"list-ui.instanceSync.submitButton"}),disabled:this.isSubmitDisabled(),"data-test-id":"submit-button"}},this.getCancelButtonConfig=()=>{const{isProcessing:e,isCompletedSuccessfully:t,isFailed:n,isLoading:s,isValidating:i}=this.state,{onClose:a}=this.props;return!(s||e||i)&&{onClick:e=>Rc(e,a),children:t||n?(0,L.jsx)(Ac,{content:"list-ui.instanceSync.closeButton"}):(0,L.jsx)(Ac,{content:"list-ui.instanceSync.cancelButton"}),"data-test-id":t||n?"close-button":"cancel-button"}},this.renderObjectSwitcherControl=({name:e,options:t,disabled:n,defaultValue:s=null,onChange:i=null,placeholder:a=null})=>(0,L.jsx)(XN,{styles:ZN,defaultValue:s,isClearable:!1,isSearchable:!0,backspaceRemovesValue:!1,name:e,id:`${e}-select-container`,inputId:`${e}-search-input`,placeholder:a,options:t,onChange:i,isDisabled:n,"data-test-id":e}),this.renderSourceInstancePath=()=>{const{installation:e}=this.props,{isProcessing:t,isCompletedSuccessfully:n}=this.state;return t||n?null:e.path?(0,L.jsx)(An,{target:(0,L.jsx)(be,{className:"wpt-mgl-5",children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.showPath"})}),children:e.path}):null},this.renderSourceInstanceControl=()=>(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.sourceInstance"}),"data-test-id":"source-instance",children:[this.props.installation.displayTitle,this.renderSourceInstancePath()]}),this.renderTargetInstancePath=()=>{const e=this.getSelectedTargetInstance();return e&&e.fullPath?(0,L.jsx)(An,{target:(0,L.jsx)(be,{className:"wpt-mgl-5",children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.showPath"})}),children:e.fullPath}):null},this.renderTargetInstanceControl=()=>{const{targetInstancesOptions:e,isProcessing:t,isCompletedSuccessfully:n}=this.state;if(!e||0===e.length)return null;if(t||n)return(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.targetInstance"}),children:this.getSelectedTargetInstanceName()});const s=this.getSelectedTargetInstance();return(0,L.jsxs)(ui,{name:"targetInstanceId",label:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.targetInstance"}),required:!0,children:[this.renderObjectSwitcherControl({name:"targetInstanceId",placeholder:null,defaultValue:s,options:e,onChange:({value:e})=>this.handleChangeTargetInstance(e)}),this.renderTargetInstancePath()]})},this.handleToggleSyncTypeHint=(e,t)=>{const n=e.target.id,{syncTypeOptions:s}=this.state;n===`${t}-hint-action`&&this.setState(s.reduce(((e,n)=>(e[`${n}IsHintVisible`]=n===t,e)),{}))},this.handleToggleExceptTablesHint=e=>{e.target.id===iF&&this.setState((e=>({exceptTablesHintIsVisible:!e.exceptTablesHintIsVisible})))},this.renderSyncTypeControl=()=>{const{baseClassName:e}=this.props,{syncType:t,syncTypeOptions:n,syncOptions:s,isProcessing:i,isCompletedSuccessfully:a}=this.state,r=(e,t=!0)=>(0,L.jsxs)("span",{children:[(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncTypeOptions.${e}.title`}),t&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{id:`${e}-hint-action`,icon:"circle-info",className:"wpt-mgl-5",onClick:t=>Rc(t,(()=>this.handleToggleSyncTypeHint(t,e)))}),visible:this.state[`${e}IsHintVisible`],children:(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncTypeOptions.${e}.description`})})]}),o=n=>{if(n!==t)return[];switch(n){case"all":case tF:return s.map((t=>(0,L.jsxs)("div",{children:[(0,L.jsx)(Zi,{name:t,className:`${e}__form-field-checkbox`,label:(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncOptions.${t}.title`}),value:this.state[t],onChange:e=>this.setState({[t]:e})}),(0,L.jsx)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-mgl-5"}),children:(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncOptions.${t}.description`})})]},t)));default:return[]}};if(i||a)return(0,L.jsx)(ui,{label:r(t,!1),children:(()=>s.reduce(((e,t)=>(this.state[t]&&e.push((0,L.jsx)("div",{children:(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncOptions.${t}.title`})},t)),e)),[]))()});const l=n.map((e=>({value:e,label:r(e),indentFields:o(e)})));return(0,L.jsx)(oa,{name:"syncType",label:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncType"}),value:t,options:l,onChange:this.handleChangeSyncType})},this.renderSyncTypeSection=()=>{const{baseClassName:e}=this.props,{syncTypeOptions:t}=this.state;return 0===t.length?null:(0,L.jsx)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncTypeSectionTitle"}),className:`${e}__section`,children:this.renderSyncTypeControl()})},this.renderSyncDbTypeControl=()=>{const{syncDbType:e,syncDbTypeOptions:t,isExceptTables:n,exceptTables:s,isProcessing:i,isCompletedSuccessfully:a}=this.state,r=e=>{if(e===sF){const t=this.getSelectedTablesTitles();if(t.length)return(0,L.jsxs)("span",{children:[(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncDbType.options.${e}`}),": ",(0,L.jsx)("b",{children:t.join(", ")})]})}return e===nF&&n&&0!==s.length&&(i||a)?(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncDbType.options.${e}`}),children:o(!1)}):(0,L.jsx)(Ac,{content:`list-ui.instanceSync.syncDbType.options.${e}`})},o=(e=!0)=>(0,L.jsxs)("span",{children:[(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbType.exceptTables"}),": ",(0,L.jsx)("b",{children:s.join(", ")}),e&&(0,L.jsx)(An,{target:(0,L.jsx)(fe,{id:iF,icon:"circle-info",className:"wpt-mgl-5",onClick:e=>Rc(e,(()=>this.handleToggleExceptTablesHint(e)))}),visible:this.state.exceptTablesHintIsVisible,children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbType.exceptTablesDesc"})})]}),l=t=>{if(t!==e)return[];switch(t){case nF:return 0===s.length?[]:[(0,L.jsx)("div",{children:(0,L.jsx)(Zi,{name:"isExceptTables",label:o(),value:n,onChange:e=>this.setState({isExceptTables:e}),"data-test-id":"except-tables-checkbox"})},t)];case sF:return[(0,L.jsx)("div",{children:(0,L.jsx)(fe,{onClick:e=>Rc(e,this.handleToggleSyncDbTablesDrawer),"data-test-id":"select-available-tables",children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbType.chooseTables"})})},t)];default:return[]}};if(i||a)return r(e);const c=t.map((e=>({value:e,label:r(e),indentFields:l(e)})));return(0,L.jsx)(oa,{name:"syncDbType",label:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbType.label"}),value:e,options:c,onChange:e=>this.setState({syncDbType:e})})},this.renderSyncDbTypeSection=()=>{const{baseClassName:e}=this.props,{syncType:t,syncDbTypeOptions:n}=this.state;return 0===n.length||t===tF?null:(0,L.jsx)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.syncDbTypeSectionTitle"}),className:`${e}__section`,children:this.renderSyncDbTypeControl()})},this.renderSnapshotControl=()=>{const{baseClassName:e}=this.props,{isSnapshotRequired:t,isFullSnapshot:n,isProcessing:s,isCompletedSuccessfully:i}=this.state,a=this.getSelectedTargetInstance();return s||i?t?(0,L.jsx)(Ac,{content:"list-ui.instanceSync.isSnapshotRequired"}):(0,L.jsx)(Ac,{content:"list-ui.instanceSync.noSnapshot"}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Zi,{name:"isSnapshotRequired",className:`${e}__form-field-checkbox`,label:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.isSnapshotRequired"}),value:t,onChange:e=>this.setState({isSnapshotRequired:e}),disabled:!a,"data-test-id":"is-snapshot-required"}),(0,L.jsxs)(An,{target:(0,L.jsx)(fe,{icon:"circle-info",className:"wpt-mgl-5"}),children:[(0,L.jsx)(Ac,{content:"list-ui.instanceSync.isSnapshotRequiredDesc"}),n&&(0,L.jsx)("div",{children:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.isSnapshotRequiredNote"})})]})]})},this.renderSnapshotSection=()=>{const{baseClassName:e}=this.props,t=this.getSelectedTargetInstance();return t&&!t.isAlive?null:(0,L.jsx)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.snapshotSectionTitle"}),className:`${e}__section`,children:this.renderSnapshotControl()})},this.state=aF}componentDidMount(){this.props.isOpen&&this.handleOpenAndLoadData()}componentDidUpdate(e,t,n){!e.isOpen&&this.props.isOpen&&this.handleOpenAndLoadData(),e.task!==this.props.tasks&&this.handleUpdateBackgroundTasks(this.props.tasks)}handleOpenAndLoadData(){const{installation:{id:e},instanceSyncActions:{getSyncSettings:t},onSetDrawerMessages:n}=this.props;this.setState(aF),t(e).then((({data:e})=>{if(n(Fc(e)),e.status===su)return void this.setState({isSubmitButtonDisabled:!0});const t=Wc(e,"syncSettings");t&&this.initSyncSettings(t)})).finally((()=>{this.setState({isLoading:!1})}))}handleUpdateBackgroundTasks(e){const{syncTaskId:t,syncTask:n}=this.state;if(!t)return;const s=iw(t,e);s&&n!==s&&this.setState({syncTask:s},(()=>{this.handleUpdateSyncTask()}))}handleUpdateSyncTask(){const{syncTask:e,targetInstanceId:t}=this.state,{installation:{id:n},instancesActions:{setSelectedInstanceId:s,getInstancesData:i},instanceSyncActions:{syncFinished:a}}=this.props,r=this.getSelectedTargetInstance();nw(e)?(t&&s(t),i({instancesIds:r.refreshAfterSync?[n,t]:[n]}).then((()=>a(n))).catch((()=>{})).finally((()=>{this.setState({isProcessing:!1,isCompletedSuccessfully:!0})}))):sw(e)&&(a(n),this.setState({isProcessing:!1,isFailed:!0}))}renderSyncDbTablesDrawer(){const{showSyncDbTablesDrawer:e,tables:t,selectedTables:n}=this.state;return e&&t&&0!==t.length?(0,L.jsx)(eF,{tables:t,selectedTables:n,setSelectedTables:this.setSelectedTables,onClose:this.handleToggleSyncDbTablesDrawer}):null}renderPaidFeatureDesc(){const{isUnpaid:e,upgradeUrl:t,premiumFeaturesUrl:n,isFeatureDisabled:s,installation:i}=this.props;return e||s?(0,L.jsx)(pm,{uatAction:"CLICK_EXT_BUY_FROM_SYNC_FORM",purchaseLicenseUrl:t,installationId:i.id,premiumFeaturesUrl:n,children:(0,L.jsx)(Ac,{content:"paidFeature.copyDataFeatureDescription"})}):null}render(){const{isLoading:e,formErrors:t,targetInstanceId:n,syncType:s,syncOptions:i,syncDbType:a,isExceptTables:r,isSnapshotRequired:o,syncTask:l}=this.state,{installation:{title:c},onClose:u,isOpen:d,renderDrawerMessages:p,baseClassName:h}=this.props,m=i.reduce(((e,t)=>(e[t]=this.state[t],e)),{}),f=this.getSubmitButtonConfig(),g=[];return f&&g.push((0,L.jsx)(Ue,Object.assign({intent:"primary"},f),"submit")),(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.drawerTitle",params:{instance:c}}),form:{onSubmit:this.handleSubmit,errors:t,values:Object.assign(Object.assign({targetInstanceId:n,syncType:s},m),{syncDbType:a,isExceptTables:r,isSnapshotRequired:o}),applyButton:!1,submitButton:f,cancelButton:this.getCancelButtonConfig(),hideRequiredLegend:!0},progress:fC(l,(()=>{this.setState({syncTask:null,syncTaskId:null})}),g),hideButton:!1,onClose:u,"data-test-id":"instance-sync-form","data-type":"instance-sync",size:"sm",isOpen:d,children:[this.renderPaidFeatureDesc(),p(),e&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"list-ui.instanceSync.loadingForm"})]}),!e&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceSync.locationSectionTitle"}),className:`${h}__section`,children:[this.renderSourceInstanceControl(),this.renderTargetInstanceControl()]}),this.renderSyncTypeSection(),this.renderSyncDbTypeSection(),this.renderSnapshotSection(),this.renderSyncDbTablesDrawer()]})]})}}rF.propTypes={installation:Vt().shape({displayTitle:Vt().string.isRequired,features:Vt().shape({copyData:Vt().shape({applicable:Vt().bool.isRequired})}).isRequired,id:Vt().number.isRequired,path:Vt().string.isRequired,title:Vt().string.isRequired}).isRequired,onClose:Vt().func.isRequired,instancesActions:Vt().shape({setSelectedInstanceId:Vt().func.isRequired,getInstancesData:Vt().func.isRequired}).isRequired,instanceSyncActions:Vt().shape({getSyncSettings:Vt().func.isRequired,syncInstance:Vt().func.isRequired,syncFinished:Vt().func.isRequired}).isRequired,onSetDrawerMessages:Vt().func.isRequired,onClearDrawerMessages:Vt().func.isRequired,onAddDrawerErrorMessage:Vt().func.isRequired,onAddDrawerWarningMessage:Vt().func.isRequired,renderDrawerMessages:Vt().func.isRequired,baseClassName:Vt().string,tasks:Vt().array,isUnpaid:Vt().bool.isRequired,upgradeUrl:Vt().string.isRequired,premiumFeaturesUrl:Vt().string,isFeatureDisabled:Vt().bool.isRequired,isOpen:Vt().bool.isRequired},rF.defaultProps={baseClassName:`${gu}instance-sync-form`,tasks:[],premiumFeaturesUrl:null};const oF=(0,so.$j)(((e,t)=>{var n;return{tasks:e.backgroundTasks.tasks,isUnpaid:e.app.unpaidFeatures.sync,upgradeUrl:e.app.urls.featuresBuyLinks.sync,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,isFeatureDisabled:!(null===(n=t.installation.features.copyData)||void 0===n?void 0:n.applicable)}}),(e=>({instancesActions:nh(i,e),instanceSyncActions:nh(g,e)})))(Lx(rF)),lF=(e,t)=>n=>fp.validateClonePath(e,t).catch((e=>422===e.response.status?Promise.reject(e):(n(_p(e)),Promise.reject()))),cF=e=>t=>t({type:Qx,task:e}),uF=e=>t=>fp.cloneInstallation(e).then((({data:e})=>{const n=Yc(e.task);return t(cF(n)),n})).catch((e=>422===e.response.status?Promise.reject(e):(t(_p(e)),Promise.reject()))),dF=Nc("clone/CLONE_FINISHED","instanceId"),pF=({installationId:e,databaseName:t,databaseServer:n,domainExisting:s,domainNewSubdomainName:i,domainNewSubdomainParentDomain:a,installationPath:r})=>o=>fp.getCloneStub(e,t,n,s,i,a,r).then((({data:e})=>(o({type:"clone/CLONE_STUB_LOADED_SUCCESSFULLY"}),e))).catch((e=>(o(_p(e)),Promise.reject())));var hF=r(20296);const mF=e=>{const t=Mc();return(0,L.jsx)(vn,Object.assign({},e,{placeholder:t(e.placeholder)}))},fF="newSubdomain",gF="existingDomainOrSubdomain",bF={isLoading:!0,isProcessing:!1,isCompletedSuccessfully:!1,isFailed:!1,isWpInstalled:!1,isAppInstalled:!1,hasUserFiles:!1,isCloningToSourceInstancePath:!1,isRewrite:!1,isDomainSettingsLoading:!1,formErrors:{},cloneTaskId:null,cloneTask:null,domains:[],parentDomains:[],dbServers:[],documentRoot:null,isNewSubdomain:!0,domainType:fF,installationPath:"",subdomainInstallationPath:"",databaseCreationAllowed:!1,dbNamePrefix:"",isWrongParams:!1,domain:{existing:"",newSubdomain:{name:"",parentDomain:""}},database:{name:"",server:""},messages:[]};class vF extends U.Component{constructor(e){super(e),this.getCloneStub=e=>{const{instanceCloneActions:{getCloneStub:t}}=this.props;return t(e).then((({value:{database:{value:{name:{value:e,meta:{creationAllowed:t}},server:{value:n,meta:{choices:s}},namePrefix:{value:i}}},domain:{value:{existing:{value:a,meta:{choices:r,documentRoot:o}},newSubdomain:{value:{parentDomain:{value:l,meta:{choices:c}},name:{value:u}}}}},installationPath:{value:d}},meta:{messages:p}})=>{this.setState((h=>{let m=h.isNewSubdomain;return c&&c.length||(m=!1),{domains:r,parentDomains:c,installationPath:null!=d?d:"",domain:{existing:a,newSubdomain:{name:u,parentDomain:l}},documentRoot:o,databaseCreationAllowed:t,dbServers:s,dbNamePrefix:i,database:{name:e,server:n},messages:p,isNewSubdomain:m,domainType:m?fF:gF}}),this.handleCloneStubUpdated)})).catch((()=>{this.setState({isWrongParams:!0})}))},this.handleCloneStubUpdated=()=>{const{databaseCreationAllowed:e,domains:t,parentDomains:n,messages:s}=this.state,{onAddDrawerErrorMessage:i,onSetDrawerMessages:a}=this.props;return this.setState({isWrongParams:!1}),(null==n?void 0:n.length)||(null==t?void 0:t.length)?e?void(s&&a(Object.keys(s).map((e=>{const t=s[e];return{key:e,status:t.intent,message:t.text}})))):(i("list-ui.instanceClone.dbSettings.dbSettingsError",!0,"databaseCreationNotAllowedError"),void this.setState({isWrongParams:!0})):(i("list-ui.instanceClone.domainSettings.domainSettingsError",!0,"emptyDomainsError"),void this.setState({isWrongParams:!0}))},this.setFormErrors=e=>{const{isNewSubdomain:t}=this.state,n=t?fF:gF,s=e.installationPath&&Object.keys(e.installationPath).length,i=s&&-1!==Object.keys(e.installationPath).indexOf("directoryHidesAnotherWordpress"),a=s&&-1!==Object.keys(e.installationPath).indexOf("directoryHidesAnotherApplication"),r=s&&-1!==Object.keys(e.installationPath).indexOf("directoryHasUserFiles"),o=s&&-1!==Object.keys(e.installationPath).indexOf("cloningToSourceInstancePath");this.setState({formErrors:Object.keys(e).reduce(((s,o)=>{if("domain"===o&&(delete s[o],s[n]=t?Object.assign(Object.assign({},e.domain.newSubdomain.name),e.domain.newSubdomain.parentDomain):e.domain.existing),"installationPath"===o){if(s[n])return s;delete s[o],i||a||r||(s[n]=e[o])}return s}),Object.assign({},e)),isWpInstalled:i,isAppInstalled:a,hasUserFiles:r,isCloningToSourceInstancePath:o})},this.handleChangeInstallationPath=e=>{const{domain:{existing:t}}=this.state,{installation:{id:n},instanceCloneActions:{validateClonePath:s}}=this.props;t&&(this.setState({installationPath:e,isRewrite:!1,isWpInstalled:!1,isAppInstalled:!1,hasUserFiles:!1,formErrors:{}}),this.debounceValidatePrefix&&this.debounceValidatePrefix.clear(),this.debounceValidatePrefix=(0,hF.debounce)((()=>s(n,{domain:t,installationPath:e}).catch((e=>{var t,n;(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors)&&this.setFormErrors(e.response.data.formErrors)}))),500),this.debounceValidatePrefix())},this.handleChangeDomain=()=>this.setState({isRewrite:!1,isWpInstalled:!1,isAppInstalled:!1,hasUserFiles:!1},(()=>{const{isNewSubdomain:e,database:t,installationPath:n,domain:{existing:s,newSubdomain:{name:i,parentDomain:a}}}=this.state,{installation:{id:r},onClearDrawerMessages:o}=this.props,l={installationId:r,databaseName:t.name,databaseServer:t.server,installationPath:n};e?(l.domainNewSubdomainName=i,l.domainNewSubdomainParentDomain=a):l.domainExisting=s,o(),this.setState({isDomainSettingsLoading:!0}),this.getCloneStub(l).catch((()=>{})).finally((()=>{this.setState({isDomainSettingsLoading:!1})}))})),this.handleChangeDomainType=e=>{this.props.onClearDrawerMessages(),this.setState({domainType:e,isNewSubdomain:e===fF,isRewrite:!1,isWpInstalled:!1,isAppInstalled:!1,hasUserFiles:!1})},this.handleChangeDatabaseSettings=(e,t)=>this.setState((n=>({database:Object.assign(Object.assign({},n.database),{[e]:t})}))),this.handleSubmit=()=>{const{isRewrite:e,dbNamePrefix:t,isNewSubdomain:n,database:s,installationPath:i,subdomainInstallationPath:a,domain:{existing:r,newSubdomain:{name:o,parentDomain:l}}}=this.state,{installation:{id:c},instanceCloneActions:{cloneInstallation:u},onClearDrawerMessages:d,showDomainOverviewLinkOnDone:p}=this.props,h={installationId:c,showDomainOverviewLinkOnDone:p,database:{name:s.name,namePrefix:t,server:s.server},overwrite:e};n?(h.domain={newSubdomain:{parentDomain:l,name:o}},h.installationPath=a):(h.domain={existing:r},h.installationPath=i),d(),this.setState({cloneTaskId:null,cloneTask:null,formErrors:{},isProcessing:!0}),u(h).then((e=>this.setState({cloneTaskId:e.id}))).catch((e=>{var t,n;(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors)&&this.setFormErrors(e.response.data.formErrors),this.setState({isProcessing:!1})}))},this.isSubmitButtonDisabled=()=>{const{isWrongParams:e,isWpInstalled:t,isAppInstalled:n,hasUserFiles:s,isRewrite:i,isDomainSettingsLoading:a}=this.state,{isUnpaid:r,isFeatureDisabled:o}=this.props;return e||(t||n||s)&&!i||r||o||a},this.getSubmitButtonConfig=()=>{const{isProcessing:e,isCompletedSuccessfully:t,isLoading:n}=this.state;return!n&&!t&&{onClick:this.handleSubmit,children:e?(0,L.jsx)(Ac,{content:"list-ui.instanceClone.processingButton"}):(0,L.jsx)(Ac,{content:"list-ui.instanceClone.submitButton"}),disabled:this.isSubmitButtonDisabled(),"data-test-id":"submit-button"}},this.getCancelButtonConfig=()=>{const{isProcessing:e,isCompletedSuccessfully:t,isFailed:n,isLoading:s}=this.state,{onClose:i}=this.props;return!e&&!s&&{onClick:i,children:t||n?(0,L.jsx)(Ac,{content:"list-ui.instanceClone.closeButton"}):(0,L.jsx)(Ac,{content:"list-ui.instanceClone.cancelButton"}),"data-test-id":t||n?"close-button":"cancel-button"}},this.getDbServerName=()=>{const{database:e,dbServers:t}=this.state;if(!e.server||!t)return null;const n=t.find((t=>t.value===e.server));return n?n.title:null},this.getDomainInstallationUrl=()=>{const{domain:e,installationPath:t}=this.state;return t?`${e.existing}/${t}`:e.existing},this.getSubdomainInstallationUrl=()=>{const{domain:{newSubdomain:{name:e,parentDomain:t}},subdomainInstallationPath:n}=this.state;let s=`${e}.${t}`;return n&&(s=`${s}/${n}`),s},this.getTargetInstallationUrl=()=>this.state.isNewSubdomain?this.getSubdomainInstallationUrl():this.getDomainInstallationUrl(),this.getTargetInstallationFullPath=()=>{const{documentRoot:e,installationPath:t}=this.state;return t?`${e}/${t}`:e},this.renderTargetInstallationFullPath=()=>{const e=this.getTargetInstallationFullPath();return e?(0,L.jsx)(An,{target:(0,L.jsx)(be,{className:"wpt-mgl-5",children:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.showPath"})}),children:e}):null},this.renderDomainSettingsControl=()=>{const{isProcessing:e,isCompletedSuccessfully:t,isRewrite:n,isNewSubdomain:s,parentDomains:i,domains:a,isWpInstalled:r,isAppInstalled:o,hasUserFiles:l,domainType:c}=this.state,{baseClassName:u}=this.props,d=(r||o||l)&&!n;return e||t?(0,L.jsxs)(ui,{label:s?(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.options.createSubdomain"}):(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.options.useExistingDomain"}),children:[(0,L.jsx)(Wn,{className:`${u}__destination-domain-name`,children:this.getTargetInstallationUrl()}),e&&n&&(0,L.jsx)(ye,{intent:"warning",className:`${u}__rewrite-label`,children:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.isRewrite"})})]}):(null==i?void 0:i.length)&&(null==a?void 0:a.length)?(0,L.jsx)(oa,{name:"domainType",value:c,label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.title"}),options:[{value:fF,label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.options.createSubdomain"}),indentFields:s?[(0,L.jsx)(U.Fragment,{children:this.renderNewSubdomainSettings()},"newSubdomainSettings")]:[]},{value:gF,label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.options.useExistingDomain"}),indentFields:s?[]:[(0,L.jsxs)("div",{className:mm()({[`${u}__domain-settings-indent-fields--warning`]:d}),children:[this.renderDomainSettings(),d&&this.renderWpInstalledWarning()]},"domainSettings")]}],onChange:this.handleChangeDomainType}):(null==i?void 0:i.length)?(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.options.createSubdomain"}),children:this.renderNewSubdomainSettings()}):(null==a?void 0:a.length)?(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.options.useExistingDomain"}),children:(0,L.jsxs)("div",{className:mm()({[`${u}__domain-settings-indent-fields--warning`]:d}),children:[this.renderDomainSettings(),d&&this.renderWpInstalledWarning()]})}):null},this.renderDomainSettings=()=>{const{installationPath:e,domains:t}=this.state,{baseClassName:n}=this.props;return(0,L.jsxs)(ui,{label:null,name:gF,className:`${n}__existing-domain`,children:[(0,L.jsx)(Ca,{name:"domain[existing]",id:"domain-search-input",label:null,onChange:e=>this.setState((t=>({domain:Object.assign(Object.assign({},t.domain),{existing:e})})),this.handleChangeDomain),"data-test-id":"domain",searchable:!0,placeholder:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.selectDomainPlaceholder"}),className:`${n}__existing-domain__domain`,children:t.map((({value:e,title:t})=>(0,L.jsx)(wa,{"data-test-value":e,value:e,children:t},e)))})," / ",(0,L.jsxs)(ui,{label:null,className:`${n}__path-prefix`,name:"installationPath",description:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.pathPrefixDescription"}),children:[(0,L.jsx)(mF,{type:"text",className:`${n}__path-prefix__text`,onChange:e=>this.handleChangeInstallationPath(e.target.value),value:e,placeholder:"list-ui.instanceClone.domainSettings.pathPrefixPlaceholder","data-test-id":Vh}),this.renderTargetInstallationFullPath()]})]})},this.renderNewSubdomainSettings=()=>{const{subdomainInstallationPath:e,parentDomains:t}=this.state,{baseClassName:n}=this.props;return(0,L.jsxs)(ui,{label:null,name:fF,className:`${n}__new-subdomain`,children:[(0,L.jsx)(ga,{label:null,name:"domain[newSubdomain][name]",className:`${n}__new-subdomain__name`,onChange:e=>this.setState((t=>({domain:Object.assign(Object.assign({},t.domain),{newSubdomain:Object.assign(Object.assign({},t.domain.newSubdomain),{name:e})})})))})," . ",(0,L.jsx)(Ca,{label:null,name:"domain[newSubdomain][parentDomain]",id:"subdomainParentDomain-search-input",onChange:e=>this.setState((t=>({domain:Object.assign(Object.assign({},t.domain),{newSubdomain:Object.assign(Object.assign({},t.domain.newSubdomain),{parentDomain:e})})})),this.handleChangeDomain),"data-test-id":"subdomainParentDomain",searchable:!0,placeholder:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.selectDomainPlaceholder"}),className:`${n}__new-subdomain__parent-domain`,children:t.map((({value:e,title:t})=>(0,L.jsx)(wa,{value:e,children:t},e)))})," / ",(0,L.jsx)(ui,{label:null,className:`${n}__path-prefix`,name:"installationPath",description:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.pathPrefixDescription"}),children:(0,L.jsx)(mF,{type:"text",className:`${n}__path-prefix__text`,onChange:e=>this.setState({subdomainInstallationPath:e.target.value}),value:e,placeholder:"list-ui.instanceClone.domainSettings.pathPrefixPlaceholder","data-test-id":Vh})})]})},this.renderWpInstalledWarning=()=>{const{isWpInstalled:e,isAppInstalled:t,hasUserFiles:n,isCloningToSourceInstancePath:s}=this.state,{baseClassName:i}=this.props;return s?(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.cloningToSourceInstancePathWarning"}):(0,L.jsxs)(U.Fragment,{children:[e&&(0,L.jsx)("span",{"data-test-id":"warning-wp-installed",children:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.wpInstalledWarning"})}),t&&(0,L.jsx)("span",{"data-test-id":"warning-app-installed",children:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.appInstalledWarning"})}),n&&(0,L.jsx)("span",{"data-test-id":"warning-user-files",children:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.userFilesWarning"})}),(0,L.jsx)("div",{className:`${i}__wp-installed-warning-button-group`,children:(0,L.jsx)(Ue,{className:`${i}__wp-installed-warning-button-group__is-rewrite-button`,onClick:()=>this.setState({isRewrite:!0}),"data-test-id":"rewrite-button",children:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.domainSettings.isRewriteButton"})})})]})},this.renderSourceInstanceFullPath=()=>{const{installation:{path:e},baseClassName:t}=this.props,{isProcessing:n,isCompletedSuccessfully:s}=this.state;return n||s?null:e?(0,L.jsx)(An,{target:(0,L.jsx)(be,{className:`${t}__show-path`,children:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.showPath"})}),children:e}):null},this.renderDbSettings=()=>{const{isCompletedSuccessfully:e,databaseCreationAllowed:t}=this.state,{baseClassName:n}=this.props;return!t||e?null:(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.databaseSectionTitle"}),className:`${n}__section`,children:[this.renderDbName(),this.renderDbServer()]})},this.renderDbName=()=>{const{isProcessing:e,database:t,dbNamePrefix:n}=this.state,s=`${n}${t.name}`;return e&&s?(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.dbName"}),children:s}):(0,L.jsxs)(ui,{name:"database[name]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.dbName"}),children:[n?(0,L.jsx)(Wn,{children:n}):null,(0,L.jsx)(vn,{type:"text",value:t.name,onChange:e=>this.handleChangeDatabaseSettings("name",e.target.value),"data-test-id":"db-name"})]})},this.renderDbServer=()=>{const{isProcessing:e,dbServers:t}=this.state;if(!t||t.length<=1)return null;const n=this.getDbServerName();return e&&n?(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.dbServer"}),children:n}):(0,L.jsx)(Ca,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.dbServer"}),name:"database[server]",onChange:e=>this.handleChangeDatabaseSettings("server",e),children:t.map((({value:e,title:t})=>(0,L.jsx)(wa,{value:e,children:t},e)))})},this.renderPaidFeatureDesc=()=>{const{isUnpaid:e,upgradeUrl:t,premiumFeaturesUrl:n,isFeatureDisabled:s,installation:i}=this.props;return e||s?(0,L.jsx)(pm,{uatAction:"CLICK_EXT_BUY_FROM_CLONE_FORM",purchaseLicenseUrl:t,installationId:i.id,premiumFeaturesUrl:n,children:(0,L.jsx)(Ac,{content:"paidFeature.cloneFeatureDescription"})}):null},this.renderForm=()=>{const{isLoading:e,isDomainSettingsLoading:t}=this.state,{installation:{displayTitle:n},baseClassName:s}=this.props;return e?(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.loadingForm"})}):(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.locationSectionTitle"}),className:`${s}__section`,children:[(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.sourceInstance"}),"data-test-id":"source-instance",children:[n,this.renderSourceInstanceFullPath()]}),this.renderDomainSettingsControl()]}),this.renderDbSettings(),t&&(0,L.jsx)(It,{overlay:!0,backdrop:!0})]})},this.state=bF}componentDidMount(){this.props.isOpen&&this.handleOpenAndLoadData()}componentDidUpdate(e,t,n){!e.isOpen&&this.props.isOpen&&this.handleOpenAndLoadData(),e.isOpen&&!this.props.isOpen&&this.debounceValidatePrefix&&this.debounceValidatePrefix.clear(),e.tasks!==this.props.tasks&&this.handleUpdateBackgroundTasks(this.props.tasks)}handleOpenAndLoadData(){this.setState(bF),this.getCloneStub({installationId:this.props.installation.id}).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))}handleUpdateBackgroundTasks(e){const{cloneTaskId:t,cloneTask:n}=this.state;if(!t)return;const s=iw(t,e);s&&n!==s&&this.setState({cloneTask:s},this.handleCloneTaskUpdated)}handleCloneTaskUpdated(){const{cloneTask:e,domain:{existing:t=""},isNewSubdomain:n}=this.state,{isOpen:s,installation:i}=this.props;nw(e)?(this.setState({isCompletedSuccessfully:!0,isProcessing:!1}),s&&e.publicParams.redirect&&(n||t!==i.domain.name)&&(window.location=e.publicParams.redirect)):sw(e)&&this.setState({isFailed:!0,isProcessing:!1})}render(){const{formErrors:e,domainType:t,database:n,cloneTask:s,domain:i,installationPath:a,subdomainInstallationPath:r,isProcessing:o}=this.state,{installation:{title:l},onClose:c,renderDrawerMessages:u,isOpen:d}=this.props,p=this.getSubmitButtonConfig(),h=[];return p&&h.push((0,L.jsx)(Ue,Object.assign({intent:"primary"},p),"submit")),(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceClone.drawerTitle",params:{instance:l}}),form:{onSubmit:this.handleSubmit,errors:e,values:{domainType:t,database:n,domain:i,installationPath:a,subdomainInstallationPath:r},applyButton:!1,submitButton:p,cancelButton:this.getCancelButtonConfig(),requiredMark:null,state:o?"submit":void 0},progress:fC(s,(()=>{this.setState({cloneTask:null,cloneTaskId:null})}),h),hideButton:!1,onClose:c,"data-test-id":"instance-clone-form","data-type":"instance-clone",size:"md",isOpen:d,children:[this.renderPaidFeatureDesc(),u(),this.renderForm()]})}}vF.propTypes={installation:Vt().shape({displayTitle:Vt().string.isRequired,features:Vt().shape({clone:Vt().shape({applicable:Vt().bool.isRequired})}).isRequired,id:Vt().number.isRequired,path:Vt().string.isRequired,title:Vt().string.isRequired}).isRequired,instanceCloneActions:Vt().shape({getCloneStub:Vt().func.isRequired,validateClonePath:Vt().func.isRequired,cloneInstallation:Vt().func.isRequired}).isRequired,onSetDrawerMessages:Vt().func.isRequired,onClearDrawerMessages:Vt().func.isRequired,onAddDrawerErrorMessage:Vt().func.isRequired,renderDrawerMessages:Vt().func.isRequired,baseClassName:Vt().string,tasks:Vt().array,isUnpaid:Vt().bool.isRequired,upgradeUrl:Vt().string.isRequired,premiumFeaturesUrl:Vt().string,isFeatureDisabled:Vt().bool.isRequired,isOpen:Vt().bool.isRequired,showDomainOverviewLinkOnDone:Vt().bool},vF.defaultProps={baseClassName:`${gu}instance-clone-form`,tasks:[],premiumFeaturesUrl:null,showDomainOverviewLinkOnDone:!1};const yF=(0,so.$j)(((e,t)=>{var n;return{tasks:e.backgroundTasks.tasks,isUnpaid:e.app.unpaidFeatures.clone,upgradeUrl:e.app.urls.featuresBuyLinks.clone,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl,isFeatureDisabled:!(null===(n=t.installation.features.clone)||void 0===n?void 0:n.applicable)}}),(e=>({instanceCloneActions:nh(b,e)})))(Lx(vF)),_F=({localeKey:e,href:t,iconName:n,children:s=null,onClick:i,primary:a,dataTestId:r,target:o="_self"})=>(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(fe,{href:t,target:o,icon:n,onClick:i,"data-test-id":r,primary:a,children:(0,L.jsx)(Ac,{content:e})}),s]});class xF extends U.Component{constructor(){super(...arguments),this.renderPlesk=()=>{const{installation:{features:{backups:e}},primary:t}=this.props;return(0,L.jsx)(_F,{href:e.backupManagerUrl,iconName:MT("backup"),localeKey:"controllers.index.detail.backupButton",dataTestId:"instance-link-backup",primary:t})},this.renderCpanel=()=>{const{installation:{features:{backups:e},owner:t},goToUri:n}=this.props;if(null===e.backupManagerUrl)return null;const s=bm({link:e.backupManagerUrl,inNewWindow:!1,goToUri:n,accountUsername:t.login});return(0,L.jsx)(_F,Object.assign({iconName:MT("backup"),localeKey:"controllers.index.detail.backupButton",dataTestId:"instance-link-backup"},s))}}render(){const{installation:{features:{backups:e},installationType:t},onOpenBackupDrawer:n,primary:s}=this.props;return e.wptBackupsAvailable?(0,L.jsx)(_F,{onClick:n,iconName:"backup",localeKey:"list.instances.linkBackup",dataTestId:"instance-link-backup",primary:s},"list.instances.linkBackup"):e.panelBackupsAvailable&&e.backupManagerUrl?QT(t)?this.renderPlesk():JT(t)?this.renderCpanel():null:null}}xF.defaultProps={primary:!1};const SF=(0,so.$j)(null,(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(xF),wF=(0,so.$j)((e=>({unpaidFeatures:e.app.unpaidFeatures,isWordPressInstancesLimitExceeded:e.app.options.isWordPressInstancesLimitExceeded})),(e=>({addErrorMessage:nh(jp,e)})))((({baseClassName:e=`${gu}instance-links`,installation:t,unpaidFeatures:n,onOpenSyncDrawer:s,onOpenCloneDrawer:i,onOpenBackupDrawer:a,onOpenActionLogDrawer:r,isWordPressInstancesLimitExceeded:o,addErrorMessage:l})=>{const{fileManager:c,copyData:u,clone:d,actionLog:p}=t.features,h=(0,U.useCallback)((e=>{Rc(e,o?()=>{var e,n;return l((0,L.jsx)(Ac,{content:"common.wordPressSitesLimitForDomainExceeded",params:{count:null===(e=t.domain)||void 0===e?void 0:e.installationsCount,limit:null===(n=t.domain)||void 0===n?void 0:n.installationsLimit}}))}:i)}),[t,i,o,l]);return(0,L.jsxs)("div",{className:e,children:[c.available&&(0,L.jsx)(oA,{installation:t,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.linkFiles"})}),u.available&&(0,L.jsx)(gm,{uatAction:km,featureName:uu,installationId:t.id,isInstanceFeatureDisabled:!u.applicable,description:(0,L.jsx)(Ac,{content:"paidFeature.copyDataFeatureDescription"}),children:(0,L.jsx)(_F,{onClick:e=>Rc(e,s),iconName:n.sync||!u.applicable?null:"arrows-loop",localeKey:"list.instances.linkSync",dataTestId:"instance-link-sync"},"list.instances.linkSync")}),d.available&&(0,L.jsx)(gm,{featureName:cu,uatAction:km,installationId:t.id,isInstanceFeatureDisabled:!d.applicable,description:(0,L.jsx)(Ac,{content:"paidFeature.cloneFeatureDescription"}),children:(0,L.jsx)(_F,{onClick:h,iconName:n.clone||!d.applicable?null:"copy",localeKey:"list.instances.linkClone",dataTestId:"instance-link-clone"},"list.instances.linkClone")}),(0,L.jsx)(SF,{onOpenBackupDrawer:a,installation:t}),p.available&&(0,L.jsx)(_F,{onClick:r,iconName:"list",localeKey:"list.instances.linkActionLog",dataTestId:"instance-link-action-log"},"list.instances.linkActionLog")]})})),kF=e=>{switch(e){case aL:return(0,L.jsxs)(ge,{intent:KO,children:[(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:KO})," ",(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.updatePrognosis.success"})]});case rL:return(0,L.jsxs)(ge,{intent:XO,children:[(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:XO})," ",(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.updatePrognosis.warning"})]});case oL:return(0,L.jsxs)(ge,{intent:ZO,children:[(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:ZO})," ",(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.updatePrognosis.failed"})]})}return null},jF=(0,so.$j)((e=>({restApiUrl:e.app.urls.restApiUrl})),null)((({installationId:e,smartPhpUpdateStatus:t,installationUrl:n,smartPhpUpdateCloneInstallationId:s,smartPhpUpdateCloneInstallationUrl:i,targetPhpHandlerName:a,phpHandlerName:r,isPublic:o,instanceLink:l,restApiUrl:c=""})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(kn,{level:3,children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.header"})}),o&&l?(0,L.jsx)(wn,{href:l,target:"_blank","data-test-id":"view-details",children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.linkToPanel"})}):null,(()=>{if(!n||!i)return null;const e=PL(LL(i));return(0,L.jsxs)(ge,{intent:GO,children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.topNotice.main",params:{originalSiteLink:(0,L.jsx)(wn,{href:n,target:"_blank",children:PL(LL(n))}),stagingSiteLink:(0,L.jsx)(wn,{href:i,target:"_blank",children:e}),targetPhpHandlerName:(0,L.jsx)(Wn,{bold:!0,children:a}),sourcePhpHandlerName:(0,L.jsx)(Wn,{bold:!0,children:r})}})}),(0,L.jsxs)(as,{children:[(0,L.jsx)("strong",{children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.topNotice.reviewStaging"})})," ",(0,L.jsx)(wn,{href:i,target:"_blank",children:e})]})]})})(),kF(t.status),(0,L.jsx)(RL,{smartUpdatesStatus:t,instanceUrl:n,smartUpdatesCloneInstanceId:s,smartUpdatesCloneUrl:i,isPublic:o,downloadSummaryUrl:zu(c,e)})]}))),TF=({isOpen:e,subtitle:t,installationId:n,smartPhpUpdateStatus:s,installationUrl:i,smartPhpUpdateCloneInstallationId:a,smartPhpUpdateCloneInstallationUrl:r,phpHandlerName:o,targetPhpHandlerName:l,onClose:c,onUpdate:u,onDiscard:d,isApplyInProcessing:p,baseClassName:h=`${gu}smart-php-update-result-drawer`})=>{const[m,f]=(0,U.useState)(!1),[g,b]=(0,U.useState)(!1);return(0,L.jsx)(zi,{title:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.drawerTitle"}),subtitle:t,isOpen:e,onClose:c,size:"lg","data-type":"smart-php-update-result",className:h,form:{cancelButton:!1,applyButton:!1,submitButton:!1,additionalButtons:[(0,L.jsxs)(An,{target:(0,L.jsx)(Ue,{"data-test-id":"apply-smart-php-update",intent:"primary",onClick:()=>f(!0),size:"lg",state:p?"loading":void 0,children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.submitButtons.buttonApply"})}),placement:"bottom",visible:m,onClose:()=>f(!1),children:[(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.updateConfirmationDialog.description",params:{phpHandlerName:(0,L.jsx)(Wn,{bold:!0,children:o}),targetPhpHandlerName:(0,L.jsx)(Wn,{bold:!0,children:l})},component:"p"}),(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>{f(!1),u()},"data-test-id":"confirm-apply-smart-php-update",intent:"primary",children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.updateConfirmationDialog.buttonOk"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>f(!1),children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.updateConfirmationDialog.buttonCancel"})})})]})]},"apply-button"),(0,L.jsxs)(An,{target:(0,L.jsx)(Ue,{"data-test-id":"discard-smart-php-update",onClick:()=>b(!0),size:"lg",disabled:p,children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.submitButtons.buttonDiscard"})}),placement:"bottom",visible:g,onClose:()=>b(!1),children:[(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.discardConfirmationDialog.description",component:"p"}),(0,L.jsxs)(Ss,{children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>{b(!1),d()},"data-test-id":"confirm-discard-smart-php-update",intent:"danger",children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.discardConfirmationDialog.buttonOk"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:()=>b(!1),children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.discardConfirmationDialog.buttonCancel"})})})]})]},"discard-button")]},children:(0,L.jsx)(jF,{installationId:n,installationUrl:i,phpHandlerName:o,targetPhpHandlerName:l,smartPhpUpdateStatus:s,smartPhpUpdateCloneInstallationId:a,smartPhpUpdateCloneInstallationUrl:r,isPublic:!1})})},CF={upVoteForFeature:Hp,addSuccessMessage:wp},DF=(0,so.$j)((e=>({upVotedFeatures:e.app.options.upVotedFeatures})),CF)((({label:e,featureName:t,upVotedFeatures:n,upVoteForFeature:s,addSuccessMessage:i})=>(0,L.jsx)(ge,{intent:"info",children:(0,L.jsxs)(Xn,{gap:"xs",children:[(0,L.jsx)(Zn,{xs:11,children:e}),(0,L.jsx)(Zn,{xs:1,children:(0,L.jsx)(Ue,{state:"active",disabled:n.includes(t),onToggle:()=>{s(t).then((()=>{i((0,L.jsx)(Ac,{content:"upVoteForFeature.successVoteUp"}))}))},children:(0,L.jsx)(Ac,{content:"upVoteForFeature.voteButton"})})})]})}))),PF=Object.assign({isLoading:!1,isProcessing:!1,isApplyInProcessing:!1,technicalDomainAvailable:!1,newSubdomainParentDomains:null,phpVersions:null,formValues:{parentDomain:null,phpVersion:null},messages:null,featureIsLimitedForThisConfiguration:!1,errorMessage:null,formErrors:{},smartPhpUpdateTaskId:null,smartPhpUpdateTask:null,smartPhpUpdateResultDrawerVisible:!1},{installationUrl:null,installationDisplayTitle:null,phpHandler:null,targetPhpHandler:null,smartPhpUpdateStatus:null,smartPhpUpdateCloneInstallationUrl:null,smartPhpUpdateCloneInstallationId:null});class IF extends U.Component{constructor(e){super(e),this.handleOpenAndLoadData=()=>{this.setState(Object.assign(Object.assign({},PF),{isLoading:!0}));const{instancesActions:{smartPhpUpdateStubLoaded:e},installation:{id:t}}=this.props;this.getSmartPhpUpdateStub().then((n=>{if(this.setState({messages:n.meta.messages,featureIsLimitedForThisConfiguration:n.meta.limited}),null===n.meta.tasks.update){if(n.meta.taskStatus!==lL)return this.setState({isProcessing:!0}),void this.getSmartPhpUpdateResult().catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}));this.setState({isLoading:!1}),e(t)}else this.setState({isLoading:!1,isProcessing:!0,smartPhpUpdateTask:n.meta.tasks.update,smartPhpUpdateTaskId:n.meta.tasks.update.id},(()=>this.handleSmartPhpUpdateTaskUpdated()))})).catch((e=>{var t;(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&400===e.response.status||this.props.onClose()}))},this.getSmartPhpUpdateResult=()=>{const{instancesActions:{getSmartPhpUpdateResult:e},installation:{id:t}}=this.props;return e(t).then((({url:e,displayTitle:t,clone:{id:n,url:s},phpUpdateStatus:i,details:a,phpHandler:r,targetPhpHandler:o})=>{this.setState({installationUrl:e,installationDisplayTitle:t,phpHandler:r,targetPhpHandler:o,smartPhpUpdateStatus:{status:i,details:a.reduce(((e,{pageUrl:t,before:n,after:s})=>(e.push({pageUrl:t,beforePageFetchingErrorCode:n.pageFetchingErrorCode,before:n,afterPageFetchingErrorCode:s.pageFetchingErrorCode,after:s}),e)),[])},smartPhpUpdateCloneInstallationId:n,smartPhpUpdateCloneInstallationUrl:s,smartPhpUpdateResultDrawerVisible:!0})}))},this.getSmartPhpUpdateStub=()=>{const{instancesActions:{getSmartPhpUpdateStub:e},installation:{id:t}}=this.props;return e(t).then((e=>{var t,n,s;e.value.newSubdomain?this.setState((t=>({technicalDomainAvailable:!1,newSubdomainParentDomains:e.value.newSubdomain.value.parentDomain.meta.choices,formValues:Object.assign(Object.assign({},t.formValues),{parentDomain:e.value.newSubdomain.value.parentDomain.value})}))):this.setState({technicalDomainAvailable:!0});const i=null===(s=null===(n=null===(t=this.props.installation.features)||void 0===t?void 0:t.php)||void 0===n?void 0:n.handler)||void 0===s?void 0:s.identifier,a=e.value.php.meta.versions.filter((e=>!i||e.value!==i));return 0===a.length&&this.setState({formErrors:{phpVersion:{noAlternates:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.noAlternativePhp"})}}}),this.setState({phpVersions:a}),e})).catch((e=>{var t,n,s;return(null===(s=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.meta)||void 0===s?void 0:s.message)&&this.setState({errorMessage:e.response.data.meta.message}),Promise.reject(e)}))},this.handleUpdate=()=>{const{instancesActions:{acceptSmartPhpUpdate:e,setInstallationPhpHandler:t,smartPhpUpdateResultApplied:n},installation:{id:s},appActions:{addSuccessMessage:i}}=this.props,{targetPhpHandler:a,phpVersions:r}=this.state;this.setState({isLoading:!0,isProcessing:!1,isApplyInProcessing:!0}),e(s).then((()=>{const e=r.find((e=>e.value===a.identifier));t(s,Object.assign(Object.assign({},a),{eoled:null==e?void 0:e.eoled})),n(s),i((0,L.jsx)(Ac,{content:"smartPhpUpdate.result.appliedSuccessfully"})),this.handleCloseSmartPhpUpdateResultDrawer(),this.props.onClose()})).catch((()=>{})).finally((()=>{this.setState({isApplyInProcessing:!1}),this.getSmartPhpUpdateStub().catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))}))},this.handleDiscard=()=>{const{instancesActions:{discardSmartPhpUpdate:e,smartPhpUpdateResultDiscarded:t},installation:{id:n}}=this.props;this.handleCloseSmartPhpUpdateResultDrawer(),this.setState({isLoading:!0,isProcessing:!1}),e(n).then((()=>{t(n)})).catch((()=>{})).finally((()=>{this.getSmartPhpUpdateStub().catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))}))},this.handleCloseSmartPhpUpdateResultDrawer=()=>this.setState({smartPhpUpdateResultDrawerVisible:!1}),this.getPhpHandlerTitle=e=>{let{title:t}=e;return!1===e.isFpmAvailable&&(t=(0,L.jsxs)(L.Fragment,{children:[t," ","(",(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.nonFpm"}),")"]})),e.eoled&&(t=(0,L.jsxs)(L.Fragment,{children:[t," ","(",(0,L.jsx)(he,{name:"triangle-exclamation-mark-filled",intent:"warning"})," ",(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.phpVersionEoled"}),")"]})),t},this.renderErrorMessage=e=>(0,L.jsx)(ge,{intent:"danger",children:e}),this.renderSmartPhpUpdateForm=()=>{const{isLoading:e,newSubdomainParentDomains:t,phpVersions:n,technicalDomainAvailable:s}=this.state;return e?(0,L.jsx)(It,{}):(0,L.jsxs)(L.Fragment,{children:[!s&&t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.subdomainWillCreated"})}),(0,L.jsx)(Ca,{name:"parentDomain",label:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.parentDomainLabel"}),fullDescription:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.parentDomainLabel.desc"}),required:!0,onChange:e=>this.setState((t=>({formValues:Object.assign(Object.assign({},t.formValues),{parentDomain:e})}))),"data-test-id":"smart-php-update-parent-domain-selector",children:t.map((e=>(0,L.jsx)(wa,{"data-test-value":e.value,value:e.value,children:e.title},e.value)))})]}),s&&(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.techDomainWillCreated"})}),n&&(0,L.jsx)(vi,{children:(0,L.jsx)(Ca,{name:"phpVersion",label:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.phpVersionLabel"}),fullDescription:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.phpVersionLabel.desc"}),required:!0,onChange:e=>this.setState((t=>({formValues:Object.assign(Object.assign({},t.formValues),{phpVersion:e})}))),"data-test-id":"smart-php-update-php-version-selector",children:n.map((e=>(0,L.jsx)(wa,{"data-test-value":e.value,value:e.value,label:e.title,children:this.getPhpHandlerTitle(e)},e.value)))})})]})},this.renderSmartUpdateResultsDrawer=()=>{const{installation:{id:e},onClose:t}=this.props,{isApplyInProcessing:n,installationUrl:s,installationDisplayTitle:i,phpHandler:a,targetPhpHandler:r,smartPhpUpdateStatus:o,smartPhpUpdateCloneInstallationUrl:l,smartPhpUpdateCloneInstallationId:c,smartPhpUpdateResultDrawerVisible:u}=this.state;return o?(0,L.jsx)(TF,{isOpen:u,subtitle:i,installationId:e,installationUrl:s,phpHandlerName:a.name,targetPhpHandlerName:r.name,smartPhpUpdateStatus:o,smartPhpUpdateCloneInstallationId:c,smartPhpUpdateCloneInstallationUrl:l,onClose:()=>this.setState({smartPhpUpdateResultDrawerVisible:!1},t),onUpdate:this.handleUpdate,onDiscard:this.handleDiscard,isApplyInProcessing:n}):null},this.handleSubmit=()=>{const{formValues:e}=this.state,{installation:{id:t},instancesActions:{runSmartPhpUpdate:n}}=this.props;this.setState({isProcessing:!0,formErrors:[]}),n({installationId:t,newSubDomain:e.parentDomain?{parentDomain:e.parentDomain}:null,php:e.phpVersion}).then((e=>{this.setState({smartPhpUpdateTaskId:e.id})})).catch((e=>{var t,n;(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors)&&Object.keys(e.response.data.formErrors).length>0&&this.setState({formErrors:e.response.data.formErrors}),this.setState({isProcessing:!1})}))},this.handleUpdateBackgroundTasks=e=>{const{smartPhpUpdateTaskId:t}=this.state;if(!t)return;const n=iw(t,e);n&&this.setState({smartPhpUpdateTask:n},(()=>this.handleSmartPhpUpdateTaskUpdated()))},this.handleSmartPhpUpdateTaskUpdated=()=>{const{smartPhpUpdateTask:e}=this.state;nw(e)?this.getSmartPhpUpdateStub().then((e=>{e.meta.taskStatus!==lL&&(this.setState({isLoading:!0,smartPhpUpdateTaskId:null,smartPhpUpdateTask:null}),this.getSmartPhpUpdateResult().catch((()=>{})).then((()=>{this.setState({isProcessing:!1})})))})).catch((()=>{})):sw(e)&&this.setState((()=>({isProcessing:!1,smartPhpUpdateTaskId:null})))},this.renderDescription=()=>(0,L.jsx)(ge,{intent:"info",children:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.description"})}),this.renderUpVoteForFeature=()=>(0,L.jsx)(DF,{label:(0,L.jsx)(Ac,{content:"upVoteForFeature.smartPhpUpdate"}),featureName:"smartPhpUpdateFeature"}),this.renderMessages=e=>e&&e.map((e=>(0,L.jsx)(ge,{intent:e.intent,onClose:()=>this.onCloseMessage(e.key),children:e.text},e.key))),this.onCloseMessage=e=>{this.setState((t=>({messages:t.messages.filter((t=>t.key!==e))})))},this.renderDrawerContent=()=>{const{messages:e,errorMessage:t,featureIsLimitedForThisConfiguration:n}=this.state;return n?(0,L.jsxs)(L.Fragment,{children:[this.renderDescription(),this.renderUpVoteForFeature()]}):t?(0,L.jsxs)(L.Fragment,{children:[this.renderDescription(),this.renderMessages(e),this.renderErrorMessage(t)]}):(0,L.jsxs)(L.Fragment,{children:[this.renderDescription(),this.renderMessages(e),this.renderSmartPhpUpdateForm(),this.renderSmartUpdateResultsDrawer()]})},this.state=PF}componentDidUpdate(e,t,n){!e.isOpen&&this.props.isOpen&&this.handleOpenAndLoadData(),this.props.isOpen&&e.tasks!==this.props.tasks&&this.handleUpdateBackgroundTasks(this.props.tasks)}renderDrawerSubtitle(){var e,t,n;const{installation:{displayTitle:s}}=this.props;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Wn,{children:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.currentSite",params:{displayTitle:s}})})," ",(0,L.jsx)("br",{}),(null===(n=null===(t=null===(e=this.props.installation.features)||void 0===e?void 0:e.php)||void 0===t?void 0:t.handler)||void 0===n?void 0:n.name)&&(0,L.jsx)(Wn,{children:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.currentPhpHandlerName",params:{phpHandlerName:this.props.installation.features.php.handler.name}})})]})}render(){const{isOpen:e,onClose:t}=this.props,{isLoading:n,isProcessing:s,featureIsLimitedForThisConfiguration:i,formValues:a,formErrors:r,smartPhpUpdateTask:o}=this.state;return(0,L.jsx)(zi,{"data-type":"smart-php-updates","data-test-id":"smart-php-update-stub-drawer",isOpen:e,onClose:t,title:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.drawerTitle"}),subtitle:this.renderDrawerSubtitle(),form:{onSubmit:this.handleSubmit,applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.submitButton"}),disabled:i||n,"data-test-id":"smart-php-update-run-button"},state:s?"submit":void 0,values:a,errors:r},progress:fC(o,(()=>{this.setState({smartPhpUpdateTask:null,smartPhpUpdateTaskId:null})}),[(0,L.jsx)(Ue,{intent:"primary",state:s?"loading":void 0,onClick:this.handleSubmit,children:(0,L.jsx)(Ac,{content:"forms.smartPhpUpdate.reSubmitButton"})},"reSubmitButton")]),children:this.renderDrawerContent()})}}IF.propTypes={installation:Vt().shape({id:Vt().number.isRequired,displayTitle:Vt().string.isRequired,features:Vt().shape({php:Vt().shape({handler:Vt().shape({identifier:Vt().string.isRequired,name:Vt().string.isRequired})})}).isRequired}).isRequired,isOpen:Vt().bool.isRequired,onClose:Vt().func.isRequired,instancesActions:Vt().shape({getSmartPhpUpdateStub:Vt().func.isRequired,getSmartPhpUpdateResult:Vt().func.isRequired,runSmartPhpUpdate:Vt().func.isRequired,acceptSmartPhpUpdate:Vt().func.isRequired,discardSmartPhpUpdate:Vt().func.isRequired,setInstallationPhpHandler:Vt().func.isRequired,smartPhpUpdateTaskStatusUpdated:Vt().func.isRequired}).isRequired,tasks:Vt().array,appActions:Vt().shape({addSuccessMessage:Vt().func.isRequired}).isRequired},IF.defaultProps={tasks:[]};const OF=(0,so.$j)((e=>({tasks:e.backgroundTasks.tasks})),(t=>({instancesActions:nh(i,t),appActions:nh(e,t)})))(IF);var LF,MF;(MF=LF||(LF={}))[MF.GENERAL=1]="GENERAL",MF[MF.PLUGINS=2]="PLUGINS",MF[MF.THEMES=3]="THEMES",MF[MF.DATABASE=4]="DATABASE";class AF extends U.Component{constructor(e){super(e),this.setActiveTab=e=>{this.setState({activeTab:e})},this.handleOpenPluginsUpdates=()=>{this.props.onOpenUpdatesDialog(Uf)},this.handleOpenThemesUpdates=()=>{this.props.onOpenUpdatesDialog(Rf)},this.handleCloseUpdates=()=>{const{onCloseUpdatesDialog:e}=this.props;e()},this.handleRefresh=()=>this.props.onRefresh(this.props.installation.id),this.handleSwitchPhpHandler=e=>this.props.onSwitchPhpHandler(this.props.installation.id,e),this.handleRefreshAndOpenMainTab=()=>{this.handleRefresh(),this.setActiveTab(LF.GENERAL)},this.handleOpenNativePlugins=()=>{this.props.onOpenNativeAssets(this.props.installation.id,au)},this.handleOpenNativeThemes=()=>{this.props.onOpenNativeAssets(this.props.installation.id,iu)},this.renderLicenseLimitsNotifier=()=>this.props.installation.features.remoteManagement.available?null:(0,L.jsx)("div",{className:"wpt-license-limit-exceeded-blocker","data-test-id":"remote-instance-license-limit-exceeded-blocker",children:(0,L.jsxs)(ge,{intent:"info",children:[(0,L.jsx)(he,{name:"exclamation-mark-circle"}),(0,L.jsx)(Ac,{content:"remote-servers.remoteManagementAllowedOnlyWithLicense"})]})}),this.handleToggleRemoteInstanceSettings=()=>this.setState((e=>({showRemoteInstancePropertiesForm:!e.showRemoteInstancePropertiesForm}))),this.handleToggleRemoteAgentInstanceSettings=()=>this.setState((e=>({showRemoteAgentInstancePropertiesForm:!e.showRemoteAgentInstancePropertiesForm}))),this.getPluginsTabLabel=()=>{const{installation:{features:{pluginsBlockList:e}}}=this.props;return e.amountOfBlockedPlugins&&e.amountOfBlockedPlugins>0?(0,L.jsx)(ye,{intent:"warning",children:(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"general-ui.tabs.plugins.hintBlockedPluginsCount"}),children:(0,L.jsx)(Wn,{children:e.amountOfBlockedPlugins})})}):null},this.renderRemoteInstancePropertiesDrawer=()=>{const{showRemoteInstancePropertiesForm:e}=this.state,{installation:{server:t}}=this.props;return t&&e?(0,L.jsx)(gA,{installation:this.props.installation,onToggleRemoteInstancePropertiesForm:this.handleToggleRemoteInstanceSettings}):null},this.renderRemoteAgentInstancePropertiesDrawer=()=>{const{showRemoteAgentInstancePropertiesForm:e}=this.state,{installation:{server:t}}=this.props;return t&&e?(0,L.jsx)(yA,{installation:this.props.installation,onToggleRemoteAgentInstancePropertiesForm:this.handleToggleRemoteAgentInstanceSettings}):null},this.isSynchronizeSiteUrlAvailable=()=>this.props.isSynchronizeSiteUrlEnabled&&this.props.installation.features.synchronizeSiteUrl.available,this.renderSynchronizeSiteUrlDialog=()=>this.isSynchronizeSiteUrlAvailable()?(0,L.jsx)(xA,{installationId:this.props.installation.id,onClose:this.props.onCloseSynchronizeSiteUrlDialog,onSynchronizeSiteUrl:()=>{this.props.instanceActions.synchronizeSiteUrl(this.props.installation.id),this.props.onCloseSynchronizeSiteUrlDialog()},isOpen:this.props.showSynchronizeSiteUrlDialog}):null,this.renderScrollToElement=()=>{const{isSelected:e,onSetSelectedInstanceAnchor:t}=this.props;return e?(0,L.jsx)("div",{ref:t}):null},this.renderUpdatesDrawer=()=>{const{onOpenUpdatesSettingsDialog:e,onCloseUpdatesSettingsDialog:t,showUpdates:n,openUpdatesType:s,isUpdateSettingsFormOpen:i}=this.props;return(0,L.jsx)(Pm,{children:(0,L.jsx)(tA,{onClose:this.handleCloseUpdates,onOpenUpdatesSettingsDialog:e,onCloseUpdatesSettingsDialog:t,installation:this.props.installation,openUpdatesType:s,isUpdateSettingsFormOpen:i,isOpen:n})})},this.renderSmartPhpUpdateDrawer=()=>{const{installation:e,isSmartPhpUpdatesDrawerOpen:t,onCloseSmartPhpDrawer:n,showSmartPhpUpdates:s}=this.props;return s&&(0,L.jsx)(OF,{installation:e,isOpen:t,onClose:n})},this.renderSecurityDrawer=()=>{const{showSecurityForm:e,onCloseSecurityDialog:t,installation:n,securityDrawerActiveTab:s,onOpenVirtualPatchingUpsellDialog:i}=this.props;return(0,L.jsx)(kD,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.drawerTitle"}),subtitle:n.displayTitle,installation:n,isOpen:e,onClose:t,activeTab:s,onOpenVirtualPatchingUpsellDialog:i})},this.renderActionLogDrawer=()=>(0,L.jsx)(wU,{isOpen:this.props.isActionLogDrawerVisible,installation:this.props.installation,onCloseActionLogDrawer:this.props.onCloseActionLogDrawer}),this.renderCheckWordPressIntegrityDialog=()=>{const{isCheckWordPressIntegrityDialogVisible:e,onCloseCheckWordPressIntegrityDialog:t,onOpenBackupDrawer:n,installation:s}=this.props;return(0,L.jsx)(MU,{isOpen:e,installation:s,onCloseCheckWordPressIntegrityDialog:t,onOpenBackupDrawer:n})},this.renderBackupDrawer=()=>(0,L.jsx)(_C,{installation:this.props.installation,onClose:this.props.onCloseBackupDrawer,isOpen:this.props.isBackupDrawerVisible}),this.renderContent=()=>{const{installation:e,installation:{id:t,features:{php:n,updates:s},status:{alive:i,infected:a,unsupported:r},title:o},onDetach:l,onDisableInstances:c,onEnableInstances:u,instanceActions:{setInstanceName:d},addErrorMessage:p,isCloneDrawerOpen:h,onOpenCloneDrawer:m,onCloseCloneDrawer:f,isSyncDrawerOpen:g,onOpenSyncDrawer:b,onCloseSyncDrawer:v,onOpenSecurityDialog:y,onOpenUpdatesDialog:_,onOpenActionLogDrawer:x,onOpenBackupDrawer:S,urls:{upgradingInstanceInstructionsUrl:w},onOpenCheckWordPressIntegrityDialog:k,checkWordPressIntegrityFeatureEnabled:j,onOpenSmartPhpUpdatesDrawer:T}=this.props;return r?(0,L.jsx)(WE,{installation:this.props.installation,upgradingInstanceInstructionsUrl:w}):!i||a?(0,L.jsx)(dA,{installation:this.props.installation,onDetach:l,onToggleRemoteInstanceSettings:this.handleToggleRemoteInstanceSettings,onToggleRemoteAgentInstanceSettings:this.handleToggleRemoteAgentInstanceSettings,onOpenCheckWordPressIntegrityDialog:k,disableInstances:c,enableInstances:u,checkWordPressIntegrityFeatureEnabled:j}):(0,L.jsxs)("div",{children:[(0,L.jsx)(ZA,{installationId:t,name:o,setInstanceName:d,addErrorMessage:p}),n.eoled&&(0,L.jsx)(AU,{installation:e,onOpenSmartPhpUpdatesDrawer:T}),s.availableVersion&&(0,L.jsx)(EU,{}),(0,L.jsxs)(Br,{active:this.state.activeTab,children:[(0,L.jsx)(Fr,{onActivate:()=>this.setActiveTab(LF.GENERAL),title:(0,L.jsx)(Ac,{content:"controllers.index.detail.generalTabHeader"}),"data-test-id":"instance-tab-general",children:(0,L.jsxs)(Pm,{children:[(0,L.jsx)(wF,{installation:e,onOpenBackupDrawer:S,onOpenActionLogDrawer:x,onOpenSyncDrawer:()=>b(t),onOpenCloneDrawer:()=>m(t)}),(0,L.jsx)(oF,{isOpen:g,onClose:v,installation:this.props.installation}),(0,L.jsx)(yF,{isOpen:h,onClose:f,installation:this.props.installation}),(0,L.jsx)(BE,{installation:this.props.installation,enableInstances:u,disableInstances:c,openUpdates:_,onOpenSecurityDialog:y,onOpenSmartPhpUpdates:s.php.available?T:void 0,onOpenVirtualPatchingUpsellDialog:this.props.onOpenVirtualPatchingUpsellDialog,onOpenVirtualPatchingLicenseInfoDrawer:this.props.onOpenVirtualPatchingLicenseInfoDrawer})]})}),(0,L.jsx)(Fr,{onActivate:()=>this.setActiveTab(LF.PLUGINS),title:(0,L.jsx)(Ac,{content:"controllers.index.detail.pluginsTabHeader"}),label:this.getPluginsTabLabel(),"data-test-id":"instance-tab-plugins",children:(0,L.jsx)(Pm,{children:(0,L.jsx)(IM,{isCollapsible:!1,installation:this.props.installation,onOpenNativePlugins:this.handleOpenNativePlugins,onUpdatesOpen:this.handleOpenPluginsUpdates,onOpenSecurityDialog:y})})}),(0,L.jsx)(Fr,{onActivate:()=>this.setActiveTab(LF.THEMES),title:(0,L.jsx)(Ac,{content:"controllers.index.detail.themesTabHeader"}),"data-test-id":"instance-tab-themes",children:(0,L.jsx)(Pm,{children:(0,L.jsx)(MM,{isCollapsible:!1,installation:this.props.installation,onOpenNativeThemes:this.handleOpenNativeThemes,onUpdatesOpen:this.handleOpenThemesUpdates,onOpenSecurityDialog:y})})}),(0,L.jsx)(Fr,{onActivate:()=>this.setActiveTab(LF.DATABASE),title:(0,L.jsx)(Ac,{content:"controllers.index.detail.databaseTabHeader"}),"data-test-id":"instance-tab-database",children:(0,L.jsx)(Pm,{children:(0,L.jsx)(YM,{installation:this.props.installation,onError:this.handleRefreshAndOpenMainTab})})})]})]})},this.renderFooter=()=>{const{installation:{status:{alive:e,unsupported:t}},installation:n,isLoading:s,onOpenUpdatesDialog:i,onOpenCheckWordPressIntegrityDialog:a}=this.props;return s?null:e?t?null:(0,L.jsx)($E,{installation:n,onOpenUpdatesDialog:i,onOpenCheckWordPressIntegrityDialog:a}):null},this.renderLegacyView=()=>(0,L.jsxs)("div",{children:[(0,L.jsxs)(Rs,{gap:"md",children:[(0,L.jsx)(Fs,{width:"316px",children:(0,L.jsx)(wA,{installation:this.props.installation,onToggleRemoteInstanceSettings:iC(this.props.installation.installationType)?this.handleToggleRemoteAgentInstanceSettings:this.handleToggleRemoteInstanceSettings,initialShowAdminSettingsDrawer:this.props.initialShowAdminSettingsDrawer})}),(0,L.jsx)(Fs,{fill:!0,children:this.renderContent()})]}),this.renderFooter()]}),this.state={activeTab:this.props.activeTab,showRemoteInstancePropertiesForm:!1,showRemoteAgentInstancePropertiesForm:!1}}componentDidUpdate(e){e.activeTab!==this.props.activeTab&&this.props.activeTab&&this.setActiveTab(this.props.activeTab)}componentWillUnmount(){const{showSynchronizeSiteUrlDialog:e,onCloseSynchronizeSiteUrlDialog:t,showSecurityForm:n,onCloseSecurityDialog:s,isCloneDrawerOpen:i,onCloseCloneDrawer:a,isSyncDrawerOpen:r,onCloseSyncDrawer:o,showUpdates:l,onCloseUpdatesDialog:c}=this.props;e&&t(),n&&s(),i&&a(),r&&o(),l&&c()}renderView(){const{installation:{features:{php:e}}}=this.props;return e.unsupported?(0,L.jsx)(qE,{installation:this.props.installation,onChangePHPHandler:this.handleSwitchPhpHandler}):this.renderLegacyView()}render(){const{installation:{id:e,title:t},isLoading:n,baseClassName:s}=this.props;return(0,L.jsxs)("div",{className:s,"data-test-id":`instance-body-${e}`,"data-test-name":`instance-body-${t}`,"data-test-row":"body",children:[this.renderView(),n&&(0,L.jsx)(It,{overlay:!0,backdrop:!0}),this.renderUpdatesDrawer(),this.renderSmartPhpUpdateDrawer(),this.renderLicenseLimitsNotifier(),this.renderRemoteInstancePropertiesDrawer(),this.renderRemoteAgentInstancePropertiesDrawer(),this.renderScrollToElement(),this.renderSynchronizeSiteUrlDialog(),this.renderSecurityDrawer(),this.renderActionLogDrawer(),this.renderCheckWordPressIntegrityDialog(),this.renderBackupDrawer()]})}}AF.defaultProps={baseClassName:`${gu}instance-card`,openUpdatesType:null,isActionLogDrawerVisible:!1,isBackupDrawerVisible:!1,initialShowAdminSettingsDrawer:!1,isCheckWordPressIntegrityDialogVisible:!1,securityDrawerActiveTab:void 0,onOpenSmartPhpUpdatesDrawer:void 0};const EF=(0,so.$j)(((e,t)=>({isSynchronizeSiteUrlEnabled:e.app.options.isSynchronizeSiteUrlEnabled,checkWordPressIntegrityFeatureEnabled:e.app.options.checkWordPressIntegrityFeature,urls:e.app.urls,activeTab:e.instances.activeTabs.get(t.installation.id)||LF.GENERAL,showSmartUpdates:e.app.options.showSmartUpdates,showSmartPhpUpdates:e.app.options.smartPhpUpdateFeature})),(e=>({instanceActions:nh(i,e),addErrorMessage:t=>e(jp(t)),addSuccessMessage:t=>e(wp(t))})))(AF),{CancelToken:UF}=Nu(),RF={installingCustomAssetBackgroundTask:null,showInstallingCustomAssetBackgroundTaskDetails:!1,isInstallingCustomAssetBackgroundTaskProcessing:!1},NF={rating:0,numberOfInstallations:0,compatible:!1,lastUpdated:"all"};class FF extends U.Component{constructor(e){super(e),this.updateFilterState=e=>{const{filterState:t}=this.state;this.setState({filterState:Object.assign(Object.assign({},t),e)},this.fetchFirstPage)},this.isAssetsLoaded=()=>!(this.state&&this.state.type===au&&(!this.props.pluginsV2||0===this.props.pluginsV2.length)||this.state&&this.state.type===iu&&(!this.props.themesV2||0===this.props.themesV2.length)),this.getAvailableAssets=({page:e=1,pageSize:t=40,searchValue:n="",compatible:s=!1,rating:i=0,lastUpdated:a="all",numberOfInstallations:r=0})=>{const{installation:o,assetActions:{getAvailable:l}}=this.props,{type:c,source:u}=this.state;let d=u;return this.state.isLoading&&(u.cancel(),d=UF.source(),this.setState({source:d})),this.setState({isLoading:!0}),l({installationId:o.id,assetsType:c,page:e,pageSize:t,term:n,token:d.token,compatible:s,rating:i,lastUpdated:a,numberOfInstallations:r}).catch((()=>{}))},this.checkStickyFilter=()=>{const e=document.documentElement.clientHeight-150,t=document.querySelector("#assets-container .wpt-assets-filter-container > div");if(!t)return;const n=e>t.clientHeight;n!==this.state.isStickyFilter&&this.setState({isStickyFilter:n})},this.isAssetInstalling=(e,t)=>this.props.installingAssets.has(Bc({slug:e.slug,instanceId:t})),this.showAssetDetails=e=>this.setState({selectedItem:e}),this.setLoading=e=>this.setState({isLoading:e}),this.setFiltered=e=>this.setState({isFiltered:e}),this.setSearching=e=>this.setState({isSearching:e}),this.handleSearchItems=(e="")=>{this.setState((t=>({isSearching:""!==e,[`${t.type}SearchValue`]:e.trim()})),(()=>{this.fetchFirstPage()}))},this.handleSearchTyping=e=>{const t=e.trim(),n=this.state[`${this.state.type}SearchValue`];clearTimeout(this.searchTimeout),n!==t&&(n.length<t.length&&t.length>=3||n.length>t.length)&&(this.searchTimeout=setTimeout((()=>this.handleSearchItems(t)),500))},this.handleCloseAssetDetails=()=>this.setState({selectedItem:null}),this.handleGoToPluginsTab=()=>{this.state.type!==au&&this.setState({type:au,activeTab:1,isFiltered:!1},this.fetchFirstPage)},this.handleGoToThemesTab=()=>{this.state.type!==iu&&this.setState({type:iu,activeTab:2,isFiltered:!1},this.fetchFirstPage)},this.handleClearFilter=()=>{this.setState({isFiltered:!1,filterState:NF},this.fetchFirstPage)},this.fetchFirstPage=()=>this.setState({assetsListKey:(new Date).getTime()}),this.handleFetchItems=({page:e,pageSize:t})=>{const{type:n,filterState:{compatible:s,rating:i,lastUpdated:a,numberOfInstallations:r}}=this.state;this.getAvailableAssets({page:e,pageSize:t,searchValue:this.state[`${n}SearchValue`],compatible:s,rating:i,lastUpdated:a,numberOfInstallations:r}).then((e=>(this.setState({items:e.items,totalItems:e.total}),e))).finally((()=>{this.setState({isLoading:!1,isSearching:!1}),this.checkStickyFilter()}))},this.updateInstallingCustomAssetBackgroundTaskOnFinish=()=>{const{installingCustomAssetBackgroundTask:{steps:e,publicParams:{websiteUrls:t,assetType:n}}}=this.state,{installation:s,instancesActions:{setSelectedInstanceId:i,setInstanceActiveTab:a},onClose:r}=this.props,o=n===au?"installCustomPlugin":"installCustomTheme",l=n===au?this.state.installingCustomAssetBackgroundTask.publicParams.pluginName:this.state.installingCustomAssetBackgroundTask.publicParams.themeName,c=Object.assign({},e);c[o].title=(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Ac,{content:n===au?"general-ui.install-custom-asset.pluginInstalledSuccessfully":"general-ui.install-custom-asset.themeInstalledSuccessfully",params:{assetName:l,websiteUrls:t}})," ",(0,L.jsx)(fe,{onClick:()=>{i(s.id,n),a(s.id,n===au?LF.PLUGINS:LF.THEMES),r()},children:n===au?(0,L.jsx)(Ac,{content:"general-ui.install-custom-asset.installedPluginsLink"}):(0,L.jsx)(Ac,{content:"general-ui.install-custom-asset.installedThemesLink"})})]}),this.setState((e=>({installingCustomAssetBackgroundTask:Object.assign(Object.assign({},e.installingCustomAssetBackgroundTask),{steps:c})})))},this.handleOnReceiveInstallCustomAssetBackgroundTaskData=()=>{const{installingCustomAssetBackgroundTaskId:e,installingCustomAssetBackgroundTask:t}=this.state,{tasks:n,installation:s,assetActions:{uploadAndInstallAssetToSingleInstanceFinished:i,uploadAndInstallAssetToSingleInstanceFinishedWithError:a},type:r}=this.props;if(!e)return;const o=iw(e,n);o&&t!==o&&this.setState({installingCustomAssetBackgroundTask:o},(()=>{nw(o)?(this.setState({isInstallingCustomAssetBackgroundTaskProcessing:!1}),this.updateInstallingCustomAssetBackgroundTaskOnFinish(),i(s.id,r).catch((()=>{}))):sw(o)&&(this.setState({isInstallingCustomAssetBackgroundTaskProcessing:!1}),a())}))},this.handleInstallCustomAsset=(e,t)=>{const{isInstallingCustomAssetBackgroundTaskProcessing:n}=this.state,{installation:s,assetActions:{uploadAndInstallAssetToSingleInstance:i}}=this.props;n||1!==t.length||(this.props.onClearDrawerMessages(),i(s.id,e,t[0]).then((e=>{this.setState({showInstallingCustomAssetBackgroundTaskDetails:!0,isInstallingCustomAssetBackgroundTaskProcessing:!0,installingCustomAssetBackgroundTask:null,installingCustomAssetBackgroundTaskId:e.task.id})})).catch((()=>{})))},this.handleInstallCustomAssetRejected=e=>{this.props.onClearDrawerMessages(),this.props.onAddDrawerErrorMessage(e===au?"general-ui.install-custom-asset.pluginFileWrongFormat":"general-ui.install-custom-asset.themeFileWrongFormat",!0)},this.getToolbarGroups=()=>{const e=[],{installingAssets:t}=this.props,{type:n}=this.state;return t.size>0&&e.push((0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(wS,{})," ",(0,L.jsx)(Ac,{content:`general-ui.native-${n}.installing`,params:{number:t.size}},`native-${n}-installing-counter`)]},"installing-assets")),e},this.state=Object.assign(Object.assign({isLoading:!1,isSearching:!1,isFiltered:!1,filterState:NF,items:[],totalItems:0,type:e.type,assetsListKey:(new Date).getTime(),selectedItem:null,isStickyFilter:!1,activeTab:e.type===au?1:2,source:UF.source(),pluginsSearchValue:"",themesSearchValue:""},RF),{isAssetsLoaded:this.isAssetsLoaded()})}componentWillMount(){window.addEventListener("resize",this.checkStickyFilter,!1)}componentDidMount(){this.state.isAssetsLoaded||(this.state.type===au?this.props.pluginsActions.getInstallationPlugins(this.props.installation.id).catch((()=>{})).finally((()=>this.setState({isAssetsLoaded:!0}))):this.props.themesActions.getInstallationThemes(this.props.installation.id).catch((()=>{})).finally((()=>this.setState({isAssetsLoaded:!0}))))}componentDidUpdate(e){e.tasks!==this.props.tasks&&this.handleOnReceiveInstallCustomAssetBackgroundTaskData()}componentWillUnmount(){window.removeEventListener("resize",this.checkStickyFilter)}render(){const{onClose:e,installation:{id:t,displayTitle:n,version:s},pluginsV2:i,themesV2:a,renderDrawerMessages:r}=this.props,{type:o,isLoading:l,isSearching:c,totalItems:u,items:d,selectedItem:p,isFiltered:h,isStickyFilter:m,assetsListKey:f,isInstallingCustomAssetBackgroundTaskProcessing:g,installingCustomAssetBackgroundTask:b,showInstallingCustomAssetBackgroundTaskDetails:v,isAssetsLoaded:y}=this.state;let _=null;return v&&b&&(_=b),(0,L.jsxs)(zi,{id:"native-assets-list",title:(0,L.jsx)(Ac,{content:"general-ui.native-assets.title"}),isOpen:!0,subtitle:n,size:"lg",onClose:e,"data-type":"native-assets",progress:fC(_,(()=>{this.setState({installingCustomAssetBackgroundTask:null})})),hideButton:!1,children:[r(),!y&&(0,L.jsx)(It,{}),y&&(0,L.jsxs)(U.Fragment,{children:[(0,L.jsxs)(Br,{className:"assets-drawer-tabs",search:(0,L.jsx)($r,{autoFocus:!0,loading:c,onSearch:this.handleSearchItems,onTyping:this.handleSearchTyping,style:{maxWidth:500},"data-test-id":o===au?"plugendio-plugins-search-bar":"plugendio-themes-search-bar"}),active:this.state.activeTab,children:[(0,L.jsx)(Fr,{onActivate:this.handleGoToPluginsTab,title:(0,L.jsx)(Ac,{content:"general-ui.tabs.plugins"}),children:(0,L.jsx)(bM,{assetType:o,disabled:g,onUpload:e=>this.handleInstallCustomAsset(o,e),onUploadRejected:()=>this.handleInstallCustomAssetRejected(o)})},1),(0,L.jsx)(Fr,{onActivate:this.handleGoToThemesTab,title:(0,L.jsx)(Ac,{content:"general-ui.tabs.themes"}),children:(0,L.jsx)(bM,{assetType:o,disabled:g,onUpload:e=>this.handleInstallCustomAsset(o,e),onUploadRejected:()=>this.handleInstallCustomAssetRejected(o)})},2)]}),(0,L.jsxs)("div",{id:"assets-container",className:"wpt-display-flex",children:[(0,L.jsx)("div",{className:"wpt-assets-card-list-container",children:(0,L.jsx)(Os,{items:d,totalItems:u,itemKey:"slug",loading:l,onItemsFetch:this.handleFetchItems,view:"row",toolbarGroups:this.getToolbarGroups(),itemRender:e=>(0,L.jsx)(rM,{installation:this.props.installation,item:e,type:o,handleDetailsClick:()=>this.showAssetDetails(e),installedAssets:o===iu?a:i,isInstalling:this.isAssetInstalling(e,t)},`nativeAsset-${e.slug}`)},f)}),(0,L.jsx)("div",{className:"wpt-assets-filter-container","data-test-id":h?"filtered":"",children:(0,L.jsx)("div",{className:m?"wpt-assets-filter-sticky":"",children:(0,L.jsx)(mM,{type:o,onClearFilter:this.handleClearFilter,setLoading:this.setLoading,setFiltered:this.setFiltered,version:s,updateFilterState:this.updateFilterState})})})]}),p&&o===au&&(0,L.jsx)(zi,{isOpen:!0,onClose:this.handleCloseAssetDetails,backButton:!0,className:"assetDetailDrawer","data-type":"asset-detail",title:"",children:(0,L.jsx)(dM,{instanceId:t,item:p,installedAssets:i,isInstalling:this.isAssetInstalling(p,t)})})]})]})}}FF.propTypes={type:Vt().oneOf([au,iu]).isRequired,onClose:Vt().func.isRequired,installation:Vt().shape({id:Vt().number.isRequired,displayTitle:Vt().string.isRequired,version:Vt().string.isRequired}).isRequired,pluginsV2:Vt().array,themesV2:Vt().array,installingAssets:Vt().object.isRequired,tasks:Vt().array,assetActions:Vt().shape({getAvailable:Vt().func.isRequired,uploadAndInstallAssetToSingleInstance:Vt().func.isRequired,uploadAndInstallAssetToSingleInstanceFinished:Vt().func.isRequired,uploadAndInstallAssetToSingleInstanceFinishedWithError:Vt().func.isRequired}).isRequired,instancesActions:Vt().shape({setSelectedInstanceId:Vt().func.isRequired,setInstanceActiveTab:Vt().func.isRequired,getInstancesData:Vt().func.isRequired}).isRequired,pluginsActions:Vt().shape({getInstallationPlugins:Vt().func.isRequired}).isRequired,themesActions:Vt().shape({getInstallationThemes:Vt().func.isRequired}).isRequired,onClearDrawerMessages:Vt().func.isRequired,onAddDrawerErrorMessage:Vt().func.isRequired,renderDrawerMessages:Vt().func.isRequired},FF.defaultProps={tasks:[],pluginsV2:[],themesV2:[]};const YF=(0,so.$j)(((e,t)=>{var n,s;return{pluginsV2:null!==(n=e.instances.pluginsV2[t.installation.id])&&void 0!==n?n:[],themesV2:null!==(s=e.instances.themesV2[t.installation.id])&&void 0!==s?s:[],installingAssets:e.assets.installingAssets,tasks:e.backgroundTasks.tasks}}),(e=>({assetActions:nh(h,e),instancesActions:nh(i,e),pluginsActions:nh(n,e),themesActions:nh(s,e)})))(Lx(FF)),BF="maintenance",HF="debug",VF="security",$F="broken",WF="infected",zF="updates",qF="total",GF="phpOutdated",KF="vulnerable",XF="instances-filter",ZF="instances-sort",JF="instances-sort-order";const QF=e=>{var{baseClassName:t=`${gu}updates-list-col-icon`,className:n="",children:s=null,intent:i,description:a=null}=e,r=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["baseClassName","className","children","intent","description"]);const o="inactive"===i?"muted":i,l=(0,L.jsx)("span",Object.assign({className:mm()(t,{[`${t}--${o}`]:o},n)},r,{children:s}));return a?(0,L.jsx)(je,{className:"maximum-z-index",title:a,children:l}):l};class eY extends U.Component{constructor(){super(...arguments),this.renderPopoverRow=()=>{const{assets:e}=this.props;return(0,L.jsx)("div",{className:"wpt-instances-updates-list_col-popover",children:e.reduce(((e,t)=>(e.push((0,L.jsx)("p",{children:`${t.title} ${t.version} → ${t.availableVersion}`},t.slug)),e)),[])})}}render(){const e=this.props,{assets:t,needToUpdateAssets:n,forceUpdates:s,forceUpdatesDescription:i}=e,a=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["assets","needToUpdateAssets","forceUpdates","forceUpdatesDescription"]);return(0,L.jsxs)("div",Object.assign({className:"wpt-display-flex"},a,{children:[n>0?(0,L.jsx)(An,{target:(0,L.jsx)(fe,{children:n}),children:this.renderPopoverRow()}):(0,L.jsx)(je,{className:"maximum-z-index",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.noUpdatesAvailable"}),children:(0,L.jsx)(Pi,{icon:"circle-check-mark",intent:"success"})}),(0,L.jsx)("span",{className:"wpt-mgl-5",children:"false"===s?null:(0,L.jsx)(QF,{intent:"success",description:i,children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.autoUpdateIsOn"})})})]}))}}eY.defaultProps={forceUpdatesDescription:null};const tY=eY;const nY=e=>{var{version:t,updateVersion:n=null,forceUpdates:s}=e,i=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["version","updateVersion","forceUpdates"]);return(0,L.jsxs)("div",Object.assign({className:"wpt-display-flex"},i,{children:[t&&n?(0,L.jsx)(An,{target:(0,L.jsx)(fe,{children:(0,L.jsx)(je,{className:"maximum-z-index",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.updateVersionDescription"}),children:(0,L.jsx)(Pi,{icon:"triangle-exclamation-mark",intent:"warning"})})}),children:(0,L.jsx)("div",{className:"wpt-instances-updates-list_col-popover",children:`${t} → ${n}`})}):(0,L.jsx)(je,{className:"maximum-z-index",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.noUpdatesAvailable"}),children:(0,L.jsx)(Pi,{icon:"circle-check-mark",intent:"success"})}),(0,L.jsx)("span",{className:"wpt-mgl-5",children:"disabled"===s&&(0,L.jsx)(QF,{intent:"danger",description:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.autoUpdateForCoreIsOffDescription"}),children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.autoUpdateIsOff"})})||"major"===s&&(0,L.jsx)(QF,{intent:"success",description:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.majorAutoUpdateForCoreIsOnDescription"}),children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.majorAutoUpdateIsOn"})})})]}))},sY=({needToAcceptSmartUpdate:e})=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(QF,{intent:"success",description:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.smartUpdateDescription"}),children:"On"}),e&&(0,L.jsx)("span",{className:"wpt-mgl-5",children:(0,L.jsx)(je,{className:"maximum-z-index",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.waitingForAcceptSmartUpdate"}),children:(0,L.jsx)(Pi,{icon:"triangle-exclamation-mark",intent:"warning","data-test-id":"smart-update-waiting-for-accept"})})})]}),iY="WITH_UPDATES",aY="mass-updates-instance-row";class rY extends U.Component{constructor(e){super(e),this.fetchUpdatesAndProcessData=()=>{const e=()=>{this.fetchAndProcessExistentTasks(),this.setListData(),this.dispatchSmartUpdatePromoUAT()},{instancesActions:{fetchAvailableUpdates:t},selectedInstancesIds:n}=this.props;return t(n).finally((()=>e()))},this.fetchAndProcessExistentTasks=()=>{const{backgroundTasksActions:{fetchBackgroundTasks:e}}=this.props,t=this.getUpdateInstancesTasks();t.length>0&&(this.setState({isUpdating:!0}),e(Td.getTasksData,t).then((e=>{if(0===e.length)return this.setState({isUpdating:!1}),void this.handleCheckForUpdates();this.setState({backgroundTaskIds:e.map((e=>e.id))},(()=>this.handleOnUpdateBackgroundTasks(e)))})));const n=this.getInstancesWithCheckUpdateTasks();if(n.length>0){this.setIsCheckingForUpdates(!0);const t=n.reduce(((e,t)=>(e.some((({id:e})=>e===t.tasks.check.id))||e.push({id:t.tasks.check.id,code:xS}),e)),[]);e(Td.getTasksData,t).then((e=>{0!==e.length?this.setState({massCheckUpdateTaskIds:e.map((e=>e.id))},(()=>this.handleOnUpdateMassCheckUpdateTasks(e))):this.setIsCheckingForUpdates(!1)}))}},this.isUpdateDisabled=e=>e.length&&this.props.updates.some((t=>e.includes(t.id.toString())&&!t.applicable)),this.isInstanceUpdateDisabled=e=>!e.applicable,this.isSmartUpdatePromoBannerVisible=()=>{const{showSmartUpdatePromo:e,isSmartUpdatePromoAvailableForMultipleSitesUpdatesScreen:t,installations:n}=this.props,s=n.some((({installationType:e,features:{updates:t}})=>sC(e)&&(Boolean(t.availableVersion)||t.amountOfPluginsWithUpdates>0||t.amountOfThemesWithUpdates>0)));return!(!e||!s)&&(!!t||n.some((({features:e})=>e.updates.smart.promoAvailable)))},this.dispatchSmartUpdatePromoUAT=()=>this.state.showSmartUpdatePromoBanner&&lm("SHOW_MULTIPLE_SITES_UPDATES_DRAWER_SMART_UPDATE_PROMO"),this.setListData=()=>{const{updates:e}=this.props,t=[],n=e.map((e=>{const n=e.id.toString();return ZM(e)&&!this.isInstanceUpdateDisabled(e)&&t.push(n),Object.assign(Object.assign({key:n},e),{id:n,needToAcceptSmartUpdate:this.showNeedToAcceptSmartUpdate(e.smartUpdate.taskStatus,e.smartUpdate.status),disabled:this.props.isUnpaid||this.isInstanceUpdateDisabled(e)})}));this.setState({listData:n,selection:t},(()=>{const e=this.applyFilter(),t=this.applySearch(e);this.setState({showedListData:t})}))},this.showNeedToAcceptSmartUpdate=(e,t=!1)=>t&&null!==e&&cL(e),this.getInstallationById=e=>this.props.installations.find((t=>t.id===+e)),this.getNeedToUpdateInstancesIds=()=>this.props.updates.reduce(((e,t)=>(ZM(t)&&e.push(t.id),e)),[]),this.getNeedToUpdateSelectionInstancesIds=()=>this.getNeedToUpdateInstancesIds().filter((e=>-1!==this.state.selection.indexOf(e.toString()))),this.getInstallationUpdate=e=>this.props.updates.find((t=>+t.id==+e)),this.getUpdateInstancesTasks=()=>this.getInstancesWithUpdateTasks().reduce(((e,t)=>(e.some((({id:e})=>e===t.tasks.update.id))||e.push({id:t.tasks.update.id,code:t.tasks.update.code}),e)),[]),this.getInstancesWithUpdateTasks=()=>this.props.updates.filter((e=>e.tasks.update)),this.getInstancesWithCheckUpdateTasks=()=>this.props.updates.filter((e=>e.tasks.check)),this.clearSelection=()=>{this.setState({selection:[]})},this.applySearch=(e=null)=>{const{search:t}=this.state,n=t.toLowerCase();return e||({listData:e}=this.state),e.filter((e=>!n||-1!==e.displayTitle.toLowerCase().indexOf(n)))},this.applyFilter=(e=null)=>{const{filter:t}=this.state;return e||({listData:e}=this.state),e.filter((e=>{switch(t){case iY:return Boolean(e.core.availableVersion)||e.plugins.length>0||e.themes.length>0;case"ALL":return!0;default:return!1}}))},this.getListColumns=()=>{const e=[{key:"instance",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.instancesList.columns.instance"}),render:e=>this.props.isUnpaid||this.isInstanceUpdateDisabled(e)?(0,L.jsx)(gm,{uatAction:wm,featureName:"update",description:(0,L.jsx)(Ac,{content:"paidFeature.updateFeatureDescription"}),installationId:e.id,isInstanceFeatureDisabled:!1===e.applicable,children:(0,L.jsx)("span",{"data-test-id":aY,"data-test-instance-id":e.id,children:e.displayTitle})}):(0,L.jsx)("span",{"data-test-id":aY,"data-test-instance-id":e.id,children:e.displayTitle})},{key:"wordpress",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.instancesList.columns.wordpress"}),render:e=>(0,L.jsx)(nY,{version:e.core.version,updateVersion:e.core.availableVersion,forceUpdates:String(e.autoUpdate.core),"data-test-id":"mass-updates-core-column","data-test-version":e.core.version,"data-test-update-version":e.core.availableVersion})},{key:"plugins",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.instancesList.columns.plugins"}),render:e=>(0,L.jsx)(tY,{needToUpdateAssets:e.plugins.length,forceUpdates:String(e.autoUpdate.plugins.forceUpdates),forceUpdatesDescription:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.autoUpdateForPluginsIsOnDescription"}),assets:e.plugins,"data-test-id":"mass-updates-plugin-column"})},{key:"themes",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.instancesList.columns.themes"}),render:e=>(0,L.jsx)(tY,{needToUpdateAssets:e.themes.length,forceUpdates:String(e.autoUpdate.themes.forceUpdates),forceUpdatesDescription:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.autoUpdateForThemesIsOnDescription"}),assets:e.themes,"data-test-id":"mass-updates-theme-column"})},{key:"details",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.instancesList.columns.details"}),render:e=>-1===this.state.updateInstancesIds.indexOf(+e.id)?(0,L.jsx)(fe,{icon:"chevron-right",onClick:()=>this.handleOpenInstanceUpdatesDrawer(e.id)}):(0,L.jsx)(Pi,{progress:!0})}];return this.props.showSmartUpdates&&e.splice(-1,0,{key:"smart-update",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.instancesList.columns.smart-update"}),render:e=>e.smartUpdate.status?(0,L.jsx)(sY,{needToAcceptSmartUpdate:e.needToAcceptSmartUpdate}):null}),e},this.handleSelectionChange=e=>this.setState({selection:e}),this.handleDisableSmartUpdatePromo=()=>{this.setState({showSmartUpdatePromoBanner:!1}),this.props.appActions.disableSmartUpdatePromoForMultipleSitesUpdatesScreen({instanceIds:this.getNeedToUpdateInstancesIds()}),lm("CLICK_MULTIPLE_SITES_UPDATES_DRAWER_SMART_UPDATE_PROMO_CLOSE_BUTTON")},this.handleOnUpdateBackgroundTasks=e=>{const{instancesActions:{fetchAvailableUpdates:t}}=this.props,{backgroundTaskIds:n,updateInstancesIds:s}=this.state;let i=s;const a=[],r=this.getInstancesWithUpdateTasks();n.forEach((t=>{const n=iw(t,e);if(!n)return;tw(n)&&(n.errors.length>0&&(this.props.addErrorMessage(n.errors.join("\n")),this.setState({hasUpdateErrors:!0,isUpdating:!1,updateInstancesIds:[]})),this.setState((e=>({backgroundTaskIds:e.backgroundTaskIds.filter((e=>e!==n.id))}))));const{currentlyUpdatingInstallationId:s,successfullyUpdatedInstallationsIds:o=[]}=n.publicParams;i.filter((e=>!o.includes(e)||(a.includes(e)||a.push(e),!1))),s&&!i.includes(s)&&(i=i.concat(s));const l=r.filter((e=>e.tasks.update.id===n.id));l.length>0&&l.forEach((e=>{tw(n)&&!a.includes(e.id)&&a.push(e.id),n.code===mb||tw(n)||i.includes(e.id)||(i=i.concat(e.id))}))})),r.filter((e=>!i.includes(e.id))).forEach((e=>{n.includes(e.tasks.update.id)||a.includes(e.id)||a.push(e.id)})),s!==i&&this.setState({updateInstancesIds:i}),a.length&&t(a).then((()=>{this.setState((e=>({updateInstancesIds:Zc(e.updateInstancesIds,a)})),this.handleOnAllInstancesUpdated)}))},this.handleOnUpdateMassCheckUpdateTasks=e=>{const{massCheckUpdateTaskIds:t}=this.state,{addSuccessMessage:n,addErrorMessage:s}=this.props;let i=!0,a=!1;t.forEach((t=>{const n=iw(t,e);n&&(tw(n)?(n.errors.length>0&&(s(n.errors.join("\n")),a=!0),i=i&&!0,this.setState((e=>({massCheckUpdateTaskIds:e.massCheckUpdateTaskIds.filter((e=>e!==n.id))})))):i=!1)})),i&&(a||n("common.task_mass_check_updates_done",!0,"resetCacheSuccess"),this.setIsCheckingForUpdates(!1))},this.handleOnAllInstancesUpdated=()=>{const{instancesActions:{instancesMassUpdateFinished:e,instancesMassUpdateFailed:t},addSuccessMessage:n}=this.props;this.state.updateInstancesIds.length>0||(this.state.hasUpdateErrors?t():(n("list-ui.instancesUpdates.updatingInstancesItems.success",!0,"updatingInstancesItemsSuccess"),e()),this.setState({isUpdating:!1,hasUpdateErrors:!1}))},this.handleUpdate=()=>{const{instancesActions:{updateItems:e},clearMessages:t}=this.props,n=this.getNeedToUpdateSelectionInstancesIds().map((e=>{var t;const n=this.getInstallationUpdate(e);return{installationId:+e,core:{update:null!==((null===(t=n.core)||void 0===t?void 0:t.availableVersion)||null),restorePoint:!1},plugins:n.plugins.map((e=>e.slug)),themes:n.themes.map((e=>e.slug))}}));t(),this.setState({isUpdating:!0}),e(n).then((e=>{this.setState((t=>({backgroundTaskIds:t.backgroundTaskIds.concat(e.id)})))})).catch((()=>{this.setState({isUpdating:!1})}))},this.handleCheckForUpdates=()=>{const{clearMessages:e,instancesActions:{checkUpdates:t}}=this.props;e();const n=this.state.selection.map((e=>+e));n.length<1||(this.setIsCheckingForUpdates(!0),t(n).then((e=>{this.setState((t=>({massCheckUpdateTaskIds:t.massCheckUpdateTaskIds.concat(e.id)})))})).catch((()=>{})))},this.handleSearch=e=>this.setState({search:e},(()=>{this.clearSelection(),this.setListData()})),this.handleFilter=e=>this.setState({filter:e},(()=>{this.clearSelection(),this.setListData()})),this.handleOpenInstanceUpdatesDrawer=e=>this.setState({currentInstanceId:e,showInstanceUpdatesDrawer:!0}),this.handleCloseInstanceUpdatesDrawer=()=>{this.setState({currentInstanceId:null,showInstanceUpdatesDrawer:!1}),this.fetchUpdatesAndProcessData().catch((()=>{}))},this.handleToggleSettingsDrawer=()=>{this.setState((e=>({showSettingsDrawer:!e.showSettingsDrawer,settingsSelection:e.showSettingsDrawer?[]:[...e.selection]})))},this.renderToolbar=()=>{const{updates:e,isUnpaid:t}=this.props,{isUpdating:n,showedListData:s,selection:i,isCheckingForUpdates:a}=this.state,r=this.getNeedToUpdateSelectionInstancesIds(),o=e.some((e=>e.autoUpdate.available));return(0,L.jsxs)(Ss,{className:"wpt-mgt-10",children:[(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{intent:"primary",disabled:t||this.isUpdateDisabled(i)||a||0===r.length||0===s.length,state:n?"loading":void 0,onClick:this.handleUpdate,"data-test-id":"mass-updates-update-button",children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.updateButton"})})}),o&&(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{disabled:0===i.length,onClick:this.handleToggleSettingsDrawer,"data-test-id":"mass-updates-settings-button",children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.changeSettingsButton"})})}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{icon:"refresh",disabled:n||0===i.length,state:a?"loading":void 0,onClick:this.handleCheckForUpdates,"data-test-id":"mass-updates-check-updates-button",children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.checkForUpdatesButton"})})}),(0,L.jsx)(ts,{}),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)($r,{onTyping:this.handleSearch})})]})},this.renderLastUpdatePanel=()=>{const{isCheckingForUpdates:e}=this.state,{updates:t}=this.props;if(e)return null;const n=t.reduce(((e,t)=>(t.lastCheckUpdateTimestamp&&e.push(t.lastCheckUpdateTimestamp),e)),[]);if(0===n.length)return(0,L.jsx)(Ar,{className:"wpt-mgt-15",children:(0,L.jsx)(Wn,{className:"wpt-instances-updates_last-update-date",children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.lastUpdateDateIsUnknown"})})});const s=new Date(1e3*Math.min(...n));return(0,L.jsx)(Ar,{className:"wpt-mgt-15",children:(0,L.jsx)(Wn,{className:"wpt-instances-updates_last-update-date",children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.lastUpdateDate",params:{lastUpdateDate:s.toLocaleString()}})})})},this.handleOpenUpdateSettings=()=>this.setState({isUpdateSettingsOpened:!0}),this.handleCloseUpdateSettings=()=>this.setState({isUpdateSettingsOpened:!1}),this.setIsCheckingForUpdates=e=>this.setState({isCheckingForUpdates:e}),this.renderInstanceUpdatesDrawer=()=>{const{currentInstanceId:e,showInstanceUpdatesDrawer:t,isUpdateSettingsOpened:n}=this.state;if(!t)return null;const s=this.getInstallationUpdate(e),i=this.getInstallationById(e);return i&&s?(0,L.jsx)(tA,{installation:i,title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.instanceUpdatesDrawerTitle"}),onClose:this.handleCloseInstanceUpdatesDrawer,backButton:!0,isOpen:t,openUpdatesType:"",onOpenUpdatesSettingsDialog:this.handleOpenUpdateSettings,onCloseUpdatesSettingsDialog:this.handleCloseUpdateSettings,isUpdateSettingsFormOpen:n}):null},this.renderInstancesList=()=>{const{showedListData:e,selection:t}=this.state,{isUpdating:n,isCheckingForUpdates:s}=this.state;return!n&&s?(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.checkingForUpdates"}):0===e.length?(0,L.jsx)("div",{className:"wpt-mgt-15","data-test-id":"mass-updates-updates-not-found",children:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.updatesNotFound"})}):(0,L.jsx)(Wa,{className:"wpt-mgt-15",columns:this.getListColumns(),data:e,selection:t,onSelectionChange:this.handleSelectionChange,"data-test-id":"mass-updates-instances-list"})},this.renderMultipleSitesAutoUpdatesSettingsDrawer=()=>{if(!this.state.showSettingsDrawer)return null;const{settingsSelection:e}=this.state,t=e.length,n=this.props.updates.filter((t=>qc(e,t.id.toString())));return(0,L.jsx)(nD,{title:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.title",params:{sitesCount:t}}),subtitle:(0,L.jsx)(Ac,{content:"multipleSitesAutoUpdatesSettingsDrawer.subtitle"}),isOpen:!0,"data-type":"instances-updates-settings",updates:n,onClose:this.handleToggleSettingsDrawer,addSuccessMessage:this.props.addSuccessMessage})},this.renderFilter=()=>{const{filter:e}=this.state,{updates:t}=this.props,n=this.getNeedToUpdateInstancesIds();return(0,L.jsxs)(Ss,{className:"wpt-mgt-10",children:[(0,L.jsx)(ts,{},"toolbarExpander"),(0,L.jsx)(_s,{title:"",children:(0,L.jsx)($n,{label:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.filterByLabel"}),labelPlacement:"left",buttons:[{value:"ALL",title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.filterAll",params:{count:t.length}}),"data-test-id":"mass-updates-filter-all"},{value:iY,title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.filterUpdates",params:{count:n.length}}),disabled:!1,"data-test-id":"mass-updates-filter-outdated"}],selected:e,onChange:this.handleFilter})},"toolbarShowInstances")]})},this.renderSmartUpdatePromo=()=>(0,L.jsx)(XM,{isOpen:this.state.showSmartUpdatePromoBanner,onClose:this.handleDisableSmartUpdatePromo,uatActions:{showPopover:"SHOW_MULTIPLE_SITES_UPDATES_DRAWER_SMART_UPDATE_PROMO_POPOVER",clickPopoverCloseButton:"CLICK_MULTIPLE_SITES_UPDATES_DRAWER_SMART_UPDATE_PROMO_POPOVER_CLOSE_BUTTON",clickOpenStoreButton:"CLICK_MULTIPLE_SITES_UPDATES_DRAWER_SMART_UPDATE_PROMO_POPOVER_OPEN_STORE_BUTTON",clickTryNowButton:"CLICK_MULTIPLE_SITES_UPDATES_DRAWER_SMART_UPDATE_PROMO_TRY_NOW_BUTTON"}}),this.renderPaidFeatureDesc=()=>{const{isUnpaid:e,upgradeUrl:t,premiumFeaturesUrl:n,updates:s}=this.props,i=s.map((e=>e.id.toString()));return e||this.isUpdateDisabled(i)?(0,L.jsx)(pm,{uatAction:wm,purchaseLicenseUrl:t,premiumFeaturesUrl:n,children:(0,L.jsx)(Ac,{content:"paidFeature.updateFeatureDescription"})}):null},this.state={listData:[],showedListData:[],selection:[],search:"",currentInstanceId:null,updateInstancesIds:[],isUpdating:!1,isCheckingForUpdates:!1,showInstanceUpdatesDrawer:!1,showSettingsDrawer:!1,showSmartUpdatePromoBanner:this.isSmartUpdatePromoBannerVisible(),filter:iY,backgroundTaskIds:[],hasUpdateErrors:!1,massCheckUpdateTaskIds:[],isUpdateSettingsOpened:!1,isInitialDataLoading:!0}}componentWillMount(){this.props.instancesActions.cleanUpUpdatesStore()}componentDidMount(){this.fetchUpdatesAndProcessData().catch((()=>{})).finally((()=>this.setState({isInitialDataLoading:!1})))}componentWillReceiveProps(e,t){const{backgroundTaskIds:n,massCheckUpdateTaskIds:s}=this.state;n.length&&e.tasks!==this.props.tasks&&this.handleOnUpdateBackgroundTasks(e.tasks),s.length&&this.handleOnUpdateMassCheckUpdateTasks(e.tasks)}componentDidUpdate(e,t,n){e.updates!==this.props.updates&&this.setListData()}componentWillUnmount(){this.props.instancesActions.cleanUpUpdatesStore()}render(){return this.state.isInitialDataLoading?(0,L.jsx)(It,{}):(0,L.jsxs)(U.Fragment,{children:[this.renderPaidFeatureDesc(),this.renderSmartUpdatePromo(),(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.headDescription"}),this.renderToolbar(),this.renderFilter(),this.renderLastUpdatePanel(),this.renderInstancesList(),this.renderInstanceUpdatesDrawer(),this.renderMultipleSitesAutoUpdatesSettingsDrawer()]})}}rY.propTypes={selectedInstancesIds:Vt().array.isRequired,updates:Vt().array,installations:Vt().arrayOf(Vt().shape({id:Vt().number.isRequired,installationType:Vt().oneOf(Object.values(c)).isRequired,features:{updates:Vt().shape({availableVersion:Vt().string.isRequired,amountOfPluginsWithUpdates:Vt().number.isRequired,amountOfThemesWithUpdates:Vt().number.isRequired,smart:Vt().shape({available:Vt().bool.isRequired,status:Vt().bool,promoAvailable:Vt().bool.isRequired}).isRequired})}.isRequired})).isRequired,tasks:Vt().array,showSmartUpdates:Vt().bool.isRequired,showSmartUpdatePromo:Vt().bool.isRequired,isSmartUpdatePromoAvailableForMultipleSitesUpdatesScreen:Vt().bool.isRequired,clearMessages:Vt().func.isRequired,addSuccessMessage:Vt().func.isRequired,addErrorMessage:Vt().func.isRequired,appActions:Vt().shape({disableSmartUpdatePromoForMultipleSitesUpdatesScreen:Vt().func.isRequired}).isRequired,instancesActions:Vt().shape({updateItems:Vt().func.isRequired,getInstancesData:Vt().func.isRequired,fetchAvailableUpdates:Vt().func.isRequired,checkUpdates:Vt().func.isRequired,instancesMassUpdateFinished:Vt().func.isRequired,instancesMassUpdateFailed:Vt().func.isRequired,setInstanceActiveTab:Vt().func.isRequired,cleanUpUpdatesStore:Vt().func.isRequired}).isRequired,backgroundTasksActions:Vt().shape({fetchBackgroundTasks:Vt().func.isRequired}).isRequired,isUnpaid:Vt().bool.isRequired,upgradeUrl:Vt().string.isRequired,premiumFeaturesUrl:Vt().string},rY.defaultProps={tasks:[],premiumFeaturesUrl:null,updates:[]};const oY=(0,so.$j)((e=>({installations:e.instances.installations,updates:e.updates,showSmartUpdates:e.app.options.showSmartUpdates,tasks:e.backgroundTasks.tasks,showSmartUpdatePromo:e.app.options.showSmartUpdatePromo,isSmartUpdatePromoAvailableForMultipleSitesUpdatesScreen:e.app.options.isSmartUpdatePromoAvailableForMultipleSitesUpdatesScreen,isUnpaid:e.app.unpaidFeatures.update,upgradeUrl:e.app.urls.featuresBuyLinks.update,premiumFeaturesUrl:e.app.urls.premiumFeaturesUrl})),(t=>({appActions:nh(e,t),instancesActions:nh(i,t),backgroundTasksActions:nh({fetchBackgroundTasks:ow},t)})))(rY);class lY extends U.Component{constructor(e){super(e),this.renderUrlColumn=e=>(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(e,Object.assign(Object.assign({},Ix.defaults),{transformTags:{a:(e,t)=>({tagName:"a",attribs:Object.assign(Object.assign({},t),{target:"_blank"})})}}))}}),this.getColumns=()=>[{key:"url",title:"",width:"90%",render:e=>this.renderUrlColumn(e.url||"")},{key:"status",title:"",width:"10%"}],this.getData=()=>this.props.installationsToRemove.map((e=>{const t=e.isPossibleToRemove?"success":"danger";return Object.assign(Object.assign({},e),{key:e.id.toString(),status:(0,L.jsx)(An,{target:(0,L.jsx)(Pi,{intent:t}),placement:"top-right",children:e.hintMessage})})})),this.handleChangeActionLogRemoveOption=e=>{var t,n;this.setState({actionLogChecked:e}),null===(n=(t=this.props).changeRemoveOptions)||void 0===n||n.call(t,{ActionLog:e})},this.state={actionLogChecked:!0}}render(){const{title:e,actionLogFeatureEnabled:t,actionLogRemoveLabel:n}=this.props,{actionLogChecked:s}=this.state;return(0,L.jsxs)(L.Fragment,{children:[e,(0,L.jsx)(Wa,{columns:this.getColumns(),data:this.getData()}),t&&(0,L.jsx)(it,{checked:s,onChange:this.handleChangeActionLogRemoveOption,children:n})]})}}lY.defaultProps={actionLogFeatureEnabled:!1,actionLogRemoveLabel:null};const cY=lY,uY=e=>{const t=Mc();return(0,L.jsx)(ga,Object.assign({},e,{placeholder:t(e.placeholder)}))};var dY=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n};const pY="directoryHidesAnotherWordpress",hY="directoryHidesAnotherApplication",mY="directoryHasUserFiles",fY="major",gY="minor",bY="true",vY="false",yY="disabledWithUpdates",_Y="true",xY="false",SY="disabledWithUpdates";class wY extends U.Component{constructor(e){super(e),this.componentDidUpdate=(e,t)=>{!e.isOpen&&this.props.isOpen&&this.handleOpenAndLoadData(),this.state.installationPath!==t.installationPath&&this.updateInstallationPathStatus(this.state.domain,this.state.installationPath),this.state.domain!==t.domain&&this.updateInstallationPathStatus(this.state.domain,this.state.installationPath),this.state.pathLocked!==t.pathLocked&&this.setPathValidationProcessed(!0),this.props.tasks!==e.tasks&&this.handleUpdateBackgroundTasks()},this.getInstallationStub=(e,t)=>{const{getInstallationStub:n}=this.props;return this.setState({isWrongParams:!1}),n(e,t).then((({title:{value:e},installationPath:{value:t},admin:{value:{login:{value:n},password:{value:s},email:{value:i}}},database:{value:{name:{value:a,meta:{isCustomizationAllowed:r}},server:{value:o,meta:{choices:l}},userName:{value:c},userPassword:{value:u},tablePrefix:{value:d},namePrefix:{value:p},userNamePrefix:{value:h}}},autoUpdate:{value:{core:{value:m},plugins:{value:{forceUpdates:{value:f},newlyInstalledUpdates:{value:g},updateVulnerable:{value:b},deactivateVulnerable:{value:v}}},themes:{value:{forceUpdates:{value:y},newlyInstalledUpdates:{value:_},updateVulnerable:{value:x}}}},meta:{isCustomizationAllowed:S}},protocol:{value:w,meta:{choices:k}},domain:{value:j,meta:{choices:T}},version:{value:C,meta:{choices:D}},language:{value:P,meta:{choices:I}},set:{value:O,meta:{choices:L}}})=>{this.setState({title:e,installationPath:t,admin:{email:i,login:n,password:s},database:{name:a,userName:c,userPassword:u,tablePrefix:d,server:o},dbNamePrefix:p,dbUserNamePrefix:h,dbServers:l,isDatabaseCustomizationAllowed:r,autoUpdate:{core:m,plugins:{forceUpdates:!f&&b?yY:f.toString(),newlyInstalledUpdates:g,updateVulnerable:b,deactivateVulnerable:v},themes:{forceUpdates:!y&&x?SY:y.toString(),newlyInstalledUpdates:_,updateVulnerable:x}},isAutoUpdatesCustomizationAllowed:S,protocol:w,protocols:k,domain:j,domains:T,version:C,versions:D,language:P,languages:I,set:O,sets:L},this.checkDomain)})).catch((e=>{var t,n;if(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors){const t=e.response.data.formErrors,{domain:n}=t,s=dY(t,["domain"]);n&&(s.installationFullPath=n),this.setState((()=>({errors:s})))}this.setState({isWrongParams:!0})}))},this.setPathValidationProcessed=e=>this.setState({pathValidationProcessed:e}),this.setDatabaseSettings=(e,t)=>this.setState((n=>({database:Object.assign(Object.assign({},n.database),{[e]:t})}))),this.pathIsLocked=e=>e&&Object.keys(e).find((e=>-1!==[pY,hY,mY].indexOf(e)))||null,this.updateInstallationPathStatus=(e,t)=>{if(this.setState({overwrite:!1,pathLocked:!1,pathLockedReason:null}),this.state.errors&&this.state.errors.installationFullPath){const e=this.state.errors,{installationFullPath:t}=e,n=dY(e,["installationFullPath"]);this.setState({errors:n})}this.debounceValidatePrefix&&this.debounceValidatePrefix.clear(),this.debounceValidatePrefix=(0,hF.debounce)((()=>this.props.validateInstallationPath(e,t).catch((e=>{var t,n,s,i,a,r;if(null===(s=null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors)||void 0===s?void 0:s.installationPath){const t=this.pathIsLocked(e.response.data.formErrors.installationPath),n=!!t;this.setState((s=>({pathLocked:n,pathLockedReason:t,errors:Object.assign(Object.assign({},s.errors),{installationFullPath:!n&&e.response.data.formErrors.installationPath})})))}(null===(r=null===(a=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.formErrors)||void 0===r?void 0:r.domain)&&this.setState((t=>({errors:Object.assign(Object.assign({},t.errors),{installationFullPath:Object.assign(Object.assign({},t.errors.installationFullPath),e.response.data.formErrors.domain)})})))}))),500),this.debounceValidatePrefix()},this.handleSubmit=e=>{if(this.isSubmitDisabled())return;const{createInstallation:t,onBeforeInstallation:n,addErrorMessage:s,onClearDrawerMessages:i,redirectToDomainOverviewOnDone:a}=this.props;i(),this.setState({isProcessing:!0}),n&&n(),(e=Object.assign(Object.assign({},e),{autoUpdate:Object.assign(Object.assign({},e.autoUpdate),{plugins:Object.assign(Object.assign({},e.autoUpdate.plugins),{updateVulnerable:!1}),themes:Object.assign(Object.assign({},e.autoUpdate.themes),{updateVulnerable:!1})})})).autoUpdate.plugins.forceUpdates===yY&&(e.autoUpdate.plugins.forceUpdates=vY,e.autoUpdate.plugins.updateVulnerable=!0),e.autoUpdate.themes.forceUpdates===SY&&(e.autoUpdate.themes.forceUpdates=xY,e.autoUpdate.themes.updateVulnerable=!0);const r=Object.assign(Object.assign({},e),{domain:e.domain,set:parseInt(e.set),overwrite:this.state.overwrite,autoUpdate:Object.assign(Object.assign({},e.autoUpdate),{plugins:Object.assign(Object.assign({},e.autoUpdate.plugins),{forceUpdates:"true"===e.autoUpdate.plugins.forceUpdates}),themes:Object.assign(Object.assign({},e.autoUpdate.themes),{forceUpdates:"true"===e.autoUpdate.themes.forceUpdates})}),showDomainOverviewLinkOnDone:a});this.setIsFirstInstallationOnDomain(),t(r).then((e=>this.setState({installationTaskId:e.id}))).catch((e=>{var t,n,i,a;if(null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.formErrors){const{formErrors:t}=e.response.data,n={};t.installationPath&&Object.assign(n,t.installationPath),t.protocol&&Object.assign(n,t.protocol),t.domain&&Object.assign(n,t.domain),Object.keys(n).length>0&&(t.installationFullPath=n),this.setState({errors:t,isDatabaseSectionCollapsible:!this.isErrorsForDatabaseSectionExists(t)}),t.installationFullPath&&this.setState({pathLocked:!1})}else if(e instanceof Yf){const t=(null===(a=null===(i=null==e?void 0:e.response)||void 0===i?void 0:i.data)||void 0===a?void 0:a.meta)||e.toString();s((0,L.jsx)(Ac,{content:"list-ui.instanceInstall.failedBackgroundTask",params:{message:t}}))}else{const{message:t}=e.response.data.meta;s((0,L.jsx)(Ac,{content:t}))}})).finally((()=>{this.setState({isProcessing:!1})}))},this.handleToggleSetPopover=()=>{var e;this.setState((e=>({showSetPopover:!e.showSetPopover}))),(null===(e=this.state.currentSet)||void 0===e?void 0:e.id)!==parseInt(this.state.set)&&(this.setState({currentSet:{}}),this.props.getSetDetails(this.state.set).then((e=>{this.setState({currentSet:e})})).catch((()=>{})))},this.handleToggleCoreUpdatesPopover=()=>this.setState((e=>({showCoreUpdatesPopover:!e.showCoreUpdatesPopover}))),this.handleChangeWpVersion=e=>{let t=fY;bD().compare(e,"5.6","<")&&(t=gY),this.setState((e=>({autoUpdate:Object.assign(Object.assign({},e.autoUpdate),{core:t})})))},this.checkDomain=()=>{const{protocols:e,protocol:t}=this.state,{onClearDrawerMessages:n,onAddDrawerWarningMessage:s}=this.props;n(),e.length>1&&"http"===t&&s("list-ui.instanceInstall.selectHTTPSProtocolDescription",!0,"installationFullPath"),1===e.length&&s("list-ui.instanceInstall.enableSSLSupportDescription",!0,"installationFullPath")},this.onChangeProtocol=e=>this.setState({protocol:e},this.checkDomain),this.onChangeDomain=e=>{const{version:t}=this.state;this.setState({isDomainSettingsLoading:!0}),this.getInstallationStub(e,t).finally((()=>{this.setState({isDomainSettingsLoading:!1})}))},this.renderInstallationFullPathControl=e=>{const{domains:t,protocols:n,installationPath:s}=this.state,{baseClassName:i}=this.props;return(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.installationPrefix"}),name:"installationFullPath",className:`${i}__installation-path`,children:[this.renderDropdownControl({name:"protocol",options:n,disabled:e||1===n.length,onChange:e=>this.onChangeProtocol(e),size:"xs"}),(0,L.jsx)("span",{className:`${i}__installation-path_separators`,children:"://"}),this.renderObjectSwitcherControl({name:"domain",options:t,disabled:e||1===t.length,onChange:e=>this.onChangeDomain(e)}),(0,L.jsx)("span",{className:`${i}__installation-path_separators`,children:"/"}),(0,L.jsx)(mF,{type:"text",name:"installationPath",onChange:e=>Rc(e,(()=>this.setState({installationPath:e.target.value}))),value:s,placeholder:"list-ui.instanceInstall.installationPrefixPlaceholder",disabled:e}),this.renderWpInstalledWarning()]})},this.renderObjectSwitcherControl=({name:e,options:t,disabled:n,onChange:s=null})=>(0,L.jsx)(Ta,{value:this.state.domain,name:e,id:`${e}-select-container`,onChange:s,"data-test-id":e,disabled:n,searchable:!0,className:`${this.props.baseClassName}__installation-path_domain-selector`,children:t?t.map((({value:e,title:t})=>(0,L.jsx)(wa,{value:e,children:t},e))):[]}),this.renderFormFieldText=({name:e,label:t,placeholder:n,prefix:s,disabled:i,dataTestId:a=""})=>(0,L.jsxs)(ui,{name:e,label:t,"data-test-id":a,children:[s?(0,L.jsx)(Wn,{children:s}):null,(0,L.jsx)(mF,{type:"text",placeholder:n,value:this.state[e],onChange:t=>Rc(t,(()=>this.setState({[e]:t.target.value}))),disabled:i})]}),this.renderFormFieldPassword=({name:e,label:t})=>(0,L.jsx)(ra,{name:e,label:t,onChange:t=>this.setState({[e]:t})}),this.renderFormFieldDropdown=({name:e,label:t,options:n,onChange:s=null,disabled:i=!1,dataTestId:a=null})=>(0,L.jsx)(ui,{label:t,name:e,children:this.renderDropdownControl({name:e,options:n,disabled:i,onChange:s,dataTestId:a})}),this.renderDropdownControl=({name:e,options:t,disabled:n=!1,onChange:s=null,dataTestId:i=null,size:a=null})=>(0,L.jsx)(Ta,{name:e,"data-test-id":i,value:this.state[e],onChange:t=>{"function"==typeof s&&s(t),this.setState({[e]:t})},disabled:n,size:a,children:t?t.map((({value:e,title:t})=>(0,L.jsx)(wa,{"data-test-value":e,value:e.toString(),children:t},e))):[]}),this.isSubmitDisabled=()=>{const{isProcessing:e,isWrongParams:t,pathLocked:n,overwrite:s}=this.state;return e||t||n&&!s},this.isErrorsForDatabaseSectionExists=e=>!(!e||e.length<=0)&&["name","tablePrefix","dbUserName","dbUserPassword"].filter((t=>e&&e.hasOwnProperty("database")&&e.database.hasOwnProperty(t))).length>0,this.renderDbServerControl=({disabled:e})=>{const{database:t,dbServers:n}=this.state;return!n||n.length<=1?null:(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.dbServer"}),children:(0,L.jsx)(Ta,{name:"database[server]","data-test-id":"instance-install-form-field-dbServerId",value:t.server,onChange:e=>this.setState((t=>({database:Object.assign(Object.assign({},t.database),{server:e})}))),disabled:e,children:n.map((({value:e,title:t})=>(0,L.jsx)(wa,{value:e.toString(),children:t},e)))})})},this.renderAutoUpdates=()=>{const{isAutoUpdatesCustomizationAllowed:e}=this.state;return e?(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.autoUpdatesSettings.sectionTitle"}),collapsible:!0,collapsed:!0,className:"wp-instance-install_section",children:[(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.autoUpdatesSettings.description"})}),this.renderCoreAutoUpdates(),this.renderPluginsAutoUpdates(),this.renderThemesAutoUpdates()]}):null},this.renderCoreAutoUpdates=()=>{const{autoUpdate:{core:e},showCoreUpdatesPopover:t}=this.state;return(0,L.jsx)(oa,{name:"autoUpdate[core]",label:(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdatesLabel"}),(0,L.jsx)(An,{visible:t,onClose:this.handleToggleCoreUpdatesPopover,target:(0,L.jsx)(fe,{onClick:e=>Rc(e,this.handleToggleCoreUpdatesPopover),icon:"circle-info",className:"wpt-mgl-5"}),children:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdatesPopoverContent"})})]}),value:e,options:[{value:"disabled",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdates.disabledOptionLabel"}),description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdates.disabledOptionDescription"})},{value:gY,label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdates.minorOptionLabel"}),description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdates.minorOptionDescription"})},{value:fY,label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdates.majorOptionLabel"}),description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.coreAutoUpdates.majorOptionDescription"})}],onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{core:e})})))})},this.renderPluginsAutoUpdates=()=>{const{autoUpdate:{plugins:{forceUpdates:e,newlyInstalledUpdates:t,deactivateVulnerable:n}}}=this.state,{vulnerabilityFeatureEnabled:s}=this.props;return(0,L.jsx)(oa,{name:"autoUpdate[plugins][forceUpdates]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdatesLabel"}),value:e,options:[{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.disabledOptionLabel"}),value:vY,description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.disabledOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.newlyInstalledPluginsAutoUpdates"}),name:"autoUpdate[plugins][newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{plugins:Object.assign(Object.assign({},t.autoUpdate.plugins),{newlyInstalledUpdates:e})})})))},"newlyInstalledPluginsAutoUpdates")]},s?{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.disabledWithSecureUpdatesOptionLabel"}),value:yY,description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.disabledWithSecureUpdatesOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.newlyInstalledPluginsAutoUpdates"}),name:"autoUpdate[plugins][newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{plugins:Object.assign(Object.assign({},t.autoUpdate.plugins),{newlyInstalledUpdates:e})})})))},"newlyInstalledPluginsAutoUpdates"),(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.deactivateVulnerablePlugins"}),name:"autoUpdate[plugins][deactivateVulnerable]",value:n,onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{plugins:Object.assign(Object.assign({},t.autoUpdate.plugins),{deactivateVulnerable:e})})})))},"deactivateVulnerablePlugins")]}:null,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.enabledOptionLabel"}),value:bY,description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.enabledOptionDescription"}),indentFields:s?[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.pluginsAutoUpdates.deactivateVulnerablePlugins"}),name:"autoUpdate[plugins][deactivateVulnerable]",value:n,onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{plugins:Object.assign(Object.assign({},t.autoUpdate.plugins),{deactivateVulnerable:e})})})))},"deactivateVulnerablePlugins")]:[]}].filter((e=>e)),onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{plugins:Object.assign(Object.assign({},t.autoUpdate.plugins),{forceUpdates:e})})})))})},this.renderThemesAutoUpdates=()=>{const{autoUpdate:{themes:{forceUpdates:e,newlyInstalledUpdates:t}}}=this.state,{vulnerabilityFeatureEnabled:n}=this.props;return(0,L.jsx)(oa,{name:"autoUpdate[themes][forceUpdates]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdatesLabel"}),value:e.toString(),options:[{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.disabledOptionLabel"}),value:xY,description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.disabledOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.newlyInstalledThemesAutoUpdates"}),name:"autoUpdate[themes][newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{themes:Object.assign(Object.assign({},t.autoUpdate.themes),{newlyInstalledUpdates:e})})})))},"newlyInstalledThemesAutoUpdates")]},n?{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.disabledWithSecureUpdatesOptionLabel"}),value:SY,description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.disabledWithSecureUpdatesOptionDescription"}),indentFields:[(0,L.jsx)(Zi,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.newlyInstalledThemesAutoUpdates"}),name:"autoUpdate[themes][newlyInstalledUpdates]",value:t,onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{themes:Object.assign(Object.assign({},t.autoUpdate.themes),{newlyInstalledUpdates:e})})})))},"newlyInstalledThemesAutoUpdates")]}:null,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.enabledOptionLabel"}),value:_Y,description:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.themesAutoUpdates.enabledOptionDescription"})}].filter((e=>e)),onChange:e=>this.setState((t=>({autoUpdate:Object.assign(Object.assign({},t.autoUpdate),{themes:Object.assign(Object.assign({},t.autoUpdate.themes),{forceUpdates:e})})})))})},this.renderSetAssets=()=>{const{set:e,currentSet:t}=this.state;if(!e||"0"===e)return null;const n=(e,t)=>t&&t.length?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(Ac,{content:`list-ui.instanceInstall.set.${e}`}),":",(0,L.jsx)("ul",{children:t.filter((e=>e.slug&&e.title)).map((e=>(0,L.jsx)("li",{children:e.title},e.slug)))})]}):null;return(0,L.jsxs)(An,{visible:this.state.showSetPopover,onClose:this.handleToggleSetPopover,target:(0,L.jsx)(fe,{onClick:e=>Rc(e,this.handleToggleSetPopover),icon:"circle-info",className:"wpt-mgl-5"}),title:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.set.popoverTitle"}),children:[!(null==t?void 0:t.id)&&(0,L.jsx)(wS,{}),n(au,t.plugins),n(iu,t.themes)]})},this.renderSetControl=e=>{const{sets:t}=this.state;return t&&t.length?(0,L.jsxs)(ui,{label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.set.title"}),children:[this.renderDropdownControl({name:"set",options:t,dataTestId:"instance-install-form-field-set",disabled:e}),this.renderSetAssets()]}):null},this.renderWpInstalledWarning=()=>{if(!this.state.pathLocked||this.state.overwrite)return null;const{baseClassName:e}=this.props,{pathLockedReason:t}=this.state;return(0,L.jsxs)("div",{className:mm()({[`${e}__domain-settings-indent-fields--warning`]:this.state.pathLocked}),children:[t===pY&&(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.domainSettings.wpInstalledWarning"}),t===hY&&(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.domainSettings.appInstalledWarning"}),t===mY&&(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.domainSettings.userFilesWarning"}),(0,L.jsx)("div",{className:`${e}__wp-install-warning-button-group`,children:(0,L.jsx)(Ue,{className:`${e}__wp-install-warning-button-group__rewrite-button`,onClick:()=>this.setState({overwrite:!0}),children:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.domainSettings.overwriteButton"})})})]})},this.getFormParams=()=>{const{pathValidationProcessed:e,isLoading:t,isProcessing:n,isDomainSettingsLoading:s,errors:i,version:a,set:r,language:o,autoUpdate:l,protocol:c,domain:u,installationPath:d,title:p,admin:h,database:m}=this.state;return t?null:{onSubmit:this.handleSubmit,requiredMark:!1,errors:i,state:n?"submit":void 0,values:{version:a,set:r,language:o,autoUpdate:l,protocol:c,domain:u,installationPath:d,title:p,admin:h,database:m},applyButton:!1,submitButton:{children:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.installButton"}),disabled:this.isSubmitDisabled()||s,autoFocus:!e,"data-test-id":"instance-install-form-submit-button"},cancelButton:{onClick:this.props.onClose,children:(0,L.jsx)(Ac,{content:"Form.cancelButton",fallback:"Cancel"}),disabled:s}}},this.renderFormFields=()=>{const{isLoading:e,isProcessing:t,isDomainSettingsLoading:n,languages:s,versions:i,dbNamePrefix:a,dbUserNamePrefix:r,database:o,isDatabaseSectionCollapsible:l,isDatabaseCustomizationAllowed:c}=this.state;return e?(0,L.jsxs)(U.Fragment,{children:[(0,L.jsx)(wS,{}),(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.loadingForm"})]}):(0,L.jsxs)(U.Fragment,{children:[!c&&(0,L.jsx)(ge,{intent:"warning",children:(0,L.jsx)(Ac,{content:"list.sites.services.dbWarning"})}),(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.autoGeneratedFieldValues"})}),(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.mainSectionTitle"}),className:"wp-instance-install_section",children:[this.renderInstallationFullPathControl(t),this.renderFormFieldText({name:"title",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.title"}),placeholder:"forms.install.title",dataTestId:"instance-install-form-field-title",disabled:t}),this.renderSetControl(t),this.renderFormFieldDropdown({name:"language",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.language"}),options:s,dataTestId:"instance-install-form-field-language",disabled:t}),this.renderFormFieldDropdown({name:"version",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.version"}),options:i,onChange:this.handleChangeWpVersion,dataTestId:"instance-install-form-field-version",disabled:t})]}),(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.adminSectionTitle"}),className:"wp-instance-install_section",children:[(0,L.jsx)(uY,{name:"admin[login]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.adminUserName"}),placeholder:"forms.install.adminLogin",onChange:e=>this.setState((t=>({admin:Object.assign(Object.assign({},t.admin),{login:e})}))),disabled:t}),(0,L.jsx)(ra,{name:"admin[password]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.adminUserPassword"}),onChange:e=>this.setState((t=>({admin:Object.assign(Object.assign({},t.admin),{password:e})})))}),(0,L.jsx)(uY,{name:"admin[email]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.adminEmail"}),placeholder:"forms.install.adminEmail",onChange:e=>this.setState((t=>({admin:Object.assign(Object.assign({},t.admin),{email:e})}))),disabled:t})]}),(0,L.jsxs)(vi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.dbSectionTitle"}),collapsible:l,collapsed:!0,className:"wp-instance-install_section",children:[this.renderDbServerControl({disabled:t}),(0,L.jsxs)(ui,{name:"database[name]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.dbName"}),children:[a?(0,L.jsx)(Wn,{children:a}):null,(0,L.jsx)(mF,{type:"text",placeholder:"forms.install.dbName",value:o.name,onChange:e=>this.setDatabaseSettings("name",e.target.value),disabled:t})]}),(0,L.jsx)(ga,{name:"database[tablePrefix]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.prefixOfTables"}),onChange:e=>this.setDatabaseSettings("tablePrefix",e),disabled:t}),(0,L.jsxs)(ui,{name:"database[userName]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.dbUserName"}),children:[r?(0,L.jsx)(Wn,{children:r}):null,(0,L.jsx)(mF,{type:"text",placeholder:"list-ui.instanceInstall.dbUserNamePlaceholder",value:o.userName,onChange:e=>this.setDatabaseSettings("userName",e.target.value),disabled:t})]}),(0,L.jsx)(ra,{name:"database[userPassword]",label:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.dbUserPassword"}),onChange:e=>this.setDatabaseSettings("userPassword",e)})]}),this.renderAutoUpdates(),n&&(0,L.jsx)(It,{overlay:!0,backdrop:!0})]})},this.handleClose=()=>{this.props.onClose(),this.props.redirectToDomainOverviewOnDone&&this.handleRedirectToDomainOverviewPage()},this.state={overwrite:!1,pathLocked:!1,pathLockedReason:null,pathValidationProcessed:!1,isLoading:!1,isDomainSettingsLoading:!1,isProcessing:!1,isWrongParams:!1,showCoreUpdatesPopover:!1,showSetPopover:!1,errors:null,protocols:[],domains:[],sets:[],versions:[],languages:[],dbServers:[],protocol:"https",domain:e.selectedDomain?e.selectedDomain:void 0,installationPath:"",title:"",admin:{email:"",login:"",password:""},database:{name:"",server:0,userName:"",userPassword:"",tablePrefix:""},autoUpdate:{core:"",plugins:{forceUpdates:"",newlyInstalledUpdates:!1,updateVulnerable:!1,deactivateVulnerable:!1},themes:{forceUpdates:"",newlyInstalledUpdates:!1,updateVulnerable:!1}},set:"0",language:"",version:"",dbNamePrefix:"",dbUserNamePrefix:"",isAutoUpdatesCustomizationAllowed:!0,isDatabaseSectionCollapsible:!0,isDatabaseCustomizationAllowed:!1,currentSet:{},installationTaskId:null,installationTask:null,isFirstInstallationOnDomain:!1}}componentWillUnmount(){this.debounceValidatePrefix&&this.debounceValidatePrefix.clear()}handleOpenAndLoadData(){this.setState({isLoading:!0,installationTask:null,installationTaskId:null}),this.getInstallationStub(this.props.selectedDomain?this.props.selectedDomain:void 0).finally((()=>{this.setState({isLoading:!1})}))}handleUpdateBackgroundTasks(){const{installationTaskId:e,installationTask:t}=this.state;if(!e)return;const n=iw(e,this.props.tasks);n&&t!==n&&this.setState({installationTask:n},this.handleInstallationTaskUpdated)}handleInstallationTaskUpdated(){tw(this.state.installationTask)&&this.setState({isProcessing:!1})}handleRedirectToDomainOverviewPage(){var e;const{installationTask:t,isFirstInstallationOnDomain:n}=this.state;n&&t&&(null===(e=t.publicParams)||void 0===e?void 0:e.redirect)&&(window.location.href=this.state.installationTask.publicParams.redirect)}setIsFirstInstallationOnDomain(){const{domain:e}=this.state,{installations:t,redirectToDomainOverviewOnDone:n}=this.props;if(!n)return void this.setState({isFirstInstallationOnDomain:!1});if(!t)return void this.setState({isFirstInstallationOnDomain:!0});const s=t.filter((t=>{var n;return(null===(n=t.domain)||void 0===n?void 0:n.name)===e})),i=0===s.length;this.setState({isFirstInstallationOnDomain:i})}render(){return(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.drawerTitle"}),subtitle:(0,L.jsx)(Ac,{content:"list-ui.instanceInstall.drawerSubTitle"}),isOpen:this.props.isOpen,onClose:()=>this.handleClose(),"data-type":"instance-install",form:this.getFormParams(),progress:fC(this.state.installationTask,(()=>{this.setState({installationTask:null,installationTaskId:null})})),children:[this.props.renderDrawerMessages(),this.renderFormFields()]})}}wY.propTypes={selectedDomain:Vt().string,onClose:Vt().func.isRequired,getInstallationStub:Vt().func.isRequired,createInstallation:Vt().func.isRequired,validateInstallationPath:Vt().func.isRequired,getSetDetails:Vt().func.isRequired,onBeforeInstallation:Vt().func,baseClassName:Vt().string,vulnerabilityFeatureEnabled:Vt().bool,addErrorMessage:Vt().func.isRequired,onAddDrawerWarningMessage:Vt().func.isRequired,onClearDrawerMessages:Vt().func.isRequired,renderDrawerMessages:Vt().func.isRequired,isOpen:Vt().bool.isRequired,tasks:Vt().array,redirectToDomainOverviewOnDone:Vt().bool,installations:Vt().array},wY.defaultProps={selectedDomain:void 0,onBeforeInstallation:null,baseClassName:`${gu}instance-install-form`,vulnerabilityFeatureEnabled:!1,tasks:[],redirectToDomainOverviewOnDone:!1};const kY={getSetDetails:wy,getInstallationStub:Sy,createInstallation:Wv,validateInstallationPath:xy,addErrorMessage:jp},jY=(0,so.$j)((e=>({installations:e.instances.installations,tasks:e.backgroundTasks.tasks,vulnerabilityFeatureEnabled:e.app.options.vulnerabilityFeature})),kY)(Lx(wY)),TY=({url:e,login:t,password:n,pluginUrl:s,token:i,ip:a,connectionType:r})=>o=>{const l=new FormData;return l.append("url",e),l.append("login",t),l.append("password",n),l.append("pluginUrl",s),l.append("token",i),l.append("ip",a),l.append("connectionType",r),vd.connectRemoteAgentInstance(l).then((({data:e})=>(o(xp(e,(()=>o(CY(e.data.task))))),e)))},CY=e=>t=>t({type:af,task:e}),DY=()=>e=>e({type:"instances/CONNECT_REMOTE_AGENT_INSTANCE_FINISHED"}),PY=()=>e=>e({type:"instances/CONNECT_REMOTE_AGENT_INSTANCE_FINISHED_WITH_ERRORS"}),IY=e=>t=>(t(Kv(e)),t(nv({instancesIds:[e]}))),OY="login",LY="password",MY="pluginUrl",AY="token",EY={isInstallationErrorOccurred:!1,installationErrorMessage:null};class UY extends U.Component{constructor(e){super(e),this.handleFormFieldChange=(e,t)=>this.setState((n=>({formValues:Object.assign(Object.assign({},n.formValues),{[e]:t})}))),this.handleChangeConnectionType=e=>this.handleFormFieldChange("connectionType",e),this.handleFormSubmit=()=>{this.setState(Object.assign({isFormSending:!0,isLongTaskFinishedWithError:!1,formErrors:null,backgroundTaskId:null},EY),(()=>{const{formValues:e}=this.state,{remoteAgentInstancesActions:{connectRemoteAgentInstance:t}}=this.props;t(e).then((e=>{const{status:t,data:n}=e;"success"!==t?e.data.formErrors&&this.setState({formErrors:e.data.formErrors,isFormSending:!1}):this.setState({backgroundTaskId:n.task.id})}))}))},this.getBackgroundTaskError=e=>e.publicParams.error&&e.publicParams.error.text?{text:e.publicParams.error.text,type:e.publicParams.error.type}:null,this.formatBackgroundTaskErrors=e=>{const t=this.getBackgroundTaskError(e);return t&&t.text?[(0,L.jsx)(fO,{text:t.text},e.id)]:e.errors},this.getSubmitButton=()=>{const{isFormSending:e,isInstanceConnected:t,isLongTaskFinishedWithError:n}=this.state;return!t&&{children:n?(0,L.jsx)(Ac,{content:"remote-agent-instances.formButtonRetry"}):(0,L.jsx)(Ac,{content:"remote-agent-instances.formButtonSubmit"}),state:e?"loading":"active","data-test-id":"connect-instance-submit-button",onClick:e=>Rc(e,this.handleFormSubmit)}},this.getCancelButton=()=>{const{isFormSending:e,isInstanceConnected:t}=this.state;return{children:t?(0,L.jsx)(Ac,{content:"remote-agent-instances.formButtonClose"}):(0,L.jsx)(Ac,{content:"remote-agent-instances.formButtonCancel"}),disabled:e}},this.getForm=()=>{const{formValues:e,formErrors:t}=this.state;return{values:e,errors:t,vertical:!0,onSubmit:this.handleFormSubmit,submitButton:this.getSubmitButton(),cancelButton:this.getCancelButton(),applyButton:null}},this.renderInstallationError=()=>{const{isInstallationErrorOccurred:e,installationErrorMessage:t}=this.state;return e?(0,L.jsx)(ge,{intent:"warning",children:(0,L.jsx)(Ac,{content:"remote-agent-instances.errors.cannotInstallPluginAutomatically",params:{installationError:t},style:{whiteSpace:"pre-wrap"}})}):null},this.state=Object.assign({backgroundTaskId:null,backgroundTask:null,isFormSending:!1,isInstanceConnected:!1,isLongTaskFinishedWithError:!1,formValues:{url:"",login:"",password:"",pluginUrl:"",token:"",ip:"",connectionType:1},formErrors:null},EY)}componentWillReceiveProps(e){const{backgroundTaskId:t,backgroundTask:n}=this.state;if(!t)return;const s=iw(t,e.tasks);s&&n!==s&&this.setState({backgroundTask:s},(()=>{nw(s)&&this.handleBackgroundTaskSuccess(s),sw(s)&&this.handleBackgroundTaskFail(s)}))}handleBackgroundTaskSuccess(e){this.setState({isFormSending:!1,isInstanceConnected:!0},(()=>{const{remoteAgentInstancesActions:{loadInstanceToList:t,connectRemoteAgentInstanceFinished:n}}=this.props;e.publicParams.instanceId&&t(e.publicParams.instanceId).catch((()=>{})),n()}))}handleBackgroundTaskFail(e){const{remoteAgentInstancesActions:{connectRemoteAgentInstanceFailed:t}}=this.props,n=this.getBackgroundTaskError(e);n&&"installer"===n.type?this.setState((e=>({isInstallationErrorOccurred:!0,installationErrorMessage:n.text,formValues:Object.assign(Object.assign({},e.formValues),{connectionType:2}),backgroundTask:null,backgroundTaskId:null,isFormSending:!1}))):this.setState({isFormSending:!1,isLongTaskFinishedWithError:!0}),t()}render(){const{isFormSending:e,backgroundTask:t}=this.state,{onClose:n,apiUrl:s}=this.props,i=`${s}/download-plugin`,a=this.getSubmitButton(),r=[];return a&&r.push((0,L.jsx)(Ue,Object.assign({type:"submit",intent:"primary"},a),"submit")),(0,L.jsxs)(zi,{title:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceDrawerTitle"}),form:this.getForm(),onClose:n,className:bu,size:"sm",isOpen:!0,"data-type":"connect-remote-agent-instance",hideButton:!1,progress:fC(t,(()=>{this.setState({backgroundTask:null})}),r),children:[(0,L.jsxs)(ge,{intent:"info",children:[(0,L.jsx)(he,{name:"circle-exclamation-mark",size:"16"})," ",(0,L.jsx)(Ac,{content:"remote-agent-instances.betaMessage",unsafe:!0})]}),(0,L.jsxs)(Br,{active:this.state.formValues.connectionType,children:[(0,L.jsxs)(Fr,{title:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectViaCredentials"}),onActivate:()=>this.handleChangeConnectionType(1),"data-test-id":"connect-instance-tab-automatic",children:[(0,L.jsx)(ga,{name:"url",label:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldUrl"}),description:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldUrlDescription"}),size:"lg","data-test-id":"connect-instance-field-url",disabled:e,required:!0,onChange:e=>this.handleFormFieldChange("url",e)}),(0,L.jsx)(ga,{name:OY,label:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldLogin"}),size:"md","data-test-id":"connect-instance-field-login",disabled:e,required:!0,onChange:e=>this.handleFormFieldChange(OY,e)}),(0,L.jsx)(vO,{name:LY,label:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldPassword"}),description:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldPasswordDescription"}),size:"md","data-test-id":"connect-instance-field-password",disabled:e,hideGenerateButton:!0,hidePasswordMeter:!0,required:!0,onChange:e=>this.handleFormFieldChange(LY,e)})]}),(0,L.jsxs)(Fr,{title:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectViaPluginUrl"}),onActivate:()=>this.handleChangeConnectionType(2),"data-test-id":"connect-instance-tab-manual",children:[this.renderInstallationError(),(0,L.jsx)(Xs,{children:(0,L.jsx)(Ac,{content:"remote-agent-instances.howToInstallPluginManually",params:{urlToZipArchiveWithPlugin:i},unsafe:!0})}),(0,L.jsx)(ga,{name:MY,label:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldPluginUrl"}),size:"lg","data-test-id":"connect-instance-field-plugin-url",disabled:e,required:!0,onChange:e=>this.handleFormFieldChange(MY,e)}),(0,L.jsx)(ga,{name:AY,label:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldToken"}),size:"md","data-test-id":"connect-instance-field-token",disabled:e,required:!0,onChange:e=>this.handleFormFieldChange(AY,e)}),(0,L.jsx)(ga,{name:"ip",label:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldIp"}),description:(0,L.jsx)(Ac,{content:"remote-agent-instances.connectInstanceFieldIpDescription"}),size:"md","data-test-id":"connect-instance-field-ip",disabled:e,onChange:e=>this.handleFormFieldChange("ip",e)})]})]})]})}}UY.propTypes={onClose:Vt().func.isRequired,remoteAgentInstancesActions:Vt().shape({connectRemoteAgentInstance:Vt().func.isRequired,loadInstanceToList:Vt().func.isRequired,connectRemoteAgentInstanceFinished:Vt().func.isRequired,connectRemoteAgentInstanceFailed:Vt().func.isRequired}).isRequired,tasks:Vt().array,apiUrl:Vt().string.isRequired},UY.defaultProps={tasks:[]};const RY=(0,so.$j)((e=>({tasks:e.backgroundTasks.tasks,apiUrl:e.app.urls.apiUrl})),(e=>({remoteAgentInstancesActions:nh(v,e)})))(v_(UY));class NY extends U.Component{constructor(e){super(e),this.handleShowPopover=()=>{this.setState({isPopoverVisible:!0})},this.handleHidePopover=()=>{this.setState({isPopoverVisible:!1})},this.handleOpenSmartPhpUpdatesDrawer=()=>{const{onOpenSmartPhpUpdatesDrawer:e}=this.props;this.handleHidePopover(),e()},this.state={isPopoverVisible:!1}}render(){var e;const{title:t,installation:{features:{php:n}},minimalSupportedPhpVersion:s}=this.props,{isPopoverVisible:i}=this.state;return n.handler?(0,L.jsx)(An,{visible:i,onClose:this.handleHidePopover,target:(0,L.jsx)(ft,{label:null===(e=n.handler)||void 0===e?void 0:e.version,onClick:this.handleShowPopover,children:t}),children:(0,L.jsx)(eE,{installation:this.props.installation,minimalSupportedPhpVersion:s,onOpenSmartPhpUpdatesDrawer:this.handleOpenSmartPhpUpdatesDrawer})},"ssl-disabled"):null}}const FY=(0,so.$j)((e=>({minimalSupportedPhpVersion:e.app.options.minimalSupportedPhpVersion})),(e=>({goToUri:(t,n)=>e(Wf(t,n))})))(NY);class YY extends U.Component{constructor(){super(...arguments),this.handleToggleIndexing=()=>{const{installation:{id:e},instancesActions:{setIndexingStatus:t},onEnableInstances:n,onDisableInstances:s,addSuccessMessage:i}=this.props;s([e]),t(e,!0).then((()=>{i((0,L.jsx)(Ac,{content:"controllers.index.feature.search-indexing.enabledSuccessfully"}))})).catch((()=>{})).finally((()=>{n([e])}))},this.handleToggleDebug=()=>{const{installation:{id:e},instancesActions:{toggleDebug:t},onEnableInstances:n,onDisableInstances:s,addSuccessMessage:i}=this.props;s([e]),t(e,!1).then((()=>{i((0,L.jsx)(Ac,{content:"features.debug.disabledSuccessfully"}))})).catch((()=>{})).finally((()=>{n([e])}))},this.handleDisableMaintenance=()=>{const{installation:{id:e,features:{maintenance:t}},instancesActions:{updateMaintenanceStatus:n},onEnableInstances:s,onDisableInstances:i}=this.props;i([e]),n(e,!1,t.status).catch((()=>{})).finally((()=>{s([e])}))},this.isSmartUpdatesPreviewAvailable=(e,t)=>e&&t&&cL(t),this.isSmartPhpUpdatesPreviewAvailable=(e,t)=>e&&t&&cL(t),this.getCommonIssuesSectionItems=()=>{const{installation:{status:e,features:{debug:t,indexing:n,maintenance:s}}}=this.props,i=[];return e.alive?(t.status&&i.push((0,L.jsx)(ft,{onClick:this.handleToggleDebug,children:(0,L.jsx)(Ac,{content:"instancesList.issues.debugEnabled"})},"debug-enabled")),n.status||i.push((0,L.jsx)(ft,{onClick:this.handleToggleIndexing,children:(0,L.jsx)(Ac,{content:"instancesList.issues.searchIndexingDisabled"})},"search-disabled")),s.status&&i.push((0,L.jsx)(ft,{onClick:this.handleDisableMaintenance,children:(0,L.jsx)(Ac,{content:"instancesList.issues.maintenanceModeEnabled"})},"maintenance-enabled")),i):i},this.getUpdatesSectionItems=()=>{const{installation:{id:e,features:{php:t,updates:n},version:s,status:i},onOpenUpdates:a,onOpenSmartPhpUpdatesDrawer:r}=this.props,o=[];if(this.isSmartUpdatesPreviewAvailable(!!n.smart.status,n.smart.taskStatus)&&o.push((0,L.jsx)(ft,{onClick:t=>Rc(t,(()=>a(e))),children:(0,L.jsx)(Ac,{content:"instancesList.issues.smartUpdateConflict"})},"smart-update-conflict")),this.isSmartPhpUpdatesPreviewAvailable(n.php.available&&n.php.applicable,n.php.taskStatus)?o.push((0,L.jsx)(ft,{onClick:e=>Rc(e,r),children:(0,L.jsx)(Ac,{content:"smartPhpUpdate.result.smartPhpUpdateConflict.issues"})},"smart-php-update-conflict")):t.unsupported?o.push((0,L.jsx)(FY,{title:(0,L.jsx)(Ac,{content:"instancesList.issues.updateUnsupportedPhpVersion"}),installation:this.props.installation,onOpenSmartPhpUpdatesDrawer:r},"php-unsupported")):t.eoled&&o.push((0,L.jsx)(FY,{title:(0,L.jsx)(Ac,{content:"instancesList.issues.updateOutdatedPhpVersion"}),installation:this.props.installation,onOpenSmartPhpUpdatesDrawer:r},"php-outdated")),i.alive){const{amountOfPluginsWithUpdates:t,amountOfThemesWithUpdates:i,availableVersion:r}=null!=n?n:{};r&&o.push((0,L.jsx)(ft,{label:s,onClick:t=>Rc(t,(()=>a(e,Ef))),children:(0,L.jsx)(Ac,{content:"instancesList.issues.updateWordpressCore"})},"wordpress-outdated")),t>0&&o.push((0,L.jsx)(ft,{label:`${t}`,onClick:t=>Rc(t,(()=>a(e,Uf))),children:(0,L.jsx)(Ac,{content:"instancesList.issues.updateWordpressPlugins"})},"plugins-outdated")),i>0&&o.push((0,L.jsx)(ft,{label:`${i}`,onClick:t=>Rc(t,(()=>a(e,Rf))),children:(0,L.jsx)(Ac,{content:"instancesList.issues.updateWordpressThemes"})},"themes-outdated"))}return o},this.getSecuritySectionItems=()=>{var e,t,n,s,i,a,r,o;const{installation:{domain:l,features:{security:c,vulnerability:u},id:d,installationType:p,owner:h,status:m},onOpenSecurity:f,goToUri:g,baseClassName:b}=this.props,v=[];if(!m.alive)return v;if(c.available&&u.vulnerable&&v.push((0,L.jsx)(ft,{onClick:e=>Rc(e,(()=>f(d,1))),icon:u.vulnerable?(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",className:`${b}__menu-item-icon`,intent:"danger",size:"16"}):null,"data-test-id":"instance-issues-security-vulnerabilities-menu-item",children:(0,L.jsx)(Ac,{content:"instancesList.issues.vulnerable"})},"vulnerable")),!c.available||"insecure"!==c.status&&"unknown"!==c.status||v.push((0,L.jsx)(ft,{onClick:e=>Rc(e,(()=>f(d))),icon:(0,L.jsx)(he,{name:"exclamation-mark-circle",className:`${b}__menu-item-icon`,intent:"warning",size:"16"}),children:(0,L.jsx)(Ac,{content:"instancesList.issues.checkSecurity"})},"check-security")),null==l?void 0:l.ssl){const{ssl:c}=l,u=!!c&&{isActual:null!==(t=null===(e=c.certificate)||void 0===e?void 0:e.actual)&&void 0!==t&&t,isCertificateInstalled:null!==(s=null===(n=c.certificate)||void 0===n?void 0:n.installed)&&void 0!==s&&s,isSslEnabled:c.enabled,isRedirectToHttpsEnabled:c.redirectToHttpsEnabled,isSelfSigned:null!==(a=null===(i=c.certificate)||void 0===i?void 0:i.selfSigned)&&void 0!==a&&a,isSuitableForDomain:null!==(o=null===(r=c.certificate)||void 0===r?void 0:r.suitableForDomain)&&void 0!==o&&o,isUrlProtocolHttps:c.urlProtocolHttps},m=null==h?void 0:h.login,f=[];u&&u.isSslEnabled||f.push((0,L.jsx)(tE,{target:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notEnabled.title","data-test-id":"instance-issue-ssl__disabled"}),actionLinkAttributes:(null==c?void 0:c.enableSslActionUrl)?lE({url:null==c?void 0:c.enableSslActionUrl,instanceType:p,cpanelAccountUsername:m,goToUri:g}):null})),u&&u.isSslEnabled&&!u.isRedirectToHttpsEnabled&&f.push((0,L.jsx)(rE,{target:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.redirectToHttpsDisabled.title","data-test-id":"instance-issue-ssl__redirect-disabled"}),actionLinkAttributes:(null==c?void 0:c.enableRedirectToHttpsActionUrl)?lE({url:null==c?void 0:c.enableRedirectToHttpsActionUrl,instanceType:p,cpanelAccountUsername:m,goToUri:g}):null})),u&&u.isSslEnabled&&u.isRedirectToHttpsEnabled&&!u.isUrlProtocolHttps&&f.push((0,L.jsx)(oE,{installationId:d,target:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.mismatchUrlProtocol.title","data-test-id":"instance-issue-ssl__mismatch-protocol"})})),u&&u.isCertificateInstalled?(u.isSelfSigned?f.push((0,L.jsx)(sE,{target:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.selfSigned.title","data-test-id":"instance-issue-ssl__self-signed"}),actionLinkAttributes:(null==c?void 0:c.buyOrInstallSslActionUrl)?lE({url:null==c?void 0:c.buyOrInstallSslActionUrl,instanceType:p,cpanelAccountUsername:m,goToUri:g}):null,instanceType:p})):u.isSuitableForDomain||f.push((0,L.jsx)(aE,{target:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.notSuitableForDomain.title","data-test-id":"instance-issue-ssl__no-suitable"}),actionLinkAttributes:(null==c?void 0:c.buyOrInstallSslActionUrl)?lE({url:null==c?void 0:c.buyOrInstallSslActionUrl,instanceType:p,cpanelAccountUsername:m,goToUri:g}):null,instanceType:p})),u.isActual||f.push((0,L.jsx)(iE,{target:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateExpired.title","data-test-id":"instance-issue-ssl__expired"}),actionLinkAttributes:(null==c?void 0:c.buyOrInstallSslActionUrl)?lE({url:null==c?void 0:c.buyOrInstallSslActionUrl,instanceType:p,cpanelAccountUsername:m,goToUri:g}):null,instanceType:p}))):f.push((0,L.jsx)(nE,{target:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.certificateNotInstalled.title","data-test-id":"instance-issue-ssl__no-certificate"}),actionLinkAttributes:(null==c?void 0:c.buyOrInstallSslActionUrl)?lE({url:null==c?void 0:c.buyOrInstallSslActionUrl,instanceType:p,cpanelAccountUsername:m,goToUri:g}):null,instanceType:p})),f.length>1?v.push((0,L.jsx)(An,{target:(0,L.jsx)(ft,{label:`${f.length}`,"data-test-id":"instance-issue-ssl__grouped-menu-item",children:(0,L.jsx)(Ac,{content:"instancesList.instanceCard.ssl.issues"})},"ssl-issues-menu-item"),children:f.map(((e,t)=>(0,L.jsx)(as,{children:(0,L.jsx)(wn,{className:`${b}-menu-ssl-issue`,children:e})},t)))},"ssl-issues")):1===f.length&&v.push((0,L.jsx)(ft,{children:f[0]},"ssl-issue-menu-item"))}return v}}render(){const{installation:{features:{vulnerability:e}},baseClassName:t}=this.props,n=this.getCommonIssuesSectionItems(),s=this.getUpdatesSectionItems(),i=this.getSecuritySectionItems();if(!n.length&&!s.length&&!i.length)return null;const a=n.length+s.length+i.length,r=(0,L.jsxs)(Nn,{className:`${t}-menu`,children:[i.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Jn,{children:(0,L.jsx)(Ac,{content:"instancesList.issues.securityMenuHeader"})}),i]}),n.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Jn,{children:(0,L.jsx)(Ac,{content:"instancesList.issues.commonIssuesMenuHeader"})}),n]}),s.length>0&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Jn,{children:(0,L.jsx)(Ac,{content:"instancesList.issues.updatesMenuHeader"})}),s]})]});return(0,L.jsx)("div",{className:t,children:(0,L.jsx)(Tt,{menu:r,children:(0,L.jsxs)(Ue,{className:`${t}-button`,caret:!0,ghost:!0,"data-test-id":"wp-toolkit-instances-list-issues-button",children:[e.vulnerable?(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"instancesList.issues.vulnerableHint"}),children:(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:"danger",size:"16",className:`${t}-icon`,"data-test-id":"instance-issues-button-vulnerable-icon"})}):(0,L.jsx)(he,{name:"exclamation-mark-circle",intent:"warning",size:"16",className:`${t}-icon`}),(0,L.jsx)(Ac,{content:"instancesList.issues.menu",params:{count:a}})]})})})}}YY.defaultProps={baseClassName:`${gu}instances-list-issues`};const BY=(0,so.$j)((e=>({isWordPressInstancesLimitExceeded:e.app.options.isWordPressInstancesLimitExceeded})),(e=>({addErrorMessage:nh(jp,e),instancesActions:nh({toggleDebug:kv,setIndexingStatus:Cb,updateMaintenanceStatus:Eb},e),goToUri:(t,n)=>e(Wf(t,n)),addSuccessMessage:nh(wp,e)})))(YY),HY=({baseClassName:e=`${gu}tag`,className:t,children:n,prefix:s,backgroundColor:i,onClick:a})=>(0,L.jsxs)("span",{className:mm()(e,{[`${e}--affix`]:s},t),style:{backgroundColor:i},onClick:a,"data-test-id":"installation-label",children:[s&&(0,L.jsx)("span",{className:`${e}__prefix`,children:s}),n]}),VY=({template:e,onSubmit:t,onRemove:n,onCancel:s,children:i,className:a})=>{const[r,o]=(0,U.useState)(e.value.color.value),[l,c]=(0,U.useState)("private"===e.value.type.value),[u,d]=(0,U.useState)(e.value.name.value),p=0===u.trim().length;return(0,L.jsx)(An,{visible:!0,target:(0,L.jsx)(L.Fragment,{children:i}),placement:"bottom",onClose:s,children:(0,L.jsxs)(Si,{style:{width:"100%"},className:a,onSubmit:()=>!p&&t({name:u,type:l?qd.Private:qd.Public,color:r}),values:{name:u},submitButton:{children:(0,L.jsx)(Ac,{content:n?"installation.features.labels.form.buttons.update":"installation.features.labels.form.buttons.create"}),size:"md",disabled:p,"data-test-id":"installation-labels-menu-submit"},cancelButton:{size:"md",onClick:s},applyButton:!1,additionalButtons:[n&&(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(Ue,{size:"md",onClick:n,"data-test-id":"installation-remove-label",children:(0,L.jsx)(Ac,{content:"installation.features.labels.form.buttons.remove"})})})],"data-test-id":"installation-labels-menu",children:[(0,L.jsx)(ga,{label:(0,L.jsx)(Ac,{content:"installation.features.labels.form.name.label"}),size:"fill",name:"name",inputProps:{suffix:(0,L.jsx)(Ue,{icon:"cross-mark",ghost:!0,onClick:()=>d("")})},onChange:d,autoFocus:!0,"data-test-id":"installation-labels-menu-label-name"}),(0,L.jsx)(ui,{label:(0,L.jsx)(Ac,{content:"installation.features.labels.form.privacity.label"}),description:(0,L.jsx)(Ac,{content:"installation.features.labels.form.privacity.description"}),fullDescription:(0,L.jsx)(Ac,{content:"installation.features.labels.form.privacity.fullDescription"}),children:(0,L.jsxs)(it,{checked:l,onChange:c,children:[(0,L.jsx)(Ac,{content:"installation.features.labels.form.privacity.text"})," ",(0,L.jsx)(he,{name:"eye-closed"})]})}),(0,L.jsx)(ui,{label:"Color",className:"color-field",children:e.value.color.meta.choices.map((e=>(0,L.jsx)(Ms,{name:"color",checked:e===r,onChange:t=>t&&o(e),style:{"--wpt-tag-radio-indicator-color":e}},e)))})]})})},$Y=(0,so.$j)(null,(e=>({instanceActions:nh({setInstallationLabels:uy,getInstallationLabelsMeta:cy},e)})))((({baseClassName:e=`${gu}tag-manager`,installationId:t,tags:n,instanceActions:{getInstallationLabelsMeta:s,setInstallationLabels:i}})=>{const[a,r]=(0,U.useState)(),[o,l]=(0,U.useState)(),[c,u]=(0,U.useState)(n.length<=6),d=(0,L.jsx)(Ue,{icon:"plus",size:"md",ghost:!0,component:"a",onClick:e=>Rc(e,(()=>r(-1))),"data-test-id":"installation-add-label",children:0===n.length&&(0,L.jsx)(Ac,{content:"installation.features.labels.addNewLabel"})});(0,U.useEffect)((()=>l(void 0)),[t]),(0,U.useEffect)((()=>r(void 0)),[n]),(0,U.useEffect)((()=>{o||void 0===a||s(t).then((({data:e})=>{l(JSON.parse(JSON.stringify(e.meta)))}))}),[o,a,t,s]);const p=(e,s)=>{r(void 0);const a=[...n];s?-1===e?a.push(s):a[e]=s:a.splice(e,1),i(t,a)};o&&(o.template.value.name.value="",o.template.value.type.value=qd.Private,[o.template.value.color.value]=o.template.value.color.meta.choices);const h=c?n:n.slice(0,6);return(0,L.jsxs)("span",{className:e,children:[h.map(((t,n)=>{const s=(0,L.jsx)(HY,{prefix:(0,L.jsx)(he,{name:"public"===t.type?"eye":"eye-closed",size:"12"}),backgroundColor:t.color,onClick:e=>Rc(e,(()=>r(n))),children:t.name});return n===a&&o?(o.template.value.name.value=t.name,o.template.value.type.value=t.type,o.template.value.color.value=t.color,(0,L.jsx)(VY,{template:o.template,onSubmit:e=>p(n,e),onCancel:()=>r(void 0),onRemove:()=>p(n),className:e,children:s},$c(4))):s})),n.length<=6?null:c?(0,L.jsx)(fe,{onClick:()=>u(!1),className:`${e}__show-less-button`,children:(0,L.jsx)(Ac,{content:"installation.features.labels.showLess"})}):(0,L.jsx)(fe,{onClick:()=>u(!0),className:`${e}__show-more-button`,children:(0,L.jsx)(Ac,{content:"installation.features.labels.showMore"})}),-1!==a&&d,-1===a&&o&&(0,L.jsx)(VY,{template:o.template,onSubmit:e=>p(-1,e),onCancel:()=>r(void 0),className:e,children:d})]})}));class WY extends U.Component{constructor(e){super(e),this.state={isPopoverVisible:!1,isLoading:!1}}componentDidUpdate(e){var t,n;e.isUpdating===this.props.isUpdating||this.props.isUpdating||null===(n=null===(t=this.props.callbacks)||void 0===t?void 0:t.onApplyFinished)||void 0===n||n.call(t)}applyVirtualPatching(e,t=!1){var n,s,i;const{installation:a,applyVirtualPatchesConfig:r,updateVirtualPatchesProtectionStatus:o,callbacks:l}=this.props;return this.setState({isLoading:!0}),o({installationsIds:[a.id],status:e,skipBrokenInstallations:null===(n=null==r?void 0:r.skipBrokenInstallations)||void 0===n||n,skipInfectedInstallations:null===(s=null==r?void 0:r.skipInfectedInstallations)||void 0===s||s,skipUnsupportedInstallations:null===(i=null==r?void 0:r.skipUnsupportedInstallations)||void 0===i||i},t).then((e=>{var n;return null===(n=null==l?void 0:l.onApplySuccess)||void 0===n||n.call(l,e),this.setState({isPopoverVisible:t}),e})).catch((e=>{var t,n,s;(null==l?void 0:l.onApplyFailed)?l.onApplyFailed(e):this.setState({validationError:null===(s=null===(n=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.meta)||void 0===s?void 0:s.message,isPopoverVisible:!0})})).finally((()=>{this.setState({isLoading:!1})}))}renderComponent(e,t){if(!t)return e;const n=e.props.onClick;return(0,U.cloneElement)(e,{onClick:e=>{t(e),n&&n(e)}})}renderUnpaidComponent(){const{components:e,callbacks:t}=this.props;return this.renderComponent(e.unpaidComponent,t.onOpenVirtualPatchesUpsell)}renderNotActivatedComponent(){const{consent:e,components:t,isUpdating:n}=this.props,{isPopoverVisible:s,validationError:i,isLoading:a}=this.state,r=e.usePreValidation?()=>this.applyVirtualPatching(!0,!0):()=>this.setState({isPopoverVisible:!0});return(0,L.jsx)(An,{visible:s,onClose:()=>this.setState({isPopoverVisible:!1}),target:this.renderComponent(t.notActivatedComponent,r),children:i?(0,L.jsx)("div",{style:{textAlign:"justify"},children:i}):(0,L.jsx)(bT,{isButtonLoading:n||a,onSubmit:()=>this.applyVirtualPatching(!0),dataTestId:e.enableConsentDataTestId})})}renderActivatedComponent(){const{consent:e,components:t,isUpdating:n,disabling:s}=this.props,{isPopoverVisible:i,validationError:a,isLoading:r}=this.state;if(!s.isPossible)return this.renderComponent(t.activatedComponent);if(!s.showConsent)return this.renderComponent(t.activatedComponent,(()=>this.applyVirtualPatching(!1)));const o=e.usePreValidation?()=>this.applyVirtualPatching(!1,!0):()=>this.setState({isPopoverVisible:!0});return(0,L.jsx)(An,{visible:i,onClose:()=>this.setState({isPopoverVisible:!1}),target:this.renderComponent(t.activatedComponent,o),children:a?(0,L.jsx)("div",{style:{textAlign:"justify"},children:a}):(0,L.jsx)(lD,{isButtonLoading:n||r,onSubmit:()=>this.applyVirtualPatching(!1),dataTestId:e.disableConsentDataTestId})})}render(){const{installation:e,components:t,isUpdating:n,isAdmin:s,showVirtualPatchesUpsellWhenRestrictedViaPlans:i}=this.props,{isLoading:a}=this.state;return((e,t,n)=>{const{features:{php:s,virtualPatches:{restrictions:i}},status:{alive:a,infected:r,unsupported:o}}=e;return!(!a||r||o||s.unsupported||yT(i,t,n))})(e,s,i)?(n||a)&&t.loadingComponent?this.renderComponent(t.loadingComponent):vT(e,i,s)?(e=>{var t;return!!(null===(t=e.features.virtualPatches)||void 0===t?void 0:t.status)})(e)?this.renderActivatedComponent():this.renderNotActivatedComponent():this.renderUnpaidComponent():null}}const zY=(0,so.$j)(((e,t)=>{const{installation:n}=t;return{isUpdating:e.vulnerabilities.virtualPatchesUpdatingStatuses.some((e=>e.installationIds.includes(n.id))),isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller,showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans}}),(e=>({updateVirtualPatchesProtectionStatus:nh(Wg,e)})))(WY),qY=({installation:e,onOpenVulnerabilitiesDrawer:t,onOpenVirtualPatchesUpsell:n,baseClassName:s=`${gu}instances-list-shield`})=>(0,L.jsx)(zY,{installation:e,consent:{usePreValidation:!1,enableConsentDataTestId:om,disableConsentDataTestId:om},disabling:{isPossible:!1},components:{unpaidComponent:(0,L.jsx)(Ue,{ghost:!0,icon:"shield","data-test-id":rm}),notActivatedComponent:(0,L.jsx)(Ue,{ghost:!0,icon:"shield","data-test-id":rm}),activatedComponent:(0,L.jsx)(Ue,{ghost:!0,icon:"shield-filled","data-test-id":rm,onClick:()=>t(),className:`${s}__active`}),loadingComponent:(0,L.jsx)(Ue,{ghost:!0,"data-test-id":rm,state:"loading"})},callbacks:{onOpenVirtualPatchesUpsell:n}}),GY=(0,so.$j)((e=>({virtualPatchingCustomerPortalUrl:e.app.urls.virtualPatchingCustomerPortalUrl})))((e=>{const{virtualPatchingCustomerPortalUrl:t}=e,n=Mc("drawer.vpatchesSubscription");return t?(0,L.jsxs)(wn,{target:"_blank",onClick:()=>{window.open(t)},children:[(0,L.jsx)(he,{name:"check-list"})," ",n("infoPage.link.mySubscriptions")]}):null})),KY=e=>{const{storedSubscriptionId:t,detachSubscription:n,retrieveSubscriptionDataFromLicenseService:s,baseClassName:i=`${gu}vpatches-upsell-activation`}=e,a=Mc("drawer.vpatchesSubscription.activationPage"),[r,o]=(0,U.useState)(""),l=e=>(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(as,{className:`${i}-description`,children:e}),(0,L.jsx)(vn,{prefix:(0,L.jsx)(he,{name:"key"}),size:"lg",placeholder:a("activationKeyPlaceholder").toString(),"data-test-id":"wpt-virtual-patching-upsell-dialog-subscription-id-input",onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&s(r)}})," ",(0,L.jsx)(Ue,{onClick:()=>s(r),disabled:0===r.length,intent:"primary","data-test-id":"wpt-virtual-patching-upsell-dialog-subscription-by-id-activation-button",children:a("button.applyActivationCode")})]}),c=(0,L.jsx)("div",{className:i,children:(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{children:l(a("descriptionText"))}),(0,L.jsxs)(Ks,{children:[(0,L.jsx)(as,{children:a("descriptionText.findOutYourId")}),(0,L.jsx)(GY,{})]})]})});return t?(u=t,(0,L.jsx)("div",{className:i,children:(0,L.jsxs)(vi,{children:[(0,L.jsxs)(Ks,{children:[(0,L.jsx)(as,{className:`${i}-description`,children:a("descriptionText.knownId")}),(0,L.jsx)(vn,{prefix:(0,L.jsx)(he,{name:"key"}),size:"lg",defaultValue:u,disabled:!0,readOnly:!0})," ",(0,L.jsx)(Ue,{onClick:()=>s(u),children:a("button.reactivate")})]}),(0,L.jsx)(Ks,{children:(0,L.jsx)(Ue,{onClick:()=>n(),children:a("button.detachSubscriptionId")})}),(0,L.jsx)(Ks,{children:l(a("descriptionText.enterYouId"))}),(0,L.jsxs)(Ks,{children:[(0,L.jsx)(as,{children:a("descriptionText.findOutYourId")}),(0,L.jsx)(GY,{})]})]})})):c;var u},XY=({baseClassName:e=`${gu}vpatches-upsell-main-page`})=>(0,L.jsx)("div",{className:e,children:(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{className:`${e}__feature-description`,children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.upsellPage.featureDescription"})}),(0,L.jsx)(Ks,{children:(0,L.jsx)(uD,{})})]})}),ZY=e=>{const{loaderText:t,description:n,baseClassName:s=`${gu}vpatches-upsell-waiting-page`}=e;return(0,L.jsx)("div",{className:s,children:(0,L.jsxs)("div",{className:`${s}-item`,children:[(0,L.jsx)(It,{loader:{type:"icons",icons:["sand-clock","dollar","shield"],size:"64"},text:t}),n&&(0,L.jsx)(Wn,{children:n})]})})},JY=e=>{const{showNoteForAdmin:t,baseClassName:n=`${gu}vpatches-upsell-purchasingGuardianPage`}=e;return(0,L.jsx)("div",{className:n,children:(0,L.jsx)(vi,{children:(0,L.jsxs)(Ks,{children:[(0,L.jsx)(as,{className:`${n}-description`,children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.purchasingGuardianPage.plesk.description"})}),t&&(0,L.jsx)(as,{className:`${n}-description`,children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.purchasingGuardianPage.plesk.noteForAdmin"})})})]})})})},QY=({uatAction:e,children:t,icon:n,onClick:s,purchaseLicenseUrl:i})=>(0,L.jsx)(ft,{icon:n,component:"a",href:i,target:"_blank",onClick:()=>{e&&lm(e),null==s||s()},"data-test-id":Nh,children:t}),eB=(0,so.$j)((e=>({isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller,publicUrl:e.app.urls.publicUrl,isVirtualPatchesLicensingForEndCustomersEnabled:e.app.options.isVirtualPatchesLicensingForEndCustomersEnabled,showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans,wordPressToolkitLiteEdition:e.app.options.wordPressToolkitLiteEdition,upgradePleskUrl:e.app.urls.upgradePleskUrl,purchaseDeluxeGuardianUrl:e.app.urls.purchaseDeluxeGuardianUrl})))((e=>{const{installation:t,publicUrl:n,isVirtualPatchesLicensingForEndCustomersEnabled:s,showVirtualPatchesUpsellWhenRestrictedViaPlans:i,startPurchasingGuardian:a,startPurchasingSubscription:r,wordPressToolkitLiteEdition:o,upgradePleskUrl:l,purchaseDeluxeGuardianUrl:c,isAdmin:u,uatAction:d,baseClassName:p=`${gu}vpatches-upsell-dialog-subscribe-button`}=e,h=Mc("drawer.vpatchesSubscription.mainPage.button"),m=u||i,f=s&&!i,g=(()=>{var e;const n=o?l:c;try{const s=new URL(n,window.location.href);return(null===(e=t.domain)||void 0===e?void 0:e.name)&&s.searchParams.set("domain",t.domain.name),s.toString()}catch(e){return n}})();return m&&f?(0,L.jsx)(Tt,{menu:(0,L.jsxs)(Nn,{children:[(0,L.jsx)(Jn,{children:h("buySubscription.menu.title")}),(0,L.jsxs)(QY,{uatAction:d,icon:(0,L.jsx)(he,{src:`${n}images/crown.svg`}),onClick:()=>a(),purchaseLicenseUrl:g,children:[h("buySubscription.menu.bundle"),(0,L.jsxs)("ul",{className:`${p}__menu-item-ul`,children:[(0,L.jsx)("li",{children:h("buySubscription.menu.bundle.description.plesk.1")}),(0,L.jsx)("li",{children:h("buySubscription.menu.bundle.description.plesk.2")})]})]}),(0,L.jsxs)(ft,{icon:"shield",onClick:()=>r(),"data-test-id":"wpt-virtual-patching-upsell-dialog-buy-subscription-item",children:[h("buySubscription.menu.single"),(0,L.jsxs)("ul",{className:`${p}__menu-item-ul`,children:[(0,L.jsx)("li",{children:h("buySubscription.menu.single.description.1")}),(0,L.jsx)("li",{children:h("buySubscription.menu.single.description.2")})]})]})]}),children:(0,L.jsx)(Ue,{intent:"primary","data-test-id":tm,children:h("buySubscription")})}):!m&&f?(0,L.jsx)(Ue,{intent:"primary",onClick:r,"data-test-id":tm,children:h("buySubscription")}):(0,L.jsx)(dm,{installationId:t.id,uatAction:km,onClick:()=>a(),purchaseLicenseUrl:g,intent:"primary","data-test-id":tm,featureType:"virtualPatches",children:h("buySubscription")})})),tB=(0,so.$j)((e=>({purchaseWordPressToolkitUrl:e.app.urls.purchaseWordPressToolkitUrl,upgradePleskUrl:e.app.urls.upgradePleskUrl})))((({uatAction:e,upgradePleskUrl:t,purchaseWordPressToolkitUrl:n,baseClassName:s=`${gu}vpatches-upsell-wptLite-page`})=>(0,L.jsxs)(vi,{className:s,children:[(0,L.jsx)(Ks,{className:`${s}-description`,children:(0,L.jsx)(Wn,{children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.wptLitePage.featureDescription"})})}),(0,L.jsxs)(Ks,{children:[(0,L.jsx)(as,{children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.wptLitePage.instruction.title"})})}),(0,L.jsxs)("ol",{children:[(0,L.jsx)("li",{children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.wptLitePage.instruction.steps.1",params:{buyWpToolkitLink:(0,L.jsx)(fe,{onClick:()=>{lm(e),window.open(n)},children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.wptLitePage.instruction.steps.1.buyWpToolkitLinkText"})})}),upgradePleskLicenseLink:(0,L.jsx)(fe,{onClick:()=>window.open(t),children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.wptLitePage.instruction.steps.1.upgradePleskLicenseLinkText"})})})}})}),(0,L.jsx)("li",{children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.wptLitePage.instruction.steps.2"})})]})]})]}))),nB=(0,so.$j)((e=>({publicUrl:e.app.urls.publicUrl,isVirtualPatchesLicensingForEndCustomersEnabled:e.app.options.isVirtualPatchesLicensingForEndCustomersEnabled,showVirtualPatchesUpsellWhenRestrictedViaPlans:e.app.options.showVirtualPatchesUpsellWhenRestrictedViaPlans,wordPressToolkitLiteEdition:e.app.options.wordPressToolkitLiteEdition,isAdmin:e.app.options.isAdmin&&!e.app.options.isReseller})),(e=>({getVirtualPatchesSubscriptionGuid:nh(Fy,e),getVirtualPatchesSubscriptionPurchaseUrlAndGuid:nh(Yy,e),activateVirtualPatchesSubscription:nh(Hy,e),detachVirtualPatchesSubscription:nh(Vy,e),displayErrorMessageFromMeta:nh(_p,e),updateVirtualPatchesProtectionStatus:nh(Wg,e)})))((e=>{const{installation:t,isOpen:n,onClose:s,onOpen:i,onOpenLicenseInfoDrawer:a,publicUrl:r,isVirtualPatchesLicensingForEndCustomersEnabled:o,showVirtualPatchesUpsellWhenRestrictedViaPlans:l,uatAction:c,wordPressToolkitLiteEdition:u,activateVirtualPatchesSubscription:d,detachVirtualPatchesSubscription:p,getVirtualPatchesSubscriptionGuid:h,getVirtualPatchesSubscriptionPurchaseUrlAndGuid:m,displayErrorMessageFromMeta:f,updateVirtualPatchesProtectionStatus:g,isAdmin:b,baseClassName:v=`${gu}vpatches-upsell-dialog`}=e,y=Mc("drawer.vpatchesSubscription"),_=Mc("controllers.index.detail.virtualPatches"),x=u,[S,w]=(0,U.useState)(!1),[k,j]=(0,U.useState)(!1),[T,C]=(0,U.useState)(!1),[D,P]=(0,U.useState)(!1),[I,O]=(0,U.useState)(null),M=o&&!l;(0,U.useEffect)((()=>{n&&(j(!1),C(!1),P(!1),O(null),w(!1))}),[n]);const A=(e,t)=>{j(!0),d(e,t?t.trim():void 0).then((t=>{[Qd.Active,Qd.Suspended].includes(t.status)?((e=>{g({installationsIds:[e],status:!0,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0}).catch((e=>{var t;422===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&f(e)}))})(e),j(!1),s(),a(e)):(O(t.id),j(!1),P(!0))})).catch((n=>{t&&f(n),h(e).then((({guid:e})=>{O(e)})).catch((()=>O(null))).finally((()=>{P(!0),j(!1)}))}))};return(0,L.jsx)(ji,{isOpen:n,title:y(D?"activationPage.title":"mainPage.title"),subtitle:t?(R=t.displayTitle,x?_("poweredBy",{providerLogo:(0,L.jsx)(wn,{href:"https://patchstack.com",children:(0,L.jsx)(uT,{})})}):y("common.subtitle",{installationName:R})):"",sideBanner:(0,L.jsx)("div",{className:`${v}-sideBannerImage`,style:{backgroundImage:`url('${r}images/virtual-patching.png')`}}),size:"xs",onClose:s,buttons:t?(e=>{return x||T||k||D||S?null:(0,L.jsxs)("div",{className:`${v}-buttons-container`,children:[(0,L.jsx)(eB,{installation:e,startPurchasingGuardian:()=>w(!0),startPurchasingSubscription:()=>(e=>{C(!0),m(e).then((t=>{(e=>{const t=window.open(e);return t?new Promise((e=>{const n=setInterval((()=>{t.closed&&(clearInterval(n),e())}),3e3)})):Promise.resolve()})(t.purchaseUrl).then((()=>{i(e,c),C(!1),A(e)}))})).catch((()=>C(!1)))})(e.id),uatAction:c}),M&&(t=e.id,(0,L.jsx)(Ue,{onClick:()=>A(t),children:y("mainPage.button.iHaveSubscription")}))]});var t})(t):void 0,form:D?{submitButton:!1,applyButton:!1,cancelButton:{onClick:()=>P(!1),children:y("activationPage.button.back"),arrow:"backward"}}:S?{submitButton:!1,applyButton:!1,cancelButton:{children:y("purchasingGuardianPage.button.cancel")}}:void 0,cancelButton:D||S,"data-test-id":"wpt-virtual-patching-upsell-dialog",children:(0,L.jsx)("div",{className:`${v}-content`,children:t?(E=t.id,x?(0,L.jsx)(tB,{uatAction:c}):k?(0,L.jsx)(ZY,{loaderText:(0,L.jsx)(Wn,{bold:!0,children:y("common.status.updating")})}):T?(0,L.jsx)(ZY,{loaderText:(0,L.jsx)(Wn,{bold:!0,children:y("common.status.waitingPurchasingEnd")}),description:y("common.status.waitingPurchasingEnd.description")}):D?(0,L.jsx)(KY,{storedSubscriptionId:I,retrieveSubscriptionDataFromLicenseService:e=>A(E,e),detachSubscription:()=>(e=>{j(!0),p(e).then((()=>O(null))).catch((()=>{})).finally((()=>j(!1)))})(E)}):S?(0,L.jsx)(JY,{showNoteForAdmin:b}):(0,L.jsx)(XY,{})):void 0})});var E,R}));var sB=r(74855);const iB=({text:e,baseClassName:t=`${gu}copyable-text`})=>{const[n,s]=U.useState(!1),i=U.useCallback((()=>{s(!0),setTimeout((()=>{s(!1)}),700)}),[]);return(0,L.jsxs)("span",{className:t,children:[e,(0,L.jsx)(sB.CopyToClipboard,{text:e,onCopy:i,children:(0,L.jsx)(he,{name:"copy-indicator",className:n?"pulse":""})})]})},aB=e=>{const{subscription:t,formatDate:n,renderRefreshButton:s,baseClassName:i=`${gu}vpatches-subscription-info-view`}=e,a=Mc("drawer.vpatchesSubscription.infoPage");return(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"check-mark-circle-filled",intent:"success",size:"16"}),"data-test-id":"virtual-patching-active-subscription-item",title:(0,L.jsx)(Wn,{bold:!0,fontSize:"md",children:a("subscriptionInfo.status.active")}),children:(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{className:`${i}-item`,title:a("subscriptionInfo.id"),"data-test-id":"virtual-patching-subscription-info-subscription-id",children:(0,L.jsx)(iB,{text:t.id})}),(0,L.jsx)(Ks,{className:`${i}-item`,title:a("subscriptionInfo.paidAt"),children:n(t.startDate)}),(0,L.jsx)(Ks,{className:`${i}-item`,title:a("subscriptionInfo.nextPaymentAt"),children:n(t.endDate)}),(0,L.jsx)(Ks,{children:s()}),(0,L.jsx)(Ks,{children:(0,L.jsx)(GY,{})})]})})},rB=e=>{const{subscription:t,formatDate:n,renderRefreshButton:s,baseClassName:i=`${gu}vpatches-subscription-info-view`}=e,a=Mc("drawer.vpatchesSubscription.infoPage");return(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"cross-mark-circle",intent:"danger",size:"16"}),title:(0,L.jsx)(Wn,{bold:!0,fontSize:"md",children:a("subscriptionInfo.status.cancelled")}),children:(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{className:`${i}-item`,title:a("subscriptionInfo.id"),children:(0,L.jsx)(iB,{text:t.id})}),(0,L.jsx)(Ks,{className:`${i}-item`,title:a("subscriptionInfo.cancelledAt"),children:n(t.cancellationDate)}),(0,L.jsx)(Ks,{className:`${i}-item`,title:a("subscriptionInfo.validUntil"),children:n(t.endDate)}),(0,L.jsx)(Ks,{children:s()}),(0,L.jsx)(Ks,{children:(0,L.jsx)(GY,{})})]})})},oB=e=>{const{subscription:t,formatDate:n,handleDetachSubscription:s,handleBuyNewSubscription:i,baseClassName:a=`${gu}vpatches-subscription-info-view`}=e,r=Mc("drawer.vpatchesSubscription.infoPage"),o=(0,L.jsxs)(An,{className:`${a}-detach-popover`,target:(0,L.jsx)(Ue,{children:r("subscriptionInfo.button.detachSubscription")}),children:[(0,L.jsx)(as,{children:r("subscriptionInfo.removeSubscriptionConfirmationPopover.text")}),(0,L.jsx)(Ue,{intent:"danger",size:"md",onClick:()=>s(),children:r("subscriptionInfo.removeSubscriptionConfirmationPopover.submitButton")})]});return(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"exclamation-mark-circle",intent:"danger",size:"16"}),title:(0,L.jsx)(Wn,{bold:!0,fontSize:"md",children:r("subscriptionInfo.status.terminated")}),children:(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{className:`${a}-item`,title:r("subscriptionInfo.id"),children:(0,L.jsx)(iB,{text:t.id})}),!!t.cancellationDate&&(0,L.jsx)(Ks,{className:`${a}-item`,title:r("subscriptionInfo.cancelledAt"),children:n(t.cancellationDate)}),(0,L.jsx)(Ks,{className:`${a}-item`,title:r("subscriptionInfo.terminatedAt"),children:n(t.endDate)}),(0,L.jsx)(Ks,{children:(0,L.jsx)(Ue,{intent:"primary",onClick:()=>i(),children:r("subscriptionInfo.button.buyNewSubscription")})}),(0,L.jsx)(Ks,{children:(0,L.jsx)(GY,{})}),(0,L.jsx)(Ks,{children:o})]})})},lB=(e,t,n,s,i)=>(0,L.jsx)(Da,{icon:t,title:(0,L.jsx)(Wn,{bold:!0,fontSize:"md",children:(0,L.jsx)(Ac,{content:n})}),children:(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{unsafe:!0,content:s,params:{siteName:e}})}),!!i&&(0,L.jsx)(Ks,{children:i})]})}),cB=(0,so.$j)((e=>({publicUrl:e.app.urls.publicUrl})))((e=>e.isProtectionStatusUpdating?lB(e.installationTitle,(0,L.jsx)(he,{name:"reload",animation:"spin",intent:"info",size:"16"}),"drawer.vpatchesSubscription.infoPage.protectionStatus.updating","drawer.vpatchesSubscription.infoPage.protectionStatus.updating.description"):e.isProtectionEnabled?lB(e.installationTitle,(0,L.jsx)(he,{name:"shield-filled",intent:"success",size:"16"}),"drawer.vpatchesSubscription.infoPage.protectionStatus.enabled","drawer.vpatchesSubscription.infoPage.protectionStatus.enabled.description"):lB(e.installationTitle,(0,L.jsx)(he,{src:`${e.publicUrl}images/shield-attention.svg`,intent:"danger",size:"16"}),"drawer.vpatchesSubscription.infoPage.protectionStatus.disabled","drawer.vpatchesSubscription.infoPage.protectionStatus.disabled.description",(0,L.jsx)(Ue,{disabled:!e.isProtectionAvailable,intent:"primary",onClick:e.handleEnableProtection,children:(0,L.jsx)(Ac,{content:"drawer.vpatchesSubscription.infoPage.protectionStatus.disabled.button.enable"})})))),uB=e=>{const{subscription:t,formatDate:n,renderRefreshButton:s,baseClassName:i=`${gu}vpatches-subscription-info-view`}=e,a=Mc("drawer.vpatchesSubscription.infoPage");return(0,L.jsx)(Da,{icon:(0,L.jsx)(he,{name:"triangle-exclamation-mark",intent:"warning",size:"16"}),title:(0,L.jsx)(Wn,{bold:!0,fontSize:"md",children:a("subscriptionInfo.status.renewalFailed")}),children:(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{children:a("subscriptionInfo.renewalFailed.description")}),(0,L.jsx)(Ks,{className:`${i}-item`,title:a("subscriptionInfo.id"),children:(0,L.jsx)(iB,{text:t.id})}),(0,L.jsx)(Ks,{children:s()}),(0,L.jsx)(Ks,{children:(0,L.jsx)(GY,{})})]})})},dB=e=>{const{subscription:t,protectionStatus:n,isProtectionAvailable:s,installationTitle:i,refreshSubscriptionData:a,detachSubscription:r,handleBuyNewSubscription:o,handleEnableProtection:l,isUpdating:c,isProtectionStatusUpdating:u}=e,d=Mc("drawer.vpatchesSubscription.infoPage"),{languages:p}=navigator,h=e=>new Date(e).toLocaleString(p),m=()=>(0,L.jsx)(fe,{icon:"refresh",onClick:()=>a(),children:d("subscriptionInfo.button.refresh")});return c||!t?(0,L.jsx)(It,{}):(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(cB,{isProtectionAvailable:s,isProtectionEnabled:n,isProtectionStatusUpdating:u,installationTitle:i,handleEnableProtection:l})}),(0,L.jsx)(Ks,{children:t.status===Qd.Terminated?(0,L.jsx)(oB,{subscription:t,formatDate:h,handleDetachSubscription:r,handleBuyNewSubscription:o}):t.status===Qd.Suspended?(0,L.jsx)(uB,{subscription:t,formatDate:h,renderRefreshButton:m}):t.cancellationDate?(0,L.jsx)(rB,{subscription:Object.assign(Object.assign({},t),{cancellationDate:t.cancellationDate}),formatDate:h,renderRefreshButton:m}):(0,L.jsx)(aB,{subscription:t,formatDate:h,renderRefreshButton:m})})]})},pB=(0,so.$j)(((e,t)=>{const{installation:n}=t;return{hasActiveTasks:null!==n&&e.vulnerabilities.virtualPatchesUpdatingStatuses.some((e=>e.installationIds.includes(n.id)))}}),(e=>({getVirtualPatchesSubscriptionInfo:nh(Ny,e),activateVirtualPatchesSubscription:nh(Hy,e),detachVirtualPatchesSubscription:nh(Vy,e),displayErrorMessageFromMeta:nh(_p,e),updateVirtualPatchesProtectionStatus:nh(Wg,e)})))((e=>{var t,n;const{isOpen:s,onClose:i,installation:a,onOpenUpsellDialog:r,activateVirtualPatchesSubscription:o,detachVirtualPatchesSubscription:l,getVirtualPatchesSubscriptionInfo:c,displayErrorMessageFromMeta:u,updateVirtualPatchesProtectionStatus:d,hasActiveTasks:p,baseClassName:h=`${gu}vpatches-subscription-drawer`}=e,m=Mc("drawer.vpatchesSubscription"),[f,g]=(0,U.useState)(!1),[b,v]=(0,U.useState)(void 0),[y,_]=(0,U.useState)(!1),x=(0,U.useCallback)((e=>{g(!0),c(e).then((e=>{v(e)})).catch((e=>{u(e),i()})).finally((()=>g(!1)))}),[u,c,i]);(0,U.useEffect)((()=>{s&&(null==a?void 0:a.id)&&(S(),x(a.id))}),[s,null==a?void 0:a.id,x]);const S=()=>{g(!1),v(void 0)};return(0,L.jsx)(zi,{className:h,"data-type":"virtual-protection-subscription-info",title:m("infoPage.title"),subtitle:a?a.displayTitle:void 0,isOpen:s,onClose:i,size:"xs",children:a?(0,L.jsx)(dB,{subscription:b,installationTitle:a.displayTitle,protectionStatus:null!==(t=a.features.virtualPatches.status)&&void 0!==t&&t,isProtectionAvailable:null!==(n=a.features.virtualPatches.available)&&void 0!==n&&n,refreshSubscriptionData:()=>{return e=a.id,g(!0),void o(e,t).then((e=>v(e))).catch((e=>{i()})).finally((()=>g(!1)));var e,t},detachSubscription:()=>{return e=a.id,g(!0),void l(e).catch((()=>{})).finally((()=>{g(!1),i()}));var e},handleBuyNewSubscription:()=>{return e=a.id,i(),void r(e,km);var e},handleEnableProtection:()=>{return e=a.id,_(!0),void d({installationsIds:[e],status:!0,skipBrokenInstallations:!0,skipInfectedInstallations:!0,skipUnsupportedInstallations:!0}).catch((e=>{var t;422===(null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.status)&&u(e)})).finally((()=>_(!1)));var e},isUpdating:f,isProtectionStatusUpdating:y||p}):void 0})})),hB={isOpen:!1,title:"",cancelTitle:"",buttons:null,content:""},mB={DbUser:!0,Db:!0,ActionLog:!0},fB={isOpen:!1,installationId:null,type:null};class gB extends U.Component{constructor(e){super(e),this.isSmartUpdatePromoVisible=()=>{const{installations:e,showSmartUpdates:t,showSmartUpdatePromo:n,isSmartUpdatePromoAvailable:s}=this.props;return!!e&&!!(t&&n&&s)&&e.some((({installationType:e,features:{updates:{autoUpdatesAvailable:t}}})=>QT(e)&&t))},this.dispatchSmartUpdatePromoUAT=()=>{this.isSmartUpdatePromoVisible()&&lm(Sm)},this.handleOnReceiveScanBackgroundTaskData=e=>{const{scanBackgroundTasksIds:t}=this.state;t.length&&t.forEach((t=>{const n=iw(t,e);n&&tw(n)&&(this.updateWordPressLimitsData().then(),this.setState((e=>({scanBackgroundTasksIds:e.scanBackgroundTasksIds.filter((e=>e!==n.id))})),(()=>{this.props.instancesActions.scanFinished();const e=this.isSmartUpdatePromoVisible();this.props.instancesActions.getInstancesData().then((()=>{!e&&this.isSmartUpdatePromoVisible()&&lm(Sm)})).catch((()=>{}))})))}))},this.loadInstancesList=()=>{const{instancesActions:{loadInstancesList:e}}=this.props;return this.setState({isLoading:!0}),e().then((()=>{this.applyGuiState(),this.updateItemsList()})).catch((()=>{})).finally((()=>{this.setState({isLoading:!1})}))},this.processRouteParams=()=>{var e;const{id:t,instancesIds:n,domain:s,plugins:i,themes:a,checkSecurity:r,install:o,clone:l,sync:c,update:u,logs:d,backup:p,setupAdminSettings:h,activeTab:m}=(e=>{const t={};if(!e)return t;const n=e.split("/");let s;for(let e=0;e<n.length;e++)e%2!=0?s&&(t[s]=n[e]):(s=n[e],s&&(t[s]=void 0));return t})(null===(e=this.props.match)||void 0===e?void 0:e.params.params);let f=null;t&&(f=parseInt(t));const g={showInstanceNativeAssets:!(!i&&!a||!f),checkSecurity:!!r,selectedInstancesIdsForSecuring:r&&n?decodeURIComponent(n).split(",").map((e=>parseInt(e))):[],showInstancesSecurityDrawer:!(!r||!n),instancesSecurityDrawerActiveTab:m?Number(m):void 0,selectedDomainNameForInstallation:s||null,forceInstall:!!o,showInstanceInstallDrawer:!(!o||!s)};this.setState(g,(()=>{f&&(this.setSelectedInstanceId(f),r&&f?this.handleOpenSecurityDialog(f,g.instancesSecurityDrawerActiveTab):l?this.handleOpenCloneDialog(f):c?this.handleOpenSyncDialog(f):i?this.handleOpenNativeAssets(f,au):a?this.handleOpenNativeAssets(f,iu):u?this.handleOpenUpdatesDialog(f,Af):d?this.handleOpenActionLogDrawer(f):p?this.handleOpenBackupDrawer(f):h?this.handleInitialOpenAdminSettingsDrawer(f):this.expandRow(f,!1))}))},this.handleGoToImport=()=>{window.location.href=this.props.urls.importUrl},this.handleScan=()=>!this.checkWpLimitExceeded()&&this.props.instancesActions.scan().then((e=>{this.setState((t=>({scanBackgroundTasksIds:t.scanBackgroundTasksIds.concat(e.task.id)})))})).catch((()=>{})),this.sortByField=(e="",t="")=>{const{cookies:n}=this.props;e&&(null==n||n.set(ZF,e,{path:"/"})),t&&(null==n||n.set(JF,t,{path:"/"})),this.setState({selection:[],selectedInstancesIdsForSecuring:[],selectedInstanceId:null}),this.loadInstancesList()},this.updateItemsList=()=>{Promise.all([this.getFilterData()]).then((()=>{this.handleUpdateVisibleItems({page:this.state.currentPage,pageSize:this.state.pageSize})}))},this.filterByField=(e=null)=>{const{instancesActions:{setInstancesFilter:t},cookies:n}=this.props;this.setState({selectedInstanceId:null},(()=>{null==n||n.set(XF,e,{path:"/"}),t(e)}))},this.getSortDropdownMenuItems=()=>{const{isOwnerColumnAvailable:e}=this.props,t=this.getCurrentSortField(),n=this.getCurrentSortOrder(),s=[],i=["title","version","displayTitle"];return e&&i.push("ownerName"),i.forEach((e=>{s.push((0,L.jsx)(ft,{icon:e===t?MT("check-mark"):void 0,onClick:()=>this.sortByField(e),children:(0,L.jsx)(Ac,{content:`toolbar.sort.by.${e}`})},`toolbarSort${e}`))})),s.push((0,L.jsx)(ht,{},"toolbarSortDivider")),s.push((0,L.jsx)(ft,{icon:"asc"===n?MT("check-mark"):void 0,onClick:()=>this.sortByField("","asc"),children:(0,L.jsx)(Ac,{content:"toolbar.sort.ascending"})},"toolbarSortAscending")),s.push((0,L.jsx)(ft,{icon:"desc"===n?MT("check-mark"):void 0,onClick:()=>this.sortByField("","desc"),children:(0,L.jsx)(Ac,{content:"toolbar.sort.descending"})},"toolbarSortDescending")),s},this.getFilterDropdownMenuItems=e=>{const t=[];return[HF,BF].forEach((n=>{t.push(this.getFilterMenuItem(n,"info",e))})),t.push((0,L.jsx)(Jn,{children:(0,L.jsx)(Ac,{content:"toolbar.filter.problems"})},"toolbarSortProblemsHeader")),[KF,$F,WF,zF,VF,GF].forEach((n=>{t.push(this.getFilterMenuItem(n,"danger",e))})),t.push((0,L.jsx)(ht,{},"toolbarSortDivider")),t.push((0,L.jsx)(ft,{onClick:()=>this.filterByField(qF),icon:"cross-mark",label:(0,L.jsx)(ye,{children:e.total}),children:(0,L.jsx)(Ac,{content:"toolbar.filter.reset"})},"toolbarFilterReset")),t},this.getFilterMenuItem=(e,t,n)=>{const{filter:s}=this.props;return(0,L.jsx)(ft,{disabled:n[e]<=0,icon:s&&e===s?MT("check-mark"):void 0,onClick:()=>this.filterByField(e),label:(0,L.jsx)(ye,{intent:t,children:n[e]}),children:(0,L.jsx)(Ac,{content:`toolbar.filter.${e}`})},`toolbarFilter${e}`)},this.getCurrentSortOrder=()=>{var e;return(null===(e=this.props.cookies)||void 0===e?void 0:e.get(JF))||"asc"},this.getCurrentSortField=()=>{var e;return(null===(e=this.props.cookies)||void 0===e?void 0:e.get(ZF))||"title"},this.handleOpenNativeAssets=(e,t)=>{this.setState({nativeAssets:{isOpen:!0,installationId:e,type:t}})},this.handleCloseNativeAssets=()=>{this.state.nativeAssets.isOpen&&this.state.showInstanceNativeAssets&&(this.props.history.replace("/list"),this.setState({showInstanceNativeAssets:!1})),this.setState({nativeAssets:Object.assign({},fB)})},this.handleOpenVirtualPatchingUpsellDialog=(e,t)=>{this.setState({isVirtualPatchingUpsellDialogVisible:!0,showVirtualPatchingUpsellDialogForInstallationId:e,virtualPatchingUpsellDialogUatAction:t})},this.handleCloseVirtualPatchingUpsellDialog=()=>{this.setState({isVirtualPatchingUpsellDialogVisible:!1,virtualPatchingUpsellDialogUatAction:""})},this.handleOpenVirtualPatchingLicenseInfoDrawer=e=>{this.setState({showVirtualPatchingLicenseInfoDrawerForInstallation:e,isVirtualPatchingLicenseInfoDrawerVisible:!0})},this.handleCloseVirtualPatchingLicenseInfoDrawer=()=>{this.setState({isVirtualPatchingLicenseInfoDrawerVisible:!1})},this.handleRefresh=e=>(this.handleAddInstanceToDisabledInstancesSet([e]),this.props.instancesActions.refresh(e).catch((()=>{})).finally((()=>{this.handleRemoveInstanceFromDisabledInstancesSet([e])}))),this.handleSwitchPhpHandler=(e,t)=>(this.handleAddInstanceToDisabledInstancesSet([e]),this.props.instancesActions.switchPhpHandler(e,t).finally((()=>{this.handleRemoveInstanceFromDisabledInstancesSet([e])}))),this.handleAddInstanceToDisabledInstancesSet=e=>{const{disabledInstancesSet:t}=this.state;e.forEach((e=>t.add(e))),this.setState({disabledInstancesSet:t})},this.handleRemoveInstanceFromDisabledInstancesSet=e=>{const{disabledInstancesSet:t}=this.state;e.forEach((e=>t.delete(e))),this.setState({disabledInstancesSet:t})},this.removeInstances=e=>{const{remove:t}=this.props.instancesActions,{Db:n,DbUser:s,ActionLog:i}=this.state.removeOptions,a={removeDb:n,removeUser:s,removeActionLog:i,checkShared:e.length>1};return this.handleAddInstanceToDisabledInstancesSet(e),this.handleCloseDialog(),t(e,a).catch((()=>{})).finally((()=>{this.updateWordPressLimitsData().then(),this.handleRemoveInstanceFromDisabledInstancesSet(e),this.getFilterData(),this.handleUpdateVisibleItems({page:this.state.currentPage,pageSize:this.state.pageSize}),this.setState((t=>{const n=t.selection.filter((t=>!e.includes(t)));return{selection:n,selectedInstancesIdsForSecuring:n}})),this.removeInstancesFromExpandedRows(e),this.forgetExpandedInstanceIds(e)}))},this.handleBulkRemove=()=>{const{selection:e}=this.state,{installations:t,instancesActions:{getInstallationsRemoveConfiguration:n},appActions:{addWarningMessage:s},actionLogFeatureEnabled:i}=this.props;0!==e.length?n(e).then((e=>{const n=e.map((e=>{const n=this.getInstallationFromProps(e.id);if(!n)return{id:e.id,url:null,isPossibleToRemove:!1,hintMessage:null};const s=e.database.removingAllowed&&e.user.removingAllowed,i={id:e.id,url:`<a target='_blank' href="${n.url}">${n.displayTitle}</a>`,isPossibleToRemove:!0,hintMessage:(0,L.jsx)(Ac,{content:"remove-confirmation.hintWillRemoveSuccess",params:{site:n.displayTitle}})};if(!s){const n=e.database.sharedWithInstallationsIds,s=e.user.sharedWithInstallationsIds,a=(t||[]).filter((e=>n.includes(e.id)||s.includes(e.id)));i.hintMessage=(0,L.jsx)(Ac,{content:"remove-confirmation.hintSharedInstanceError",params:{sharedInstance:a.map((e=>e.displayTitle)).join(", ")}})}return iC(n.installationType)&&(i.isPossibleToRemove=!1,i.hintMessage=(0,L.jsx)(Ac,{content:"remove-confirmation.hintRemoteAgentInstanceRemoveUnsupported"})),i})),s=n.every((e=>!1===e.isPossibleToRemove)),a=n.filter((e=>!0===e.isPossibleToRemove)).map((e=>e.id));this.setState({dialog:{isOpen:!0,title:(0,L.jsx)(Ac,{content:"remove-confirmation.titleMass"}),cancelTitle:(0,L.jsx)(Ac,{content:"controllers.index.detail.buttonConfirmationNo"}),content:(0,L.jsx)(cY,{title:(0,L.jsx)(Ac,{content:"controllers.index.detail.massRemoveConfirmationDescription"}),installationsToRemove:n,actionLogFeatureEnabled:i,actionLogRemoveLabel:(0,L.jsx)(Ac,{content:"massRemoveConfirmation.removeActionLog"}),changeRemoveOptions:this.changeRemoveOptions}),buttons:(0,L.jsx)(Ue,{"data-test-id":kh,onClick:()=>this.removeInstances(a),disabled:s,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.removeButton"})})}})})).catch((()=>{})):s((0,L.jsx)(Ac,{content:"remove-confirmation.noItemsSelectedToast"}))},this.handleRemove=e=>{const{id:t,displayTitle:n,features:{actionLog:s}}=e,{appActions:{addWarningMessage:i},instancesActions:{getInstallationsRemoveConfiguration:a}}=this.props;a([t]).then((e=>{const a=e.find((e=>e.id===t));a?this.setState({dialog:{isOpen:!0,title:(0,L.jsx)(Ac,{content:"remove-confirmation.titleSingle"}),cancelTitle:(0,L.jsx)(Ac,{content:"remove-confirmation.buttonNo"}),content:(0,L.jsx)(qL,{changeRemoveOptions:this.changeRemoveOptions,db:a.database,dbUser:a.user,isInstanceDatabaseDeletionAllowed:a.database.removingAllowed&&a.user.removingAllowed,isDatabaseWillBeRemovedAutomatically:a.database.willBeRemovedAutomatically,installationId:t,installationTitle:n,isActionLogAvailable:s.available}),buttons:(0,L.jsx)(Ue,{onClick:()=>this.removeInstances([t]),"data-test-id":kh,children:(0,L.jsx)(Ac,{content:"remove-confirmation.buttonYes"})})}}):i((0,L.jsx)(Ac,{content:"remove-confirmation.error.getConfirmationDetails"}))})).catch((()=>{}))},this.changeRemoveOptions=e=>{this.setState((t=>({removeOptions:Object.assign(Object.assign({},t.removeOptions),e)})))},this.handleBulkDetach=e=>{if(0===e.length)return void this.props.appActions.addWarningMessage((0,L.jsx)(Ac,{content:"remove-confirmation.noItemsSelectedToast"}));const{installations:t}=this.props,n=(t||[]).filter((t=>e.includes(t.id))).map((e=>({id:e.id,url:`<a target='_blank' href="${e.url}">${e.displayTitle}</a>`,isPossibleToRemove:!0,hintMessage:(0,L.jsx)(Ac,{content:"detach-confirmation.hintWillDetachSuccess"})})));this.setState({dialog:{isOpen:!0,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.detachConfirmationTitle"}),cancelTitle:(0,L.jsx)(Ac,{content:"controllers.index.detail.buttonConfirmationNo"}),content:(0,L.jsx)(cY,{installationsToRemove:n,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.massDetachConfirmationDescription"})}),buttons:(0,L.jsx)(Ue,{onClick:()=>(this.handleAddInstanceToDisabledInstancesSet(e),this.handleCloseDialog(),this.props.instancesActions.detach(e).then((t=>(this.updateWordPressLimitsData().then(),this.getFilterData(),this.handleUpdateVisibleItems({page:this.state.currentPage,pageSize:this.state.pageSize}),this.setState((e=>{const n=e.selection.filter((e=>!t.data.detachedInstances.includes(e)));return{selection:n,selectedInstancesIdsForSecuring:n}})),this.removeInstancesFromExpandedRows(e),this.forgetExpandedInstanceIds(e),t))).finally((()=>{this.handleRemoveInstanceFromDisabledInstancesSet(e)}))),"data-test-id":jh,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.detachButton"})})}})},this.handleCloseDialog=()=>{this.setState((e=>({dialog:Object.assign(Object.assign({},e.dialog),{isOpen:!1}),removeOptions:Object.assign({},mB)})))},this.getFilterData=(e=!0)=>{const{search:t,filter:n,installations:s,isMultipleSiteManagementUnpaid:i}=this.props,a={[HF]:0,[BF]:0,[VF]:0,[zF]:0,[$F]:0,[WF]:0,[GF]:0,[KF]:0},{selectedInstanceId:r}=this.state;let o,l=s;if(l){if(t){const e=t.toLowerCase(),n=OL(t).toLowerCase();l=l.filter((({displayTitle:t,path:s,title:i,domain:a,server:r})=>-1!==t.toLowerCase().indexOf(e)||-1!==OL(t).toLowerCase().indexOf(n)||-1!==s.toLowerCase().indexOf(e)||-1!==i.toLowerCase().indexOf(e)||-1!==((null==a?void 0:a.name)||"").toLowerCase().indexOf(e)||-1!==OL((null==a?void 0:a.name)||"").toLowerCase().indexOf(n)||r&&-1!==r.toLowerCase().indexOf(e)))}l=l.filter((e=>{const{features:{debug:t,maintenance:s,php:i,vulnerability:c},labels:u,status:{alive:d,infected:p}}=e,h=!1===d,m=c.available&&!!c.vulnerable,f=!h&&!!s.status,g=!h&&this.hasUpdates(e),b=!h&&this.hasSecurityIssues(e),v=!0===t.status,y=!0===i.eoled;if(r===e.id&&(o=e),m&&a[KF]++,h&&!p&&a[$F]++,p&&a[WF]++,f&&a[BF]++,g&&a[zF]++,b&&a[VF]++,v&&a[HF]++,y&&a[GF]++,!n||(l||[]).length<2)return!0;switch(n){case KF:return m;case $F:return h&&!p;case WF:return p;case BF:return f;case zF:return g;case VF:return b;case HF:return v;case GF:return y;default:return!0}})),a.total=(s||[]).length,o&&(l=[o,...l.filter((e=>e.id!==(null==o?void 0:o.id)))]),l=l.map((e=>Object.assign(Object.assign({},e),{disabled:i||!e.features.multipleSitesManagement.applicable}))),e?this.setState({items:l,filterCounters:a}):this.setState({filterCounters:a})}else this.setState({items:[],filterCounters:a})},this.updateWordPressLimitsData=()=>this.props.appActions.getInitialOptions(),this.setSelectedInstanceId=e=>{this.setState({selectedInstanceId:e},(()=>this.getFilterData(!0)))},this.handleSelection=e=>{this.setState({selection:e,selectedInstancesIdsForSecuring:e})},this.handleOnSelectPage=e=>{const{pageSize:t}=this.state;this.setState({isRefreshing:!0,selection:[]},(()=>this.handleUpdateVisibleItems({page:e,pageSize:t})))},this.handleSelectItemsPerPage=e=>{const{items:t,pageSize:n,currentPage:s}=this.state;"all"===e&&(e=t.length);const i=Math.floor(n*(s-1)/e)+1;this.setState({isRefreshing:!0,selection:[]},(()=>this.handleUpdateVisibleItems({page:i,pageSize:e})))},this.handleUpdateVisibleItems=({page:e,pageSize:t})=>{this.setState((n=>{const s=(e-1)*t,i=Math.min(s+t,n.items.length);return{isRefreshing:!1,pageSize:t,currentPage:e,showedItems:n.items.slice(s,i)}}))},this.handleOpenInstancesSecurityDrawer=e=>{this.setState({showInstancesSecurityDrawer:!0,instancesSecurityDrawerActiveTab:e})},this.handleCloseInstancesSecurityDrawer=()=>{this.state.showInstancesSecurityDrawer&&this.state.checkSecurity&&(this.props.history.replace("/list"),this.setState({selectedInstancesIdsForSecuring:[],checkSecurity:!1})),this.setState({showInstancesSecurityDrawer:!1,instancesSecurityDrawerActiveTab:void 0})},this.handleToggleInstancesUpdatesDrawer=()=>{this.setState((e=>({showInstancesUpdatesDrawer:!e.showInstancesUpdatesDrawer})))},this.handleToggleInstanceInstallDrawer=()=>{this.checkWpLimitExceeded()||(this.state.showInstanceInstallDrawer&&this.state.forceInstall&&(this.props.history.replace("/list"),this.setState({selectedDomainNameForInstallation:null,forceInstall:!1})),this.setState((e=>({showInstanceInstallDrawer:!e.showInstanceInstallDrawer}))))},this.handleOpenInstallationCompletedDialog=()=>{this.setState({showInstallationCompletedDialog:!0})},this.handleCloseInstallationCompletedDialog=()=>{this.setState({showInstallationCompletedDialog:!1})},this.handleShowConnectRemoteAgentInstanceDrawer=()=>{this.setState({isConnectRemoteAgentInstanceDrawerVisible:!0})},this.handleHideConnectRemoteAgentInstanceDrawer=()=>{this.setState({isConnectRemoteAgentInstanceDrawerVisible:!1})},this.handleBeforeInstallation=()=>this.setState({isSmartUpdatePromoVisibleBeforeInstallation:this.isSmartUpdatePromoVisible()}),this.handleInstallationCompleted=e=>{this.expandRow(e),this.updateWordPressLimitsData().then((()=>this.handleOpenInstallationCompletedDialog())),!this.state.isSmartUpdatePromoVisibleBeforeInstallation&&this.isSmartUpdatePromoVisible()&&lm(Sm)},this.handleSetSelectedInstanceAnchor=e=>e&&e.scrollIntoView(!1),this.renderFileManagerListAction=e=>{const{installationType:t,features:{fileManager:{url:n}},owner:s}=e;if(!n)return null;const{goToUri:i}=this.props;let a={};if(QT(t))a={onClick:e=>Rc(e,(()=>window.open(n)))};else{const{href:e,onClick:t}=bm({link:n,inNewWindow:!1,goToUri:i,accountUsername:s.login});a={onClick:e?t=>Rc(t,(()=>window.open(e))):t}}return(0,U.createElement)(za,Object.assign({},a,{"data-test-id":Hh,icon:"folder-closed",key:"filemanager",primary:!0}),(0,L.jsx)(Ac,{content:"instancesList.instanceCard.fileManager"}))},this.getInstallationUrl=e=>{const{url:t}=e;if(!t)return null;const{baseClassName:n}=this.props;return(0,L.jsx)(Fs,{className:`${n}__instance-url-column`,children:(0,L.jsx)(je,{title:(0,L.jsx)(Ac,{content:"toolbar.openInNewTab"}),children:(0,L.jsx)(wn,{href:t,target:"_blank","data-test-id":"instance-title-link",className:`${n}-instance-link`,children:(0,L.jsx)(Ac,{content:"instancesList.openWordpress"})})})})},this.renderLabels=e=>{const{features:{php:t}}=e,{alive:n,infected:s,unsupported:i,multisite:a}=e.status,{baseClassName:r}=this.props,o=[];return t.unsupported?(o.push((0,L.jsx)(Fs,{children:(0,L.jsx)(ye,{intent:"danger",className:`${r}-aligned`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.labelUnsupportedPhp"})})},"label-warning-instance-on-unsupported-php")),o):i?(o.push((0,L.jsx)(Fs,{children:(0,L.jsx)(ye,{intent:"danger","data-test-id":"unsupported-instance-label",className:`${r}-aligned`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.labelInstanceUnsupported"})})},"label-warning-instance-outdated")),o):(n?a&&o.push((0,L.jsx)(Fs,{children:(0,L.jsx)(ye,{intent:"info",className:`${r}-aligned`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.labelMultisite"})})},"label-multisite-instance")):s?o.push((0,L.jsx)(Fs,{children:(0,L.jsx)(ye,{intent:"danger","data-test-id":"infected-instance-label",className:`${r}-aligned`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.labelInstanceInfected"})})},"label-warning-instance-infected")):o.push((0,L.jsx)(Fs,{children:(0,L.jsx)(ye,{intent:"danger",className:`${r}-aligned`,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.labelInstanceBroken"})})},"label-warning-instance-broken")),o.push((0,L.jsx)(Fs,{children:(0,L.jsx)($Y,{installationId:e.id,tags:e.labels})},"installationLabels")),o)},this.getInstallationTitle=e=>{const t=this.getInstallationFromProps(e.id);if(!t)return null;const{displayTitle:n}=t,{baseClassName:s}=this.props,i=!this.state.disabledInstancesSet.has(t.id);return(0,L.jsxs)(Rs,{gap:"md","data-test-id":`instance-header-${e.id}`,"data-test-name":`instance-header-${t.title}`,"data-test-row":"header",children:[(0,L.jsx)(Fs,{children:(0,L.jsx)(gm,{uatAction:jm,featureName:"multiple_sites_management",description:(0,L.jsx)(Ac,{content:"paidFeature.multipleSitesManagementFeatureDescription"}),installationId:t.id,isInstanceFeatureDisabled:!t.features.multipleSitesManagement.applicable,className:`${s}-instance-name`,children:(0,L.jsx)("span",{"data-test-id":"instance-card-title",children:n})})}),this.getInstallationUrl(t),i&&this.renderLabels(t)]})},this.removeInstancesFromExpandedRows=e=>this.setState((t=>{const n=new Set;return e.forEach((e=>n.add(e))),{expandedRows:t.expandedRows.filter((e=>!n.has(e)))}})),this.expandRow=(e,t=!1)=>this.setState((n=>{const s=n.expandedRows.filter((t=>parseInt(`${t}`)!==parseInt(`${e}`)));return s.push(parseInt(`${e}`)),t&&this.props.instancesActions.keepExpandedInstanceId(e),{expandedRows:s}})),this.handleOpenSynchronizeSiteUrlDialog=e=>{this.expandRow(e,!0),this.setState({showSynchronizeSiteUrlDialogForInstanceId:e})},this.handleCloseSynchronizeSiteUrlDialog=()=>this.setState({showSynchronizeSiteUrlDialogForInstanceId:null}),this.handleOpenSecurityDialog=(e,t)=>{this.expandRow(e,!0),this.setState({selectedInstanceIdSecuring:e,checkSecurity:!0,securityDrawerActiveTab:t},(()=>this.getFilterData(!0)))},this.handleCloseSecurityDialog=()=>{this.state.selectedInstanceIdSecuring&&this.state.checkSecurity&&(this.props.history.replace("/list"),this.setState({selectedInstanceIdSecuring:null,checkSecurity:!1,securityDrawerActiveTab:void 0}))},this.handleOpenCloneDialog=e=>{this.expandRow(e),this.setState({selectedInstanceIdCloning:e,isCloneDrawerOpen:!0},(()=>this.getFilterData(!0)))},this.handleCloseCloneDrawer=()=>{this.state.selectedInstanceIdCloning&&this.state.isCloneDrawerOpen&&(this.props.history.replace("/list"),this.setState({selectedInstanceIdCloning:null,isCloneDrawerOpen:!1}))},this.handleOpenSyncDialog=e=>{this.expandRow(e),this.setState({selectedInstanceIdSyncing:e,isSyncDrawerOpen:!0},(()=>this.getFilterData(!0)))},this.handleCloseSyncDrawer=()=>{this.state.selectedInstanceIdSyncing&&this.state.isSyncDrawerOpen&&(this.props.history.replace("/list"),this.setState({selectedInstanceIdSyncing:null,isSyncDrawerOpen:!1}))},this.handleOpenUpdatesDialog=(e,t=null,n=!1)=>{this.expandRow(e,!0),this.setState({selectedInstanceIdUpdating:e,isUpdatesDrawerOpen:!n,openUpdatesType:t,isUpdateSettingsFormOpen:n},(()=>this.getFilterData(!0)))},this.handleCloseUpdatesDialog=()=>{this.state.selectedInstanceIdUpdating&&this.state.isUpdatesDrawerOpen&&(this.props.history.replace("/list"),this.setState({selectedInstanceIdUpdating:null,isUpdatesDrawerOpen:!1,openUpdatesType:null,isUpdateSettingsFormOpen:!1}))},this.handleOpenUpdatesSettingsDialog=()=>this.setState({isUpdateSettingsFormOpen:!0}),this.handleCloseUpdatesSettingsDialog=()=>this.setState({isUpdateSettingsFormOpen:!1}),this.getKebabListActions=e=>{const{id:t,installationType:n,features:{security:s,synchronizeSiteUrl:i},status:{alive:a,unsupported:r}}=e,{isSynchronizeSiteUrlEnabled:o}=this.props,l=[];return l.push((0,L.jsx)(za,{onClick:()=>this.handleOpenUpdatesDialog(t),disabled:!a||r,children:(0,L.jsx)(Ac,{content:"instancesList.instanceActions.checkUpdates"})},"checkUpdates")),s.available&&l.push((0,L.jsx)(za,{onClick:()=>this.handleOpenSecurityDialog(t),"data-test-id":Dh,disabled:!a||r,children:(0,L.jsx)(Ac,{content:"toolbar.checkSecurity"})},Dh)),o&&i.available&&l.push((0,L.jsx)(za,{onClick:()=>this.handleOpenSynchronizeSiteUrlDialog(t),"data-test-id":"instance-synchronize-site-url",children:(0,L.jsx)(Ac,{content:"toolbar.synchronizeSiteUrl"})},"synchronizeSiteUrl")),l.push((0,L.jsx)(za,{onClick:()=>this.handleBulkDetach([t]),"data-test-id":Ph,children:(0,L.jsx)(Ac,{content:"toolbar.detach"})},Ph)),iC(n)||(l.push((0,L.jsx)(ht,{},"instanceCardMenuDevider")),l.push((0,L.jsx)(za,{icon:"cross-mark",onClick:()=>this.handleRemove(e),"data-test-id":Ch,children:(0,L.jsx)(Ac,{content:"toolbar.remove"})},Ch))),l},this.renderActionLogListAction=e=>(0,L.jsx)(za,{onClick:()=>this.handleOpenActionLogDrawer(e),icon:"list","data-test-id":"instance-link-action-log",primary:!0,children:(0,L.jsx)(Ac,{content:"list.instances.linkActionLog"})},"instance-link-action-log"),this.getColumns=()=>{const{disabledInstancesSet:e}=this.state;return[{key:"title",title:(0,L.jsx)(Ac,{content:"instancesList.columnTitle"}),sortable:!1,type:"title",render:this.getInstallationTitle},{key:"issues",sortable:!1,type:"controls",render:t=>{const n=this.getInstallationFromProps(t.id);if(!n||e.has(n.id))return null;const{status:{unsupported:s}}=n;return s?null:(0,L.jsx)(BY,{installation:n,onOpenUpdates:this.handleOpenUpdatesDialog,onOpenSecurity:this.handleOpenSecurityDialog,onEnableInstances:this.handleRemoveInstanceFromDisabledInstancesSet,onDisableInstances:this.handleAddInstanceToDisabledInstancesSet,onOpenSmartPhpUpdatesDrawer:()=>this.handleOpenSmartPhpUpdatesDrawer(n.id)})}},{key:"actions",type:"actions",render:t=>{const n=this.getInstallationFromProps(t.id);if(!n||e.has(n.id))return null;const{installationType:s,features:{fileManager:i,actionLog:a}}=n,r=[];return r.push((0,L.jsx)(za,{primary:!0,icon:void 0,children:()=>(0,L.jsx)(qY,{installation:n,onOpenVulnerabilitiesDrawer:()=>this.handleOpenSecurityDialog(n.id,1),onOpenVirtualPatchesUpsell:()=>this.handleOpenVirtualPatchingUpsellDialog(n.id,jm)})},"vulnerability-shield")),a.available&&r.push(this.renderActionLogListAction(n.id)),i.available&&i.url&&(QT(s)||JT(s))&&r.push(this.renderFileManagerListAction(n)),r.push((0,L.jsx)(za,{icon:"refresh",onClick:()=>this.handleRefresh(n.id),"data-test-id":Yh,primary:!0,children:(0,L.jsx)(Ac,{content:"Card.refreshCardTooltip"})},"refresh")),(0,L.jsxs)(qa,{children:[r,this.getKebabListActions(n)]})}}]},this.updateKeptExpandedInstanceIds=e=>{const t=e.filter((e=>!this.state.expandedRows.includes(e)));t.length&&t.forEach((e=>this.props.instancesActions.keepExpandedInstanceId(e)));const n=this.state.expandedRows.filter((t=>!e.includes(t)));n.length&&this.forgetExpandedInstanceIds(n)},this.forgetExpandedInstanceIds=e=>{e.forEach((e=>this.props.instancesActions.forgetExpandedInstanceId(e)))},this.handleOnExpandedRowsChange=e=>{this.updateKeptExpandedInstanceIds(e),this.setState({expandedRows:e})},this.handleOpenActionLogDrawer=e=>{const{actionLogActions:{onOpenActionLogBrowser:t}}=this.props;t(e),this.expandRow(e,!0),this.setState({isActionLogDrawerVisible:!0,showActionLogDrawerForInstanceId:e})},this.handleCloseActionLogDrawer=()=>this.setState({isActionLogDrawerVisible:!1,showActionLogDrawerForInstanceId:null}),this.handleOpenBackupDrawer=e=>{this.expandRow(e,!0),this.setState({isBackupDrawerVisible:!0,showBackupDrawerForInstanceId:e})},this.handleCloseBackupDrawer=()=>this.setState({isBackupDrawerVisible:!1,showBackupDrawerForInstanceId:null}),this.handleInitialOpenAdminSettingsDrawer=e=>{this.expandRow(e,!0),this.setState({initialShowAdminSettingsDrawer:!0,showInitialShowAdminSettingsDrawerForInstanceId:e})},this.handleOpenCheckWordPressIntegrityDialog=e=>{this.expandRow(e,!0),this.setState({isCheckWordPressIntegrityDialogVisible:!0,showCheckWordPressIntegrityDialogForInstanceId:e})},this.handleCloseCheckWordPressIntegrityDialog=()=>this.setState({isCheckWordPressIntegrityDialogVisible:!1,showCheckWordPressIntegrityDialogForInstanceId:null}),this.renderEmptyView=()=>{const{isInstallButtonAvailable:e,search:t,filter:n}=this.props,{isLoading:s,items:i}=this.state;if(s)return(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"list.instances.loading"})});if((t||n!==qF)&&0===i.length)return(0,L.jsx)(Na,{title:(0,L.jsx)(Ac,{content:"instancesList.emptyList.nothingFound"}),image:null});const a=[];return e&&a.push((0,L.jsx)(Ue,{onClick:this.handleToggleInstanceInstallDrawer,tooltip:(0,L.jsx)(Ac,{content:"instancesList.emptyList.installButton.hint"}),intent:"primary",children:(0,L.jsx)(Ac,{content:"instancesList.emptyList.installButton.title"})},"install")),a.push((0,L.jsx)(Ue,{icon:"eye",onClick:this.handleScan,tooltip:(0,L.jsx)(Ac,{content:"instancesList.emptyList.scanButton.hint"}),children:(0,L.jsx)(Ac,{content:"instancesList.emptyList.scanButton.title"})},"scan")),(0,L.jsx)(Na,{title:(0,L.jsx)(Ac,{content:"instancesList.emptyList.suggestInstall"}),actions:a})},this.handleOpenSmartPhpUpdatesDrawer=e=>{this.setState({isSmartPhpUpdateDrawerVisible:!0,showSmartPhpUpdateDrawerForInstanceId:e})},this.handleCloseSmartPhpUpdatesDrawer=()=>this.setState({isSmartPhpUpdateDrawerVisible:!1,showSmartPhpUpdateDrawerForInstanceId:null}),this.getLoadingRowsAsArray=()=>{const{disabledInstancesSet:e}=this.state,t=[];return e.forEach((e=>{t.push(e)})),t},this.getInstallationFromProps=e=>(this.props.installations||[]).find((t=>t.id===e))||null,this.state={selection:[],selectedInstancesIdsForSecuring:[],openUpdatesType:null,isUpdateSettingsFormOpen:!1,dialog:Object.assign({},hB),removeOptions:Object.assign({},mB),nativeAssets:Object.assign({},fB),disabledInstancesSet:new Set,items:[],filterCounters:{},showedItems:[],currentPage:1,pageSize:10,selectedInstanceId:null,selectedInstanceIdCloning:null,selectedInstanceIdSyncing:null,selectedInstanceIdSecuring:null,selectedInstanceIdUpdating:null,selectedDomainNameForInstallation:null,showInstancesSecurityDrawer:!1,showInstancesUpdatesDrawer:!1,showInstanceInstallDrawer:!1,showInstallationCompletedDialog:!1,isLoading:!1,isRefreshing:!1,isCloneDrawerOpen:!1,isSyncDrawerOpen:!1,isUpdatesDrawerOpen:!1,checkSecurity:!1,forceInstall:!1,showInstanceNativeAssets:!1,isConnectRemoteAgentInstanceDrawerVisible:!1,scanBackgroundTasksIds:[],isSmartUpdatePromoVisibleBeforeInstallation:!1,expandedRows:[],showSynchronizeSiteUrlDialogForInstanceId:null,showActionLogDrawerForInstanceId:null,isActionLogDrawerVisible:!1,showBackupDrawerForInstanceId:null,isBackupDrawerVisible:!1,initialShowAdminSettingsDrawer:!0,showInitialShowAdminSettingsDrawerForInstanceId:null,showCheckWordPressIntegrityDialogForInstanceId:null,isCheckWordPressIntegrityDialogVisible:!1,securityDrawerActiveTab:void 0,instancesSecurityDrawerActiveTab:void 0,showSmartPhpUpdateDrawerForInstanceId:null,isSmartPhpUpdateDrawerVisible:!1,isVirtualPatchingUpsellDialogVisible:!1,showVirtualPatchingUpsellDialogForInstallationId:null,virtualPatchingUpsellDialogUatAction:"",isVirtualPatchingLicenseInfoDrawerVisible:!1,showVirtualPatchingLicenseInfoDrawerForInstallation:null}}componentDidMount(){var e;const{isAdmin:t}=this.props,n=()=>{var e;1===(null===(e=this.props.installations)||void 0===e?void 0:e.length)&&this.props.installations.map((e=>this.expandRow(e.id)))},s=()=>{this.props.installations&&this.props.installations.length>1&&this.props.keptExpandedInstanceIds.length>0&&this.props.keptExpandedInstanceIds.forEach((e=>this.expandRow(e)))},i=()=>{this.props.instancesActions.checkExpiredExpandedInstanceIds((this.props.installations||[]).map((e=>e.id)))};switch(t&&this.props.installations&&qp(),null===(e=this.props.cookies)||void 0===e?void 0:e.get(ZF)){case"name":this.props.cookies.set(ZF,"title",{path:"/"});break;case"shortUrl":this.props.cookies.set(ZF,"displayTitle",{path:"/"})}this.props.installations?(this.applyGuiState(),n(),s(),i()):this.loadInstancesList().finally((()=>{n(),s(),i()}))}componentWillReceiveProps(e){this.handleOnReceiveScanBackgroundTaskData(e.tasks),e.lastInstalledInstanceId!==this.props.lastInstalledInstanceId&&e.lastInstalledInstanceId&&this.handleInstallationCompleted(e.lastInstalledInstanceId)}componentDidUpdate(e){const{isAdmin:t}=this.props;t&&this.props.installations&&qp(),e.search===this.props.search&&e.filter===this.props.filter||(this.updateItemsList(),this.handleUpdateVisibleItems({page:1,pageSize:this.state.pageSize})),!1===e.needToUpdateInstancesList&&this.props.needToUpdateInstancesList&&(this.props.instancesActions.setIsNeedToUpdateInstancesList(!1),this.updateItemsList()),!1===e.needToUpdateInstancesFilter&&this.props.needToUpdateInstancesFilter&&(this.props.instancesActions.setIsNeedToUpdateInstancesFilter(!1),this.getFilterData(!1)),e.selectedInstanceId!==this.props.selectedInstanceId&&this.setSelectedInstanceId(this.props.selectedInstanceId),e.expandedInstanceId!==this.props.expandedInstanceId&&this.props.expandedInstanceId&&this.expandRow(this.props.expandedInstanceId)}componentWillUnmount(){const{instancesActions:{resetInstancesList:e}}=this.props;e()}applyGuiState(){const{instancesActions:{setInstancesFilter:e},cookies:t}=this.props;e((null==t?void 0:t.get(XF))||qF),this.getFilterData(),this.processRouteParams(),this.dispatchSmartUpdatePromoUAT()}hasUpdates(e){const{features:{updates:t}}=e;return t.amountOfPluginsWithUpdates>0||t.amountOfThemesWithUpdates>0||t.availableVersion}hasSecurityIssues(e){const{features:{security:t}}=e;return t.available&&"secureRecommended"!==t.status&&"secureFull"!==t.status}checkWpLimitExceeded(){return!!this.props.isWordPressInstancesLimitExceeded&&(this.props.appActions.addErrorMessage((0,L.jsx)(Ac,{content:"common.wordPressSitesLimitExceeded"})),!0)}renderInstallToolbarGroup(){return(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{onClick:this.handleToggleInstanceInstallDrawer,tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonInstall"}),"data-test-id":"instances-toolbar-install-button",children:(0,L.jsx)(Ac,{content:"list.instances.buttonInstall"})})},"toolbarInstallAction")}renderImportToolbarGroup(){return(0,L.jsx)(_s,{title:"",children:(0,L.jsx)(Ue,{icon:"arrow-down-in","data-type":"import-button",onClick:this.handleGoToImport,tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonImport"}),children:(0,L.jsx)(Ac,{content:"list.instances.buttonImport"})})},"toolbarImportAction")}renderScanToolbarButton(){return(0,L.jsx)(Ue,{icon:"eye","data-type":"scan-button",onClick:this.handleScan,tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonScan"}),"data-test-id":"instances-toolbar-scan-button",children:(0,L.jsx)(Ac,{content:"list.instances.buttonScan"})})}renderUpdatesToolbarButton(){return(0,L.jsx)(Ue,{onClick:this.handleToggleInstancesUpdatesDrawer,tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonUpdates"}),"data-test-id":"instances-toolbar-update-button",icon:this.props.isUpdatesUnpaid||this.props.isUpdatesDisabled?"lock-closed":null,children:(0,L.jsx)(Ac,{content:"list.instances.buttonUpdates"})})}renderSecurityToolbarButton(){const{installations:e,isSecurityUnpaid:t,isSecurityDisabled:n,baseClassName:s}=this.props,i=(e||[]).some((e=>e.features.vulnerability.vulnerable)),a=i?1:void 0;return(0,L.jsxs)(Ue,{onClick:()=>this.handleOpenInstancesSecurityDrawer(a),tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonSecurity"}),"data-test-id":"instances-toolbar-security-button",children:[i?(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",className:`${s}__security-button-icon`,intent:"danger",size:"16","data-test-id":"instances-toolbar-security-button-vulnerable-icon"}):t||n?(0,L.jsx)(he,{name:"lock-closed",className:`${s}__security-button-icon`,size:"16"}):null,(0,L.jsx)(Ac,{content:"list.instances.buttonSecurity"})]})}renderDetachToolbarButton(){const{selection:e}=this.state;return(0,L.jsx)(Ue,{onClick:()=>this.handleBulkDetach(e),icon:this.props.isDetachUnpaid?"lock-closed":null,disabled:this.props.isDetachUnpaid,tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonDetach"}),children:(0,L.jsx)(Ac,{content:"list.instances.buttonDetach"})})}renderRemoveToolbarButton(){return(0,L.jsx)(Ue,{onClick:this.handleBulkRemove,tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonRemove"}),icon:this.props.isRemoveUnpaid?"lock-closed":"cross-mark",disabled:this.props.isRemoveUnpaid,children:(0,L.jsx)(Ac,{content:"list.instances.buttonRemove"})})}renderConnectRemoteAgentInstanceToolbarButton(){return this.props.isRemoteWptAgentAvailable?(0,L.jsx)(Ue,{onClick:this.handleShowConnectRemoteAgentInstanceDrawer,tooltip:(0,L.jsx)(Ac,{content:"list.instances.hintButtonConnectRemoteAgentInstance"}),"data-test-id":"connect-instance-open-button",children:(0,L.jsx)(Ac,{content:"list.instances.buttonConnectRemoteAgentInstance"})}):null}renderSortToolbarGroup(){return(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"toolbar.sort.title"}),children:(0,L.jsx)(Tt,{menu:(0,L.jsx)(Nn,{children:this.getSortDropdownMenuItems()}),children:(0,L.jsx)(Ue,{caret:!0,children:(0,L.jsx)(Ac,{content:"toolbar.sort.title"})})})},"toolbarSortAction")}renderFilterToolbarGroup(){const{filterCounters:e}=this.state,{filter:t}=this.props,n=(0,L.jsxs)(Ue,{caret:!0,icon:(0,L.jsx)(he,{name:this.props.filter===qF?MT("filter"):MT("filter-check-mark")}),children:[(0,L.jsx)(Ac,{content:"toolbar.filter.title"}),t===qF?"":(0,L.jsxs)(L.Fragment,{children:[": ",(0,L.jsx)(Ac,{content:`toolbar.filter.shortNames.${t}`})]})]});return(0,L.jsx)(_s,{title:(0,L.jsx)(Ac,{content:"toolbar.filter.title"}),children:(0,L.jsx)(Tt,{menu:(0,L.jsx)(Nn,{children:this.getFilterDropdownMenuItems(e)}),children:t!==qF&&t?(0,L.jsx)(_e,{label:(0,L.jsx)(ye,{intent:"danger",children:e[t]}),children:n}):n})},"toolbarFilterAction")}renderToolbarGroups(){const{installations:e,isInstallButtonAvailable:t}=this.props,n=null!==e&&e.length>1,s=null!==e&&e.some((e=>e.features.security.available));return[t?this.renderInstallToolbarGroup():null,this.props.urls.importUrl?this.renderImportToolbarGroup():null,(0,L.jsxs)(_s,{title:(0,L.jsx)(Ac,{content:"list.instances.collapsedToolbarActions"}),children:[this.renderConnectRemoteAgentInstanceToolbarButton(),this.renderScanToolbarButton(),this.renderUpdatesToolbarButton(),s&&this.renderSecurityToolbarButton(),this.renderDetachToolbarButton(),this.renderRemoveToolbarButton()]},"collapsibleToolbarGroup"),(0,L.jsx)(ts,{},"toolbarMainToolbarExpander"),n?this.renderFilterToolbarGroup():null,n?this.renderSortToolbarGroup():null]}renderInstancesUpdatesDrawer(){return(0,L.jsx)(hA,{title:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.drawerTitle"}),subtitle:(0,L.jsx)(Ac,{content:"list-ui.instancesUpdates.drawerSubTitle"}),isOpen:this.state.showInstancesUpdatesDrawer,onClose:this.handleToggleInstancesUpdatesDrawer,"data-type":"instances-updates",children:(0,L.jsx)(oY,{selectedInstancesIds:this.state.selection})})}render(){const{dialog:e,nativeAssets:t,items:n,showedItems:s,isCloneDrawerOpen:i,isSyncDrawerOpen:a,isUpdatesDrawerOpen:r,checkSecurity:o,selectedInstanceId:l,selectedInstanceIdCloning:c,selectedInstanceIdSyncing:u,selectedInstanceIdSecuring:d,selectedInstanceIdUpdating:p,selectedDomainNameForInstallation:h,selectedInstancesIdsForSecuring:m,openUpdatesType:f,isUpdateSettingsFormOpen:g,showInstancesSecurityDrawer:b,showInstanceInstallDrawer:v,showInstallationCompletedDialog:y,selection:_,isConnectRemoteAgentInstanceDrawerVisible:x,expandedRows:S,showSynchronizeSiteUrlDialogForInstanceId:w,currentPage:k,pageSize:j,isRefreshing:T,isActionLogDrawerVisible:C,showActionLogDrawerForInstanceId:D,isBackupDrawerVisible:P,showBackupDrawerForInstanceId:I,initialShowAdminSettingsDrawer:O,showInitialShowAdminSettingsDrawerForInstanceId:M,isCheckWordPressIntegrityDialogVisible:A,showCheckWordPressIntegrityDialogForInstanceId:E,securityDrawerActiveTab:U,instancesSecurityDrawerActiveTab:R,isSmartPhpUpdateDrawerVisible:N,showSmartPhpUpdateDrawerForInstanceId:F,isVirtualPatchingUpsellDialogVisible:Y,showVirtualPatchingUpsellDialogForInstallationId:B,isVirtualPatchingLicenseInfoDrawerVisible:H,showVirtualPatchingLicenseInfoDrawerForInstallation:V}=this.state,{filter:$,baseClassName:W,installations:z}=this.props;let q=null;t.isOpen&&(q=(this.props.installations||[]).find((e=>e.id===t.installationId)));const G=n.length,K=_.length;return(0,L.jsxs)(a_,{activeTab:Qy,children:[this.state.isLoading?(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"list.instances.loading"})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ss,{children:this.renderToolbarGroups()}),(0,L.jsx)(Wa,{className:W,columns:this.getColumns(),data:s,rowKey:"id",renderRowBody:e=>{const t=this.getInstallationFromProps(e.id);return t?(0,L.jsx)(EF,{installation:t,isLoading:this.state.disabledInstancesSet.has(t.id),isCloneDrawerOpen:i&&t.id===c,onOpenCloneDrawer:this.handleOpenCloneDialog,onCloseCloneDrawer:this.handleCloseCloneDrawer,isSyncDrawerOpen:a&&t.id===u,onOpenSyncDrawer:this.handleOpenSyncDialog,onCloseSyncDrawer:this.handleCloseSyncDrawer,showSecurityForm:o&&t.id===d,onOpenSecurityDialog:this.handleOpenSecurityDialog,onCloseSecurityDialog:this.handleCloseSecurityDialog,showUpdates:r&&t.id===p,openUpdatesType:f,isUpdateSettingsFormOpen:g&&t.id===p,onOpenUpdatesDialog:(e,n)=>this.handleOpenUpdatesDialog(t.id,e,n),onCloseUpdatesDialog:this.handleCloseUpdatesDialog,onOpenUpdatesSettingsDialog:this.handleOpenUpdatesSettingsDialog,onCloseUpdatesSettingsDialog:this.handleCloseUpdatesSettingsDialog,showSynchronizeSiteUrlDialog:t.id===w,onCloseSynchronizeSiteUrlDialog:this.handleCloseSynchronizeSiteUrlDialog,onDetach:()=>this.handleBulkDetach([t.id]),onRefresh:()=>this.handleRefresh(t.id),onSwitchPhpHandler:(e,t)=>this.handleSwitchPhpHandler(e,t),onOpenNativeAssets:this.handleOpenNativeAssets,onEnableInstances:this.handleRemoveInstanceFromDisabledInstancesSet,onDisableInstances:this.handleAddInstanceToDisabledInstancesSet,isSelected:t.id===l,onSetSelectedInstanceAnchor:this.handleSetSelectedInstanceAnchor,isActionLogDrawerVisible:C&&t.id===D,onOpenActionLogDrawer:()=>this.handleOpenActionLogDrawer(t.id),onCloseActionLogDrawer:this.handleCloseActionLogDrawer,isBackupDrawerVisible:P&&t.id===I,onOpenBackupDrawer:()=>this.handleOpenBackupDrawer(t.id),onCloseBackupDrawer:this.handleCloseBackupDrawer,initialShowAdminSettingsDrawer:O&&t.id===M,isCheckWordPressIntegrityDialogVisible:A&&t.id===E,onOpenCheckWordPressIntegrityDialog:()=>this.handleOpenCheckWordPressIntegrityDialog(t.id),onCloseCheckWordPressIntegrityDialog:this.handleCloseCheckWordPressIntegrityDialog,securityDrawerActiveTab:U,isSmartPhpUpdatesDrawerOpen:N&&F===t.id,onOpenSmartPhpUpdatesDrawer:()=>this.handleOpenSmartPhpUpdatesDrawer(t.id),onCloseSmartPhpDrawer:()=>this.handleCloseSmartPhpUpdatesDrawer(),onOpenVirtualPatchingUpsellDialog:e=>this.handleOpenVirtualPatchingUpsellDialog(t.id,e),onOpenVirtualPatchingLicenseInfoDrawer:()=>this.handleOpenVirtualPatchingLicenseInfoDrawer(t.id)},t.id):(0,L.jsx)("span",{},`removed-${e.id}`)},expandedRows:S,onExpandedRowsChange:this.handleOnExpandedRowsChange,selection:_,onSelectionChange:this.handleSelection,emptyViewMode:"all",emptyView:this.renderEmptyView(),loadingRows:this.getLoadingRowsAsArray(),totalRows:G,pagination:(0,L.jsx)(Gn,{total:Math.ceil(G/j),current:k,onSelect:this.handleOnSelectPage,itemsPerPage:j,onItemsPerPageChange:this.handleSelectItemsPerPage,itemsPerPageOptions:[10,25,50,100,"all"],"data-test-id":"pagination"}),loading:T,locale:{selectAll:(0,L.jsx)(Ac,{content:"instancesList.selectAll"}),deselectAll:(0,L.jsx)(Ac,{content:"instancesList.deselectAll"}),all:(0,L.jsx)(Ac,{content:"instancesList.all"}),totalRows:(0,L.jsx)(Ac,{content:"instancesList.totalRows",params:{totalRows:G}}),selectedRows:(0,L.jsx)(Ac,{content:"instancesList.selectedRows",params:{selectedRows:(0,L.jsx)(Wn,{bold:!0,children:K}),totalRows:G}})}}),$!==qF&&n.length>1&&(0,L.jsx)("div",{style:{marginTop:10},children:(0,L.jsx)(Ue,{onClick:()=>this.filterByField(qF),intent:"primary",children:(0,L.jsx)(Ac,{content:"toolbar.filter.clearFilterButton"})})}),(0,L.jsx)(ji,{isOpen:e.isOpen,title:e.title,buttons:e.buttons,size:"sm",onClose:this.handleCloseDialog,"data-test-id":Th,children:e.content}),t.isOpen&&(0,L.jsx)(YF,{installation:q,type:t.type,onClose:this.handleCloseNativeAssets}),(0,L.jsx)(LD,{isOpen:b,onClose:this.handleCloseInstancesSecurityDrawer,installationsIds:m,activeTab:R,onOpenVirtualPatchingUpsellDialog:this.handleOpenVirtualPatchingUpsellDialog}),(0,L.jsx)(nB,{installation:(null==z?void 0:z.find((e=>e.id===B)))||null,isOpen:Y,onOpen:this.handleOpenVirtualPatchingUpsellDialog,onClose:this.handleCloseVirtualPatchingUpsellDialog,uatAction:this.state.virtualPatchingUpsellDialogUatAction,onOpenLicenseInfoDrawer:this.handleOpenVirtualPatchingLicenseInfoDrawer}),(0,L.jsx)(pB,{installation:(null==z?void 0:z.find((e=>e.id===V)))||null,isOpen:H,onClose:this.handleCloseVirtualPatchingLicenseInfoDrawer,onOpenUpsellDialog:this.handleOpenVirtualPatchingUpsellDialog}),this.renderInstancesUpdatesDrawer()]}),(0,L.jsx)(jY,{isOpen:v,selectedDomain:h,onClose:this.handleToggleInstanceInstallDrawer,onBeforeInstallation:this.handleBeforeInstallation}),(0,L.jsxs)(ji,{title:(0,L.jsx)(Ac,{content:"common.installation-completed.title"}),size:"sm",isOpen:y,onClose:this.handleCloseInstallationCompletedDialog,cancelTitle:(0,L.jsx)(Ac,{content:"common.installation-completed.buttonNo"}),buttons:(0,L.jsx)(Ue,{onClick:()=>{l&&this.handleOpenNativeAssets(l,au),this.handleCloseInstallationCompletedDialog()},"data-test-id":"install-plugins-button",children:(0,L.jsx)(Ac,{content:"common.installation-completed.buttonYes"})}),children:[(0,L.jsx)(as,{children:(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"common.installation-completed.description"})})}),(0,L.jsx)(as,{children:(0,L.jsx)(Ac,{content:"common.installation-completed.hint"})})]}),x&&(0,L.jsx)(RY,{onClose:this.handleHideConnectRemoteAgentInstanceDrawer})]})}}gB.defaultProps={installations:null,selectedInstanceId:null,expandedInstanceId:null,lastInstalledInstanceId:null,tasks:[],isSynchronizeSiteUrlEnabled:!1,actionLogFeatureEnabled:!1,baseClassName:`${gu}instances-list`};const bB=(0,so.$j)((e=>{const t=e.app.unpaidFeatures.update,n=e.app.unpaidFeatures.wp_toolkit,s=e.app.unpaidFeatures.wp_toolkit,i=!!e.instances.installations&&e.instances.installations.length&&!e.instances.installations.some((e=>e.features.updates.applicable)),a=e.app.unpaidFeatures.secure,r=!!e.instances.installations&&e.instances.installations.length&&!e.instances.installations.some((e=>e.features.security.applicable)),o=e.app.unpaidFeatures.multiple_sites_management;return{search:e.app.search,installations:e.instances.installations,needToUpdateInstancesList:e.instances.needToUpdateInstancesList,needToUpdateInstancesFilter:e.instances.needToUpdateInstancesFilter,filter:e.instances.filter,urls:e.app.urls,isWordPressInstancesLimitExceeded:e.app.options.isWordPressInstancesLimitExceeded,isInstallButtonAvailable:e.app.options.isInstallButtonAvailable,isOwnerColumnAvailable:e.app.options.isOwnerColumnAvailable,selectedInstanceId:e.instances.selectedInstanceId,expandedInstanceId:e.instances.expandedInstanceId,keptExpandedInstanceIds:e.instances.keptExpandedInstanceIds,lastInstalledInstanceId:e.instances.lastInstalledInstanceId,isRemoteWptAgentAvailable:e.app.options.isRemoteWptAgentAvailable,tasks:e.backgroundTasks.tasks,showSmartUpdatePromo:e.app.options.showSmartUpdatePromo,showSmartUpdates:e.app.options.showSmartUpdates,isSmartUpdatePromoAvailable:e.app.options.isSmartUpdatePromoAvailableForInstancesScreen,isSynchronizeSiteUrlEnabled:e.app.options.isSynchronizeSiteUrlEnabled,actionLogFeatureEnabled:e.app.options.actionLogFeature,isUpdatesUnpaid:t,isDetachUnpaid:n,isRemoveUnpaid:s,isUpdatesDisabled:i,isSecurityUnpaid:a,isSecurityDisabled:r,isMultipleSiteManagementUnpaid:o,isAdmin:e.app.options.isAdmin}}),(e=>({instancesActions:nh({refresh:vb,switchPhpHandler:yb,setIsNeedToUpdateInstancesList:Hv,setIsNeedToUpdateInstancesFilter:Vv,remove:xb,detach:jb,getInstancesData:nv,scan:Vb,scanFinished:Wb,resetInstancesList:qv,loadInstancesList:Gv,setInstancesFilter:dv,setInstallationLabels:uy,keepExpandedInstanceId:Jv,forgetExpandedInstanceId:Qv,checkExpiredExpandedInstanceIds:ey,getInstallationsRemoveConfiguration:Bb},e),actionLogActions:nh({onOpenActionLogBrowser:KE},e),appActions:nh({addWarningMessage:Tp,addErrorMessage:jp,getInitialOptions:Ap},e),goToUri:(t,n)=>e(Wf(t,n))})))(v_(gB)),vB=(0,so.$j)((e=>({purchaseDeluxeGuardianUrl:e.app.urls.purchaseDeluxeGuardianUrl,publicUrl:e.app.urls.publicUrl})))((({purchaseDeluxeGuardianUrl:e,publicUrl:t,onClose:n,baseClassName:s=`${gu}vpatches-banner`})=>{const[i,a]=(0,U.useState)(!1);return(0,L.jsx)("div",{className:s,children:(0,L.jsx)(is,{title:(0,L.jsx)(kn,{level:3,children:(0,L.jsx)(Ac,{content:"banner.virtualPatches.title"})}),titleAddon:(0,L.jsx)(fe,{icon:"cross-mark",onClick:n}),image:(0,L.jsx)(he,{src:`${t}images/virtual-patches-banner.png`,size:"192"}),children:i?(0,L.jsx)(Lr,{children:(0,L.jsx)(Ac,{content:"banner.virtualPatches.whatToDoNext",unsafe:!0})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Lr,{children:(0,L.jsx)(Ac,{content:"banner.virtualPatches.promo.paragraph1"})}),(0,L.jsx)(Lr,{children:(0,L.jsx)(Ac,{content:"banner.virtualPatches.promo.paragraph2"})}),(0,L.jsx)(Lr,{children:(0,L.jsx)(Ue,{intent:"primary",onClick:()=>{a(!0),window.open(e)},size:"lg",children:(0,L.jsx)(Ac,{content:"banner.virtualPatches.promo.buttonBuy"})})})]})})})}));class yB extends U.Component{constructor(){super(...arguments),this.ALERT_CPANEL_CLOUD_LINUX_6_DEPRECATED="alert-cpanel-cloud-linux-6-deprecated",this.ALERT_PLESK_18_0_40_DEPRECATED="alert-plesk-18-0-40-deprecated",this.ALERT_WHM_VIRTUAL_PATCHES_FEATURE_AVAILABLE="alert-whm-virtual-patches-feature-available",this.renderWhmVirtualPatchesFeatureAvailable=()=>(0,L.jsx)(vB,{onClose:()=>this.props.onCloseAlert(this.ALERT_WHM_VIRTUAL_PATCHES_FEATURE_AVAILABLE)},this.ALERT_WHM_VIRTUAL_PATCHES_FEATURE_AVAILABLE)}renderAlert(e){return e===this.ALERT_CPANEL_CLOUD_LINUX_6_DEPRECATED?this.renderCpanelCloudLinux6DeprecatedAlert():e===this.ALERT_PLESK_18_0_40_DEPRECATED?this.renderPlesk18040DeprecatedAlert():e===this.ALERT_WHM_VIRTUAL_PATCHES_FEATURE_AVAILABLE?this.renderWhmVirtualPatchesFeatureAvailable():null}renderCpanelCloudLinux6DeprecatedAlert(){return(0,L.jsx)(ge,{intent:"warning",onClose:()=>this.props.onCloseAlert(this.ALERT_CPANEL_CLOUD_LINUX_6_DEPRECATED),children:(0,L.jsx)(Ac,{content:"globalAlert.cpanelCloudLinux6Deprecated"})},this.ALERT_CPANEL_CLOUD_LINUX_6_DEPRECATED)}renderPlesk18040DeprecatedAlert(){return(0,L.jsx)(ge,{intent:"warning",onClose:()=>this.props.onCloseAlert(this.ALERT_PLESK_18_0_40_DEPRECATED),children:(0,L.jsx)(Ac,{content:"globalAlert.plesk18040Deprecated",params:{link:(0,L.jsx)("a",{href:"/admin/update/product",target:"_blank",children:(0,L.jsx)(Ac,{content:"globalAlert.plesk18040Deprecated.updateLink"})})}})},this.ALERT_PLESK_18_0_40_DEPRECATED)}render(){const{globalAlerts:e}=this.props;return(0,L.jsx)("div",{"data-test-id":"global-alerts",children:e.map((e=>this.renderAlert(e)))})}}const _B=yB;class xB extends U.Component{constructor(e){super(e),this.startPollingBackgroundTasks=()=>{const{tasks:e,pollBackgroundTasks:t,fetchBackgroundTask:n}=this.props;try{Jsw&&Jsw.Observer&&Jsw.Observer.append((t=>{"done"===t.status&&!e.some((e=>e.id===Number(t.id)))&&t.type.endsWith(hb)&&n(md.getTaskData,t.id,hb)}),"plesk:taskComplete")}catch(e){}if(0===e.length)return;const s=e.filter((e=>!tw(e)));0!==s.length&&t(s)},this.setApiInitialized=()=>this.setState({isApiInitialized:!0}),this.renderFlashMessages=()=>{const{flashMessages:e,closeFlashMessage:t}=this.props;if(0===e.length)return null;const n=[];return e.forEach(((e,s)=>{n.push((0,L.jsx)(ge,{intent:e.status,onClose:e.closable?()=>t(s):void 0,children:(0,L.jsx)("span",{dangerouslySetInnerHTML:{__html:Ox()(e.message)}})},e.message))})),n},this.state={isApiInitialized:!1}}componentDidMount(){const{urls:e,options:t,addErrorMessage:n,pathname:s,isWebspaceContext:i}=this.props;window.WPT_INITIAL_ROUTE_PATHNAME||(window.WPT_INITIAL_ROUTE_PATHNAME=s),Qu(e.apiUrl),ed(n);let a=null;t.hasOwnProperty("isPerformanceTestingFrontendEnabled")&&!0===t.isPerformanceTestingFrontendEnabled&&(a={endpoint:t.performanceTestingEndpoint,key:t.performanceTestingKey,type:t.performanceTestingType,initialInstancesCount:t.performanceTestingInitialInstancesCount}),td(a),vp(e.restApiUrl,n,i),this.setApiInitialized(),this.startPollingBackgroundTasks()}render(){const{isApiInitialized:e}=this.state,{baseClassName:t,urls:n,globalAlerts:s,closeGlobalAlert:i}=this.props;return e?(0,L.jsxs)("div",{className:t,children:[(0,L.jsx)(_B,{globalAlerts:s,onCloseAlert:i}),(0,L.jsx)(VL,{}),this.renderFlashMessages(),(0,L.jsx)(WL,{}),(0,L.jsxs)(jo,{children:[(0,L.jsx)(ko,{path:`${n.publicUrl}public/index.php`,render:e=>(0,L.jsx)(FL,{})}),(0,L.jsx)(ko,{path:"/list/:params*",render:e=>(0,L.jsx)(bB,Object.assign({},e))}),(0,L.jsx)(ko,{path:"/servers/:params*",render:e=>(0,L.jsx)(iL,Object.assign({},e))}),(0,L.jsx)(ko,{path:"/plugins/:params*",render:e=>(0,L.jsx)(VD,Object.assign({},e))}),(0,L.jsx)(ko,{path:"/themes/:params*",render:e=>(0,L.jsx)(vP,Object.assign({},e))}),(0,L.jsx)(ko,{path:"/sets/:params*",render:e=>(0,L.jsx)(BI,Object.assign({},e))}),!1,(0,L.jsx)(ko,{path:"*",render:e=>(0,L.jsx)(YL,{})})]})]}):(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(It,{text:(0,L.jsx)(Ac,{content:"general-ui.initializingApplication"})})})}}xB.defaultProps={globalAlerts:[],flashMessages:[],baseClassName:`${gu}app-container`,isWebspaceContext:!1};const SB={closeFlashMessage:Ep,addErrorMessage:jp,pollBackgroundTasks:lw,fetchBackgroundTask:rw,closeGlobalAlert:Up},wB=To((0,so.$j)((e=>({tasks:e.backgroundTasks.tasks,urls:e.app.urls,options:e.app.options,globalAlerts:e.app.globalAlerts,flashMessages:e.app.flashMessages,pathname:e.router.location.pathname,isWebspaceContext:e.app.options.isWebspaceContext})),SB)(xB));var kB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function s(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}}();const jB=function(e){function t(t){var n=e.call(this,t)||this;return t.cookies?n.cookies=t.cookies:n.cookies=new u_,n}return kB(t,e),t.prototype.render=function(){return U.createElement(h_,{value:this.cookies},this.props.children)},t}(U.Component);function TB(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}const CB=function(e){return function(t){return function(t){return function(n){if(n.type!==Lo)return t(n);var s,i=n.payload,a=i.method,r=i.args;e[a].apply(e,function(e){if(Array.isArray(e))return TB(e)}(s=r)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return TB(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TB(e,t):void 0}}(s)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}}},DB=e=>{const t={message:null,search:"",unpaidFeatures:{},flashMessages:[],cpanel:{},licenseInfo:{virtualPatches:null},options:Object.assign({},e.options),urls:{importUrl:"",debugCodexUrl:"",featuresBuyLinks:{clone:"",sync:"",secure:"",sets:"",smart_update:"",update:"",wp_toolkit:"",multiple_sites_management:"",vulnerability:""},premiumFeaturesUrl:"",purchaseDeluxeUrl:"",purchaseDeluxeGuardianUrl:"",purchaseWordPressToolkitUrl:"",upgradePleskUrl:"",defaultAssetImageUrl:"",publicUrl:"",baseUrl:"",apiUrl:"",restApiUrl:"",upgradingInstanceInstructionsUrl:"",checkWordPressIntegrityWordpressOrgUrl:"",updatePleskUrl:"",virtualPatchingCustomerPortalUrl:""},settings:{},globalAlerts:[],buildMeta:{},premiumUsers:void 0,isAuxiliaryUser:!1};return e.urls&&(t.urls=Object.assign({},e.urls)),e.unpaidFeatures&&(t.unpaidFeatures=Object.assign({},e.unpaidFeatures)),e.settings&&(t.settings=Object.assign({},e.settings)),e.buildMeta&&(t.buildMeta=Object.assign({},e.buildMeta)),e.isAuxiliaryUser&&(t.isAuxiliaryUser=e.isAuxiliaryUser),e.flashMessages&&(t.flashMessages=[...e.flashMessages]),e.globalAlerts&&(t.globalAlerts=[...e.globalAlerts]),e.licenseInfo&&(t.licenseInfo=e.licenseInfo),(e=t,n)=>{switch(n.type){case Su:{const{intent:t,message:s}=n;return Object.assign(Object.assign({},e),{message:{intent:t,message:s}})}case ku:return Object.assign(Object.assign({},e),{search:n.search});case wu:return Object.assign(Object.assign({},e),{message:null});case Yx:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),{isRemoteWptBetaDialogVisible:!1})});case ju:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),{isSmartUpdatePromoAvailableForInstancesScreen:!1})});case Tu:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),{isSmartUpdatePromoAvailableForUpdatesScreen:!1})});case Cu:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),{isSmartUpdatePromoAvailableForMultipleSitesUpdatesScreen:!1})});case Du:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),n.options),urls:Object.assign(Object.assign({},e.urls),n.urls)});case Pu:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),{changelog:n.changelog})});case Iu:return Object.assign(Object.assign({},e),{flashMessages:e.flashMessages.filter(((e,t)=>t!==n.index))});case Lu:return Object.assign(Object.assign({},e),{globalAlerts:e.globalAlerts.filter((e=>e!==n.alertId))});case Vf:return Object.assign(Object.assign({},e),{cpanel:Object.assign(Object.assign({},e.cpanel),{applicationUri:n.applicationUri,accountUsername:n.accountUsername})});case $f:return Object.assign(Object.assign({},e),{cpanel:Object.assign(Object.assign({},e.cpanel),{applicationUri:null,accountUsername:null})});case Ou:return Object.assign(Object.assign({},e),{premiumUsers:n.premiumUsers});case dh:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),{pluginsBlocklistFeatureSettings:Object.assign(Object.assign({},e.options.pluginsBlocklistFeatureSettings),{pluginsList:n.settings.development.pluginsBlocklist.value.split(",").map((e=>e.trim())).filter((e=>!!e))})})});case Mu:return Object.assign(Object.assign({},e),{options:Object.assign(Object.assign({},e.options),{upVotedFeatures:[...e.options.upVotedFeatures,n.featureName]})});case Au:return Object.assign(Object.assign({},e),{licenseInfo:n.info});default:return e}}},PB=e=>{var t;const n={installations:null,installationsWithScreenshotLoading:new Set,activeTabs:new Map,pluginsV2:{},themesV2:{},filter:null,assetsToRemove:new Set,assetsToChangingStatus:new Set,needToUpdateInstancesList:!1,needToUpdateInstancesFilter:!1,isCheckingForUpdates:!1,needToSecure:0,selectedInstanceId:null,expandedInstanceId:null,keptExpandedInstanceIds:Object.keys(qf()).map((e=>parseInt(e))),lastInstalledInstanceId:null,domainsInstallationsIds:{}};return(null===(t=e.installations)||void 0===t?void 0:t.length)&&(n.installations=[...e.installations]),e.domainsInstallationsIds&&(n.domainsInstallationsIds=Object.assign({},e.domainsInstallationsIds)),(e=n,t)=>{switch(t.type){case pf:{const{updates:n}=t,s=e=>e.filter((e=>null!==e.availableVersion)).length,i={},a={},r=(e.installations||[]).map((e=>{var t;const i=n.find((t=>t.id===e.id));return i?Object.assign(Object.assign({},e),{version:i.core.version,features:Object.assign(Object.assign({},e.features),{updates:Object.assign(Object.assign({},e.features.updates),{applicable:i.applicable,availableVersion:i.core.availableVersion,autoUpdatesAvailable:i.autoUpdate.available,amountOfPluginsWithUpdates:s(i.plugins),amountOfThemesWithUpdates:s(i.themes),smart:Object.assign(Object.assign({},e.features.updates.smart),{status:i.smartUpdate.status,taskStatus:i.smartUpdate.taskStatus,applicable:i.smartUpdate.applicable})}),vulnerability:Object.assign(Object.assign({},e.features.vulnerability),{vulnerable:i.vulnerable}),restorePoint:Object.assign(Object.assign({},null===(t=e.features)||void 0===t?void 0:t.restorePoint),i.core.restorePoint)})}):e}));return Object.assign(Object.assign({},e),{installations:r,pluginsV2:Object.assign(Object.assign({},e.pluginsV2),i),themesV2:Object.assign(Object.assign({},e.themesV2),a)})}case ef:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{restorePoint:{available:e.features.restorePoint.available,restorePointTimestamp:null,previousVersion:null,version:null,errorMessage:null,displayTimestamp:null,fullSnapshot:null,message:null,sourceUrl:null}})})));return Object.assign(Object.assign({},e),{installations:n})}case Zm:{const n=(e.installations||[]).map((e=>e.id!==t.instanceId?e:Object.assign(Object.assign({},e),{screenshot:Object.assign({},t.screenshot)})));return Object.assign(Object.assign({},e),{installations:n})}case Jm:{const n=new Set(e.installationsWithScreenshotLoading.values());return t.isScreenShotLoading?n.add(t.instanceId):n.delete(t.instanceId),Object.assign(Object.assign({},e),{installationsWithScreenshotLoading:n})}case Fm:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{indexing:Object.assign(Object.assign({},e.features.indexing),{status:t.status})})})));return Object.assign(Object.assign({},e),{installations:n})}case tf:return Object.assign(Object.assign({},e),{needToUpdateInstancesList:t.value});case nf:return Object.assign(Object.assign({},e),{needToUpdateInstancesFilter:t.value});case Ym:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{nginxCaching:Object.assign(Object.assign({},e.features.nginxCaching),{status:t.status})})})));return Object.assign(Object.assign({},e),{installations:n})}case Bm:{const n=(e.installations||[]).map((e=>+e.id!=+t.instanceId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{updates:Object.assign(Object.assign({},e.features.updates),{smart:Object.assign(Object.assign({},e.features.updates.smart),t.values)})})})));return Object.assign(Object.assign({},e),{installations:n})}case Hm:case Vm:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{wpCronTakeover:Object.assign(Object.assign({},e.features.wpCronTakeover),t.values)})})));return Object.assign(Object.assign({},e),{installations:n})}case Wm:{const n=(e.installations||[]).map((e=>e.id!==+t.instanceId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{maintenance:Object.assign(Object.assign({},e.features.maintenance),{status:t.status})})})));return Object.assign(Object.assign({},e),{needToUpdateInstancesFilter:!0,installations:n})}case wf:{const n=(e.installations||[]).map((e=>e.id!==t.instanceId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{maintenance:Object.assign(Object.assign({},e.features.maintenance),{fullMode:t.value})})})));return Object.assign(Object.assign({},e),{installations:n})}case $m:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{hotlinkProtection:Object.assign(Object.assign({},e.features.hotlinkProtection),{status:t.status})})})));return Object.assign(Object.assign({},e),{installations:n})}case Nm:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{debug:Object.assign(Object.assign({},e.features.debug),{status:t.status})})})));return Object.assign(Object.assign({},e),{installations:n,needToUpdateInstancesFilter:!0})}case Gm:{const n=(e.installations||[]).map((e=>{var n;return+e.id==+t.installationId&&(null===(n=e.features.updates)||void 0===n?void 0:n.smart)?Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{updates:Object.assign(Object.assign({},e.features.updates),{smart:Object.assign(Object.assign({},e.features.updates.smart),{taskStatus:Zd.Started})})})}):e}));return Object.assign(Object.assign({},e),{installations:n})}case Km:{const n=(e.installations||[]).map((e=>{var n,s;return+e.id==+t.installationId&&(null===(s=null===(n=e.features)||void 0===n?void 0:n.updates)||void 0===s?void 0:s.smart)?Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{updates:Object.assign(Object.assign({},e.features.updates),{smart:Object.assign(Object.assign({},e.features.updates.smart),{taskStatus:Zd.NotExist})})})}):e}));return Object.assign(Object.assign({},e),{installations:n})}case Om:{const n=(e.installations||[]).filter((e=>!t.installationsIds.includes(e.id)));return Object.assign(Object.assign({},e),{installations:n})}case Lm:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{title:t.name})));return Object.assign(Object.assign({},e),{installations:n})}case Mm:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{passwordProtection:t.values})})));return Object.assign(Object.assign({},e),{installations:n})}case Zf:{const{slugs:n,installationId:s}=t,{pluginsV2:i}=e,a=i[s].filter((e=>!n.includes(e.slug)));return i[s]=[...a],Object.assign(Object.assign({},e),{pluginsV2:i})}case Pg:{const{slugs:n,installationId:s}=t,{themesV2:i}=e,a=i[s].filter((e=>!n.includes(e.slug)));return i[s]=[...a],Object.assign(Object.assign({},e),{themesV2:i})}case Jf:{const{slug:n,installationId:s,status:i}=t,{pluginsV2:a}=e,r=a[s].map((e=>e.slug===n?Object.assign(Object.assign({},e),{status:i}):e));return a[s]=[...r],Object.assign(Object.assign({},e),{pluginsV2:a})}case Ig:{const{slug:n,installationId:s}=t,{themesV2:i}=e,a=i[s].map((e=>Object.assign(Object.assign({},e),{status:e.slug===n})));return i[s]=[...a],Object.assign(Object.assign({},e),{themesV2:i})}case Um:{const n=new Set(e.assetsToChangingStatus.values());return n.add(Bc(t)),Object.assign(Object.assign({},e),{assetsToChangingStatus:n})}case Rm:{const n=new Set(e.assetsToChangingStatus.values());return n.delete(Bc(t)),Object.assign(Object.assign({},e),{assetsToChangingStatus:n})}case Am:{const n=new Set(e.assetsToRemove.values());return Hc(t).forEach((e=>n.add(e))),Object.assign(Object.assign({},e),{assetsToRemove:n})}case Em:{const n=new Set(e.assetsToRemove.values());return Hc(t).forEach((e=>n.delete(e))),Object.assign(Object.assign({},e),{assetsToRemove:n})}case Im:{const{filter:n}=t;return Object.assign(Object.assign({},e),{filter:n})}case sf:return Object.assign(Object.assign({},e),{installations:null,pluginsV2:{},themesV2:{}});case of:return Object.assign(Object.assign({},e),{selectedInstanceId:t.value});case lf:return Object.assign(Object.assign({},e),{expandedInstanceId:t.value});case cf:return Object.assign(Object.assign({},e),{keptExpandedInstanceIds:t.keptExpandedInstanceIds});case uf:return Object.assign(Object.assign({},e),{lastInstalledInstanceId:t.value});case hf:{const n=new Map(e.activeTabs.entries());return n.delete(t.installationId),n.set(t.installationId,t.activeTab),Object.assign(Object.assign({},e),{activeTabs:n})}case gf:{const n=(e.installations||[]).map((e=>e.id!==t.id?e:Object.assign(Object.assign({},e),{labels:t.labels})));return Object.assign(Object.assign({},e),{installations:n})}case yf:return Object.assign(Object.assign({},e),{loginToInstanceId:t.instanceId,loginUrl:t.loginUrl,loginCredentials:t.credentials,windowTarget:t.windowTarget});case _f:return Object.assign(Object.assign({},e),{loginToInstanceId:null,loginUrl:null,loginCredentials:null,windowTarget:null});case Qf:{const{pluginsSlugs:n,installationId:s,value:i}=t,{pluginsV2:a}=e,r=a[s].map((e=>n.includes(e.slug)?Object.assign(Object.assign({},e),{autoUpdates:i}):e));return a[s]=[...r],Object.assign(Object.assign({},e),{pluginsV2:a})}case Og:{const{themesSlugs:n,installationId:s,value:i}=t,{themesV2:a}=e,r=a[s].map((e=>n.includes(e.slug)?Object.assign(Object.assign({},e),{autoUpdates:i}):e));return a[s]=[...r],Object.assign(Object.assign({},e),{themesV2:a})}case mf:{const{installations:n}=t;return Object.assign(Object.assign({},e),{installations:n})}case ff:{const{installations:n,installationsIds:s}=t,i=new Map;n.forEach((e=>{i.set(e.id,e)}));const a=new Map;s.forEach((e=>{e=parseInt(`${e}`),i.has(e)||a.set(e,!0)}));const r=(e.installations||[]).reduce(((e,t)=>{const n=i.get(t.id);return n?(i.delete(t.id),e.push(n)):a.has(t.id)||e.push(t),e}),[]);return i.forEach((e=>{r.push(e)})),Object.assign(Object.assign({},e),{installations:r})}case eg:{const{installationId:n,data:s}=t,{pluginsV2:i}=e;return i[n]=s,Object.assign(Object.assign({},e),{pluginsV2:i})}case tg:{const{installationId:n,data:s}=t;let{pluginsV2:i}=e;const a=[...i[n]||[],s];return i=Object.assign(Object.assign({},i),{[n]:a}),Object.assign(Object.assign({},e),{pluginsV2:i})}case Lg:{const{installationId:n,data:s}=t,{themesV2:i}=e;return i[n]=s,Object.assign(Object.assign({},e),{themesV2:i})}case Mg:{const{installationId:n,data:s}=t;let{themesV2:i}=e;const a=[...i[n]||[],s];return i=Object.assign(Object.assign({},i),{[n]:a}),Object.assign(Object.assign({},e),{themesV2:i})}case"instances/RESET_ASSETS_CACHE_FOR_INSTALLATIONS":{const n={},s={},i=t.installationsIds.map((e=>`${e}`));return Object.keys(e.pluginsV2).forEach((t=>{i.includes(t)||(n[t]=e.pluginsV2[t])})),Object.keys(e.themesV2).forEach((t=>{i.includes(t)||(s[t]=e.themesV2[t])})),Object.assign(Object.assign({},e),{pluginsV2:n,themesV2:s})}case kf:{const n=(e.installations||[]).map((e=>{if(void 0===t.vulnerabilityStatuses[e.id])return e;const n=t.vulnerabilityStatuses[e.id];return Object.assign(Object.assign({},e),{version:n.version,features:Object.assign(Object.assign({},e.features),{updates:Object.assign(Object.assign({},e.features.updates),{availableVersion:n.availableVersion,amountOfPluginsWithUpdates:n.amountOfPluginsWithUpdates,amountOfThemesWithUpdates:n.amountOfThemesWithUpdates}),vulnerability:Object.assign(Object.assign({},e.features.vulnerability),{vulnerable:n.vulnerable})})})}));return Object.assign(Object.assign({},e),{installations:n})}case Pf:{const n=(e.installations||[]).map((e=>{var n,s;return e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{updates:Object.assign(Object.assign({},null===(n=e.features)||void 0===n?void 0:n.updates),{php:Object.assign(Object.assign({},null===(s=e.features)||void 0===s?void 0:s.updates.php),{taskStatus:t.taskStatus})})})})}));return Object.assign(Object.assign({},e),{installations:n})}case ng:{const{pluginsV2:n}=e,s=Object.keys(n);return Object.keys(t.pluginsVulnerabilityStatuses).forEach((e=>{if(s.includes(e)){const s=t.pluginsVulnerabilityStatuses[e],i=Object.keys(s),a=n[e].map((e=>i.includes(e.slug)?Object.assign(Object.assign({},e),{vulnerable:s[e.slug].vulnerable,version:s[e.slug].version,availableVersion:s[e.slug].availableVersion}):e));n[e]=[...a]}})),Object.assign(Object.assign({},e),{pluginsV2:n})}case Ag:{const{themesV2:n}=e,s=Object.keys(n);return Object.keys(t.themesVulnerabilityStatuses).forEach((e=>{if(s.includes(e)){const s=t.themesVulnerabilityStatuses[e],i=Object.keys(s),a=n[e].map((e=>i.includes(e.slug)?Object.assign(Object.assign({},e),{vulnerable:s[e.slug].vulnerable,version:s[e.slug].version,availableVersion:s[e.slug].availableVersion}):e));n[e]=[...a]}})),Object.assign(Object.assign({},e),{themesV2:n})}case Sf:{const n=(e.installations||[]).map((e=>{var n;return e.id!==t.instanceId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{credentials:Object.assign(Object.assign({},null===(n=e.features)||void 0===n?void 0:n.credentials),{available:t.hasAdminCredentials})})})}));return Object.assign(Object.assign({},e),{installations:n})}case bg:{let n=!1;const s=(e.installations||[]).map((e=>{const s=t.installationSecurityStatuses.find((t=>+t.id==+e.id));return s?(n=!0,Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{security:Object.assign(Object.assign({},e.features.security),{status:s.securityStatus}),vulnerability:Object.assign(Object.assign({},e.features.vulnerability),{vulnerable:s.vulnerable})})})):e}));return n?Object.assign(Object.assign({},e),{installations:s}):e}case Cf:{const n=(e.installations||[]).map((e=>{var n,s,i,a,r;return e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{php:Object.assign(Object.assign({},null===(n=e.features)||void 0===n?void 0:n.php),{handler:Object.assign(Object.assign({},null===(i=null===(s=e.features)||void 0===s?void 0:s.php)||void 0===i?void 0:i.handler),t.phpHandler),eoled:null!==(a=t.phpHandler.eoled)&&void 0!==a?a:null===(r=e.features)||void 0===r?void 0:r.php.eoled})})})}));return Object.assign(Object.assign({},e),{installations:n})}case If:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{integrity:Object.assign(Object.assign({},e.features.integrity),{available:t.available})})})));return Object.assign(Object.assign({},e),{installations:n})}case Of:{const n=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{vulnerabilityFiltering:Object.assign(Object.assign({},e.features.vulnerabilityFiltering),{status:t.status})})})));return Object.assign(Object.assign({},e),{installations:n})}case Lf:{const{domainsInstallationsIds:n}=e,{domainId:s,installationId:i}=t;return n.hasOwnProperty(s)||(n[s]=[]),n[s]=[...new Set([...n[s],i])],Object.assign(Object.assign({},e),{domainsInstallationsIds:n})}case Mf:{let n=null;t.subscriptionInfo&&(n={status:t.subscriptionInfo.status});const s=(e.installations||[]).map((e=>e.id!==t.installationId?e:Object.assign(Object.assign({},e),{features:Object.assign(Object.assign({},e.features),{virtualPatches:Object.assign(Object.assign({},e.features.virtualPatches),{subscription:n})})})));return Object.assign(Object.assign({},e),{installations:s})}default:return e}}};let IB={smartUpdateResults:{},instanceLink:null,instanceId:null,instanceUrl:null};const OB=e=>(e.smartUpdateResultsPublic&&(IB=Object.assign({},e.smartUpdateResultsPublic)),(e=IB,t)=>e),LB=e=>{const t={installingAssets:new Set};return(e=t,n)=>{switch(n.type){case tS:return e;case nS:{const t=new Set(e.installingAssets.values());return Hc(n).forEach((e=>t.add(e))),Object.assign(Object.assign({},e),{installingAssets:t})}case sS:{const t=new Set(e.installingAssets.values());return t.delete(Bc(n)),Object.assign(Object.assign({},e),{installingAssets:t})}default:return e}}},MB=e=>{const t={list:null,instances:null,sets:null};return void 0!==e.plugins&&(t.list=[...e.plugins.list],t.instances=[...e.plugins.instances],e.plugins.sets?t.sets=[...e.plugins.sets]:t.sets=[]),(e=t,n)=>{switch(n.type){case __:return Object.assign(Object.assign({},e),{list:null,instances:null,sets:null});case y_:return Object.assign(Object.assign({},e),{list:n.plugins,instances:n.instances,sets:n.sets});default:return((e,t)=>{if(null===e.list)return e;if(t.type===x_){let n=e.list.filter((e=>!iM(t.pluginsToUpdate,e)));return n=[...t.newPluginsData,...n],Object.assign(Object.assign({},e),{list:n})}return e})(e,n)}}},AB=e=>{const t={list:null,instances:null,sets:null};return void 0!==e.themes&&(t.list=[...e.themes.list],t.instances=[...e.themes.instances],e.themes.sets?t.sets=[...e.themes.sets]:t.sets=[]),(e=t,n)=>{switch(n.type){case oS:return Object.assign(Object.assign({},e),{list:null,instances:null,sets:null});case rS:return Object.assign(Object.assign({},e),{list:n.themes,instances:n.instances,sets:n.sets});default:return((e,t)=>{if(null===e.list)return e;if(t.type===lS){const n=t.newThemesData.map((e=>e.instances.filter((({isAssetActive:e})=>e)).map((({id:e})=>e)))).flat();let s=e.list.filter((e=>!iM(t.themesToUpdate,e))).map((e=>(e.instances=e.instances.map((e=>(n.includes(e.id)&&(e.isAssetActive=!1),e))),e)));return s=[...t.newThemesData,...s],Object.assign(Object.assign({},e),{list:s})}return e})(e,n)}}},EB=e=>{const t={list:null,remoteInstancesLog:{}};return void 0!==e.servers&&(t.list=[...e.servers.list]),(e=t,n)=>{switch(n.type){case Ax:return Object.assign(Object.assign({},e),{list:(e.list||[]).concat(n.server)});case Ex:return Object.assign(Object.assign({},e),{list:(e.list||[]).map((e=>e.id===n.server.id?n.server:e))});case Nx:return Object.assign(Object.assign({},e),{list:(e.list||[]).map((e=>n.scanningServers.includes(e.id)?Object.assign(Object.assign({},e),{isScanning:!0}):e))});case"servers/SCAN_SERVERS":return e;case Rx:{const t=(e.list||[]).map((e=>n.updatedServers.find((t=>t.id===e.id))||e));return Object.assign(Object.assign({},e),{list:t})}case Fx:return Object.assign(Object.assign({},e),{list:n.servers});case Bx:return Object.assign(Object.assign({},e),{list:null});case Hx:{const t=(e.list||[]).filter((e=>!n.serverIds.includes(e.id)));return Object.assign(Object.assign({},e),{list:t})}case Wx:return Object.assign(Object.assign({},e),{remoteInstancesLog:Object.assign(Object.assign({},e.remoteInstancesLog),{[n.serverId]:n.remoteInstancesLog})});case zx:return Object.assign(Object.assign({},e),{remoteInstancesLog:Object.assign(Object.assign({},e.remoteInstancesLog),{[n.serverId]:null})});default:return e}}},UB=e=>{const t={list:{}};return(e=t,n)=>{switch(n.type){case"longTask/UPDATE_LONG_TASK_DATA":if(n.longTaskData){const t=n.longTaskData.id;if(t){const s=Object.assign({},e.list);return s[t]=n.longTaskData,Object.assign(Object.assign({},e),{list:s})}}return e;case"longTask/DELETE_LONG_TASK_DATA":if(n.longTaskId&&e.list[n.longTaskId]){const t=Object.assign({},e.list);return delete t[n.longTaskId],Object.assign(Object.assign({},e),{list:t})}return e;default:return e}}},RB=e=>{const t={list:[],limits:{backupsLimit:0,backupsCount:0,backupsLimitExceeded:!1}};return(e=t,n)=>{switch(n.type){case fS:return n.backups?Object.assign(Object.assign({},e),{list:n.backups,limits:void 0===n.limits?t.limits:Object.assign(Object.assign({},n.limits),{backupsLimitExceeded:null!==n.limits.backupsLimit&&n.limits.backupsLimit-n.limits.backupsCount<=0})}):e;case gS:{const t=e.list.filter((e=>!n.fileNames.includes(e.fileName)));return Object.assign(Object.assign({},e),{list:t})}default:return e}}},NB=e=>{const t={status:du,drawerIsOpen:!1,messages:null,formErrors:null,settings:null};return(e=t,n)=>{switch(n.type){case ah:return Object.assign(Object.assign({},e),{drawerIsOpen:!0});case rh:return Object.assign(Object.assign({},e),{drawerIsOpen:!1,messages:null,formErrors:null});case oh:return Object.assign(Object.assign({},e),{status:pu,messages:null});case lh:return Object.assign(Object.assign({},e),{status:"loaded",messages:n.messages,settings:n.settings});case ch:return Object.assign(Object.assign({},e),{status:mu,messages:n.messages});case uh:return Object.assign(Object.assign({},e),{status:hu,messages:null,formErrors:null});case dh:return Object.assign(Object.assign({},e),{status:fu,settings:n.settings,messages:n.messages});case ph:return Object.assign(Object.assign({},e),{status:"update_error",messages:n.messages,formErrors:n.formErrors});default:return e}}};function FB(e){return function(t){var n=t.dispatch,s=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,s,e):t(i)}}}}var YB=FB();YB.withExtraArgument=FB;const BB=YB,HB={"install-theme":[(e,t)=>{e.publicParams&&e.publicParams.installedThemes&&t(GD(e.publicParams.installedThemes.map((e=>({name:e.name}))),(()=>t(JD()))))}],"uninstall-theme":[(e,t)=>{e.publicParams&&e.publicParams.uninstalledThemes&&t(GD(e.publicParams.uninstalledThemes.map((e=>({name:e.name,version:e.version}))),(()=>t(rP()))))}],"update-theme":[(e,t)=>{e.publicParams&&e.publicParams.updatedThemes&&t(GD(e.publicParams.updatedThemes.map((e=>({name:e.name}))),(()=>t(pP()))))}],"activate-theme":[(e,t)=>{t(WD()).finally((()=>t(fP())))}],"remove-theme":[(e,t)=>{t(WD()).finally((()=>t(cP())))}],"install-plugin":[(e,t)=>{e.publicParams&&e.publicParams.installedPlugins&&t(M_(e.publicParams.installedPlugins.map((e=>({name:e.name}))),(()=>t(R_()))))}],"uninstall-plugin":[(e,t)=>{e.publicParams&&e.publicParams.uninstalledPlugins&&t(M_(e.publicParams.uninstalledPlugins.map((e=>({name:e.name,version:e.version}))),(()=>t(Z_()))))}],"update-plugin":[(e,t)=>{e.publicParams&&e.publicParams.updatedPlugins&&t(M_(e.publicParams.updatedPlugins.map((e=>({name:e.name}))),(()=>t(sx()))))}],"activate-plugin":[(e,t)=>{e.publicParams&&e.publicParams.activatedPlugins&&t(M_(e.publicParams.activatedPlugins.map((e=>({name:e.name,version:e.version}))),(()=>t(W_()))))}],"deactivate-plugin":[(e,t)=>{e.publicParams&&e.publicParams.deactivatedPlugins&&t(M_(e.publicParams.deactivatedPlugins.map((e=>({name:e.name,version:e.version}))),(()=>t(G_()))))}],"remove-plugin":[(e,t)=>{t(I_()).finally((()=>t(ex())))}],"install-custom-plugin-from-plugins-tab":[(e,t)=>{e.publicParams&&e.publicParams.pluginName&&e.publicParams.pluginVersion&&t(M_([{name:e.publicParams.pluginName}],(()=>t(B_()))))}],"install-custom-theme-from-themes-tab":[(e,t)=>{e.publicParams&&e.publicParams.themeName&&e.publicParams.themeVersion&&t(WD()).finally((()=>t(nP())))}],[hb]:[(e,t)=>{if(e.publicParams){const{installationId:n,domainId:s}=e.publicParams;nw(e)&&n&&t(nv({instancesIds:[n]})).then((()=>{t(Kv(n)),t(ty(n)),t(Hv(!0))})).catch((()=>{})),e.publicParams.installSetTaskInfo&&t(zv(e.publicParams.installSetTaskInfo)),n&&s&&t(Zv(s,n))}}],"synchronize-site-url":[(e,t)=>{if(e.publicParams){const{instanceId:n}=e.publicParams;nw(e)&&n&&t(nv({instancesIds:[n]})).catch((()=>{})).finally((()=>t(gy())))}}],"task\\installset":[(e,t)=>{nw(e)&&t(jI())}],"clone-instance":[(e,t)=>{if(e.publicParams){const{sourceInstallationId:n,targetInstallationId:s,refreshTargetInstallationInUi:i,targetDomainId:a}=e.publicParams;nw(e)&&(s&&(t(Kv(s)),t(Xv(s))),i&&s?t(nv({instancesIds:[s]})).catch((()=>{})).finally((()=>{n&&t(dF(n))})):n&&t(dF(n)),a&&s&&t(Zv(a,s)),t(Ap())),sw(e)&&n&&t(dF(n))}}],"reinstall-core":[(e,t)=>{nw(e)&&(t(PU()),e.publicParams.installationId&&t(vb(e.publicParams.installationId)).catch((()=>{}))),sw(e)&&t(IU())}],"update-instance":[(e,t)=>{if(nw(e)){if(e.publicParams&&e.publicParams.successfullyUpdatedInstallationsIds){const{successfullyUpdatedInstallationsIds:n=[]}=e.publicParams;n.length>0&&t(qb(n)).catch((()=>{}))}t(ny())}if(sw(e)){if(e.publicParams&&e.publicParams.currentlyUpdatingInstallationId){const{currentlyUpdatingInstallationId:n}=e.publicParams;n&&t(qb([n])).catch((()=>{}))}t(sy())}}],[fb]:[(e,t)=>{if(nw(e)){if(e.publicParams&&e.publicParams.successfullyUpdatedInstallationsIds){const{successfullyUpdatedInstallationsIds:n=[]}=e.publicParams;n.length>0&&t(qb(n)).catch((()=>{}))}t(ny())}if(sw(e)){if(e.publicParams&&e.publicParams.currentlyUpdatingInstallationId){const{currentlyUpdatingInstallationId:n}=e.publicParams;n&&t(qb([n])).catch((()=>{}))}t(sy())}}],[mb]:[(e,t)=>{if(e.publicParams&&e.publicParams.successfullyUpdatedInstallationsIds){const{successfullyUpdatedInstallationsIds:n}=e.publicParams;t(qb(n)).catch((()=>{}))}nw(e)&&t(iy()),sw(e)&&t(ay())}],"check-vulnerability":[(e,t)=>{var n;if(nw(e))if(null===(n=e.publicParams)||void 0===n?void 0:n.processedInstallationsIds){const{processedInstallationsIds:n}=e.publicParams;t(Bg(n)).catch((()=>{})).finally((()=>t({type:jf,task:e})))}else t({type:jf,task:e})}],"mass-check-updates":[(e,t)=>{var n;if(null===(n=e.publicParams)||void 0===n?void 0:n.installationsIds){const{installationsIds:n}=e.publicParams;t(qb(n)).catch((()=>{}))}nw(e)&&t(ry()),sw(e)&&t(oy())}],"vulnerability-mitigation":[(e,t)=>{var n;if(null===(n=e.publicParams)||void 0===n?void 0:n.installationsIds){const{installationsIds:n}=e.publicParams;t(Bg(n)).catch((()=>{})).finally((()=>t({type:rg,task:e})))}else t({type:rg,task:e})}],"apply-virtual-patches":[(e,t)=>{const n=e.publicParams.processedInstallationsIds;nw(e)&&n?(t(nv({instancesIds:n})).catch((()=>{})).finally((()=>{t({type:lg,task:e})})),t(Bg(n)).catch((()=>{}))):tw(e)&&t({type:lg,task:e})}],"disable-virtual-patches":[(e,t)=>{const n=e.publicParams.processedInstallationsIds;nw(e)&&n?(t(nv({instancesIds:n})).catch((()=>{})).finally((()=>{t({type:lg,task:e})})),t(Bg(n)).catch((()=>{}))):tw(e)&&t({type:lg,task:e})}],"smart-php-update-instance":[(e,t)=>{Iy(e.publicParams.installationId,e)(t)}]},VB=e=>{const t={list:null,instances:null};return void 0!==e.sets&&(t.list=[...e.sets.list],t.instances=[],e.sets.instances&&e.sets.instances.length?t.instances=[...e.sets.instances]:e.instances&&e.instances.list&&e.instances.list.length&&(t.instances=e.instances.list.map((e=>({id:e.id,name:e.name,url:e.url}))))),(e=t,n)=>{switch(n.type){case _P:return Object.assign(Object.assign({},e),{list:null,instances:null});case yP:return Object.assign(Object.assign({},e),{list:n.sets,instances:n.instances});default:return((e,t)=>{if(null===e.list)return e;switch(t.type){case xP:return Object.assign(Object.assign({},e),{list:[t.addedSet,...e.list]});case SP:return Object.assign(Object.assign({},e),{list:e.list.filter((e=>!qc(t.removedSetIds,e.id)))});case wP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{name:t.newName}):e))});case kP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{plugins:e.plugins.map((e=>e.id===t.assetId?Object.assign(Object.assign({},e),{isProcessing:!0}):e))}):e))});case jP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{plugins:e.plugins.map((e=>e.id===t.assetId?Object.assign(Object.assign({},e),{active:t.active,isProcessing:!1}):e))}):e))});case TP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{themes:e.themes.map((e=>e.id===t.assetId?Object.assign(Object.assign({},e),{isProcessing:!0}):e))}):e))});case CP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{themes:e.themes.map((e=>e.id===t.assetId?Object.assign(Object.assign({},e),{active:t.active,isProcessing:!1}):Object.assign(Object.assign({},e),{active:!1})))}):e))});case DP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{plugins:[...e.plugins,...t.plugins.map((e=>Object.assign(Object.assign({},e),{active:!0})))]}):e))});case PP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{themes:[...e.themes,...t.themes]}):e))});case LP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{plugins:e.plugins.filter((e=>e.id.toString()!==t.pluginId.toString()))}):e))});case MP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{themes:e.themes.filter((e=>e.id.toString()!==t.themeId.toString()))}):e))});case IP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{plugins:[...e.plugins,{id:t.pluginId,name:t.pluginName,title:t.pluginTitle,isUploaded:!0}]}):e))});case OP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{themes:[...e.themes,{id:t.themeId,name:t.themeName,title:t.themeTitle,isUploaded:!0}]}):e))});case AP:return Object.assign(Object.assign({},e),{list:e.list.filter((e=>e.id.toString()!==t.setId.toString()))});case EP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{plugins:[]}):e))});case UP:return Object.assign(Object.assign({},e),{list:e.list.map((e=>e.id.toString()===t.setId.toString()?Object.assign(Object.assign({},e),{themes:[]}):e))});default:return e}})(e,n)}}},$B=()=>e=>t=>(window.__wpToolkitAutotestsLastActions=window.__wpToolkitAutotestsLastActions||[],window.__wpToolkitAutotestsLastActions=window.__wpToolkitAutotestsLastActions.slice(-50),window.__wpToolkitAutotestsLastActions.push(t.type),e(t)),WB=e=>{const t=[];return(e=t,n)=>{switch(n.type){case Nf:{const{updates:t}=n,s=e=>Object.assign(Object.assign({},e),{core:null===e.core.availableVersion?{}:e.core,plugins:e.plugins.filter((e=>null!==e.availableVersion)),themes:e.themes.filter((e=>null!==e.availableVersion))}),i=[];return e.forEach((e=>{const n=t.find((t=>t.id===e.id));n?i.push(s(n)):i.push(e)})),t.forEach((t=>{e.some((e=>e.id===t.id))||i.push(s(t))})),[...i]}case Ff:return[];case Bm:return[...e.map((e=>+e.id==+n.instanceId?Object.assign(Object.assign({},e),{smartUpdate:Object.assign(Object.assign({},e.smartUpdate),n.values)}):e))];case Km:return[...e.map((e=>+e.id==+n.installationId?Object.assign(Object.assign({},e),{smartUpdate:Object.assign(Object.assign({},e.smartUpdate),{taskStatus:Zd.NotExist})}):e))];case qm:return[...e.map((e=>{const t=n.settings.find((t=>t.id===e.id));return t?Object.assign(Object.assign({},e),{autoUpdate:Object.assign(Object.assign({},e.autoUpdate),t)}):e}))];default:return e}}};const zB=e=>e.map((e=>{var t,n,s;const{resolveApplicable:i,checkApplicable:a,revertApplicable:r,tasks:o}=e,l=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["resolveApplicable","checkApplicable","revertApplicable","tasks"]);return Object.assign(Object.assign({},l),{resolveAndRevertAvailable:i&&r,checkSecurityTaskId:null===(t=o.check)||void 0===t?void 0:t.id,resolveSecurityTaskId:null===(n=o.resolve)||void 0===n?void 0:n.id,revertSecurityTaskId:null===(s=o.revert)||void 0===s?void 0:s.id})})),qB=e=>{const t={securityMeasures:[],securityMeasuresInstallationStatuses:[]};return(e=t,n)=>{switch(n.type){case dg:return Object.assign(Object.assign({},e),{securityMeasures:n.securityMeasures});case pg:return n.securityMeasuresInstallationStatuses?Object.assign(Object.assign({},e),{securityMeasuresInstallationStatuses:zB(n.securityMeasuresInstallationStatuses)}):e;case hg:{if(!n.securityMeasuresInstallationStatuses)return e;const t=zB(n.securityMeasuresInstallationStatuses),s=[],i=e.securityMeasuresInstallationStatuses.map((e=>{const n=t.find((t=>t.id===e.id));return n?(s.push(n.id),n):e}));return t.forEach((e=>{s.includes(e.id)||i.push(e)})),Object.assign(Object.assign({},e),{securityMeasuresInstallationStatuses:i})}case mg:{if(!n.installationsIds)return e;const t=e.securityMeasuresInstallationStatuses.map((e=>{var t,s;return(null===(t=n.installationsIds)||void 0===t?void 0:t.includes(e.id))?Object.assign(Object.assign({},e),{checkSecurityTaskId:null===(s=n.task)||void 0===s?void 0:s.id}):e}));return Object.assign(Object.assign({},e),{securityMeasuresInstallationStatuses:t})}case fg:{if(!n.installationsIds)return e;const t=e.securityMeasuresInstallationStatuses.map((e=>{var t,s;return(null===(t=n.installationsIds)||void 0===t?void 0:t.includes(e.id))?Object.assign(Object.assign({},e),{resolveSecurityTaskId:null===(s=n.task)||void 0===s?void 0:s.id}):e}));return Object.assign(Object.assign({},e),{securityMeasuresInstallationStatuses:t})}case gg:{if(!n.installationsIds)return e;const t=e.securityMeasuresInstallationStatuses.map((e=>{var t,s;return(null===(t=n.installationsIds)||void 0===t?void 0:t.includes(e.id))?Object.assign(Object.assign({},e),{revertSecurityTaskId:null===(s=n.task)||void 0===s?void 0:s.id}):e}));return Object.assign(Object.assign({},e),{securityMeasuresInstallationStatuses:t})}default:return e}}},GB=e=>{const t={installationsVulnerabilityStatuses:[],runningCheckVulnerabilitiesTasks:[],vulnerabilityMitigationsUpdatingStatuses:[],virtualPatchesUpdatingStatuses:[]};return(e=t,n)=>{switch(n.type){case sg:return n.installationsVulnerabilityStatuses?Object.assign(Object.assign({},e),{installationsVulnerabilityStatuses:n.installationsVulnerabilityStatuses}):e;case ig:{if(!n.installationsVulnerabilityStatuses)return e;const t=[],s=void 0===e.installationsVulnerabilityStatuses?n.installationsVulnerabilityStatuses.map((e=>(t.push(e.id),e))):e.installationsVulnerabilityStatuses.map((e=>{const s=n.installationsVulnerabilityStatuses.find((t=>t.id===e.id));return s?(t.push(s.id),s):e}));return n.installationsVulnerabilityStatuses.forEach((e=>{t.includes(e.id)||s.push(e)})),Object.assign(Object.assign({},e),{installationsVulnerabilityStatuses:s})}case ag:{const t=[...e.vulnerabilityMitigationsUpdatingStatuses];return n.vulnerabilities.forEach((e=>{t.push({vulnerabilityId:e.vulnerabilityId,mitigations:e.mitigations,installationIds:e.installationsIds,task:n.task})})),Object.assign(Object.assign({},e),{vulnerabilityMitigationsUpdatingStatuses:t})}case rg:return Object.assign(Object.assign({},e),{vulnerabilityMitigationsUpdatingStatuses:e.vulnerabilityMitigationsUpdatingStatuses.filter((e=>e.task.id!==n.task.id))});case og:{const t=[...e.virtualPatchesUpdatingStatuses];return t.push({installationIds:n.installationIds,task:n.task}),Object.assign(Object.assign({},e),{virtualPatchesUpdatingStatuses:t})}case lg:{let t=[...e.virtualPatchesUpdatingStatuses];return t=t.filter((e=>e.task.id!==n.task.id)),Object.assign(Object.assign({},e),{virtualPatchesUpdatingStatuses:t})}case Tf:{const t=[...e.runningCheckVulnerabilitiesTasks];return t.push({task:n.task,installationsIds:n.installationsIds}),Object.assign(Object.assign({},e),{runningCheckVulnerabilitiesTasks:t})}case jf:{const t=[...e.runningCheckVulnerabilitiesTasks];return Object.assign(Object.assign({},e),{runningCheckVulnerabilitiesTasks:t.filter((e=>n.task.id!==e.task.id))})}default:return e}}},KB=(e,t)=>{return eh(function(e){for(var t=Object.keys(e),n={},s=0;s<t.length;s++){var i=t[s];"function"==typeof e[i]&&(n[i]=e[i])}var a,r=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:Jp.INIT}))throw new Error(Kp(12));if(void 0===n(void 0,{type:Jp.PROBE_UNKNOWN_ACTION()}))throw new Error(Kp(13))}))}(n)}catch(e){a=e}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var s=!1,i={},o=0;o<r.length;o++){var l=r[o],c=n[l],u=e[l],d=c(u,t);if(void 0===d)throw t&&t.type,new Error(Kp(14));i[l]=d,s=s||d!==u}return(s=s||r.length!==Object.keys(e).length)?i:e}}(((e,t)=>({router:nl(t),app:DB(e),instances:PB(e),smartUpdateResultsPublic:OB(e),assets:LB(),servers:EB(e),plugins:MB(e),themes:AB(e),sets:VB(e),longTasks:UB(),settings:NB(),backgroundTasks:Hj(e),backup:RB(),securityMeasures:qB(),vulnerabilities:GB(),updates:WB()}))(e,t)),sh(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),s=function(){throw new Error(Kp(15))},i={getState:n.getState,dispatch:function(){return s.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return s=sh.apply(void 0,a)(n.dispatch),(0,Gp.Z)((0,Gp.Z)({},n),{},{dispatch:s})}}}(BB,CB(t),(s=SS,i=Td.getTasksData,function(e){return function(t){return function(n){t(n);var a=new hw((function(){return e.getState().backgroundTasks.tasks}),(function(t){return e.dispatch({type:KS,task:t})}),(function(t){return e.dispatch({type:XS,task:t})}),i);return(ZS===n.type||s.includes(n.type))&&function(e){if(a.startPolling(e),"undefined"!=typeof Jsw){var t=Jsw.getComponent("asyncProgressBarWrapper");t&&t.update()}}(n.task),!0}}}),(n=HB,e=>t=>s=>{const i=e.getState().backgroundTasks.tasks;t(s);const a=e.getState().backgroundTasks.tasks;i!==a&&a.forEach((t=>{const s=i.find((e=>e.id===t.id));if(tw(t)&&(!s||!tw(s))){const s=n[t.code];s&&s.forEach((n=>n(t,e.dispatch)))}}))}),$B),window.devToolsExtension?window.devToolsExtension():e=>e,window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__():e=>e));var n,s,i},XB=r(70942),ZB={DbUser:!0,Db:!0,ActionLog:!0},JB=(0,so.$j)(void 0,(e=>({instancesActions:nh({getInstallationsRemoveConfiguration:Bb},e),addWarningMessage:t=>e(Tp(t))})))((({installation:e,isOpen:t,onClose:n,onRemove:s,instancesActions:{getInstallationsRemoveConfiguration:i},addWarningMessage:a})=>{const[r,o]=(0,U.useState)(ZB),[l,c]=(0,U.useState)(),[u,d]=(0,U.useState)(!1);return(0,U.useEffect)((()=>{t&&(d(!0),i([e.id]).then((t=>{const s=t.find((t=>t.id===e.id));s||(a((0,L.jsx)(Ac,{content:"remove-confirmation.error.getConfirmationDetails"})),n()),c(s)})).catch((()=>{})).finally((()=>d(!1))))}),[i,d,e,t,a,n]),(0,L.jsx)(ji,{isOpen:t,title:(0,L.jsx)(Ac,{content:"remove-confirmation.titleSingle"}),cancelButton:{onClick:n,children:(0,L.jsx)(Ac,{content:"remove-confirmation.buttonNo"})},buttons:(0,L.jsx)(Ue,{onClick:()=>(()=>{const{Db:e,DbUser:t,ActionLog:i}=r,a={removeDb:e,removeUser:t,removeActionLog:i,checkShared:!1};n(),s(a)})(),"data-test-id":kh,children:(0,L.jsx)(Ac,{content:"remove-confirmation.buttonYes"})}),size:"sm",onClose:n,"data-test-id":Th,children:!l||u?(0,L.jsx)(It,{}):(0,L.jsx)(qL,{changeRemoveOptions:o,db:l.database,dbUser:l.user,isInstanceDatabaseDeletionAllowed:l.database.removingAllowed&&l.user.removingAllowed,isDatabaseWillBeRemovedAutomatically:l.database.willBeRemovedAutomatically,installationId:e.id,installationTitle:e.displayTitle,isActionLogAvailable:e.features.actionLog.available})})})),QB=({isOpen:e,onClose:t,onDetach:n,installation:s})=>{const i=r(91036)(s.url);return(0,L.jsx)(ji,{isOpen:e,title:(0,L.jsx)(Ac,{content:"controllers.index.detail.detachConfirmationTitle"}),cancelButton:{children:(0,L.jsx)(Ac,{content:"controllers.index.detail.buttonConfirmationNo"}),onClick:t},buttons:(0,L.jsx)(Ue,{onClick:n,"data-test-id":jh,children:(0,L.jsx)(Ac,{content:"controllers.index.detail.detachButton"})}),size:"sm",onClose:t,"data-test-id":Th,children:(0,L.jsx)(cY,{installationsToRemove:[{id:s.id,url:`<a target='_blank' href='${i}'>${s.displayTitle}</a>`,isPossibleToRemove:!0,hintMessage:(0,L.jsx)(Ac,{content:"detach-confirmation.hintWillDetachSuccess"})}],title:(0,L.jsx)(Ac,{content:"controllers.index.detail.massDetachConfirmationDescription"})})})};const eH=e=>{const{maxChars:t,children:n}=e,s=function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}return n}(e,["maxChars","children"]);if("string"!=typeof n)return(0,L.jsx)(L.Fragment,{children:n});const i=n.toString(),a=i.length>t,r=a?`${i.slice(0,t-1)}...`:i,o=(0,L.jsx)(Wn,Object.assign({},s,{children:r}));return a?(0,L.jsx)(je,{title:i,children:o}):o},tH=({installation:e,className:t})=>{const n=Mc(),s=eu(e),i=`${"httpdocs"===s?"":"..."}${tC(e.installationType)?"\\":"/"}${s}`;return(0,L.jsx)(eH,{"data-test-id":"instance-at-folder-text",className:t,intent:"muted",fontSize:"sm",maxChars:30,children:n("instancesList.instanceCard.files.atFolder",{folder:i})})},nH=()=>{const e=Mc("appMode.installationDisplayTitle");return t=>t.features.php.unsupported?e("unsupportedPhp"):t.status.infected?e("infected"):t.status.unsupported?e("unsupported"):t.status.alive?t.title:e("broken")},sH=(0,so.$j)((e=>({installations:e.instances.installations})))((({installations:e,installationId:t,installationsIds:n,onChangeInstallation:s,domainId:i,baseClassName:a=`${gu}installation-selector`})=>{const r=Mc(),o=nH();return n.length<=1?null:(0,L.jsx)(Tt,{"data-test-id":"installation-selector",baseClassName:a,menu:(0,L.jsx)(Nn,{"data-test-id":"installation-selector-menu",children:(()=>{const t=[];return t.push((0,L.jsx)(Jn,{children:r("instancesList.instanceCard.instanceSelector.menuHeader").toString().toUpperCase()})),t.push(n.map((t=>{const n=null==e?void 0:e.find((e=>e.id===t));if(!n)return null;const r=n.status.unsupported||!n.status.alive;return(0,L.jsx)(ft,{"data-test-id":`installation-selector-menu-item__installation-id-${t}`,onClick:()=>s(i,t),icon:r?(0,L.jsx)(he,{name:"exclamation-mark-circle-filled",intent:"danger"}):null,children:(0,L.jsxs)("div",{className:`${a}__menu-item`,children:[(0,L.jsx)(Wn,{fontSize:"md",children:o(n)}),(0,L.jsx)(tH,{className:`${a}__at-folder-text`,installation:n})]})},`${t}`)}))),t})()}),children:(()=>{const e=n.findIndex((e=>e===t))+1,s=n.length;return(0,L.jsx)(Ue,{icon:"wordpress",caret:!0,children:`${e} / ${s}`})})()})})),iH=e=>{const{selector:t,title:n,statusMessages:s,linksSection:i,body:a,baseClassName:r=`${gu}wpt-card`}=e;return(0,L.jsxs)(vi,{className:`${r}-section`,children:[(0,L.jsx)(Ks,{children:(0,L.jsxs)("div",{className:`${r}-header`,children:[t,n]})}),s,(0,L.jsx)(Ks,{children:i}),a]})},aH=e=>{const{installation:t,onCacheRefresh:n,baseClassName:s=`${gu}wpt-card-title`}=e,i=nH();return(0,L.jsxs)("div",{className:s,children:[(0,L.jsx)(kn,{"data-test-id":bL,icon:(0,L.jsx)(he,{name:"info-circle",intent:"danger"}),level:2,children:i(t)}),(0,L.jsx)(Ue,{"data-test-id":Yh,icon:"refresh",tooltip:(0,L.jsx)(Ac,{content:"Card.refreshCardTooltip"}),onClick:()=>n(),ghost:!0})]})},rH=e=>{const{installation:t,installation:{domain:n,path:s,features:{fileManager:i},installationType:a},primary:r=!1,baseClassName:o=`${gu}installation-files-button`}=e;return i.available?(0,L.jsx)("div",{className:o,children:(0,L.jsx)(_F,{href:i.url,iconName:"folder-closed",dataTestId:Hh,localeKey:"instancesList.instanceCard.files.title",primary:r,children:(()=>{const e=eu(t);return e&&"httpdocs"!==e&&n&&e!==IL(n.name)&&e!==OL(n.name)?(0,L.jsx)(tH,{installation:t,className:`${o}__at-folder-text`}):null})()})}):null},oH=e=>{const{selector:t,installation:n,installation:{features:s},onCacheRefresh:i,onOpenCheckWpIntegrityDialog:a,onOpenActionLogDrawer:r,onOpenDetachDialog:o,onOpenRemoveDialog:l}=e,c=(0,L.jsx)(aH,{installation:n,onCacheRefresh:i}),u=`${gu}instance-links-section`,d=(0,L.jsxs)("div",{className:u,children:[s.fileManager.available&&(0,L.jsx)("div",{className:`${u}-element`,children:(0,L.jsx)(rH,{installation:n,primary:!0})}),s.actionLog.available&&(0,L.jsx)("div",{className:`${u}-element`,children:(0,L.jsx)(_F,{onClick:r,iconName:"list",localeKey:"list.instances.linkActionLog",dataTestId:"instance-link-action-log"})}),s.integrity.available&&(0,L.jsx)("div",{className:`${u}-element`,children:(0,L.jsx)(HE,{onOpenCheckWpIntegrityDialog:a})}),(0,L.jsx)("div",{className:`${u}-element`,children:(0,L.jsx)(_F,{onClick:o,iconName:"chain-broken",localeKey:"toolbar.detachFromWpToolkit",dataTestId:"instance-detach"})}),(0,L.jsx)("div",{className:`${u}-element`,children:(0,L.jsx)(_F,{onClick:l,iconName:"wordpress-minus",localeKey:"toolbar.uninstallWordPress",dataTestId:"instance-uninstall"})})]}),p=(0,L.jsx)(vi,{children:(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{content:"controllers.index.detail.infectedInstance.description",params:{refreshIcon:(0,L.jsx)(he,{name:"refresh"})}})})});return(0,L.jsx)(iH,{selector:t,title:c,linksSection:d,body:p})},lH=e=>{var t,n;const{selector:s,installation:i,installation:{id:a,path:r,errorMessage:o,features:l},onCacheRefresh:c,onOpenBackupDrawer:u,onOpenCheckWpIntegrityDialog:d,onOpenActionLogDrawer:p,onOpenDetachDialog:h,onOpenRemoveDialog:m,onEnable:f,onDisable:g}=e,b=(0,L.jsx)(aH,{installation:i,onCacheRefresh:c}),v=`${gu}instance-links-section`,y=(0,L.jsxs)("div",{className:v,children:[(l.backups.wptBackupsAvailable||l.backups.panelBackupsAvailable&&l.backups.backupManagerUrl)&&(0,L.jsx)("div",{className:`${v}-element`,children:(0,L.jsx)(SF,{onOpenBackupDrawer:u,installation:i,primary:!0})}),l.fileManager.available&&(0,L.jsx)("div",{className:`${v}-element`,children:(0,L.jsx)(rH,{installation:i})}),l.actionLog.available&&(0,L.jsx)("div",{className:`${v}-element`,children:(0,L.jsx)(_F,{onClick:p,iconName:"list",localeKey:"list.instances.linkActionLog",dataTestId:"instance-link-action-log"})}),l.integrity.available&&(0,L.jsx)("div",{className:`${v}-element`,children:(0,L.jsx)(HE,{onOpenCheckWpIntegrityDialog:d})}),(0,L.jsx)("div",{className:`${v}-element`,children:(0,L.jsx)(_F,{onClick:h,iconName:"chain-broken",localeKey:"toolbar.detachFromWpToolkit",dataTestId:"instance-detach"})}),(0,L.jsx)("div",{className:`${v}-element`,children:(0,L.jsx)(_F,{onClick:m,iconName:"wordpress-minus",localeKey:"toolbar.uninstallWordPress",dataTestId:"instance-uninstall"})})]}),_=(0,L.jsxs)(vi,{children:[(0,L.jsxs)(Ks,{children:[(0,L.jsxs)(as,{children:[(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.filesFound"}),":",(0,L.jsx)("br",{}),(0,L.jsx)(wn,{href:null!==(n=null===(t=l.fileManager)||void 0===t?void 0:t.url)&&void 0!==n?n:void 0,children:r})]}),(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.description"})]}),l.restorePoint&&l.restorePoint.restorePointTimestamp&&(0,L.jsx)(Ks,{className:"wpt-compact-section-item",title:(0,L.jsx)(Ac,{content:"controllers.index.detail.restorePointTitle"}),children:(0,L.jsx)(aA,{installationId:a,restorePoint:l.restorePoint,enableInstances:f,disableInstances:g})})||null,o&&(0,L.jsx)(Ks,{children:(0,L.jsx)(An,{target:(0,L.jsx)(fe,{children:(0,L.jsx)(Ac,{content:"controllers.index.detail.brokenInstance.errorDetails"})}),children:o})})||null]});return(0,L.jsx)(iH,{selector:s,title:b,linksSection:y,body:_})},cH=(0,so.$j)((e=>({upgradingInstanceInstructionsUrl:e.app.urls.upgradingInstanceInstructionsUrl})))((e=>{const{selector:t,installation:n,installation:{status:{unsupported:s},features:i,version:a},onCacheRefresh:r,onOpenDetachDialog:o,onOpenRemoveDialog:l,upgradingInstanceInstructionsUrl:c}=e,u=Mc();if(!a)return null;if(!s)return null;const d=(0,L.jsx)(aH,{installation:n,onCacheRefresh:r}),p=`${gu}instance-links-section`,h=(0,L.jsxs)("div",{className:p,children:[i.fileManager.available&&(0,L.jsx)("div",{className:`${p}-element`,children:(0,L.jsx)(rH,{installation:n,primary:!0})}),(0,L.jsx)("div",{className:`${p}-element`,children:(0,L.jsx)(_F,{onClick:o,iconName:"chain-broken",localeKey:"toolbar.detachFromWpToolkit",dataTestId:"instance-detach"})}),(0,L.jsx)("div",{className:`${p}-element`,children:(0,L.jsx)(_F,{onClick:l,iconName:"wordpress-minus",localeKey:"toolbar.uninstallWordPress",dataTestId:"instance-uninstall"})})]}),m=(0,L.jsxs)(vi,{children:[(0,L.jsx)(Ks,{children:(0,L.jsx)(Ac,{content:"controllers.index.detail.unsupportedInstance.description",params:{version:a}})}),c&&(0,L.jsxs)(Ks,{children:[(0,L.jsxs)(as,{children:[(0,L.jsx)(Ac,{content:"controllers.index.detail.unsupportedInstance.upgradingInstanceInstructionsLabel"}),":"]}),(0,L.jsx)(fe,{icon:"site-page",target:"_blank",href:c,children:u("controllers.index.detail.unsupportedInstance.upgradingInstructionsLinkText")})]})]});return(0,L.jsx)(iH,{selector:t,title:d,linksSection:h,body:m})})),uH=e=>{var t;const{installation:n,onOpenPluginsUpdates:s,onOpenSecurityDialog:i}=e,a=Mc(),[r,o]=(0,U.useState)(!1),[l,c]=(0,U.useState)(!1);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fe,{"data-test-id":"instance-manage-plugins",icon:"puzzle",onClick:()=>o(!0),primary:!0,children:a("list.sites.linkManagePlugins")}),(0,L.jsx)(zi,{isOpen:r,onClose:()=>o(!1),title:a("drawer.managePlugins.title"),subtitle:null===(t=n.domain)||void 0===t?void 0:t.name,"data-type":"wpt-plugins-drawer",children:(0,L.jsx)(IM,{isCollapsible:!1,isPaginationEnabled:!1,installation:n,onOpenNativePlugins:()=>c(!0),onUpdatesOpen:s,onOpenSecurityDialog:i,showTitle:!1})}),l&&(0,L.jsx)(YF,{installation:n,type:au,onClose:()=>c(!1)})]})},dH=e=>{var t;const{installation:n,onOpenThemesUpdates:s,onOpenSecurityDialog:i}=e,a=Mc(),[r,o]=(0,U.useState)(!1),[l,c]=(0,U.useState)(!1);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fe,{"data-test-id":"instance-manage-themes",icon:"brush",onClick:()=>o(!0),primary:!0,children:a("list.sites.linkManageThemes")}),(0,L.jsx)(zi,{isOpen:r,onClose:()=>o(!1),title:a("drawer.manageThemes.title"),subtitle:null===(t=n.domain)||void 0===t?void 0:t.name,"data-type":"wpt-themes-drawer",children:(0,L.jsx)(MM,{isCollapsible:!1,installation:n,onOpenNativeThemes:()=>c(!0),onUpdatesOpen:s,onOpenSecurityDialog:i,showTitle:!1})}),l&&(0,L.jsx)(YF,{installation:n,type:iu,onClose:()=>c(!1)})]})},pH=e=>{var t;const{installation:n}=e,s=Mc(),[i,a]=(0,U.useState)(!1);return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(fe,{icon:"database",onClick:()=>a(!0),primary:!0,children:s("list.sites.linkManageDatabase")}),(0,L.jsx)(zi,{isOpen:i,onClose:()=>a(!1),title:s("drawer.manageDatabase.title"),subtitle:null===(t=n.domain)||void 0===t?void 0:t.name,"data-type":"wpt-database-drawer",size:"xs",children:(0,L.jsx)(YM,{installation:n,onError:()=>a(!1),showTitle:!1})})]})},hH=(0,so.$j)((e=>({unpaidFeatures:e.app.unpaidFeatures,isWordPressInstancesLimitExceeded:e.app.options.isWordPressInstancesLimitExceeded})),(e=>({addErrorMessage:nh(jp,e)})))((({baseClassName:e=`${gu}instance-links-section`,installation:t,unpaidFeatures:n,onOpenSyncDrawer:s,onOpenCloneDrawer:i,onOpenBackupDrawer:a,onOpenActionLogDrawer:r,onOpenSecurityDialog:o,isWordPressInstancesLimitExceeded:l,addErrorMessage:c,onOpenCheckWpIntegrityDialog:u,onOpenUpdates:d,onOpenDetachDialog:p,onOpenRemoveDialog:h})=>{const{fileManager:m,copyData:f,clone:g,backups:b,actionLog:v,integrity:y,security:_}=t.features,x=(0,U.useCallback)((e=>{Rc(e,l?()=>{var e,n;return c((0,L.jsx)(Ac,{content:"common.wordPressSitesLimitForDomainExceeded",params:{count:null===(e=t.domain)||void 0===e?void 0:e.installationsCount,limit:null===(n=t.domain)||void 0===n?void 0:n.installationsLimit}}))}:i)}),[t,i,l,c]);return(0,L.jsxs)("div",{className:e,children:[(0,L.jsxs)("div",{children:[m.available&&(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(rH,{installation:t,primary:!0})}),(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(uH,{installation:t,onOpenPluginsUpdates:()=>d(Uf),onOpenSecurityDialog:o})}),(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(dH,{installation:t,onOpenThemesUpdates:()=>d(Rf),onOpenSecurityDialog:o})}),(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(pH,{installation:t})}),v.available&&(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(_F,{onClick:r,iconName:"list",localeKey:"list.instances.linkActionLog",dataTestId:"instance-link-action-log",primary:!0},"list.instances.linkActionLog")})]}),(0,L.jsxs)("div",{children:[f.available&&(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(gm,{uatAction:km,featureName:uu,installationId:t.id,isInstanceFeatureDisabled:!f.applicable,description:(0,L.jsx)(Ac,{content:"paidFeature.copyDataFeatureDescription"}),children:(0,L.jsx)(_F,{onClick:e=>Rc(e,s),iconName:n.sync||!f.applicable?null:"arrows-loop",localeKey:"list.instances.linkSync",dataTestId:"instance-link-sync"},"list.instances.linkSync")})}),g.available&&(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(gm,{featureName:cu,uatAction:km,installationId:t.id,isInstanceFeatureDisabled:!g.applicable,description:(0,L.jsx)(Ac,{content:"paidFeature.cloneFeatureDescription"}),children:(0,L.jsx)(_F,{onClick:x,iconName:n.clone||!g.applicable?null:"copy",localeKey:"list.instances.linkClone",dataTestId:"instance-link-clone"},"list.instances.linkClone")})}),(b.wptBackupsAvailable||b.panelBackupsAvailable&&b.backupManagerUrl)&&(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(SF,{onOpenBackupDrawer:a,installation:t})}),y.available&&(0,L.jsx)("div",{className:`${e}-element`,children:(0,L.jsx)(HE,{onOpenCheckWpIntegrityDialog:u})}),(0,L.jsx)(Tt,{"data-test-id":"instance-dropdown-menu",className:`${e}-element`,menu:(0,L.jsxs)(Nn,{children:[(0,L.jsx)(ft,{icon:"refresh",onClick:()=>d(),children:(0,L.jsx)(Ac,{content:"instancesList.instanceActions.checkUpdates"})}),_.available&&(0,L.jsx)(ft,{icon:"shield",onClick:()=>o(0,2),children:(0,L.jsx)(Ac,{content:"toolbar.checkSecurity"})}),(0,L.jsx)(ht,{}),(0,L.jsx)(ft,{"data-test-id":"instance-detach",icon:"chain-broken",onClick:p,children:(0,L.jsx)(Ac,{content:"toolbar.detachFromWpToolkit"})}),(0,L.jsx)(ft,{icon:"wordpress-minus",onClick:h,children:(0,L.jsx)(Ac,{content:"toolbar.uninstallWordPress"})})]}),children:(0,L.jsx)(fe,{icon:"three-dots-horizontal",children:(0,L.jsx)(Ac,{content:"list.instances.linkDropDownMenuMore"})})})]})]})})),mH=(0,so.$j)(void 0,(e=>({switchPhpHandler:nh(yb,e)})))((e=>{const{selector:t,installation:n,installation:{features:{fileManager:s,php:{handler:i}}},onEnable:a,onDisable:r,onCacheRefresh:o,onOpenDetachDialog:l,onOpenRemoveDialog:c,switchPhpHandler:u}=e,d=(0,L.jsx)(aH,{installation:n,onCacheRefresh:o}),p=`${gu}instance-links-section`,h=(0,L.jsxs)("div",{className:p,children:[s.available&&(0,L.jsx)("div",{className:`${p}-element`,children:(0,L.jsx)(rH,{installation:n,primary:!0})}),(0,L.jsx)("div",{className:`${p}-element`,children:(0,L.jsx)(_F,{onClick:l,iconName:"chain-broken",localeKey:"toolbar.detachFromWpToolkit",dataTestId:"instance-detach"})}),(0,L.jsx)("div",{className:`${p}-element`,children:(0,L.jsx)(_F,{onClick:c,iconName:"wordpress-minus",localeKey:"toolbar.uninstallWordPress",dataTestId:"instance-uninstall"})})]}),m=(0,L.jsxs)(vi,{children:[(0,L.jsxs)(Ks,{children:[(0,L.jsx)(Wn,{bold:!0,children:(0,L.jsx)(Ac,{content:"instancesList.issues.errorUnsupportedPHP.title",params:{phpVersion:null==i?void 0:i.version}})})," ",(0,L.jsx)(Ac,{content:"instancesList.issues.errorUnsupportedPHP.description",unsafe:!0})]}),(0,L.jsx)(Ks,{children:(0,L.jsx)(zE,{installation:n,onSwitchPHPHandler:e=>(r(),u(n.id,e).finally((()=>{a()})))})})]});return(0,L.jsx)(iH,{selector:t,title:d,linksSection:h,body:m})})),fH=e=>{const{installation:t,selector:n,onOpenBackupDrawer:s,onOpenActionLogDrawer:i,onOpenCheckWpIntegrityDialog:a,onOpenDetachDialog:r,onOpenRemoveDialog:o,onCacheRefresh:l,onEnable:c,onDisable:u,onSetInstanceName:d,onAddErrorMessage:p,statusMessages:h,onOpenSyncDrawer:m,onOpenCloneDrawer:f,onOpenSecurityDialog:g,onOpenUpdates:b,onOpenSmartPhpUpdates:v,onOpenVirtualPatchingUpsellDialog:y,onOpenVirtualPatchingLicenseInfoDrawer:_}=e;return t.features.php.unsupported?(0,L.jsx)(mH,{installation:t,selector:n,onCacheRefresh:l,onOpenDetachDialog:r,onOpenRemoveDialog:o,onEnable:c,onDisable:u}):t.status.unsupported?(0,L.jsx)(cH,{installation:t,selector:n,onCacheRefresh:l,onOpenDetachDialog:r,onOpenRemoveDialog:o}):t.status.infected?(0,L.jsx)(oH,{installation:t,selector:n,onCacheRefresh:l,onOpenActionLogDrawer:i,onOpenCheckWpIntegrityDialog:a,onOpenDetachDialog:r,onOpenRemoveDialog:o}):t.status.alive?(0,L.jsx)(iH,{selector:n,title:(0,L.jsx)(ZA,{installationId:t.id,name:t.title,setInstanceName:d,addErrorMessage:p,additionalButtons:(0,L.jsx)(Ue,{"data-test-id":Yh,icon:"refresh",tooltip:(0,L.jsx)(Ac,{content:"Card.refreshCardTooltip"}),onClick:l,ghost:!0})}),statusMessages:h,linksSection:(0,L.jsx)(hH,{installation:t,onOpenCloneDrawer:f,onOpenSyncDrawer:m,onOpenBackupDrawer:s,onOpenActionLogDrawer:i,onOpenUpdates:b,onOpenSecurityDialog:g,onOpenCheckWpIntegrityDialog:a,onOpenDetachDialog:r,onOpenRemoveDialog:o}),body:(0,L.jsx)(BE,{isWpMode:!0,installation:t,enableInstances:c,disableInstances:u,openUpdates:b,onOpenSecurityDialog:g,onOpenSmartPhpUpdates:v,onOpenVirtualPatchingUpsellDialog:y,onOpenVirtualPatchingLicenseInfoDrawer:_})}):(0,L.jsx)(lH,{installation:t,selector:n,onCacheRefresh:l,onOpenBackupDrawer:s,onOpenActionLogDrawer:i,onOpenCheckWpIntegrityDialog:a,onOpenDetachDialog:r,onOpenRemoveDialog:o,onEnable:c,onDisable:u})},gH=(0,so.$j)(null,(e=>({instanceActions:nh({setInstanceName:Rv,refresh:vb,detach:jb,getInstallationsRemoveConfiguration:Bb,remove:xb},e),addErrorMessage:t=>e(jp(t))})))((({installation:e,installation:{features:{php:t,updates:n}},instanceActions:{setInstanceName:s,refresh:i,remove:a,detach:r},addErrorMessage:o,domainInstallationsIds:l,onChangeInstallation:c,domainId:u})=>{const[d,p]=(0,U.useState)(!1),[h,m]=(0,U.useState)(!1),[f,g]=(0,U.useState)(!1),[b,v]=(0,U.useState)(void 0),[y,_]=(0,U.useState)(!1),[x,S]=(0,U.useState)(!1),[w,k]=(0,U.useState)(!1),[j,T]=(0,U.useState)(void 0),[C,D]=(0,U.useState)(!1),[P,I]=(0,U.useState)(!1),[O,M]=(0,U.useState)(!1),[A,E]=(0,U.useState)(!1),[R,N]=(0,U.useState)(!1),[F,Y]=(0,U.useState)(!1),[B,H]=(0,U.useState)(!1),[V,$]=(0,U.useState)(!1),W=(0,L.jsxs)(L.Fragment,{children:[t.eoled&&(0,L.jsx)(AU,{installation:e,onOpenSmartPhpUpdatesDrawer:()=>I(!0)}),n.availableVersion&&(0,L.jsx)(EU,{})]}),z=(0,L.jsx)(sH,{installationId:e.id,installationsIds:l,domainId:u,onChangeInstallation:c});return(0,L.jsxs)(Pm,{children:[(0,L.jsx)(fH,{installation:e,onAddErrorMessage:o,onCacheRefresh:()=>(M(!0),void i(e.id).catch((()=>{})).finally((()=>{M(!1)}))),onDisable:()=>M(!0),onEnable:()=>M(!1),onOpenActionLogDrawer:()=>p(!0),onOpenBackupDrawer:()=>m(!0),onOpenCheckWpIntegrityDialog:()=>E(!0),onOpenCloneDrawer:()=>S(!0),onOpenDetachDialog:()=>N(!0),onOpenRemoveDialog:()=>Y(!0),onOpenSecurityDialog:(e,t)=>{v(t),g(!0)},onOpenSmartPhpUpdates:()=>I(!0),onOpenSyncDrawer:()=>_(!0),onOpenUpdates:e=>{T(e),k(!0)},onOpenVirtualPatchingUpsellDialog:()=>H(!0),onOpenVirtualPatchingLicenseInfoDrawer:()=>$(!0),onSetInstanceName:s,selector:z,statusMessages:W}),(0,L.jsx)(wU,{isOpen:d,installation:e,onCloseActionLogDrawer:()=>p(!1)}),(0,L.jsx)(_C,{installation:e,onClose:()=>m(!1),isOpen:h}),(0,L.jsx)(kD,{title:(0,L.jsx)(Ac,{content:"list-ui.instances.forms.security.drawerTitle"}),subtitle:e.displayTitle,installation:e,isOpen:f,onClose:()=>g(!1),activeTab:b,onOpenVirtualPatchingUpsellDialog:()=>H(!0)}),(0,L.jsx)(tA,{onClose:()=>k(!1),isUpdateSettingsFormOpen:C,onOpenUpdatesSettingsDialog:()=>D(!0),onCloseUpdatesSettingsDialog:()=>D(!1),installation:e,openUpdatesType:j,isOpen:w}),(0,L.jsx)(OF,{installation:e,isOpen:P,onClose:()=>I(!1)}),(0,L.jsx)(oF,{onClose:()=>_(!1),installation:e,isOpen:y}),(0,L.jsx)(yF,{onClose:()=>S(!1),installation:e,isOpen:x,showDomainOverviewLinkOnDone:!0}),(0,L.jsx)(MU,{isOpen:A,installation:e,onCloseCheckWordPressIntegrityDialog:()=>E(!1),onOpenBackupDrawer:()=>m(!0)}),(0,L.jsx)(QB,{isOpen:R,onClose:()=>N(!1),onDetach:()=>(M(!0),N(!1),void r([e.id]).then((()=>window.location.reload())).finally((()=>M(!1)))),installation:e}),(0,L.jsx)(JB,{installation:e,isOpen:F,onClose:()=>Y(!1),onRemove:t=>{return n=t,M(!0),void a([e.id],n).then((()=>window.location.reload())).catch((()=>{})).finally((()=>M(!1)));var n}}),(0,L.jsx)(nB,{installation:e,isOpen:B,onClose:()=>H(!1),onOpen:()=>H(!0),onOpenLicenseInfoDrawer:()=>$(!0),uatAction:km}),(0,L.jsx)(pB,{installation:e,isOpen:V,onOpenUpsellDialog:()=>H(!0),onClose:()=>$(!1)}),O&&(0,L.jsx)(It,{overlay:!0,backdrop:!0})]})})),bH=(0,so.$j)((e=>{var t;return{hireDeveloperFeatureShown:e.app.options.hireDeveloperFeature&&!!(null===(t=e.app.options.hireDeveloperFeatureSettings)||void 0===t?void 0:t.href)}}))((e=>{const{domainId:t,installation:n,hireDeveloperFeatureShown:s,baseClassName:i=`${gu}sidebar-section`}=e,a=(0,L.jsxs)(Ks,{className:`${i}-sectionItem`,children:[(0,L.jsx)(kn,{level:4,children:(0,L.jsx)(Ac,{content:"common.loginToWordpress"})}),(0,L.jsx)(UA,{installation:n,initialShowAdminSettingsDrawer:!1})]}),r=(0,L.jsx)(Ks,{className:`${i}-sectionItem`,children:(0,L.jsx)(WA,{installation:n})});return(0,L.jsxs)(vi,{baseClassName:i,children:[n.status.alive&&a,s&&r]},`sidebar-${t}-${n.id}`)})),vH=()=>{const e=Do(),[t,n]=(0,U.useState)(!1),[s,i]=(0,U.useState)(void 0);return(0,U.useEffect)((()=>{const t=new URLSearchParams(location.search),s=t.get(Eu),a=t.get(Uu);"install-wp"===s&&(a&&i(a),t.delete(Eu),t.delete(Uu),e.replace(Object.assign(Object.assign({},location),{search:t.toString()}),{}),n(!0))}),[e,n]),(0,L.jsx)(jY,{isOpen:t,onClose:()=>n(!1),selectedDomain:s,redirectToDomainOverviewOnDone:!0})};const yH=To((0,so.$j)((e=>({urls:e.app.urls,installations:e.instances.installations,selectedInstanceId:e.instances.selectedInstanceId,domainsInstallationsIds:e.instances.domainsInstallationsIds})),(e=>({addErrorMessage:t=>e(jp(t)),setSelectedInstanceId:t=>e(Kv(t))})))((e=>{var{baseClassName:t=`${gu}app-container`,urls:n,domainsInstallationsIds:s,installations:i,selectedInstanceId:a,setSelectedInstanceId:r}=e;!function(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(s=Object.getOwnPropertySymbols(e);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(e,s[i])&&(n[s[i]]=e[s[i]])}}(e,["baseClassName","urls","domainsInstallationsIds","installations","selectedInstanceId","setSelectedInstanceId"]);const[o,l]=(0,U.useState)({}),c=(()=>{const[e,t]=(0,U.useState)({});return(0,U.useEffect)((()=>{const n=setInterval((()=>{window.wpModePlaceholders&&window.wpModePlaceholders!==e&&t(window.wpModePlaceholders)}),500);return()=>{clearInterval(n)}}),[e]),e})(),u=Co(yo).location,d=Do();(0,U.useEffect)((()=>{Qu(n.apiUrl),ed(jp),td(null),vp(n.restApiUrl,jp,!0)}),[n]),(0,U.useEffect)((()=>{const e=((e,t)=>{const n=new URLSearchParams(e.search),s=n.get("installationId");return s?(n.delete("installationId"),t.replace(Object.assign(Object.assign({},e),{search:n.toString()}),{}),s?parseInt(s,10):null):null})(u,d);e&&e!==a&&r(e)}),[u,d,a,r]),(0,U.useEffect)((()=>{const e={};for(const t in s)if(a&&s[t].some((e=>e===a)))e[t]=a,r(null);else if(!o.hasOwnProperty(t)){const[n]=s[t];e[t]=n}Object.keys(e).length>0&&l(Object.assign(Object.assign({},o),e))}),[o,s,a,r]);const p=(0,U.useMemo)((()=>{const e=(e,t)=>r(t),t=[];for(const n in c){const a=null==i?void 0:i.find((e=>e.id===o[n]));if(!a)continue;const r=c[n].tab;r&&t.push((0,M.createPortal)((0,L.jsx)(gH,{domainId:parseInt(n),installation:a,onChangeInstallation:e,domainInstallationsIds:s[n]}),r,`tab-domain-${n}-installation-${a.id}`));const l=c[n].sidebar;l&&t.push((0,M.createPortal)((0,L.jsx)(bH,{installation:a,domainId:parseInt(n)}),l,`sidebar-domain-${n}-installation-${a.id}`))}return t}),[c,o,i,s,r]);return(0,L.jsxs)("div",{className:t,children:[(0,L.jsx)(VL,{}),p,(0,L.jsx)(Jy,{}),(0,L.jsx)(vH,{})]})}))),_H=e=>(0,L.jsxs)(Pm,{children:[(0,L.jsx)(tl,{history:e,children:(0,L.jsx)(wB,{})}),!1]}),xH=({store:e,data:t,history:n,container:s})=>{(0,M.render)((0,L.jsx)(so.zt,{store:e,children:(0,L.jsx)(jB,{children:(0,L.jsx)(Lc,{messages:t.locale,localeCode:t.localeCode,parameters:t.localizationVariables,children:_H(n)})})}),s)},SH=()=>{const e=document.getElementById("main"),t=document.createElement("div");if(t.classList.add(xu),t.textContent="Loading...",!e)throw Error("WP Toolkit initialization error: main container does not exist");return e.appendChild(t),t},wH=e=>((e,t)=>{const n=KB(e,t),s=SH();xH({store:n,data:e,history:t,container:s})})(e,O({basename:e.urls.baseUrl})),kH=e=>((e,t)=>{const n=KB(e,t),s=(e=>{const t=document.getElementById("plesk-root"),n=document.getElementsByClassName(xu).item(0);n&&((0,M.unmountComponentAtNode)(n),n.remove());const s=document.getElementById("main"),i=document.createElement("div");if(i.classList.add(xu),!s||!t)throw Error("WP Toolkit initialization error: main container does not exist");s.appendChild(i);const a=new MutationObserver(((e,t)=>{e.forEach((e=>{var n;null===(n=e.removedNodes)||void 0===n||n.forEach((e=>{(e.isEqualNode(i)||e.contains(i))&&((0,M.unmountComponentAtNode)(i),t.disconnect())}))}))}));return a.observe(t,{childList:!0,subtree:!0}),i})();(({store:e,data:t,history:n,container:s})=>{(0,M.render)((0,L.jsx)(so.zt,{store:e,children:(0,L.jsx)(jB,{children:(0,L.jsx)(Lc,{messages:t.locale,localeCode:t.localeCode,parameters:t.localizationVariables,children:(0,L.jsx)(Pm,{children:(0,L.jsx)(tl,{history:n,children:(0,L.jsx)(ko,{path:"/:params*",children:(0,L.jsx)(yH,{})})})})})})}),s)})({store:n,data:e,history:t,container:s})})(e,O({basename:void 0})),jH=e=>((e,t)=>{const n=SH();Wp(e.urls.apiUrl).then((s=>{s=XB(s,e);const i=KB(s,t);xH({store:i,data:s,history:t,container:n})})).catch((e=>(0,M.render)((0,L.jsx)(ge,{intent:"danger",children:e.toString()}),n)))})(e,O({}))})(),wptMain=o})();