tocco-widget-bundle 0.1.136 → 0.1.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changelog.md +6 -0
- package/dist/address-update.js +2 -2
- package/dist/chunk-240.ddd55d12919cde4bec6f.js +1 -0
- package/dist/{chunk-378.fb19c6b5122e47f98f27.js → chunk-378.e853304f556027cc4330.js} +1 -1
- package/dist/chunk-695.52ee2ba9d026de490861.js +6 -0
- package/dist/{chunk-actions.73f0e33975e3b6fd192d.js → chunk-actions.05047e3d9848caaf5e11.js} +1 -1
- package/dist/{chunk-vendor-icons.c2f2ad0745bfb61ba18a.js → chunk-vendor-icons.f252c14e8d0046892a6a.js} +1 -1
- package/dist/docs-browser.js +7 -7
- package/dist/entity-browser.js +6 -6
- package/dist/entity-dms.js +7 -7
- package/dist/evaluation-execution-participation.js +6 -6
- package/dist/event-registration.js +2 -2
- package/dist/job-application.js +6 -6
- package/dist/login.js +2 -2
- package/dist/mailing-list.js +2 -2
- package/dist/password-update.js +2 -2
- package/dist/personal-dms.js +7 -7
- package/dist/public-dms.js +7 -7
- package/dist/sso-login.js +1 -1
- package/dist/stint-auction.js +2 -2
- package/dist/user-availability.js +2 -2
- package/dist/user-grades.js +2 -2
- package/dist/user-menu.js +1 -1
- package/dist/wage-view.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-186.f9455e9baa2e3b9e8470.js +0 -6
- package/dist/chunk-240.7d6dd2bca25bc65b679c.js +0 -1
package/dist/password-update.js
CHANGED
|
@@ -49,9 +49,9 @@ e.exports=function(){"use strict";function e(t){return e="function"==typeof Symb
|
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the MIT license found in the
|
|
51
51
|
* LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/var r=n(1024),o=n(61688);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=o.useSyncExternalStore,c=r.useRef,s=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var p=c(null);if(null===p.current){var f={hasValue:!1,value:null};p.current=f}else f=p.current;p=u((function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return c=t}return c=e}if(t=c,a(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,c=n)}var i,c,s=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var d=i(e,p[0],p[1]);return s((function(){f.hasValue=!0,f.value=d}),[d]),l(d),d}},61688:(e,t,n)=>{"use strict";e.exports=n(53250)},52798:(e,t,n)=>{"use strict";e.exports=n(50139)},28721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16);function i(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(a)}const c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).slice(1));function s(e,t=0){return(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase()}const u=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return s(o)}},1024:e=>{"use strict";e.exports=t},30314:t=>{"use strict";t.exports=e},71298:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},38088:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},87462:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},31599:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},28549:(e,t,n)=>{"use strict";function r(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:()=>r})},2717:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},33417:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(28549);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},32924:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:()=>r})},1972:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78001);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||(0,r.Z)(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.")}()}},62360:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}n.d(t,{Z:()=>r})},78001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(31599);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(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)?(0,r.Z)(e,t):void 0}}}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=o,i.amdD=function(){throw new Error("define cannot be used indirect")},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>885===e?"chunk-ckeditor.f485d9d93075327af074.js":"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons",877:"vendor-libphonenumber-js"}[e]||e)+"."+{85:"db1126e5f72da427d1ea",198:"428fb8a2ead9aced75bc",560:"921a930bee3a737bee5c",608:"3f5c2d9d74c51e74c5b0",614:"c2f2ad0745bfb61ba18a",759:"3e178a7310a92d3020c3",817:"2b608f431339a863492a",877:"ee24f52222afe086ba7e"}[e]+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="tocco-:",i.l=(e,t,o,a)=>{if(n[e])n[e].push(t);else{var c,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var p=u[l];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==r+o){c=p;break}}c||(s=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",r+o),c.src=e),n[e]=[t];var f=(t,r)=>{c.onerror=c.onload=null,clearTimeout(d);var o=n[e];if(delete n[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=f.bind(null,c.onerror),c.onload=f.bind(null,c.onload),s&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=201,i.p="/",(()=>{var e={201:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var a=i.p+i.u(t),c=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",c.name="ChunkLoadError",c.type=o,c.request=a,r[1](c)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,c,s]=n,u=0;if(a.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(s)s(i)}for(t&&t(n);u<a.length;u++)o=a[u],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunktocco_=self.webpackChunktocco_||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0;var c={};return(()=>{"use strict";i.r(c);var e=i(6966),t=i(59713),n=i.n(t),r=i(45697),o=i.n(r),a=i(19743),s=i(19241),u=i(23369),l=i(65378),p=i(74806),f=i(50558),d="login/INITIALIZE",h="login/LOGIN",m="login/REQUEST_PASSWORD",g="login/CHECK_USERNAME",y=function(e,t,n,r){return{type:h,payload:{username:e,password:t,captchaToken:n,userCode:r}}},v=i(28655),b=i.n(v),w=i(1024),O=i.n(w),x=i(38205),k="USERNAME_FORM",_="LOGIN_FORM",S="PASSWORD_REQUEST",E="TWOSTEPLOGIN",A="PASSWORD_UPDATE",P="TWOSTEPLOGIN_ACTIVATION",j="login/CHANGE_PAGE",C="login/SET_ENTRY_PAGE",D="login/SET_USERNAME",T="login/SET_PASSWORD",R="login/SET_CAPTCHA_KEY",I=function(e){return{type:C,payload:{entryPage:e}}},M=function(e){return{type:j,payload:{currentPage:e}}},N=function(e){return{type:D,payload:{username:e}}},Z=function(e){return{type:T,payload:{password:e}}},B=i(48926),L=i.n(B),F=i(63038),U=i.n(F),H=i(87757),W=i.n(H),z=i(99860),V=i.n(z);function Y(){return Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(this,arguments)}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var G=function(e){var t,n;function r(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(q(t)),t.handleErrored=t.handleErrored.bind(q(t)),t.handleChange=t.handleChange.bind(q(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(q(t)),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.getValue=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this.props.grecaptcha.getResponse(this._widgetId):null},o.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},o.execute=function(){var e=this.props.grecaptcha;if(e&&void 0!==this._widgetId)return e.execute(this._widgetId);this._executeRequested=!0},o.executeAsync=function(){var e=this;return new Promise((function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()}))},o.reset=function(){this.props.grecaptcha&&void 0!==this._widgetId&&this.props.grecaptcha.reset(this._widgetId)},o.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},o.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},o.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},o.explicitRender=function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&void 0===this._widgetId){var e=document.createElement("div");this._widgetId=this.props.grecaptcha.render(e,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(e)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},o.componentDidMount=function(){this.explicitRender()},o.componentDidUpdate=function(){this.explicitRender()},o.componentWillUnmount=function(){void 0!==this._widgetId&&(this.delayOfCaptchaIframeRemoving(),this.reset())},o.delayOfCaptchaIframeRemoving=function(){var e=document.createElement("div");for(document.body.appendChild(e),e.style.display="none";this.captcha.firstChild;)e.appendChild(this.captcha.firstChild);setTimeout((function(){document.body.removeChild(e)}),5e3)},o.handleRecaptchaRef=function(e){this.captcha=e},o.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]));return O().createElement("div",Y({},t,{ref:this.handleRecaptchaRef}))},r}(O().Component);G.displayName="ReCAPTCHA",G.propTypes={sitekey:V().string.isRequired,onChange:V().func,grecaptcha:V().object,theme:V().oneOf(["dark","light"]),type:V().oneOf(["image","audio"]),tabindex:V().number,onExpired:V().func,onErrored:V().func,size:V().oneOf(["compact","normal","invisible"]),stoken:V().string,hl:V().string,badge:V().oneOf(["bottomright","bottomleft","inline"])},G.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var K=i(9657),$=i.n(K),X=i(8679),Q=i.n(X);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(this,arguments)}var ee={},te=0;var ne="onloadcallback";const re=function(e,t){return t=t||{},function(n){var r=n.displayName||n.name||"Component",o=function(r){var o,a;function i(e,t){var n;return(n=r.call(this,e,t)||this).state={},n.__scriptURL="",n}a=r,(o=i).prototype=Object.create(a.prototype),o.prototype.constructor=o,o.__proto__=a;var c=i.prototype;return c.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+te++),this.__scriptLoaderID},c.setupScriptURL=function(){return this.__scriptURL="function"==typeof e?e():e,this.__scriptURL},c.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},c.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=ee[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var n in e.observers)e.observers[n](e);delete window[t.callbackName]},c.componentDidMount=function(){var e=this,n=this.setupScriptURL(),r=this.asyncScriptLoaderGetScriptLoaderID(),o=t,a=o.globalName,i=o.callbackName,c=o.scriptId;if(a&&void 0!==window[a]&&(ee[n]={loaded:!0,observers:{}}),ee[n]){var s=ee[n];return s&&(s.loaded||s.errored)?void this.asyncScriptLoaderHandleLoad(s):void(s.observers[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var u={};u[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)},ee[n]={loaded:!1,observers:u};var l=document.createElement("script");for(var p in l.src=n,l.async=!0,t.attributes)l.setAttribute(p,t.attributes[p]);c&&(l.id=c);var f=function(e){if(ee[n]){var t=ee[n].observers;for(var r in t)e(t[r])&&delete t[r]}};i&&"undefined"!=typeof window&&(window[i]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),l.onload=function(){var e=ee[n];e&&(e.loaded=!0,f((function(t){return!i&&(t(e),!0)})))},l.onerror=function(){var e=ee[n];e&&(e.errored=!0,f((function(t){return t(e),!0})))},document.body.appendChild(l)},c.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===t.removeOnUnmount)for(var n=document.getElementsByTagName("script"),r=0;r<n.length;r+=1)n[r].src.indexOf(e)>-1&&n[r].parentNode&&n[r].parentNode.removeChild(n[r]);var o=ee[e];o&&(delete o.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete ee[e])},c.render=function(){var e=t.globalName,r=this.props,o=(r.asyncScriptOnLoad,r.forwardedRef),a=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(a[e]=void 0!==window[e]?window[e]:void 0),a.ref=o,(0,w.createElement)(n,a)},i}(w.Component),a=(0,w.forwardRef)((function(e,t){return(0,w.createElement)(o,J({},e,{forwardedRef:t}))}));return a.displayName="AsyncScriptLoader("+r+")",a.propTypes={asyncScriptOnLoad:$().func},Q()(a,n)}}((function(){return"https://"+(("undefined"!=typeof window&&window.recaptchaOptions||{}).useRecaptchaNet?"recaptcha.net":"www.google.com")+"/recaptcha/api.js?onload="+ne+"&render=explicit"}),{callbackName:ne,globalName:"grecaptcha"})(G),oe=re;var ae=i(41505),ie=i.n(ae),ce=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue=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},le={outline:"none"},pe=function(e){function t(){var n,r;ce(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=ue(this,e.call.apply(e,[this].concat(a))),r.state={focused:!1},r._isMounted=!1,r._lastBlurEvent=null,r.ref=O().createRef(),r._onFocusIn=function(){r._isMounted&&r._lastBlurEvent&&r.isInsideNode(r.ref.current,r._lastBlurEvent.target)&&!r.isInsideNode(r.ref.current,document.activeElement)&&r.setState({focused:!1},(function(){document.removeEventListener("focusin",r._onFocusIn),r.props.onBlur(r._lastBlurEvent)}))},r.onFocus=function(e){var t=r.props.onFocus;r.state.focused||r.setState({focused:!0},(function(){document.addEventListener("focusin",r._onFocusIn),t(e)}))},r.onBlur=function(e){e.persist(),r._lastBlurEvent=e},r.isInsideNode=function(e,t){return null!=e&&e.contains(t)},ue(r,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),t.prototype.componentDidMount=function(){null!=document&&document.querySelector("body").setAttribute("tabindex","-1"),this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1,document.removeEventListener("focusin",this._onFocusIn)},t.prototype.focus=function(){var e=this.ref.current;null!=e&&"function"==typeof e.focus&&e.focus()},t.prototype.render=function(){var e=this.props.children,t=this.state.focused,n={onFocus:this.onFocus,onBlur:this.onBlur};return"function"==typeof e?O().cloneElement(e({focused:t,getRef:this.ref}),n):O().createElement("div",se({ref:this.ref,style:le},n),e)},t}(O().Component);pe.propTypes={children:ie().oneOfType([ie().node,ie().func]).isRequired,onBlur:ie().func,onFocus:ie().func},pe.defaultProps={onBlur:function(){},onFocus:function(){}};const fe=pe;var de,he,me,ge,ye=i(70696),ve=i(10535),be=i(78958),we=i(319),Oe=i.n(we),xe=i(37188),ke=i(24875),_e=(de={},n()(de,be.Z.condition.BASE,"inherit"),n()(de,be.Z.condition.DANGER,ke.FS.color("signal.danger")),n()(de,be.Z.condition.SUCCESS,ke.FS.color("signal.success")),n()(de,be.Z.condition.WARNING,ke.FS.color("signal.warning")),n()(de,be.Z.condition.INFO,ke.FS.color("signal.info")),de),Se=(0,x.ZP)(xe.hc).withConfig({displayName:"StyledSignalList"})(he||(he=b()(["\n && {\n list-style-type: none;\n }\n"]))),Ee=x.ZP.span.withConfig({displayName:"StyledSignalListIcon"})(me||(me=b()(["\n position: absolute;\n left: -1.6rem;\n text-align: left;\n"]))),Ae=(0,x.ZP)(xe.EF).withConfig({displayName:"StyledSignalListItem"})(ge||(ge=b()(["\n && {\n color: ",";\n position: relative;\n padding: 0;\n }\n"])),(function(e){return function(e){return _e[e.condition]||"inherit"}(e)})),Pe=i(85893);const je=function(e){return(0,Pe.jsx)(Se,{as:"ul",children:O().Children.map(e.children,(function(e){return O().cloneElement(e)}))})};var Ce,De,Te=i(88162),Re=(Ce={},n()(Ce,be.Z.condition.BASE,!1),n()(Ce,be.Z.condition.DANGER,"times"),n()(Ce,be.Z.condition.SUCCESS,"check"),n()(Ce,be.Z.condition.WARNING,"exclamation-triangle"),n()(Ce,be.Z.condition.INFO,"info"),Ce),Ie=function(e){var t=Re[e.condition];return t?(0,Pe.jsx)(Te.Z,{icon:t,position:be.Z.position.SOLE}):De||(De=(0,Pe.jsx)("i",{children:"•"}))},Me=function(e){return(0,Pe.jsxs)(Ae,{condition:e.condition,children:[(0,Pe.jsx)(Ee,{children:Ie(e)}),e.label,O().Children.map(e.children,(function(e){return O().cloneElement(e)}))]})};Me.defaultProps={condition:be.Z.condition.BASE};const Ne={List:je,Item:Me};const Ze=function(e){if(!e.error)return null;var t=[];return Object.keys(e.error).forEach((function(n){t.push.apply(t,Oe()(e.error[n]))})),(0,Pe.jsx)(Ne.List,{children:t.map((function(e,t){return(0,Pe.jsx)(Ne.Item,{condition:"danger",label:e},t)}))})};var Be=i(87585);function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ue=function(e){var t,n,r,o,a=e.children,i=e.description,c=e.dirty,s=e.isDisplay,l=e.error,p=e.hasValue,f=e.id,d=e.label,h=e.mandatory,m=e.mandatoryTitle,g=e.immutable,y=e.touched,v=e.signal,b=!g&&y&&l&&Object.keys(l).length>0,w="".concat(ye.Z.adjustedHTMLString(d)).concat(h&&m?", ".concat(m):""),O=v||function(e,t,n,r){return t?be.Z.condition.DANGER:e?be.Z.condition.INFO:n&&!r?be.Z.condition.WARNING:void 0}(c,b,h,p),x={__html:"".concat(ve.Z.sanitizeHtml(d)).concat(h?" *":"")},k=!s&&!g&&{htmlFor:f},_=u.Z.getEmbedType(),S=["admin","legacy-admin"].includes(_);return(0,Pe.jsx)(fe,{children:function(e){var u=e.getRef;return(0,Pe.jsx)(Be.T3,{children:(0,Pe.jsxs)(Be.QZ,{ref:u,label:d,isAdmin:S,children:[d&&(0,Pe.jsx)(Be.yr,Fe(Fe({},k),{},{hasValue:p,dirty:c,title:w,immutable:g,isDisplay:s,signal:O,isAdmin:S,children:t||(t=(0,Pe.jsx)("span",{dangerouslySetInnerHTML:x}))})),(0,Pe.jsxs)(Be.m9,{isAdmin:S,children:[n||(n=(0,Pe.jsx)(Be.if,{hasValue:p,immutable:g,isDisplay:s,signal:O,children:a})),b&&(r||(r=(0,Pe.jsx)(Be.gi,{children:(0,Pe.jsx)(Ze,{error:l})}))),i&&(o||(o=(0,Pe.jsx)(Be.Mp,{children:i})))]})]})})}})};var He=i(35997);const We=(0,p.ZP)((function(e){var t,n=e.message,r=e.intl;return n&&n.text?(0,Pe.jsx)(Ne.List,{children:(0,Pe.jsx)(Ne.Item,{condition:n.negative?"danger":"base",label:(t=n.text,r.formatMessage({id:t}))})}):null})),ze=We;var Ve,Ye=i(6479),qe=i.n(Ye),Ge=i(65035),Ke=i(7281),$e=i(88601),Xe=(0,x.ZP)(Ge.Z).withConfig({displayName:"StyledLoginButton"})(Ve||(Ve=b()(["\n &&& {\n font-size: ",";\n border-radius: ",";\n display: flex;\n justify-content: center;\n padding: 1.25rem 0;\n width: 100%;\n margin-top: 20px;\n margin-bottom: 10px;\n\n &:not(:last-child) {\n margin-right: 0;\n }\n }\n"])),Ke.Z.font(1.3),$e.Z.radii("buttonLarge")),Qe=["disabled","pending","label"];function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const et=function(e){var t=e.disabled,r=e.pending,o=e.label,a=qe()(e,Qe);return(0,Pe.jsx)(Xe,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({disabled:t,pending:r,label:o,ink:"primary",look:"raised",type:"submit"},a))},tt=et;var nt=i(44012),rt=i(34206);const ot=function(e){var t=e.title,n=e.subtitle;return(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsx)(rt.ZP.H5,{children:(0,Pe.jsx)(nt.Z,{id:t})}),n&&(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:n})})]})},at=ot;const it=function(e){var t=(0,w.useState)(!1),n=U()(t,2),r=n[0],o=n[1];return[r,{onAnimationStart:function(e){"onAutoFillStart"===e.animationName&&o(!0)},onChange:function(t){e(t.target.value),o(!1)}}]};var ct,st,ut,lt,pt,ft,dt,ht=i(30759),mt=(0,x.iv)(ct||(ct=b()(["\n align-items: center;\n cursor: ",";\n display: flex;\n"])),(function(e){return e.immutable?"not-allowed":"default"})),gt=x.ZP.label.withConfig({displayName:"StyledEditableWrapper"})(st||(st=b()(["\n &&& {\n margin: 0; /* reset Bootstrap and Ext JS */\n padding: 0; /* reset Ext JS */\n ","\n }\n"])),mt),yt=(0,x.iv)(ut||(ut=b()(["\n background-color: transparent;\n border: 0;\n cursor: ",";\n flex-grow: 1;\n min-height: 2.6rem;\n min-width: 0;\n outline: 0;\n padding: 0;\n ","\n &::-ms-clear {\n display: none;\n }\n\n &::-webkit-clear-button {\n display: none;\n }\n\n &::-webkit-inner-spin-button {\n display: none;\n }\n\n &[type='number'] {\n appearance: textfield;\n }\n\n &[type='search'] {\n appearance: none;\n }\n\n &:disabled {\n -webkit-text-fill-color: ","; // Safari fix\n opacity: 1; // iOS fix\n }\n\n /* remove indicators */\n &[type='date'],\n &[type='datetime-local'],\n &[type='month'],\n &[type='time'],\n &[type='week'] {\n appearance: none;\n display: flex;\n\n /* reset margin on smaller screens */\n ::-webkit-date-and-time-value {\n ","\n }\n }\n\n // allow pointer event only on touch devices\n @media (pointer: coarse) {\n pointer-events: ",";\n }\n"])),(function(e){return e.immutable?"not-allowed":"default"}),(function(){return(0,ht.Z)({color:ke.FS.color("text")})}),ke.FS.color("text"),(function(e){return e.immutable&&"margin: unset;"}),(function(e){return e.immutable?"none":"auto"})),vt=(0,x.iv)(lt||(lt=b()(["\n display: flex;\n align-items: center;\n"]))),bt=x.ZP.div.withConfig({displayName:"StyledEditableControl"})(pt||(pt=b()(["\n &&& {\n ","\n }\n"])),vt),wt=x.ZP.span.withConfig({displayName:"StyledEditableValue"})(ft||(ft=b()(["\n width: 100%;\n\n && {\n //url\n [type='url'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //url\n [type='tel'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //date\n .date-edit {\n .input-group-addon {\n cursor: pointer;\n }\n\n input {\n z-index: 0;\n }\n\n &.disabled {\n input {\n cursor: not-allowed;\n }\n }\n\n .right-addon {\n position: relative;\n }\n\n .right-addon input {\n padding-right: 30px;\n }\n\n .reset {\n position: absolute;\n padding-right: 10px;\n padding-top: 5px;\n right: 0;\n color: #999;\n font-size: 18px;\n font-style: normal;\n cursor: pointer;\n }\n\n .reset:hover {\n color: ",";\n }\n }\n }\n"])),ke.FS.color("signal.danger")),Ot=i(58129);const xt=x.ZP.div.withConfig({displayName:"StyledButtonGroup"})(dt||(dt=b()(["\n display: flex;\n\n &&& > "," {\n :not(:first-child) {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n :not(:last-child) {\n margin-right: 0;\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n"])),Ot.Z);var kt,_t,St,Et,At,Pt=x.ZP.input.withConfig({displayName:"StyledLoginFormInput"})(kt||(kt=b()(["\n /* stylelint-disable-next-line block-no-empty */\n @keyframes onAutoFillStart {\n from {\n }\n }\n\n &&&& {\n ","\n transition: background-color 50000s, color 50000s, filter 50000s;\n\n &:-webkit-autofill {\n animation-duration: 50000s;\n animation-name: onAutoFillStart;\n }\n padding-top: 0.7rem;\n padding-bottom: 0.7rem;\n }\n"])),yt),jt=x.ZP.div.withConfig({displayName:"StyledLoginFormInputWrapper"})(_t||(_t=b()(["\n &&& {\n ","\n }\n"])),mt),Ct=(0,x.ZP)(Ge.Z).withConfig({displayName:"StyledTransparentButton"})(St||(St=b()(["\n &&& {\n margin-right: 0;\n background-color: transparent;\n color: ",";\n padding: 1.25rem 0;\n width: 100%;\n justify-content: center;\n\n &:hover {\n background-color: transparent;\n }\n }\n"])),$e.Z.color("primary")),Dt=x.ZP.div.withConfig({displayName:"StyledLoginFormWrapper"})(Et||(Et=b()(["\n "," {\n margin-top: 1.8rem;\n width: auto;\n flex-direction: column;\n\n "," {\n flex-grow: 1;\n }\n }\n"])),xt,Ot.Z);function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const It=function(e){var t=e.captchaKey,n=e.changePage,r=e.intl,o=e.login,a=e.loginPending,i=e.message,c=e.password,s=e.recaptchaActivated,u=e.setPassword,l=e.setUsername,p=e.showTitle,f=e.username,d=e.entryPage,h=it(l),m=U()(h,2),g=m[0],y=m[1],v=it(u),b=U()(v,2),O=b[0],x=b[1],_=(0,w.useRef)(),E=d===k,A=function(e){return r.formatMessage({id:e})},P=He.Z.usePrevious(s),j=(0,w.useCallback)(function(){var e=L()(W().mark((function e(t){var n;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.preventDefault(),n=null,!s){e.next=7;break}return e.next=5,_.current.executeAsync();case 5:n=e.sent,_.current.reset();case 7:o(f,c,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[o,f,c,s]);(0,w.useEffect)((function(){s&&!P&&j()}),[s,P,j]);var C=!!f,D=!C;return(0,Pe.jsxs)(Dt,{children:[p&&(At||(At=(0,Pe.jsx)(at,{title:"client.login.form.title",subtitle:"client.login.form.introduction"}))),(0,Pe.jsxs)("form",{onSubmit:j,children:[(0,Pe.jsx)(Ue,{hasValue:!!f||g,id:"login-username",label:A("client.login.form.userPlaceholder"),immutable:E,children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,Rt({autoFocus:D,name:"user","data-cy":"login-form_user-input",required:!0,type:"text",value:f,disabled:E,onFocus:function(e){return e.target.select()}},y))})}),(0,Pe.jsx)(Ue,{hasValue:!!c||O,id:"login-password",label:A("client.login.form.passwordPlaceholder"),children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,Rt({autoFocus:C,name:"password","data-cy":"login-form_password-input",required:!0,type:"password",value:c,onFocus:function(e){return e.target.select()}},x))})}),(0,Pe.jsx)(ze,{message:i}),t&&s&&(0,Pe.jsx)(oe,{ref:_,badge:"bottomright",size:"invisible",sitekey:t,hl:r.locale}),(0,Pe.jsx)(tt,{disabled:a||""===f&&!g||""===c&&!O,label:A("client.login.form.button"),pending:a,"data-cy":"login-form_login-button"}),(0,Pe.jsx)(Ct,{label:A("client.login.form.forgotLink"),onClick:function(){return n(S)},"data-cy":"login-form_request-button"}),E&&(0,Pe.jsx)(Ct,{label:A("client.login.form.backLink"),onClick:function(){return n(k)}})]})]})};var Mt={changePage:M,setUsername:N,setPassword:Z,login:y};const Nt=(0,f.connect)((function(e){return{username:e.login.username,password:e.login.password,message:e.loginForm.message,loginPending:e.loginForm.loginPending,captchaKey:e.login.captchaKey,recaptchaActivated:e.loginForm.recaptchaActivated,entryPage:e.login.entryPage}}),Mt)((0,p.ZP)(It));var Zt,Bt;const Lt=function(e){var t=e.entryPage,n=e.username,r=e.requestPassword,o=e.intl,a=e.showTitle,i=e.pending,c=e.changePage,s=(0,w.useState)(n||""),u=U()(s,2),l=u[0],p=u[1],f=t===k,d=function(e){return o.formatMessage({id:e})};return(0,Pe.jsxs)(Dt,{children:[a&&(Zt||(Zt=(0,Pe.jsx)(at,{title:"client.login.passwordRequest.title"}))),!f&&(Bt||(Bt=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.login.passwordRequest.introduction"})}))),(0,Pe.jsxs)("form",{onSubmit:function(e){e.preventDefault(),r(l)},children:[(0,Pe.jsx)(Ue,{hasValue:Boolean(l),id:"login-username",label:d("client.login.form.userPlaceholder"),immutable:f,children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,{name:"user",onChange:function(e){p(e.target.value)},required:!0,type:"text",value:l,disabled:f,"data-cy":"password-request_input"})})}),(0,Pe.jsx)(tt,{disabled:!l||i,label:d("client.login.passwordRequest.button"),pending:i,"data-cy":"password-request_submit-button"}),(0,Pe.jsx)(Ct,{disabled:i,label:d("client.login.passwordRequest.abortButton"),name:"abort",onClick:function(){return c(_)},"data-cy":"password-request_abort-button"})]})]})};var Ft={changePage:M,requestPassword:function(e){return{type:m,payload:{username:e}}}};const Ut=(0,f.connect)((function(e){return{username:e.login.username,pending:e.loginForm.loginPending,entryPage:e.login.entryPage}}),Ft)((0,p.ZP)(Lt));var Ht="INITIALIZED",Wt="PasswordUpdateDialog/UPDATE_OLD_PASSWORD",zt="PasswordUpdateDialog/UPDATE_NEW_PASSWORD",Vt="PasswordUpdateDialog/SET_NEW_PASSWORD",Yt="PasswordUpdateDialog/SET_NEW_PASSWORD_VALIDATION_ERRORS",qt="PasswordUpdateDialog/UPDATE_NEW_PASSWORD_REPEAT",Gt="PasswordUpdateDialog/SAVE_PASSWORD",Kt="PasswordUpdateDialog/SAVE_PASSWORD_SUCCESS",$t="PasswordUpdateDialog/SAVE_PASSWORD_FAILURE",Xt="PasswordUpdateDialog/VALIDATE",Qt="PasswordUpdateDialog/RESET_PASSWORD_UPDATED_FAILED",Jt=function(e){return{type:Wt,payload:{oldPassword:e}}},en=function(e){return{type:Yt,payload:{errors:e}}},tn=function(e,t){return{type:$t,payload:{errorCode:e,validationMessages:t}}},nn="PasswordUpdateDialog/FETCH_VALIDATION_RULES",rn="PasswordUpdateDialog/SET_VALIDATION_RULES",on=i(50258),an={INVALID_CREDENTIALS:"client.login.passwordUpdate.invalidCredentials",UNEXPECTED_ERROR:"client.login.passwordUpdate.unexpectedError"};const cn=function(e){return(0,Pe.jsx)(Ne.List,{children:(0,Pe.jsx)(Ne.Item,{condition:be.Z.condition.DANGER,children:(0,Pe.jsx)(nt.Z,{id:(t=e.errorCode,an[t]||"client.login.passwordUpdate.failure")})})});var t};const sn=function(e){return(0,Pe.jsx)(Ne.List,{children:e.rules.map((function(t,n){var r=null,o=t.message;if(e.errors){var a=e.errors[t.name];!0===a?r=be.Z.condition.DANGER:"string"==typeof a?(r=be.Z.condition.DANGER,o=a):r=be.Z.condition.SUCCESS}return(0,Pe.jsx)(Ne.Item,{condition:r,label:o},n)}))})},un=sn;var ln,pn,fn=x.ZP.input.attrs((function(e){return{type:"password"}})).withConfig({displayName:"StyledPasswordInput"})(ln||(ln=b()(["\n &&&& {\n ","\n }\n"])),yt),dn=x.ZP.div.withConfig({displayName:"StyledPasswordInputWrapper"})(pn||(pn=b()(["\n && {\n ","\n }\n"])),mt);const hn=function(e){return(0,Pe.jsx)(Ue,{hasValue:!!e.value,id:"".concat(e.name,"-input"),immutable:!0===e.readOnly,label:e.label,signal:e.value?void 0===e.valid?null:e.valid?be.Z.condition.SUCCESS:be.Z.condition.DANGER:null,children:(0,Pe.jsx)(dn,{immutable:!0===e.readOnly,children:(0,Pe.jsx)(fn,{id:"".concat(e.name,"-input"),value:e.value,onChange:function(t){return e.onChange(t.target.value)},disabled:!0===e.readOnly,immutable:!0===e.readOnly,onKeyDown:e.onKeyDown,autoFocus:e.autoFocus})})})};var mn;const gn=x.ZP.div(mn||(mn=b()(["\n "," {\n width: 100%;\n }\n"])),Ot.Z);var yn,vn,bn,wn,On;function xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xn(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _n=x.ZP.div.withConfig({displayName:"StyledValidationRulesWrapper"})(yn||(yn=b()(["\n margin: 1rem;\n"])));const Sn=function(e){var t=e.captchaKey,n=e.fetchValidationRules,r=e.forcedUpdate,o=e.initialized,a=e.intl,i=e.password,c=e.savePassword,s=e.showOldPasswordField,u=e.showTitle,l=e.updateNewPassword,p=e.updateNewPasswordRepeat,f=e.updateOldPassword,d=e.validationRules,h=(0,w.useRef)();(0,w.useEffect)((function(){n()}),[n]),(0,w.useEffect)((function(){d&&o()}),[d,o]);var m=function(){var e=L()(W().mark((function e(t){var n;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),!0!==g()){e.next=7;break}return e.next=4,h.current.executeAsync();case 4:n=e.sent,h.current.reset(),c(n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){return!!i.newPasswordRepeat&&(i.newPassword===i.newPasswordRepeat&&!i.passwordUpdatePending)},y=function(e){return a.formatMessage({id:e})};if(!d)return vn||(vn=(0,Pe.jsx)(on.Z,{}));var v=i.passwordUpdatePending,b=!i.oldPassword&&s||i.passwordUpdatePending,O=!i.newPassword||i.passwordUpdatePending||i.newPasswordValidationErrors&&Object.keys(i.newPasswordValidationErrors).length>0;return(0,Pe.jsxs)(gn,{children:[u&&(bn||(bn=(0,Pe.jsx)(at,{title:"client.login.passwordUpdate.title"}))),r&&(wn||(wn=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.login.passwordUpdate.introduction"})}))),(0,Pe.jsxs)("form",{onSubmit:m,children:[!0===s&&(0,Pe.jsx)(hn,kn({tabIndex:1,label:y("client.login.passwordUpdate.oldPassword"),name:"oldPassword",value:i.oldPassword,onChange:f,readOnly:v,autoFocus:!0},i.passwordUpdateFailed&&"INVALID_CREDENTIALS"===i.passwordUpdateErrorCode&&{valid:!1})),(0,Pe.jsx)(hn,{tabIndex:2,label:y("client.login.passwordUpdate.newPassword"),name:"newPassword",value:i.newPassword,onChange:l,readOnly:b,autoFocus:!0!==s,valid:!O}),(0,Pe.jsx)(_n,{children:(0,Pe.jsx)(un,{rules:d,errors:i.newPasswordValidationErrors,rulesNeutral:!i.newPassword})}),(0,Pe.jsx)(hn,{tabIndex:3,label:y("client.login.passwordUpdate.newPasswordRepeat"),name:"newPasswordRepeat",value:i.newPasswordRepeat,onChange:p,readOnly:O,valid:g()}),i.newPasswordRepeat&&i.newPassword!==i.newPasswordRepeat&&(On||(On=(0,Pe.jsx)(Ne.List,{children:(0,Pe.jsx)(Ne.Item,{condition:"danger",label:(0,Pe.jsx)(nt.Z,{id:"client.login.passwordUpdate.noMatch"})})}))),!0===i.passwordUpdateFailed&&(0,Pe.jsx)(cn,{errorCode:i.passwordUpdateErrorCode}),(0,Pe.jsx)(tt,{pending:i.passwordUpdatePending,disabled:!1===g(),label:y("client.login.passwordUpdate.saveButton")}),t&&(0,Pe.jsx)(oe,{ref:h,badge:"bottomright",size:"invisible",sitekey:t,hl:a.locale})]})]})};var En={updateOldPassword:Jt,updateNewPassword:function(e){return{type:zt,payload:{newPassword:e}}},updateNewPasswordRepeat:function(e){return{type:qt,payload:{newPasswordRepeat:e}}},fetchValidationRules:function(){return{type:nn}},savePassword:function(e){return{type:Gt,payload:{captchaToken:e}}},initialized:function(){return{type:Ht}}};const An=(0,f.connect)((function(e){return{password:e.passwordUpdate.password,validationRules:e.passwordUpdate.validationRules,showOldPasswordField:e.passwordUpdate.dialog.showOldPasswordField,forcedUpdate:e.passwordUpdate.dialog.forcedUpdate,captchaKey:e.login.captchaKey}}),En)((0,p.ZP)(Sn));var Pn,jn,Cn,Dn,Tn,Rn,In=i(30604),Mn="two-factor-connector/INITIALIZE",Nn="two-factor-connector/SET_TWO_STEP_ACTIVE",Zn="two-factor-connector/SET_SECRET",Bn="two-factor-connector/SET_USER_NAME",Ln="two-factor-connector/REQUEST_SECRET",Fn="two-factor-connector/GO_TO_SECRET_VERIFICATION",Un="two-factor-connector/GO_TO_START",Hn="two-factor-connector/GO_TO_SECRET",Wn="two-factor-connector/VERIFY_CODE",zn="root/SUCCESS",Vn="root/SET_SETUP_SUCCESSFUL",Yn="root/GO_TO_RESULT",qn=function(){return{type:Mn}},Gn=function(e){return{type:Nn,payload:{twoFactorActive:e}}},Kn=function(e){return{type:Zn,payload:{secret:e}}},$n=function(e){return{type:Bn,payload:{username:e}}},Xn=function(){return{type:Un}},Qn=function(e){return{type:Vn,payload:{setupSuccessful:e}}},Jn=i(83324),er=x.ZP.div.withConfig({displayName:"StyledButtonWrapper"})(Pn||(Pn=b()(["\n display: flex;\n justify-content: flex-end;\n margin-top: ",";\n\n > "," {\n margin-right: 0;\n }\n"])),Ke.Z.space(.5),Ot.Z),tr=x.ZP.div.withConfig({displayName:"StyledMessageWrapper"})(jn||(jn=b()(["\n display: grid;\n grid-template-columns: 9% 1fr;\n grid-column-gap: ",";\n"])),Ke.Z.space(-.5)),nr=x.ZP.span.withConfig({displayName:"StyledIconWrapper"})(Cn||(Cn=b()(["\n display: flex;\n align-items: center;\n color: ",";\n font-size: ",";\n\n > * {\n max-width: 100%;\n }\n"])),(function(e){return e.isSuccessful?ke.FS.color("signal.success"):ke.FS.color("signal.danger")}),Ke.Z.font(10)),rr=x.ZP.div.withConfig({displayName:"StyledTextWrapper"})(Dn||(Dn=b()(["\n display: flex;\n align-items: center;\n"])));const or=function(e){var t=e.success,n=e.goToStart,r=e.setupSuccessful,o=e.intl;(0,Jn.z)(t);var a=function(e){return o.formatMessage({id:e})};return r?(0,Pe.jsxs)(Pe.Fragment,{children:[Tn||(Tn=(0,Pe.jsxs)(tr,{children:[(0,Pe.jsx)(nr,{isSuccessful:!0,children:(0,Pe.jsx)(Te.Z,{icon:"check"})}),(0,Pe.jsx)(rr,{children:(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.successfulText"})})})]})),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:a("client.two-factor-connector.okButton"),ink:"primary",look:"raised",onClick:t})})]}):(0,Pe.jsxs)(Pe.Fragment,{children:[Rn||(Rn=(0,Pe.jsxs)(tr,{children:[(0,Pe.jsx)(nr,{isSuccessful:!1,children:(0,Pe.jsx)(Te.Z,{icon:"times"})}),(0,Pe.jsx)(rr,{children:(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.errorText"})})})]})),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:a("client.two-factor-connector.okButton"),ink:"primary",look:"raised",onClick:n})})]})};var ar={success:function(){return{type:zn}},goToStart:Xn};const ir=(0,f.connect)((function(e){return{setupSuccessful:e.twoFactorConnector.setupSuccessful}}),ar)((0,p.ZP)(or));var cr,sr=Object.defineProperty,ur=Object.getOwnPropertySymbols,lr=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable,fr=(e,t,n)=>t in e?sr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dr=(e,t)=>{for(var n in t||(t={}))lr.call(t,n)&&fr(e,n,t[n]);if(ur)for(var n of ur(t))pr.call(t,n)&&fr(e,n,t[n]);return e},hr=(e,t)=>{var n={};for(var r in e)lr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ur)for(var r of ur(e))t.indexOf(r)<0&&pr.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,o){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let i=[];for(let e=0;e<this.size;e++)i.push(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(r);if(this.drawCodewords(c),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(o=t,e=n),this.applyMask(t)}}a(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(n,r){const o=e.QrSegment.makeSegments(n);return t.encodeSegments(o,r)}static encodeBinary(n,r){const o=e.QrSegment.makeBytes(n);return t.encodeSegments([o],r)}static encodeSegments(e,n,o=1,i=40,s=-1,u=!0){if(!(t.MIN_VERSION<=o&&o<=i&&i<=t.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let l,p;for(l=o;;l++){const r=8*t.getNumDataCodewords(l,n),o=c.getTotalBits(e,l);if(o<=r){p=o;break}if(l>=i)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])u&&p<=8*t.getNumDataCodewords(l,e)&&(n=e);let f=[];for(const t of e){r(t.mode.modeBits,4,f),r(t.numChars,t.mode.numCharCountBits(l),f);for(const e of t.getData())f.push(e)}a(f.length==p);const d=8*t.getNumDataCodewords(l,n);a(f.length<=d),r(0,Math.min(4,d-f.length),f),r(0,(8-f.length%8)%8,f),a(f.length%8==0);for(let e=236;f.length<d;e^=253)r(e,8,f);let h=[];for(;8*h.length<f.length;)h.push(0);return f.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(l,n,h,s)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);a(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(r,e));this.setFunctionModule(8,7,o(r,6)),this.setFunctionModule(8,8,o(r,7)),this.setFunctionModule(7,8,o(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;a(t>>>18==0);for(let e=0;e<18;e++){const n=o(t,e),r=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(r,a,n),this.setFunctionModule(a,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),a=e+r,i=t+n;0<=a&&a<this.size&&0<=i&&i<this.size&&this.setFunctionModule(a,i,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],i=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],c=Math.floor(t.getNumRawDataModules(n)/8),s=o-c%o,u=Math.floor(c/o);let l=[];const p=t.reedSolomonComputeDivisor(i);for(let n=0,r=0;n<o;n++){let o=e.slice(r,r+u-i+(n<s?0:1));r+=o.length;const a=t.reedSolomonComputeRemainder(o,p);n<s&&o.push(0),l.push(o.concat(a))}let f=[];for(let e=0;e<l[0].length;e++)l.forEach(((t,n)=>{(e!=u-i||n>=s)&&f.push(t[e])}));return a(f.length==c),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let a=0;a<2;a++){const i=t-a,c=0==(t+1&2)?this.size-1-r:r;!this.isFunction[c][i]&&n<8*e.length&&(this.modules[c][i]=o(e[n>>>3],7-(7&n)),n++)}}a(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,o=0,a=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[n][i]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][i],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,o=0,a=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[i][n]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[i][n],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const o=this.modules[n][r];o==this.modules[n][r+1]&&o==this.modules[n+1][r]&&o==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,o=Math.ceil(Math.abs(20*n-10*r)/r)-1;return a(0<=o&&o<=9),e+=o*t.PENALTY_N4,a(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return a(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let o=0;o<e;o++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const o of e){const e=o^r.shift();r.push(0),n.forEach(((n,o)=>r[o]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return a(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];a(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function o(e,t){return 0!=(e>>>t&1)}function a(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const i=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new i(i.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!i.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const o=Math.min(e.length-n,3);r(parseInt(e.substr(n,o),10),3*o+1,t),n+=o}return new i(i.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!i.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let o=45*i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(o,11,n)}return t<e.length&&r(i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new i(i.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:i.isNumeric(e)?[i.makeNumeric(e)]:i.isAlphanumeric(e)?[i.makeAlphanumeric(e)]:[i.makeBytes(i.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new i(i.Mode.ECI,0,t)}static isNumeric(e){return i.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return i.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let c=i;c.NUMERIC_REGEX=/^[0-9]*$/,c.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,c.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=c})(cr||(cr={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(cr||(cr={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(cr||(cr={}));var mr=cr,gr={L:mr.QrCode.Ecc.LOW,M:mr.QrCode.Ecc.MEDIUM,Q:mr.QrCode.Ecc.QUARTILE,H:mr.QrCode.Ecc.HIGH},yr=128,vr="L",br="#FFFFFF",wr="#000000",Or=!1;
|
|
52
|
+
*/var r=n(1024),o=n(61688);var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=o.useSyncExternalStore,c=r.useRef,s=r.useEffect,u=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var p=c(null);if(null===p.current){var f={hasValue:!1,value:null};p.current=f}else f=p.current;p=u((function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return c=t}return c=e}if(t=c,a(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(i=e,c=n)}var i,c,s=!1,u=void 0===n?null:n;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,n,r,o]);var d=i(e,p[0],p[1]);return s((function(){f.hasValue=!0,f.value=d}),[d]),l(d),d}},61688:(e,t,n)=>{"use strict";e.exports=n(53250)},52798:(e,t,n)=>{"use strict";e.exports=n(50139)},28721:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16);function i(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(a)}const c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).slice(1));function s(e,t=0){return(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase()}const u=function(e,t,n){if(r.randomUUID&&!t&&!e)return r.randomUUID();const o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=o[e];return t}return s(o)}},1024:e=>{"use strict";e.exports=t},30314:t=>{"use strict";t.exports=e},71298:e=>{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},38088:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},87462:(e,t,n)=>{"use strict";function r(){return r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},31599:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},28549:(e,t,n)=>{"use strict";function r(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:()=>r})},2717:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},33417:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(28549);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},32924:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}n.d(t,{Z:()=>r})},1972:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(78001);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}}(e,t)||(0,r.Z)(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.")}()}},62360:(e,t,n)=>{"use strict";function r(e){return r="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},r(e)}n.d(t,{Z:()=>r})},78001:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(31599);function o(e,t){if(e){if("string"==typeof e)return(0,r.Z)(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)?(0,r.Z)(e,t):void 0}}}},a={};function i(e){var t=a[e];if(void 0!==t)return t.exports;var n=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(n.exports,n,n.exports,i),n.loaded=!0,n.exports}i.m=o,i.amdD=function(){throw new Error("define cannot be used indirect")},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>885===e?"chunk-ckeditor.f485d9d93075327af074.js":"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons",877:"vendor-libphonenumber-js"}[e]||e)+"."+{85:"db1126e5f72da427d1ea",198:"428fb8a2ead9aced75bc",560:"921a930bee3a737bee5c",608:"3f5c2d9d74c51e74c5b0",614:"f252c14e8d0046892a6a",759:"3e178a7310a92d3020c3",817:"2b608f431339a863492a",877:"ee24f52222afe086ba7e"}[e]+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n={},r="tocco-:",i.l=(e,t,o,a)=>{if(n[e])n[e].push(t);else{var c,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),l=0;l<u.length;l++){var p=u[l];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==r+o){c=p;break}}c||(s=!0,(c=document.createElement("script")).charset="utf-8",c.timeout=120,i.nc&&c.setAttribute("nonce",i.nc),c.setAttribute("data-webpack",r+o),c.src=e),n[e]=[t];var f=(t,r)=>{c.onerror=c.onload=null,clearTimeout(d);var o=n[e];if(delete n[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach((e=>e(r))),t)return t(r)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=f.bind(null,c.onerror),c.onload=f.bind(null,c.onload),s&&document.head.appendChild(c)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=201,i.p="/",(()=>{var e={201:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,o)=>r=e[t]=[n,o]));n.push(r[2]=o);var a=i.p+i.u(t),c=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",c.name="ChunkLoadError",c.type=o,c.request=a,r[1](c)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,c,s]=n,u=0;if(a.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(s)s(i)}for(t&&t(n);u<a.length;u++)o=a[u],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=self.webpackChunktocco_=self.webpackChunktocco_||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),i.nc=void 0;var c={};return(()=>{"use strict";i.r(c);var e=i(6966),t=i(59713),n=i.n(t),r=i(45697),o=i.n(r),a=i(19743),s=i(19241),u=i(23369),l=i(65378),p=i(74806),f=i(50558),d="login/INITIALIZE",h="login/LOGIN",m="login/REQUEST_PASSWORD",g="login/CHECK_USERNAME",y=function(e,t,n,r){return{type:h,payload:{username:e,password:t,captchaToken:n,userCode:r}}},v=i(28655),b=i.n(v),w=i(1024),O=i.n(w),x=i(38205),k="USERNAME_FORM",_="LOGIN_FORM",S="PASSWORD_REQUEST",E="TWOSTEPLOGIN",A="PASSWORD_UPDATE",P="TWOSTEPLOGIN_ACTIVATION",j="login/CHANGE_PAGE",C="login/SET_ENTRY_PAGE",D="login/SET_USERNAME",T="login/SET_PASSWORD",R="login/SET_CAPTCHA_KEY",I=function(e){return{type:C,payload:{entryPage:e}}},M=function(e){return{type:j,payload:{currentPage:e}}},N=function(e){return{type:D,payload:{username:e}}},Z=function(e){return{type:T,payload:{password:e}}},B=i(48926),L=i.n(B),F=i(63038),U=i.n(F),H=i(87757),W=i.n(H),z=i(99860),V=i.n(z);function Y(){return Y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(this,arguments)}function q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var G=function(e){var t,n;function r(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(q(t)),t.handleErrored=t.handleErrored.bind(q(t)),t.handleChange=t.handleChange.bind(q(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(q(t)),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=r.prototype;return o.getValue=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this.props.grecaptcha.getResponse(this._widgetId):null},o.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},o.execute=function(){var e=this.props.grecaptcha;if(e&&void 0!==this._widgetId)return e.execute(this._widgetId);this._executeRequested=!0},o.executeAsync=function(){var e=this;return new Promise((function(t,n){e.executionResolve=t,e.executionReject=n,e.execute()}))},o.reset=function(){this.props.grecaptcha&&void 0!==this._widgetId&&this.props.grecaptcha.reset(this._widgetId)},o.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},o.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},o.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},o.explicitRender=function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&void 0===this._widgetId){var e=document.createElement("div");this._widgetId=this.props.grecaptcha.render(e,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(e)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},o.componentDidMount=function(){this.explicitRender()},o.componentDidUpdate=function(){this.explicitRender()},o.componentWillUnmount=function(){void 0!==this._widgetId&&(this.delayOfCaptchaIframeRemoving(),this.reset())},o.delayOfCaptchaIframeRemoving=function(){var e=document.createElement("div");for(document.body.appendChild(e),e.style.display="none";this.captcha.firstChild;)e.appendChild(this.captcha.firstChild);setTimeout((function(){document.body.removeChild(e)}),5e3)},o.handleRecaptchaRef=function(e){this.captcha=e},o.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]));return O().createElement("div",Y({},t,{ref:this.handleRecaptchaRef}))},r}(O().Component);G.displayName="ReCAPTCHA",G.propTypes={sitekey:V().string.isRequired,onChange:V().func,grecaptcha:V().object,theme:V().oneOf(["dark","light"]),type:V().oneOf(["image","audio"]),tabindex:V().number,onExpired:V().func,onErrored:V().func,size:V().oneOf(["compact","normal","invisible"]),stoken:V().string,hl:V().string,badge:V().oneOf(["bottomright","bottomleft","inline"])},G.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var K=i(9657),$=i.n(K),X=i(8679),Q=i.n(X);function J(){return J=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(this,arguments)}var ee={},te=0;var ne="onloadcallback";const re=function(e,t){return t=t||{},function(n){var r=n.displayName||n.name||"Component",o=function(r){var o,a;function i(e,t){var n;return(n=r.call(this,e,t)||this).state={},n.__scriptURL="",n}a=r,(o=i).prototype=Object.create(a.prototype),o.prototype.constructor=o,o.__proto__=a;var c=i.prototype;return c.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+te++),this.__scriptLoaderID},c.setupScriptURL=function(){return this.__scriptURL="function"==typeof e?e():e,this.__scriptURL},c.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},c.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=ee[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var n in e.observers)e.observers[n](e);delete window[t.callbackName]},c.componentDidMount=function(){var e=this,n=this.setupScriptURL(),r=this.asyncScriptLoaderGetScriptLoaderID(),o=t,a=o.globalName,i=o.callbackName,c=o.scriptId;if(a&&void 0!==window[a]&&(ee[n]={loaded:!0,observers:{}}),ee[n]){var s=ee[n];return s&&(s.loaded||s.errored)?void this.asyncScriptLoaderHandleLoad(s):void(s.observers[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var u={};u[r]=function(t){return e.asyncScriptLoaderHandleLoad(t)},ee[n]={loaded:!1,observers:u};var l=document.createElement("script");for(var p in l.src=n,l.async=!0,t.attributes)l.setAttribute(p,t.attributes[p]);c&&(l.id=c);var f=function(e){if(ee[n]){var t=ee[n].observers;for(var r in t)e(t[r])&&delete t[r]}};i&&"undefined"!=typeof window&&(window[i]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),l.onload=function(){var e=ee[n];e&&(e.loaded=!0,f((function(t){return!i&&(t(e),!0)})))},l.onerror=function(){var e=ee[n];e&&(e.errored=!0,f((function(t){return t(e),!0})))},document.body.appendChild(l)},c.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===t.removeOnUnmount)for(var n=document.getElementsByTagName("script"),r=0;r<n.length;r+=1)n[r].src.indexOf(e)>-1&&n[r].parentNode&&n[r].parentNode.removeChild(n[r]);var o=ee[e];o&&(delete o.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete ee[e])},c.render=function(){var e=t.globalName,r=this.props,o=(r.asyncScriptOnLoad,r.forwardedRef),a=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(a[e]=void 0!==window[e]?window[e]:void 0),a.ref=o,(0,w.createElement)(n,a)},i}(w.Component),a=(0,w.forwardRef)((function(e,t){return(0,w.createElement)(o,J({},e,{forwardedRef:t}))}));return a.displayName="AsyncScriptLoader("+r+")",a.propTypes={asyncScriptOnLoad:$().func},Q()(a,n)}}((function(){return"https://"+(("undefined"!=typeof window&&window.recaptchaOptions||{}).useRecaptchaNet?"recaptcha.net":"www.google.com")+"/recaptcha/api.js?onload="+ne+"&render=explicit"}),{callbackName:ne,globalName:"grecaptcha"})(G),oe=re;var ae=i(41505),ie=i.n(ae),ce=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ue=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},le={outline:"none"},pe=function(e){function t(){var n,r;ce(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=ue(this,e.call.apply(e,[this].concat(a))),r.state={focused:!1},r._isMounted=!1,r._lastBlurEvent=null,r.ref=O().createRef(),r._onFocusIn=function(){r._isMounted&&r._lastBlurEvent&&r.isInsideNode(r.ref.current,r._lastBlurEvent.target)&&!r.isInsideNode(r.ref.current,document.activeElement)&&r.setState({focused:!1},(function(){document.removeEventListener("focusin",r._onFocusIn),r.props.onBlur(r._lastBlurEvent)}))},r.onFocus=function(e){var t=r.props.onFocus;r.state.focused||r.setState({focused:!0},(function(){document.addEventListener("focusin",r._onFocusIn),t(e)}))},r.onBlur=function(e){e.persist(),r._lastBlurEvent=e},r.isInsideNode=function(e,t){return null!=e&&e.contains(t)},ue(r,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),t.prototype.componentDidMount=function(){null!=document&&document.querySelector("body").setAttribute("tabindex","-1"),this._isMounted=!0},t.prototype.componentWillUnmount=function(){this._isMounted=!1,document.removeEventListener("focusin",this._onFocusIn)},t.prototype.focus=function(){var e=this.ref.current;null!=e&&"function"==typeof e.focus&&e.focus()},t.prototype.render=function(){var e=this.props.children,t=this.state.focused,n={onFocus:this.onFocus,onBlur:this.onBlur};return"function"==typeof e?O().cloneElement(e({focused:t,getRef:this.ref}),n):O().createElement("div",se({ref:this.ref,style:le},n),e)},t}(O().Component);pe.propTypes={children:ie().oneOfType([ie().node,ie().func]).isRequired,onBlur:ie().func,onFocus:ie().func},pe.defaultProps={onBlur:function(){},onFocus:function(){}};const fe=pe;var de,he,me,ge,ye=i(70696),ve=i(10535),be=i(78958),we=i(319),Oe=i.n(we),xe=i(37188),ke=i(24875),_e=(de={},n()(de,be.Z.condition.BASE,"inherit"),n()(de,be.Z.condition.DANGER,ke.FS.color("signal.danger")),n()(de,be.Z.condition.SUCCESS,ke.FS.color("signal.success")),n()(de,be.Z.condition.WARNING,ke.FS.color("signal.warning")),n()(de,be.Z.condition.INFO,ke.FS.color("signal.info")),de),Se=(0,x.ZP)(xe.hc).withConfig({displayName:"StyledSignalList"})(he||(he=b()(["\n && {\n list-style-type: none;\n }\n"]))),Ee=x.ZP.span.withConfig({displayName:"StyledSignalListIcon"})(me||(me=b()(["\n position: absolute;\n left: -1.6rem;\n text-align: left;\n"]))),Ae=(0,x.ZP)(xe.EF).withConfig({displayName:"StyledSignalListItem"})(ge||(ge=b()(["\n && {\n color: ",";\n position: relative;\n padding: 0;\n }\n"])),(function(e){return function(e){return _e[e.condition]||"inherit"}(e)})),Pe=i(85893);const je=function(e){return(0,Pe.jsx)(Se,{as:"ul",children:O().Children.map(e.children,(function(e){return O().cloneElement(e)}))})};var Ce,De,Te=i(88162),Re=(Ce={},n()(Ce,be.Z.condition.BASE,!1),n()(Ce,be.Z.condition.DANGER,"times"),n()(Ce,be.Z.condition.SUCCESS,"check"),n()(Ce,be.Z.condition.WARNING,"exclamation-triangle"),n()(Ce,be.Z.condition.INFO,"info"),Ce),Ie=function(e){var t=Re[e.condition];return t?(0,Pe.jsx)(Te.Z,{icon:t,position:be.Z.position.SOLE}):De||(De=(0,Pe.jsx)("i",{children:"•"}))},Me=function(e){return(0,Pe.jsxs)(Ae,{condition:e.condition,children:[(0,Pe.jsx)(Ee,{children:Ie(e)}),e.label,O().Children.map(e.children,(function(e){return O().cloneElement(e)}))]})};Me.defaultProps={condition:be.Z.condition.BASE};const Ne={List:je,Item:Me};const Ze=function(e){if(!e.error)return null;var t=[];return Object.keys(e.error).forEach((function(n){t.push.apply(t,Oe()(e.error[n]))})),(0,Pe.jsx)(Ne.List,{children:t.map((function(e,t){return(0,Pe.jsx)(Ne.Item,{condition:"danger",label:e},t)}))})};var Be=i(87585);function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ue=function(e){var t,n,r,o,a=e.children,i=e.description,c=e.dirty,s=e.isDisplay,l=e.error,p=e.hasValue,f=e.id,d=e.label,h=e.mandatory,m=e.mandatoryTitle,g=e.immutable,y=e.touched,v=e.signal,b=!g&&y&&l&&Object.keys(l).length>0,w="".concat(ye.Z.adjustedHTMLString(d)).concat(h&&m?", ".concat(m):""),O=v||function(e,t,n,r){return t?be.Z.condition.DANGER:e?be.Z.condition.INFO:n&&!r?be.Z.condition.WARNING:void 0}(c,b,h,p),x={__html:"".concat(ve.Z.sanitizeHtml(d)).concat(h?" *":"")},k=!s&&!g&&{htmlFor:f},_=u.Z.getEmbedType(),S=["admin","legacy-admin"].includes(_);return(0,Pe.jsx)(fe,{children:function(e){var u=e.getRef;return(0,Pe.jsx)(Be.T3,{children:(0,Pe.jsxs)(Be.QZ,{ref:u,label:d,isAdmin:S,children:[d&&(0,Pe.jsx)(Be.yr,Fe(Fe({},k),{},{hasValue:p,dirty:c,title:w,immutable:g,isDisplay:s,signal:O,isAdmin:S,children:t||(t=(0,Pe.jsx)("span",{dangerouslySetInnerHTML:x}))})),(0,Pe.jsxs)(Be.m9,{isAdmin:S,children:[n||(n=(0,Pe.jsx)(Be.if,{hasValue:p,immutable:g,isDisplay:s,signal:O,children:a})),b&&(r||(r=(0,Pe.jsx)(Be.gi,{children:(0,Pe.jsx)(Ze,{error:l})}))),i&&(o||(o=(0,Pe.jsx)(Be.Mp,{children:i})))]})]})})}})};var He=i(35997);const We=(0,p.ZP)((function(e){var t,n=e.message,r=e.intl;return n&&n.text?(0,Pe.jsx)(Ne.List,{children:(0,Pe.jsx)(Ne.Item,{condition:n.negative?"danger":"base",label:(t=n.text,r.formatMessage({id:t}))})}):null})),ze=We;var Ve,Ye=i(6479),qe=i.n(Ye),Ge=i(65035),Ke=i(7281),$e=i(88601),Xe=(0,x.ZP)(Ge.Z).withConfig({displayName:"StyledLoginButton"})(Ve||(Ve=b()(["\n &&& {\n font-size: ",";\n border-radius: ",";\n display: flex;\n justify-content: center;\n padding: 1.25rem 0;\n width: 100%;\n margin-top: 20px;\n margin-bottom: 10px;\n\n &:not(:last-child) {\n margin-right: 0;\n }\n }\n"])),Ke.Z.font(1.3),$e.Z.radii("buttonLarge")),Qe=["disabled","pending","label"];function Je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const et=function(e){var t=e.disabled,r=e.pending,o=e.label,a=qe()(e,Qe);return(0,Pe.jsx)(Xe,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({disabled:t,pending:r,label:o,ink:"primary",look:"raised",type:"submit"},a))},tt=et;var nt=i(44012),rt=i(34206);const ot=function(e){var t=e.title,n=e.subtitle;return(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsx)(rt.ZP.H5,{children:(0,Pe.jsx)(nt.Z,{id:t})}),n&&(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:n})})]})},at=ot;const it=function(e){var t=(0,w.useState)(!1),n=U()(t,2),r=n[0],o=n[1];return[r,{onAnimationStart:function(e){"onAutoFillStart"===e.animationName&&o(!0)},onChange:function(t){e(t.target.value),o(!1)}}]};var ct,st,ut,lt,pt,ft,dt,ht=i(30759),mt=(0,x.iv)(ct||(ct=b()(["\n align-items: center;\n cursor: ",";\n display: flex;\n"])),(function(e){return e.immutable?"not-allowed":"default"})),gt=x.ZP.label.withConfig({displayName:"StyledEditableWrapper"})(st||(st=b()(["\n &&& {\n margin: 0; /* reset Bootstrap and Ext JS */\n padding: 0; /* reset Ext JS */\n ","\n }\n"])),mt),yt=(0,x.iv)(ut||(ut=b()(["\n background-color: transparent;\n border: 0;\n cursor: ",";\n flex-grow: 1;\n min-height: 2.6rem;\n min-width: 0;\n outline: 0;\n padding: 0;\n ","\n &::-ms-clear {\n display: none;\n }\n\n &::-webkit-clear-button {\n display: none;\n }\n\n &::-webkit-inner-spin-button {\n display: none;\n }\n\n &[type='number'] {\n appearance: textfield;\n }\n\n &[type='search'] {\n appearance: none;\n }\n\n &:disabled {\n -webkit-text-fill-color: ","; // Safari fix\n opacity: 1; // iOS fix\n }\n\n /* remove indicators */\n &[type='date'],\n &[type='datetime-local'],\n &[type='month'],\n &[type='time'],\n &[type='week'] {\n appearance: none;\n display: flex;\n\n /* reset margin on smaller screens */\n ::-webkit-date-and-time-value {\n ","\n }\n }\n\n // allow pointer event only on touch devices\n @media (pointer: coarse) {\n pointer-events: ",";\n }\n"])),(function(e){return e.immutable?"not-allowed":"default"}),(function(){return(0,ht.Z)({color:ke.FS.color("text")})}),ke.FS.color("text"),(function(e){return e.immutable&&"margin: unset;"}),(function(e){return e.immutable?"none":"auto"})),vt=(0,x.iv)(lt||(lt=b()(["\n display: flex;\n align-items: center;\n"]))),bt=x.ZP.div.withConfig({displayName:"StyledEditableControl"})(pt||(pt=b()(["\n &&& {\n ","\n }\n"])),vt),wt=x.ZP.span.withConfig({displayName:"StyledEditableValue"})(ft||(ft=b()(["\n width: 100%;\n\n && {\n //url\n [type='url'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //url\n [type='tel'] + .input-group-addon > a {\n color: inherit; // reset bootstrap default\n }\n\n //date\n .date-edit {\n .input-group-addon {\n cursor: pointer;\n }\n\n input {\n z-index: 0;\n }\n\n &.disabled {\n input {\n cursor: not-allowed;\n }\n }\n\n .right-addon {\n position: relative;\n }\n\n .right-addon input {\n padding-right: 30px;\n }\n\n .reset {\n position: absolute;\n padding-right: 10px;\n padding-top: 5px;\n right: 0;\n color: #999;\n font-size: 18px;\n font-style: normal;\n cursor: pointer;\n }\n\n .reset:hover {\n color: ",";\n }\n }\n }\n"])),ke.FS.color("signal.danger")),Ot=i(58129);const xt=x.ZP.div.withConfig({displayName:"StyledButtonGroup"})(dt||(dt=b()(["\n display: flex;\n\n &&& > "," {\n :not(:first-child) {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n :not(:last-child) {\n margin-right: 0;\n border-right: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n"])),Ot.Z);var kt,_t,St,Et,At,Pt=x.ZP.input.withConfig({displayName:"StyledLoginFormInput"})(kt||(kt=b()(["\n /* stylelint-disable-next-line block-no-empty */\n @keyframes onAutoFillStart {\n from {\n }\n }\n\n &&&& {\n ","\n transition: background-color 50000s, color 50000s, filter 50000s;\n\n &:-webkit-autofill {\n animation-duration: 50000s;\n animation-name: onAutoFillStart;\n }\n padding-top: 0.7rem;\n padding-bottom: 0.7rem;\n }\n"])),yt),jt=x.ZP.div.withConfig({displayName:"StyledLoginFormInputWrapper"})(_t||(_t=b()(["\n &&& {\n ","\n }\n"])),mt),Ct=(0,x.ZP)(Ge.Z).withConfig({displayName:"StyledTransparentButton"})(St||(St=b()(["\n &&& {\n margin-right: 0;\n background-color: transparent;\n color: ",";\n padding: 1.25rem 0;\n width: 100%;\n justify-content: center;\n\n &:hover {\n background-color: transparent;\n }\n }\n"])),$e.Z.color("primary")),Dt=x.ZP.div.withConfig({displayName:"StyledLoginFormWrapper"})(Et||(Et=b()(["\n "," {\n margin-top: 1.8rem;\n width: auto;\n flex-direction: column;\n\n "," {\n flex-grow: 1;\n }\n }\n"])),xt,Ot.Z);function Tt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const It=function(e){var t=e.captchaKey,n=e.changePage,r=e.intl,o=e.login,a=e.loginPending,i=e.message,c=e.password,s=e.recaptchaActivated,u=e.setPassword,l=e.setUsername,p=e.showTitle,f=e.username,d=e.entryPage,h=it(l),m=U()(h,2),g=m[0],y=m[1],v=it(u),b=U()(v,2),O=b[0],x=b[1],_=(0,w.useRef)(),E=d===k,A=function(e){return r.formatMessage({id:e})},P=He.Z.usePrevious(s),j=(0,w.useCallback)(function(){var e=L()(W().mark((function e(t){var n;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&t.preventDefault(),n=null,!s){e.next=7;break}return e.next=5,_.current.executeAsync();case 5:n=e.sent,_.current.reset();case 7:o(f,c,n);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[o,f,c,s]);(0,w.useEffect)((function(){s&&!P&&j()}),[s,P,j]);var C=!!f,D=!C;return(0,Pe.jsxs)(Dt,{children:[p&&(At||(At=(0,Pe.jsx)(at,{title:"client.login.form.title",subtitle:"client.login.form.introduction"}))),(0,Pe.jsxs)("form",{onSubmit:j,children:[(0,Pe.jsx)(Ue,{hasValue:!!f||g,id:"login-username",label:A("client.login.form.userPlaceholder"),immutable:E,children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,Rt({autoFocus:D,name:"user","data-cy":"login-form_user-input",required:!0,type:"text",value:f,disabled:E,onFocus:function(e){return e.target.select()}},y))})}),(0,Pe.jsx)(Ue,{hasValue:!!c||O,id:"login-password",label:A("client.login.form.passwordPlaceholder"),children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,Rt({autoFocus:C,name:"password","data-cy":"login-form_password-input",required:!0,type:"password",value:c,onFocus:function(e){return e.target.select()}},x))})}),(0,Pe.jsx)(ze,{message:i}),t&&s&&(0,Pe.jsx)(oe,{ref:_,badge:"bottomright",size:"invisible",sitekey:t,hl:r.locale}),(0,Pe.jsx)(tt,{disabled:a||""===f&&!g||""===c&&!O,label:A("client.login.form.button"),pending:a,"data-cy":"login-form_login-button"}),(0,Pe.jsx)(Ct,{label:A("client.login.form.forgotLink"),onClick:function(){return n(S)},"data-cy":"login-form_request-button"}),E&&(0,Pe.jsx)(Ct,{label:A("client.login.form.backLink"),onClick:function(){return n(k)}})]})]})};var Mt={changePage:M,setUsername:N,setPassword:Z,login:y};const Nt=(0,f.connect)((function(e){return{username:e.login.username,password:e.login.password,message:e.loginForm.message,loginPending:e.loginForm.loginPending,captchaKey:e.login.captchaKey,recaptchaActivated:e.loginForm.recaptchaActivated,entryPage:e.login.entryPage}}),Mt)((0,p.ZP)(It));var Zt,Bt;const Lt=function(e){var t=e.entryPage,n=e.username,r=e.requestPassword,o=e.intl,a=e.showTitle,i=e.pending,c=e.changePage,s=(0,w.useState)(n||""),u=U()(s,2),l=u[0],p=u[1],f=t===k,d=function(e){return o.formatMessage({id:e})};return(0,Pe.jsxs)(Dt,{children:[a&&(Zt||(Zt=(0,Pe.jsx)(at,{title:"client.login.passwordRequest.title"}))),!f&&(Bt||(Bt=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.login.passwordRequest.introduction"})}))),(0,Pe.jsxs)("form",{onSubmit:function(e){e.preventDefault(),r(l)},children:[(0,Pe.jsx)(Ue,{hasValue:Boolean(l),id:"login-username",label:d("client.login.form.userPlaceholder"),immutable:f,children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,{name:"user",onChange:function(e){p(e.target.value)},required:!0,type:"text",value:l,disabled:f,"data-cy":"password-request_input"})})}),(0,Pe.jsx)(tt,{disabled:!l||i,label:d("client.login.passwordRequest.button"),pending:i,"data-cy":"password-request_submit-button"}),(0,Pe.jsx)(Ct,{disabled:i,label:d("client.login.passwordRequest.abortButton"),name:"abort",onClick:function(){return c(_)},"data-cy":"password-request_abort-button"})]})]})};var Ft={changePage:M,requestPassword:function(e){return{type:m,payload:{username:e}}}};const Ut=(0,f.connect)((function(e){return{username:e.login.username,pending:e.loginForm.loginPending,entryPage:e.login.entryPage}}),Ft)((0,p.ZP)(Lt));var Ht="INITIALIZED",Wt="PasswordUpdateDialog/UPDATE_OLD_PASSWORD",zt="PasswordUpdateDialog/UPDATE_NEW_PASSWORD",Vt="PasswordUpdateDialog/SET_NEW_PASSWORD",Yt="PasswordUpdateDialog/SET_NEW_PASSWORD_VALIDATION_ERRORS",qt="PasswordUpdateDialog/UPDATE_NEW_PASSWORD_REPEAT",Gt="PasswordUpdateDialog/SAVE_PASSWORD",Kt="PasswordUpdateDialog/SAVE_PASSWORD_SUCCESS",$t="PasswordUpdateDialog/SAVE_PASSWORD_FAILURE",Xt="PasswordUpdateDialog/VALIDATE",Qt="PasswordUpdateDialog/RESET_PASSWORD_UPDATED_FAILED",Jt=function(e){return{type:Wt,payload:{oldPassword:e}}},en=function(e){return{type:Yt,payload:{errors:e}}},tn=function(e,t){return{type:$t,payload:{errorCode:e,validationMessages:t}}},nn="PasswordUpdateDialog/FETCH_VALIDATION_RULES",rn="PasswordUpdateDialog/SET_VALIDATION_RULES",on=i(50258),an={INVALID_CREDENTIALS:"client.login.passwordUpdate.invalidCredentials",UNEXPECTED_ERROR:"client.login.passwordUpdate.unexpectedError"};const cn=function(e){return(0,Pe.jsx)(Ne.List,{children:(0,Pe.jsx)(Ne.Item,{condition:be.Z.condition.DANGER,children:(0,Pe.jsx)(nt.Z,{id:(t=e.errorCode,an[t]||"client.login.passwordUpdate.failure")})})});var t};const sn=function(e){return(0,Pe.jsx)(Ne.List,{children:e.rules.map((function(t,n){var r=null,o=t.message;if(e.errors){var a=e.errors[t.name];!0===a?r=be.Z.condition.DANGER:"string"==typeof a?(r=be.Z.condition.DANGER,o=a):r=be.Z.condition.SUCCESS}return(0,Pe.jsx)(Ne.Item,{condition:r,label:o},n)}))})},un=sn;var ln,pn,fn=x.ZP.input.attrs((function(e){return{type:"password"}})).withConfig({displayName:"StyledPasswordInput"})(ln||(ln=b()(["\n &&&& {\n ","\n }\n"])),yt),dn=x.ZP.div.withConfig({displayName:"StyledPasswordInputWrapper"})(pn||(pn=b()(["\n && {\n ","\n }\n"])),mt);const hn=function(e){return(0,Pe.jsx)(Ue,{hasValue:!!e.value,id:"".concat(e.name,"-input"),immutable:!0===e.readOnly,label:e.label,signal:e.value?void 0===e.valid?null:e.valid?be.Z.condition.SUCCESS:be.Z.condition.DANGER:null,children:(0,Pe.jsx)(dn,{immutable:!0===e.readOnly,children:(0,Pe.jsx)(fn,{id:"".concat(e.name,"-input"),value:e.value,onChange:function(t){return e.onChange(t.target.value)},disabled:!0===e.readOnly,immutable:!0===e.readOnly,onKeyDown:e.onKeyDown,autoFocus:e.autoFocus})})})};var mn;const gn=x.ZP.div(mn||(mn=b()(["\n "," {\n width: 100%;\n }\n"])),Ot.Z);var yn,vn,bn,wn,On;function xn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xn(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var _n=x.ZP.div.withConfig({displayName:"StyledValidationRulesWrapper"})(yn||(yn=b()(["\n margin: 1rem;\n"])));const Sn=function(e){var t=e.captchaKey,n=e.fetchValidationRules,r=e.forcedUpdate,o=e.initialized,a=e.intl,i=e.password,c=e.savePassword,s=e.showOldPasswordField,u=e.showTitle,l=e.updateNewPassword,p=e.updateNewPasswordRepeat,f=e.updateOldPassword,d=e.validationRules,h=(0,w.useRef)();(0,w.useEffect)((function(){n()}),[n]),(0,w.useEffect)((function(){d&&o()}),[d,o]);var m=function(){var e=L()(W().mark((function e(t){var n;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.preventDefault(),!0!==g()){e.next=7;break}return e.next=4,h.current.executeAsync();case 4:n=e.sent,h.current.reset(),c(n);case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),g=function(){return!!i.newPasswordRepeat&&(i.newPassword===i.newPasswordRepeat&&!i.passwordUpdatePending)},y=function(e){return a.formatMessage({id:e})};if(!d)return vn||(vn=(0,Pe.jsx)(on.Z,{}));var v=i.passwordUpdatePending,b=!i.oldPassword&&s||i.passwordUpdatePending,O=!i.newPassword||i.passwordUpdatePending||i.newPasswordValidationErrors&&Object.keys(i.newPasswordValidationErrors).length>0;return(0,Pe.jsxs)(gn,{children:[u&&(bn||(bn=(0,Pe.jsx)(at,{title:"client.login.passwordUpdate.title"}))),r&&(wn||(wn=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.login.passwordUpdate.introduction"})}))),(0,Pe.jsxs)("form",{onSubmit:m,children:[!0===s&&(0,Pe.jsx)(hn,kn({tabIndex:1,label:y("client.login.passwordUpdate.oldPassword"),name:"oldPassword",value:i.oldPassword,onChange:f,readOnly:v,autoFocus:!0},i.passwordUpdateFailed&&"INVALID_CREDENTIALS"===i.passwordUpdateErrorCode&&{valid:!1})),(0,Pe.jsx)(hn,{tabIndex:2,label:y("client.login.passwordUpdate.newPassword"),name:"newPassword",value:i.newPassword,onChange:l,readOnly:b,autoFocus:!0!==s,valid:!O}),(0,Pe.jsx)(_n,{children:(0,Pe.jsx)(un,{rules:d,errors:i.newPasswordValidationErrors,rulesNeutral:!i.newPassword})}),(0,Pe.jsx)(hn,{tabIndex:3,label:y("client.login.passwordUpdate.newPasswordRepeat"),name:"newPasswordRepeat",value:i.newPasswordRepeat,onChange:p,readOnly:O,valid:g()}),i.newPasswordRepeat&&i.newPassword!==i.newPasswordRepeat&&(On||(On=(0,Pe.jsx)(Ne.List,{children:(0,Pe.jsx)(Ne.Item,{condition:"danger",label:(0,Pe.jsx)(nt.Z,{id:"client.login.passwordUpdate.noMatch"})})}))),!0===i.passwordUpdateFailed&&(0,Pe.jsx)(cn,{errorCode:i.passwordUpdateErrorCode}),(0,Pe.jsx)(tt,{pending:i.passwordUpdatePending,disabled:!1===g(),label:y("client.login.passwordUpdate.saveButton")}),t&&(0,Pe.jsx)(oe,{ref:h,badge:"bottomright",size:"invisible",sitekey:t,hl:a.locale})]})]})};var En={updateOldPassword:Jt,updateNewPassword:function(e){return{type:zt,payload:{newPassword:e}}},updateNewPasswordRepeat:function(e){return{type:qt,payload:{newPasswordRepeat:e}}},fetchValidationRules:function(){return{type:nn}},savePassword:function(e){return{type:Gt,payload:{captchaToken:e}}},initialized:function(){return{type:Ht}}};const An=(0,f.connect)((function(e){return{password:e.passwordUpdate.password,validationRules:e.passwordUpdate.validationRules,showOldPasswordField:e.passwordUpdate.dialog.showOldPasswordField,forcedUpdate:e.passwordUpdate.dialog.forcedUpdate,captchaKey:e.login.captchaKey}}),En)((0,p.ZP)(Sn));var Pn,jn,Cn,Dn,Tn,Rn,In=i(30604),Mn="two-factor-connector/INITIALIZE",Nn="two-factor-connector/SET_TWO_STEP_ACTIVE",Zn="two-factor-connector/SET_SECRET",Bn="two-factor-connector/SET_USER_NAME",Ln="two-factor-connector/REQUEST_SECRET",Fn="two-factor-connector/GO_TO_SECRET_VERIFICATION",Un="two-factor-connector/GO_TO_START",Hn="two-factor-connector/GO_TO_SECRET",Wn="two-factor-connector/VERIFY_CODE",zn="root/SUCCESS",Vn="root/SET_SETUP_SUCCESSFUL",Yn="root/GO_TO_RESULT",qn=function(){return{type:Mn}},Gn=function(e){return{type:Nn,payload:{twoFactorActive:e}}},Kn=function(e){return{type:Zn,payload:{secret:e}}},$n=function(e){return{type:Bn,payload:{username:e}}},Xn=function(){return{type:Un}},Qn=function(e){return{type:Vn,payload:{setupSuccessful:e}}},Jn=i(83324),er=x.ZP.div.withConfig({displayName:"StyledButtonWrapper"})(Pn||(Pn=b()(["\n display: flex;\n justify-content: flex-end;\n margin-top: ",";\n\n > "," {\n margin-right: 0;\n }\n"])),Ke.Z.space(.5),Ot.Z),tr=x.ZP.div.withConfig({displayName:"StyledMessageWrapper"})(jn||(jn=b()(["\n display: grid;\n grid-template-columns: 9% 1fr;\n grid-column-gap: ",";\n"])),Ke.Z.space(-.5)),nr=x.ZP.span.withConfig({displayName:"StyledIconWrapper"})(Cn||(Cn=b()(["\n display: flex;\n align-items: center;\n color: ",";\n font-size: ",";\n\n > * {\n max-width: 100%;\n }\n"])),(function(e){return e.isSuccessful?ke.FS.color("signal.success"):ke.FS.color("signal.danger")}),Ke.Z.font(10)),rr=x.ZP.div.withConfig({displayName:"StyledTextWrapper"})(Dn||(Dn=b()(["\n display: flex;\n align-items: center;\n"])));const or=function(e){var t=e.success,n=e.goToStart,r=e.setupSuccessful,o=e.intl;(0,Jn.z)(t);var a=function(e){return o.formatMessage({id:e})};return r?(0,Pe.jsxs)(Pe.Fragment,{children:[Tn||(Tn=(0,Pe.jsxs)(tr,{children:[(0,Pe.jsx)(nr,{isSuccessful:!0,children:(0,Pe.jsx)(Te.Z,{icon:"check"})}),(0,Pe.jsx)(rr,{children:(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.successfulText"})})})]})),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:a("client.two-factor-connector.okButton"),ink:"primary",look:"raised",onClick:t})})]}):(0,Pe.jsxs)(Pe.Fragment,{children:[Rn||(Rn=(0,Pe.jsxs)(tr,{children:[(0,Pe.jsx)(nr,{isSuccessful:!1,children:(0,Pe.jsx)(Te.Z,{icon:"times"})}),(0,Pe.jsx)(rr,{children:(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.errorText"})})})]})),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:a("client.two-factor-connector.okButton"),ink:"primary",look:"raised",onClick:n})})]})};var ar={success:function(){return{type:zn}},goToStart:Xn};const ir=(0,f.connect)((function(e){return{setupSuccessful:e.twoFactorConnector.setupSuccessful}}),ar)((0,p.ZP)(or));var cr,sr=Object.defineProperty,ur=Object.getOwnPropertySymbols,lr=Object.prototype.hasOwnProperty,pr=Object.prototype.propertyIsEnumerable,fr=(e,t,n)=>t in e?sr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dr=(e,t)=>{for(var n in t||(t={}))lr.call(t,n)&&fr(e,n,t[n]);if(ur)for(var n of ur(t))pr.call(t,n)&&fr(e,n,t[n]);return e},hr=(e,t)=>{var n={};for(var r in e)lr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ur)for(var r of ur(e))t.indexOf(r)<0&&pr.call(e,r)&&(n[r]=e[r]);return n};(e=>{const t=class{constructor(e,n,r,o){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let i=[];for(let e=0;e<this.size;e++)i.push(!1);for(let e=0;e<this.size;e++)this.modules.push(i.slice()),this.isFunction.push(i.slice());this.drawFunctionPatterns();const c=this.addEccAndInterleave(r);if(this.drawCodewords(c),-1==o){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(o=t,e=n),this.applyMask(t)}}a(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(n,r){const o=e.QrSegment.makeSegments(n);return t.encodeSegments(o,r)}static encodeBinary(n,r){const o=e.QrSegment.makeBytes(n);return t.encodeSegments([o],r)}static encodeSegments(e,n,o=1,i=40,s=-1,u=!0){if(!(t.MIN_VERSION<=o&&o<=i&&i<=t.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let l,p;for(l=o;;l++){const r=8*t.getNumDataCodewords(l,n),o=c.getTotalBits(e,l);if(o<=r){p=o;break}if(l>=i)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])u&&p<=8*t.getNumDataCodewords(l,e)&&(n=e);let f=[];for(const t of e){r(t.mode.modeBits,4,f),r(t.numChars,t.mode.numCharCountBits(l),f);for(const e of t.getData())f.push(e)}a(f.length==p);const d=8*t.getNumDataCodewords(l,n);a(f.length<=d),r(0,Math.min(4,d-f.length),f),r(0,(8-f.length%8)%8,f),a(f.length%8==0);for(let e=236;f.length<d;e^=253)r(e,8,f);let h=[];for(;8*h.length<f.length;)h.push(0);return f.forEach(((e,t)=>h[t>>>3]|=e<<7-(7&t))),new t(l,n,h,s)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)0==n&&0==r||0==n&&r==t-1||n==t-1&&0==r||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const r=21522^(t<<10|n);a(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,o(r,e));this.setFunctionModule(8,7,o(r,6)),this.setFunctionModule(8,8,o(r,7)),this.setFunctionModule(7,8,o(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,o(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,o(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,o(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;a(t>>>18==0);for(let e=0;e<18;e++){const n=o(t,e),r=this.size-11+e%3,a=Math.floor(e/3);this.setFunctionModule(r,a,n),this.setFunctionModule(a,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){const o=Math.max(Math.abs(r),Math.abs(n)),a=e+r,i=t+n;0<=a&&a<this.size&&0<=i&&i<this.size&&this.setFunctionModule(a,i,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,1!=Math.max(Math.abs(r),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,r=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,r))throw new RangeError("Invalid argument");const o=t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],i=t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],c=Math.floor(t.getNumRawDataModules(n)/8),s=o-c%o,u=Math.floor(c/o);let l=[];const p=t.reedSolomonComputeDivisor(i);for(let n=0,r=0;n<o;n++){let o=e.slice(r,r+u-i+(n<s?0:1));r+=o.length;const a=t.reedSolomonComputeRemainder(o,p);n<s&&o.push(0),l.push(o.concat(a))}let f=[];for(let e=0;e<l[0].length;e++)l.forEach(((t,n)=>{(e!=u-i||n>=s)&&f.push(t[e])}));return a(f.length==c),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let a=0;a<2;a++){const i=t-a,c=0==(t+1&2)?this.size-1-r:r;!this.isFunction[c][i]&&n<8*e.length&&(this.modules[c][i]=o(e[n>>>3],7-(7&n)),n++)}}a(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let r=!1,o=0,a=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[n][i]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[n][i],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,a)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,o=0,a=[0,0,0,0,0,0,0];for(let i=0;i<this.size;i++)this.modules[i][n]==r?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,a),r||(e+=this.finderPenaltyCountPatterns(a)*t.PENALTY_N3),r=this.modules[i][n],o=1);e+=this.finderPenaltyTerminateAndCount(r,o,a)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){const o=this.modules[n][r];o==this.modules[n][r+1]&&o==this.modules[n+1][r]&&o==this.modules[n+1][r+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const r=this.size*this.size,o=Math.ceil(Math.abs(20*n-10*r)/r)-1;return a(0<=o&&o<=9),e+=o*t.PENALTY_N4,a(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return a(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let r=1;for(let o=0;o<e;o++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],r),e+1<n.length&&(n[e]^=n[e+1]);r=t.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(e,n){let r=n.map((e=>0));for(const o of e){const e=o^r.shift();r.push(0),n.forEach(((n,o)=>r[o]^=t.reedSolomonMultiply(n,e)))}return r}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^285*(n>>>7),n^=(t>>>r&1)*e;return a(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];a(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function r(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function o(e,t){return 0!=(e>>>t&1)}function a(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const i=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)r(n,8,t);return new i(i.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!i.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const o=Math.min(e.length-n,3);r(parseInt(e.substr(n,o),10),3*o+1,t),n+=o}return new i(i.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!i.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let o=45*i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));o+=i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),r(o,11,n)}return t<e.length&&r(i.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new i(i.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:i.isNumeric(e)?[i.makeNumeric(e)]:i.isAlphanumeric(e)?[i.makeAlphanumeric(e)]:[i.makeBytes(i.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)r(e,8,t);else if(e<16384)r(2,2,t),r(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,t),r(e,21,t)}return new i(i.Mode.ECI,0,t)}static isNumeric(e){return i.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return i.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const r of e){const e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let c=i;c.NUMERIC_REGEX=/^[0-9]*$/,c.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,c.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=c})(cr||(cr={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})(t=e.QrCode||(e.QrCode={}))})(cr||(cr={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(t=e.QrSegment||(e.QrSegment={}))})(cr||(cr={}));var mr=cr,gr={L:mr.QrCode.Ecc.LOW,M:mr.QrCode.Ecc.MEDIUM,Q:mr.QrCode.Ecc.QUARTILE,H:mr.QrCode.Ecc.HIGH},yr=128,vr="L",br="#FFFFFF",wr="#000000",Or=!1;
|
|
53
53
|
/**
|
|
54
54
|
* @license qrcode.react
|
|
55
55
|
* Copyright (c) Paul O'Shannessy
|
|
56
56
|
* SPDX-License-Identifier: ISC
|
|
57
|
-
*/function xr(e,t=0){const n=[];return e.forEach((function(e,r){let o=null;e.forEach((function(a,i){if(!a&&null!==o)return n.push(`M${o+t} ${r+t}h${i-o}v1H${o+t}z`),void(o=null);if(i!==e.length-1)a&&null===o&&(o=i);else{if(!a)return;null===o?n.push(`M${i+t},${r+t} h1v1H${i+t}z`):n.push(`M${o+t},${r+t} h${i+1-o}v1H${o+t}z`)}}))})),n.join("")}function kr(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function _r(e,t,n,r){if(null==r)return null;const o=n?4:0,a=e.length+2*o,i=Math.floor(.1*t),c=a/t,s=(r.width||i)*c,u=(r.height||i)*c,l=null==r.x?e.length/2-s/2:r.x*c,p=null==r.y?e.length/2-u/2:r.y*c;let f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(p);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(u+p-t)}}return{x:l,y:p,h:u,w:s,excavation:f}}var Sr=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function Er(e){const t=e,{value:n,size:r=yr,level:o=vr,bgColor:a=br,fgColor:i=wr,includeMargin:c=Or,style:s,imageSettings:u}=t,l=hr(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),p=null==u?void 0:u.src,f=(0,w.useRef)(null),d=(0,w.useRef)(null),[h,m]=(0,w.useState)(!1);(0,w.useEffect)((()=>{if(null!=f.current){const e=f.current,t=e.getContext("2d");if(!t)return;let s=mr.QrCode.encodeText(n,gr[o]).getModules();const l=c?4:0,p=s.length+2*l,h=_r(s,r,c,u),m=d.current,g=null!=h&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=h.excavation&&(s=kr(s,h.excavation));const y=window.devicePixelRatio||1;e.height=e.width=r*y;const v=r/p*y;t.scale(v,v),t.fillStyle=a,t.fillRect(0,0,p,p),t.fillStyle=i,Sr?t.fill(new Path2D(xr(s,l))):s.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+l,n+l,1,1)}))})),g&&t.drawImage(m,h.x+l,h.y+l,h.w,h.h)}})),(0,w.useEffect)((()=>{m(!1)}),[p]);const g=dr({height:r,width:r},s);let y=null;return null!=p&&(y=O().createElement("img",{src:p,key:p,style:{display:"none"},onLoad:()=>{m(!0)},ref:d})),O().createElement(O().Fragment,null,O().createElement("canvas",dr({style:g,height:r,width:r,ref:f},l)),y)}function Ar(e){const t=e,{value:n,size:r=yr,level:o=vr,bgColor:a=br,fgColor:i=wr,includeMargin:c=Or,imageSettings:s}=t,u=hr(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let l=mr.QrCode.encodeText(n,gr[o]).getModules();const p=c?4:0,f=l.length+2*p,d=_r(l,r,c,s);let h=null;null!=s&&null!=d&&(null!=d.excavation&&(l=kr(l,d.excavation)),h=O().createElement("image",{xlinkHref:s.src,height:d.h,width:d.w,x:d.x+p,y:d.y+p,preserveAspectRatio:"none"}));const m=xr(l,p);return O().createElement("svg",dr({height:r,width:r,viewBox:`0 0 ${f} ${f}`},u),O().createElement("path",{fill:a,d:`M0,0 h${f}v${f}H0z`,shapeRendering:"crispEdges"}),O().createElement("path",{fill:i,d:m,shapeRendering:"crispEdges"}),h)}var Pr=e=>{const t=e,{renderAs:n}=t,r=hr(t,["renderAs"]);return"svg"===n?O().createElement(Ar,dr({},r)):O().createElement(Er,dr({},r))};const jr=function(e){var t=e.value;return(0,Pe.jsx)(Pr,{value:t,renderAs:"svg"})};var Cr,Dr,Tr,Rr,Ir,Mr,Nr=x.ZP.div.withConfig({displayName:"StyledQRCodeWrapper"})(Cr||(Cr=b()(["\n display: flex;\n justify-content: center;\n margin: "," "," "," ",";\n"])),Ke.Z.space(1.2),Ke.Z.space(1),Ke.Z.space(1.5),Ke.Z.space(1)),Zr=x.ZP.div.withConfig({displayName:"StyledParagraph"})(Dr||(Dr=b()(["\n display: flex;\n justify-content: center;\n margin-top: ",";\n margin-bottom: ",";\n"])),Ke.Z.space(-1),Ke.Z.space(-.9));const Br=function(e){var t=e.secret,n=e.goToSecretVerification;return(0,Jn.z)(n),(0,Pe.jsxs)(Pe.Fragment,{children:[Tr||(Tr=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.qrCodeInfo"})})),(0,Pe.jsx)(Nr,{children:(0,Pe.jsx)(jr,{value:t.uri})}),Rr||(Rr=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.secretInfo"})})),(0,Pe.jsx)(Zr,{children:(0,Pe.jsx)(rt.ZP.B,{children:t.secret})}),Ir||(Ir=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.backupInfo"})})),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{ink:"primary",look:"raised",onClick:n,children:Mr||(Mr=(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.nextButton"}))})})]})};var Lr={goToSecretVerification:function(){return{type:Fn}}};const Fr=(0,f.connect)((function(e){return{secret:e.twoFactorConnector.secret}}),Lr)((0,p.ZP)(Br));var Ur;const Hr=function(e){var t=e.twoFactorActive,n=e.forced,r=e.requestSecret,o=e.intl;(0,Jn.z)(r);var a=function(e){return o.formatMessage({id:e})};return(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsx)(rt.ZP.P,{children:function(){if(t)return Ur||(Ur=(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.overwriteInfo"}));var e=a(n?"client.two-factor-connector.forcedInfo":"client.two-factor-connector.info");return(0,Pe.jsx)("span",{dangerouslySetInnerHTML:{__html:e}})}()}),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:a("client.two-factor-connector.nextButton"),ink:"primary",look:"raised",onClick:r})})]})};var Wr={initialize:qn,requestSecret:function(){return{type:Ln}}};const zr=(0,f.connect)((function(e){return{twoFactorActive:e.twoFactorConnector.twoFactorActive,secret:e.twoFactorConnector.secret,forced:e.input.forced}}),Wr)((0,p.ZP)(Hr));var Vr=i(57557),Yr=i.n(Vr),qr=i(41609),Gr=i.n(qr),Kr=i(14293),$r=i.n(Kr),Xr=i(23493),Qr=i.n(Xr),Jr=i(33417),eo=i(1972),to=i(32924),no=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var ro=i(2717);function oo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ao(e,t){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ao(e,t)}function io(e){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},io(e)}var co=i(62360);function so(e,t){if(t&&("object"===(0,co.Z)(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)}function uo(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,r=io(e);if(t){var o=io(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return so(this,n)}}var lo=i(31599);var po=i(78001);function fo(e){return function(e){if(Array.isArray(e))return(0,lo.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,po.Z)(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.")}()}var ho=i(99388),mo=i(1537),go=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function yo(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||go(r)&&go(o)))return!1;var r,o;return!0}for(var vo={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},bo=function(e){return(0,mo.tZ)("span",(0,ro.Z)({css:vo},e))},wo={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" 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";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,a=void 0===o?"":o,i=e.selectValue,c=e.isDisabled,s=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(a," focused, ").concat(u(i,n),".");if("menu"===t){var l=c?" disabled":"",p="".concat(s?"selected":"focused").concat(l);return"option ".concat(a," ").concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Oo=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,i=e.selectValue,c=e.selectProps,s=e.id,u=c.ariaLiveMessages,l=c.getOptionLabel,p=c.inputValue,f=c.isMulti,d=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,g=c.options,y=c.screenReaderStatus,v=c.tabSelectsValue,b=c["aria-label"],O=c["aria-live"],x=(0,w.useMemo)((function(){return(0,Jr.Z)((0,Jr.Z)({},wo),u||{})}),[u]),k=(0,w.useMemo)((function(){var e,n="";if(t&&x.onChange){var r=t.option,o=t.options,a=t.removedValue,c=t.removedValues,s=t.value,u=a||r||(e=s,Array.isArray(e)?null:e),p=u?l(u):"",f=o||c||void 0,h=f?f.map(l):[],m=(0,Jr.Z)({isDisabled:u&&d(u,i),label:p,labels:h},t);n=x.onChange(m)}return n}),[t,x,d,i,l]),_=(0,w.useMemo)((function(){var e="",t=n||r,a=!!(n&&i&&i.includes(n));if(t&&x.onFocus){var c={focused:t,label:l(t),isDisabled:d(t,i),isSelected:a,options:o,context:t===n?"menu":"value",selectValue:i};e=x.onFocus(c)}return e}),[n,r,l,d,x,o,i]),S=(0,w.useMemo)((function(){var e="";if(m&&g.length&&x.onFilter){var t=y({count:o.length});e=x.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,m,x,g,y]),E=(0,w.useMemo)((function(){var e="";if(x.guidance){var t=r?"value":m?"menu":"input";e=x.guidance({"aria-label":b,context:t,isDisabled:n&&d(n,i),isMulti:f,isSearchable:h,tabSelectsValue:v})}return e}),[b,n,r,f,d,h,m,x,i,v]),A="".concat(_," ").concat(S," ").concat(E),P=(0,mo.tZ)(w.Fragment,null,(0,mo.tZ)("span",{id:"aria-selection"},k),(0,mo.tZ)("span",{id:"aria-context"},A)),j="initial-input-focus"===(null==t?void 0:t.action);return(0,mo.tZ)(w.Fragment,null,(0,mo.tZ)(bo,{id:s},j&&P),(0,mo.tZ)(bo,{"aria-live":O,"aria-atomic":"false","aria-relevant":"additions text"},a&&!j&&P))},xo=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],ko=new RegExp("["+xo.map((function(e){return e.letters})).join("")+"]","g"),_o={},So=0;So<xo.length;So++)for(var Eo=xo[So],Ao=0;Ao<Eo.letters.length;Ao++)_o[Eo.letters[Ao]]=Eo.base;var Po=function(e){return e.replace(ko,(function(e){return _o[e]}))},jo=function(e,t){void 0===t&&(t=yo);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}(Po),Co=function(e){return e.replace(/^\s+|\s+$/g,"")},Do=function(e){return"".concat(e.label," ").concat(e.value)},To=["innerRef"];function Ro(e){var t=e.innerRef,n=(0,to.Z)(e,To),r=(0,ho.r)(n,"onExited","in","enter","exit","appear");return(0,mo.tZ)("input",(0,ro.Z)({ref:t},r,{css:(0,mo.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Io=["boxSizing","height","overflow","paddingRight","position"],Mo={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function No(e){e.preventDefault()}function Zo(e){e.stopPropagation()}function Bo(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Lo(){return"ontouchstart"in window||navigator.maxTouchPoints}var Fo=!("undefined"==typeof window||!window.document||!window.document.createElement),Uo=0,Ho={capture:!1,passive:!1};var Wo=function(){return document.activeElement&&document.activeElement.blur()},zo={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Vo(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,i=(0,w.useRef)(!1),c=(0,w.useRef)(!1),s=(0,w.useRef)(0),u=(0,w.useRef)(null),l=(0,w.useCallback)((function(e,t){if(null!==u.current){var s=u.current,l=s.scrollTop,p=s.scrollHeight,f=s.clientHeight,d=u.current,h=t>0,m=p-f-l,g=!1;m>t&&i.current&&(r&&r(e),i.current=!1),h&&c.current&&(a&&a(e),c.current=!1),h&&t>m?(n&&!i.current&&n(e),d.scrollTop=p,g=!0,i.current=!0):!h&&-t>l&&(o&&!c.current&&o(e),d.scrollTop=0,g=!0,c.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,a]),p=(0,w.useCallback)((function(e){l(e,e.deltaY)}),[l]),f=(0,w.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),d=(0,w.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;l(e,t)}),[l]),h=(0,w.useCallback)((function(e){if(e){var t=!!ho.s&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",d,t)}}),[d,f,p]),m=(0,w.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",d,!1))}),[d,f,p]);return(0,w.useEffect)((function(){if(t){var e=u.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,w.useRef)({}),a=(0,w.useRef)(null),i=(0,w.useCallback)((function(e){if(Fo){var t=document.body,n=t&&t.style;if(r&&Io.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&Uo<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,c=window.innerWidth-i+a||0;Object.keys(Mo).forEach((function(e){var t=Mo[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(c,"px"))}t&&Lo()&&(t.addEventListener("touchmove",No,Ho),e&&(e.addEventListener("touchstart",Bo,Ho),e.addEventListener("touchmove",Zo,Ho))),Uo+=1}}),[r]),c=(0,w.useCallback)((function(e){if(Fo){var t=document.body,n=t&&t.style;Uo=Math.max(Uo-1,0),r&&Uo<1&&Io.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Lo()&&(t.removeEventListener("touchmove",No,Ho),e&&(e.removeEventListener("touchstart",Bo,Ho),e.removeEventListener("touchmove",Zo,Ho)))}}),[r]);return(0,w.useEffect)((function(){if(t){var e=a.current;return i(e),function(){c(e)}}}),[t,i,c]),function(e){a.current=e}}({isEnabled:n});return(0,mo.tZ)(w.Fragment,null,n&&(0,mo.tZ)("div",{onClick:Wo,css:zo}),t((function(e){o(e),a(e)})))}var Yo={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},qo=function(e){var t=e.name,n=e.onFocus;return(0,mo.tZ)("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:Yo,value:"",onChange:function(){}})},Go={clearIndicator:ho.a,container:ho.b,control:ho.d,dropdownIndicator:ho.e,group:ho.g,groupHeading:ho.f,indicatorsContainer:ho.i,indicatorSeparator:ho.h,input:ho.j,loadingIndicator:ho.l,loadingMessage:ho.k,menu:ho.m,menuList:ho.n,menuPortal:ho.o,multiValue:ho.p,multiValueLabel:ho.q,multiValueRemove:ho.t,noOptionsMessage:ho.u,option:ho.v,placeholder:ho.w,singleValue:ho.x,valueContainer:ho.y};var Ko,$o={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}},Xo={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,ho.z)(),captureMenuScroll:!(0,ho.z)(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=(0,Jr.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:Do,trim:!0,matchFrom:"any"},Ko),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,c=n.matchFrom,s=i?Co(t):t,u=i?Co(a(e)):a(e);return r&&(s=s.toLowerCase(),u=u.toLowerCase()),o&&(s=jo(s),u=Po(u)),"start"===c?u.substr(0,s.length)===s:u.indexOf(s)>-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:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,ho.A)(),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,unstyled:!1};function Qo(e,t,n,r){return{type:"option",data:t,isDisabled:oa(e,t,n),isSelected:aa(e,t,n),label:na(e,t),value:ra(e,t),index:r}}function Jo(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Qo(e,n,t,r)})).filter((function(t){return ta(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=Qo(e,n,t,r);return ta(e,a)?a:void 0})).filter(ho.G)}function ea(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,fo(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ta(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,c=t.value;return(!ca(e)||!a)&&ia(e,{label:i,value:c,data:o},r)}var na=function(e,t){return e.getOptionLabel(t)},ra=function(e,t){return e.getOptionValue(t)};function oa(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function aa(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ra(e,t);return n.some((function(t){return ra(e,t)===r}))}function ia(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ca=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},sa=1,ua=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&&ao(e,t)}(a,e);var t,n,r,o=uo(a);function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,a=r.name;n.name=a,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,a=o.closeMenuOnSelect,i=o.isMulti,c=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:c}),a&&(t.setState({inputIsHiddenAfterUpdate:!i}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,a=n.name,i=t.state.selectValue,c=o&&t.isOptionSelected(e,i),s=t.isOptionDisabled(e,i);if(c){var u=t.getOptionValue(e);t.setValue((0,ho.B)(i.filter((function(e){return t.getOptionValue(e)!==u}))),"deselect-option",e)}else{if(s)return void t.ariaOnChange((0,ho.C)(e),{action:"select-option",option:e,name:a});o?t.setValue((0,ho.B)([].concat(fo(i),[e])),"select-option",e):t.setValue((0,ho.C)(e),"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),a=r.filter((function(e){return t.getOptionValue(e)!==o})),i=(0,ho.D)(n,a,a[0]||null);t.onChange(i,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange((0,ho.D)(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),a=(0,ho.D)(e,o,o[0]||null);t.onChange(a,{action:"pop-value",removedValue:r})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ho.E.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return na(t.props,e)},t.getOptionValue=function(e){return ra(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=Go[e](n,r);o.boxSizing="border-box";var a=t.props.styles[e];return a?a(o,n):o},t.getClassNames=function(e,n){var r,o;return null===(r=(o=t.props.classNames)[e])||void 0===r?void 0:r.call(o,n)},t.getElementId=function(e){return"".concat(t.instancePrefix,"-").concat(e)},t.getComponents=function(){return(0,ho.F)(t.props)},t.buildCategorizedOptions=function(){return Jo(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return ea(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:(0,Jr.Z)({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&(0,ho.H)(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),a=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||a>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return ca(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,c=n.isClearable,s=n.isDisabled,u=n.menuIsOpen,l=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=t.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(s||"function"==typeof l&&(l(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||i)return;t.focusValue("previous");break;case"ArrowRight":if(!r||i)return;t.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():c&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!p||!h||f&&t.isOptionSelected(h,g))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:i}),t.onMenuClose()):c&&a&&t.clearValue();break;case" ":if(i)return;if(!u){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++sa),t.state.selectValue=(0,ho.I)(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.buildFocusableOptions(),r=n.indexOf(t.state.selectValue[0]);t.state.focusedOption=n[r]}return t}return t=a,n=[{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(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&(0,ho.J)(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,ho.J)(this.menuListRef,this.focusedOptionRef),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(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),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,n=this.state,r=n.selectValue,o=n.isFocused,a=this.buildFocusableOptions(),i="first"===e?0:a.length-1;if(!this.props.isMulti){var c=a.indexOf(r[0]);c>-1&&(i=c)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o<a&&(i=o+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme($o):(0,Jr.Z)((0,Jr.Z)({},$o),this.props.theme):$o}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,a=this.selectOption,i=this.setValue,c=this.props,s=c.isMulti,u=c.isRtl,l=c.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:a,selectProps:c,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().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 oa(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return aa(this.props,e,t)}},{key:"filterOption",value:function(e,t){return ia(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}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:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=e.form,c=e.menuIsOpen,s=e.required,u=this.getComponents().Input,l=this.state,p=l.inputIsHidden,f=l.ariaSelection,d=this.commonProps,h=r||this.getElementId("input"),m=(0,Jr.Z)((0,Jr.Z)((0,Jr.Z)({"aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":s,role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?w.createElement(u,(0,ro.Z)({},d,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},m)):w.createElement(Ro,(0,ro.Z)({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ho.K,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:i,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,c=t.Placeholder,s=this.commonProps,u=this.props,l=u.controlShouldRenderValue,p=u.isDisabled,f=u.isMulti,d=u.inputValue,h=u.placeholder,m=this.state,g=m.selectValue,y=m.focusedValue,v=m.isFocused;if(!this.hasValue()||!l)return d?null:w.createElement(c,(0,ro.Z)({},s,{key:"placeholder",isDisabled:p,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map((function(t,i){var c=t===y,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return w.createElement(n,(0,ro.Z)({},s,{components:{Container:r,Label:o,Remove:a},isFocused:c,isDisabled:p,key:u,index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(d)return null;var b=g[0];return w.createElement(i,(0,ro.Z)({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(e,(0,ro.Z)({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?w.createElement(e,(0,ro.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return w.createElement(n,(0,ro.Z)({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(e,(0,ro.Z)({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,c=t.LoadingMessage,s=t.NoOptionsMessage,u=t.Option,l=this.commonProps,p=this.state.focusedOption,f=this.props,d=f.captureMenuScroll,h=f.inputValue,m=f.isLoading,g=f.loadingMessage,y=f.minMenuHeight,v=f.maxMenuHeight,b=f.menuIsOpen,O=f.menuPlacement,x=f.menuPosition,k=f.menuPortalTarget,_=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,E=f.noOptionsMessage,A=f.onMenuScrollToTop,P=f.onMenuScrollToBottom;if(!b)return null;var j,C=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,c=t.label,s=t.value,f=p===o,d=a?void 0:function(){return e.onOptionHover(o)},h=a?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:h,onMouseMove:d,onMouseOver:d,tabIndex:-1};return w.createElement(u,(0,ro.Z)({},l,{innerProps:g,data:o,isDisabled:a,isSelected:i,key:m,label:c,type:r,value:s,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())j=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,a=t.options,i=t.index,c="".concat(e.getElementId("group"),"-").concat(i),s="".concat(c,"-heading");return w.createElement(n,(0,ro.Z)({},l,{key:c,data:o,options:a,Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return C(e,"".concat(i,"-").concat(e.index))})))}if("option"===t.type)return C(t,"".concat(t.index))}));else if(m){var D=g({inputValue:h});if(null===D)return null;j=w.createElement(c,l,D)}else{var T=E({inputValue:h});if(null===T)return null;j=w.createElement(s,l,T)}var R={minMenuHeight:y,maxMenuHeight:v,menuPlacement:O,menuPosition:x,menuShouldScrollIntoView:S},I=w.createElement(ho.M,(0,ro.Z)({},l,R),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,c=r.maxHeight;return w.createElement(o,(0,ro.Z)({},l,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:i}),w.createElement(Vo,{captureEnabled:d,onTopArrive:A,onBottomArrive:P,lockEnabled:_},(function(t){return w.createElement(a,(0,ro.Z)({},l,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:c,focusedOption:p}),j)})))}));return k||"fixed"===x?w.createElement(i,(0,ro.Z)({},l,{appendTo:k,controlElement:this.controlRef,menuPlacement:O,menuPosition:x}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=t.required,c=this.state.selectValue;if(a&&!r){if(i&&!this.hasValue())return w.createElement(qo,{name:a,onFocus:this.onValueInputFocus});if(o){if(n){var s=c.map((function(t){return e.getOptionValue(t)})).join(n);return w.createElement("input",{name:a,type:"hidden",value:s})}var u=c.length>0?c.map((function(t,n){return w.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):w.createElement("input",{name:a,type:"hidden",value:""});return w.createElement("div",null,u)}var l=c[0]?this.getOptionValue(c[0]):"";return w.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.isFocused,i=t.selectValue,c=this.getFocusableOptions();return w.createElement(Oo,(0,ro.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:i,focusableOptions:c}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,c=a.id,s=a.isDisabled,u=a.menuIsOpen,l=this.state.isFocused,p=this.commonProps=this.getCommonProps();return w.createElement(r,(0,ro.Z)({},p,{className:i,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),w.createElement(t,(0,ro.Z)({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l,menuIsOpen:u}),w.createElement(o,(0,ro.Z)({},p,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(n,(0,ro.Z)({},p,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,i=t.isFocused,c=t.prevWasFocused,s=e.options,u=e.value,l=e.menuIsOpen,p=e.inputValue,f=e.isMulti,d=(0,ho.I)(u),h={};if(n&&(u!==n.value||s!==n.options||l!==n.menuIsOpen||p!==n.inputValue)){var m=l?function(e,t){return ea(Jo(e,t))}(e,d):[],g=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,d):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);h={selectValue:d,focusedOption:y,focusedValue:g,clearFocusValueOnUpdate:!1}}var v=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},b=a,w=i&&c;return i&&!w&&(b={value:(0,ho.D)(f,d,d[0]||null),options:d,action:"initial-input-focus"},w=!c),"initial-input-focus"===(null==a?void 0:a.action)&&(b=null),(0,Jr.Z)((0,Jr.Z)((0,Jr.Z)({},h),v),{},{prevProps:e,ariaSelection:b,prevWasFocused:w})}}],n&&oo(t.prototype,n),r&&oo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(w.Component);ua.defaultProps=Xo;i(66751),i(30314),i(73469);var la=(0,w.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,a=e.defaultValue,i=void 0===a?null:a,c=e.inputValue,s=e.menuIsOpen,u=e.onChange,l=e.onInputChange,p=e.onMenuClose,f=e.onMenuOpen,d=e.value,h=(0,to.Z)(e,no),m=(0,w.useState)(void 0!==c?c:n),g=(0,eo.Z)(m,2),y=g[0],v=g[1],b=(0,w.useState)(void 0!==s?s:o),O=(0,eo.Z)(b,2),x=O[0],k=O[1],_=(0,w.useState)(void 0!==d?d:i),S=(0,eo.Z)(_,2),E=S[0],A=S[1],P=(0,w.useCallback)((function(e,t){"function"==typeof u&&u(e,t),A(e)}),[u]),j=(0,w.useCallback)((function(e,t){var n;"function"==typeof l&&(n=l(e,t)),v(void 0!==n?n:e)}),[l]),C=(0,w.useCallback)((function(){"function"==typeof f&&f(),k(!0)}),[f]),D=(0,w.useCallback)((function(){"function"==typeof p&&p(),k(!1)}),[p]),T=void 0!==c?c:y,R=void 0!==s?s:x,I=void 0!==d?d:E;return(0,Jr.Z)((0,Jr.Z)({},h),{},{inputValue:T,menuIsOpen:R,onChange:P,onInputChange:j,onMenuClose:D,onMenuOpen:C,value:I})}(e);return w.createElement(ua,(0,ro.Z)({ref:t},n))}));const pa=la;var fa=i(80470);function da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?da(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):da(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ma=(0,p.ZP)((function(e){var t;return(0,Pe.jsx)("span",ha(ha({},e.innerProps),{},{children:(0,Pe.jsx)(fa.Z,{icon:"times",tabIndex:-1,"aria-label":(t="client.component.select.clearFieldLabel",e.intl.formatMessage({id:t}))})}))}));var ga=i(95497);function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function va(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ya(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ba=function(e){var t=e.selectProps,n=t.isDisabled,r=t.menuIsOpen;return n?null:(0,Pe.jsx)(ho.c.DropdownIndicator,va(va({},e),{},{children:(0,Pe.jsxs)(ga.M6,{children:[(0,Pe.jsx)(ga.A,{icon:"chevron-down",visible:!r,tabIndex:-1}),(0,Pe.jsx)(ga.A,{icon:"chevron-up",visible:r,tabIndex:-1})]})}))};var wa,Oa,xa;function ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ka(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ka(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Sa=function(e,t,n){return function(r){r.stopPropagation(),e(t,n)}},Ea=function(e,t){return function(n){n.stopPropagation(),e(t)}},Aa=function(e,t){return function(n){n.stopPropagation(),e(t)}},Pa=function(e){e.stopPropagation()};const ja=function(e){var t=e.selectProps,n=t.openDocsTreeSearch,r=t.openAdvancedSearch,o=t.openRemoteCreate,a=t.isDisabled,i=t.hasDocsTreeSearch,c=t.hasAdvancedSearch,s=t.createPermission,u=t.value,l=t.isMulti,p=t.inputValue,f=l&&(c||i);return(0,Pe.jsx)(ga.HO,{isTopAligned:f,children:(0,Pe.jsxs)(ho.c.IndicatorsContainer,_a(_a({},e),{},{children:[e.children,n&&!a&&(0,Pe.jsx)("span",{onTouchEnd:Pa,onMouseDown:Ea(n,u),children:wa||(wa=(0,Pe.jsx)(fa.Z,{icon:"folder",tabIndex:-1}))}),r&&!a&&(0,Pe.jsx)("span",{onTouchEnd:Pa,onMouseDown:Sa(r,p,u),children:Oa||(Oa=(0,Pe.jsx)(fa.Z,{icon:"search",tabIndex:-1}))}),s&&!a&&(0,Pe.jsx)("span",{onTouchEnd:Pa,onMouseDown:Aa(o,u),children:xa||(xa=(0,Pe.jsx)(fa.Z,{icon:"plus",tabIndex:-1}))})]}))})};var Ca,Da=i(93235);const Ta=function(){return Ca||(Ca=(0,Pe.jsx)("span",{children:(0,Pe.jsx)(Da.Z,{size:"1.8rem"})}))};function Ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ia(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ra(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ra(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ma=function(e){var t=e.selectProps,n=e.children;return(0,Pe.jsx)(ga._M,{attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together"}],renderTarget:function(e){return(0,Pe.jsx)("div",{ref:e})},renderElement:function(r){return(0,Pe.jsx)("div",{ref:r,children:(0,Pe.jsx)(ga.l2,Ia(Ia({},Yr()(e,["innerRef"])),{},{wrapperWidth:t.wrapperWidth,wrapperHeight:t.wrapperHeight,children:n}))})}})};function Na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Za(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Na(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ba=function(e){var t=e.selectProps,n=e.children,r=t.moreOptionsAvailable,o=t.moreOptionsAvailableText;return(0,Pe.jsxs)(ho.c.MenuList,Za(Za({},e),{},{className:"MenuList",children:[n,r&&(0,Pe.jsx)(ga.OA,{children:o})]}))};var La,Fa=i(27361),Ua=i.n(Fa),Ha=i(76791);const Wa=x.ZP.span(La||(La=b()(["\n pointer-events: auto;\n cursor: pointer;\n"])));function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?za(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):za(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ya=function(e){var t=e.data,n=e.innerProps,r=e.children,o=e.selectProps,a=o.tooltips,i=o.loadTooltip,c=o.DetailLink,s=Ua()(a,t.key,null),u=(0,Pe.jsx)("span",Va(Va({},n),{},{children:r})),l=c?(0,Pe.jsx)(Wa,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,Pe.jsx)(c,{entityKey:t.key,children:(0,Pe.jsx)(Ha.Z,{content:s?(0,Pe.jsx)("div",{dangerouslySetInnerHTML:{__html:ve.Z.sanitizeHtml(s)}}):null,children:(0,Pe.jsx)("span",{onMouseOver:function(){return i&&!s&&i(t.key)},children:u})})})}):u;return(0,Pe.jsx)(ga.B1,{children:l})};var qa=i(47037),Ga=i.n(qa),Ka=i(14176),$a=i.n(Ka);function Xa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xa(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ja=["linkComp"],ei=function(e,t){var n=ye.Z.difference(e,t),r=$a()(Yr()(n,Ja),(function(e){return 0===Object.keys(e).length}));return 0===Object.entries(r).length},ti=(0,w.memo)((function(e){var t=e.linkComp,n=e.entityKey,r=e.children;return t&&Ga()(n)?(0,Pe.jsx)(Wa,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,Pe.jsx)(t,{entityKey:n,children:r})}):r}),ei);ti.propTypes={children:o().node,entityKey:o().any,linkComp:o().func};const ni=function(e){var t=e.data,n=e.selectProps,r=e.isDisabled,o=e.children,a=n.tooltips,i=n.loadTooltip,c=n.DetailLink,s=Ua()(a,t.key,null);return(0,Pe.jsx)(ho.c.SingleValue,Qa(Qa({},e),{},{children:(0,Pe.jsx)(ga.xq,{onMouseOver:function(){return i&&!s&&i(t.key)},isDisabled:r,children:(0,Pe.jsx)(Ha.Z,{content:s?(0,Pe.jsx)("div",{dangerouslySetInnerHTML:{__html:ve.Z.sanitizeHtml(s)}}):null,children:(0,Pe.jsx)(ti,{linkComp:c,entityKey:t.key,children:o})})})}))};function ri(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var oi=function(e){var t;return"Input"===(null==e||null===(t=e.type)||void 0===t?void 0:t.name)};const ai=function(e){var t=e.selectProps,r=e.hasValue,o=e.children,a=t.isMulti,i=t.hasAdvancedSearch,c=t.hasDocsTreeSearch,s=t.isDisabled;if(!(a&&(i||c)))return(0,Pe.jsx)(ho.c.ValueContainer,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ri(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ri(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e));var u=w.Children.map(o,(function(e){return oi(e)?e:null})),l=w.Children.map(o,(function(e){return oi(e)?null:e})),p=s&&r;return(0,Pe.jsxs)(Pe.Fragment,{children:[!p&&(0,Pe.jsx)(Pe.Fragment,{children:u}),(0,Pe.jsx)(ga.eQ,{children:l})]})};function ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ci(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ii(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ii(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const si=(0,x.Zz)((function(e){var t=e.fetchOptions,n=e.id,r=e.immutable,o=e.isLoading,a=e.isMulti,i=e.loadTooltip,c=e.moreOptionsAvailable,s=e.moreOptionsAvailableText,u=e.noResultsText,l=e.noResultsComp,p=e.onChange,f=e.openDocsTreeSearch,d=e.openAdvancedSearch,h=e.options,m=e.searchOptions,g=e.theme,y=e.tooltips,v=e.value,b=e.DetailLink,O=e.createPermission,x=e.openRemoteCreate,k=(0,w.useRef)(null),_=(0,w.useRef)(null),S=function(){var e;return(null===(e=_.current)||void 0===e?void 0:e.clientWidth)||300},E=function(){var e;return(null===(e=_.current)||void 0===e?void 0:e.clientHeight)||35},A=(0,w.useState)(S()),P=U()(A,2),j=P[0],C=P[1],D=(0,w.useState)(E()),T=U()(D,2),R=T[0],I=T[1],M=(0,w.useState)(!1),N=U()(M,2),Z=N[0],B=N[1],L=function(e){t&&t(e)},F=(0,w.useCallback)(m||function(){},[]),H=(0,w.useCallback)(Qr()(F,800,{trailing:!0}),[]),W=Boolean(d),z=Boolean(f),V=Boolean(O);return(0,Pe.jsx)(ga.sP,{tabIndex:"-1",id:n,onFocus:function(){k.current.focus(),setTimeout((function(){C(S()),I(E())}),0)},children:(0,Pe.jsx)(ga.RU,{ref:_,children:(0,Pe.jsx)(pa,ci(ci({getOptionLabel:function(e){return e.display},getOptionValue:function(e){return e.key},wrapperWidth:j,wrapperHeight:R,components:{ClearIndicator:ma,LoadingIndicator:Ta,DropdownIndicator:ba,IndicatorsContainer:ja,IndicatorSeparator:null,Menu:Ma,MenuList:Ba,MultiValueLabel:Ya,SingleValue:ni,ValueContainer:ai},noOptionsMessage:function(e){return u||("function"==typeof l?(0,Pe.jsx)(l,ci({},e)):" - ")},isMulti:a,closeMenuOnSelect:!a,isSearchable:!0},m?{filterOption:function(){return!0}}:{}),{},{isClearable:!0,loadingMessage:function(){return null},placeholder:"",menuShouldScrollIntoView:!1,autoFocus:!1,value:v||null,onChange:function(e){p(e),L(e)},onInputChange:function(e,t){var n=t.action;m&&e&&H(e,v),""===e&&"input-change"===n&&L(v)},options:Oe()(h||[]),onKeyDown:function(e){"Enter"===e.key&&Z&&e.stopPropagation()},isLoading:o,isDisabled:r,ref:k,onMenuOpen:function(){L(v),B(!0)},onMenuClose:function(){B(!1)},styles:(0,ga.i4)(g),loadTooltip:i,tooltips:y,DetailLink:b,hasDocsTreeSearch:z,openDocsTreeSearch:f,hasAdvancedSearch:W,openAdvancedSearch:d,moreOptionsAvailable:c,moreOptionsAvailableText:s,blurInputOnSelect:!1,hasCreatePermission:V,createPermission:O,openRemoteCreate:x,closeMenuOnScroll:function(e){var t;return!(null!==(t=e.target.classList)&&void 0!==t&&t.contains("MenuList"))}}))})})}));const ui=function(e){var t=e.id,n=e.immutable,r=e.value,o=e.options,a=o.trueLabel,i=o.falseLabel,c=e.onChange;return(0,Pe.jsx)(si,{id:t,immutable:n,isMulti:!1,onChange:function(e){return c(e?e.key:null)},value:$r()(r)?r:{key:r,display:r?a:i},openMenuOnClick:!0,options:[{key:!0,display:a},{key:!1,display:i}]})};var li,pi=x.ZP.div.withConfig({displayName:"StyledBoolEdit"})(li||(li=b()(["\n margin: 5px 0;\n"])));const fi=function(e){return(0,Pe.jsx)(pi,{children:(0,Pe.jsx)("input",{type:"checkbox",checked:e.value||!1,name:e.name,onChange:function(t){e.onChange&&e.onChange(t.target.checked)},id:e.id,disabled:e.immutable})})};var di,hi;function mi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mi(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var yi=x.ZP.div.withConfig({displayName:"StyledOption"})(di||(di=b()(["\n margin: 5px 0;\n"]))),vi=x.ZP.span.withConfig({displayName:"StyledLabel"})(hi||(hi=b()(["\n ","\n display: inline-block;\n"])),(0,ht.Z)()),bi={single:"radio",multiple:"checkbox"},wi={single:{checked:!1},multiple:{}},Oi=function(e){var t=e.groupName,n=e.id,r=e.label,o=e.checked,a=e.immutable,i=e.selectionType,c=e.renderHtmlInOptions,s=e.handleChange;return(0,Pe.jsxs)(yi,{children:[(0,Pe.jsx)("input",{name:t,type:bi[i],checked:o||!1,onChange:s,id:n,disabled:a}),(0,Pe.jsx)(vi,{children:c?(0,Pe.jsx)("span",{dangerouslySetInnerHTML:{__html:ve.Z.sanitizeHtml(r)}}):r})]})};const xi=function(e){var t=function(t){if(e.onChange){var n=e.value.options.map((function(n){return gi(gi({},n),n.id===t.target.id?{checked:t.target.checked}:wi[e.options.selectionType])}));e.onChange({options:n})}};return(0,Pe.jsx)(Pe.Fragment,{children:e.value.options.map((function(n){return(0,Pe.jsx)(Oi,{groupName:e.id,id:n.id,label:n.label,checked:n.checked,immutable:e.immutable,selectionType:e.options.selectionType,renderHtmlInOptions:e.options.renderHtmlInOptions,handleChange:t},n.id)}))})};var ki=i(23279),_i=i.n(ki);function Si(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ei(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Si(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ai=(0,w.lazy)((function(){return Promise.all([i.e(560),i.e(85)]).then(i.bind(i,30919))}));const Pi=function(e){return(0,Pe.jsx)(w.Suspense,{fallback:(t=e.value,(0,Pe.jsx)("div",{children:(0,Pe.jsx)("p",{children:t})})),children:(0,Pe.jsx)(Ai,Ei({},e))});var t};var ji,Ci=x.ZP.div.withConfig({displayName:"StyledEditorWrapper"})(ji||(ji=b()(["\n margin-top: ",";\n"])),Ke.Z.space(-1.5));const Di=function(e){var t=e.value,n=e.onChange,r=e.immutable,o=e.options;return(0,Pe.jsx)(Ci,{children:(0,Pe.jsx)(Pi,{value:t,onChange:_i()(n,1e3),autoFocusOnMount:o.autoFocusOnMount,mode:o.mode,theme:"textmate",showGutter:!0,editorOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,minLines:5,maxLines:50,readOnly:r,wrap:!0,indentedSoftWrap:!1},implicitModel:o.implicitModel})})};var Ti=i(86896),Ri=i(23842),Ii=i(93379),Mi=i.n(Ii),Ni=i(7795),Zi=i.n(Ni),Bi=i(90569),Li=i.n(Bi),Fi=i(3565),Ui=i.n(Fi),Hi=i(19216),Wi=i.n(Hi),zi=i(44589),Vi=i.n(zi),Yi=i(16721),qi={};qi.styleTagTransform=Vi(),qi.setAttributes=Ui(),qi.insert=Li().bind(null,"head"),qi.domAPI=Zi(),qi.insertStyleElement=Wi();Mi()(Yi.Z,qi);Yi.Z&&Yi.Z.locals&&Yi.Z.locals;var Gi,Ki,$i,Xi=i(9198),Qi=i.n(Xi),Ji=i(23855),ec=x.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(Gi||(Gi=b()(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),tc=x.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(Ki||(Ki=b()(["\n &&&& {\n ","\n\n & .react-datepicker__input-container {\n & input {\n ","\n width: calc(100% - 5px);\n }\n }\n\n & .react-datepicker {\n & .react-datepicker__today-button {\n ","\n }\n }\n }\n"])),mt,yt,(function(e){return e.hasTime&&"border-bottom: 1px solid #aeaeae;"})),nc=x.ZP.input.withConfig({displayName:"StyledTimeInput"})($i||($i=b()(["\n &&&& {\n ","\n }\n"])),yt),rc=i(37042),oc=i(4543),ac=i(39880),ic=i(85817),cc=i(39159),sc=i(77881),uc=i(14372),lc=i(12274),pc=i(13882);function fc(e,t,n){return(0,pc.Z)(2,arguments),(0,lc.default)((0,uc.default)(e,t,new Date,n))}var dc=i(69119),hc="react-datepicker-time__input",mc="react-datepicker__day",gc="react-datepicker__input",yc=function(e){return e.classList.contains(mc)},vc=function(e){return e.classList.contains(hc)},bc=function(e){return e.classList.contains(gc)},wc=function(e,t){var n=t.hour,r=void 0===n?0:n,o=t.minute,a=void 0===o?0:o,i=t.second,c=void 0===i?0:i;return(0,rc.default)((0,oc.default)((0,ac.default)(e,c),a),r)},Oc=function(e){setTimeout((function(){if(e){var t=e.querySelector(".".concat(mc,'[tabindex="0"]'));t&&t.focus({preventScroll:!0})}}),0)},xc=function(e){setTimeout((function(){e&&e.focus({preventScroll:!0})}),0)},kc=function(e){var t=(0,Ji.default)(e);return isNaN(t)?null:t},_c=function(e){return e?e.toISOString():null};const Sc=function(e,t,n){var r=n.dateFormats,o=void 0===r?[]:r,a=n.minDate,i=n.maxDate,c=n.hasTime,s=n.valueToDate,u=void 0===s?kc:s,l=n.dateToValue,p=void 0===l?_c:l,f=(0,w.useRef)(null),d=(0,w.useState)(!1),h=U()(d,2),m=h[0],g=h[1],y=(0,w.useState)(!1),v=U()(y,2),b=v[0],O=v[1],x=u(e),k=a?u(a):void 0,_=i?u(i):void 0;(0,w.useEffect)((function(){(f.current&&"function"==typeof f.current.setOpen&&f.current.setOpen(m),m)&&document.querySelectorAll("button.react-datepicker__navigation").forEach((function(e){return e.setAttribute("tabindex","-1")}))}),[m]);var S=function(){return g(!1)},E=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(f.current&&"function"==typeof f.current.getPreSelection){var t,n=e?f.current.getPreSelection():null;return(null===(t=f.current.state)||void 0===t?void 0:t.preSelection)||n}return null},A=function(e){f.current&&"function"==typeof f.current.setPreSelection&&f.current.setPreSelection(e)},P=function(){t(null),A(null)},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=E(!1);if(n){var r=x||new Date,o=t?wc(n,{hour:(0,ic.default)(r),minute:(0,cc.default)(r),second:(0,sc.default)(r)}):n;C(o,e)}},C=function(n,r){if(n){var a,i=!e&&Boolean(n),s=null==r||null===(a=r.target)||void 0===a?void 0:a.value,u=!!s&&o.some((function(e){return fc(s,e)})),l=(0,dc.default)(n),d=(0,ic.default)(n)!==(0,ic.default)(l)||(0,cc.default)(n)!==(0,cc.default)(l);(i&&!d||u)&&c&&(n=Ri.Z.setCurrentTime(n)),t(p(n))}else P();var h;c||"click"!==(null==r?void 0:r.type)||(S(),xc(null===(h=f.current)||void 0===h?void 0:h.input))},D=function(e){if("Tab"===e.key)if(e.shiftKey)if(bc(e.target))setTimeout((function(){return S()}),0);else if(vc(e.target)){var t,n;A(x||E(!0)),Oc(null===(t=f.current)||void 0===t||null===(n=t.calendar)||void 0===n?void 0:n.componentNode)}else yc(e.target)&&S();else bc(e.target)&&m?(j(e),setTimeout((function(){return S()}),0)):vc(e.target)?S():yc(e.target)&&(c?(j(e,!0),A(null),O(!0),setTimeout((function(){var e,t,n;n=null===(e=f.current)||void 0===e||null===(t=e.calendar)||void 0===t?void 0:t.componentNode,setTimeout((function(){if(n){var e=n.querySelector("input.".concat(hc));e&&e.focus({preventScroll:!0})}}),0),O(!1)}),0)):(j(e),S()));var r;"Enter"===e.key&&(S(),e.preventDefault(),e.stopPropagation(),xc(null===(r=f.current)||void 0===r?void 0:r.input));if(["ArrowDown","ArrowUp","Enter"].includes(e.key))if(m){if(m&&null===E(!1)){var o,a;A(x||E(!0)),Oc(null===(o=f.current)||void 0===o||null===(a=o.calendar)||void 0===a?void 0:a.componentNode)}}else g(!0),e.key="Handled".concat(e.key)},T=function(){var e;g((function(e){return!e})),A(null),xc(null===(e=f.current)||void 0===e?void 0:e.input)};return{reactDatePickerProps:{closeOnScroll:function(){return S(),!0},onClickOutside:S,onInputClick:T,onKeyDown:D,onChange:C,onCalendarOpen:function(){A(null)},onBlur:function(){f.current&&f.current.setState({inputValue:null})},preventOpenOnFocus:!0,enableTabLoop:!1,shouldCloseOnSelect:!1,open:m,selected:x,showTimeInput:c,minDate:k,maxDate:_,ref:f,className:gc},timeInputProps:{onKeyDown:D,className:hc,tabIndex:b?void 0:"-1"},clearButtonProps:{onMouseDown:function(e){e.preventDefault(),P()}},calendarButtonProps:{onClick:T,className:m?"react-datepicker-ignore-onclickoutside":""}}};var Ec=i(49546),Ac="HH:mm:ss",Pc="HH:mm",jc=function(e){return fc(e,Pc)},Cc=function(e){var t=function(e){return fc(e,Ac)?(0,uc.default)(e,Ac,new Date):fc(e,Pc)?(0,uc.default)(e,Pc,new Date):fc(e,"HH:")?(0,uc.default)(e,"HH:",new Date):fc(e,"H")?(0,uc.default)(e,"H",new Date):null}(e);return t&&!isNaN(t)?function(e){return(0,Ec.default)(e,Pc)}(t):""};const Dc=function(e,t){var n=Cc(e),r=(0,w.useState)(n),o=U()(r,2),a=o[0],i=o[1],c=(0,w.useRef)(a),s=He.Z.usePrevious(n);(0,w.useEffect)((function(){s!==n&&a===s&&i(n)}),[n,a,s]);var u={onChange:function(e){if(e.target.value!==a&&function(e){return/^(\d{0,2}|\d{1,2}:\d{0,2})$/.test(e)}(e.target.value)){var n=function(e,t){return e&&t?2!==e.length||3===t.length||e.includes(":")?e.length+1===t.length&&t.indexOf(":")===t.length-1?e.slice(0,-1):e:"".concat(e,":"):e}(e.target.value,c.current),r=n.indexOf(":"),o=n.substring(0,r),s=n.substring(r+1),u=parseInt(o,10),l=parseInt(s,10),p=!o||!Number.isNaN(u)&&u<24,f=!s||!Number.isNaN(l)&&l<60;if(!p||!f)return!1;c.current=n,i(n),n&&!jc(n)||t(n)}},onBlur:function(){if(a!==n){var e=Cc(a);e&&jc(e)?(c.current=e,i(e),t(e)):i(n)}},onFocus:function(e){a&&"function"==typeof e.target.select&&e.target.select()},value:a||""};return{inputProps:u,clearButtonProps:{onClick:function(){t(""),i("")}}}};var Tc=["value","onChange","onKeyDown"];function Rc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rc(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}(0,Xi.registerLocale)("en",Ri.Z.getDateFnsLocale("en")),(0,Xi.registerLocale)("en-US",Ri.Z.getDateFnsLocale("en")),(0,Xi.registerLocale)("de-CH",Ri.Z.getDateFnsLocale("de-CH")),(0,Xi.registerLocale)("de",Ri.Z.getDateFnsLocale("de")),(0,Xi.registerLocale)("fr",Ri.Z.getDateFnsLocale("fr")),(0,Xi.registerLocale)("fr-CH",Ri.Z.getDateFnsLocale("fr")),(0,Xi.registerLocale)("it",Ri.Z.getDateFnsLocale("it")),(0,Xi.registerLocale)("it-CH",Ri.Z.getDateFnsLocale("it")),(0,Xi.setDefaultLocale)("de");var Mc=function(e){var t=e.onChange,n=e.label;return(0,Pe.jsx)(Ge.Z,{onMouseDown:function(e){e.preventDefault(),t(null)},tabIndex:-1,children:n})},Nc=function(e){var t=e.value,n=e.onChange,r=e.onKeyDown,o=qe()(e,Tc),a=Dc(t,(function(e){n&&n(e||"00:00")})).inputProps;return(0,Pe.jsx)(nc,Ic(Ic(Ic({},a),o),{},{type:"text",onKeyDown:r,onClick:function(e){e.target.focus()}}))},Zc={strategy:"fixed"};const Bc=(0,x.Zz)((0,p.ZP)((function(e){var t=e.immutable,n=e.id,r=e.value,o=e.minDate,a=e.maxDate,i=e.valueToDate,c=e.dateToValue,s=e.onChange,u=e.intl,l=e.placeholder,p=e.hasTime,f=e.dateFormats,d=void 0===f?[]:f,h=e.dateTimeFormats,m=void 0===h?[]:h,g=e.events,y=(0,w.useRef)(void 0),v=u.locale,b=function(e){return u.formatMessage({id:e})},O=(0,w.useRef)(null),x=Boolean(r),k=!t&&x,_=function(e){y.current=e,s(e)},S=Sc(r,_,{dateFormats:d,dateTimeFormats:m,minDate:o,maxDate:a,valueToDate:i,dateToValue:c,hasTime:p}),E=S.reactDatePickerProps,A=S.timeInputProps,P=S.clearButtonProps,j=S.calendarButtonProps;return(0,Pe.jsx)(ec,{immutable:t,id:n,tabIndex:"-1",children:(0,Pe.jsxs)(tc,{immutable:t,ref:O,hasTime:p,onBlur:function(e){if("function"==typeof(null==g?void 0:g.onBlur)){var t=void 0!==y.current?y.current:r;g.onBlur(t)}e.stopPropagation()},children:[(0,Pe.jsx)(Qi(),Ic(Ic({},E),{},{disabled:t,dateFormat:[].concat(Oe()(m),Oe()(d)),placeholderText:l,showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!1,fixedHeight:!0,showPopperArrow:!1,locale:v,customTimeInput:(0,Pe.jsx)(Nc,Ic({},A)),timeInputLabel:"",popperProps:Zc,todayButton:(0,Pe.jsx)(Mc,{onChange:_,label:b("client.component.datePicker.todayLabel")})})),k&&(0,Pe.jsx)(fa.Z,Ic({icon:"times",tabIndex:-1,"aria-label":b("client.component.datePicker.clearDateLabel")},P)),!t&&(0,Pe.jsx)(fa.Z,Ic({icon:"calendar",tabIndex:-1},j))]})})})));function Lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Fc=function(e){var t=e.onChange,r=e.options,o=e.id,a=e.value,i=e.immutable,c=e.events,s=e.placeholder,u=(0,Ti.Z)(),l=(null==r?void 0:r.datePickerOptions)||{},p="".concat(Ri.Z.getLocalizedDateFormat(u.locale)),f=Ri.Z.getLocalizedDateFormatWithoutPunctuation(u.locale),d=[p,f,Ri.Z.useTwoDigitYear(p),Ri.Z.useTwoDigitYear(f)];return(0,Pe.jsx)(Bc,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lc(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:o,value:a,onChange:t,dateFormats:d,hasTime:!1,immutable:i,placeholder:s,events:c},l))};function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Hc=(0,p.ZP)((function(e){var t=e.onChange,r=e.options,o=e.value,a=e.immutable,i=e.placeholder,c=(0,Ti.Z)(),s=(null==r?void 0:r.datePickerOptions)||{},u="".concat(Ri.Z.getLocalizedDateTimeFormat(c.locale)),l="".concat(Ri.Z.getLocalizedDateFormat(c.locale)),p=Ri.Z.getLocalizedDateTimeFormatWithoutPunctuation(c.locale),f=[u,p,Ri.Z.useTwoDigitYear(u),Ri.Z.useTwoDigitYear(p)],d=Ri.Z.getLocalizedDateFormatWithoutPunctuation(c.locale),h=[l,d,Ri.Z.useTwoDigitYear(l),Ri.Z.useTwoDigitYear(d)];return(0,Pe.jsx)(Bc,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uc(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({value:o,onChange:t,dateTimeFormats:f,dateFormats:h,hasTime:!0,immutable:a,placeholder:i},s))}));var Wc=i(18446),zc=i.n(Wc);function Vc(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}s((r=r.apply(e,t||[])).next())}))}function Yc(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}Object.create;function qc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function Gc(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var Kc=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function $c(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=Kc.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var Xc=[".DS_Store","Thumbs.db"];function Qc(e){return"object"==typeof e&&null!==e}function Jc(e){return rs(e.target.files).map((function(e){return $c(e)}))}function es(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return $c(e)}))]}}))}))}function ts(e,t){return Vc(this,void 0,void 0,(function(){var n;return Yc(this,(function(r){switch(r.label){case 0:return e.items?(n=rs(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(os))]):[3,2];case 1:return[2,ns(as(r.sent()))];case 2:return[2,ns(rs(e.files).map((function(e){return $c(e)})))]}}))}))}function ns(e){return e.filter((function(e){return-1===Xc.indexOf(e.name)}))}function rs(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function os(e){if("function"!=typeof e.webkitGetAsEntry)return is(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ss(t):is(e)}function as(e){return e.reduce((function(e,t){return Gc(Gc([],qc(e),!1),qc(Array.isArray(t)?as(t):[t]),!1)}),[])}function is(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=$c(t);return Promise.resolve(n)}function cs(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){return[2,e.isDirectory?ss(e):us(e)]}))}))}function ss(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var a=this;t.readEntries((function(t){return Vc(a,void 0,void 0,(function(){var a,i,c;return Yc(this,(function(s){switch(s.label){case 0:if(t.length)return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=s.sent(),e(a),[3,4];case 3:return i=s.sent(),n(i),[3,4];case 4:return[3,6];case 5:c=Promise.all(t.map(cs)),r.push(c),o(),s.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function us(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=$c(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var ls=i(58363);function ps(e){return function(e){if(Array.isArray(e))return ys(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gs(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 fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ds(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fs(Object(n),!0).forEach((function(t){hs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ms(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||gs(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.")}()}function gs(e,t){if(e){if("string"==typeof e)return ys(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)?ys(e,t):void 0}}function ys(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vs="file-invalid-type",bs="file-too-large",ws="file-too-small",Os="too-many-files",xs=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:vs,message:"File type must be ".concat(t)}},ks=function(e){return{code:bs,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},_s=function(e){return{code:ws,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},Ss={code:Os,message:"Too many files"};function Es(e,t){var n="application/x-moz-file"===e.type||(0,ls.Z)(e,t);return[n,n?null:xs(t)]}function As(e,t,n){if(Ps(e.size))if(Ps(t)&&Ps(n)){if(e.size>n)return[!1,ks(n)];if(e.size<t)return[!1,_s(t)]}else{if(Ps(t)&&e.size<t)return[!1,_s(t)];if(Ps(n)&&e.size>n)return[!1,ks(n)]}return[!0,null]}function Ps(e){return null!=e}function js(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,a=e.multiple,i=e.maxFiles,c=e.validator;return!(!a&&t.length>1||a&&i>=1&&t.length>i)&&t.every((function(e){var t=ms(Es(e,n),1)[0],a=ms(As(e,r,o),1)[0],i=c?c(e):null;return t&&a&&!i}))}function Cs(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Ds(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function Ts(e){e.preventDefault()}function Rs(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function Is(e){return-1!==e.indexOf("Edge/")}function Ms(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return Rs(e)||Is(e)}function Ns(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!Cs(e)&&t&&t.apply(void 0,[e].concat(r)),Cs(e)}))}}function Zs(){return"showOpenFilePicker"in window}function Bs(e){if(Ps(e)){var t=Object.entries(e).filter((function(e){var t=ms(e,2),n=t[0],r=t[1],o=!0;return Hs(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(Ws)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=ms(t,2),r=n[0],o=n[1];return ds(ds({},e),{},hs({},r,o))}),{});return[{description:"Files",accept:t}]}return e}function Ls(e){if(Ps(e))return Object.entries(e).reduce((function(e,t){var n=ms(t,2),r=n[0],o=n[1];return[].concat(ps(e),[r],ps(o))}),[]).filter((function(e){return Hs(e)||Ws(e)})).join(",")}function Fs(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function Us(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function Hs(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function Ws(e){return/^.*\.[\w]+$/.test(e)}var zs=["children"],Vs=["open"],Ys=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],qs=["refKey","onChange","onClick"];function Gs(e){return function(e){if(Array.isArray(e))return Xs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$s(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 Ks(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||$s(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.")}()}function $s(e,t){if(e){if("string"==typeof e)return Xs(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)?Xs(e,t):void 0}}function Xs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Js(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qs(Object(n),!0).forEach((function(t){eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tu(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nu=(0,w.forwardRef)((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Js(Js({},ru),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,i=t.minSize,c=t.multiple,s=t.maxFiles,u=t.onDragEnter,l=t.onDragLeave,p=t.onDragOver,f=t.onDrop,d=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,b=t.preventDropOnDocument,O=t.noClick,x=t.noKeyboard,k=t.noDrag,_=t.noDragEventsBubbling,S=t.onError,E=t.validator,A=(0,w.useMemo)((function(){return Ls(n)}),[n]),P=(0,w.useMemo)((function(){return Bs(n)}),[n]),j=(0,w.useMemo)((function(){return"function"==typeof g?g:cu}),[g]),C=(0,w.useMemo)((function(){return"function"==typeof m?m:cu}),[m]),D=(0,w.useRef)(null),T=(0,w.useRef)(null),R=Ks((0,w.useReducer)(iu,au),2),I=R[0],M=R[1],N=I.isFocused,Z=I.isFileDialogActive,B=(0,w.useRef)("undefined"!=typeof window&&window.isSecureContext&&y&&Zs()),L=function(){!B.current&&Z&&setTimeout((function(){T.current&&(T.current.files.length||(M({type:"closeDialog"}),C()))}),300)};(0,w.useEffect)((function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}}),[T,Z,C,B]);var F=(0,w.useRef)([]),U=function(e){D.current&&D.current.contains(e.target)||(e.preventDefault(),F.current=[])};(0,w.useEffect)((function(){return b&&(document.addEventListener("dragover",Ts,!1),document.addEventListener("drop",U,!1)),function(){b&&(document.removeEventListener("dragover",Ts),document.removeEventListener("drop",U))}}),[D,b]),(0,w.useEffect)((function(){return!r&&v&&D.current&&D.current.focus(),function(){}}),[D,v,r]);var H=(0,w.useCallback)((function(e){S?S(e):console.error(e)}),[S]),W=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),F.current=[].concat(Gs(F.current),[e.target]),Ds(e)&&Promise.resolve(o(e)).then((function(t){if(!Cs(e)||_){var n=t.length,r=n>0&&js({files:t,accept:A,minSize:i,maxSize:a,multiple:c,maxFiles:s,validator:E});M({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}})).catch((function(e){return H(e)}))}),[o,u,H,_,A,i,a,c,s,E]),z=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=Ds(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&p&&p(e),!1}),[p,_]),V=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=F.current.filter((function(e){return D.current&&D.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),F.current=t,t.length>0||(M({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ds(e)&&l&&l(e))}),[D,l,_]),Y=(0,w.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=Ks(Es(e,A),2),o=t[0],c=t[1],s=Ks(As(e,i,a),2),u=s[0],l=s[1],p=E?E(e):null;if(o&&u&&!p)n.push(e);else{var f=[c,l];p&&(f=f.concat(p)),r.push({file:e,errors:f.filter((function(e){return e}))})}})),(!c&&n.length>1||c&&s>=1&&n.length>s)&&(n.forEach((function(e){r.push({file:e,errors:[Ss]})})),n.splice(0)),M({acceptedFiles:n,fileRejections:r,type:"setFiles"}),f&&f(n,r,t),r.length>0&&h&&h(r,t),n.length>0&&d&&d(n,t)}),[M,c,A,i,a,s,f,d,h,E]),q=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),F.current=[],Ds(e)&&Promise.resolve(o(e)).then((function(t){Cs(e)&&!_||Y(t,e)})).catch((function(e){return H(e)})),M({type:"reset"})}),[o,Y,H,_]),G=(0,w.useCallback)((function(){if(B.current){M({type:"openDialog"}),j();var e={multiple:c,types:P};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){Y(e,null),M({type:"closeDialog"})})).catch((function(e){Fs(e)?(C(e),M({type:"closeDialog"})):Us(e)?(B.current=!1,T.current?(T.current.value=null,T.current.click()):H(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):H(e)}))}else T.current&&(M({type:"openDialog"}),j(),T.current.value=null,T.current.click())}),[M,j,C,y,Y,H,P,c]),K=(0,w.useCallback)((function(e){D.current&&D.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),G()))}),[D,G]),$=(0,w.useCallback)((function(){M({type:"focus"})}),[]),X=(0,w.useCallback)((function(){M({type:"blur"})}),[]),Q=(0,w.useCallback)((function(){O||(Ms()?setTimeout(G,0):G())}),[O,G]),J=function(e){return r?null:e},ee=function(e){return x?null:J(e)},te=function(e){return k?null:J(e)},ne=function(e){_&&e.stopPropagation()},re=(0,w.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,a=e.onKeyDown,i=e.onFocus,c=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,p=e.onDragLeave,f=e.onDrop,d=tu(e,Ys);return Js(Js(eu({onKeyDown:ee(Ns(a,K)),onFocus:ee(Ns(i,$)),onBlur:ee(Ns(c,X)),onClick:J(Ns(s,Q)),onDragEnter:te(Ns(u,W)),onDragOver:te(Ns(l,z)),onDragLeave:te(Ns(p,V)),onDrop:te(Ns(f,q)),role:"string"==typeof o&&""!==o?o:"presentation"},n,D),r||x?{}:{tabIndex:0}),d)}}),[D,K,$,X,Q,W,z,V,q,x,k,r]),oe=(0,w.useCallback)((function(e){e.stopPropagation()}),[]),ae=(0,w.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,a=tu(e,qs);return Js(Js({},eu({accept:A,multiple:c,type:"file",style:{display:"none"},onChange:J(Ns(r,q)),onClick:J(Ns(o,oe)),tabIndex:-1},n,T)),a)}}),[T,n,c,q,r]);return Js(Js({},I),{},{isFocused:N&&!r,getRootProps:re,getInputProps:ae,rootRef:D,inputRef:T,open:J(G)})}(tu(e,zs)),o=r.open,a=tu(r,Vs);return(0,w.useImperativeHandle)(t,(function(){return{open:o}}),[o]),O().createElement(w.Fragment,null,n(Js(Js({},a),{},{open:o})))}));nu.displayName="Dropzone";var ru={disabled:!1,getFilesFromEvent:function(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){return Qc(e)&&Qc(e.dataTransfer)?[2,ts(e.dataTransfer,e.type)]:function(e){return Qc(e)&&Qc(e.target)}(e)?[2,Jc(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,es(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};nu.defaultProps=ru,nu.propTypes={children:o().func,accept:o().objectOf(o().arrayOf(o().string)),multiple:o().bool,preventDropOnDocument:o().bool,noClick:o().bool,noKeyboard:o().bool,noDrag:o().bool,noDragEventsBubbling:o().bool,minSize:o().number,maxSize:o().number,maxFiles:o().number,disabled:o().bool,getFilesFromEvent:o().func,onFileDialogCancel:o().func,onFileDialogOpen:o().func,useFsAccessApi:o().bool,autoFocus:o().bool,onDragEnter:o().func,onDragLeave:o().func,onDragOver:o().func,onDrop:o().func,onDropAccepted:o().func,onDropRejected:o().func,onError:o().func,validator:o().func};const ou=nu;var au={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function iu(e,t){switch(t.type){case"focus":return Js(Js({},e),{},{isFocused:!0});case"blur":return Js(Js({},e),{},{isFocused:!1});case"openDialog":return Js(Js({},au),{},{isFileDialogActive:!0});case"closeDialog":return Js(Js({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Js(Js({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Js(Js({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Js({},au);default:return e}}function cu(){}var su,uu,lu,pu,fu,du,hu,mu,gu,yu=i(69829),vu=i(40953),bu=x.ZP.section.withConfig({displayName:"StyledSection"})(su||(su=b()(["\n flex: 1;\n display: flex;\n justify-content: flex-end;\n"]))),wu=x.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(uu||(uu=b()(["\n display: flex;\n align-items: center;\n\n "," {\n margin: 0;\n border-radius: 50%;\n padding: ",";\n\n a:hover {\n color: unset;\n }\n }\n"])),Ot.Z,Ke.Z.space(-2)),Ou=x.ZP.div.withConfig({displayName:"StyledDropzone"})(lu||(lu=b()(["\n width: 100%;\n\n &:hover {\n "," {\n background-color: ",";\n }\n }\n"])),Ot.Z,ke.FS.color("backgroundItemHover")),xu=x.ZP.div.withConfig({displayName:"StyledUploadInput"})(pu||(pu=b()(["\n ","\n cursor: ",";\n background-color: ",";\n color: ",";\n padding: "," 0 0 0;\n display: flex;\n\n "," {\n float: right;\n position: relative;\n top: -",";\n margin: 0;\n border-radius: 50%;\n padding: ",";\n }\n"])),(0,ht.Z)(),(function(e){return e.immutable?"not-allowed":"pointer"}),ke.FS.color("paper"),(function(e){return e.immutable?vu.v.shade2(e):vu.v.base(e)}),Ke.Z.space(-2),Ot.Z,Ke.Z.space(-3.1),Ke.Z.space(-1.5)),ku=x.ZP.div.withConfig({displayName:"StyledUploadProgress"})(fu||(fu=b()(["\n && {\n padding-top: ",";\n text-align: center;\n display: inline-block;\n }\n"])),Ke.Z.space(-2)),_u=(0,x.ZP)(yu.Fe).withConfig({displayName:"StyledUploadProgressText"})(du||(du=b()(["\n && {\n ","\n }\n"])),(0,ht.Z)({fontSize:Ke.Z.font(-1)})),Su=x.ZP.div.withConfig({displayName:"StyledUploadProgressIconAndText"})(hu||(hu=b()(["\n && {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n margin-left: ",";\n }\n }\n"])),Ke.Z.space(-2)),Eu=x.ZP.div.withConfig({displayName:"StyledView"})(mu||(mu=b()(["\n display: flex;\n justify-content: space-between;\n padding-top: ",";\n"])),Ke.Z.space(-2));function Au(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Au(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ju=function(e){var t=e.onDrop,n=e.immutable,r=e.text,o=e.onChoose;return(0,Pe.jsxs)(xu,{immutable:n,children:[(0,Pe.jsx)(ou,{onDrop:function(e){var n=e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})}));t(n[0])},multiple:!1,disabled:n,title:r||"drag and drop or click",children:function(e){var t=e.getRootProps,n=e.getInputProps;return(0,Pe.jsx)(bu,{children:(0,Pe.jsxs)(Ou,Pu(Pu({},t()),{},{children:[(0,Pe.jsx)("input",Pu({},n())),gu||(gu=(0,Pe.jsx)(Ge.Z,{icon:"arrow-to-top"}))]}))})}}),o&&(0,Pe.jsx)(Ge.Z,{onClick:function(e){o(),e.stopPropagation()},icon:"folder",label:"browse docs",iconOnly:!0})]})};var Cu=i(73906),Du=function(e){var t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(1*(e/Math.pow(1024,t)).toFixed(2)," ").concat(["Bytes","KB","MB","GB","TB"][t])};const Tu=function(e){var t=e.file,n=e.text;return(0,Pe.jsxs)(ku,{children:[(0,Pe.jsx)(Cu.Z,{alt:t.name,caption:t.name,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:t.preview,thumbnailUrl:t.type.startsWith("image")?t.preview:null}),(0,Pe.jsxs)(Su,{children:[(0,Pe.jsx)(Da.Z,{position:be.Z.position.PREPEND}),(0,Pe.jsxs)(_u,{children:[n||"uploading"," (",Du(t.size),")"]})]})]})};var Ru=i(28247),Iu=i(41291);function Mu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mu(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Zu=function(e){var t,n=e.value,r=e.downloadTitle,o=e.immutable,a=e.onUpload,i=e.deleteTitle,c=null===(t=n.binaryLink)||void 0===t?void 0:t.startsWith("blob:");return(0,Pe.jsxs)(Eu,{className:"StyledView",children:[(0,Pe.jsx)(Cu.Z,Nu(Nu({alt:n.fileName},c&&{caption:n.fileName}),{},{fileName:n.fileName,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:n.binaryLink,thumbnailUrl:n.thumbnailLink})),(0,Pe.jsxs)(wu,{children:[!o&&(0,Pe.jsx)(Ge.Z,{icon:"trash",onClick:function(){return a(null)},tabIndex:-1,title:i||"delete"}),(0,Pe.jsx)(Ge.Z,{children:(0,Pe.jsx)(Iu.Z,{neutral:!0,icon:"arrow-to-bottom",target:"_blank",href:Ru.Z.getDownloadUrl(n.binaryLink),tabIndex:-1,title:r||"download"})})]})]})};function Bu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bu(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fu=function(e){var t=e.value,n=e.textResources,r=e.onUpload,o=e.onChoose,a=(0,w.useRef)(t),i=(0,w.useState)({isUploading:!1,previewFile:null}),c=U()(i,2),s=c[0],u=c[1];return(0,w.useEffect)((function(){zc()(a.current,t)||u({isUploading:!1,previewFile:null}),a.current=t}),[t]),null!=t&&t.binaryLink?(0,Pe.jsx)(Zu,Lu(Lu({},e),{},{deleteTitle:n.delete,downloadTitle:n.download})):s.isUploading?(0,Pe.jsx)(Tu,Lu({file:s.previewFile,text:n.uploading},e)):(0,Pe.jsx)(ju,Lu(Lu({},e),{},{onDrop:function(e){!function(e){u({isUploading:!0,previewFile:e})}(e),r(e)},onChoose:o}))};Fu.defaultProps={textResources:{}};const Uu=Fu;var Hu=function(e){return(0,Pe.jsx)(Uu,{onUpload:function(t){null===t?e.onChange&&e.onChange(null):e.options.upload&&e.options.upload(t)},onChoose:e.options.choose,immutable:e.immutable,textResources:{upload:e.options.uploadText,uploading:e.options.uploadingText,delete:e.options.deleteText,download:e.options.downloadText},value:e.value?e.value:null})};Hu.defaultProps={options:{}};const Wu=Hu;var zu,Vu,Yu=function(e){return-1*Math.abs(e)},qu=x.ZP.input.withConfig({displayName:"StyledDurationEdit"})(zu||(zu=b()(["\n &&&& {\n ","\n flex-grow: 0;\n width: ","px;\n min-width: 2.5ch;\n }\n"])),yt,(function(e){return e.width})),Gu=x.ZP.label.withConfig({displayName:"StyledDurationEditFocusable"})(Vu||(Vu=b()(["\n &&& {\n align-items: center;\n display: flex;\n flex-wrap: nowrap;\n margin-bottom: 0; /* reset bootstrap */\n margin-left: ",";\n\n &:first-child {\n margin-left: 0;\n }\n\n > span {\n color: ",";\n cursor: ",";\n }\n }\n"])),Ke.Z.space(1),(function(e){return e.immutable?ke.FS.color("textDisabled"):ke.FS.color("text")}),(function(e){return e.immutable?"not-allowed":"default"})),Ku=function(e){var t=e.value,n=e.immutable,r=e.onChange,o=e.options,a=Ri.Z.millisecondsToDuration(t),i=(0,w.useState)(!1),c=U()(i,2),s=c[0],u=c[1],l=function(e,t){var n,o,i=null!==t?t:a.minutes,c=null!==e?e:a.hours;""!==i||""!==c?(i>=60&&(c=0),r((o=i,(n=c)||o?((n<0||o<0)&&(n=Yu(n),o=Yu(o)),60*(n||0)*6e4+6e4*(o||0)):null))):r(null)},p=function(){u(!0)},f=function(e){e.charCode>=48&&e.charCode<=57||45===e.charCode&&!0===o.allowNegative||e.preventDefault()},d=function(){return!0===o.allowNegative?"-?d+":"d+"},h=function(){return s||"number"==typeof t},m=function(e){return 9*(e+"").length},g=n&&Boolean(a.seconds);return(0,Pe.jsxs)(gt,{onBlur:function(){u(!1)},immutable:n,children:[(0,Pe.jsxs)(Gu,{immutable:n,children:[(0,Pe.jsx)(qu,{disabled:n,immutable:n,min:!0===o.allowNegative?void 0:0,onChange:function(){},onFocus:p,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(t,null)},onKeyPress:f,pattern:d(),step:1,width:m(a.hours),type:"number",value:"number"!=typeof a.hours||0===a.hours&&!n?"":a.hours+""}),h()&&(0,Pe.jsx)(rt.ZP.Span,{children:o.hoursLabel})]}),(0,Pe.jsxs)(Gu,{immutable:n,children:[(0,Pe.jsx)(qu,{disabled:n,immutable:n,min:!0!==o.allowNegative||null!==a.hours&&0!==a.hours?0:void 0,onChange:function(){},onFocus:p,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(null,t)},onKeyPress:f,pattern:d(),step:1,width:m(a.minutes),type:"number",value:a.minutes+""}),h()&&(0,Pe.jsx)(rt.ZP.Span,{children:o.minutesLabel})]}),g&&(0,Pe.jsxs)(Gu,{immutable:n,children:[(0,Pe.jsx)(qu,{disabled:n,immutable:n,onChange:function(){},width:m(a.seconds),type:"number",value:a.seconds+""}),h()&&(0,Pe.jsx)(rt.ZP.Span,{children:o.secondsLabel})]})]})};Ku.defaultProps={options:{hoursLabel:"hrs",minutesLabel:"min",secondsLabel:"s"}};const $u=Ku;var Xu;const Qu=x.ZP.input.attrs((function(e){return{type:"text"}})).withConfig({displayName:"StyledStringEdit"})(Xu||(Xu=b()(["\n &&&& {\n ","\n }\n"])),yt);const Ju=He.Z.Debouncer((function(e){return(0,Pe.jsxs)(gt,{immutable:e.immutable,children:[(0,Pe.jsx)(Qu,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""}),e.value&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(Iu.Z,{href:"mailto:".concat(e.value.toString()),icon:"envelope",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));var el=i(50008),tl=i.n(el),nl=i(2205),rl=i.n(nl),ol=i(99489),al=i.n(ol),il=i(78718),cl=i.n(il);function sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ul(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ll(){ll=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var a=new RegExp(e,r);return t.set(a,o||t.get(e)),al()(a,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var a=0;void 0===e[o[a]]&&a+1<o.length;)a++;t[n]=e[o[a]]}return t}),Object.create(null))}return rl()(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var a=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=a[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var i=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=tl()(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,i)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},ll.apply(this,arguments)}var pl,fl=["key","display","postcode","city","country","latitude","longitude"],dl=function(e){return e*Math.PI/180},hl=function(e){var t=e.state,n=e.country,r=e.postcode,o=e.city,a=e.latitude,i=e.longitude,c=t?"- ".concat(t):"",s=n?"/ ".concat(n.display):"";return{key:r,display:"".concat(r," ").concat(o," ").concat(c," ").concat(s),postcode:r,city:o,country:n,latitude:dl(a),longitude:dl(i)}};function ml(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function gl(){}function yl(e){return!!(e||"").match(/\d/)}function vl(e){return null==e}function bl(e){return"number"==typeof e&&isNaN(e)}function wl(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Ol(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNegation:n,addNegation:r}}function xl(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function kl(e,t){return Array(t+1).join(e)}function _l(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),o=r[0],a=r[1];if(!(a=Number(a)))return n+o;var i=1+a,c=(o=o.replace(".","")).length;return i<0?o="0."+kl("0",Math.abs(i))+o:i>=c?o+=kl("0",i-c):o=(o.substring(0,i)||"0")+"."+o.substring(i),n+o}function Sl(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,o=Ol(e),a=o.beforeDecimal,i=o.afterDecimal,c=o.hasNegation,s=parseFloat("0."+(i||"0")),u=(i.length<=t?"0."+i:s.toFixed(t)).split(".");return""+(c?"-":"")+a.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0])+(r?".":"")+xl(u[1]||"",t,n)}function El(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function Al(e){return Math.max(e.selectionStart,e.selectionEnd)}function Pl(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function jl(e,t,n,r){var o,a,i,c=e.length;if(o=t,a=0,i=c,t=Math.min(Math.max(o,a),i),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=c&&!n[t];)t++;t>c&&(t=n.lastIndexOf(!0))}return-1===t&&(t=c),t}function Cl(e){for(var t=Array.from({length:e.length+1}).map((function(){return!0})),n=0,r=t.length;n<r;n++)t[n]=Boolean(yl(e[n])||yl(e[n-1]));return t}function Dl(e,t,n,r,o,a){void 0===a&&(a=gl);var i=(0,w.useRef)(),c=function(e){var t=(0,w.useRef)(e);t.current=e;var n=(0,w.useRef)((function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}));return n.current}((function(e){var t,a;return vl(e)||bl(e)?(a="",t=""):"number"==typeof e||n?(a="number"==typeof e?_l(e):e,t=r(a)):(a=o(e,void 0),t=e),{formattedValue:t,numAsString:a}})),s=(0,w.useState)((function(){return c(t)})),u=s[0],l=s[1];return(0,w.useMemo)((function(){vl(e)?i.current=void 0:(i.current=c(e),l(i.current))}),[e,c]),[u,function(e,t){l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}]}function Tl(e){return e.replace(/[^0-9]/g,"")}function Rl(e){return e}function Il(e){var t=e.type;void 0===t&&(t="text");var n=e.displayType;void 0===n&&(n="input");var r=e.customInput,o=e.renderText,a=e.getInputRef,i=e.format;void 0===i&&(i=Rl);var c=e.removeFormatting;void 0===c&&(c=Tl);var s=e.defaultValue,u=e.valueIsNumericString,l=e.onValueChange,p=e.isAllowed,f=e.onChange;void 0===f&&(f=gl);var d=e.onKeyDown;void 0===d&&(d=gl);var h=e.onMouseUp;void 0===h&&(h=gl);var m=e.onFocus;void 0===m&&(m=gl);var g=e.onBlur;void 0===g&&(g=gl);var y=e.value,v=e.getCaretBoundary;void 0===v&&(v=Cl);var b=e.isValidInputCharacter;void 0===b&&(b=yl);var x=ml(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter"]),k=Dl(y,s,Boolean(u),i,c,l),_=k[0],S=_.formattedValue,E=_.numAsString,A=k[1],P=(0,w.useRef)();(0,w.useEffect)((function(){var e=i(E);if(void 0===P.current||e!==P.current){var t=T.current,n=c(e,void 0);L({formattedValue:e,numAsString:n,input:t,setCaretPosition:!0,source:pl.props,event:void 0})}}));var j=(0,w.useState)(!1),C=j[0],D=j[1],T=(0,w.useRef)(null),R=(0,w.useRef)({setCaretTimeout:null,focusTimeout:null});(0,w.useEffect)((function(){return D(!0),function(){clearTimeout(R.current.setCaretTimeout),clearTimeout(R.current.focusTimeout)}}),[]);var I=i,M=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},N=function(e,t,n){El(e,t),R.current.setCaretTimeout=setTimeout((function(){e.value===n&&El(e,t)}),0)},Z=function(e,t,n){return jl(e,t,v(e),n)},B=function(e,t,n){var r=v(t),o=function(e,t,n,r,o,a){var i=o.findIndex((function(e){return e})),c=e.slice(0,i);t||n.startsWith(c)||(n=c+n,r+=c.length);for(var s=n.length,u=e.length,l={},p=new Array(s),f=0;f<s;f++){p[f]=-1;for(var d=0,h=u;d<h;d++)if(n[f]===e[d]&&!0!==l[d]){p[f]=d,l[d]=!0;break}}for(var m=r;m<s&&(-1===p[m]||!a(n[m]));)m++;var g=m===s||-1===p[m]?u:p[m];for(m=r-1;m>0&&-1===p[m];)m--;var y=-1===m||-1===p[m]?0:p[m]+1;return y>g?g:r-y<g-r?y:g}(t,S,e,n,r,b);return o=jl(t,o,r)},L=function(e){var t=e.formattedValue;void 0===t&&(t="");var n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var o=e.source,a=e.event,i=e.numAsString,c=e.caretPos;if(n){if(void 0===c&&r){var s=e.inputValue||n.value,u=Al(n);n.value=t,c=B(s,t,u)}n.value=t,r&&void 0!==c&&N(n,c,t)}t!==S&&function(e,t){P.current=e.formattedValue,A(e,t)}(M(t,i),{event:a,source:o})},F=!C||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",U=Object.assign({inputMode:F},x,{type:t,value:S,onChange:function(e){var t=function(e,t,n){var r=function(e,t){for(var n=0,r=0,o=e.length,a=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[a-1-r]&&a-r>n&&o-r>n;)r++;return{from:{start:n,end:o-r},to:{start:n,end:a-r}}}(S,e),o=Object.assign(Object.assign({},r),{lastValue:S}),a=c(e,o),i=I(a);if(a=c(i,void 0),p&&!p(M(i,a))){var s=t.target,u=Al(s),l=B(e,S,u);return N(s,l,S),!1}return L({formattedValue:i,numAsString:a,inputValue:e,event:t,source:n,setCaretPosition:!0,input:t.target}),!0}(e.target.value,e,pl.event);t&&f(e)},onKeyDown:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,a=n.selectionEnd,i=n.value;if(void 0===i&&(i=""),"ArrowLeft"===r||"Backspace"===r?t=Math.max(o-1,0):"ArrowRight"===r?t=Math.min(o+1,i.length):"Delete"===r&&(t=o),void 0!==t&&o===a){var c=t;if("ArrowLeft"===r||"ArrowRight"===r)c=Z(i,t,"ArrowLeft"===r?"left":"right");else"Delete"!==r||b(i[t])?"Backspace"!==r||b(i[t])||(c=Z(i,t,"left")):c=Z(i,t,"right");c!==t&&N(n,c,i),e.isUnitTestRun&&N(n,c,i),d(e)}else d(e)},onMouseUp:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),n===r){var a=Z(o,n);a!==n&&N(t,a,o)}h(e)},onFocus:function(e){e.persist&&e.persist();var t=e.target;T.current=t,R.current.focusTimeout=setTimeout((function(){var n=t.selectionStart,r=t.selectionEnd,o=t.value;void 0===o&&(o="");var a=Z(o,n);a===n||0===n&&r===o.length||N(t,a,o),m(e)}),0)},onBlur:function(e){T.current=null,clearTimeout(R.current.focusTimeout),clearTimeout(R.current.setCaretTimeout),g(e)}});if("text"===n)return o?O().createElement(O().Fragment,null,o(S,x)||null):O().createElement("span",Object.assign({},x,{ref:a}),S);if(r){var H=r;return O().createElement(H,Object.assign({},U,{ref:a}))}return O().createElement("input",Object.assign({},U,{ref:a}))}function Ml(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix;void 0===o&&(o="");var a=t.suffix;void 0===a&&(a="");var i=t.allowNegative;void 0===i&&(i=!0);var c=t.thousandsGroupStyle;if(void 0===c&&(c="thousand"),""===e||"-"===e)return e;var s=Nl(t),u=s.thousandSeparator,l=s.decimalSeparator,p=0!==n&&-1!==e.indexOf(".")||n&&r,f=Ol(e,i),d=f.beforeDecimal,h=f.afterDecimal,m=f.addNegation;return void 0!==n&&(h=xl(h,n,!!r)),u&&(d=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(d,u,c)),o&&(d=o+d),a&&(h+=a),m&&(d="-"+d),e=d+(p&&l||"")+h}function Nl(e){var t=e.decimalSeparator;void 0===t&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function Zl(e,t,n){void 0===t&&(t=Pl(e));var r=n.allowNegative;void 0===r&&(r=!0);var o=n.prefix;void 0===o&&(o="");var a=n.suffix;void 0===a&&(a="");var i=n.decimalScale,c=t.from,s=t.to,u=s.start,l=s.end,p=Nl(n),f=p.allowedDecimalSeparators,d=p.decimalSeparator,h=e[l]===d;if(l-u==1&&-1!==f.indexOf(e[u])){var m=0===i?"":d;e=e.substring(0,u)+m+e.substring(u+1,e.length)}var g=!1;o.startsWith("-")?g=e.startsWith("--"):a.startsWith("-")&&e.length===a.length?g=!1:"-"===e[0]&&(g=!0),g&&(e=e.substring(1),u-=1,l-=1);var y=0;e.startsWith(o)?y+=o.length:u<o.length&&(y=u),l-=y;var v=(e=e.substring(y)).length,b=e.length-a.length;e.endsWith(a)?v=b:l>e.length-a.length&&(v=l),e=e.substring(0,v),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}(g?"-"+e:e,r),e=(e.match(function(e,t){return new RegExp("(^-)|[0-9]|"+wl(e),t?"g":void 0)}(d,!0))||[]).join("");var w=e.indexOf(d),O=Ol(e=e.replace(new RegExp(wl(d),"g"),(function(e,t){return t===w?".":""})),r),x=O.beforeDecimal,k=O.afterDecimal,_=O.addNegation;return s.end-s.start<c.end-c.start&&""===x&&h&&!parseFloat(k)&&(e=_?"-":""),e}function Bl(e){var t=e.decimalSeparator;void 0===t&&(t=".");e.allowedDecimalSeparators,e.thousandsGroupStyle,e.suffix,e.allowNegative;var n=e.allowLeadingZeros,r=e.onKeyDown;void 0===r&&(r=gl);var o=e.onBlur;void 0===o&&(o=gl);var a=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,s=e.prefix;void 0===s&&(s="");var u=e.defaultValue,l=e.value,p=e.valueIsNumericString,f=e.onValueChange,d=ml(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]);!function(e){var t=Nl(e),n=t.thousandSeparator,r=t.decimalSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ")}(e);var h=function(t){return Ml(t,e)},m=function(t,n){return Zl(t,n,e)},g=p;vl(l)?vl(u)||(g=null!=p?p:"number"==typeof u):g=null!=p?p:"number"==typeof l;var y=function(e){return vl(e)||bl(e)?e:("number"==typeof e&&(e=_l(e)),g&&"number"==typeof i?Sl(e,i,Boolean(c)):e)},v=Dl(y(l),y(u),Boolean(g),h,m,f),b=v[0],w=b.numAsString,O=b.formattedValue,x=v[1];return Object.assign(Object.assign({},d),{value:O,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===t||yl(e)},onValueChange:x,format:h,removeFormatting:m,getCaretBoundary:function(t){return function(e,t){var n=t.prefix;void 0===n&&(n="");var r=t.suffix;void 0===r&&(r="");var o=Array.from({length:e.length+1}).map((function(){return!0})),a="-"===e[0];o.fill(!1,0,n.length+(a?1:0));var i=e.length;return o.fill(!1,i-r.length+1,i+1),o}(t,e)},onKeyDown:function(t){var n=t.target,o=t.key,u=n.selectionStart,l=n.selectionEnd,p=n.value;if(void 0===p&&(p=""),u===l){"Backspace"===o&&"-"===p[0]&&u===s.length+1&&El(n,1);var f=Nl(e),d=f.decimalSeparator,h=f.allowedDecimalSeparators;"Backspace"===o&&p[u-1]===d&&i&&c&&(El(n,u-1),t.preventDefault()),(null==h?void 0:h.includes(o))&&p[u]===d&&El(n,u+1);var m=!0===a?",":a;"Backspace"===o&&p[u-1]===m&&El(n,u-1),"Delete"===o&&p[u]===m&&El(n,u+1),r(t)}else r(t)},onBlur:function(t){var r=w;if(r.match(/\d/g)||(r=""),n||(r=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return(t?"-":"")+r+(o?"."+o:"")}(r)),c&&i&&(r=Sl(r,i,c)),r!==w){var a=Ml(r,e);x({formattedValue:a,value:r,floatValue:parseFloat(r)},{event:t,source:pl.event})}o(t)}})}function Ll(e){var t=Bl(e);return O().createElement(Il,Object.assign({},t))}!function(e){e.event="event",e.props="prop"}(pl||(pl={}));var Fl,Ul=["immutable"];function Hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wl=(0,x.ZP)((function(e){e.immutable;var t=qe()(e,Ul);return(0,Pe.jsx)(Ll,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hl(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t))})).withConfig({displayName:"StyledNumberEdit"})(Fl||(Fl=b()(["\n &&&& {\n ","\n }\n"])),yt);const zl=Wl;function Vl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vl(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ql=function(e){return 0!==e?Math.ceil(Math.log10(Math.abs(e)+1)):1},Gl=function(e){return null!=e&&!isNaN(parseFloat(e))},Kl=function(e,t,n){return!Gl(n)||!(Gl(t)&&n>t)&&!(Gl(e)&&n<e)},$l=function(e,t){return function(n){var r=n.floatValue;return ql(r)<ql(e)||Kl(e,t,r)}};const Xl=(0,p.ZP)(He.Z.Debouncer((function(e){var t,n=(t=e.intl.locale,{thousandSeparator:1111..toLocaleString(t).replace(/1/g,""),decimalSeparator:1.1.toLocaleString(t).replace(/1/g,"")}),r=n.thousandSeparator,o=n.decimalSeparator,a=e.options||{},i=a.prePointDigits,c=a.postPointDigits,s=a.minValue,u=a.maxValue,l=a.allowNegative,p=a.fixedDecimalScale,f=a.suffix,d=a.prefix,h=a.format,m=function(e,t,n){if(e){var r=Math.pow(10,e)-(t?1/Math.pow(10,t):1);return n&&n>r?n:r}return n}(i,c,u),g=Yl(Yl({isAllowed:$l(s,m),allowNegative:!!l},isNaN(c)?{}:{decimalScale:c}),{},{fixedDecimalScale:!!p});return(0,Pe.jsx)(gt,{immutable:e.immutable,children:(0,Pe.jsx)(zl,Yl(Yl({decimalSeparator:o,disabled:e.immutable,id:e.id,valueIsNumericString:!0,name:e.name,onValueChange:function(t){e.onChange&&Kl(s,m,t.floatValue)&&e.onChange(void 0!==t.floatValue?t.floatValue:null)},immutable:e.immutable,thousandSeparator:r,value:e.value,suffix:f,prefix:d},g),{},{format:h,placeholder:e.placeholder,onBlur:function(t){var n,r=!(n=t.target.value)||isNaN(n)?null:parseFloat(n);e.onChange&&!Kl(s,m,r)&&(t.target.value=null)}}))})}),800));const Ql=He.Z.Debouncer((function(e){var t=e.value,n=e.onChange,r=e.options,o=e.immutable,a=e.name,i=e.id,c=e.placeholder,s=r||{},u=s.minValue,l=s.maxValue,p=s.format,f=s.allowLeadingZeros,d=s.suffix;return(0,Pe.jsx)(gt,{immutable:o,children:(0,Pe.jsx)(zl,{isAllowed:$l(u,l),allowNegative:!0,decimalScale:0,disabled:o,id:i,name:a,onValueChange:function(e){var t=e.value,r=e.floatValue,o=f?t:r;void 0===o&&(o=null),Kl(u,l,r)&&n(o)},value:t,allowLeadingZeros:f,suffix:d,format:p,placeholder:c})})}),800);var Jl,ep,tp,np=x.ZP.div.withConfig({displayName:"StyledWrapper"})(Jl||(Jl=b()(["\n display: flex;\n justify-content: stretch;\n"]))),rp=x.ZP.div.withConfig({displayName:"StyledLocationWrapper"})(ep||(ep=b()(["\n flex-grow: 1;\n"]))),op=x.ZP.div.withConfig({displayName:"StyledDistanceWrapper"})(tp||(tp=b()(["\n width: 50px;\n border-left: 1px solid ",";\n margin-left: ",";\n padding-left: ",";\n"])),ke.FS.color("border"),Ke.Z.space(-.8),Ke.Z.space(.5));function ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ip(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ap(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const cp=function(e){var t=e.id,n=e.immutable,r=e.value,o=e.onChange,a=e.options,i=void 0===a?{}:a,c=i.suggestions,s=i.isLoading,u=i.fetchSuggestions,l=i.latitudeField,p=i.longitudeField,f=i.emptySearchText,d=i.noResultsText,h=i.kmSuffixText,m=r?r.distance:0,g=function(e){return null!=e&&e.latitude&&null!=e&&e.longitude?cl()(e,fl):void 0}(r),y=function(e){return e?e.map(hl):[]}(c);return(0,Pe.jsxs)(np,{children:[(0,Pe.jsx)(rp,{children:(0,Pe.jsx)(si,{id:t,immutable:n,onChange:function(e){o(ip(ip({},function(e,t){return t?ul(ul({},e),cl()(t,fl)):Yr()(e,fl)}(r,e)),{},{latitudeField:l,longitudeField:p}))},isLoading:s,options:y,searchOptions:function(e){var t=function(e){if(!e)return null;var t=Oe()(e.matchAll(ll(/([\d]*)([^\d\s]*)/g,{postcode:1,city:2}))).map((function(e){return e.groups})),n=t.find((function(e){return e.postcode})),r=t.find((function(e){return e.city}));return ul(ul({},r?{city:r.city}:{}),n?{postcode:n.postcode}:{})}(e);u(t,null)},fetchOptions:function(e){e||u(null,null)},value:g,noResultsComp:function(e){return e.inputValue?d:f}})}),(0,Pe.jsx)(op,{children:(0,Pe.jsx)(Ql,{value:m,onChange:function(e){o(ip(ip({},r),{},{distance:e}))},immutable:n,options:{minValue:0,maxValue:100,suffix:" ".concat(h)}})})]})};var sp,up=(0,w.lazy)((function(){return Promise.all([i.e(885),i.e(759),i.e(85)]).then(i.bind(i,17676))})),lp=function(e){var t=e.onChange,n=e.immutable,r=e.value,o=e.options;if(n)return(0,Pe.jsx)(rt.ZP.Span,{children:(0,Pe.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})});var a=o||{},i=a.contentLang,c=a.ckEditorConfig;return(0,Pe.jsx)(w.Suspense,{fallback:sp||(sp=(0,Pe.jsx)("i",{})),children:(0,Pe.jsx)(up,{onChange:function(e){t&&t(e)},value:r,contentLang:i,ckEditorConfig:c})})};lp.defaultProps={value:""};const pp=lp;var fp,dp,hp,mp=i(58808),gp=i.n(mp),yp=x.ZP.div.withConfig({displayName:"StyledLocationEdit"})(fp||(fp=b()(["\n && {\n ","\n position: relative;\n\n div {\n :nth-of-type(1) {\n flex: 0 0 13ch;\n margin-right: ",";\n }\n\n :nth-of-type(2) {\n flex: 1 1 auto;\n }\n }\n\n > span {\n flex: 0 0 auto;\n margin-right: ",";\n color: ",";\n }\n\n .react-autosuggest__input {\n ","\n width: 100%;\n }\n\n .react-autosuggest__suggestions-container--open {\n width: calc(100% + 17.5px);\n background-color: ",";\n box-shadow: 0 0 6px ",";\n border: 1px solid ",";\n bottom: -9px;\n left: -10px;\n max-height: 300px;\n overflow-y: auto;\n position: absolute;\n transform: translateY(100%);\n z-index: 2; // higher than StyledIndicatorsContainerWrapper\n }\n\n .react-autosuggest__suggestions-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n\n .react-autosuggest__suggestion {\n cursor: pointer;\n padding: 8px 12px;\n }\n\n .react-autosuggest__suggestion--highlighted {\n background-color: ",";\n }\n }\n"])),mt,Ke.Z.space(-2),Ke.Z.space(-2),(function(e){var t=e.immutable,n=e.theme;return t?Ua()(n,"colors.textDisabled"):Ua()(n,"colors.text")}),yt,ke.FS.color("paper"),ke.FS.color("signal.info"),ke.FS.color("secondaryLight"),ke.FS.color("backgroundItemHover"));function vp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const wp=function(e){var t=e.onChange,r=e.options,o=e.value,a=e.id,i=e.immutable,c=e.name,s=function(e){return function(t){return t[e]}},u=function(e){var t=e.state,n=e.country,r=e.postcode,o=e.city,a=t?"- ".concat(t):"",i=n?"/ ".concat(n.display):"";return(0,Pe.jsxs)(rt.ZP.Span,{children:[r," ",o," ",a," ",i]})},l=function(e){return function(r,a){var i=a.newValue;t(bp(bp({},o),{},n()({},e,i)))}},p=function(e,n){var r=n.suggestion;t(r)},f=function(e){return function(t){var o=t.value;r.fetchSuggestions(n()({},e,o),r.locationValues.country)}},d={id:a,value:o.postcode||"",onChange:l("postcode"),disabled:i},h={value:o.city||"",onChange:l("city"),disabled:i};return(0,Pe.jsx)(fe,{children:function(e){var t,n,a,l=e.focused,m=e.getRef;return(0,Pe.jsxs)(yp,{immutable:i,name:c,ref:m,children:[(0,Pe.jsx)(gp(),{suggestions:r.suggestions||[],onSuggestionsFetchRequested:f("postcode"),getSuggestionValue:s("postcode"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:d,onSuggestionSelected:p,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(l||o.city||o.postcode)&&(dp||(dp=(0,Pe.jsx)(rt.ZP.Span,{children:"/"}))),(0,Pe.jsx)(gp(),{suggestions:r.suggestions||[],onSuggestionsFetchRequested:f("city"),getSuggestionValue:s("city"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:h,onSuggestionSelected:p,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(0,Pe.jsxs)(bt,{children:[r.isLoading&&(hp||(hp=(0,Pe.jsx)(Da.Z,{size:"1.8rem"}))),(a=r.locationValues,Boolean(a.city||a.postcode)&&(0,Pe.jsx)(Iu.Z,{href:(t=r.locationValues,n=t?Object.values(t).filter(Boolean).map((function(e){return"object"===tl()(e)&&e.display?e.display:e})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(n)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:r.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};function Op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const xp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Op(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Op(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const _p=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};var Sp;const Ep=x.ZP.input.attrs((function(e){return{type:"tel"}})).withConfig({displayName:"StyledPhoneEdit"})(Sp||(Sp=b()(["\n &&&& {\n ","\n }\n"])),yt);const Ap=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.onLibLoaded,c=Ua()(e,"options.defaultCountry")||"CH",s=(0,w.useState)(null),u=U()(s,2),l=u[0],p=u[1],f=O().createRef();(0,w.useEffect)((function(){var e=function(){var e=L()(W().mark((function e(){var t;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([i.e(817),i.e(877)]).then(i.bind(i,80446));case 2:t=e.sent,p(t),a&&a();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[a]);var d=function(e,t){var n=e.substring(0,t-1).match(/\s/g);return(null==n?void 0:n.length)||0},h=n&&null!=l&&l.AsYouType?new l.AsYouType(c).input(n):n||"";return(0,Pe.jsxs)(gt,{immutable:r,children:[(0,Pe.jsx)(Ep,{disabled:r||!l,id:o,name,onChange:function(e){var r=e.target.value,o=l?l.parseNumber(r,c):r,a=Gr()(o)?new l.AsYouType(c).input(r).replace(/\s/g,""):l.formatNumber(o,"E.164");t(a);var i=e.target.selectionStart;!function(e,t,n){if(n&&e.length!==n){var r=new l.AsYouType(c).input(t),o=new l.AsYouType(c).input(e),a=d(r,n),i=d(o,n)-a;window.requestAnimationFrame(function(){var e=n+i;this.setSelectionRange(e,e)}.bind(f.current))}}(r,n,i)},immutable:r||!l,ref:f,value:h}),h&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(Iu.Z,{href:"tel:".concat(n),icon:"phone",tabIndex:-1,target:"_blank",neutral:!0})})]})};function Pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Cp=function(e){return e.map((function(e){return cl()(e,["key","display"])}))};const Dp=function(e){var t=e.id,n=e.immutable,r=e.onChange,o=e.options.isMulti,a=e.value;return(0,Pe.jsx)(si,{id:t,immutable:n,isMulti:o,onChange:function(e){var t=o?e.map((function(e){return e.key})):[null==e?void 0:e.key],n=a.options.map((function(e){return jp(jp({},e),t.includes(e.key)?{selected:!0}:{selected:!1})}));r({options:n})},value:Cp(a.options.filter((function(e){return e.selected}))),openMenuOnClick:!0,options:Cp(a.options)})};function Tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Rp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,isMulti:!1,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Mp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ip(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ip(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Zp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Np(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,immutable:e.immutable,isMulti:!1,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};const Bp=He.Z.Debouncer((function(e){return(0,Pe.jsx)(gt,{immutable:e.immutable,children:(0,Pe.jsx)(Qu,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""})})}));const Lp=function(){var e,t=(null===(e=navigator)||void 0===e?void 0:e.userAgent)||"";return/^((?!chrome|android).)*safari/i.test(t)};var Fp,Up,Hp,Wp=(0,x.iv)(Fp||(Fp=b()(["\n ","\n width: 100%;\n grid-area: 1 / 1 / 2 / 2;\n max-height: 25rem;\n box-sizing: border-box;\n"])),yt),zp=x.ZP.div.withConfig({displayName:"StyledSizeWrapper"})(Up||(Up=b()(["\n display: grid;\n width: 100%;\n\n &:after {\n content: attr(data-replicated-value) ' ';\n white-space: pre-wrap;\n word-break: break-all;\n visibility: hidden;\n ","\n\n /* prevent scrollbar on Firefox */\n padding-right: 15px;\n }\n"])),Wp),Vp=x.ZP.textarea.withConfig({displayName:"StyledTextarea"})(Hp||(Hp=b()(["\n &&&& {\n ","\n resize: none;\n margin: 0;\n min-height: 4em;\n }\n"])),Wp);function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Gp=function(e){var t=e.value,n=e.onChange,r=e.name,o=e.id,a=e.disabled,i=e.immutable,c=(0,w.useState)(t),s=U()(c,2),u=s[0],l=s[1],p=!Lp(),f=(0,w.useCallback)(Qr()(l,500,{trailing:!0}),[]);return(0,w.useEffect)((function(){p&&f(t)}),[t,p,f]),(0,Pe.jsx)(zp,qp(qp({"data-testid":"replicated-test"},p?{"data-replicated-value":u}:{}),{},{children:(0,Pe.jsx)(Vp,{value:t,name:r,id:o,onChange:n,disabled:a,immutable:i,rows:"1"})}))};const Kp=He.Z.Debouncer((function(e){return(0,Pe.jsx)(gt,{immutable:e.immutable,children:(0,Pe.jsx)(Gp,{id:e.id,immutable:e.immutable,maxRows:20,name:e.name,onChange:function(t){return e.onChange(t.target.value)},disabled:e.immutable,rows:2,value:e.value})})}));var $p;const Xp=x.ZP.input.withConfig({displayName:"StyledTimeEdit"})($p||($p=b()(["\n &&&& {\n ","\n }\n"])),yt);function Qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ef=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.name,i=Dc(n,t),c=i.inputProps,s=i.clearButtonProps,u=n&&!r;return(0,Pe.jsxs)(gt,{immutable:r,children:[(0,Pe.jsx)(Xp,Jp({type:"text",disabled:r,id:o,immutable:r,name:a},c)),u&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(fa.Z,Jp(Jp({icon:"times"},s),{},{tabIndex:-1}))})]})};var tf;const nf=x.ZP.input.attrs((function(e){return{type:"url"}})).withConfig({displayName:"StyledUrlEdit"})(tf||(tf=b()(["\n &&&& {\n ","\n }\n"])),yt);const rf=He.Z.Debouncer((function(e){return(0,Pe.jsxs)(gt,{immutable:e.immutable,children:[(0,Pe.jsx)(nf,{disabled:e.immutable,id:e.id,immutable:e.immutable,name:e.name,onChange:function(t){return e.onChange((n=t.target.value,r=/^[a-zA-Z0-9]+:\/\//.test(n),n.indexOf(".")>0&&!r?"https://".concat(n):n));var n,r},value:e.value}),e.value&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(Iu.Z,{href:e.value,icon:"external-link",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));function of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function af(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?of(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):of(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var cf={boolean:fi,"boolean-select":ui,choice:xi,code:Di,date:Fc,datetime:Hc,document:Wu,duration:$u,email:Ju,geosearch:cp,html:pp,integer:Ql,location:wp,"multi-remote":xp,"multi-select":_p,number:Xl,phone:Ap,"pseudo-select":Dp,remote:Rp,"search-filter":Mp,"single-select":Zp,string:Bp,text:Kp,url:rf,time:ef};const sf=function(e){var t=e.componentType,n=e.value,r=e.options,o=e.id,a=e.events,i=e.placeholder,c=e.readOnly,s=void 0!==c&&c;if(cf[t]){var u=cf[t],l=af(af({},Yr()(a,"onChange")),{},{onBlur:function(){"function"==typeof(null==a?void 0:a.onBlur)&&a.onBlur(n)}});return(0,Pe.jsx)("div",af(af({},l),{},{"data-cy":"form-field",children:(0,Pe.jsx)(u,af(af({value:n,onChange:null==a?void 0:a.onChange},Gr()(r)?{}:{options:r}),{},{id:o,immutable:s,placeholder:i,events:a}))}))}return console.log("No type-editor defined for component type",t),null};function uf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uf(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const pf=function(e){return(0,Pe.jsx)(wt,{children:(0,Pe.jsx)(sf,lf({componentType:e.type},Yr()(e,"type")))})};var ff,df,hf=x.ZP.div.withConfig({displayName:"StyledLoginFormInputWrapper"})(ff||(ff=b()(["\n && {\n ","\n }\n"])),mt);const mf=function(e){var t=e.verifyCode,n=e.intl,r=(0,w.useState)(null),o=U()(r,2),a=o[0],i=o[1],c=function(e){return n.formatMessage({id:e})},s=a&&a.toString().length>=6,u=function(e){e&&(e.preventDefault(),e.stopPropagation()),s&&t(a)};return(0,Jn.z)(u),(0,Pe.jsxs)(Pe.Fragment,{children:[df||(df=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.verificationText"})})),(0,Pe.jsxs)("form",{onSubmit:u,children:[(0,Pe.jsx)(Ue,{hasValue:Boolean(a),id:"verification-input",label:c("client.two-factor-connector.verificationInputLabel"),children:(0,Pe.jsx)(hf,{children:(0,Pe.jsx)(pf,{type:"integer",value:a,events:{onChange:i},options:{format:"### ###",allowLeadingZeros:!0}})})}),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:c("client.two-factor-connector.okButton"),ink:"primary",look:"raised",type:"submit",disabled:!s})})]})]})};var gf={verifyCode:function(e){return{type:Wn,payload:{userCode:e}}}};const yf=(0,f.connect)((function(e,t){return{}}),gf)((0,p.ZP)(mf));var vf,bf,wf,Of,xf,kf,_f=0,Sf=1,Ef=2,Af=3;const Pf=function(e){var t=e.initialize,n=e.stage;(0,w.useEffect)((function(){t()}),[t]);return(0,Pe.jsxs)(Pe.Fragment,{children:[kf||(kf=(0,Pe.jsx)(In.Z.Notifications,{})),function(){switch(n){case _f:return vf||(vf=(0,Pe.jsx)(zr,{}));case Sf:return bf||(bf=(0,Pe.jsx)(Fr,{}));case Ef:return wf||(wf=(0,Pe.jsx)(yf,{}));case Af:return Of||(Of=(0,Pe.jsx)(ir,{}));default:return xf||(xf=(0,Pe.jsx)(on.Z,{}))}}()]})};var jf={initialize:qn};const Cf=(0,f.connect)((function(e){return{stage:e.twoFactorConnector.stage}}),jf)((0,p.ZP)(Pf));var Df,Tf=i(81770);function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function If(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rf(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rf(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Mf=function(e){return function(t){return If(If({},t),{},{stage:e})}},Nf=(Df={},n()(Df,Nn,Tf.Z.singleTransferReducer("twoFactorActive")),n()(Df,Zn,Tf.Z.singleTransferReducer("secret")),n()(Df,Bn,Tf.Z.singleTransferReducer("username")),n()(Df,Vn,Tf.Z.singleTransferReducer("setupSuccessful")),n()(Df,Un,Mf(0)),n()(Df,Hn,Mf(1)),n()(Df,Fn,Mf(2)),n()(Df,Yn,Mf(3)),Df),Zf={stage:null,twoFactorActive:null,secret:null,username:null,setupSuccessful:null};var Bf=i(34857),Lf=i(81719),Ff=i(54159),Uf=W().mark(ed),Hf=W().mark(nd),Wf=W().mark(rd),zf=W().mark(ad),Vf=W().mark(id),Yf=W().mark(cd),qf=W().mark(sd),Gf=W().mark(ud),Kf=W().mark(ld),$f="relTwo_step_login_status",Xf=function(e){return e.twoFactorConnector.username},Qf=function(e){return e.twoFactorConnector.secret},Jf=function(e){return e.input};function ed(){var e,t,n,r,o,a;return W().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Bf.Ys)(Jf);case 2:if(e=i.sent,e.secret){i.next=14;break}return i.next=7,(0,Bf.Ys)(Xf);case 7:return t=i.sent,i.next=10,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(t,"/two-factor"),{method:"GET"});case 10:return n=i.sent,r=n.body,o=r.secret,a=r.totpUri,i.next=14,(0,Bf.gz)(Kn({secret:o,uri:a}));case 14:return i.next=16,(0,Bf.gz)({type:Hn});case 16:case"end":return i.stop()}}),Uf)}function td(e,t){return Ff.Z.executeRequest(e,t).then(Ff.Z.extractBody)}function nd(e,t,n,r){var o,a;return W().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return o={secret:e,userCode:t,username:n,password:r},i.next=3,(0,Bf.RE)(td,"login",{method:"POST",headers:new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}),body:Object.keys(o).filter((function(e){return!!o[e]})).sort().map((function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(o[e]))})).join("&")});case 3:return a=i.sent,i.next=6,(0,Bf.gz)(Qn(Ua()(a,"TWOSTEPLOGIN_ACTIVATION.success",!1)));case 6:case"end":return i.stop()}}),Hf)}function rd(e,t,n){var r;return W().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(e,"/two-factor"),{method:"POST",body:{secret:t,code:n},acceptedStatusCodes:[400]});case 2:return r=o.sent,o.next=5,(0,Bf.gz)(Qn(204===r.status));case 5:case"end":return o.stop()}}),Wf)}function od(e){var t=e.payload.userCode;return W().mark((function e(){var n,r,o,a,i;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.Ys)(Xf);case 2:return n=e.sent,e.next=5,(0,Bf.Ys)(Qf);case 5:return r=e.sent,o=r.secret,e.next=9,(0,Bf.Ys)(Jf);case 9:if(a=e.sent,i=a.password,!a.forced){e.next=17;break}return e.next=15,(0,Bf.RE)(nd,o,t,n,i);case 15:e.next=19;break;case 17:return e.next=19,(0,Bf.RE)(rd,n,o,t);case 19:return e.next=21,(0,Bf.gz)({type:Yn});case 21:case"end":return e.stop()}}),e)}))()}function ad(){var e,t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Bf.RE)(cd);case 2:return n.next=4,(0,Bf.Ys)(Jf);case 4:if(e=n.sent,!(t=e.secret)){n.next=9;break}return n.next=9,(0,Bf.gz)(Kn(t));case 9:return n.next=11,(0,Bf.gz)(Xn());case 11:case"end":return n.stop()}}),zf)}function id(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(s.Z.fireExternalEvent("onSuccess"));case 2:case"end":return e.stop()}}),Vf)}function cd(){var e,t,n,r,o;return W().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Bf.RE)(sd);case 2:return e=a.sent,a.next=5,(0,Bf.gz)($n(e));case 5:return t='username === "'.concat(e,'"'),a.next=8,(0,Bf.RE)(Lf.Z.fetchEntities,"Principal",{where:t,paths:[$f]});case 8:if(!((n=a.sent).length>1)){a.next=11;break}throw new Error("More than one user found for username ".concat(e));case 11:return r=Ua()(n,"[0].paths.".concat($f,".value.key")),o="1"===r,a.next=15,(0,Bf.gz)(Gn(o));case 15:case"end":return a.stop()}}),Yf)}function sd(){var e,t,n;return W().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Bf.Ys)(Jf);case 2:if(e=r.sent,!(t=e.username)){r.next=8;break}return r.abrupt("return",t);case 8:return r.next=10,(0,Bf.RE)(Lf.Z.requestSaga,"principals");case 10:return n=r.sent,r.abrupt("return",n.body.username);case 12:case"end":return r.stop()}}),qf)}function ud(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(s.Z.fireExternalEvent("onResize"));case 2:case"end":return e.stop()}}),Gf)}function ld(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(Ln,ed),(0,Bf.Fm)(Wn,od),(0,Bf.Fm)(Mn,ad),(0,Bf.Fm)(zn,id),(0,Bf.Fm)(Un,ud),(0,Bf.Fm)(Hn,ud),(0,Bf.Fm)(Fn,ud),(0,Bf.Fm)(Yn,ud)]);case 2:case"end":return e.stop()}}),Kf)}const pd={twoFactorConnector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zf,t=arguments.length>1?arguments[1]:void 0,n=Nf[t.type];return n?n(e,t):e}};var fd,dd=[ld];function hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function md(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gd="two-factor-connector",yd=function(t,n,r,o){var i=fd||(fd=(0,Pe.jsx)(Cf,{})),c=e.Z.createStore(pd,dd,n,gd);return In.Z.addToStore(c,!0),a.Z.addToStore(c,!0,["console","remote","notification"]),s.Z.addToStore(c,(function(t){return e.Z.getEvents(vd,t.input)})),e.Z.createApp(gd,i,c,{input:n,events:r,actions:[],publicPath:o,textResourceModules:["component","common",gd]})},vd=["onSuccess","onCancel","onResize"],bd=function(t){return e.Z.useApp({initApp:yd,props:t,packageName:gd,externalEvents:vd}).component};bd.propTypes=md(md({},vd.reduce((function(e,t){return md(md({},e),{},n()({},t,o().func))}),{})),{},{username:o().string,password:o().string,secret:o().shape({secret:o().string.isRequired,uri:o().string.isRequired}),forced:o().bool});const wd=bd;var Od;e.Z.createBundleableApp(gd,yd,bd);const xd=function(e){var t=e.locale,n=e.username,r=e.password,o=e.secret,a=e.showTitle,i=e.changePage;return(0,Pe.jsxs)("div",{children:[a&&(Od||(Od=(0,Pe.jsx)(at,{title:"client.login.form.title"}))),(0,Pe.jsx)(wd,{locale:t,username:n,password:r,secret:o,forced:!0,onSuccess:function(){i(_)}})]})};var kd={changePage:M};const _d=(0,f.connect)((function(e){return{username:e.login.username,password:e.login.password,secret:e.twoStepLogin.secret,locale:e.intl.locale}}),kd)(xd);var Sd,Ed,Ad,Pd=x.ZP.div.withConfig({displayName:"StyledTwoStepLogin"})(Sd||(Sd=b()(["\n "," {\n width: 100%;\n }\n\n "," {\n ","\n padding-top: .7rem;\n padding-bottom: 0.7rem;\n }\n"])),Ot.Z,wt,yt);const jd=function(e){var t=e.username,n=e.password,r=e.showTitle,o=e.loginPending,a=e.login,i=e.intl,c=(0,w.useState)(null),s=U()(c,2),u=s[0],l=s[1],p=(0,w.useRef)();(0,w.useLayoutEffect)((function(){p.current.querySelector("input").focus()}),[]);var f=function(e){return i.formatMessage({id:e})};return(0,Pe.jsxs)(Pd,{children:[r&&(Ed||(Ed=(0,Pe.jsx)(at,{title:"client.login.form.title"}))),(0,Pe.jsxs)("form",{onSubmit:function(e){e.preventDefault(),a(t,n,null,u)},ref:p,children:[Ad||(Ad=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.login.twoStepLogin.introduction"})})),(0,Pe.jsx)(Ue,{hasValue:!!u,id:"twoFactorCode-label",label:f("client.login.twoStepLogin.codePlaceholder"),children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(pf,{type:"integer",value:u,events:{onChange:l},options:{format:"### ###",allowLeadingZeros:!0}})})}),(0,Pe.jsx)(tt,{disabled:!u||u.toString().length<6||o,label:f("client.login.form.button"),pending:o})]})]})};var Cd={login:y};const Dd=(0,f.connect)((function(e){return{username:e.login.username,password:e.login.password,loginPending:e.loginForm.loginPending}}),Cd)((0,p.ZP)(jd));var Td;function Rd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Id(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rd(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Md=function(e){var t=e.intl,n=e.checkUsername,r=e.loginPending,o=e.message,a=e.setUsername,i=e.showTitle,c=e.username,s=it(a),u=U()(s,2),l=u[0],p=u[1],f=function(e){return t.formatMessage({id:e})},d=(0,w.useCallback)(function(){var e=L()(W().mark((function e(t){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.preventDefault(),n(c);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[n,c]);return(0,Pe.jsxs)(Dt,{children:[i&&(Td||(Td=(0,Pe.jsx)(at,{title:"client.login.form.title",subtitle:"client.login.form.introduction"}))),(0,Pe.jsxs)("form",{onSubmit:d,children:[(0,Pe.jsx)(Ue,{hasValue:!!c||l,id:"login-username",label:f("client.login.form.userEmailPlaceholder"),children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,Id({autoFocus:!0,name:"user",required:!0,type:"text",value:c,onFocus:function(e){return e.target.select()}},p))})}),(0,Pe.jsx)(ze,{message:o}),(0,Pe.jsx)(tt,{disabled:!l&&(r||""===c),label:f("client.login.form.next"),pending:r})]})]})};var Nd={setUsername:N,checkUsername:function(e){return{type:g,payload:{username:e}}}};const Zd=(0,f.connect)((function(e){return{username:e.login.username,message:e.loginForm.message,loginPending:e.loginForm.loginPending}}),Nd)((0,p.ZP)(Md));var Bd,Ld,Fd,Ud=(0,x.vJ)(Bd||(Bd=b()(["\n .grecaptcha-badge {\n z-index: 9999999;\n opacity: .8;\n }\n"])));const Hd=function(e){var t,n,r,o,a,i=e.initialize,c=e.showTitle,s=e.currentPage;return(0,w.useEffect)((function(){i()}),[i]),(0,Pe.jsxs)(Pe.Fragment,{children:[Ld||(Ld=(0,Pe.jsx)(Ud,{})),function(){switch(s){case A:return t||(t=(0,Pe.jsx)(An,{showTitle:c}));case S:return n||(n=(0,Pe.jsx)(Ut,{showTitle:c}));case E:return r||(r=(0,Pe.jsx)(Dd,{showTitle:c}));case P:return Fd||(Fd=(0,Pe.jsx)(_d,{}));case k:return o||(o=(0,Pe.jsx)(Zd,{showTitle:c}));default:return a||(a=(0,Pe.jsx)(Nt,{showTitle:c}))}}()]})};var Wd={initialize:function(){return{type:d}}};const zd=(0,f.connect)((function(e,t){return{currentPage:t.currentPage||e.login.currentPage,showTitle:t.showTitle}}),Wd)((0,p.ZP)(Hd));var Vd,Yd="PasswordUpdateDialog/SET_SHOW_OLD_PASSWORD",qd="PasswordUpdateDialog/SET_STANDALONE",Gd="PasswordUpdateDialog/SET_FORCED_UPDATE",Kd="PasswordUpdateDialog/SET_USERNAME_OR_PK",$d="PasswordUpdateDialog/SET_CURRENT_USERNAME",Xd=function(e){return{type:Yd,payload:{showOldPasswordField:e}}},Qd=function(e){return{type:Gd,payload:{forcedUpdate:e}}},Jd=function(e){return{type:Kd,payload:{usernameOrPk:e}}},eh=i(15857),th=(Vd={},n()(Vd,C,Tf.Z.singleTransferReducer("entryPage")),n()(Vd,j,Tf.Z.singleTransferReducer("currentPage")),n()(Vd,D,Tf.Z.singleTransferReducer("username")),n()(Vd,T,Tf.Z.singleTransferReducer("password")),n()(Vd,R,Tf.Z.singleTransferReducer("captchaKey")),Vd),nh={entryPage:void 0,currentPage:void 0,username:"",password:"",captchaKey:null};const rh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nh,t=arguments.length>1?arguments[1]:void 0,n=th[t.type];return n?n(e,t):e};var oh,ah="loginForm/SET_MESSAGE",ih="loginForm/CLEAR_MESSAGE",ch="loginForm/SET_PENDING",sh="loginForm/ACTIVATE_RECAPTCHA",uh=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:ah,payload:{text:e,negative:t}}},lh=function(){return{type:ih}},ph=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{type:ch,payload:{pending:e}}};function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hh=(oh={},n()(oh,ah,(function(e,t){var n=t.payload,r=n.text,o=n.negative;return dh(dh({},e),{},{message:{text:r,negative:o}})})),n()(oh,ih,(function(e){return dh(dh({},e),{},{message:{}})})),n()(oh,ch,(function(e,t){var n=t.payload;return dh(dh({},e),{},{loginPending:n.pending})})),n()(oh,sh,(function(e){return dh(dh({},e),{},{recaptchaActivated:!0})})),oh),mh={message:{},loginPending:!1,recaptchaActivated:!1};const gh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mh,t=arguments.length>1?arguments[1]:void 0,n=hh[t.type];return n?n(e,t):e};var yh;function vh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vh(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wh={showOldPasswordField:!0,forcedUpdate:!1,standalone:!0,usernameOrPk:""},Oh=function(e){return function(t,r){var o=r.payload[e];return bh(bh({},t),{},n()({},e,o))}},xh=(yh={},n()(yh,Yd,Oh("showOldPasswordField")),n()(yh,Gd,Oh("forcedUpdate")),n()(yh,qd,Oh("standalone")),n()(yh,Kd,Oh("usernameOrPk")),yh);const kh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wh,t=arguments.length>1?arguments[1]:void 0,n=xh[t.type];return n?n(e,t):e};var _h,Sh=i(44759),Eh=W().mark(Ph),Ah=W().mark(jh);function Ph(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)($d,jh)]);case 2:case"end":return e.stop()}}),Eh)}function jh(){var e,t,n;return W().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e={acceptedStatusCodes:[403]},r.next=3,(0,Bf.RE)(Lf.Z.requestSaga,"principals",e);case 3:if(403!==(t=r.sent).status){r.next=8;break}Sh.Z.logError('input "username" on password-update is mandatory if no user is logged in'),r.next=11;break;case 8:return n=t.body.username,r.next=11,(0,Bf.gz)(Jd(n));case 11:case"end":return r.stop()}}),Ah)}function Ch(e){return 0===Object.keys(e).length&&e.constructor===Object}function Dh(e){var t={};return e.forEach((function(e){t[e.ruleName]=e.message})),t}function Th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Th(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Th(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ih={oldPassword:"",newPassword:"",newPasswordRepeat:"",newPasswordValidationErrors:null,passwordUpdatePending:!1,passwordUpdateFailed:!1,passwordUpdateErrorCode:null},Mh=(_h={},n()(_h,Wt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{oldPassword:n.oldPassword})})),n()(_h,Vt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{newPassword:n.newPassword})})),n()(_h,Yt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{newPasswordValidationErrors:n.errors})})),n()(_h,qt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{newPasswordRepeat:n.newPasswordRepeat})})),n()(_h,Gt,(function(e){return Rh(Rh({},e),{},{passwordUpdatePending:!0,passwordUpdateFailed:!1})})),n()(_h,Kt,(function(e){return Ih})),n()(_h,$t,(function(e,t){var n=t.payload;if(n.validationMessages){var r=Dh(n.validationMessages);return Rh(Rh({},e),{},{passwordUpdatePending:!1,newPasswordValidationErrors:r})}return Rh(Rh({},e),{},{passwordUpdatePending:!1,passwordUpdateFailed:!0,passwordUpdateErrorCode:n.errorCode})})),n()(_h,Qt,(function(e,t){t.payload;return Rh(Rh({},e),{},{passwordUpdateFailed:!1})})),_h);const Nh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ih,t=arguments.length>1?arguments[1]:void 0,n=Mh[t.type];return n?n(e,t):e};var Zh="password_update_success",Bh="password_update_failed",Lh=i(75354),Fh="login/SET_SECRET";function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uh(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wh,zh=W().mark(lm),Vh=W().mark(pm),Yh=W().mark(dm),qh=W().mark(hm),Gh=W().mark(mm),Kh=W().mark(gm),$h=W().mark(ym),Xh=W().mark(vm),Qh=W().mark(bm),Jh=W().mark(wm),em=W().mark(Om),tm=W().mark(_m),nm=W().mark(Sm),rm=W().mark(Em),om=W().mark(Am),am=W().mark(Pm),im=function(e){return e.login},cm=function(e){return e.input};function sm(e){var t=e.payload;return W().mark((function e(){var n,r,o;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.Ys)(im);case 2:return n=e.sent,r=n.entryPage,e.next=6,(0,Bf.gz)(ph(!0));case 6:return e.next=8,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(t.username,"/password-reset"),{method:"POST"});case 8:return e.next=10,(0,Bf.gz)(N(t.username));case 10:return e.next=12,(0,Bf.gz)(M(_));case 12:return o=r===k?"client.login.from.passwordRequestedWithValidUsername":"client.login.from.passwordRequested",e.next=16,(0,Bf.gz)(uh(o));case 16:return e.next=18,(0,Bf.gz)(ph(!1));case 18:case"end":return e.stop()}}),e)}))()}function um(e,t){return new Promise((function(n){Ff.Z.executeRequest(e,t).then(Ff.Z.extractBody).then((function(e){return n(e)})).catch((function(e){Sh.Z.logError("Failed to execute request",e),n({success:!1})}))}))}function lm(e){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(um,"login",fm(e));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),zh)}function pm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.RE)(um,"session",{method:"POST"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),Vh)}function fm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{method:"POST",headers:new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}),body:Object.keys(e).filter((function(t){return!!e[t]})).sort().map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&")}}function dm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(M(E));case 2:case"end":return e.stop()}}),Yh)}function hm(e){var t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e[P],n.next=3,(0,Bf.gz)({type:Fh,payload:{secret:t}});case 3:return n.next=5,(0,Bf.gz)(M(P));case 5:case"end":return n.stop()}}),qh)}function mm(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.Ys)(im);case 2:return e=t.sent,t.next=5,(0,Bf.gz)(Jt(e.password));case 5:return t.next=7,(0,Bf.gz)(Jd(e.username));case 7:return t.next=9,(0,Bf.gz)(Qd(!0));case 9:return t.next=11,(0,Bf.gz)(M(A));case 11:case"end":return t.stop()}}),Gh)}function gm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(uh("client.login.form.blocked",!0));case 2:case"end":return e.stop()}}),Kh)}function ym(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(uh("client.login.form.failed",!0));case 2:case"end":return e.stop()}}),$h)}function vm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(uh("client.login.form.invalidUsernameEmail",!0));case 2:case"end":return e.stop()}}),Xh)}function bm(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,wm();case 2:(e=t.sent)&&(window.location.href=e);case 4:case"end":return t.stop()}}),Qh)}function wm(){var e,t,n,r;return W().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(e=Lh.Z.fromQueryString(window.location.search),!(t=e._redirect_url)){o.next=5;break}return o.abrupt("return",t);case 5:return o.next=7,(0,Bf.Ys)(cm);case 7:return n=o.sent,r=n.redirectUrl,o.abrupt("return",r);case 10:case"end":return o.stop()}}),Jh)}function Om(t){var n;return W().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Bf.RE)(e.Z.reinitialiseCache);case 2:return r.next=4,(0,Bf.gz)(Z(""));case 4:return n=t.timeout||30,r.next=7,(0,Bf.gz)(s.Z.fireExternalEvent("loginSuccess",{timeout:n}));case 7:case"end":return r.stop()}}),em)}function xm(e){var t=e.payload;return W().mark((function e(){var n,r,o,a,i;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.username,e.next=3,(0,Bf.gz)(lh());case 3:return e.next=5,(0,Bf.gz)(ph(!0));case 5:return e.next=7,(0,Bf.RE)(Lf.Z.requestSaga,"client/username/check/".concat(n),{method:"GET"});case 7:if(r=e.sent,o=r.body,a=o.existingUser,i=o.validEmail,!a){e.next=14;break}return e.next=12,(0,Bf.gz)(M(_));case 12:case 17:e.next=21;break;case 14:if(!i){e.next=19;break}return e.next=17,(0,Bf.gz)(s.Z.fireExternalEvent("register",{username:n}));case 19:return e.next=21,(0,Bf.RE)(vm);case 21:return e.next=23,(0,Bf.gz)(ph(!1));case 23:case"end":return e.stop()}}),e)}))()}function km(e){var t=e.payload;return W().mark((function e(){var n,r,o,a,i,c;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.username,r=t.password,o=t.captchaToken,a=t.userCode,i=Hh(Hh({username:n,password:r},o&&{captchaToken:o}),a&&{userCode:a}),e.next=4,(0,Bf.gz)(ph(!0));case 4:return e.next=6,(0,Bf.RE)(lm,i);case 6:if(!(c=e.sent).success){e.next=14;break}return e.next=10,(0,Bf.RE)(Om,c);case 10:return e.next=12,(0,Bf.RE)(bm);case 12:e.next=45;break;case 14:return e.next=16,(0,Bf.gz)(M(_));case 16:if(!c.CAPTCHA){e.next=21;break}return e.next=19,(0,Bf.gz)({type:sh});case 19:case 24:case 29:case 34:case 39:e.next=43;break;case 21:if(!c.TWOSTEPLOGIN){e.next=26;break}return e.next=24,(0,Bf.RE)(dm,c);case 26:if(!c.RESET_PASSWORD_REQUIRED){e.next=31;break}return e.next=29,(0,Bf.RE)(mm);case 31:if(!c.LOGIN_BLOCKED){e.next=36;break}return e.next=34,(0,Bf.RE)(gm);case 36:if(!c.TWOSTEPLOGIN_ACTIVATION){e.next=41;break}return e.next=39,(0,Bf.RE)(hm,c);case 41:return e.next=43,(0,Bf.RE)(ym);case 43:return e.next=45,(0,Bf.gz)(ph(!1));case 45:case"end":return e.stop()}}),e)}))()}function _m(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(pm);case 2:if(!(e=t.sent).success){t.next=6;break}return t.next=6,(0,Bf.RE)(Om,e);case 6:return t.abrupt("return",e.success);case 7:case"end":return t.stop()}}),tm)}function Sm(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(Lf.Z.fetchServerSettings);case 2:return e=t.sent,t.next=5,(0,Bf.gz)((n=e.captchaKey,{type:R,payload:{captchaKey:n}}));case 5:case"end":return t.stop()}var n}),nm)}function Em(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(_m);case 2:return e=t.sent,t.next=5,(0,Bf.RE)(Sm);case 5:if(!e){t.next=8;break}return t.next=8,(0,Bf.RE)(bm);case 8:case"end":return t.stop()}}),rm)}function Am(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(lh());case 2:case"end":return e.stop()}}),om)}function Pm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(j,Am),(0,Bf.Fm)(h,km),(0,Bf.Fm)(g,xm),(0,Bf.Fm)(m,sm),(0,Bf.Fm)(d,Em)]);case 2:case"end":return e.stop()}}),am)}function jm(e,t,n,r){if("string"!=typeof e)return!1;var o=e.length-e.replace(t,"").length;return(null==n||o>=n)&&(null==r||o<=r)}var Cm=(Wh={},n()(Wh,"PASSWORD_NOT_CHANGED",(function(e,t){return"string"==typeof e&&"string"==typeof t&&e!==t})),n()(Wh,"LENGTH",(function(e,t,n){return"string"==typeof e&&(void 0===n.params.min||null===n.params.min||e.length>=n.params.min)&&(void 0===n.params.max||null===n.params.max||e.length<=n.params.max)})),n()(Wh,"CHARACTER_INSUFFICIENT_LOWERCASE",(function(e,t,n){return jm(e,/[a-z]/g,n.params.min,n.params.max)})),n()(Wh,"CHARACTER_INSUFFICIENT_UPPERCASE",(function(e,t,n){return jm(e,/[A-Z]/g,n.params.min,n.params.max)})),n()(Wh,"CHARACTER_INSUFFICIENT_DIGIT",(function(e,t,n){return jm(e,/[0-9]/g,n.params.min,n.params.max)})),Wh);const Dm=function(e,t,n){var r={};return n&&n.forEach((function(n){var o=Cm[n.name];o&&(!0!==o(e,t,n)&&(r[n.name]=!0))})),r};var Tm=W().mark(Gm),Rm=W().mark(Km),Im=W().mark($m),Mm=W().mark(Xm),Nm=W().mark(Jm),Zm=W().mark(eg),Bm=W().mark(tg),Lm=W().mark(ng);function Fm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Um(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fm(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hm=function(e){return e.passwordUpdate.validationRules},Wm=function(e){return e.input},zm=function(e){return e.passwordUpdate.dialog.usernameOrPk},Vm=function(e){return e.passwordUpdate.password},Ym=function(e){return e.passwordUpdate.dialog.standalone},qm=function(e){return e.intl};function Gm(e,t,n){var r,o;return W().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return r={method:"POST",acceptedStatusCodes:[400],body:Um(Um({},t),{},{captchaToken:n})},a.prev=1,a.next=4,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(e,"/password-update"),r);case 4:return o=a.sent,a.abrupt("return",o.ok?{error:null}:{error:o.body});case 8:return a.prev=8,a.t0=a.catch(1),a.abrupt("return",{error:{errorCode:"UNEXPECTED_ERROR",exception:a.t0}});case 11:case"end":return a.stop()}}),Tm,null,[[1,8]])}function Km(e,t){var n,r,o,a;return W().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Bf.Ys)(qm);case 2:return n=i.sent,r=n.locale,o={method:"POST",body:t,queryParams:{locale:r}},i.prev=5,i.next=8,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(e,"/password-validation"),o);case 8:return a=i.sent,i.abrupt("return",a.body);case 12:return i.prev=12,i.t0=i.catch(5),i.abrupt("return",{valid:!0,exception:i.t0});case 15:case"end":return i.stop()}}),Rm,null,[[5,12]])}function $m(e){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.gz)((n=e.payload.newPassword,{type:Vt,payload:{newPassword:n}}));case 2:return t.next=4,(0,Bf.gz)({type:Xt});case 4:case"end":return t.stop()}var n}),Im)}function Xm(){var e,t,n,r,o,a,i;return W().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Bf.Ys)(Hm);case 2:return e=c.sent,c.next=5,(0,Bf.Ys)(Vm);case 5:if(t=c.sent,Ch(n=Dm(t.newPassword,t.oldPassword,e))){c.next=12;break}return c.next=10,(0,Bf.gz)(en(n));case 10:case 24:c.next=29;break;case 12:return c.next=14,(0,Bf.Ys)(zm);case 14:return r=c.sent,c.next=17,(0,Bf.RE)(Jm);case 17:return o=c.sent,c.next=20,(0,Bf.RE)(Km,r,o);case 20:if(!0!==(a=c.sent).valid){c.next=26;break}return c.next=24,(0,Bf.gz)(en({}));case 26:return i=Dh(a.validationMessages),c.next=29,(0,Bf.gz)(en(i));case 29:case"end":return c.stop()}}),Mm)}function Qm(e){var t=e.payload.captchaToken;return W().mark((function e(){var n,r,o,a;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.Ys)(zm);case 2:return n=e.sent,e.next=5,(0,Bf.RE)(Jm);case 5:return r=e.sent,e.next=8,(0,Bf.RE)(Gm,n,r,t);case 8:if(!(o=e.sent).error){e.next=21;break}if(!1!==o.error.valid){e.next=15;break}return e.next=13,(0,Bf.gz)(tn(null,o.error.validationMessages));case 13:e.next=17;break;case 15:return e.next=17,(0,Bf.gz)(tn(o.error.errorCode));case 17:return e.next=19,(0,Bf.gz)(s.Z.fireVisibilityStatusChangeEvent([Bh]));case 19:e.next=40;break;case 21:return e.next=23,(0,Bf.Ys)(Ym);case 23:if(!e.sent){e.next=29;break}return e.next=27,(0,Bf.gz)(s.Z.fireExternalEvent("success",{newPassword:r.newPassword}));case 27:e.next=36;break;case 29:return e.next=31,(0,Bf.RE)(eg);case 31:return a=e.sent,e.next=34,(0,Bf.gz)(Z(a.payload.password));case 34:return e.next=36,(0,Bf.RE)(km,a);case 36:return e.next=38,(0,Bf.gz)({type:Kt});case 38:return e.next=40,(0,Bf.gz)(s.Z.fireVisibilityStatusChangeEvent([Zh]));case 40:case"end":return e.stop()}}),e)}))()}function Jm(){var e,t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Bf.Ys)(Wm);case 2:return e=n.sent,n.next=5,(0,Bf.Ys)(Vm);case 5:return t=n.sent,n.abrupt("return",{oldPassword:e.oldPassword?e.oldPassword:t.oldPassword,newPassword:t.newPassword});case 7:case"end":return n.stop()}}),Nm)}function eg(){var e,t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Bf.Ys)(Vm);case 2:return e=n.sent,n.next=5,(0,Bf.Ys)(zm);case 5:return t=n.sent,n.abrupt("return",{payload:{username:t,password:e.newPasswordRepeat}});case 7:case"end":return n.stop()}}),Zm)}function tg(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)({type:Qt});case 2:case"end":return e.stop()}}),Bm)}function ng(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(zt,$m),(0,Bf.Fm)(Xt,Xm),(0,Bf.Fm)(Gt,Qm),(0,Bf.Fm)(zt,tg),(0,Bf.Fm)(Wt,tg),(0,Bf.Fm)(qt,tg)]);case 2:case"end":return e.stop()}}),Lm)}var rg=W().mark(ag),og=W().mark(ig);function ag(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(s.Z.fireExternalEvent("resize"));case 2:case"end":return e.stop()}}),rg)}function ig(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(Ht,ag)]);case 2:case"end":return e.stop()}}),og)}var cg=n()({},rn,(function(e,t){return t.payload.rules}));const sg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=cg[t.type];return n?n(e,t):e};var ug=W().mark(hg),lg=W().mark(mg),pg=function(e){return e.passwordUpdate.dialog.usernameOrPk},fg=function(e){return e.intl};function dg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return W().mark((function n(){var r,o;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r="principals/".concat(e,"/password-rules"),n.next=3,(0,Bf.RE)(Lf.Z.requestSaga,r,{queryParams:{locale:t}});case 3:return o=n.sent,n.abrupt("return",o.body);case 5:case"end":return n.stop()}}),n)}))()}function hg(){var e,t,n,r;return W().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Bf.Ys)(pg);case 2:return e=o.sent,o.next=5,(0,Bf.Ys)(fg);case 5:return t=o.sent,n=t.locale,o.next=9,(0,Bf.RE)(dg,e,n);case 9:return r=o.sent,o.next=12,(0,Bf.gz)((a=r.rules,{type:rn,payload:{rules:a}}));case 12:case"end":return o.stop()}var a}),ug)}function mg(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(nn,hg)]);case 2:case"end":return e.stop()}}),lg)}const gg={dialog:kh,password:Nh,validationRules:sg};var yg=[Ph,ig,ng,mg],vg=n()({},Fh,Tf.Z.singleTransferReducer("secret")),bg={secret:null};const wg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bg,t=arguments.length>1?arguments[1]:void 0,n=vg[t.type];return n?n(e,t):e},Og={login:rh,loginForm:gh,passwordUpdate:(0,eh.UY)(gg),twoStepLogin:wg};var xg=[Pm].concat(Oe()(yg));function kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _g="login",Sg=["loginSuccess","register","resize"],Eg={username:k,"password-request":S,login:_},Ag=function(t,n,r,o,i){var c,l=Eg[n.entryPage]||_,p=[Xd(!1),(c=!1,{type:qd,payload:{standalone:c}}),N(n.username||""),I(l),M(l)],f=!!n.showTitle,d=(0,Pe.jsx)(zd,{showTitle:f}),h=e.Z.createStore(Og,xg,n,_g);return u.Z.setInputEnvs(n),s.Z.addToStore(h,(function(t){return e.Z.getEvents(Sg,t.input)})),a.Z.addToStore(h,!0,["console","remote"]),e.Z.createApp(_g,d,h,{input:n,actions:p,publicPath:o,textResourceModules:["login"],customTheme:i})},Pg=function(t){return e.Z.useApp({initApp:Ag,props:t,packageName:_g,externalEvents:Sg}).component};Pg.propTypes=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kg(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({showTitle:o().bool,locale:o().string,entryPage:o().oneOf(["username","login","password-request"]),username:o().string,setLocale:o().func,backendUrl:o().string,redirectUrl:o().string,appContext:l.Z.propTypes},Sg.reduce((function(e,t){return e[t]=o().func,e}),{}));const jg=function(e){var t=e.usernameOrPk,n=e.showTitle;return(0,Pe.jsx)(on.Z,{required:[t],children:(0,Pe.jsx)(zd,{currentPage:"PASSWORD_UPDATE",showTitle:n})})};const Cg=(0,f.connect)((function(e,t){return{usernameOrPk:e.passwordUpdate.dialog.usernameOrPk}}),{})((0,p.ZP)(jg));function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Rg="password-update",Ig=["success","resize","onVisibilityStatusChange"],Mg=function(t,n,r,o,i){var c=!!n.showTitle,l=!!n.forcedUpdate,p=(0,Pe.jsx)(Cg,{showTitle:c}),f=[Qd(l)];"string"!=typeof n.username||0===n.username.length?f.push({type:$d}):f.push(Jd(n.username)),"boolean"==typeof n.showOldPasswordField&&f.push(Xd(n.showOldPasswordField));var d=e.Z.createStore(Og,xg,n,Rg);return u.Z.setInputEnvs(n),s.Z.addToStore(d,(function(t){return e.Z.getEvents(Ig,t.input)})),a.Z.addToStore(d,!0,["console","remote"]),e.Z.createApp(Rg,p,d,{input:n,actions:f,publicPath:o,textResourceModules:["login"],customTheme:i})},Ng=function(t){return e.Z.useApp({initApp:Mg,props:t,packageName:Rg,externalEvents:Ig}).component};Ng.propTypes=Tg({username:o().string,showTitle:o().bool,showOldPasswordField:o().bool,oldPassword:o().string,backendUrl:o().string,appContext:l.Z.propTypes},Ig.reduce((function(e,t){return Tg(Tg({},e),{},n()({},t,o().func))}),{}));var Zg="login";e.Z.createBundleableApp(Zg,Ag,Pg);var Bg=e.Z.createBundleableApp("password-update",Mg,Ng);e.Z.registerAppInRegistry(Bg.name,Bg.init)})(),c})()));
|
|
57
|
+
*/function xr(e,t=0){const n=[];return e.forEach((function(e,r){let o=null;e.forEach((function(a,i){if(!a&&null!==o)return n.push(`M${o+t} ${r+t}h${i-o}v1H${o+t}z`),void(o=null);if(i!==e.length-1)a&&null===o&&(o=i);else{if(!a)return;null===o?n.push(`M${i+t},${r+t} h1v1H${i+t}z`):n.push(`M${o+t},${r+t} h${i+1-o}v1H${o+t}z`)}}))})),n.join("")}function kr(e,t){return e.slice().map(((e,n)=>n<t.y||n>=t.y+t.h?e:e.map(((e,n)=>(n<t.x||n>=t.x+t.w)&&e))))}function _r(e,t,n,r){if(null==r)return null;const o=n?4:0,a=e.length+2*o,i=Math.floor(.1*t),c=a/t,s=(r.width||i)*c,u=(r.height||i)*c,l=null==r.x?e.length/2-s/2:r.x*c,p=null==r.y?e.length/2-u/2:r.y*c;let f=null;if(r.excavate){let e=Math.floor(l),t=Math.floor(p);f={x:e,y:t,w:Math.ceil(s+l-e),h:Math.ceil(u+p-t)}}return{x:l,y:p,h:u,w:s,excavation:f}}var Sr=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();function Er(e){const t=e,{value:n,size:r=yr,level:o=vr,bgColor:a=br,fgColor:i=wr,includeMargin:c=Or,style:s,imageSettings:u}=t,l=hr(t,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),p=null==u?void 0:u.src,f=(0,w.useRef)(null),d=(0,w.useRef)(null),[h,m]=(0,w.useState)(!1);(0,w.useEffect)((()=>{if(null!=f.current){const e=f.current,t=e.getContext("2d");if(!t)return;let s=mr.QrCode.encodeText(n,gr[o]).getModules();const l=c?4:0,p=s.length+2*l,h=_r(s,r,c,u),m=d.current,g=null!=h&&null!==m&&m.complete&&0!==m.naturalHeight&&0!==m.naturalWidth;g&&null!=h.excavation&&(s=kr(s,h.excavation));const y=window.devicePixelRatio||1;e.height=e.width=r*y;const v=r/p*y;t.scale(v,v),t.fillStyle=a,t.fillRect(0,0,p,p),t.fillStyle=i,Sr?t.fill(new Path2D(xr(s,l))):s.forEach((function(e,n){e.forEach((function(e,r){e&&t.fillRect(r+l,n+l,1,1)}))})),g&&t.drawImage(m,h.x+l,h.y+l,h.w,h.h)}})),(0,w.useEffect)((()=>{m(!1)}),[p]);const g=dr({height:r,width:r},s);let y=null;return null!=p&&(y=O().createElement("img",{src:p,key:p,style:{display:"none"},onLoad:()=>{m(!0)},ref:d})),O().createElement(O().Fragment,null,O().createElement("canvas",dr({style:g,height:r,width:r,ref:f},l)),y)}function Ar(e){const t=e,{value:n,size:r=yr,level:o=vr,bgColor:a=br,fgColor:i=wr,includeMargin:c=Or,imageSettings:s}=t,u=hr(t,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let l=mr.QrCode.encodeText(n,gr[o]).getModules();const p=c?4:0,f=l.length+2*p,d=_r(l,r,c,s);let h=null;null!=s&&null!=d&&(null!=d.excavation&&(l=kr(l,d.excavation)),h=O().createElement("image",{xlinkHref:s.src,height:d.h,width:d.w,x:d.x+p,y:d.y+p,preserveAspectRatio:"none"}));const m=xr(l,p);return O().createElement("svg",dr({height:r,width:r,viewBox:`0 0 ${f} ${f}`},u),O().createElement("path",{fill:a,d:`M0,0 h${f}v${f}H0z`,shapeRendering:"crispEdges"}),O().createElement("path",{fill:i,d:m,shapeRendering:"crispEdges"}),h)}var Pr=e=>{const t=e,{renderAs:n}=t,r=hr(t,["renderAs"]);return"svg"===n?O().createElement(Ar,dr({},r)):O().createElement(Er,dr({},r))};const jr=function(e){var t=e.value;return(0,Pe.jsx)(Pr,{value:t,renderAs:"svg"})};var Cr,Dr,Tr,Rr,Ir,Mr,Nr=x.ZP.div.withConfig({displayName:"StyledQRCodeWrapper"})(Cr||(Cr=b()(["\n display: flex;\n justify-content: center;\n margin: "," "," "," ",";\n"])),Ke.Z.space(1.2),Ke.Z.space(1),Ke.Z.space(1.5),Ke.Z.space(1)),Zr=x.ZP.div.withConfig({displayName:"StyledParagraph"})(Dr||(Dr=b()(["\n display: flex;\n justify-content: center;\n margin-top: ",";\n margin-bottom: ",";\n"])),Ke.Z.space(-1),Ke.Z.space(-.9));const Br=function(e){var t=e.secret,n=e.goToSecretVerification;return(0,Jn.z)(n),(0,Pe.jsxs)(Pe.Fragment,{children:[Tr||(Tr=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.qrCodeInfo"})})),(0,Pe.jsx)(Nr,{children:(0,Pe.jsx)(jr,{value:t.uri})}),Rr||(Rr=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.secretInfo"})})),(0,Pe.jsx)(Zr,{children:(0,Pe.jsx)(rt.ZP.B,{children:t.secret})}),Ir||(Ir=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.backupInfo"})})),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{ink:"primary",look:"raised",onClick:n,children:Mr||(Mr=(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.nextButton"}))})})]})};var Lr={goToSecretVerification:function(){return{type:Fn}}};const Fr=(0,f.connect)((function(e){return{secret:e.twoFactorConnector.secret}}),Lr)((0,p.ZP)(Br));var Ur;const Hr=function(e){var t=e.twoFactorActive,n=e.forced,r=e.requestSecret,o=e.intl;(0,Jn.z)(r);var a=function(e){return o.formatMessage({id:e})};return(0,Pe.jsxs)(Pe.Fragment,{children:[(0,Pe.jsx)(rt.ZP.P,{children:function(){if(t)return Ur||(Ur=(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.overwriteInfo"}));var e=a(n?"client.two-factor-connector.forcedInfo":"client.two-factor-connector.info");return(0,Pe.jsx)("span",{dangerouslySetInnerHTML:{__html:e}})}()}),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:a("client.two-factor-connector.nextButton"),ink:"primary",look:"raised",onClick:r})})]})};var Wr={initialize:qn,requestSecret:function(){return{type:Ln}}};const zr=(0,f.connect)((function(e){return{twoFactorActive:e.twoFactorConnector.twoFactorActive,secret:e.twoFactorConnector.secret,forced:e.input.forced}}),Wr)((0,p.ZP)(Hr));var Vr=i(57557),Yr=i.n(Vr),qr=i(41609),Gr=i.n(qr),Kr=i(14293),$r=i.n(Kr),Xr=i(23493),Qr=i.n(Xr),Jr=i(33417),eo=i(1972),to=i(32924),no=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var ro=i(2717);function oo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ao(e,t){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ao(e,t)}function io(e){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},io(e)}var co=i(62360);function so(e,t){if(t&&("object"===(0,co.Z)(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)}function uo(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,r=io(e);if(t){var o=io(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return so(this,n)}}var lo=i(31599);var po=i(78001);function fo(e){return function(e){if(Array.isArray(e))return(0,lo.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,po.Z)(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.")}()}var ho=i(99388),mo=i(1537),go=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function yo(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||go(r)&&go(o)))return!1;var r,o;return!0}for(var vo={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},bo=function(e){return(0,mo.tZ)("span",(0,ro.Z)({css:vo},e))},wo={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.isDisabled,o=e.tabSelectsValue;switch(e.context){case"menu":return"Use Up and Down to choose options".concat(r?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" 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";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,a=void 0===o?"":o,i=e.selectValue,c=e.isDisabled,s=e.isSelected,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(a," focused, ").concat(u(i,n),".");if("menu"===t){var l=c?" disabled":"",p="".concat(s?"selected":"focused").concat(l);return"option ".concat(a," ").concat(p,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Oo=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,i=e.selectValue,c=e.selectProps,s=e.id,u=c.ariaLiveMessages,l=c.getOptionLabel,p=c.inputValue,f=c.isMulti,d=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,g=c.options,y=c.screenReaderStatus,v=c.tabSelectsValue,b=c["aria-label"],O=c["aria-live"],x=(0,w.useMemo)((function(){return(0,Jr.Z)((0,Jr.Z)({},wo),u||{})}),[u]),k=(0,w.useMemo)((function(){var e,n="";if(t&&x.onChange){var r=t.option,o=t.options,a=t.removedValue,c=t.removedValues,s=t.value,u=a||r||(e=s,Array.isArray(e)?null:e),p=u?l(u):"",f=o||c||void 0,h=f?f.map(l):[],m=(0,Jr.Z)({isDisabled:u&&d(u,i),label:p,labels:h},t);n=x.onChange(m)}return n}),[t,x,d,i,l]),_=(0,w.useMemo)((function(){var e="",t=n||r,a=!!(n&&i&&i.includes(n));if(t&&x.onFocus){var c={focused:t,label:l(t),isDisabled:d(t,i),isSelected:a,options:o,context:t===n?"menu":"value",selectValue:i};e=x.onFocus(c)}return e}),[n,r,l,d,x,o,i]),S=(0,w.useMemo)((function(){var e="";if(m&&g.length&&x.onFilter){var t=y({count:o.length});e=x.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,m,x,g,y]),E=(0,w.useMemo)((function(){var e="";if(x.guidance){var t=r?"value":m?"menu":"input";e=x.guidance({"aria-label":b,context:t,isDisabled:n&&d(n,i),isMulti:f,isSearchable:h,tabSelectsValue:v})}return e}),[b,n,r,f,d,h,m,x,i,v]),A="".concat(_," ").concat(S," ").concat(E),P=(0,mo.tZ)(w.Fragment,null,(0,mo.tZ)("span",{id:"aria-selection"},k),(0,mo.tZ)("span",{id:"aria-context"},A)),j="initial-input-focus"===(null==t?void 0:t.action);return(0,mo.tZ)(w.Fragment,null,(0,mo.tZ)(bo,{id:s},j&&P),(0,mo.tZ)(bo,{"aria-live":O,"aria-atomic":"false","aria-relevant":"additions text"},a&&!j&&P))},xo=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],ko=new RegExp("["+xo.map((function(e){return e.letters})).join("")+"]","g"),_o={},So=0;So<xo.length;So++)for(var Eo=xo[So],Ao=0;Ao<Eo.letters.length;Ao++)_o[Eo.letters[Ao]]=Eo.base;var Po=function(e){return e.replace(ko,(function(e){return _o[e]}))},jo=function(e,t){void 0===t&&(t=yo);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}(Po),Co=function(e){return e.replace(/^\s+|\s+$/g,"")},Do=function(e){return"".concat(e.label," ").concat(e.value)},To=["innerRef"];function Ro(e){var t=e.innerRef,n=(0,to.Z)(e,To),r=(0,ho.r)(n,"onExited","in","enter","exit","appear");return(0,mo.tZ)("input",(0,ro.Z)({ref:t},r,{css:(0,mo.iv)({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Io=["boxSizing","height","overflow","paddingRight","position"],Mo={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function No(e){e.preventDefault()}function Zo(e){e.stopPropagation()}function Bo(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Lo(){return"ontouchstart"in window||navigator.maxTouchPoints}var Fo=!("undefined"==typeof window||!window.document||!window.document.createElement),Uo=0,Ho={capture:!1,passive:!1};var Wo=function(){return document.activeElement&&document.activeElement.blur()},zo={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Vo(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,i=(0,w.useRef)(!1),c=(0,w.useRef)(!1),s=(0,w.useRef)(0),u=(0,w.useRef)(null),l=(0,w.useCallback)((function(e,t){if(null!==u.current){var s=u.current,l=s.scrollTop,p=s.scrollHeight,f=s.clientHeight,d=u.current,h=t>0,m=p-f-l,g=!1;m>t&&i.current&&(r&&r(e),i.current=!1),h&&c.current&&(a&&a(e),c.current=!1),h&&t>m?(n&&!i.current&&n(e),d.scrollTop=p,g=!0,i.current=!0):!h&&-t>l&&(o&&!c.current&&o(e),d.scrollTop=0,g=!0,c.current=!0),g&&function(e){e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,a]),p=(0,w.useCallback)((function(e){l(e,e.deltaY)}),[l]),f=(0,w.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),d=(0,w.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;l(e,t)}),[l]),h=(0,w.useCallback)((function(e){if(e){var t=!!ho.s&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",d,t)}}),[d,f,p]),m=(0,w.useCallback)((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",d,!1))}),[d,f,p]);return(0,w.useEffect)((function(){if(t){var e=u.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){u.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,w.useRef)({}),a=(0,w.useRef)(null),i=(0,w.useCallback)((function(e){if(Fo){var t=document.body,n=t&&t.style;if(r&&Io.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&Uo<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,c=window.innerWidth-i+a||0;Object.keys(Mo).forEach((function(e){var t=Mo[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(c,"px"))}t&&Lo()&&(t.addEventListener("touchmove",No,Ho),e&&(e.addEventListener("touchstart",Bo,Ho),e.addEventListener("touchmove",Zo,Ho))),Uo+=1}}),[r]),c=(0,w.useCallback)((function(e){if(Fo){var t=document.body,n=t&&t.style;Uo=Math.max(Uo-1,0),r&&Uo<1&&Io.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Lo()&&(t.removeEventListener("touchmove",No,Ho),e&&(e.removeEventListener("touchstart",Bo,Ho),e.removeEventListener("touchmove",Zo,Ho)))}}),[r]);return(0,w.useEffect)((function(){if(t){var e=a.current;return i(e),function(){c(e)}}}),[t,i,c]),function(e){a.current=e}}({isEnabled:n});return(0,mo.tZ)(w.Fragment,null,n&&(0,mo.tZ)("div",{onClick:Wo,css:zo}),t((function(e){o(e),a(e)})))}var Yo={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},qo=function(e){var t=e.name,n=e.onFocus;return(0,mo.tZ)("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:Yo,value:"",onChange:function(){}})},Go={clearIndicator:ho.a,container:ho.b,control:ho.d,dropdownIndicator:ho.e,group:ho.g,groupHeading:ho.f,indicatorsContainer:ho.i,indicatorSeparator:ho.h,input:ho.j,loadingIndicator:ho.l,loadingMessage:ho.k,menu:ho.m,menuList:ho.n,menuPortal:ho.o,multiValue:ho.p,multiValueLabel:ho.q,multiValueRemove:ho.t,noOptionsMessage:ho.u,option:ho.v,placeholder:ho.w,singleValue:ho.x,valueContainer:ho.y};var Ko,$o={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}},Xo={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,ho.z)(),captureMenuScroll:!(0,ho.z)(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=(0,Jr.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:Do,trim:!0,matchFrom:"any"},Ko),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,c=n.matchFrom,s=i?Co(t):t,u=i?Co(a(e)):a(e);return r&&(s=s.toLowerCase(),u=u.toLowerCase()),o&&(s=jo(s),u=Po(u)),"start"===c?u.substr(0,s.length)===s:u.indexOf(s)>-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:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!(0,ho.A)(),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,unstyled:!1};function Qo(e,t,n,r){return{type:"option",data:t,isDisabled:oa(e,t,n),isSelected:aa(e,t,n),label:na(e,t),value:ra(e,t),index:r}}function Jo(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Qo(e,n,t,r)})).filter((function(t){return ta(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=Qo(e,n,t,r);return ta(e,a)?a:void 0})).filter(ho.G)}function ea(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,fo(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ta(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,c=t.value;return(!ca(e)||!a)&&ia(e,{label:i,value:c,data:o},r)}var na=function(e,t){return e.getOptionLabel(t)},ra=function(e,t){return e.getOptionValue(t)};function oa(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function aa(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ra(e,t);return n.some((function(t){return ra(e,t)===r}))}function ia(e,t,n){return!e.filterOption||e.filterOption(t,n)}var ca=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},sa=1,ua=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&&ao(e,t)}(a,e);var t,n,r,o=uo(a);function a(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=o.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},t.blockOptionHover=!1,t.isComposing=!1,t.commonProps=void 0,t.initialTouchX=0,t.initialTouchY=0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(e){t.controlRef=e},t.focusedOptionRef=null,t.getFocusedOptionRef=function(e){t.focusedOptionRef=e},t.menuListRef=null,t.getMenuListRef=function(e){t.menuListRef=e},t.inputRef=null,t.getInputRef=function(e){t.inputRef=e},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(e,n){var r=t.props,o=r.onChange,a=r.name;n.name=a,t.ariaOnChange(e,n),o(e,n)},t.setValue=function(e,n,r){var o=t.props,a=o.closeMenuOnSelect,i=o.isMulti,c=o.inputValue;t.onInputChange("",{action:"set-value",prevInputValue:c}),a&&(t.setState({inputIsHiddenAfterUpdate:!i}),t.onMenuClose()),t.setState({clearFocusValueOnUpdate:!0}),t.onChange(e,{action:n,option:r})},t.selectOption=function(e){var n=t.props,r=n.blurInputOnSelect,o=n.isMulti,a=n.name,i=t.state.selectValue,c=o&&t.isOptionSelected(e,i),s=t.isOptionDisabled(e,i);if(c){var u=t.getOptionValue(e);t.setValue((0,ho.B)(i.filter((function(e){return t.getOptionValue(e)!==u}))),"deselect-option",e)}else{if(s)return void t.ariaOnChange((0,ho.C)(e),{action:"select-option",option:e,name:a});o?t.setValue((0,ho.B)([].concat(fo(i),[e])),"select-option",e):t.setValue((0,ho.C)(e),"select-option")}r&&t.blurInput()},t.removeValue=function(e){var n=t.props.isMulti,r=t.state.selectValue,o=t.getOptionValue(e),a=r.filter((function(e){return t.getOptionValue(e)!==o})),i=(0,ho.D)(n,a,a[0]||null);t.onChange(i,{action:"remove-value",removedValue:e}),t.focusInput()},t.clearValue=function(){var e=t.state.selectValue;t.onChange((0,ho.D)(t.props.isMulti,[],null),{action:"clear",removedValues:e})},t.popValue=function(){var e=t.props.isMulti,n=t.state.selectValue,r=n[n.length-1],o=n.slice(0,n.length-1),a=(0,ho.D)(e,o,o[0]||null);t.onChange(a,{action:"pop-value",removedValue:r})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return ho.E.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return na(t.props,e)},t.getOptionValue=function(e){return ra(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=Go[e](n,r);o.boxSizing="border-box";var a=t.props.styles[e];return a?a(o,n):o},t.getClassNames=function(e,n){var r,o;return null===(r=(o=t.props.classNames)[e])||void 0===r?void 0:r.call(o,n)},t.getElementId=function(e){return"".concat(t.instancePrefix,"-").concat(e)},t.getComponents=function(){return(0,ho.F)(t.props)},t.buildCategorizedOptions=function(){return Jo(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return ea(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:(0,Jr.Z)({value:e},n)})},t.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(e){t.blockOptionHover=!1},t.onControlMouseDown=function(e){if(!e.defaultPrevented){var n=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&t.onMenuClose():n&&t.openMenu("first"):(n&&(t.openAfterFocus=!0),t.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},t.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||t.props.isDisabled)){var n=t.props,r=n.isMulti,o=n.menuIsOpen;t.focusInput(),o?(t.setState({inputIsHiddenAfterUpdate:!r}),t.onMenuClose()):t.openMenu("first"),e.preventDefault()}},t.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(t.clearValue(),e.preventDefault(),t.openAfterFocus=!1,"touchend"===e.type?t.focusInput():setTimeout((function(){return t.focusInput()})))},t.onScroll=function(e){"boolean"==typeof t.props.closeMenuOnScroll?e.target instanceof HTMLElement&&(0,ho.H)(e.target)&&t.props.onMenuClose():"function"==typeof t.props.closeMenuOnScroll&&t.props.closeMenuOnScroll(e)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(e){var n=e.touches,r=n&&n.item(0);r&&(t.initialTouchX=r.clientX,t.initialTouchY=r.clientY,t.userIsDragging=!1)},t.onTouchMove=function(e){var n=e.touches,r=n&&n.item(0);if(r){var o=Math.abs(r.clientX-t.initialTouchX),a=Math.abs(r.clientY-t.initialTouchY);t.userIsDragging=o>5||a>5}},t.onTouchEnd=function(e){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(e.target)&&t.menuListRef&&!t.menuListRef.contains(e.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(e){t.userIsDragging||t.onControlMouseDown(e)},t.onClearIndicatorTouchEnd=function(e){t.userIsDragging||t.onClearIndicatorMouseDown(e)},t.onDropdownIndicatorTouchEnd=function(e){t.userIsDragging||t.onDropdownIndicatorMouseDown(e)},t.handleInputChange=function(e){var n=t.props.inputValue,r=e.currentTarget.value;t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange(r,{action:"input-change",prevInputValue:n}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(e){t.props.onFocus&&t.props.onFocus(e),t.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(e){var n=t.props.inputValue;t.menuListRef&&t.menuListRef.contains(document.activeElement)?t.inputRef.focus():(t.props.onBlur&&t.props.onBlur(e),t.onInputChange("",{action:"input-blur",prevInputValue:n}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1}))},t.onOptionHover=function(e){t.blockOptionHover||t.state.focusedOption===e||t.setState({focusedOption:e})},t.shouldHideSelectedOptions=function(){return ca(t.props)},t.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),t.focus()},t.onKeyDown=function(e){var n=t.props,r=n.isMulti,o=n.backspaceRemovesValue,a=n.escapeClearsValue,i=n.inputValue,c=n.isClearable,s=n.isDisabled,u=n.menuIsOpen,l=n.onKeyDown,p=n.tabSelectsValue,f=n.openMenuOnFocus,d=t.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(s||"function"==typeof l&&(l(e),e.defaultPrevented))){switch(t.blockOptionHover=!0,e.key){case"ArrowLeft":if(!r||i)return;t.focusValue("previous");break;case"ArrowRight":if(!r||i)return;t.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(m)t.removeValue(m);else{if(!o)return;r?t.popValue():c&&t.clearValue()}break;case"Tab":if(t.isComposing)return;if(e.shiftKey||!u||!p||!h||f&&t.isOptionSelected(h,g))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":u?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:i}),t.onMenuClose()):c&&a&&t.clearValue();break;case" ":if(i)return;if(!u){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":u?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":u?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!u)return;t.focusOption("pageup");break;case"PageDown":if(!u)return;t.focusOption("pagedown");break;case"Home":if(!u)return;t.focusOption("first");break;case"End":if(!u)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++sa),t.state.selectValue=(0,ho.I)(e.value),e.menuIsOpen&&t.state.selectValue.length){var n=t.buildFocusableOptions(),r=n.indexOf(t.state.selectValue[0]);t.state.focusedOption=n[r]}return t}return t=a,n=[{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(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&(0,ho.J)(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&((0,ho.J)(this.menuListRef,this.focusedOptionRef),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(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),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,n=this.state,r=n.selectValue,o=n.isFocused,a=this.buildFocusableOptions(),i="first"===e?0:a.length-1;if(!this.props.isMulti){var c=a.indexOf(r[0]);c>-1&&(i=c)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o<a&&(i=o+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme($o):(0,Jr.Z)((0,Jr.Z)({},$o),this.props.theme):$o}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,a=this.selectOption,i=this.setValue,c=this.props,s=c.isMulti,u=c.isRtl,l=c.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:s,isRtl:u,options:l,selectOption:a,selectProps:c,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().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 oa(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return aa(this.props,e,t)}},{key:"filterOption",value:function(e,t){return ia(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}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:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=e.form,c=e.menuIsOpen,s=e.required,u=this.getComponents().Input,l=this.state,p=l.inputIsHidden,f=l.ariaSelection,d=this.commonProps,h=r||this.getElementId("input"),m=(0,Jr.Z)((0,Jr.Z)((0,Jr.Z)({"aria-autocomplete":"list","aria-expanded":c,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":s,role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?w.createElement(u,(0,ro.Z)({},d,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},m)):w.createElement(Ro,(0,ro.Z)({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ho.K,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:i,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,c=t.Placeholder,s=this.commonProps,u=this.props,l=u.controlShouldRenderValue,p=u.isDisabled,f=u.isMulti,d=u.inputValue,h=u.placeholder,m=this.state,g=m.selectValue,y=m.focusedValue,v=m.isFocused;if(!this.hasValue()||!l)return d?null:w.createElement(c,(0,ro.Z)({},s,{key:"placeholder",isDisabled:p,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map((function(t,i){var c=t===y,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return w.createElement(n,(0,ro.Z)({},s,{components:{Container:r,Label:o,Remove:a},isFocused:c,isDisabled:p,key:u,index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(d)return null;var b=g[0];return w.createElement(i,(0,ro.Z)({},s,{data:b,isDisabled:p}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(e,(0,ro.Z)({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?w.createElement(e,(0,ro.Z)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return w.createElement(n,(0,ro.Z)({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(e,(0,ro.Z)({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,c=t.LoadingMessage,s=t.NoOptionsMessage,u=t.Option,l=this.commonProps,p=this.state.focusedOption,f=this.props,d=f.captureMenuScroll,h=f.inputValue,m=f.isLoading,g=f.loadingMessage,y=f.minMenuHeight,v=f.maxMenuHeight,b=f.menuIsOpen,O=f.menuPlacement,x=f.menuPosition,k=f.menuPortalTarget,_=f.menuShouldBlockScroll,S=f.menuShouldScrollIntoView,E=f.noOptionsMessage,A=f.onMenuScrollToTop,P=f.onMenuScrollToBottom;if(!b)return null;var j,C=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,c=t.label,s=t.value,f=p===o,d=a?void 0:function(){return e.onOptionHover(o)},h=a?void 0:function(){return e.selectOption(o)},m="".concat(e.getElementId("option"),"-").concat(n),g={id:m,onClick:h,onMouseMove:d,onMouseOver:d,tabIndex:-1};return w.createElement(u,(0,ro.Z)({},l,{innerProps:g,data:o,isDisabled:a,isSelected:i,key:m,label:c,type:r,value:s,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())j=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,a=t.options,i=t.index,c="".concat(e.getElementId("group"),"-").concat(i),s="".concat(c,"-heading");return w.createElement(n,(0,ro.Z)({},l,{key:c,data:o,options:a,Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return C(e,"".concat(i,"-").concat(e.index))})))}if("option"===t.type)return C(t,"".concat(t.index))}));else if(m){var D=g({inputValue:h});if(null===D)return null;j=w.createElement(c,l,D)}else{var T=E({inputValue:h});if(null===T)return null;j=w.createElement(s,l,T)}var R={minMenuHeight:y,maxMenuHeight:v,menuPlacement:O,menuPosition:x,menuShouldScrollIntoView:S},I=w.createElement(ho.M,(0,ro.Z)({},l,R),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,c=r.maxHeight;return w.createElement(o,(0,ro.Z)({},l,R,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:i}),w.createElement(Vo,{captureEnabled:d,onTopArrive:A,onBottomArrive:P,lockEnabled:_},(function(t){return w.createElement(a,(0,ro.Z)({},l,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:c,focusedOption:p}),j)})))}));return k||"fixed"===x?w.createElement(i,(0,ro.Z)({},l,{appendTo:k,controlElement:this.controlRef,menuPlacement:O,menuPosition:x}),I):I}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=t.required,c=this.state.selectValue;if(a&&!r){if(i&&!this.hasValue())return w.createElement(qo,{name:a,onFocus:this.onValueInputFocus});if(o){if(n){var s=c.map((function(t){return e.getOptionValue(t)})).join(n);return w.createElement("input",{name:a,type:"hidden",value:s})}var u=c.length>0?c.map((function(t,n){return w.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):w.createElement("input",{name:a,type:"hidden",value:""});return w.createElement("div",null,u)}var l=c[0]?this.getOptionValue(c[0]):"";return w.createElement("input",{name:a,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.isFocused,i=t.selectValue,c=this.getFocusableOptions();return w.createElement(Oo,(0,ro.Z)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:i,focusableOptions:c}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,c=a.id,s=a.isDisabled,u=a.menuIsOpen,l=this.state.isFocused,p=this.commonProps=this.getCommonProps();return w.createElement(r,(0,ro.Z)({},p,{className:i,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:l}),this.renderLiveRegion(),w.createElement(t,(0,ro.Z)({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:l,menuIsOpen:u}),w.createElement(o,(0,ro.Z)({},p,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(n,(0,ro.Z)({},p,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,i=t.isFocused,c=t.prevWasFocused,s=e.options,u=e.value,l=e.menuIsOpen,p=e.inputValue,f=e.isMulti,d=(0,ho.I)(u),h={};if(n&&(u!==n.value||s!==n.options||l!==n.menuIsOpen||p!==n.inputValue)){var m=l?function(e,t){return ea(Jo(e,t))}(e,d):[],g=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,d):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m);h={selectValue:d,focusedOption:y,focusedValue:g,clearFocusValueOnUpdate:!1}}var v=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},b=a,w=i&&c;return i&&!w&&(b={value:(0,ho.D)(f,d,d[0]||null),options:d,action:"initial-input-focus"},w=!c),"initial-input-focus"===(null==a?void 0:a.action)&&(b=null),(0,Jr.Z)((0,Jr.Z)((0,Jr.Z)({},h),v),{},{prevProps:e,ariaSelection:b,prevWasFocused:w})}}],n&&oo(t.prototype,n),r&&oo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(w.Component);ua.defaultProps=Xo;i(66751),i(30314),i(73469);var la=(0,w.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,a=e.defaultValue,i=void 0===a?null:a,c=e.inputValue,s=e.menuIsOpen,u=e.onChange,l=e.onInputChange,p=e.onMenuClose,f=e.onMenuOpen,d=e.value,h=(0,to.Z)(e,no),m=(0,w.useState)(void 0!==c?c:n),g=(0,eo.Z)(m,2),y=g[0],v=g[1],b=(0,w.useState)(void 0!==s?s:o),O=(0,eo.Z)(b,2),x=O[0],k=O[1],_=(0,w.useState)(void 0!==d?d:i),S=(0,eo.Z)(_,2),E=S[0],A=S[1],P=(0,w.useCallback)((function(e,t){"function"==typeof u&&u(e,t),A(e)}),[u]),j=(0,w.useCallback)((function(e,t){var n;"function"==typeof l&&(n=l(e,t)),v(void 0!==n?n:e)}),[l]),C=(0,w.useCallback)((function(){"function"==typeof f&&f(),k(!0)}),[f]),D=(0,w.useCallback)((function(){"function"==typeof p&&p(),k(!1)}),[p]),T=void 0!==c?c:y,R=void 0!==s?s:x,I=void 0!==d?d:E;return(0,Jr.Z)((0,Jr.Z)({},h),{},{inputValue:T,menuIsOpen:R,onChange:P,onInputChange:j,onMenuClose:D,onMenuOpen:C,value:I})}(e);return w.createElement(ua,(0,ro.Z)({ref:t},n))}));const pa=la;var fa=i(80470);function da(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ha(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?da(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):da(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ma=(0,p.ZP)((function(e){var t;return(0,Pe.jsx)("span",ha(ha({},e.innerProps),{},{children:(0,Pe.jsx)(fa.Z,{icon:"times",tabIndex:-1,"aria-label":(t="client.component.select.clearFieldLabel",e.intl.formatMessage({id:t}))})}))}));var ga=i(95497);function ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function va(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ya(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ba=function(e){var t=e.selectProps,n=t.isDisabled,r=t.menuIsOpen;return n?null:(0,Pe.jsx)(ho.c.DropdownIndicator,va(va({},e),{},{children:(0,Pe.jsxs)(ga.M6,{children:[(0,Pe.jsx)(ga.A,{icon:"chevron-down",visible:!r,tabIndex:-1}),(0,Pe.jsx)(ga.A,{icon:"chevron-up",visible:r,tabIndex:-1})]})}))};var wa,Oa,xa;function ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ka(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ka(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Sa=function(e,t,n){return function(r){r.stopPropagation(),e(t,n)}},Ea=function(e,t){return function(n){n.stopPropagation(),e(t)}},Aa=function(e,t){return function(n){n.stopPropagation(),e(t)}},Pa=function(e){e.stopPropagation()};const ja=function(e){var t=e.selectProps,n=t.openDocsTreeSearch,r=t.openAdvancedSearch,o=t.openRemoteCreate,a=t.isDisabled,i=t.hasDocsTreeSearch,c=t.hasAdvancedSearch,s=t.createPermission,u=t.value,l=t.isMulti,p=t.inputValue,f=l&&(c||i);return(0,Pe.jsx)(ga.HO,{isTopAligned:f,children:(0,Pe.jsxs)(ho.c.IndicatorsContainer,_a(_a({},e),{},{children:[e.children,n&&!a&&(0,Pe.jsx)("span",{onTouchEnd:Pa,onMouseDown:Ea(n,u),children:wa||(wa=(0,Pe.jsx)(fa.Z,{icon:"folder",tabIndex:-1}))}),r&&!a&&(0,Pe.jsx)("span",{onTouchEnd:Pa,onMouseDown:Sa(r,p,u),children:Oa||(Oa=(0,Pe.jsx)(fa.Z,{icon:"search",tabIndex:-1}))}),s&&!a&&(0,Pe.jsx)("span",{onTouchEnd:Pa,onMouseDown:Aa(o,u),children:xa||(xa=(0,Pe.jsx)(fa.Z,{icon:"plus",tabIndex:-1}))})]}))})};var Ca,Da=i(93235);const Ta=function(){return Ca||(Ca=(0,Pe.jsx)("span",{children:(0,Pe.jsx)(Da.Z,{size:"1.8rem"})}))};function Ra(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ia(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ra(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ra(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ma=function(e){var t=e.selectProps,n=e.children;return(0,Pe.jsx)(ga._M,{attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together"}],renderTarget:function(e){return(0,Pe.jsx)("div",{ref:e})},renderElement:function(r){return(0,Pe.jsx)("div",{ref:r,children:(0,Pe.jsx)(ga.l2,Ia(Ia({},Yr()(e,["innerRef"])),{},{wrapperWidth:t.wrapperWidth,wrapperHeight:t.wrapperHeight,children:n}))})}})};function Na(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Za(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Na(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Na(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ba=function(e){var t=e.selectProps,n=e.children,r=t.moreOptionsAvailable,o=t.moreOptionsAvailableText;return(0,Pe.jsxs)(ho.c.MenuList,Za(Za({},e),{},{className:"MenuList",children:[n,r&&(0,Pe.jsx)(ga.OA,{children:o})]}))};var La,Fa=i(27361),Ua=i.n(Fa),Ha=i(76791);const Wa=x.ZP.span(La||(La=b()(["\n pointer-events: auto;\n cursor: pointer;\n"])));function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?za(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):za(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Ya=function(e){var t=e.data,n=e.innerProps,r=e.children,o=e.selectProps,a=o.tooltips,i=o.loadTooltip,c=o.DetailLink,s=Ua()(a,t.key,null),u=(0,Pe.jsx)("span",Va(Va({},n),{},{children:r})),l=c?(0,Pe.jsx)(Wa,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,Pe.jsx)(c,{entityKey:t.key,children:(0,Pe.jsx)(Ha.Z,{content:s?(0,Pe.jsx)("div",{dangerouslySetInnerHTML:{__html:ve.Z.sanitizeHtml(s)}}):null,children:(0,Pe.jsx)("span",{onMouseOver:function(){return i&&!s&&i(t.key)},children:u})})})}):u;return(0,Pe.jsx)(ga.B1,{children:l})};var qa=i(47037),Ga=i.n(qa),Ka=i(14176),$a=i.n(Ka);function Xa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qa(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xa(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xa(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ja=["linkComp"],ei=function(e,t){var n=ye.Z.difference(e,t),r=$a()(Yr()(n,Ja),(function(e){return 0===Object.keys(e).length}));return 0===Object.entries(r).length},ti=(0,w.memo)((function(e){var t=e.linkComp,n=e.entityKey,r=e.children;return t&&Ga()(n)?(0,Pe.jsx)(Wa,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,Pe.jsx)(t,{entityKey:n,children:r})}):r}),ei);ti.propTypes={children:o().node,entityKey:o().any,linkComp:o().func};const ni=function(e){var t=e.data,n=e.selectProps,r=e.isDisabled,o=e.children,a=n.tooltips,i=n.loadTooltip,c=n.DetailLink,s=Ua()(a,t.key,null);return(0,Pe.jsx)(ho.c.SingleValue,Qa(Qa({},e),{},{children:(0,Pe.jsx)(ga.xq,{onMouseOver:function(){return i&&!s&&i(t.key)},isDisabled:r,children:(0,Pe.jsx)(Ha.Z,{content:s?(0,Pe.jsx)("div",{dangerouslySetInnerHTML:{__html:ve.Z.sanitizeHtml(s)}}):null,children:(0,Pe.jsx)(ti,{linkComp:c,entityKey:t.key,children:o})})})}))};function ri(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var oi=function(e){var t;return"Input"===(null==e||null===(t=e.type)||void 0===t?void 0:t.name)};const ai=function(e){var t=e.selectProps,r=e.hasValue,o=e.children,a=t.isMulti,i=t.hasAdvancedSearch,c=t.hasDocsTreeSearch,s=t.isDisabled;if(!(a&&(i||c)))return(0,Pe.jsx)(ho.c.ValueContainer,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ri(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ri(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e));var u=w.Children.map(o,(function(e){return oi(e)?e:null})),l=w.Children.map(o,(function(e){return oi(e)?null:e})),p=s&&r;return(0,Pe.jsxs)(Pe.Fragment,{children:[!p&&(0,Pe.jsx)(Pe.Fragment,{children:u}),(0,Pe.jsx)(ga.eQ,{children:l})]})};function ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ci(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ii(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ii(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const si=(0,x.Zz)((function(e){var t=e.fetchOptions,n=e.id,r=e.immutable,o=e.isLoading,a=e.isMulti,i=e.loadTooltip,c=e.moreOptionsAvailable,s=e.moreOptionsAvailableText,u=e.noResultsText,l=e.noResultsComp,p=e.onChange,f=e.openDocsTreeSearch,d=e.openAdvancedSearch,h=e.options,m=e.searchOptions,g=e.theme,y=e.tooltips,v=e.value,b=e.DetailLink,O=e.createPermission,x=e.openRemoteCreate,k=(0,w.useRef)(null),_=(0,w.useRef)(null),S=function(){var e;return(null===(e=_.current)||void 0===e?void 0:e.clientWidth)||300},E=function(){var e;return(null===(e=_.current)||void 0===e?void 0:e.clientHeight)||35},A=(0,w.useState)(S()),P=U()(A,2),j=P[0],C=P[1],D=(0,w.useState)(E()),T=U()(D,2),R=T[0],I=T[1],M=(0,w.useState)(!1),N=U()(M,2),Z=N[0],B=N[1],L=function(e){t&&t(e)},F=(0,w.useCallback)(m||function(){},[]),H=(0,w.useCallback)(Qr()(F,800,{trailing:!0}),[]),W=Boolean(d),z=Boolean(f),V=Boolean(O);return(0,Pe.jsx)(ga.sP,{tabIndex:"-1",id:n,onFocus:function(){k.current.focus(),setTimeout((function(){C(S()),I(E())}),0)},children:(0,Pe.jsx)(ga.RU,{ref:_,children:(0,Pe.jsx)(pa,ci(ci({getOptionLabel:function(e){return e.display},getOptionValue:function(e){return e.key},wrapperWidth:j,wrapperHeight:R,components:{ClearIndicator:ma,LoadingIndicator:Ta,DropdownIndicator:ba,IndicatorsContainer:ja,IndicatorSeparator:null,Menu:Ma,MenuList:Ba,MultiValueLabel:Ya,SingleValue:ni,ValueContainer:ai},noOptionsMessage:function(e){return u||("function"==typeof l?(0,Pe.jsx)(l,ci({},e)):" - ")},isMulti:a,closeMenuOnSelect:!a,isSearchable:!0},m?{filterOption:function(){return!0}}:{}),{},{isClearable:!0,loadingMessage:function(){return null},placeholder:"",menuShouldScrollIntoView:!1,autoFocus:!1,value:v||null,onChange:function(e){p(e),L(e)},onInputChange:function(e,t){var n=t.action;m&&e&&H(e,v),""===e&&"input-change"===n&&L(v)},options:Oe()(h||[]),onKeyDown:function(e){"Enter"===e.key&&Z&&e.stopPropagation()},isLoading:o,isDisabled:r,ref:k,onMenuOpen:function(){L(v),B(!0)},onMenuClose:function(){B(!1)},styles:(0,ga.i4)(g),loadTooltip:i,tooltips:y,DetailLink:b,hasDocsTreeSearch:z,openDocsTreeSearch:f,hasAdvancedSearch:W,openAdvancedSearch:d,moreOptionsAvailable:c,moreOptionsAvailableText:s,blurInputOnSelect:!1,hasCreatePermission:V,createPermission:O,openRemoteCreate:x,closeMenuOnScroll:function(e){var t;return!(null!==(t=e.target.classList)&&void 0!==t&&t.contains("MenuList"))}}))})})}));const ui=function(e){var t=e.id,n=e.immutable,r=e.value,o=e.options,a=o.trueLabel,i=o.falseLabel,c=e.onChange;return(0,Pe.jsx)(si,{id:t,immutable:n,isMulti:!1,onChange:function(e){return c(e?e.key:null)},value:$r()(r)?r:{key:r,display:r?a:i},openMenuOnClick:!0,options:[{key:!0,display:a},{key:!1,display:i}]})};var li,pi=x.ZP.div.withConfig({displayName:"StyledBoolEdit"})(li||(li=b()(["\n margin: 5px 0;\n"])));const fi=function(e){return(0,Pe.jsx)(pi,{children:(0,Pe.jsx)("input",{type:"checkbox",checked:e.value||!1,name:e.name,onChange:function(t){e.onChange&&e.onChange(t.target.checked)},id:e.id,disabled:e.immutable})})};var di,hi;function mi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mi(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mi(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var yi=x.ZP.div.withConfig({displayName:"StyledOption"})(di||(di=b()(["\n margin: "," 0;\n"])),Ke.Z.space(-1.4)),vi=x.ZP.span.withConfig({displayName:"StyledLabel"})(hi||(hi=b()(["\n ","\n display: inline-block;\n margin-left: ",";\n"])),(0,ht.Z)(),Ke.Z.space(-1.5)),bi={single:"radio",multiple:"checkbox"},wi={single:{checked:!1},multiple:{}},Oi=function(e){var t=e.groupName,n=e.id,r=e.label,o=e.checked,a=e.immutable,i=e.selectionType,c=e.renderHtmlInOptions,s=e.handleChange;return(0,Pe.jsxs)(yi,{children:[(0,Pe.jsx)("input",{name:t,type:bi[i],checked:o||!1,onChange:s,id:n,disabled:a}),(0,Pe.jsx)(vi,{children:c?(0,Pe.jsx)("span",{dangerouslySetInnerHTML:{__html:ve.Z.sanitizeHtml(r)}}):r})]})};const xi=function(e){var t=function(t){if(e.onChange){var n=e.value.options.map((function(n){return gi(gi({},n),n.id===t.target.id?{checked:t.target.checked}:wi[e.options.selectionType])}));e.onChange({options:n})}};return(0,Pe.jsx)(Pe.Fragment,{children:e.value.options.map((function(n){return(0,Pe.jsx)(Oi,{groupName:e.id,id:n.id,label:n.label,checked:n.checked,immutable:e.immutable,selectionType:e.options.selectionType,renderHtmlInOptions:e.options.renderHtmlInOptions,handleChange:t},n.id)}))})};var ki=i(23279),_i=i.n(ki);function Si(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ei(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Si(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Si(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ai=(0,w.lazy)((function(){return Promise.all([i.e(560),i.e(85)]).then(i.bind(i,30919))}));const Pi=function(e){return(0,Pe.jsx)(w.Suspense,{fallback:(t=e.value,(0,Pe.jsx)("div",{children:(0,Pe.jsx)("p",{children:t})})),children:(0,Pe.jsx)(Ai,Ei({},e))});var t};var ji,Ci=x.ZP.div.withConfig({displayName:"StyledEditorWrapper"})(ji||(ji=b()(["\n margin-top: ",";\n"])),Ke.Z.space(-1.5));const Di=function(e){var t=e.value,n=e.onChange,r=e.immutable,o=e.options;return(0,Pe.jsx)(Ci,{children:(0,Pe.jsx)(Pi,{value:t,onChange:_i()(n,1e3),autoFocusOnMount:o.autoFocusOnMount,mode:o.mode,theme:"textmate",showGutter:!0,editorOptions:{enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!0,minLines:5,maxLines:50,readOnly:r,wrap:!0,indentedSoftWrap:!1},implicitModel:o.implicitModel})})};var Ti=i(86896),Ri=i(23842),Ii=i(93379),Mi=i.n(Ii),Ni=i(7795),Zi=i.n(Ni),Bi=i(90569),Li=i.n(Bi),Fi=i(3565),Ui=i.n(Fi),Hi=i(19216),Wi=i.n(Hi),zi=i(44589),Vi=i.n(zi),Yi=i(16721),qi={};qi.styleTagTransform=Vi(),qi.setAttributes=Ui(),qi.insert=Li().bind(null,"head"),qi.domAPI=Zi(),qi.insertStyleElement=Wi();Mi()(Yi.Z,qi);Yi.Z&&Yi.Z.locals&&Yi.Z.locals;var Gi,Ki,$i,Xi=i(9198),Qi=i.n(Xi),Ji=i(23855),ec=x.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(Gi||(Gi=b()(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),tc=x.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(Ki||(Ki=b()(["\n &&&& {\n ","\n\n & .react-datepicker__input-container {\n & input {\n ","\n width: calc(100% - 5px);\n }\n }\n\n & .react-datepicker {\n & .react-datepicker__today-button {\n ","\n }\n }\n }\n"])),mt,yt,(function(e){return e.hasTime&&"border-bottom: 1px solid #aeaeae;"})),nc=x.ZP.input.withConfig({displayName:"StyledTimeInput"})($i||($i=b()(["\n &&&& {\n ","\n }\n"])),yt),rc=i(37042),oc=i(4543),ac=i(39880),ic=i(85817),cc=i(39159),sc=i(77881),uc=i(14372),lc=i(12274),pc=i(13882);function fc(e,t,n){return(0,pc.Z)(2,arguments),(0,lc.default)((0,uc.default)(e,t,new Date,n))}var dc=i(69119),hc="react-datepicker-time__input",mc="react-datepicker__day",gc="react-datepicker__input",yc=function(e){return e.classList.contains(mc)},vc=function(e){return e.classList.contains(hc)},bc=function(e){return e.classList.contains(gc)},wc=function(e,t){var n=t.hour,r=void 0===n?0:n,o=t.minute,a=void 0===o?0:o,i=t.second,c=void 0===i?0:i;return(0,rc.default)((0,oc.default)((0,ac.default)(e,c),a),r)},Oc=function(e){setTimeout((function(){if(e){var t=e.querySelector(".".concat(mc,'[tabindex="0"]'));t&&t.focus({preventScroll:!0})}}),0)},xc=function(e){setTimeout((function(){e&&e.focus({preventScroll:!0})}),0)},kc=function(e){var t=(0,Ji.default)(e);return isNaN(t)?null:t},_c=function(e){return e?e.toISOString():null};const Sc=function(e,t,n){var r=n.dateFormats,o=void 0===r?[]:r,a=n.minDate,i=n.maxDate,c=n.hasTime,s=n.valueToDate,u=void 0===s?kc:s,l=n.dateToValue,p=void 0===l?_c:l,f=(0,w.useRef)(null),d=(0,w.useState)(!1),h=U()(d,2),m=h[0],g=h[1],y=(0,w.useState)(!1),v=U()(y,2),b=v[0],O=v[1],x=u(e),k=a?u(a):void 0,_=i?u(i):void 0;(0,w.useEffect)((function(){(f.current&&"function"==typeof f.current.setOpen&&f.current.setOpen(m),m)&&document.querySelectorAll("button.react-datepicker__navigation").forEach((function(e){return e.setAttribute("tabindex","-1")}))}),[m]);var S=function(){return g(!1)},E=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(f.current&&"function"==typeof f.current.getPreSelection){var t,n=e?f.current.getPreSelection():null;return(null===(t=f.current.state)||void 0===t?void 0:t.preSelection)||n}return null},A=function(e){f.current&&"function"==typeof f.current.setPreSelection&&f.current.setPreSelection(e)},P=function(){t(null),A(null)},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=E(!1);if(n){var r=x||new Date,o=t?wc(n,{hour:(0,ic.default)(r),minute:(0,cc.default)(r),second:(0,sc.default)(r)}):n;C(o,e)}},C=function(n,r){if(n){var a,i=!e&&Boolean(n),s=null==r||null===(a=r.target)||void 0===a?void 0:a.value,u=!!s&&o.some((function(e){return fc(s,e)})),l=(0,dc.default)(n),d=(0,ic.default)(n)!==(0,ic.default)(l)||(0,cc.default)(n)!==(0,cc.default)(l);(i&&!d||u)&&c&&(n=Ri.Z.setCurrentTime(n)),t(p(n))}else P();var h;c||"click"!==(null==r?void 0:r.type)||(S(),xc(null===(h=f.current)||void 0===h?void 0:h.input))},D=function(e){if("Tab"===e.key)if(e.shiftKey)if(bc(e.target))setTimeout((function(){return S()}),0);else if(vc(e.target)){var t,n;A(x||E(!0)),Oc(null===(t=f.current)||void 0===t||null===(n=t.calendar)||void 0===n?void 0:n.componentNode)}else yc(e.target)&&S();else bc(e.target)&&m?(j(e),setTimeout((function(){return S()}),0)):vc(e.target)?S():yc(e.target)&&(c?(j(e,!0),A(null),O(!0),setTimeout((function(){var e,t,n;n=null===(e=f.current)||void 0===e||null===(t=e.calendar)||void 0===t?void 0:t.componentNode,setTimeout((function(){if(n){var e=n.querySelector("input.".concat(hc));e&&e.focus({preventScroll:!0})}}),0),O(!1)}),0)):(j(e),S()));var r;"Enter"===e.key&&(S(),e.preventDefault(),e.stopPropagation(),xc(null===(r=f.current)||void 0===r?void 0:r.input));if(["ArrowDown","ArrowUp","Enter"].includes(e.key))if(m){if(m&&null===E(!1)){var o,a;A(x||E(!0)),Oc(null===(o=f.current)||void 0===o||null===(a=o.calendar)||void 0===a?void 0:a.componentNode)}}else g(!0),e.key="Handled".concat(e.key)},T=function(){var e;g((function(e){return!e})),A(null),xc(null===(e=f.current)||void 0===e?void 0:e.input)};return{reactDatePickerProps:{closeOnScroll:function(){return S(),!0},onClickOutside:S,onInputClick:T,onKeyDown:D,onChange:C,onCalendarOpen:function(){A(null)},onBlur:function(){f.current&&f.current.setState({inputValue:null})},preventOpenOnFocus:!0,enableTabLoop:!1,shouldCloseOnSelect:!1,open:m,selected:x,showTimeInput:c,minDate:k,maxDate:_,ref:f,className:gc},timeInputProps:{onKeyDown:D,className:hc,tabIndex:b?void 0:"-1"},clearButtonProps:{onMouseDown:function(e){e.preventDefault(),P()}},calendarButtonProps:{onClick:T,className:m?"react-datepicker-ignore-onclickoutside":""}}};var Ec=i(49546),Ac="HH:mm:ss",Pc="HH:mm",jc=function(e){return fc(e,Pc)},Cc=function(e){var t=function(e){return fc(e,Ac)?(0,uc.default)(e,Ac,new Date):fc(e,Pc)?(0,uc.default)(e,Pc,new Date):fc(e,"HH:")?(0,uc.default)(e,"HH:",new Date):fc(e,"H")?(0,uc.default)(e,"H",new Date):null}(e);return t&&!isNaN(t)?function(e){return(0,Ec.default)(e,Pc)}(t):""};const Dc=function(e,t){var n=Cc(e),r=(0,w.useState)(n),o=U()(r,2),a=o[0],i=o[1],c=(0,w.useRef)(a),s=He.Z.usePrevious(n);(0,w.useEffect)((function(){s!==n&&a===s&&i(n)}),[n,a,s]);var u={onChange:function(e){if(e.target.value!==a&&function(e){return/^(\d{0,2}|\d{1,2}:\d{0,2})$/.test(e)}(e.target.value)){var n=function(e,t){return e&&t?2!==e.length||3===t.length||e.includes(":")?e.length+1===t.length&&t.indexOf(":")===t.length-1?e.slice(0,-1):e:"".concat(e,":"):e}(e.target.value,c.current),r=n.indexOf(":"),o=n.substring(0,r),s=n.substring(r+1),u=parseInt(o,10),l=parseInt(s,10),p=!o||!Number.isNaN(u)&&u<24,f=!s||!Number.isNaN(l)&&l<60;if(!p||!f)return!1;c.current=n,i(n),n&&!jc(n)||t(n)}},onBlur:function(){if(a!==n){var e=Cc(a);e&&jc(e)?(c.current=e,i(e),t(e)):i(n)}},onFocus:function(e){a&&"function"==typeof e.target.select&&e.target.select()},value:a||""};return{inputProps:u,clearButtonProps:{onClick:function(){t(""),i("")}}}};var Tc=["value","onChange","onKeyDown"];function Rc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rc(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}(0,Xi.registerLocale)("en",Ri.Z.getDateFnsLocale("en")),(0,Xi.registerLocale)("en-US",Ri.Z.getDateFnsLocale("en")),(0,Xi.registerLocale)("de-CH",Ri.Z.getDateFnsLocale("de-CH")),(0,Xi.registerLocale)("de",Ri.Z.getDateFnsLocale("de")),(0,Xi.registerLocale)("fr",Ri.Z.getDateFnsLocale("fr")),(0,Xi.registerLocale)("fr-CH",Ri.Z.getDateFnsLocale("fr")),(0,Xi.registerLocale)("it",Ri.Z.getDateFnsLocale("it")),(0,Xi.registerLocale)("it-CH",Ri.Z.getDateFnsLocale("it")),(0,Xi.setDefaultLocale)("de");var Mc=function(e){var t=e.onChange,n=e.label;return(0,Pe.jsx)(Ge.Z,{onMouseDown:function(e){e.preventDefault(),t(null)},tabIndex:-1,children:n})},Nc=function(e){var t=e.value,n=e.onChange,r=e.onKeyDown,o=qe()(e,Tc),a=Dc(t,(function(e){n&&n(e||"00:00")})).inputProps;return(0,Pe.jsx)(nc,Ic(Ic(Ic({},a),o),{},{type:"text",onKeyDown:r,onClick:function(e){e.target.focus()}}))},Zc={strategy:"fixed"};const Bc=(0,x.Zz)((0,p.ZP)((function(e){var t=e.immutable,n=e.id,r=e.value,o=e.minDate,a=e.maxDate,i=e.valueToDate,c=e.dateToValue,s=e.onChange,u=e.intl,l=e.placeholder,p=e.hasTime,f=e.dateFormats,d=void 0===f?[]:f,h=e.dateTimeFormats,m=void 0===h?[]:h,g=e.events,y=(0,w.useRef)(void 0),v=u.locale,b=function(e){return u.formatMessage({id:e})},O=(0,w.useRef)(null),x=Boolean(r),k=!t&&x,_=function(e){y.current=e,s(e)},S=Sc(r,_,{dateFormats:d,dateTimeFormats:m,minDate:o,maxDate:a,valueToDate:i,dateToValue:c,hasTime:p}),E=S.reactDatePickerProps,A=S.timeInputProps,P=S.clearButtonProps,j=S.calendarButtonProps;return(0,Pe.jsx)(ec,{immutable:t,id:n,tabIndex:"-1",children:(0,Pe.jsxs)(tc,{immutable:t,ref:O,hasTime:p,onBlur:function(e){if("function"==typeof(null==g?void 0:g.onBlur)){var t=void 0!==y.current?y.current:r;g.onBlur(t)}e.stopPropagation()},children:[(0,Pe.jsx)(Qi(),Ic(Ic({},E),{},{disabled:t,dateFormat:[].concat(Oe()(m),Oe()(d)),placeholderText:l,showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!1,fixedHeight:!0,showPopperArrow:!1,locale:v,customTimeInput:(0,Pe.jsx)(Nc,Ic({},A)),timeInputLabel:"",popperProps:Zc,todayButton:(0,Pe.jsx)(Mc,{onChange:_,label:b("client.component.datePicker.todayLabel")})})),k&&(0,Pe.jsx)(fa.Z,Ic({icon:"times",tabIndex:-1,"aria-label":b("client.component.datePicker.clearDateLabel")},P)),!t&&(0,Pe.jsx)(fa.Z,Ic({icon:"calendar",tabIndex:-1},j))]})})})));function Lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Fc=function(e){var t=e.onChange,r=e.options,o=e.id,a=e.value,i=e.immutable,c=e.events,s=e.placeholder,u=(0,Ti.Z)(),l=(null==r?void 0:r.datePickerOptions)||{},p="".concat(Ri.Z.getLocalizedDateFormat(u.locale)),f=Ri.Z.getLocalizedDateFormatWithoutPunctuation(u.locale),d=[p,f,Ri.Z.useTwoDigitYear(p),Ri.Z.useTwoDigitYear(f)];return(0,Pe.jsx)(Bc,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lc(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:o,value:a,onChange:t,dateFormats:d,hasTime:!1,immutable:i,placeholder:s,events:c},l))};function Uc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Hc=(0,p.ZP)((function(e){var t=e.onChange,r=e.options,o=e.value,a=e.immutable,i=e.placeholder,c=(0,Ti.Z)(),s=(null==r?void 0:r.datePickerOptions)||{},u="".concat(Ri.Z.getLocalizedDateTimeFormat(c.locale)),l="".concat(Ri.Z.getLocalizedDateFormat(c.locale)),p=Ri.Z.getLocalizedDateTimeFormatWithoutPunctuation(c.locale),f=[u,p,Ri.Z.useTwoDigitYear(u),Ri.Z.useTwoDigitYear(p)],d=Ri.Z.getLocalizedDateFormatWithoutPunctuation(c.locale),h=[l,d,Ri.Z.useTwoDigitYear(l),Ri.Z.useTwoDigitYear(d)];return(0,Pe.jsx)(Bc,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uc(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uc(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({value:o,onChange:t,dateTimeFormats:f,dateFormats:h,hasTime:!0,immutable:a,placeholder:i},s))}));var Wc=i(18446),zc=i.n(Wc);function Vc(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(e){a(e)}}function c(e){try{s(r.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}s((r=r.apply(e,t||[])).next())}))}function Yc(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(s){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,s])}}}Object.create;function qc(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function Gc(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;var Kc=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function $c(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=Kc.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var Xc=[".DS_Store","Thumbs.db"];function Qc(e){return"object"==typeof e&&null!==e}function Jc(e){return rs(e.target.files).map((function(e){return $c(e)}))}function es(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return $c(e)}))]}}))}))}function ts(e,t){return Vc(this,void 0,void 0,(function(){var n;return Yc(this,(function(r){switch(r.label){case 0:return e.items?(n=rs(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(os))]):[3,2];case 1:return[2,ns(as(r.sent()))];case 2:return[2,ns(rs(e.files).map((function(e){return $c(e)})))]}}))}))}function ns(e){return e.filter((function(e){return-1===Xc.indexOf(e.name)}))}function rs(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function os(e){if("function"!=typeof e.webkitGetAsEntry)return is(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?ss(t):is(e)}function as(e){return e.reduce((function(e,t){return Gc(Gc([],qc(e),!1),qc(Array.isArray(t)?as(t):[t]),!1)}),[])}function is(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=$c(t);return Promise.resolve(n)}function cs(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){return[2,e.isDirectory?ss(e):us(e)]}))}))}function ss(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var a=this;t.readEntries((function(t){return Vc(a,void 0,void 0,(function(){var a,i,c;return Yc(this,(function(s){switch(s.label){case 0:if(t.length)return[3,5];s.label=1;case 1:return s.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=s.sent(),e(a),[3,4];case 3:return i=s.sent(),n(i),[3,4];case 4:return[3,6];case 5:c=Promise.all(t.map(cs)),r.push(c),o(),s.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function us(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=$c(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var ls=i(58363);function ps(e){return function(e){if(Array.isArray(e))return ys(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gs(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 fs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ds(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fs(Object(n),!0).forEach((function(t){hs(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ms(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||gs(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.")}()}function gs(e,t){if(e){if("string"==typeof e)return ys(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)?ys(e,t):void 0}}function ys(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vs="file-invalid-type",bs="file-too-large",ws="file-too-small",Os="too-many-files",xs=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:vs,message:"File type must be ".concat(t)}},ks=function(e){return{code:bs,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},_s=function(e){return{code:ws,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},Ss={code:Os,message:"Too many files"};function Es(e,t){var n="application/x-moz-file"===e.type||(0,ls.Z)(e,t);return[n,n?null:xs(t)]}function As(e,t,n){if(Ps(e.size))if(Ps(t)&&Ps(n)){if(e.size>n)return[!1,ks(n)];if(e.size<t)return[!1,_s(t)]}else{if(Ps(t)&&e.size<t)return[!1,_s(t)];if(Ps(n)&&e.size>n)return[!1,ks(n)]}return[!0,null]}function Ps(e){return null!=e}function js(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,a=e.multiple,i=e.maxFiles,c=e.validator;return!(!a&&t.length>1||a&&i>=1&&t.length>i)&&t.every((function(e){var t=ms(Es(e,n),1)[0],a=ms(As(e,r,o),1)[0],i=c?c(e):null;return t&&a&&!i}))}function Cs(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Ds(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function Ts(e){e.preventDefault()}function Rs(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function Is(e){return-1!==e.indexOf("Edge/")}function Ms(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return Rs(e)||Is(e)}function Ns(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return!Cs(e)&&t&&t.apply(void 0,[e].concat(r)),Cs(e)}))}}function Zs(){return"showOpenFilePicker"in window}function Bs(e){if(Ps(e)){var t=Object.entries(e).filter((function(e){var t=ms(e,2),n=t[0],r=t[1],o=!0;return Hs(n)||(console.warn('Skipped "'.concat(n,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),o=!1),Array.isArray(r)&&r.every(Ws)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=ms(t,2),r=n[0],o=n[1];return ds(ds({},e),{},hs({},r,o))}),{});return[{description:"Files",accept:t}]}return e}function Ls(e){if(Ps(e))return Object.entries(e).reduce((function(e,t){var n=ms(t,2),r=n[0],o=n[1];return[].concat(ps(e),[r],ps(o))}),[]).filter((function(e){return Hs(e)||Ws(e)})).join(",")}function Fs(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function Us(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function Hs(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function Ws(e){return/^.*\.[\w]+$/.test(e)}var zs=["children"],Vs=["open"],Ys=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],qs=["refKey","onChange","onClick"];function Gs(e){return function(e){if(Array.isArray(e))return Xs(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$s(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 Ks(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw o}}return a}(e,t)||$s(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.")}()}function $s(e,t){if(e){if("string"==typeof e)return Xs(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)?Xs(e,t):void 0}}function Xs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qs(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Js(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qs(Object(n),!0).forEach((function(t){eu(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tu(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nu=(0,w.forwardRef)((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Js(Js({},ru),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,i=t.minSize,c=t.multiple,s=t.maxFiles,u=t.onDragEnter,l=t.onDragLeave,p=t.onDragOver,f=t.onDrop,d=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,v=t.autoFocus,b=t.preventDropOnDocument,O=t.noClick,x=t.noKeyboard,k=t.noDrag,_=t.noDragEventsBubbling,S=t.onError,E=t.validator,A=(0,w.useMemo)((function(){return Ls(n)}),[n]),P=(0,w.useMemo)((function(){return Bs(n)}),[n]),j=(0,w.useMemo)((function(){return"function"==typeof g?g:cu}),[g]),C=(0,w.useMemo)((function(){return"function"==typeof m?m:cu}),[m]),D=(0,w.useRef)(null),T=(0,w.useRef)(null),R=Ks((0,w.useReducer)(iu,au),2),I=R[0],M=R[1],N=I.isFocused,Z=I.isFileDialogActive,B=(0,w.useRef)("undefined"!=typeof window&&window.isSecureContext&&y&&Zs()),L=function(){!B.current&&Z&&setTimeout((function(){T.current&&(T.current.files.length||(M({type:"closeDialog"}),C()))}),300)};(0,w.useEffect)((function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}}),[T,Z,C,B]);var F=(0,w.useRef)([]),U=function(e){D.current&&D.current.contains(e.target)||(e.preventDefault(),F.current=[])};(0,w.useEffect)((function(){return b&&(document.addEventListener("dragover",Ts,!1),document.addEventListener("drop",U,!1)),function(){b&&(document.removeEventListener("dragover",Ts),document.removeEventListener("drop",U))}}),[D,b]),(0,w.useEffect)((function(){return!r&&v&&D.current&&D.current.focus(),function(){}}),[D,v,r]);var H=(0,w.useCallback)((function(e){S?S(e):console.error(e)}),[S]),W=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),F.current=[].concat(Gs(F.current),[e.target]),Ds(e)&&Promise.resolve(o(e)).then((function(t){if(!Cs(e)||_){var n=t.length,r=n>0&&js({files:t,accept:A,minSize:i,maxSize:a,multiple:c,maxFiles:s,validator:E});M({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e)}})).catch((function(e){return H(e)}))}),[o,u,H,_,A,i,a,c,s,E]),z=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=Ds(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&p&&p(e),!1}),[p,_]),V=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=F.current.filter((function(e){return D.current&&D.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),F.current=t,t.length>0||(M({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Ds(e)&&l&&l(e))}),[D,l,_]),Y=(0,w.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=Ks(Es(e,A),2),o=t[0],c=t[1],s=Ks(As(e,i,a),2),u=s[0],l=s[1],p=E?E(e):null;if(o&&u&&!p)n.push(e);else{var f=[c,l];p&&(f=f.concat(p)),r.push({file:e,errors:f.filter((function(e){return e}))})}})),(!c&&n.length>1||c&&s>=1&&n.length>s)&&(n.forEach((function(e){r.push({file:e,errors:[Ss]})})),n.splice(0)),M({acceptedFiles:n,fileRejections:r,type:"setFiles"}),f&&f(n,r,t),r.length>0&&h&&h(r,t),n.length>0&&d&&d(n,t)}),[M,c,A,i,a,s,f,d,h,E]),q=(0,w.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),F.current=[],Ds(e)&&Promise.resolve(o(e)).then((function(t){Cs(e)&&!_||Y(t,e)})).catch((function(e){return H(e)})),M({type:"reset"})}),[o,Y,H,_]),G=(0,w.useCallback)((function(){if(B.current){M({type:"openDialog"}),j();var e={multiple:c,types:P};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){Y(e,null),M({type:"closeDialog"})})).catch((function(e){Fs(e)?(C(e),M({type:"closeDialog"})):Us(e)?(B.current=!1,T.current?(T.current.value=null,T.current.click()):H(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):H(e)}))}else T.current&&(M({type:"openDialog"}),j(),T.current.value=null,T.current.click())}),[M,j,C,y,Y,H,P,c]),K=(0,w.useCallback)((function(e){D.current&&D.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),G()))}),[D,G]),$=(0,w.useCallback)((function(){M({type:"focus"})}),[]),X=(0,w.useCallback)((function(){M({type:"blur"})}),[]),Q=(0,w.useCallback)((function(){O||(Ms()?setTimeout(G,0):G())}),[O,G]),J=function(e){return r?null:e},ee=function(e){return x?null:J(e)},te=function(e){return k?null:J(e)},ne=function(e){_&&e.stopPropagation()},re=(0,w.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,o=e.role,a=e.onKeyDown,i=e.onFocus,c=e.onBlur,s=e.onClick,u=e.onDragEnter,l=e.onDragOver,p=e.onDragLeave,f=e.onDrop,d=tu(e,Ys);return Js(Js(eu({onKeyDown:ee(Ns(a,K)),onFocus:ee(Ns(i,$)),onBlur:ee(Ns(c,X)),onClick:J(Ns(s,Q)),onDragEnter:te(Ns(u,W)),onDragOver:te(Ns(l,z)),onDragLeave:te(Ns(p,V)),onDrop:te(Ns(f,q)),role:"string"==typeof o&&""!==o?o:"presentation"},n,D),r||x?{}:{tabIndex:0}),d)}}),[D,K,$,X,Q,W,z,V,q,x,k,r]),oe=(0,w.useCallback)((function(e){e.stopPropagation()}),[]),ae=(0,w.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.onChange,o=e.onClick,a=tu(e,qs);return Js(Js({},eu({accept:A,multiple:c,type:"file",style:{display:"none"},onChange:J(Ns(r,q)),onClick:J(Ns(o,oe)),tabIndex:-1},n,T)),a)}}),[T,n,c,q,r]);return Js(Js({},I),{},{isFocused:N&&!r,getRootProps:re,getInputProps:ae,rootRef:D,inputRef:T,open:J(G)})}(tu(e,zs)),o=r.open,a=tu(r,Vs);return(0,w.useImperativeHandle)(t,(function(){return{open:o}}),[o]),O().createElement(w.Fragment,null,n(Js(Js({},a),{},{open:o})))}));nu.displayName="Dropzone";var ru={disabled:!1,getFilesFromEvent:function(e){return Vc(this,void 0,void 0,(function(){return Yc(this,(function(t){return Qc(e)&&Qc(e.dataTransfer)?[2,ts(e.dataTransfer,e.type)]:function(e){return Qc(e)&&Qc(e.target)}(e)?[2,Jc(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,es(e)]:[2,[]]}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};nu.defaultProps=ru,nu.propTypes={children:o().func,accept:o().objectOf(o().arrayOf(o().string)),multiple:o().bool,preventDropOnDocument:o().bool,noClick:o().bool,noKeyboard:o().bool,noDrag:o().bool,noDragEventsBubbling:o().bool,minSize:o().number,maxSize:o().number,maxFiles:o().number,disabled:o().bool,getFilesFromEvent:o().func,onFileDialogCancel:o().func,onFileDialogOpen:o().func,useFsAccessApi:o().bool,autoFocus:o().bool,onDragEnter:o().func,onDragLeave:o().func,onDragOver:o().func,onDrop:o().func,onDropAccepted:o().func,onDropRejected:o().func,onError:o().func,validator:o().func};const ou=nu;var au={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function iu(e,t){switch(t.type){case"focus":return Js(Js({},e),{},{isFocused:!0});case"blur":return Js(Js({},e),{},{isFocused:!1});case"openDialog":return Js(Js({},au),{},{isFileDialogActive:!0});case"closeDialog":return Js(Js({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Js(Js({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Js(Js({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Js({},au);default:return e}}function cu(){}var su,uu,lu,pu,fu,du,hu,mu,gu,yu=i(69829),vu=i(40953),bu=x.ZP.section.withConfig({displayName:"StyledSection"})(su||(su=b()(["\n flex: 1;\n display: flex;\n justify-content: flex-end;\n"]))),wu=x.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(uu||(uu=b()(["\n display: flex;\n align-items: center;\n\n "," {\n margin: 0;\n border-radius: 50%;\n padding: ",";\n\n a:hover {\n color: unset;\n }\n }\n"])),Ot.Z,Ke.Z.space(-2)),Ou=x.ZP.div.withConfig({displayName:"StyledDropzone"})(lu||(lu=b()(["\n width: 100%;\n\n &:hover {\n "," {\n background-color: ",";\n }\n }\n"])),Ot.Z,ke.FS.color("backgroundItemHover")),xu=x.ZP.div.withConfig({displayName:"StyledUploadInput"})(pu||(pu=b()(["\n ","\n cursor: ",";\n background-color: ",";\n color: ",";\n padding: "," 0 0 0;\n display: flex;\n\n "," {\n float: right;\n position: relative;\n top: -",";\n margin: 0;\n border-radius: 50%;\n padding: ",";\n }\n"])),(0,ht.Z)(),(function(e){return e.immutable?"not-allowed":"pointer"}),ke.FS.color("paper"),(function(e){return e.immutable?vu.v.shade2(e):vu.v.base(e)}),Ke.Z.space(-2),Ot.Z,Ke.Z.space(-3.1),Ke.Z.space(-1.5)),ku=x.ZP.div.withConfig({displayName:"StyledUploadProgress"})(fu||(fu=b()(["\n && {\n padding-top: ",";\n text-align: center;\n display: inline-block;\n }\n"])),Ke.Z.space(-2)),_u=(0,x.ZP)(yu.Fe).withConfig({displayName:"StyledUploadProgressText"})(du||(du=b()(["\n && {\n ","\n }\n"])),(0,ht.Z)({fontSize:Ke.Z.font(-1)})),Su=x.ZP.div.withConfig({displayName:"StyledUploadProgressIconAndText"})(hu||(hu=b()(["\n && {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n margin-left: ",";\n }\n }\n"])),Ke.Z.space(-2)),Eu=x.ZP.div.withConfig({displayName:"StyledView"})(mu||(mu=b()(["\n display: flex;\n justify-content: space-between;\n padding-top: ",";\n"])),Ke.Z.space(-2));function Au(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Au(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Au(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ju=function(e){var t=e.onDrop,n=e.immutable,r=e.text,o=e.onChoose;return(0,Pe.jsxs)(xu,{immutable:n,children:[(0,Pe.jsx)(ou,{onDrop:function(e){var n=e.map((function(e){return Object.assign(e,{preview:URL.createObjectURL(e)})}));t(n[0])},multiple:!1,disabled:n,title:r||"drag and drop or click",children:function(e){var t=e.getRootProps,n=e.getInputProps;return(0,Pe.jsx)(bu,{children:(0,Pe.jsxs)(Ou,Pu(Pu({},t()),{},{children:[(0,Pe.jsx)("input",Pu({},n())),gu||(gu=(0,Pe.jsx)(Ge.Z,{icon:"arrow-to-top"}))]}))})}}),o&&(0,Pe.jsx)(Ge.Z,{onClick:function(e){o(),e.stopPropagation()},icon:"folder",label:"browse docs",iconOnly:!0})]})};var Cu=i(73906),Du=function(e){var t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(1*(e/Math.pow(1024,t)).toFixed(2)," ").concat(["Bytes","KB","MB","GB","TB"][t])};const Tu=function(e){var t=e.file,n=e.text;return(0,Pe.jsxs)(ku,{children:[(0,Pe.jsx)(Cu.Z,{alt:t.name,caption:t.name,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:t.preview,thumbnailUrl:t.type.startsWith("image")?t.preview:null}),(0,Pe.jsxs)(Su,{children:[(0,Pe.jsx)(Da.Z,{position:be.Z.position.PREPEND}),(0,Pe.jsxs)(_u,{children:[n||"uploading"," (",Du(t.size),")"]})]})]})};var Ru=i(28247),Iu=i(41291);function Mu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mu(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Zu=function(e){var t,n=e.value,r=e.downloadTitle,o=e.immutable,a=e.onUpload,i=e.deleteTitle,c=null===(t=n.binaryLink)||void 0===t?void 0:t.startsWith("blob:");return(0,Pe.jsxs)(Eu,{className:"StyledView",children:[(0,Pe.jsx)(Cu.Z,Nu(Nu({alt:n.fileName},c&&{caption:n.fileName}),{},{fileName:n.fileName,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:n.binaryLink,thumbnailUrl:n.thumbnailLink})),(0,Pe.jsxs)(wu,{children:[!o&&(0,Pe.jsx)(Ge.Z,{icon:"trash",onClick:function(){return a(null)},tabIndex:-1,title:i||"delete"}),(0,Pe.jsx)(Ge.Z,{children:(0,Pe.jsx)(Iu.Z,{neutral:!0,icon:"arrow-to-bottom",target:"_blank",href:Ru.Z.getDownloadUrl(n.binaryLink),tabIndex:-1,title:r||"download"})})]})]})};function Bu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bu(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fu=function(e){var t=e.value,n=e.textResources,r=e.onUpload,o=e.onChoose,a=(0,w.useRef)(t),i=(0,w.useState)({isUploading:!1,previewFile:null}),c=U()(i,2),s=c[0],u=c[1];return(0,w.useEffect)((function(){zc()(a.current,t)||u({isUploading:!1,previewFile:null}),a.current=t}),[t]),null!=t&&t.binaryLink?(0,Pe.jsx)(Zu,Lu(Lu({},e),{},{deleteTitle:n.delete,downloadTitle:n.download})):s.isUploading?(0,Pe.jsx)(Tu,Lu({file:s.previewFile,text:n.uploading},e)):(0,Pe.jsx)(ju,Lu(Lu({},e),{},{onDrop:function(e){!function(e){u({isUploading:!0,previewFile:e})}(e),r(e)},onChoose:o}))};Fu.defaultProps={textResources:{}};const Uu=Fu;var Hu=function(e){return(0,Pe.jsx)(Uu,{onUpload:function(t){null===t?e.onChange&&e.onChange(null):e.options.upload&&e.options.upload(t)},onChoose:e.options.choose,immutable:e.immutable,textResources:{upload:e.options.uploadText,uploading:e.options.uploadingText,delete:e.options.deleteText,download:e.options.downloadText},value:e.value?e.value:null})};Hu.defaultProps={options:{}};const Wu=Hu;var zu,Vu,Yu=function(e){return-1*Math.abs(e)},qu=x.ZP.input.withConfig({displayName:"StyledDurationEdit"})(zu||(zu=b()(["\n &&&& {\n ","\n flex-grow: 0;\n width: ","px;\n min-width: 2.5ch;\n }\n"])),yt,(function(e){return e.width})),Gu=x.ZP.label.withConfig({displayName:"StyledDurationEditFocusable"})(Vu||(Vu=b()(["\n &&& {\n align-items: center;\n display: flex;\n flex-wrap: nowrap;\n margin-bottom: 0; /* reset bootstrap */\n margin-left: ",";\n\n &:first-child {\n margin-left: 0;\n }\n\n > span {\n color: ",";\n cursor: ",";\n }\n }\n"])),Ke.Z.space(1),(function(e){return e.immutable?ke.FS.color("textDisabled"):ke.FS.color("text")}),(function(e){return e.immutable?"not-allowed":"default"})),Ku=function(e){var t=e.value,n=e.immutable,r=e.onChange,o=e.options,a=Ri.Z.millisecondsToDuration(t),i=(0,w.useState)(!1),c=U()(i,2),s=c[0],u=c[1],l=function(e,t){var n,o,i=null!==t?t:a.minutes,c=null!==e?e:a.hours;""!==i||""!==c?(i>=60&&(c=0),r((o=i,(n=c)||o?((n<0||o<0)&&(n=Yu(n),o=Yu(o)),60*(n||0)*6e4+6e4*(o||0)):null))):r(null)},p=function(){u(!0)},f=function(e){e.charCode>=48&&e.charCode<=57||45===e.charCode&&!0===o.allowNegative||e.preventDefault()},d=function(){return!0===o.allowNegative?"-?d+":"d+"},h=function(){return s||"number"==typeof t},m=function(e){return 9*(e+"").length},g=n&&Boolean(a.seconds);return(0,Pe.jsxs)(gt,{onBlur:function(){u(!1)},immutable:n,children:[(0,Pe.jsxs)(Gu,{immutable:n,children:[(0,Pe.jsx)(qu,{disabled:n,immutable:n,min:!0===o.allowNegative?void 0:0,onChange:function(){},onFocus:p,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(t,null)},onKeyPress:f,pattern:d(),step:1,width:m(a.hours),type:"number",value:"number"!=typeof a.hours||0===a.hours&&!n?"":a.hours+""}),h()&&(0,Pe.jsx)(rt.ZP.Span,{children:o.hoursLabel})]}),(0,Pe.jsxs)(Gu,{immutable:n,children:[(0,Pe.jsx)(qu,{disabled:n,immutable:n,min:!0!==o.allowNegative||null!==a.hours&&0!==a.hours?0:void 0,onChange:function(){},onFocus:p,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(null,t)},onKeyPress:f,pattern:d(),step:1,width:m(a.minutes),type:"number",value:a.minutes+""}),h()&&(0,Pe.jsx)(rt.ZP.Span,{children:o.minutesLabel})]}),g&&(0,Pe.jsxs)(Gu,{immutable:n,children:[(0,Pe.jsx)(qu,{disabled:n,immutable:n,onChange:function(){},width:m(a.seconds),type:"number",value:a.seconds+""}),h()&&(0,Pe.jsx)(rt.ZP.Span,{children:o.secondsLabel})]})]})};Ku.defaultProps={options:{hoursLabel:"hrs",minutesLabel:"min",secondsLabel:"s"}};const $u=Ku;var Xu;const Qu=x.ZP.input.attrs((function(e){return{type:"text"}})).withConfig({displayName:"StyledStringEdit"})(Xu||(Xu=b()(["\n &&&& {\n ","\n }\n"])),yt);const Ju=He.Z.Debouncer((function(e){return(0,Pe.jsxs)(gt,{immutable:e.immutable,children:[(0,Pe.jsx)(Qu,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""}),e.value&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(Iu.Z,{href:"mailto:".concat(e.value.toString()),icon:"envelope",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));var el=i(50008),tl=i.n(el),nl=i(2205),rl=i.n(nl),ol=i(99489),al=i.n(ol),il=i(78718),cl=i.n(il);function sl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ul(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?sl(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ll(){ll=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var a=new RegExp(e,r);return t.set(a,o||t.get(e)),al()(a,n.prototype)}function r(e,n){var r=t.get(n);return Object.keys(r).reduce((function(t,n){var o=r[n];if("number"==typeof o)t[n]=e[o];else{for(var a=0;void 0===e[o[a]]&&a+1<o.length;)a++;t[n]=e[o[a]]}return t}),Object.create(null))}return rl()(n,RegExp),n.prototype.exec=function(t){var n=e.exec.call(this,t);if(n){n.groups=r(n,this);var o=n.indices;o&&(o.groups=r(o,this))}return n},n.prototype[Symbol.replace]=function(n,o){if("string"==typeof o){var a=t.get(this);return e[Symbol.replace].call(this,n,o.replace(/\$<([^>]+)>/g,(function(e,t){var n=a[t];return"$"+(Array.isArray(n)?n.join("$"):n)})))}if("function"==typeof o){var i=this;return e[Symbol.replace].call(this,n,(function(){var e=arguments;return"object"!=tl()(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,i)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},ll.apply(this,arguments)}var pl,fl=["key","display","postcode","city","country","latitude","longitude"],dl=function(e){return e*Math.PI/180},hl=function(e){var t=e.state,n=e.country,r=e.postcode,o=e.city,a=e.latitude,i=e.longitude,c=t?"- ".concat(t):"",s=n?"/ ".concat(n.display):"";return{key:r,display:"".concat(r," ").concat(o," ").concat(c," ").concat(s),postcode:r,city:o,country:n,latitude:dl(a),longitude:dl(i)}};function ml(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function gl(){}function yl(e){return!!(e||"").match(/\d/)}function vl(e){return null==e}function bl(e){return"number"==typeof e&&isNaN(e)}function wl(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Ol(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNegation:n,addNegation:r}}function xl(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function kl(e,t){return Array(t+1).join(e)}function _l(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),o=r[0],a=r[1];if(!(a=Number(a)))return n+o;var i=1+a,c=(o=o.replace(".","")).length;return i<0?o="0."+kl("0",Math.abs(i))+o:i>=c?o+=kl("0",i-c):o=(o.substring(0,i)||"0")+"."+o.substring(i),n+o}function Sl(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,o=Ol(e),a=o.beforeDecimal,i=o.afterDecimal,c=o.hasNegation,s=parseFloat("0."+(i||"0")),u=(i.length<=t?"0."+i:s.toFixed(t)).split(".");return""+(c?"-":"")+a.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0])+(r?".":"")+xl(u[1]||"",t,n)}function El(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function Al(e){return Math.max(e.selectionStart,e.selectionEnd)}function Pl(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function jl(e,t,n,r){var o,a,i,c=e.length;if(o=t,a=0,i=c,t=Math.min(Math.max(o,a),i),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=c&&!n[t];)t++;t>c&&(t=n.lastIndexOf(!0))}return-1===t&&(t=c),t}function Cl(e){for(var t=Array.from({length:e.length+1}).map((function(){return!0})),n=0,r=t.length;n<r;n++)t[n]=Boolean(yl(e[n])||yl(e[n-1]));return t}function Dl(e,t,n,r,o,a){void 0===a&&(a=gl);var i=(0,w.useRef)(),c=function(e){var t=(0,w.useRef)(e);t.current=e;var n=(0,w.useRef)((function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}));return n.current}((function(e){var t,a;return vl(e)||bl(e)?(a="",t=""):"number"==typeof e||n?(a="number"==typeof e?_l(e):e,t=r(a)):(a=o(e,void 0),t=e),{formattedValue:t,numAsString:a}})),s=(0,w.useState)((function(){return c(t)})),u=s[0],l=s[1];return(0,w.useMemo)((function(){vl(e)?i.current=void 0:(i.current=c(e),l(i.current))}),[e,c]),[u,function(e,t){l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}]}function Tl(e){return e.replace(/[^0-9]/g,"")}function Rl(e){return e}function Il(e){var t=e.type;void 0===t&&(t="text");var n=e.displayType;void 0===n&&(n="input");var r=e.customInput,o=e.renderText,a=e.getInputRef,i=e.format;void 0===i&&(i=Rl);var c=e.removeFormatting;void 0===c&&(c=Tl);var s=e.defaultValue,u=e.valueIsNumericString,l=e.onValueChange,p=e.isAllowed,f=e.onChange;void 0===f&&(f=gl);var d=e.onKeyDown;void 0===d&&(d=gl);var h=e.onMouseUp;void 0===h&&(h=gl);var m=e.onFocus;void 0===m&&(m=gl);var g=e.onBlur;void 0===g&&(g=gl);var y=e.value,v=e.getCaretBoundary;void 0===v&&(v=Cl);var b=e.isValidInputCharacter;void 0===b&&(b=yl);var x=ml(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter"]),k=Dl(y,s,Boolean(u),i,c,l),_=k[0],S=_.formattedValue,E=_.numAsString,A=k[1],P=(0,w.useRef)();(0,w.useEffect)((function(){var e=i(E);if(void 0===P.current||e!==P.current){var t=T.current,n=c(e,void 0);L({formattedValue:e,numAsString:n,input:t,setCaretPosition:!0,source:pl.props,event:void 0})}}));var j=(0,w.useState)(!1),C=j[0],D=j[1],T=(0,w.useRef)(null),R=(0,w.useRef)({setCaretTimeout:null,focusTimeout:null});(0,w.useEffect)((function(){return D(!0),function(){clearTimeout(R.current.setCaretTimeout),clearTimeout(R.current.focusTimeout)}}),[]);var I=i,M=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},N=function(e,t,n){El(e,t),R.current.setCaretTimeout=setTimeout((function(){e.value===n&&El(e,t)}),0)},Z=function(e,t,n){return jl(e,t,v(e),n)},B=function(e,t,n){var r=v(t),o=function(e,t,n,r,o,a){var i=o.findIndex((function(e){return e})),c=e.slice(0,i);t||n.startsWith(c)||(n=c+n,r+=c.length);for(var s=n.length,u=e.length,l={},p=new Array(s),f=0;f<s;f++){p[f]=-1;for(var d=0,h=u;d<h;d++)if(n[f]===e[d]&&!0!==l[d]){p[f]=d,l[d]=!0;break}}for(var m=r;m<s&&(-1===p[m]||!a(n[m]));)m++;var g=m===s||-1===p[m]?u:p[m];for(m=r-1;m>0&&-1===p[m];)m--;var y=-1===m||-1===p[m]?0:p[m]+1;return y>g?g:r-y<g-r?y:g}(t,S,e,n,r,b);return o=jl(t,o,r)},L=function(e){var t=e.formattedValue;void 0===t&&(t="");var n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var o=e.source,a=e.event,i=e.numAsString,c=e.caretPos;if(n){if(void 0===c&&r){var s=e.inputValue||n.value,u=Al(n);n.value=t,c=B(s,t,u)}n.value=t,r&&void 0!==c&&N(n,c,t)}t!==S&&function(e,t){P.current=e.formattedValue,A(e,t)}(M(t,i),{event:a,source:o})},F=!C||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",U=Object.assign({inputMode:F},x,{type:t,value:S,onChange:function(e){var t=function(e,t,n){var r=function(e,t){for(var n=0,r=0,o=e.length,a=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[a-1-r]&&a-r>n&&o-r>n;)r++;return{from:{start:n,end:o-r},to:{start:n,end:a-r}}}(S,e),o=Object.assign(Object.assign({},r),{lastValue:S}),a=c(e,o),i=I(a);if(a=c(i,void 0),p&&!p(M(i,a))){var s=t.target,u=Al(s),l=B(e,S,u);return N(s,l,S),!1}return L({formattedValue:i,numAsString:a,inputValue:e,event:t,source:n,setCaretPosition:!0,input:t.target}),!0}(e.target.value,e,pl.event);t&&f(e)},onKeyDown:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,a=n.selectionEnd,i=n.value;if(void 0===i&&(i=""),"ArrowLeft"===r||"Backspace"===r?t=Math.max(o-1,0):"ArrowRight"===r?t=Math.min(o+1,i.length):"Delete"===r&&(t=o),void 0!==t&&o===a){var c=t;if("ArrowLeft"===r||"ArrowRight"===r)c=Z(i,t,"ArrowLeft"===r?"left":"right");else"Delete"!==r||b(i[t])?"Backspace"!==r||b(i[t])||(c=Z(i,t,"left")):c=Z(i,t,"right");c!==t&&N(n,c,i),e.isUnitTestRun&&N(n,c,i),d(e)}else d(e)},onMouseUp:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),n===r){var a=Z(o,n);a!==n&&N(t,a,o)}h(e)},onFocus:function(e){e.persist&&e.persist();var t=e.target;T.current=t,R.current.focusTimeout=setTimeout((function(){var n=t.selectionStart,r=t.selectionEnd,o=t.value;void 0===o&&(o="");var a=Z(o,n);a===n||0===n&&r===o.length||N(t,a,o),m(e)}),0)},onBlur:function(e){T.current=null,clearTimeout(R.current.focusTimeout),clearTimeout(R.current.setCaretTimeout),g(e)}});if("text"===n)return o?O().createElement(O().Fragment,null,o(S,x)||null):O().createElement("span",Object.assign({},x,{ref:a}),S);if(r){var H=r;return O().createElement(H,Object.assign({},U,{ref:a}))}return O().createElement("input",Object.assign({},U,{ref:a}))}function Ml(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix;void 0===o&&(o="");var a=t.suffix;void 0===a&&(a="");var i=t.allowNegative;void 0===i&&(i=!0);var c=t.thousandsGroupStyle;if(void 0===c&&(c="thousand"),""===e||"-"===e)return e;var s=Nl(t),u=s.thousandSeparator,l=s.decimalSeparator,p=0!==n&&-1!==e.indexOf(".")||n&&r,f=Ol(e,i),d=f.beforeDecimal,h=f.afterDecimal,m=f.addNegation;return void 0!==n&&(h=xl(h,n,!!r)),u&&(d=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(d,u,c)),o&&(d=o+d),a&&(h+=a),m&&(d="-"+d),e=d+(p&&l||"")+h}function Nl(e){var t=e.decimalSeparator;void 0===t&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function Zl(e,t,n){void 0===t&&(t=Pl(e));var r=n.allowNegative;void 0===r&&(r=!0);var o=n.prefix;void 0===o&&(o="");var a=n.suffix;void 0===a&&(a="");var i=n.decimalScale,c=t.from,s=t.to,u=s.start,l=s.end,p=Nl(n),f=p.allowedDecimalSeparators,d=p.decimalSeparator,h=e[l]===d;if(l-u==1&&-1!==f.indexOf(e[u])){var m=0===i?"":d;e=e.substring(0,u)+m+e.substring(u+1,e.length)}var g=!1;o.startsWith("-")?g=e.startsWith("--"):a.startsWith("-")&&e.length===a.length?g=!1:"-"===e[0]&&(g=!0),g&&(e=e.substring(1),u-=1,l-=1);var y=0;e.startsWith(o)?y+=o.length:u<o.length&&(y=u),l-=y;var v=(e=e.substring(y)).length,b=e.length-a.length;e.endsWith(a)?v=b:l>e.length-a.length&&(v=l),e=e.substring(0,v),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}(g?"-"+e:e,r),e=(e.match(function(e,t){return new RegExp("(^-)|[0-9]|"+wl(e),t?"g":void 0)}(d,!0))||[]).join("");var w=e.indexOf(d),O=Ol(e=e.replace(new RegExp(wl(d),"g"),(function(e,t){return t===w?".":""})),r),x=O.beforeDecimal,k=O.afterDecimal,_=O.addNegation;return s.end-s.start<c.end-c.start&&""===x&&h&&!parseFloat(k)&&(e=_?"-":""),e}function Bl(e){var t=e.decimalSeparator;void 0===t&&(t=".");e.allowedDecimalSeparators,e.thousandsGroupStyle,e.suffix,e.allowNegative;var n=e.allowLeadingZeros,r=e.onKeyDown;void 0===r&&(r=gl);var o=e.onBlur;void 0===o&&(o=gl);var a=e.thousandSeparator,i=e.decimalScale,c=e.fixedDecimalScale,s=e.prefix;void 0===s&&(s="");var u=e.defaultValue,l=e.value,p=e.valueIsNumericString,f=e.onValueChange,d=ml(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]);!function(e){var t=Nl(e),n=t.thousandSeparator,r=t.decimalSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ")}(e);var h=function(t){return Ml(t,e)},m=function(t,n){return Zl(t,n,e)},g=p;vl(l)?vl(u)||(g=null!=p?p:"number"==typeof u):g=null!=p?p:"number"==typeof l;var y=function(e){return vl(e)||bl(e)?e:("number"==typeof e&&(e=_l(e)),g&&"number"==typeof i?Sl(e,i,Boolean(c)):e)},v=Dl(y(l),y(u),Boolean(g),h,m,f),b=v[0],w=b.numAsString,O=b.formattedValue,x=v[1];return Object.assign(Object.assign({},d),{value:O,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===t||yl(e)},onValueChange:x,format:h,removeFormatting:m,getCaretBoundary:function(t){return function(e,t){var n=t.prefix;void 0===n&&(n="");var r=t.suffix;void 0===r&&(r="");var o=Array.from({length:e.length+1}).map((function(){return!0})),a="-"===e[0];o.fill(!1,0,n.length+(a?1:0));var i=e.length;return o.fill(!1,i-r.length+1,i+1),o}(t,e)},onKeyDown:function(t){var n=t.target,o=t.key,u=n.selectionStart,l=n.selectionEnd,p=n.value;if(void 0===p&&(p=""),u===l){"Backspace"===o&&"-"===p[0]&&u===s.length+1&&El(n,1);var f=Nl(e),d=f.decimalSeparator,h=f.allowedDecimalSeparators;"Backspace"===o&&p[u-1]===d&&i&&c&&(El(n,u-1),t.preventDefault()),(null==h?void 0:h.includes(o))&&p[u]===d&&El(n,u+1);var m=!0===a?",":a;"Backspace"===o&&p[u-1]===m&&El(n,u-1),"Delete"===o&&p[u]===m&&El(n,u+1),r(t)}else r(t)},onBlur:function(t){var r=w;if(r.match(/\d/g)||(r=""),n||(r=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return(t?"-":"")+r+(o?"."+o:"")}(r)),c&&i&&(r=Sl(r,i,c)),r!==w){var a=Ml(r,e);x({formattedValue:a,value:r,floatValue:parseFloat(r)},{event:t,source:pl.event})}o(t)}})}function Ll(e){var t=Bl(e);return O().createElement(Il,Object.assign({},t))}!function(e){e.event="event",e.props="prop"}(pl||(pl={}));var Fl,Ul=["immutable"];function Hl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wl=(0,x.ZP)((function(e){e.immutable;var t=qe()(e,Ul);return(0,Pe.jsx)(Ll,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hl(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},t))})).withConfig({displayName:"StyledNumberEdit"})(Fl||(Fl=b()(["\n &&&& {\n ","\n }\n"])),yt);const zl=Wl;function Vl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vl(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ql=function(e){return 0!==e?Math.ceil(Math.log10(Math.abs(e)+1)):1},Gl=function(e){return null!=e&&!isNaN(parseFloat(e))},Kl=function(e,t,n){return!Gl(n)||!(Gl(t)&&n>t)&&!(Gl(e)&&n<e)},$l=function(e,t){return function(n){var r=n.floatValue;return ql(r)<ql(e)||Kl(e,t,r)}};const Xl=(0,p.ZP)(He.Z.Debouncer((function(e){var t,n=(t=e.intl.locale,{thousandSeparator:1111..toLocaleString(t).replace(/1/g,""),decimalSeparator:1.1.toLocaleString(t).replace(/1/g,"")}),r=n.thousandSeparator,o=n.decimalSeparator,a=e.options||{},i=a.prePointDigits,c=a.postPointDigits,s=a.minValue,u=a.maxValue,l=a.allowNegative,p=a.fixedDecimalScale,f=a.suffix,d=a.prefix,h=a.format,m=function(e,t,n){if(e){var r=Math.pow(10,e)-(t?1/Math.pow(10,t):1);return n&&n>r?n:r}return n}(i,c,u),g=Yl(Yl({isAllowed:$l(s,m),allowNegative:!!l},isNaN(c)?{}:{decimalScale:c}),{},{fixedDecimalScale:!!p});return(0,Pe.jsx)(gt,{immutable:e.immutable,children:(0,Pe.jsx)(zl,Yl(Yl({decimalSeparator:o,disabled:e.immutable,id:e.id,valueIsNumericString:!0,name:e.name,onValueChange:function(t){e.onChange&&Kl(s,m,t.floatValue)&&e.onChange(void 0!==t.floatValue?t.floatValue:null)},immutable:e.immutable,thousandSeparator:r,value:e.value,suffix:f,prefix:d},g),{},{format:h,placeholder:e.placeholder,onBlur:function(t){var n,r=!(n=t.target.value)||isNaN(n)?null:parseFloat(n);e.onChange&&!Kl(s,m,r)&&(t.target.value=null)}}))})}),800));const Ql=He.Z.Debouncer((function(e){var t=e.value,n=e.onChange,r=e.options,o=e.immutable,a=e.name,i=e.id,c=e.placeholder,s=r||{},u=s.minValue,l=s.maxValue,p=s.format,f=s.allowLeadingZeros,d=s.suffix;return(0,Pe.jsx)(gt,{immutable:o,children:(0,Pe.jsx)(zl,{isAllowed:$l(u,l),allowNegative:!0,decimalScale:0,disabled:o,id:i,name:a,onValueChange:function(e){var t=e.value,r=e.floatValue,o=f?t:r;void 0===o&&(o=null),Kl(u,l,r)&&n(o)},value:t,allowLeadingZeros:f,suffix:d,format:p,placeholder:c})})}),800);var Jl,ep,tp,np=x.ZP.div.withConfig({displayName:"StyledWrapper"})(Jl||(Jl=b()(["\n display: flex;\n justify-content: stretch;\n"]))),rp=x.ZP.div.withConfig({displayName:"StyledLocationWrapper"})(ep||(ep=b()(["\n flex-grow: 1;\n"]))),op=x.ZP.div.withConfig({displayName:"StyledDistanceWrapper"})(tp||(tp=b()(["\n width: 50px;\n border-left: 1px solid ",";\n margin-left: ",";\n padding-left: ",";\n"])),ke.FS.color("border"),Ke.Z.space(-.8),Ke.Z.space(.5));function ap(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ip(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ap(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const cp=function(e){var t=e.id,n=e.immutable,r=e.value,o=e.onChange,a=e.options,i=void 0===a?{}:a,c=i.suggestions,s=i.isLoading,u=i.fetchSuggestions,l=i.latitudeField,p=i.longitudeField,f=i.emptySearchText,d=i.noResultsText,h=i.kmSuffixText,m=r?r.distance:0,g=function(e){return null!=e&&e.latitude&&null!=e&&e.longitude?cl()(e,fl):void 0}(r),y=function(e){return e?e.map(hl):[]}(c);return(0,Pe.jsxs)(np,{children:[(0,Pe.jsx)(rp,{children:(0,Pe.jsx)(si,{id:t,immutable:n,onChange:function(e){o(ip(ip({},function(e,t){return t?ul(ul({},e),cl()(t,fl)):Yr()(e,fl)}(r,e)),{},{latitudeField:l,longitudeField:p}))},isLoading:s,options:y,searchOptions:function(e){var t=function(e){if(!e)return null;var t=Oe()(e.matchAll(ll(/([\d]*)([^\d\s]*)/g,{postcode:1,city:2}))).map((function(e){return e.groups})),n=t.find((function(e){return e.postcode})),r=t.find((function(e){return e.city}));return ul(ul({},r?{city:r.city}:{}),n?{postcode:n.postcode}:{})}(e);u(t,null)},fetchOptions:function(e){e||u(null,null)},value:g,noResultsComp:function(e){return e.inputValue?d:f}})}),(0,Pe.jsx)(op,{children:(0,Pe.jsx)(Ql,{value:m,onChange:function(e){o(ip(ip({},r),{},{distance:e}))},immutable:n,options:{minValue:0,maxValue:100,suffix:" ".concat(h)}})})]})};var sp,up=(0,w.lazy)((function(){return Promise.all([i.e(885),i.e(759),i.e(85)]).then(i.bind(i,17676))})),lp=function(e){var t=e.onChange,n=e.immutable,r=e.value,o=e.options;if(n)return(0,Pe.jsx)(rt.ZP.Span,{children:(0,Pe.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})});var a=o||{},i=a.contentLang,c=a.ckEditorConfig;return(0,Pe.jsx)(w.Suspense,{fallback:sp||(sp=(0,Pe.jsx)("i",{})),children:(0,Pe.jsx)(up,{onChange:function(e){t&&t(e)},value:r,contentLang:i,ckEditorConfig:c})})};lp.defaultProps={value:""};const pp=lp;var fp,dp,hp,mp=i(58808),gp=i.n(mp),yp=x.ZP.div.withConfig({displayName:"StyledLocationEdit"})(fp||(fp=b()(["\n && {\n ","\n position: relative;\n\n div {\n :nth-of-type(1) {\n flex: 0 0 13ch;\n margin-right: ",";\n }\n\n :nth-of-type(2) {\n flex: 1 1 auto;\n }\n }\n\n > span {\n flex: 0 0 auto;\n margin-right: ",";\n color: ",";\n }\n\n .react-autosuggest__input {\n ","\n width: 100%;\n }\n\n .react-autosuggest__suggestions-container--open {\n width: calc(100% + 17.5px);\n background-color: ",";\n box-shadow: 0 0 6px ",";\n border: 1px solid ",";\n bottom: -9px;\n left: -10px;\n max-height: 300px;\n overflow-y: auto;\n position: absolute;\n transform: translateY(100%);\n z-index: 2; // higher than StyledIndicatorsContainerWrapper\n }\n\n .react-autosuggest__suggestions-list {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n\n .react-autosuggest__suggestion {\n cursor: pointer;\n padding: 8px 12px;\n }\n\n .react-autosuggest__suggestion--highlighted {\n background-color: ",";\n }\n }\n"])),mt,Ke.Z.space(-2),Ke.Z.space(-2),(function(e){var t=e.immutable,n=e.theme;return t?Ua()(n,"colors.textDisabled"):Ua()(n,"colors.text")}),yt,ke.FS.color("paper"),ke.FS.color("signal.info"),ke.FS.color("secondaryLight"),ke.FS.color("backgroundItemHover"));function vp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const wp=function(e){var t=e.onChange,r=e.options,o=e.value,a=e.id,i=e.immutable,c=e.name,s=function(e){return function(t){return t[e]}},u=function(e){var t=e.state,n=e.country,r=e.postcode,o=e.city,a=t?"- ".concat(t):"",i=n?"/ ".concat(n.display):"";return(0,Pe.jsxs)(rt.ZP.Span,{children:[r," ",o," ",a," ",i]})},l=function(e){return function(r,a){var i=a.newValue;t(bp(bp({},o),{},n()({},e,i)))}},p=function(e,n){var r=n.suggestion;t(r)},f=function(e){return function(t){var o=t.value;r.fetchSuggestions(n()({},e,o),r.locationValues.country)}},d={id:a,value:o.postcode||"",onChange:l("postcode"),disabled:i},h={value:o.city||"",onChange:l("city"),disabled:i};return(0,Pe.jsx)(fe,{children:function(e){var t,n,a,l=e.focused,m=e.getRef;return(0,Pe.jsxs)(yp,{immutable:i,name:c,ref:m,children:[(0,Pe.jsx)(gp(),{suggestions:r.suggestions||[],onSuggestionsFetchRequested:f("postcode"),getSuggestionValue:s("postcode"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:d,onSuggestionSelected:p,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(l||o.city||o.postcode)&&(dp||(dp=(0,Pe.jsx)(rt.ZP.Span,{children:"/"}))),(0,Pe.jsx)(gp(),{suggestions:r.suggestions||[],onSuggestionsFetchRequested:f("city"),getSuggestionValue:s("city"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:h,onSuggestionSelected:p,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!i}}),(0,Pe.jsxs)(bt,{children:[r.isLoading&&(hp||(hp=(0,Pe.jsx)(Da.Z,{size:"1.8rem"}))),(a=r.locationValues,Boolean(a.city||a.postcode)&&(0,Pe.jsx)(Iu.Z,{href:(t=r.locationValues,n=t?Object.values(t).filter(Boolean).map((function(e){return"object"===tl()(e)&&e.display?e.display:e})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(n)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:r.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};function Op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const xp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Op(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Op(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function kp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const _p=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};var Sp;const Ep=x.ZP.input.attrs((function(e){return{type:"tel"}})).withConfig({displayName:"StyledPhoneEdit"})(Sp||(Sp=b()(["\n &&&& {\n ","\n }\n"])),yt);const Ap=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.onLibLoaded,c=Ua()(e,"options.defaultCountry")||"CH",s=(0,w.useState)(null),u=U()(s,2),l=u[0],p=u[1],f=O().createRef();(0,w.useEffect)((function(){var e=function(){var e=L()(W().mark((function e(){var t;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([i.e(817),i.e(877)]).then(i.bind(i,80446));case 2:t=e.sent,p(t),a&&a();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[a]);var d=function(e,t){var n=e.substring(0,t-1).match(/\s/g);return(null==n?void 0:n.length)||0},h=n&&null!=l&&l.AsYouType?new l.AsYouType(c).input(n):n||"";return(0,Pe.jsxs)(gt,{immutable:r,children:[(0,Pe.jsx)(Ep,{disabled:r||!l,id:o,name,onChange:function(e){var r=e.target.value,o=l?l.parseNumber(r,c):r,a=Gr()(o)?new l.AsYouType(c).input(r).replace(/\s/g,""):l.formatNumber(o,"E.164");t(a);var i=e.target.selectionStart;!function(e,t,n){if(n&&e.length!==n){var r=new l.AsYouType(c).input(t),o=new l.AsYouType(c).input(e),a=d(r,n),i=d(o,n)-a;window.requestAnimationFrame(function(){var e=n+i;this.setSelectionRange(e,e)}.bind(f.current))}}(r,n,i)},immutable:r||!l,ref:f,value:h}),h&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(Iu.Z,{href:"tel:".concat(n),icon:"phone",tabIndex:-1,target:"_blank",neutral:!0})})]})};function Pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Cp=function(e){return e.map((function(e){return cl()(e,["key","display"])}))};const Dp=function(e){var t=e.id,n=e.immutable,r=e.onChange,o=e.options.isMulti,a=e.value;return(0,Pe.jsx)(si,{id:t,immutable:n,isMulti:o,onChange:function(e){var t=o?e.map((function(e){return e.key})):[null==e?void 0:e.key],n=a.options.map((function(e){return jp(jp({},e),t.includes(e.key)?{selected:!0}:{selected:!1})}));r({options:n})},value:Cp(a.options.filter((function(e){return e.selected}))),openMenuOnClick:!0,options:Cp(a.options)})};function Tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Rp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,isMulti:!1,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Mp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ip(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ip(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}const Zp=function(e){return(0,Pe.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Np(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:e.id,immutable:e.immutable,isMulti:!1,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};const Bp=He.Z.Debouncer((function(e){return(0,Pe.jsx)(gt,{immutable:e.immutable,children:(0,Pe.jsx)(Qu,{disabled:e.immutable,id:e.id,name:e.name,onChange:function(t){return e.onChange(t.target.value)},immutable:e.immutable,value:e.value||""})})}));const Lp=function(){var e,t=(null===(e=navigator)||void 0===e?void 0:e.userAgent)||"";return/^((?!chrome|android).)*safari/i.test(t)};var Fp,Up,Hp,Wp=(0,x.iv)(Fp||(Fp=b()(["\n ","\n width: 100%;\n grid-area: 1 / 1 / 2 / 2;\n max-height: 25rem;\n box-sizing: border-box;\n"])),yt),zp=x.ZP.div.withConfig({displayName:"StyledSizeWrapper"})(Up||(Up=b()(["\n display: grid;\n width: 100%;\n\n &:after {\n content: attr(data-replicated-value) ' ';\n white-space: pre-wrap;\n word-break: break-all;\n visibility: hidden;\n ","\n\n /* prevent scrollbar on Firefox */\n padding-right: 15px;\n }\n"])),Wp),Vp=x.ZP.textarea.withConfig({displayName:"StyledTextarea"})(Hp||(Hp=b()(["\n &&&& {\n ","\n resize: none;\n margin: 0;\n min-height: 4em;\n }\n"])),Wp);function Yp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Gp=function(e){var t=e.value,n=e.onChange,r=e.name,o=e.id,a=e.disabled,i=e.immutable,c=(0,w.useState)(t),s=U()(c,2),u=s[0],l=s[1],p=!Lp(),f=(0,w.useCallback)(Qr()(l,500,{trailing:!0}),[]);return(0,w.useEffect)((function(){p&&f(t)}),[t,p,f]),(0,Pe.jsx)(zp,qp(qp({"data-testid":"replicated-test"},p?{"data-replicated-value":u}:{}),{},{children:(0,Pe.jsx)(Vp,{value:t,name:r,id:o,onChange:n,disabled:a,immutable:i,rows:"1"})}))};const Kp=He.Z.Debouncer((function(e){return(0,Pe.jsx)(gt,{immutable:e.immutable,children:(0,Pe.jsx)(Gp,{id:e.id,immutable:e.immutable,maxRows:20,name:e.name,onChange:function(t){return e.onChange(t.target.value)},disabled:e.immutable,rows:2,value:e.value})})}));var $p;const Xp=x.ZP.input.withConfig({displayName:"StyledTimeEdit"})($p||($p=b()(["\n &&&& {\n ","\n }\n"])),yt);function Qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jp(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qp(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const ef=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.name,i=Dc(n,t),c=i.inputProps,s=i.clearButtonProps,u=n&&!r;return(0,Pe.jsxs)(gt,{immutable:r,children:[(0,Pe.jsx)(Xp,Jp({type:"text",disabled:r,id:o,immutable:r,name:a},c)),u&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(fa.Z,Jp(Jp({icon:"times"},s),{},{tabIndex:-1}))})]})};var tf;const nf=x.ZP.input.attrs((function(e){return{type:"url"}})).withConfig({displayName:"StyledUrlEdit"})(tf||(tf=b()(["\n &&&& {\n ","\n }\n"])),yt);const rf=He.Z.Debouncer((function(e){return(0,Pe.jsxs)(gt,{immutable:e.immutable,children:[(0,Pe.jsx)(nf,{disabled:e.immutable,id:e.id,immutable:e.immutable,name:e.name,onChange:function(t){return e.onChange((n=t.target.value,r=/^[a-zA-Z0-9]+:\/\//.test(n),n.indexOf(".")>0&&!r?"https://".concat(n):n));var n,r},value:e.value}),e.value&&(0,Pe.jsx)(bt,{children:(0,Pe.jsx)(Iu.Z,{href:e.value,icon:"external-link",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));function of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function af(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?of(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):of(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var cf={boolean:fi,"boolean-select":ui,choice:xi,code:Di,date:Fc,datetime:Hc,document:Wu,duration:$u,email:Ju,geosearch:cp,html:pp,integer:Ql,location:wp,"multi-remote":xp,"multi-select":_p,number:Xl,phone:Ap,"pseudo-select":Dp,remote:Rp,"search-filter":Mp,"single-select":Zp,string:Bp,text:Kp,url:rf,time:ef};const sf=function(e){var t=e.componentType,n=e.value,r=e.options,o=e.id,a=e.events,i=e.placeholder,c=e.readOnly,s=void 0!==c&&c;if(cf[t]){var u=cf[t],l=af(af({},Yr()(a,"onChange")),{},{onBlur:function(){"function"==typeof(null==a?void 0:a.onBlur)&&a.onBlur(n)}});return(0,Pe.jsx)("div",af(af({},l),{},{"data-cy":"form-field",children:(0,Pe.jsx)(u,af(af({value:n,onChange:null==a?void 0:a.onChange},Gr()(r)?{}:{options:r}),{},{id:o,immutable:s,placeholder:i,events:a}))}))}return console.log("No type-editor defined for component type",t),null};function uf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uf(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uf(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const pf=function(e){return(0,Pe.jsx)(wt,{children:(0,Pe.jsx)(sf,lf({componentType:e.type},Yr()(e,"type")))})};var ff,df,hf=x.ZP.div.withConfig({displayName:"StyledLoginFormInputWrapper"})(ff||(ff=b()(["\n && {\n ","\n }\n"])),mt);const mf=function(e){var t=e.verifyCode,n=e.intl,r=(0,w.useState)(null),o=U()(r,2),a=o[0],i=o[1],c=function(e){return n.formatMessage({id:e})},s=a&&a.toString().length>=6,u=function(e){e&&(e.preventDefault(),e.stopPropagation()),s&&t(a)};return(0,Jn.z)(u),(0,Pe.jsxs)(Pe.Fragment,{children:[df||(df=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.two-factor-connector.verificationText"})})),(0,Pe.jsxs)("form",{onSubmit:u,children:[(0,Pe.jsx)(Ue,{hasValue:Boolean(a),id:"verification-input",label:c("client.two-factor-connector.verificationInputLabel"),children:(0,Pe.jsx)(hf,{children:(0,Pe.jsx)(pf,{type:"integer",value:a,events:{onChange:i},options:{format:"### ###",allowLeadingZeros:!0}})})}),(0,Pe.jsx)(er,{children:(0,Pe.jsx)(Ge.Z,{label:c("client.two-factor-connector.okButton"),ink:"primary",look:"raised",type:"submit",disabled:!s})})]})]})};var gf={verifyCode:function(e){return{type:Wn,payload:{userCode:e}}}};const yf=(0,f.connect)((function(e,t){return{}}),gf)((0,p.ZP)(mf));var vf,bf,wf,Of,xf,kf,_f=0,Sf=1,Ef=2,Af=3;const Pf=function(e){var t=e.initialize,n=e.stage;(0,w.useEffect)((function(){t()}),[t]);return(0,Pe.jsxs)(Pe.Fragment,{children:[kf||(kf=(0,Pe.jsx)(In.Z.Notifications,{})),function(){switch(n){case _f:return vf||(vf=(0,Pe.jsx)(zr,{}));case Sf:return bf||(bf=(0,Pe.jsx)(Fr,{}));case Ef:return wf||(wf=(0,Pe.jsx)(yf,{}));case Af:return Of||(Of=(0,Pe.jsx)(ir,{}));default:return xf||(xf=(0,Pe.jsx)(on.Z,{}))}}()]})};var jf={initialize:qn};const Cf=(0,f.connect)((function(e){return{stage:e.twoFactorConnector.stage}}),jf)((0,p.ZP)(Pf));var Df,Tf=i(81770);function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function If(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rf(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rf(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Mf=function(e){return function(t){return If(If({},t),{},{stage:e})}},Nf=(Df={},n()(Df,Nn,Tf.Z.singleTransferReducer("twoFactorActive")),n()(Df,Zn,Tf.Z.singleTransferReducer("secret")),n()(Df,Bn,Tf.Z.singleTransferReducer("username")),n()(Df,Vn,Tf.Z.singleTransferReducer("setupSuccessful")),n()(Df,Un,Mf(0)),n()(Df,Hn,Mf(1)),n()(Df,Fn,Mf(2)),n()(Df,Yn,Mf(3)),Df),Zf={stage:null,twoFactorActive:null,secret:null,username:null,setupSuccessful:null};var Bf=i(34857),Lf=i(81719),Ff=i(54159),Uf=W().mark(ed),Hf=W().mark(nd),Wf=W().mark(rd),zf=W().mark(ad),Vf=W().mark(id),Yf=W().mark(cd),qf=W().mark(sd),Gf=W().mark(ud),Kf=W().mark(ld),$f="relTwo_step_login_status",Xf=function(e){return e.twoFactorConnector.username},Qf=function(e){return e.twoFactorConnector.secret},Jf=function(e){return e.input};function ed(){var e,t,n,r,o,a;return W().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Bf.Ys)(Jf);case 2:if(e=i.sent,e.secret){i.next=14;break}return i.next=7,(0,Bf.Ys)(Xf);case 7:return t=i.sent,i.next=10,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(t,"/two-factor"),{method:"GET"});case 10:return n=i.sent,r=n.body,o=r.secret,a=r.totpUri,i.next=14,(0,Bf.gz)(Kn({secret:o,uri:a}));case 14:return i.next=16,(0,Bf.gz)({type:Hn});case 16:case"end":return i.stop()}}),Uf)}function td(e,t){return Ff.Z.executeRequest(e,t).then(Ff.Z.extractBody)}function nd(e,t,n,r){var o,a;return W().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return o={secret:e,userCode:t,username:n,password:r},i.next=3,(0,Bf.RE)(td,"login",{method:"POST",headers:new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}),body:Object.keys(o).filter((function(e){return!!o[e]})).sort().map((function(e){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(o[e]))})).join("&")});case 3:return a=i.sent,i.next=6,(0,Bf.gz)(Qn(Ua()(a,"TWOSTEPLOGIN_ACTIVATION.success",!1)));case 6:case"end":return i.stop()}}),Hf)}function rd(e,t,n){var r;return W().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(e,"/two-factor"),{method:"POST",body:{secret:t,code:n},acceptedStatusCodes:[400]});case 2:return r=o.sent,o.next=5,(0,Bf.gz)(Qn(204===r.status));case 5:case"end":return o.stop()}}),Wf)}function od(e){var t=e.payload.userCode;return W().mark((function e(){var n,r,o,a,i;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.Ys)(Xf);case 2:return n=e.sent,e.next=5,(0,Bf.Ys)(Qf);case 5:return r=e.sent,o=r.secret,e.next=9,(0,Bf.Ys)(Jf);case 9:if(a=e.sent,i=a.password,!a.forced){e.next=17;break}return e.next=15,(0,Bf.RE)(nd,o,t,n,i);case 15:e.next=19;break;case 17:return e.next=19,(0,Bf.RE)(rd,n,o,t);case 19:return e.next=21,(0,Bf.gz)({type:Yn});case 21:case"end":return e.stop()}}),e)}))()}function ad(){var e,t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Bf.RE)(cd);case 2:return n.next=4,(0,Bf.Ys)(Jf);case 4:if(e=n.sent,!(t=e.secret)){n.next=9;break}return n.next=9,(0,Bf.gz)(Kn(t));case 9:return n.next=11,(0,Bf.gz)(Xn());case 11:case"end":return n.stop()}}),zf)}function id(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(s.Z.fireExternalEvent("onSuccess"));case 2:case"end":return e.stop()}}),Vf)}function cd(){var e,t,n,r,o;return W().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,(0,Bf.RE)(sd);case 2:return e=a.sent,a.next=5,(0,Bf.gz)($n(e));case 5:return t='username === "'.concat(e,'"'),a.next=8,(0,Bf.RE)(Lf.Z.fetchEntities,"Principal",{where:t,paths:[$f]});case 8:if(!((n=a.sent).length>1)){a.next=11;break}throw new Error("More than one user found for username ".concat(e));case 11:return r=Ua()(n,"[0].paths.".concat($f,".value.key")),o="1"===r,a.next=15,(0,Bf.gz)(Gn(o));case 15:case"end":return a.stop()}}),Yf)}function sd(){var e,t,n;return W().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Bf.Ys)(Jf);case 2:if(e=r.sent,!(t=e.username)){r.next=8;break}return r.abrupt("return",t);case 8:return r.next=10,(0,Bf.RE)(Lf.Z.requestSaga,"principals");case 10:return n=r.sent,r.abrupt("return",n.body.username);case 12:case"end":return r.stop()}}),qf)}function ud(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(s.Z.fireExternalEvent("onResize"));case 2:case"end":return e.stop()}}),Gf)}function ld(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(Ln,ed),(0,Bf.Fm)(Wn,od),(0,Bf.Fm)(Mn,ad),(0,Bf.Fm)(zn,id),(0,Bf.Fm)(Un,ud),(0,Bf.Fm)(Hn,ud),(0,Bf.Fm)(Fn,ud),(0,Bf.Fm)(Yn,ud)]);case 2:case"end":return e.stop()}}),Kf)}const pd={twoFactorConnector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Zf,t=arguments.length>1?arguments[1]:void 0,n=Nf[t.type];return n?n(e,t):e}};var fd,dd=[ld];function hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function md(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hd(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var gd="two-factor-connector",yd=function(t,n,r,o){var i=fd||(fd=(0,Pe.jsx)(Cf,{})),c=e.Z.createStore(pd,dd,n,gd);return In.Z.addToStore(c,!0),a.Z.addToStore(c,!0,["console","remote","notification"]),s.Z.addToStore(c,(function(t){return e.Z.getEvents(vd,t.input)})),e.Z.createApp(gd,i,c,{input:n,events:r,actions:[],publicPath:o,textResourceModules:["component","common",gd]})},vd=["onSuccess","onCancel","onResize"],bd=function(t){return e.Z.useApp({initApp:yd,props:t,packageName:gd,externalEvents:vd}).component};bd.propTypes=md(md({},vd.reduce((function(e,t){return md(md({},e),{},n()({},t,o().func))}),{})),{},{username:o().string,password:o().string,secret:o().shape({secret:o().string.isRequired,uri:o().string.isRequired}),forced:o().bool});const wd=bd;var Od;e.Z.createBundleableApp(gd,yd,bd);const xd=function(e){var t=e.locale,n=e.username,r=e.password,o=e.secret,a=e.showTitle,i=e.changePage;return(0,Pe.jsxs)("div",{children:[a&&(Od||(Od=(0,Pe.jsx)(at,{title:"client.login.form.title"}))),(0,Pe.jsx)(wd,{locale:t,username:n,password:r,secret:o,forced:!0,onSuccess:function(){i(_)}})]})};var kd={changePage:M};const _d=(0,f.connect)((function(e){return{username:e.login.username,password:e.login.password,secret:e.twoStepLogin.secret,locale:e.intl.locale}}),kd)(xd);var Sd,Ed,Ad,Pd=x.ZP.div.withConfig({displayName:"StyledTwoStepLogin"})(Sd||(Sd=b()(["\n "," {\n width: 100%;\n }\n\n "," {\n ","\n padding-top: .7rem;\n padding-bottom: 0.7rem;\n }\n"])),Ot.Z,wt,yt);const jd=function(e){var t=e.username,n=e.password,r=e.showTitle,o=e.loginPending,a=e.login,i=e.intl,c=(0,w.useState)(null),s=U()(c,2),u=s[0],l=s[1],p=(0,w.useRef)();(0,w.useLayoutEffect)((function(){p.current.querySelector("input").focus()}),[]);var f=function(e){return i.formatMessage({id:e})};return(0,Pe.jsxs)(Pd,{children:[r&&(Ed||(Ed=(0,Pe.jsx)(at,{title:"client.login.form.title"}))),(0,Pe.jsxs)("form",{onSubmit:function(e){e.preventDefault(),a(t,n,null,u)},ref:p,children:[Ad||(Ad=(0,Pe.jsx)(rt.ZP.P,{children:(0,Pe.jsx)(nt.Z,{id:"client.login.twoStepLogin.introduction"})})),(0,Pe.jsx)(Ue,{hasValue:!!u,id:"twoFactorCode-label",label:f("client.login.twoStepLogin.codePlaceholder"),children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(pf,{type:"integer",value:u,events:{onChange:l},options:{format:"### ###",allowLeadingZeros:!0}})})}),(0,Pe.jsx)(tt,{disabled:!u||u.toString().length<6||o,label:f("client.login.form.button"),pending:o})]})]})};var Cd={login:y};const Dd=(0,f.connect)((function(e){return{username:e.login.username,password:e.login.password,loginPending:e.loginForm.loginPending}}),Cd)((0,p.ZP)(jd));var Td;function Rd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Id(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rd(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}const Md=function(e){var t=e.intl,n=e.checkUsername,r=e.loginPending,o=e.message,a=e.setUsername,i=e.showTitle,c=e.username,s=it(a),u=U()(s,2),l=u[0],p=u[1],f=function(e){return t.formatMessage({id:e})},d=(0,w.useCallback)(function(){var e=L()(W().mark((function e(t){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.preventDefault(),n(c);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[n,c]);return(0,Pe.jsxs)(Dt,{children:[i&&(Td||(Td=(0,Pe.jsx)(at,{title:"client.login.form.title",subtitle:"client.login.form.introduction"}))),(0,Pe.jsxs)("form",{onSubmit:d,children:[(0,Pe.jsx)(Ue,{hasValue:!!c||l,id:"login-username",label:f("client.login.form.userEmailPlaceholder"),children:(0,Pe.jsx)(jt,{children:(0,Pe.jsx)(Pt,Id({autoFocus:!0,name:"user",required:!0,type:"text",value:c,onFocus:function(e){return e.target.select()}},p))})}),(0,Pe.jsx)(ze,{message:o}),(0,Pe.jsx)(tt,{disabled:!l&&(r||""===c),label:f("client.login.form.next"),pending:r})]})]})};var Nd={setUsername:N,checkUsername:function(e){return{type:g,payload:{username:e}}}};const Zd=(0,f.connect)((function(e){return{username:e.login.username,message:e.loginForm.message,loginPending:e.loginForm.loginPending}}),Nd)((0,p.ZP)(Md));var Bd,Ld,Fd,Ud=(0,x.vJ)(Bd||(Bd=b()(["\n .grecaptcha-badge {\n z-index: 9999999;\n opacity: .8;\n }\n"])));const Hd=function(e){var t,n,r,o,a,i=e.initialize,c=e.showTitle,s=e.currentPage;return(0,w.useEffect)((function(){i()}),[i]),(0,Pe.jsxs)(Pe.Fragment,{children:[Ld||(Ld=(0,Pe.jsx)(Ud,{})),function(){switch(s){case A:return t||(t=(0,Pe.jsx)(An,{showTitle:c}));case S:return n||(n=(0,Pe.jsx)(Ut,{showTitle:c}));case E:return r||(r=(0,Pe.jsx)(Dd,{showTitle:c}));case P:return Fd||(Fd=(0,Pe.jsx)(_d,{}));case k:return o||(o=(0,Pe.jsx)(Zd,{showTitle:c}));default:return a||(a=(0,Pe.jsx)(Nt,{showTitle:c}))}}()]})};var Wd={initialize:function(){return{type:d}}};const zd=(0,f.connect)((function(e,t){return{currentPage:t.currentPage||e.login.currentPage,showTitle:t.showTitle}}),Wd)((0,p.ZP)(Hd));var Vd,Yd="PasswordUpdateDialog/SET_SHOW_OLD_PASSWORD",qd="PasswordUpdateDialog/SET_STANDALONE",Gd="PasswordUpdateDialog/SET_FORCED_UPDATE",Kd="PasswordUpdateDialog/SET_USERNAME_OR_PK",$d="PasswordUpdateDialog/SET_CURRENT_USERNAME",Xd=function(e){return{type:Yd,payload:{showOldPasswordField:e}}},Qd=function(e){return{type:Gd,payload:{forcedUpdate:e}}},Jd=function(e){return{type:Kd,payload:{usernameOrPk:e}}},eh=i(15857),th=(Vd={},n()(Vd,C,Tf.Z.singleTransferReducer("entryPage")),n()(Vd,j,Tf.Z.singleTransferReducer("currentPage")),n()(Vd,D,Tf.Z.singleTransferReducer("username")),n()(Vd,T,Tf.Z.singleTransferReducer("password")),n()(Vd,R,Tf.Z.singleTransferReducer("captchaKey")),Vd),nh={entryPage:void 0,currentPage:void 0,username:"",password:"",captchaKey:null};const rh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nh,t=arguments.length>1?arguments[1]:void 0,n=th[t.type];return n?n(e,t):e};var oh,ah="loginForm/SET_MESSAGE",ih="loginForm/CLEAR_MESSAGE",ch="loginForm/SET_PENDING",sh="loginForm/ACTIVATE_RECAPTCHA",uh=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:ah,payload:{text:e,negative:t}}},lh=function(){return{type:ih}},ph=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{type:ch,payload:{pending:e}}};function fh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hh=(oh={},n()(oh,ah,(function(e,t){var n=t.payload,r=n.text,o=n.negative;return dh(dh({},e),{},{message:{text:r,negative:o}})})),n()(oh,ih,(function(e){return dh(dh({},e),{},{message:{}})})),n()(oh,ch,(function(e,t){var n=t.payload;return dh(dh({},e),{},{loginPending:n.pending})})),n()(oh,sh,(function(e){return dh(dh({},e),{},{recaptchaActivated:!0})})),oh),mh={message:{},loginPending:!1,recaptchaActivated:!1};const gh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mh,t=arguments.length>1?arguments[1]:void 0,n=hh[t.type];return n?n(e,t):e};var yh;function vh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vh(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wh={showOldPasswordField:!0,forcedUpdate:!1,standalone:!0,usernameOrPk:""},Oh=function(e){return function(t,r){var o=r.payload[e];return bh(bh({},t),{},n()({},e,o))}},xh=(yh={},n()(yh,Yd,Oh("showOldPasswordField")),n()(yh,Gd,Oh("forcedUpdate")),n()(yh,qd,Oh("standalone")),n()(yh,Kd,Oh("usernameOrPk")),yh);const kh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wh,t=arguments.length>1?arguments[1]:void 0,n=xh[t.type];return n?n(e,t):e};var _h,Sh=i(44759),Eh=W().mark(Ph),Ah=W().mark(jh);function Ph(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)($d,jh)]);case 2:case"end":return e.stop()}}),Eh)}function jh(){var e,t,n;return W().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e={acceptedStatusCodes:[403]},r.next=3,(0,Bf.RE)(Lf.Z.requestSaga,"principals",e);case 3:if(403!==(t=r.sent).status){r.next=8;break}Sh.Z.logError('input "username" on password-update is mandatory if no user is logged in'),r.next=11;break;case 8:return n=t.body.username,r.next=11,(0,Bf.gz)(Jd(n));case 11:case"end":return r.stop()}}),Ah)}function Ch(e){return 0===Object.keys(e).length&&e.constructor===Object}function Dh(e){var t={};return e.forEach((function(e){t[e.ruleName]=e.message})),t}function Th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Th(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Th(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ih={oldPassword:"",newPassword:"",newPasswordRepeat:"",newPasswordValidationErrors:null,passwordUpdatePending:!1,passwordUpdateFailed:!1,passwordUpdateErrorCode:null},Mh=(_h={},n()(_h,Wt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{oldPassword:n.oldPassword})})),n()(_h,Vt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{newPassword:n.newPassword})})),n()(_h,Yt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{newPasswordValidationErrors:n.errors})})),n()(_h,qt,(function(e,t){var n=t.payload;return Rh(Rh({},e),{},{newPasswordRepeat:n.newPasswordRepeat})})),n()(_h,Gt,(function(e){return Rh(Rh({},e),{},{passwordUpdatePending:!0,passwordUpdateFailed:!1})})),n()(_h,Kt,(function(e){return Ih})),n()(_h,$t,(function(e,t){var n=t.payload;if(n.validationMessages){var r=Dh(n.validationMessages);return Rh(Rh({},e),{},{passwordUpdatePending:!1,newPasswordValidationErrors:r})}return Rh(Rh({},e),{},{passwordUpdatePending:!1,passwordUpdateFailed:!0,passwordUpdateErrorCode:n.errorCode})})),n()(_h,Qt,(function(e,t){t.payload;return Rh(Rh({},e),{},{passwordUpdateFailed:!1})})),_h);const Nh=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ih,t=arguments.length>1?arguments[1]:void 0,n=Mh[t.type];return n?n(e,t):e};var Zh="password_update_success",Bh="password_update_failed",Lh=i(75354),Fh="login/SET_SECRET";function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uh(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wh,zh=W().mark(lm),Vh=W().mark(pm),Yh=W().mark(dm),qh=W().mark(hm),Gh=W().mark(mm),Kh=W().mark(gm),$h=W().mark(ym),Xh=W().mark(vm),Qh=W().mark(bm),Jh=W().mark(wm),em=W().mark(Om),tm=W().mark(_m),nm=W().mark(Sm),rm=W().mark(Em),om=W().mark(Am),am=W().mark(Pm),im=function(e){return e.login},cm=function(e){return e.input};function sm(e){var t=e.payload;return W().mark((function e(){var n,r,o;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.Ys)(im);case 2:return n=e.sent,r=n.entryPage,e.next=6,(0,Bf.gz)(ph(!0));case 6:return e.next=8,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(t.username,"/password-reset"),{method:"POST"});case 8:return e.next=10,(0,Bf.gz)(N(t.username));case 10:return e.next=12,(0,Bf.gz)(M(_));case 12:return o=r===k?"client.login.from.passwordRequestedWithValidUsername":"client.login.from.passwordRequested",e.next=16,(0,Bf.gz)(uh(o));case 16:return e.next=18,(0,Bf.gz)(ph(!1));case 18:case"end":return e.stop()}}),e)}))()}function um(e,t){return new Promise((function(n){Ff.Z.executeRequest(e,t).then(Ff.Z.extractBody).then((function(e){return n(e)})).catch((function(e){Sh.Z.logError("Failed to execute request",e),n({success:!1})}))}))}function lm(e){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(um,"login",fm(e));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),zh)}function pm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.RE)(um,"session",{method:"POST"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),Vh)}function fm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{method:"POST",headers:new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"}),body:Object.keys(e).filter((function(t){return!!e[t]})).sort().map((function(t){return"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e[t]))})).join("&")}}function dm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(M(E));case 2:case"end":return e.stop()}}),Yh)}function hm(e){var t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=e[P],n.next=3,(0,Bf.gz)({type:Fh,payload:{secret:t}});case 3:return n.next=5,(0,Bf.gz)(M(P));case 5:case"end":return n.stop()}}),qh)}function mm(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.Ys)(im);case 2:return e=t.sent,t.next=5,(0,Bf.gz)(Jt(e.password));case 5:return t.next=7,(0,Bf.gz)(Jd(e.username));case 7:return t.next=9,(0,Bf.gz)(Qd(!0));case 9:return t.next=11,(0,Bf.gz)(M(A));case 11:case"end":return t.stop()}}),Gh)}function gm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(uh("client.login.form.blocked",!0));case 2:case"end":return e.stop()}}),Kh)}function ym(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(uh("client.login.form.failed",!0));case 2:case"end":return e.stop()}}),$h)}function vm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(uh("client.login.form.invalidUsernameEmail",!0));case 2:case"end":return e.stop()}}),Xh)}function bm(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,wm();case 2:(e=t.sent)&&(window.location.href=e);case 4:case"end":return t.stop()}}),Qh)}function wm(){var e,t,n,r;return W().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(e=Lh.Z.fromQueryString(window.location.search),!(t=e._redirect_url)){o.next=5;break}return o.abrupt("return",t);case 5:return o.next=7,(0,Bf.Ys)(cm);case 7:return n=o.sent,r=n.redirectUrl,o.abrupt("return",r);case 10:case"end":return o.stop()}}),Jh)}function Om(t){var n;return W().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Bf.RE)(e.Z.reinitialiseCache);case 2:return r.next=4,(0,Bf.gz)(Z(""));case 4:return n=t.timeout||30,r.next=7,(0,Bf.gz)(s.Z.fireExternalEvent("loginSuccess",{timeout:n}));case 7:case"end":return r.stop()}}),em)}function xm(e){var t=e.payload;return W().mark((function e(){var n,r,o,a,i;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.username,e.next=3,(0,Bf.gz)(lh());case 3:return e.next=5,(0,Bf.gz)(ph(!0));case 5:return e.next=7,(0,Bf.RE)(Lf.Z.requestSaga,"client/username/check/".concat(n),{method:"GET"});case 7:if(r=e.sent,o=r.body,a=o.existingUser,i=o.validEmail,!a){e.next=14;break}return e.next=12,(0,Bf.gz)(M(_));case 12:case 17:e.next=21;break;case 14:if(!i){e.next=19;break}return e.next=17,(0,Bf.gz)(s.Z.fireExternalEvent("register",{username:n}));case 19:return e.next=21,(0,Bf.RE)(vm);case 21:return e.next=23,(0,Bf.gz)(ph(!1));case 23:case"end":return e.stop()}}),e)}))()}function km(e){var t=e.payload;return W().mark((function e(){var n,r,o,a,i,c;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.username,r=t.password,o=t.captchaToken,a=t.userCode,i=Hh(Hh({username:n,password:r},o&&{captchaToken:o}),a&&{userCode:a}),e.next=4,(0,Bf.gz)(ph(!0));case 4:return e.next=6,(0,Bf.RE)(lm,i);case 6:if(!(c=e.sent).success){e.next=14;break}return e.next=10,(0,Bf.RE)(Om,c);case 10:return e.next=12,(0,Bf.RE)(bm);case 12:e.next=45;break;case 14:return e.next=16,(0,Bf.gz)(M(_));case 16:if(!c.CAPTCHA){e.next=21;break}return e.next=19,(0,Bf.gz)({type:sh});case 19:case 24:case 29:case 34:case 39:e.next=43;break;case 21:if(!c.TWOSTEPLOGIN){e.next=26;break}return e.next=24,(0,Bf.RE)(dm,c);case 26:if(!c.RESET_PASSWORD_REQUIRED){e.next=31;break}return e.next=29,(0,Bf.RE)(mm);case 31:if(!c.LOGIN_BLOCKED){e.next=36;break}return e.next=34,(0,Bf.RE)(gm);case 36:if(!c.TWOSTEPLOGIN_ACTIVATION){e.next=41;break}return e.next=39,(0,Bf.RE)(hm,c);case 41:return e.next=43,(0,Bf.RE)(ym);case 43:return e.next=45,(0,Bf.gz)(ph(!1));case 45:case"end":return e.stop()}}),e)}))()}function _m(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(pm);case 2:if(!(e=t.sent).success){t.next=6;break}return t.next=6,(0,Bf.RE)(Om,e);case 6:return t.abrupt("return",e.success);case 7:case"end":return t.stop()}}),tm)}function Sm(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(Lf.Z.fetchServerSettings);case 2:return e=t.sent,t.next=5,(0,Bf.gz)((n=e.captchaKey,{type:R,payload:{captchaKey:n}}));case 5:case"end":return t.stop()}var n}),nm)}function Em(){var e;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.RE)(_m);case 2:return e=t.sent,t.next=5,(0,Bf.RE)(Sm);case 5:if(!e){t.next=8;break}return t.next=8,(0,Bf.RE)(bm);case 8:case"end":return t.stop()}}),rm)}function Am(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(lh());case 2:case"end":return e.stop()}}),om)}function Pm(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(j,Am),(0,Bf.Fm)(h,km),(0,Bf.Fm)(g,xm),(0,Bf.Fm)(m,sm),(0,Bf.Fm)(d,Em)]);case 2:case"end":return e.stop()}}),am)}function jm(e,t,n,r){if("string"!=typeof e)return!1;var o=e.length-e.replace(t,"").length;return(null==n||o>=n)&&(null==r||o<=r)}var Cm=(Wh={},n()(Wh,"PASSWORD_NOT_CHANGED",(function(e,t){return"string"==typeof e&&"string"==typeof t&&e!==t})),n()(Wh,"LENGTH",(function(e,t,n){return"string"==typeof e&&(void 0===n.params.min||null===n.params.min||e.length>=n.params.min)&&(void 0===n.params.max||null===n.params.max||e.length<=n.params.max)})),n()(Wh,"CHARACTER_INSUFFICIENT_LOWERCASE",(function(e,t,n){return jm(e,/[a-z]/g,n.params.min,n.params.max)})),n()(Wh,"CHARACTER_INSUFFICIENT_UPPERCASE",(function(e,t,n){return jm(e,/[A-Z]/g,n.params.min,n.params.max)})),n()(Wh,"CHARACTER_INSUFFICIENT_DIGIT",(function(e,t,n){return jm(e,/[0-9]/g,n.params.min,n.params.max)})),Wh);const Dm=function(e,t,n){var r={};return n&&n.forEach((function(n){var o=Cm[n.name];o&&(!0!==o(e,t,n)&&(r[n.name]=!0))})),r};var Tm=W().mark(Gm),Rm=W().mark(Km),Im=W().mark($m),Mm=W().mark(Xm),Nm=W().mark(Jm),Zm=W().mark(eg),Bm=W().mark(tg),Lm=W().mark(ng);function Fm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Um(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fm(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fm(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hm=function(e){return e.passwordUpdate.validationRules},Wm=function(e){return e.input},zm=function(e){return e.passwordUpdate.dialog.usernameOrPk},Vm=function(e){return e.passwordUpdate.password},Ym=function(e){return e.passwordUpdate.dialog.standalone},qm=function(e){return e.intl};function Gm(e,t,n){var r,o;return W().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return r={method:"POST",acceptedStatusCodes:[400],body:Um(Um({},t),{},{captchaToken:n})},a.prev=1,a.next=4,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(e,"/password-update"),r);case 4:return o=a.sent,a.abrupt("return",o.ok?{error:null}:{error:o.body});case 8:return a.prev=8,a.t0=a.catch(1),a.abrupt("return",{error:{errorCode:"UNEXPECTED_ERROR",exception:a.t0}});case 11:case"end":return a.stop()}}),Tm,null,[[1,8]])}function Km(e,t){var n,r,o,a;return W().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,Bf.Ys)(qm);case 2:return n=i.sent,r=n.locale,o={method:"POST",body:t,queryParams:{locale:r}},i.prev=5,i.next=8,(0,Bf.RE)(Lf.Z.requestSaga,"principals/".concat(e,"/password-validation"),o);case 8:return a=i.sent,i.abrupt("return",a.body);case 12:return i.prev=12,i.t0=i.catch(5),i.abrupt("return",{valid:!0,exception:i.t0});case 15:case"end":return i.stop()}}),Rm,null,[[5,12]])}function $m(e){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Bf.gz)((n=e.payload.newPassword,{type:Vt,payload:{newPassword:n}}));case 2:return t.next=4,(0,Bf.gz)({type:Xt});case 4:case"end":return t.stop()}var n}),Im)}function Xm(){var e,t,n,r,o,a,i;return W().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,(0,Bf.Ys)(Hm);case 2:return e=c.sent,c.next=5,(0,Bf.Ys)(Vm);case 5:if(t=c.sent,Ch(n=Dm(t.newPassword,t.oldPassword,e))){c.next=12;break}return c.next=10,(0,Bf.gz)(en(n));case 10:case 24:c.next=29;break;case 12:return c.next=14,(0,Bf.Ys)(zm);case 14:return r=c.sent,c.next=17,(0,Bf.RE)(Jm);case 17:return o=c.sent,c.next=20,(0,Bf.RE)(Km,r,o);case 20:if(!0!==(a=c.sent).valid){c.next=26;break}return c.next=24,(0,Bf.gz)(en({}));case 26:return i=Dh(a.validationMessages),c.next=29,(0,Bf.gz)(en(i));case 29:case"end":return c.stop()}}),Mm)}function Qm(e){var t=e.payload.captchaToken;return W().mark((function e(){var n,r,o,a;return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.Ys)(zm);case 2:return n=e.sent,e.next=5,(0,Bf.RE)(Jm);case 5:return r=e.sent,e.next=8,(0,Bf.RE)(Gm,n,r,t);case 8:if(!(o=e.sent).error){e.next=21;break}if(!1!==o.error.valid){e.next=15;break}return e.next=13,(0,Bf.gz)(tn(null,o.error.validationMessages));case 13:e.next=17;break;case 15:return e.next=17,(0,Bf.gz)(tn(o.error.errorCode));case 17:return e.next=19,(0,Bf.gz)(s.Z.fireVisibilityStatusChangeEvent([Bh]));case 19:e.next=40;break;case 21:return e.next=23,(0,Bf.Ys)(Ym);case 23:if(!e.sent){e.next=29;break}return e.next=27,(0,Bf.gz)(s.Z.fireExternalEvent("success",{newPassword:r.newPassword}));case 27:e.next=36;break;case 29:return e.next=31,(0,Bf.RE)(eg);case 31:return a=e.sent,e.next=34,(0,Bf.gz)(Z(a.payload.password));case 34:return e.next=36,(0,Bf.RE)(km,a);case 36:return e.next=38,(0,Bf.gz)({type:Kt});case 38:return e.next=40,(0,Bf.gz)(s.Z.fireVisibilityStatusChangeEvent([Zh]));case 40:case"end":return e.stop()}}),e)}))()}function Jm(){var e,t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Bf.Ys)(Wm);case 2:return e=n.sent,n.next=5,(0,Bf.Ys)(Vm);case 5:return t=n.sent,n.abrupt("return",{oldPassword:e.oldPassword?e.oldPassword:t.oldPassword,newPassword:t.newPassword});case 7:case"end":return n.stop()}}),Nm)}function eg(){var e,t;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Bf.Ys)(Vm);case 2:return e=n.sent,n.next=5,(0,Bf.Ys)(zm);case 5:return t=n.sent,n.abrupt("return",{payload:{username:t,password:e.newPasswordRepeat}});case 7:case"end":return n.stop()}}),Zm)}function tg(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)({type:Qt});case 2:case"end":return e.stop()}}),Bm)}function ng(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(zt,$m),(0,Bf.Fm)(Xt,Xm),(0,Bf.Fm)(Gt,Qm),(0,Bf.Fm)(zt,tg),(0,Bf.Fm)(Wt,tg),(0,Bf.Fm)(qt,tg)]);case 2:case"end":return e.stop()}}),Lm)}var rg=W().mark(ag),og=W().mark(ig);function ag(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.gz)(s.Z.fireExternalEvent("resize"));case 2:case"end":return e.stop()}}),rg)}function ig(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(Ht,ag)]);case 2:case"end":return e.stop()}}),og)}var cg=n()({},rn,(function(e,t){return t.payload.rules}));const sg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=cg[t.type];return n?n(e,t):e};var ug=W().mark(hg),lg=W().mark(mg),pg=function(e){return e.passwordUpdate.dialog.usernameOrPk},fg=function(e){return e.intl};function dg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return W().mark((function n(){var r,o;return W().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r="principals/".concat(e,"/password-rules"),n.next=3,(0,Bf.RE)(Lf.Z.requestSaga,r,{queryParams:{locale:t}});case 3:return o=n.sent,n.abrupt("return",o.body);case 5:case"end":return n.stop()}}),n)}))()}function hg(){var e,t,n,r;return W().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Bf.Ys)(pg);case 2:return e=o.sent,o.next=5,(0,Bf.Ys)(fg);case 5:return t=o.sent,n=t.locale,o.next=9,(0,Bf.RE)(dg,e,n);case 9:return r=o.sent,o.next=12,(0,Bf.gz)((a=r.rules,{type:rn,payload:{rules:a}}));case 12:case"end":return o.stop()}var a}),ug)}function mg(){return W().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Bf.$6)([(0,Bf.Fm)(nn,hg)]);case 2:case"end":return e.stop()}}),lg)}const gg={dialog:kh,password:Nh,validationRules:sg};var yg=[Ph,ig,ng,mg],vg=n()({},Fh,Tf.Z.singleTransferReducer("secret")),bg={secret:null};const wg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bg,t=arguments.length>1?arguments[1]:void 0,n=vg[t.type];return n?n(e,t):e},Og={login:rh,loginForm:gh,passwordUpdate:(0,eh.UY)(gg),twoStepLogin:wg};var xg=[Pm].concat(Oe()(yg));function kg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var _g="login",Sg=["loginSuccess","register","resize"],Eg={username:k,"password-request":S,login:_},Ag=function(t,n,r,o,i){var c,l=Eg[n.entryPage]||_,p=[Xd(!1),(c=!1,{type:qd,payload:{standalone:c}}),N(n.username||""),I(l),M(l)],f=!!n.showTitle,d=(0,Pe.jsx)(zd,{showTitle:f}),h=e.Z.createStore(Og,xg,n,_g);return u.Z.setInputEnvs(n),s.Z.addToStore(h,(function(t){return e.Z.getEvents(Sg,t.input)})),a.Z.addToStore(h,!0,["console","remote"]),e.Z.createApp(_g,d,h,{input:n,actions:p,publicPath:o,textResourceModules:["login"],customTheme:i})},Pg=function(t){return e.Z.useApp({initApp:Ag,props:t,packageName:_g,externalEvents:Sg}).component};Pg.propTypes=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?kg(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({showTitle:o().bool,locale:o().string,entryPage:o().oneOf(["username","login","password-request"]),username:o().string,setLocale:o().func,backendUrl:o().string,redirectUrl:o().string,appContext:l.Z.propTypes},Sg.reduce((function(e,t){return e[t]=o().func,e}),{}));const jg=function(e){var t=e.usernameOrPk,n=e.showTitle;return(0,Pe.jsx)(on.Z,{required:[t],children:(0,Pe.jsx)(zd,{currentPage:"PASSWORD_UPDATE",showTitle:n})})};const Cg=(0,f.connect)((function(e,t){return{usernameOrPk:e.passwordUpdate.dialog.usernameOrPk}}),{})((0,p.ZP)(jg));function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Rg="password-update",Ig=["success","resize","onVisibilityStatusChange"],Mg=function(t,n,r,o,i){var c=!!n.showTitle,l=!!n.forcedUpdate,p=(0,Pe.jsx)(Cg,{showTitle:c}),f=[Qd(l)];"string"!=typeof n.username||0===n.username.length?f.push({type:$d}):f.push(Jd(n.username)),"boolean"==typeof n.showOldPasswordField&&f.push(Xd(n.showOldPasswordField));var d=e.Z.createStore(Og,xg,n,Rg);return u.Z.setInputEnvs(n),s.Z.addToStore(d,(function(t){return e.Z.getEvents(Ig,t.input)})),a.Z.addToStore(d,!0,["console","remote"]),e.Z.createApp(Rg,p,d,{input:n,actions:f,publicPath:o,textResourceModules:["login"],customTheme:i})},Ng=function(t){return e.Z.useApp({initApp:Mg,props:t,packageName:Rg,externalEvents:Ig}).component};Ng.propTypes=Tg({username:o().string,showTitle:o().bool,showOldPasswordField:o().bool,oldPassword:o().string,backendUrl:o().string,appContext:l.Z.propTypes},Ig.reduce((function(e,t){return Tg(Tg({},e),{},n()({},t,o().func))}),{}));var Zg="login";e.Z.createBundleableApp(Zg,Ag,Pg);var Bg=e.Z.createBundleableApp("password-update",Mg,Ng);e.Z.registerAppInRegistry(Bg.name,Bg.init)})(),c})()));
|