tocco-legacy-bundle 0.1.112 → 0.1.113
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 +3 -0
- package/dist/chunk-293.b2d22f7771c94246d529.js +1 -0
- package/dist/docs-browser.js +1 -1
- package/dist/entity-browser.js +1 -1
- package/dist/input-edit.js +1 -1
- package/dist/merge.js +1 -1
- package/dist/resource-scheduler.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-293.f5274e534803e8fa79e6.js +0 -1
package/dist/merge.js
CHANGED
|
@@ -49,4 +49,4 @@ e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,ge
|
|
|
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,u=r.useEffect,s=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var f=c(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=s((function(){function e(e){if(!u){if(u=!0,i=e,e=r(e),void 0!==o&&p.hasValue){var t=p.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,u=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,r,o]);var d=i(e,f[0],f[1]);return u((function(){p.hasValue=!0,p.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:()=>s});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 u(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 s=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 u(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}).apply(this,arguments)}n.d(t,{Z:()=>r})},86:(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})(e)}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}).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})(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=>"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons",877:"vendor-libphonenumber-js"}[e]||e)+"."+{85:"2a582123630afe2abf6a",198:"ab9f2eea50d01a3a62a9",560:"e3d5772311dd2d78dc20",608:"c3b57ad1736c5780e353",614:"e897aeeb5a9116a3304b",631:"11bdfa70b80bb7423112",877:"a7f934130ec5ac7a8cff"}[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,u;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==r+o){c=f;break}}c||(u=!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 p=(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(p.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=p.bind(null,c.onerror),c.onload=p.bind(null,c.onload),u&&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=381,i.p="/",(()=>{var e={381: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,u]=n,s=0;if(a.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(u)u(i)}for(t&&t(n);s<a.length;s++)o=a[s],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),i.d(c,{app:()=>Tg});var e,t,n,r,o,a,u,s,l,f,p,d,h=i(18882),m=i(59713),g=i.n(m),v=i(45697),y=i.n(v),b=i(50600),w=i(19241),O=i(30604),x=i(74806),k=i(50558),S="merge/INITIALIZE",P="merge/SET_SOURCE_DATA",j="merge/SET_SELECTED_SINGLE",_="merge/SET_SELECTED_MULTIPLE",E="merge/SET_SELECTED_MULTIPLE_ALL",C="merge/SET_TARGET_ENTITY",D="merge/EXECUTE_MERGE",T="merge/SET_MERGE_RESPONSE",M="merge/SET_MERGE_ERROR",R="merge/CLOSE",I=function(e){return{type:P,payload:{sourceData:e}}},N=function(e){return{type:C,payload:{entityKey:e}}},A=function(e,t){return{type:M,payload:{errorMsg:e,validationErrors:t}}},Z=i(1024),L=i.n(Z),F=i(319),H=i.n(F),B=i(63038),U=i.n(B),W=i(7739),z=i.n(W),Y=i(44012),V=i(88162),q=i(34206),G=i(85893),K=function(e){var t=e.model,n=e.keys,r=e.totalKeys,o=e.navigationStrategy;return 0===r?(0,G.jsx)(q.ZP.Span,{children:r}):(0,G.jsxs)(o.ListLink,{entityName:t,entityKeys:n.slice(0,100),children:["(",r,")"]})},X=i(28655),Q=i.n(X),$=i(38205),J=i(88601),ee=i(65035),te=i(7281),ne=$.ZP.div.withConfig({displayName:"StyledButtonWrapper"})(e||(e=Q()(["\n border-bottom: 3px solid ",";\n"])),J.Z.color("backgroundBody")),re=(0,$.ZP)(ee.Z).withConfig({displayName:"StyledButton"})(t||(t=Q()(["\n align-self: flex-start;\n margin-top: ",";\n margin-bottom: ",";\n margin-left: ",";\n"])),te.Z.space(-.7),te.Z.space(-.7),te.Z.space(0)),oe=i(24875),ae=$.ZP.div.withConfig({displayName:"StyledSummarySuccessWrapper"})(n||(n=Q()(["\n display: grid;\n align-items: center;\n grid-template-columns: "," 1fr;\n grid-column-gap: ",";\n margin-bottom: ",";\n"])),te.Z.font(10),te.Z.space(-.5),te.Z.space(-.7)),ie=$.ZP.div.withConfig({displayName:"StyledMessageWrapper"})(r||(r=Q()(["\n margin-bottom: ",";\n\n && {\n p {\n margin-bottom: 0;\n }\n }\n"])),te.Z.space(-.7)),ce=$.ZP.div.withConfig({displayName:"StyledResultsWrapper"})(o||(o=Q()(["\n padding: "," 0 0 ",";\n"])),te.Z.space(-1),te.Z.space(0)),ue=$.ZP.span.withConfig({displayName:"StyledIconWrapper"})(a||(a=Q()(["\n display: flex;\n align-items: center;\n color: ",";\n font-size: ",";\n"])),oe.FS.color("signal.success"),te.Z.font(10));const se=function(e){var t=e.mergeResponse,n=e.navigationStrategy,r=e.close,o=function(e){return Object.entries(z()(e,(function(e){return e.entityLabel}))).map((function(t){var r=U()(t,2),o=r[0],a=r[1],i=e.find((function(e){return e.entityLabel===o})).entity,c=a.map((function(e){return e.pk}));return(0,G.jsxs)("span",{children:[o," ",(0,G.jsx)(K,{model:i,keys:c,totalKeys:c.length,navigationStrategy:n})]},i)})).reduce((function(e,t){return null===e?[t]:[].concat(H()(e),[", ",t])}),null)},a=o(t.notCopiedRelations),i=o(t.notDeletedEntities);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ne,{children:(0,G.jsx)(re,{onClick:r,look:"raised",ink:"primary",children:u||(u=(0,G.jsx)(Y.Z,{id:"client.merge.close"}))})}),(0,G.jsxs)(ce,{children:[s||(s=(0,G.jsxs)(ae,{children:[(0,G.jsx)(ue,{children:(0,G.jsx)(V.Z,{icon:"check"})}),(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.success"})})]})),(t.notCopiedRelations.length>0||t.notDeletedEntities.length>0)&&(l||(l=(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.successHint"})}))),t.notCopiedRelations.length>0&&(0,G.jsxs)(ie,{children:[f||(f=(0,G.jsxs)(q.ZP.P,{children:[(0,G.jsx)(Y.Z,{id:"client.merge.summary.notCopiedRelations"}),":"]})),(0,G.jsx)(q.ZP.B,{children:a})]}),t.notDeletedEntities.length>0&&(0,G.jsxs)(ie,{children:[p||(p=(0,G.jsxs)(q.ZP.P,{children:[(0,G.jsx)(Y.Z,{id:"client.merge.summary.notDeletedEntities"}),":"]})),(0,G.jsx)(q.ZP.B,{children:i})]}),t.showPermissionMessage&&(d||(d=(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.permission"})})))]})]})};var le={close:function(){return{type:R}}};const fe=(0,k.connect)((function(e){return{mergeResponse:e.merge.mergeResponse,navigationStrategy:e.input.navigationStrategy}}),le)((0,x.ZP)(se));var pe=i(35728),de=i(70696),he=i(71392),me="checked",ge="indeterminate",ve="unchecked";const ye=function(e){var t=e.value,n=e.id,r=e.onChange,o=e.label,a=(0,Z.useRef)(null);return(0,Z.useLayoutEffect)((function(){a.current.indeterminate=t===ge,a.current.checked=t===me}),[t]),(0,G.jsx)("input",{ref:a,onChange:function(e){r(t===ge?ve:e.target.checked?me:ve)},id:n,type:"checkbox","aria-checked":"checked"===t,"aria-label":o})};const be=function(e){var t,n=e.rowData,r=e.isSelected,o=e.selectionChange,a=e.selectionFilterFn,i=e.rowIdx;return"function"!=typeof a||a(n)?(0,G.jsx)("div",{onClick:function(e){e.shiftKey&&o(n.__key,!0,!0),e.stopPropagation()},"data-cy":"list-selection-checkbox",children:(0,G.jsx)(ye,{value:(t=n,r(t.__key)?"checked":"unchecked"),onChange:function(e){return function(t){return o(e.__key,"checked"===t)}}(n),label:"".concat(n.__model," ").concat(i+1),id:"list-selection-checkbox "+n.__key})}):null};const we=function(e){var t=e.data,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn,a=t.filter((function(e){return"function"!=typeof o||o(e)})).map((function(e){return e.__key})),i=function(e,t){return e?"checked":t?"indeterminate":"unchecked"}(a.every((function(e){return n(e)})),a.some((function(e){return n(e)})));return 0===a.length?null:(0,G.jsx)(ye,{value:i,onChange:function(e){r(a,"checked"===e)}})};var Oe={SINGLE:"single",MULTI:"multi",NONE:"none"};y().oneOf(Object.keys(Oe).map((function(e){return Oe[e]})));const xe=function(e){var t=e.rowData,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn;return"function"!=typeof o||o(t)?(0,G.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,G.jsx)("input",{type:"radio",checked:n(t.__key),onChange:function(e){r(t.__key,e.target.value)}})}):null};function ke(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 Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pe=function(e,t,n){return{id:"single-selection",width:30,resizable:!1,fixedPosition:!0,dynamic:!0,sorting:{sortable:!1},HeaderRenderer:function(){return null},CellRenderer:function(r){return(0,G.jsx)(xe,Se(Se({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}},je=function(e,t,n){return{id:"multi-selection",dynamic:!0,resizable:!1,fixedPosition:!0,width:30,sorting:{sortable:!1},HeaderRenderer:function(r){return(0,G.jsx)(we,Se(Se({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))},CellRenderer:function(r){return(0,G.jsx)(be,Se(Se({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}};const _e=function(e,t,n){var r=(0,Z.useState)(null),o=U()(r,2),a=o[0],i=o[1],c=(0,Z.useCallback)((function(t){return(e||[]).includes(t)}),[e]),u=(0,Z.useCallback)((function(e,r,o){if(Array.isArray(e))n(e,r),i(null);else if(o){document.getSelection&&document.getSelection().removeAllRanges();var u=a?t.findIndex((function(e){return e===a})):0,s=t.findIndex((function(t){return t===e}));n(t.slice(Math.min(u,s),Math.max(u,s)+1),r)}else n([e],r||!c(e)),i(e)}),[t,n,c,a]);return{isSelected:c,selectionChange:u}};var Ee,Ce,De,Te,Me,Re,Ie,Ne,Ae,Ze,Le,Fe,He,Be,Ue,We,ze,Ye,Ve,qe,Ge,Ke=i(27361),Xe=i.n(Ke),Qe=i(28926),$e=i(80470),Je=i(40493),et=i(30759),tt=function(e){var t=e.theme;return Xe()(t,"colors.border")},nt=te.Z.space(-1.5),rt=$.ZP.div.withConfig({displayName:"StyledTableFooter"})(Ee||(Ee=Q()(["\n grid-row-start: pagination-start;\n display: flex;\n flex-wrap: wrap;\n padding-top: ",";\n padding-bottom: ",";\n border-top: 1px solid ",";\n\n "," {\n margin-right: ",";\n }\n"])),te.Z.space(-.5),te.Z.space(-1),tt,Qe.Z,te.Z.space(-1)),ot=(0,$.ZP)($e.Z).withConfig({displayName:"StyledReloadButton"})(Ce||(Ce=Q()(["\n height: 25px;\n width: 25px;\n"]))),at=$.ZP.td.withConfig({displayName:"StyledTableCell"})(De||(De=Q()(["\n && {\n padding: ",";\n background-color: ",";\n border-bottom: 1px solid ",";\n align-content: center;\n box-sizing: content-box;\n\n &,\n input {\n text-align: ",";\n }\n\n "," {\n display: inline-block;\n margin-right: ",";\n }\n }\n"])),nt,oe.FS.color("paper"),tt,(function(e){return e.alignment}),Je.q,te.Z.space(-2)),it=$.ZP.div.withConfig({displayName:"StyledDnD"})(Te||(Te=Q()(["\n padding: ",";\n width: 100%;\n opacity: ",";\n"])),nt,(function(e){return e.isDragged?.2:1})),ct=$.ZP.span.withConfig({displayName:"StyledResizeHandle"})(Me||(Me=Q()(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n background: ",";\n opacity: 0;\n width: 3px;\n cursor: col-resize;\n"])),(function(e){return e.theme.colors.backgroundItemSelected})),ut=$.ZP.th.withConfig({displayName:"StyledTableHeaderCell"})(Re||(Re=Q()(["\n && {\n position: sticky;\n top: 0;\n background-color: ",";\n text-align: ",";\n border-bottom: 2px solid ",";\n ",";\n user-select: none;\n cursor: ",";\n white-space: nowrap;\n display: flex;\n border-right: ",";\n padding: 1px; /* default th padding */\n z-index: 2; /* higher than StyledIndicatorsContainerWrapper */\n ",";\n ","\n ","\n ","\n }\n"])),oe.FS.color("paper"),(function(e){return e.alignment}),tt,(0,et.Z)({fontWeight:oe.FS.fontWeight("bold")}),(function(e){return e.isSortable?"pointer":"auto"}),(function(e){var t=e.isDraggedOver,n=e.theme;return t?"3px solid ".concat(n.colors.text):"none"}),(function(e){return"header-cell-navigation-column"===e.id&&"z-index: 1"}),(function(e){var t=e.isResizingThisCell,n=e.theme;return t&&"\n background-color: ".concat(n.colors.backgroundItemHover,";\n\n > ").concat(ct," {\n opacity: 1;\n }\n ")}),(function(e){var t=e.isResizingAnyCell,n=e.theme;return!t&&"\n &:hover {\n background-color: ".concat(n.colors.backgroundItemHover,";\n\n > ").concat(ct," {\n opacity: 1;\n }\n }\n ")}),(function(e){var t=e.isResizingThisCell,n=e.isSortable,r=e.fixedPosition,o=e.theme;return n?!t&&!n&&!r&&"\n &:hover {\n background-color: transparent;\n }\n ":"\n &:hover {\n background-color: ".concat(o.colors.paper,";\n }\n ")})),st=(0,$.iv)(Ie||(Ie=Q()(["\n display: contents;\n ","\n\n &.selected {\n > "," {\n background-color: ",";\n }\n }\n\n &.selectableRow:not(.selected):hover {\n > "," {\n background-color: ",";\n }\n }\n"])),(function(e){return e.clickable&&"cursor: pointer;"}),at,(function(e){return e.theme.colors.backgroundItemSelected}),at,(function(e){return e.theme.colors.backgroundItemHover})),lt=$.ZP.span.withConfig({displayName:"StyledSortingSpan"})(Ne||(Ne=Q()(["\n height: 100%;\n margin-right: 2px;\n"]))),ft=$.ZP.span.withConfig({displayName:"StyledSortingRank"})(Ae||(Ae=Q()(["\n position: relative;\n top: -0.5rem;\n font-weight: ",";\n"])),oe.FS.fontWeight("regular")),pt=$.ZP.td.withConfig({displayName:"StyledFullRowProgress"})(Ze||(Ze=Q()(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n }\n"])),nt),dt=$.ZP.td.withConfig({displayName:"StyledFullRow"})(Le||(Le=Q()(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n ",";\n }\n"])),nt,(0,et.Z)()),ht=$.ZP.thead.withConfig({displayName:"StyledTableHead"})(Fe||(Fe=Q()(["\n ","\n"])),st),mt=$.ZP.tr.withConfig({displayName:"StyledTableRow"})(He||(He=Q()(["\n ","\n\n &:nth-child(even) td {\n background-color: ",";\n }\n"])),st,(function(e){return e.theme.colors.backgroundTableEvenRow})),gt=$.ZP.tbody.withConfig({displayName:"StyledTableBody"})(Be||(Be=Q()(["\n ","\n"])),st),vt=$.ZP.table.withConfig({displayName:"StyledTable"})(Ue||(Ue=Q()(["\n overflow: auto;\n display: grid;\n border-collapse: collapse;\n grid-template-columns: ",";\n grid-auto-rows: min-content;\n min-width: 100%;\n ","\n"])),(function(e){return e.columns.map((function(e){return e.width?e.width+"px":e.shrinkToContent?"max-content":"minmax(100px, auto)"})).join(" ")}),(function(e){return e.scrollBehaviour===he.P.INLINE&&(0,$.iv)(We||(We=Q()(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n "])))})),yt=$.ZP.div.withConfig({displayName:"StretchingTableContainer"})(ze||(ze=Q()(["\n grid-row-start: table-start;\n position: relative;\n overflow-x: auto;\n"]))),bt=$.ZP.div.withConfig({displayName:"StyledTableWrapper"})(Ye||(Ye=Q()(["\n display: grid;\n background-color: ",";\n grid-template-rows: [table-start] 1fr [pagination-start] auto auto;\n grid-template-columns: 100%;\n height: 100%;\n\n // reset external styles in old client\n input[type='checkbox'],\n input[type='radio'] {\n margin: 3px 3px 3px 4px !important;\n min-width: 12px;\n }\n"])),oe.FS.color("paper")),wt=$.ZP.div.withConfig({displayName:"StyledDraggable"})(Ve||(Ve=Q()(["\n width: 100%;\n height: 100%;\n display: flex;\n"]))),Ot=$.ZP.span.withConfig({displayName:"StyledHeaderContentWrapper"})(qe||(qe=Q()(["\n display: flex;\n"]))),xt=$.ZP.div.withConfig({displayName:"StyledHeaderContent"})(Ge||(Ge=Q()(["\n width: 100%;\n"]))),kt=i(93235),St=y().oneOfType([y().string,y().number]),Pt=y().shape({__key:St}),jt=(y().arrayOf(Pt),y().shape({id:y().string.isRequired,label:y().string,sorting:y().shape({sortable:y().bool,sortRank:y().number,order:y().oneOf(["asc","desc"])}),resizable:y().bool,width:y().number,HeaderRenderer:y().elementType,CellRenderer:y().elementType,rightAligned:y().bool})),_t=L().memo((function(e){var t=e.column,n=e.rowData,r=e.rowIdx;return(0,G.jsx)(at,{"data-cy":"list-cell",alignment:t.alignment,children:t.CellRenderer?(0,G.jsx)(t.CellRenderer,{rowData:n,column:t,rowIdx:r}):(0,G.jsx)(q.ZP.Span,{children:n[t.id]})})}));_t.propTypes={rowData:Pt.isRequired,column:jt.isRequired,rowIdx:y().number};var Et=function(e,t){return!e.column.dynamic||0===Object.keys(de.Z.difference(e,t)).length};const Ct=L().memo(_t,Et);var Dt,Tt,Mt,Rt,It=function(){return Dt||(Dt=(0,G.jsx)(mt,{children:(0,G.jsxs)(pt,{children:[(0,G.jsx)(kt.Z,{size:"20"}),(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.component.table.dataLoading"})})]})}))},Nt=function(){return Tt||(Tt=(0,G.jsx)(mt,{children:(0,G.jsx)(dt,{children:(0,G.jsx)(q.ZP.Span,{children:(0,G.jsx)(Y.Z,{id:"client.component.table.noData"})})})}))};const At=function(e){var t=e.data,n=e.columns,r=e.isSelected,o=e.selectionChange,a=e.dataLoadingInProgress,i=e.onRowClick,c=e.clickable;return a?Mt||(Mt=(0,G.jsx)(gt,{children:(0,G.jsx)(It,{})})):(0,G.jsx)(gt,{children:t.length>0?t.map((function(e,t){return(0,G.jsx)(mt,{className:"selectableRow ".concat(r(e.__key)&&"selected"),onClick:(a=e,function(e){e.shiftKey?o(a.__key,!0,!0):e.metaKey||e.ctrlKey?o(a.__key):c&&i&&i(a.__key)}),clickable:c,"data-cy":"list-row",children:n.map((function(n){return(0,G.jsx)(Ct,{selected:r(e.__key),rowData:e,column:n,rowIdx:t},"table-static-cell-".concat(e.__key,"-").concat(n.id))}))},"list-row-".concat(e.__key));var a})):Rt||(Rt=(0,G.jsx)(Nt,{}))})};var Zt,Lt=i(58129);const Ft=$.ZP.div.withConfig({displayName:"StyledButtonGroup"})(Zt||(Zt=Q()(["\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"])),Lt.Z);var Ht=L().forwardRef((function(e,t){return(0,G.jsx)(Ft,{ref:t,children:e.children})}));Ht.propTypes={children:y().node};const Bt=Ht;var Ut,Wt,zt=$.ZP.div.withConfig({displayName:"StyledPagination"})(Ut||(Ut=Q()(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-wrap: wrap;\n gap: ",";\n margin-left: ",";\n"])),te.Z.space(-1),te.Z.space(-1.4)),Yt=(0,$.ZP)(ee.Z).withConfig({displayName:"StyledPaginationButton"})(Wt||(Wt=Q()(["\n padding: "," ",";\n"])),te.Z.space(-2),te.Z.space(-.5));const Vt=(0,x.ZP)((function(e){var t=e.totalCount,n=e.recordsPerPage,r=e.currentPage,o=e.onPageChange,a=e.intl,i=e.tableEl,c=e.children,u=Math.ceil(t/n),s=Math.min((r-1)*n+1,t),l=Math.min(r*n,t),f=function(e){return a.formatMessage({id:e})},p=function(e){o(e),i.current.scrollTop=0};return(0,G.jsxs)(zt,{children:[(0,G.jsxs)(Bt,{children:[(0,G.jsx)(Yt,{disabled:1===r,label:f("client.component.pagination.firstPageTitle"),iconOnly:!0,icon:"chevron-double-left",onClick:function(){return p(1)}}),(0,G.jsx)(Yt,{disabled:1===r,label:f("client.component.pagination.prePageTitle"),iconOnly:!0,icon:"chevron-left",onClick:function(){return p(r-1)}}),(0,G.jsx)(Yt,{disabled:r>=u,label:f("client.component.pagination.nextPageTitle"),iconOnly:!0,icon:"chevron-right",onClick:function(){return p(r+1)}}),(0,G.jsx)(Yt,{disabled:r>=u,label:f("client.component.pagination.lastPageTitle"),iconOnly:!0,icon:"chevron-double-right",onClick:function(){return p(u)}})]}),t>0&&(0,G.jsx)(q.ZP.Span,{children:(0,G.jsx)(Y.Z,{id:"client.component.pagination.text",values:{start:s,to:l,total:t}})}),c]})}));const qt=(0,x.ZP)((function(e){var t,n=e.onPageChange,r=e.onPageRefresh,o=e.paginationInfo,a=e.intl,i=e.tableEl,c=Boolean(o),u="function"==typeof r;return c||u?(0,G.jsx)(rt,{children:c&&(0,G.jsx)(Vt,{onPageChange:n,currentPage:o.currentPage,totalCount:o.totalCount,recordsPerPage:o.recordsPerPage,tableEl:i,children:u&&(0,G.jsx)(ot,{type:"button",title:(t="client.component.table.refreshTitle",a.formatMessage({id:t})),icon:"sync",onClick:r})})}):null}));var Gt=i(18446),Kt=i.n(Gt);function Xt(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 Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $t={currentlyDragging:null,currentlyDragOver:null,dropPosition:null,offset:null},Jt={Top:"Top",Bottom:"Bottom"};const en=function(e){var t=(0,Z.useState)($t),n=U()(t,2),r=n[0],o=n[1],a=r.currentlyDragging,i=r.currentlyDragOver,c=r.dropPosition,u=r.offset;return{dndEvents:(0,Z.useCallback)((function(t){return{onDragStart:function(e){o((function(e){return Qt(Qt({},e),{},{currentlyDragging:t})}));var n=e.target;n&&n.addEventListener("dragend",(function e(t){o($t),t.stopPropagation(),n&&n.removeEventListener("dragend",e)}),!1),e.stopPropagation()},onDragEnter:function(e){if(a&&!Kt()(i,t)){var n=e.target?e.target.getBoundingClientRect():{},r=n.y+n.height/2;o((function(e){return Qt(Qt({},e),{},{currentlyDragOver:t,offset:r})}))}e.stopPropagation()},onDragOver:function(e){if(a){var t=e.clientY-u>0?Jt.Bottom:Jt.Top;return o((function(e){return Qt(Qt({},e),{},{dropPosition:t})})),e.preventDefault(),e.stopPropagation(),!0}},onDrop:function(t){a&&i&&(e(a,i,c),o($t),t.stopPropagation())}}}),[i,a,c,u,e]),dndState:(0,Z.useMemo)((function(){return{currentlyDragOver:i,currentlyDragging:a,dropPosition:c,offset:u}}),[i,a,c,u])}};const tn=function(e,t,n){var r=t-e;return Math.max(50,n+r)},nn=function(e,t,n){var r=(0,Z.useState)(null),o=U()(r,2),a=o[0],i=o[1],c=(0,Z.useRef)(null),u=(0,Z.useRef)(),s=(0,Z.useState)(!1),l=U()(s,2),f=l[0],p=l[1],d=(0,Z.useState)(!1),h=U()(d,2),m=h[0],g=h[1],v=(0,Z.useMemo)((function(){return{resizingElement:a,isResizing:f}}),[a,f]),y=(0,Z.useCallback)((function(){a&&(n(a),g(!1),setTimeout((function(){p(!1),i(null),c.current=void 0}),0))}),[a,n]),b={onMouseMove:(0,Z.useCallback)((function(n){a&&m&&(u.current=requestAnimationFrame((function(){if(c.current){var r=e(a),o=tn(c.current.y,n.clientY,r.clientHeight),i=tn(c.current.x,n.clientX,r.clientWidth);t(a,{height:o,width:i})}c.current={y:n.clientY,x:n.clientX}})))}),[a,t,m,e]),onMouseUp:y};return(0,Z.useEffect)((function(){return m||cancelAnimationFrame(u.current),function(){cancelAnimationFrame(u.current)}}),[m]),{resizeState:v,startResize:function(e){return function(t){i(e),p(!0),g(!0),c.current=void 0,t.stopPropagation(),t.preventDefault()}},resizingEvents:b}};const rn=function(e){var t=e.column,n=e.startResize;return(0,G.jsx)(ct,{"data-cy":"header-cell-".concat(t.id,"-resizing-controller"),onMouseDown:n(t)})};const on=(0,x.ZP)((function(e){var t,n,r,o=e.column,a=e.intl,i=o.sorting&&o.sorting.sortRank&&o.sorting.order,c=(null===(t=o.sorting)||void 0===t?void 0:t.sortRank)>1&&(0,G.jsx)(ft,{children:o.sorting.sortRank}),u="sort-".concat("asc"===(null===(n=o.sorting)||void 0===n?void 0:n.order)?"up":"down");return i?(0,G.jsxs)(lt,{title:(r="client.component.table.sortingTitle",a.formatMessage({id:r})),children:[(0,G.jsx)(V.Z,{icon:u}),c]}):null}));function an(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 cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var un=function(e){var t=e.column,n=e.data;return t.HeaderRenderer?(0,G.jsx)(t.HeaderRenderer,{column:t,data:n}):(0,G.jsxs)(Ot,{children:[(0,G.jsx)(xt,{title:t.label,dangerouslySetInnerHTML:{__html:t.label}}),(0,G.jsx)(on,{column:t})]})};const sn=function(e){var t=e.columns,n=e.data,r=e.onColumnPositionChange,o=e.onSortingChange,a=e.tableEl,i=e.onColumnWidthChanging,c=e.onColumnWidthChanged,u=en(r),s=u.dndEvents,l=u.dndState,f=(0,Z.useCallback)((function(e){return a.current.querySelector("th[id='header-cell-".concat(e.id,"']"))}),[]),p=(0,Z.useCallback)((function(e,t){var n=t.width;return i(e.id,n)}),[i]),d=(0,Z.useCallback)((function(e){return c(e.id)}),[c]),h=nn(f,p,d),m=h.startResize,g=h.resizingEvents,v=h.resizeState,y=v.isResizing,b=v.resizingElement,w=function(e){return function(t){var n;!y&&null!==(n=e.sorting)&&void 0!==n&&n.sortable&&o(e.id,t.shiftKey)}},O=t.map((function(e){var t="header-cell-".concat(e.id),r="header-cell-drop-".concat(e.id),o=e.sorting&&e.sorting.sortable,a=y&&e.id===(null==b?void 0:b.id),i=l.currentlyDragOver===e.id&&l.currentlyDragging!==e.id,c=l.currentlyDragging===e.id;return(0,G.jsxs)(ut,{"data-cy":t,id:t,onClick:w(e),isResizingAnyCell:y,isResizingThisCell:a,isSortable:o,isDraggedOver:i,alignment:e.alignment,children:[(0,G.jsx)(wt,cn(cn({id:r},!e.fixedPosition&&cn({draggable:!0},s(e.id))),{},{children:(0,G.jsx)(it,{isDragged:c,children:(0,G.jsx)(un,{column:e,data:n})})}),r),e.resizable&&(0,G.jsx)(rn,{column:e,startResize:m})]},t)}));return(0,G.jsx)(ht,cn(cn({},g),{},{children:(0,G.jsx)(mt,{children:O})}))};function ln(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 fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pn=function(e){var t=e.columns,n=e.selection,r=e.data,o=e.onSelectionChange,a=e.selectionStyle,i=e.paginationInfo,c=e.onColumnPositionChange,u=e.onSortingChange,s=e.dataLoadingInProgress,l=e.onRowClick,f=e.clickable,p=e.onPageChange,d=e.onPageRefresh,h=e.scrollBehaviour,m=void 0===h?he.P.INLINE:h,g=e.onColumnWidthChange,v=e.selectionFilterFn,y=(0,Z.useState)(t),b=U()(y,2),w=b[0],O=b[1],x=(0,Z.useRef)(null),k=(0,Z.useCallback)((function(e){var t,n=null===(t=w.find((function(t){return t.id===e})))||void 0===t?void 0:t.width;g&&g(e,n)}),[w,g]),S=(0,Z.useCallback)((function(e,t){O(H()(w.map((function(n){return n.id===e?fn(fn({},n),{},{width:t}):n}))))}),[w]),P=(0,Z.useMemo)((function(){return r?r.map((function(e){return e.__key})):[]}),[r]),j=_e(n,P,o),_=j.isSelected,E=j.selectionChange;return(0,Z.useEffect)((function(){var e=function(e,t,n,r,o){return e&&e!==Oe.NONE?e===Oe.MULTI?je(n,r,o):Pe(n,r,o):null}(a,0,_,E,v);O([].concat(H()(e?[e]:[]),H()(t)))}),[t,n,_,E,v,a]),(0,G.jsxs)(bt,{children:[(0,G.jsx)(yt,{children:(0,G.jsxs)(vt,{ref:x,columns:w,scrollBehaviour:m,children:[(0,G.jsx)(sn,{columns:w,data:r,onColumnWidthChanging:S,onColumnWidthChanged:k,onColumnPositionChange:c,tableEl:x,onSortingChange:u}),(0,G.jsx)(At,{columns:w,data:r,isSelected:_,selectionChange:E,dataLoadingInProgress:s,onRowClick:l,clickable:f})]})}),(0,G.jsx)(qt,{onPageChange:p,onPageRefresh:d,paginationInfo:i,tableEl:x})]})},dn=function(e,t){return 0===Object.keys(de.Z.difference(e,t)).length};const hn=L().memo(pn,dn);function mn(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 gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vn=function(e){return Object.keys(e.entities[0].paths)},yn=function(e){return H()(new Set(e.relations.map((function(e){return e.relationName}))))},bn=function(e){var t=Object.entries(e.entities[0].paths).filter((function(e){var t=U()(e,2);t[0];return"counter"===t[1].type})).map((function(e){var t=U()(e,2),n=t[0];t[1];return n})),n=function(e){return[].concat(H()(vn(e)),H()(yn(e)))}(e).filter((function(e){return!t.includes(e)})),r=function(t){return t.map((function(t){return{name:t,label:e.labels[t]}})).sort((function(e,t){return e.label<t.label?-1:1})).map((function(e){return e.name}))};return[].concat(H()(r(t)),H()(r(n)))},wn=function(e,t,n){var r="PK: ".concat(n),o=e.displays.find((function(e){return e.model===t}));if(void 0===o)return r;var a=o.values.find((function(e){return e.key===n}));return a?a.display:r},On=i(50008),xn=i.n(On),kn=(i(2525),i(57557)),Sn=i.n(kn);i(54061);var Pn="--",jn=function(e){return e?e.replace(/\./g,Pn).replace(/\[/g,"=-=").replace(/\]/g,"=_="):e};function _n(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 En(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_n(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Cn={hasValue:function(e){var t=e.formValues,n=e.formField.locationMapping;return!!t[jn(n.street)]},getValue:function(e){var t=e.formField,n=e.formData,r=t.locationMapping;return{street:n.formValues[jn(r.street)]}},getEvents:function(e){var t=e.formField,n=e.formName,r=e.formData,o=e.events,a=t.locationMapping||{};return En(En({},o),{},{onChange:function(e){for(var o in a)if(a[o]&&void 0!==e[o]){var i=null!==e[o]?e[o]:"";r.changeFieldValue(n,a[o],i)}var c=e.street;if(r.changeFieldValue(n,t.id,En({},void 0!==c?{street:c||""}:{})),t.postcodeCityField){var u=e.postcode,s=e.city;r.changeFieldValue(n,t.postcodeCityField,En(En({},void 0!==u?{postcode:u||""}:{}),void 0!==s?{city:s||""}:{}))}},onBlur:function(){r.touchField(n,t.id)}})},dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:t.locationMapping?Object.values(t.locationMapping).map((function(e){return jn(e)})):{}}}},getOptions:function(e){var t=e.formField,n=e.formData;return{fetchSuggestions:function(e,r){return n.loadLocationsSuggestions(t.id,e,r,Xe()(t,"countries"))},validateLocation:function(e,r){return n.validateLocation(t.id,e,Xe()(t,"countries"),r)},isLoading:Xe()(n,["locations",t.id,"isLoading"],!1),suggestions:Xe()(n,["locations",t.id,"suggestions"],null),mapButtonTitle:n.intl.formatMessage({id:"client.component.location.mapButtonTitle"}),locationValues:Object.keys(t.locationMapping||{}).reduce((function(e,r){return En(En({},e),{},g()({},r,n.formValues[jn(t.locationMapping[r])]))}),{})}},getMandatoryValidation:function(e){var t,n=e.formField,r=n.locationMapping,o=null===(t=n.siblings.find((function(e){return e.id===r.street})))||void 0===t?void 0:t.validation;return null==o?void 0:o.mandatory}},Dn={fixLabel:function(){return!0}},Tn={getOptions:function(e){var t=e.formData;return{trueLabel:t.intl.formatMessage({id:"client.common.yes"}),falseLabel:t.intl.formatMessage({id:"client.common.no"})}},hasValue:function(e){var t=e.value;return!0===t||!1===t}};var Mn=function(e,t){return{entityModel:e.model,key:e.key,field:t}},Rn=function(e,t){if(e.implicitModelField&&t.formValues){var n=e.implicitModelField,r=n.indexOf(".");return r?function(e,t,n){var r=e.substring(0,t),o=e.substring(t+1),a=n.formValues[r];if(a){if(!Array.isArray(a))return Mn(a,o);if(1===a.length)return Mn(a[0],o)}return null}(n,r,t):t.formValues[n]}return e.implicitModel},In=function(e){if(e.implicitModelField){var t=e.implicitModelField,n=t.indexOf(".");return n?[t.substring(0,n)]:[t]}return[]};const Nn={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField,n=e.formData;return{mode:t.mode,implicitModel:Rn(t,n)}},dataContainerProps:function(e){var t=e.formField;return{formValues:{formName:e.formName,fields:In(t)}}}};var An=function(e){if(!e||isNaN(e))return null;var t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return[t,(n>9?"":"0")+n,(r>9?"":"0")+r].join("-")};const Zn={getOptions:function(){return{datePickerOptions:{dateToValue:An}}}},Ln={getOptions:function(e){var t=e.entityField;if("long"===(null==t?void 0:t.type))return{datePickerOptions:{valueToDate:function(e){var t=e?new Date(e):null;return isNaN(t)?null:t},dateToValue:function(e){return e?e.getTime():null}}}}},Fn={getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null),prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}};function Hn(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 Bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Un={getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return Bn(Bn({upload:function(e){r.uploadDocument(n,t.id,e)}},r.chooseDocument?{choose:function(){return r.chooseDocument(r.setDocument,n,t.id)}}:{}),{},{uploadText:r.intl.formatMessage({id:"client.component.upload.upload"}),uploadingText:r.intl.formatMessage({id:"client.component.upload.uploading"}),downloadText:r.intl.formatMessage({id:"client.component.upload.downloadTitle"}),deleteText:r.intl.formatMessage({id:"client.component.upload.deleteTitle"})})},fixLabel:function(){return!0}};var Wn=function(e){return!e.validation||!e.validation.numberRange||"number"!=typeof e.validation.numberRange.fromIncluding||e.validation.numberRange.fromIncluding<0};const zn={getOptions:function(e){var t=e.formField,n=e.formData;return{hoursLabel:n.intl.formatMessage({id:"client.component.duration.hoursLabel"}),minutesLabel:n.intl.formatMessage({id:"client.component.duration.minutesLabel"}),secondsLabel:n.intl.formatMessage({id:"client.component.duration.secondsLabel"}),allowNegative:Wn(t)}}};function Yn(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 Vn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const qn={dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:[t.id]}}},getValue:function(e){var t=e.formField,n=e.formData.formValues[t.id];return Vn(Vn({},n),null!=n&&n.distance?{}:{distance:10})},getOptions:function(e){var t=e.formField,n=e.formData;return{latitudeField:t.latitudeField,longitudeField:t.longitudeField,noResultsText:n.intl.formatMessage({id:"client.component.geosearch.noResultsText"}),emptySearchText:n.intl.formatMessage({id:"client.component.geosearch.emptySearchText"}),kmSuffixText:n.intl.formatMessage({id:"client.component.geosearch.km"}),suggestions:Xe()(n,["locations",t.id,"suggestions"],[]),isLoading:Xe()(n,["locations",t.id,"isLoading"],!1),fetchSuggestions:function(e,r){e?n.loadLocationsSuggestions(t.id,e,r,Xe()(t,"countries")):n.setLocationSuggestions(t.id,[])}}}};var Gn=function(e){if(!["email_editor","correspondence_editor"].includes(e))return{removeButtons:["Font","FontSize","TextColor"]}};const Kn={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField;return{ckEditorConfig:Gn(t.htmlconfig)}}},Xn={getOptions:function(e){var t=e.formField;return{minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null)}}};function Qn(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 $n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Jn={hasValue:function(e){var t=e.formValues,n=e.formField.locationMapping;return!(!t[jn(n.city)]&&!t[jn(n.postcode)])},getValue:function(e){var t=e.formField,n=e.formData,r=t.locationMapping;return{postcode:n.formValues[jn(r.postcode)],city:n.formValues[jn(r.city)]}},getEvents:function(e){var t=e.formField,n=e.formName,r=e.formData,o=e.events,a=t.locationMapping||{};return $n($n({},o),{},{onChange:function(e){for(var o in a)if(a[o]&&void 0!==e[o]&&"street"!==o){var i=null!==e[o]?e[o]:"";r.changeFieldValue(n,a[o],i)}var c=e.postcode,u=e.city;r.changeFieldValue(n,t.id,$n($n({},void 0!==c?{postcode:c||""}:{}),void 0!==u?{city:u||""}:{}))},onBlur:function(){r.touchField(n,t.id)}})},dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:t.locationMapping?Object.values(t.locationMapping).map((function(e){return jn(e)})):{}}}},getOptions:function(e){var t=e.formField,n=e.formData;return{fetchSuggestions:function(e,r){return n.loadLocationsSuggestions(t.id,e,r,Xe()(t,"countries"))},isLoading:Xe()(n,["locations",t.id,"isLoading"],!1),suggestions:Xe()(n,["locations",t.id,"suggestions"],null),mapButtonTitle:n.intl.formatMessage({id:"client.component.location.mapButtonTitle"}),locationValues:Object.keys(t.locationMapping||{}).reduce((function(e,r){return $n($n({},e),{},g()({},r,n.formValues[jn(t.locationMapping[r])]))}),{})}},getMandatoryValidation:function(e){var t,n,r=e.formField,o=r.locationMapping,a=null===(t=r.siblings.find((function(e){return e.id===o.city})))||void 0===t?void 0:t.validation,i=null===(n=r.siblings.find((function(e){return e.id===o.postcode})))||void 0===n?void 0:n.validation;return(null==a?void 0:a.mandatory)||(null==i?void 0:i.mandatory)}},er={getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",2),prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!0,fixedDecimalScale:!0}}},tr={getOptions:function(e){var t=e.formField;return{prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}},nr={getOptions:function(e){var t=e.formField;return{prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!1,suffix:"%"}}},rr={getOptions:function(e){var t=e.formField;return{customPhoneRegex:Xe()(t,"validation.phone.customRegex",null),defaultCountry:Xe()(t,"validation.phone.defaultRegion",null)}}};var or=i(6479),ar=i.n(or),ir=["entityKey","children"];function cr(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 ur(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cr(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sr=50,lr=10,fr=function(e){return e.filter(Boolean).join(" and ")},pr=function(e){return e&&Array.isArray(e)&&0!==e.length?"not KEYS(".concat(e.map((function(e){return e.key})).join(", "),")"):void 0};const dr={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return{options:Xe()(r,["relationEntities",t.id,"data"],[]),moreOptionsAvailable:Xe()(r,["relationEntities",t.id,"moreEntitiesAvailable"],!1),isLoading:Xe()(r,["relationEntities",t.id,"isLoading"],!1),fetchOptions:function(e){r.loadRelationEntities(t.id,t.targetEntity,{forceReload:!0,limit:lr,formBase:t.formBase,formName:t.formName,where:fr([t.condition,pr(e)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},searchOptions:function(e,n){r.loadRelationEntities(t.id,t.targetEntity,{searchTerm:e,limit:sr,forceReload:!0,formBase:t.formBase,formName:t.formName,where:fr([t.condition,pr(n)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},openDocsTreeSearch:t.displayDocsTree?function(e){return r.openDocsTreeSearch(n,t,e)}:void 0,openAdvancedSearch:!1===t.displayAdvancedSearch?void 0:function(e,o){return r.openAdvancedSearch(n,t,e,o)},tooltips:Xe()(r.tooltips,t.targetEntity,null),loadTooltip:function(e){return r.loadTooltip(t.targetEntity,e)},noResultsText:r.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),moreOptionsAvailableText:r.intl.formatMessage({id:"client.component.remoteselect.moreOptionsAvailableText"}),DetailLink:r.navigationStrategy&&r.navigationStrategy.DetailLink?function(e){var n=e.entityKey,o=e.children,a=ar()(e,ir);return(0,G.jsx)(r.navigationStrategy.DetailLink,ur(ur({entityName:t.targetEntity,entityKey:n},a),{},{children:o}))}:null,createPermission:t.relationName&&Xe()(r,["entityModel","paths",t.relationName,"createPermission"],!1)&&Xe()(r,["entityModel","paths",t.relationName,"useRemoteFieldNewButton"],!0)&&Xe()(t,"displayCreateButton",!0),openRemoteCreate:function(e){return r.openRemoteCreate(t,n,e)}}}},hr={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity]}},getOptions:function(e){var t=e.formField,n=e.formData;return{options:Xe()(n,["relationEntities",t.id,"data"],[]),isLoading:Xe()(n,["relationEntities",t.id,"isLoading"],!1),tooltips:Xe()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},noResultsText:n.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),fetchOptions:function(){return n.loadRelationEntities(t.id,t.targetEntity,{forceReload:!1,constriction:t.constriction,where:t.condition})}}}};function mr(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 gr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vr={address:Cn,binary:Un,boolean:Dn,choice:{hasValue:function(e){return e.value.options.filter((function(e){return e.checked})).length>0},getOptions:function(e){var t=e.formField;return{selectionType:t.selectionType,renderHtmlInOptions:t.renderHtmlInOptions}}},code:Nn,counter:tr,"data-amount":tr,datetime:Ln,date:Zn,birthdate:Zn,"pulldown-date":Zn,decimal:Fn,document:Un,double:Fn,duration:zn,geosearch:qn,html:Kn,image:Un,integer:Xn,location:Jn,long:Xn,moneyamount:er,marking:Dn,"multi-remote-field":dr,"multi-select-box":hr,"named-upload":Un,number:tr,phone:rr,"pseudo-select":{hasValue:function(e){return e.value.options.filter((function(e){return e.selected})).length>0},getOptions:function(e){return{isMulti:e.formField.isMulti}}},"search-filter":{dataContainerProps:function(e){return{searchFilters:[e.formField.model]}},getOptions:function(e){var t=e.formField,n=e.formData;return{isMulti:t.multiple,options:Xe()(n.searchFilters,t.model,null),fetchOptions:function(){return n.loadSearchFilters(t.model,t.group)},noResultsText:n.intl.formatMessage({id:"client.component.searchfilter.noResultsText"})}}},"single-remote-field":dr,"single-select-box":hr,sorting:tr,percent:nr},yr=gr({},vr);const br={editable:vr,readOnly:gr({},vr),list:yr,search:gr(gr({},vr),{},{boolean:Tn,marking:Tn})};var wr=i(44759),Or=i(41609),xr=i.n(Or),kr=i(58808),Sr=i.n(kr),Pr=i(41505),jr=i.n(Pr),_r=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Er=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},Cr=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},Dr={outline:"none"},Tr=function(e){function t(){var n,r;_r(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=Cr(this,e.call.apply(e,[this].concat(a))),r.state={focused:!1},r._isMounted=!1,r._lastBlurEvent=null,r.ref=L().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)},Cr(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?L().cloneElement(e({focused:t,getRef:this.ref}),n):L().createElement("div",Er({ref:this.ref,style:Dr},n),e)},t}(L().Component);Tr.propTypes={children:jr().oneOfType([jr().node,jr().func]).isRequired,onBlur:jr().func,onFocus:jr().func},Tr.defaultProps={onBlur:function(){},onFocus:function(){}};const Mr=Tr;var Rr,Ir,Nr,Ar,Zr,Lr,Fr,Hr,Br,Ur=i(41291),Wr=(0,$.iv)(Rr||(Rr=Q()(["\n align-items: center;\n cursor: ",";\n display: flex;\n"])),(function(e){return e.immutable?"not-allowed":"default"})),zr=$.ZP.label.withConfig({displayName:"StyledEditableWrapper"})(Ir||(Ir=Q()(["\n &&& {\n margin: 0; /* reset Bootstrap and Ext JS */\n padding: 0; /* reset Ext JS */\n ","\n }\n"])),Wr),Yr=(0,$.iv)(Nr||(Nr=Q()(["\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,et.Z)({color:oe.FS.color("text")})}),oe.FS.color("text"),(function(e){return e.immutable&&"margin: unset;"}),(function(e){return e.immutable?"none":"auto"})),Vr=(0,$.iv)(Ar||(Ar=Q()(["\n display: flex;\n align-items: center;\n"]))),qr=$.ZP.div.withConfig({displayName:"StyledEditableControl"})(Zr||(Zr=Q()(["\n &&& {\n ","\n }\n"])),Vr),Gr=$.ZP.span.withConfig({displayName:"StyledEditableValue"})(Lr||(Lr=Q()(["\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"])),oe.FS.color("signal.danger")),Kr=$.ZP.div.withConfig({displayName:"StyledLocationEdit"})(Fr||(Fr=Q()(["\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"])),Wr,te.Z.space(-2),te.Z.space(-2),(function(e){var t=e.immutable,n=e.theme;return t?Xe()(n,"colors.textDisabled"):Xe()(n,"colors.text")}),Yr,oe.FS.color("paper"),oe.FS.color("signal.info"),oe.FS.color("secondaryLight"),oe.FS.color("backgroundItemHover")),Xr=(0,$.ZP)(Kr).withConfig({displayName:"StyledAddressEdit"})(Hr||(Hr=Q()(["\n && {\n div {\n :nth-of-type(1) {\n flex: auto;\n width: 100%;\n }\n }\n }\n"])));function Qr(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 $r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qr(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Jr=function(e){var t=e.onChange,n=e.options,r=e.value,o=e.id,a=e.immutable,i=e.name,c=function(e){var t=e.street,n=e.houseNr;return n?"".concat(t," ").concat(n):t},u=function(e){var t=e.street,n=e.state,r=e.country,o=e.postcode,a=e.city;if(!t)return null;var i=c(e),u=n?"- ".concat(n):"",s=r?"/ ".concat(r.display):"";return(0,G.jsxs)(q.ZP.Span,{children:[i,", ",o," ",a," ",u," ",s]})},s=function(e,r){var o=r.suggestion;!0===o.validationRequired?n.validateLocation(o,t):t(o)},l=function(e){var t=e.value,r=n.locationValues,o=r.postcode,a=r.city,i=r.country,c={street:t,postcode:o,city:a};n.fetchSuggestions(c,i)},f={id:o,value:r&&r.street?c(r):"",onChange:function(e){return function(n,o){var a=o.newValue;t($r($r({},r),{},g()({},e,a)))}}("street"),disabled:a};return(0,G.jsx)(Mr,{children:function(e){var t,r,o,c,p,d,h,m=e.getRef;return(0,G.jsxs)(Xr,{immutable:a,name:i,ref:m,children:[(0,G.jsx)(Sr(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:l,getSuggestionValue:(h="street",function(e){return e[h]}),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:f,onSuggestionSelected:s,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!a}}),(0,G.jsxs)(qr,{children:[n.isLoading&&(Br||(Br=(0,G.jsx)(kt.Z,{size:"1.8rem"}))),(o=n.locationValues,c=o.street,p=o.city,d=o.postcode,Boolean(c&&(p||d))&&(0,G.jsx)(Ur.Z,{href:(t=n.locationValues,r=t?Object.values(t).filter(Boolean).map((function(e){var t="object"===xn()(e)&&e.display?e.display:e;return encodeURIComponent(t)})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(r)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:n.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};var eo=i(14293),to=i.n(eo),no=i(23493),ro=i.n(no),oo=i(33417),ao=i(1972),io=i(32924),co=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var uo=i(2717);function so(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 lo(e,t){return(lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function fo(e){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var po=i(62360);function ho(e,t){if(t&&("object"===(0,po.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 mo(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=fo(e);if(t){var o=fo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ho(this,n)}}var go=i(31599);var vo=i(78001);function yo(e){return function(e){if(Array.isArray(e))return(0,go.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,vo.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 bo=i(29382),wo=i(1537),Oo=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xo(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||Oo(r)&&Oo(o)))return!1;var r,o;return!0}for(var ko={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"},So=function(e){return(0,wo.tZ)("span",(0,uo.Z)({css:ko},e))},Po={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,u=e.isSelected,s=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(s(i,n),".");if("menu"===t){var l=c?" disabled":"",f="".concat(u?"selected":"focused").concat(l);return"option ".concat(a," ").concat(f,", ").concat(s(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},jo=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,i=e.selectValue,c=e.selectProps,u=e.id,s=c.ariaLiveMessages,l=c.getOptionLabel,f=c.inputValue,p=c.isMulti,d=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,g=c.options,v=c.screenReaderStatus,y=c.tabSelectsValue,b=c["aria-label"],w=c["aria-live"],O=(0,Z.useMemo)((function(){return(0,oo.Z)((0,oo.Z)({},Po),s||{})}),[s]),x=(0,Z.useMemo)((function(){var e,n="";if(t&&O.onChange){var r=t.option,o=t.options,a=t.removedValue,c=t.removedValues,u=t.value,s=a||r||(e=u,Array.isArray(e)?null:e),f=s?l(s):"",p=o||c||void 0,h=p?p.map(l):[],m=(0,oo.Z)({isDisabled:s&&d(s,i),label:f,labels:h},t);n=O.onChange(m)}return n}),[t,O,d,i,l]),k=(0,Z.useMemo)((function(){var e="",t=n||r,a=!!(n&&i&&i.includes(n));if(t&&O.onFocus){var c={focused:t,label:l(t),isDisabled:d(t,i),isSelected:a,options:o,context:t===n?"menu":"value",selectValue:i};e=O.onFocus(c)}return e}),[n,r,l,d,O,o,i]),S=(0,Z.useMemo)((function(){var e="";if(m&&g.length&&O.onFilter){var t=v({count:o.length});e=O.onFilter({inputValue:f,resultsMessage:t})}return e}),[o,f,m,O,g,v]),P=(0,Z.useMemo)((function(){var e="";if(O.guidance){var t=r?"value":m?"menu":"input";e=O.guidance({"aria-label":b,context:t,isDisabled:n&&d(n,i),isMulti:p,isSearchable:h,tabSelectsValue:y})}return e}),[b,n,r,p,d,h,m,O,i,y]),j="".concat(k," ").concat(S," ").concat(P),_=(0,wo.tZ)(Z.Fragment,null,(0,wo.tZ)("span",{id:"aria-selection"},x),(0,wo.tZ)("span",{id:"aria-context"},j)),E="initial-input-focus"===(null==t?void 0:t.action);return(0,wo.tZ)(Z.Fragment,null,(0,wo.tZ)(So,{id:u},E&&_),(0,wo.tZ)(So,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},a&&!E&&_))},_o=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Eo=new RegExp("["+_o.map((function(e){return e.letters})).join("")+"]","g"),Co={},Do=0;Do<_o.length;Do++)for(var To=_o[Do],Mo=0;Mo<To.letters.length;Mo++)Co[To.letters[Mo]]=To.base;var Ro=function(e){return e.replace(Eo,(function(e){return Co[e]}))},Io=function(e,t){void 0===t&&(t=xo);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}(Ro),No=function(e){return e.replace(/^\s+|\s+$/g,"")},Ao=function(e){return"".concat(e.label," ").concat(e.value)},Zo=["innerRef"];function Lo(e){var t=e.innerRef,n=(0,io.Z)(e,Zo),r=(0,bo.r)(n,"onExited","in","enter","exit","appear");return(0,wo.tZ)("input",(0,uo.Z)({ref:t},r,{css:(0,wo.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 Fo=["boxSizing","height","overflow","paddingRight","position"],Ho={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Bo(e){e.preventDefault()}function Uo(e){e.stopPropagation()}function Wo(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function zo(){return"ontouchstart"in window||navigator.maxTouchPoints}var Yo=!("undefined"==typeof window||!window.document||!window.document.createElement),Vo=0,qo={capture:!1,passive:!1};var Go=function(){return document.activeElement&&document.activeElement.blur()},Ko={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Xo(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,Z.useRef)(!1),c=(0,Z.useRef)(!1),u=(0,Z.useRef)(0),s=(0,Z.useRef)(null),l=(0,Z.useCallback)((function(e,t){if(null!==s.current){var u=s.current,l=u.scrollTop,f=u.scrollHeight,p=u.clientHeight,d=s.current,h=t>0,m=f-p-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=f,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]),f=(0,Z.useCallback)((function(e){l(e,e.deltaY)}),[l]),p=(0,Z.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),d=(0,Z.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;l(e,t)}),[l]),h=(0,Z.useCallback)((function(e){if(e){var t=!!bo.s&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",d,t)}}),[d,p,f]),m=(0,Z.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",d,!1))}),[d,p,f]);return(0,Z.useEffect)((function(){if(t){var e=s.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){s.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,Z.useRef)({}),a=(0,Z.useRef)(null),i=(0,Z.useCallback)((function(e){if(Yo){var t=document.body,n=t&&t.style;if(r&&Fo.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&Vo<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,c=window.innerWidth-i+a||0;Object.keys(Ho).forEach((function(e){var t=Ho[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(c,"px"))}t&&zo()&&(t.addEventListener("touchmove",Bo,qo),e&&(e.addEventListener("touchstart",Wo,qo),e.addEventListener("touchmove",Uo,qo))),Vo+=1}}),[r]),c=(0,Z.useCallback)((function(e){if(Yo){var t=document.body,n=t&&t.style;Vo=Math.max(Vo-1,0),r&&Vo<1&&Fo.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&zo()&&(t.removeEventListener("touchmove",Bo,qo),e&&(e.removeEventListener("touchstart",Wo,qo),e.removeEventListener("touchmove",Uo,qo)))}}),[r]);return(0,Z.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,wo.tZ)(Z.Fragment,null,n&&(0,wo.tZ)("div",{onClick:Go,css:Ko}),t((function(e){o(e),a(e)})))}var Qo={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},$o=function(e){var t=e.name,n=e.onFocus;return(0,wo.tZ)("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Qo,value:"",onChange:function(){}})},Jo={clearIndicator:bo.a,container:bo.b,control:bo.d,dropdownIndicator:bo.e,group:bo.g,groupHeading:bo.f,indicatorsContainer:bo.i,indicatorSeparator:bo.h,input:bo.j,loadingIndicator:bo.l,loadingMessage:bo.k,menu:bo.m,menuList:bo.n,menuPortal:bo.o,multiValue:bo.p,multiValueLabel:bo.q,multiValueRemove:bo.t,noOptionsMessage:bo.u,option:bo.v,placeholder:bo.w,singleValue:bo.x,valueContainer:bo.y};var ea,ta={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}},na={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,bo.z)(),captureMenuScroll:!(0,bo.z)(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=(0,oo.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:Ao,trim:!0,matchFrom:"any"},ea),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,c=n.matchFrom,u=i?No(t):t,s=i?No(a(e)):a(e);return r&&(u=u.toLowerCase(),s=s.toLowerCase()),o&&(u=Io(u),s=Ro(s)),"start"===c?s.substr(0,u.length)===u:s.indexOf(u)>-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,bo.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 ra(e,t,n,r){return{type:"option",data:t,isDisabled:sa(e,t,n),isSelected:la(e,t,n),label:ca(e,t),value:ua(e,t),index:r}}function oa(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return ra(e,n,t,r)})).filter((function(t){return ia(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=ra(e,n,t,r);return ia(e,a)?a:void 0})).filter(bo.K)}function aa(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,yo(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ia(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,c=t.value;return(!pa(e)||!a)&&fa(e,{label:i,value:c,data:o},r)}var ca=function(e,t){return e.getOptionLabel(t)},ua=function(e,t){return e.getOptionValue(t)};function sa(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function la(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=ua(e,t);return n.some((function(t){return ua(e,t)===r}))}function fa(e,t,n){return!e.filterOption||e.filterOption(t,n)}var pa=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},da=1,ha=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&&lo(e,t)}(a,e);var t,n,r,o=mo(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),u=t.isOptionDisabled(e,i);if(c){var s=t.getOptionValue(e);t.setValue((0,bo.B)(i.filter((function(e){return t.getOptionValue(e)!==s}))),"deselect-option",e)}else{if(u)return void t.ariaOnChange((0,bo.C)(e),{action:"select-option",option:e,name:a});o?t.setValue((0,bo.B)([].concat(yo(i),[e])),"select-option",e):t.setValue((0,bo.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,bo.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,bo.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,bo.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 bo.E.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return ca(t.props,e)},t.getOptionValue=function(e){return ua(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=Jo[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,bo.F)(t.props)},t.buildCategorizedOptions=function(){return oa(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return aa(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:(0,oo.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,bo.G)(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 pa(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,u=n.isDisabled,s=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=t.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(u||"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||!s||!f||!h||p&&t.isOptionSelected(h,g))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(s){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":s?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:i}),t.onMenuClose()):c&&a&&t.clearValue();break;case" ":if(i)return;if(!s){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":s?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":s?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!s)return;t.focusOption("pageup");break;case"PageDown":if(!s)return;t.focusOption("pagedown");break;case"Home":if(!s)return;t.focusOption("first");break;case"End":if(!s)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++da),t.state.selectValue=(0,bo.H)(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,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,u=e.options,s=e.value,l=e.menuIsOpen,f=e.inputValue,p=e.isMulti,d=(0,bo.H)(s),h={};if(n&&(s!==n.value||u!==n.options||l!==n.menuIsOpen||f!==n.inputValue)){var m=l?function(e,t){return aa(oa(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;h={selectValue:d,focusedOption:function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m),focusedValue:g,clearFocusValueOnUpdate:!1}}var v=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=a,b=i&&c;return i&&!b&&(y={value:(0,bo.D)(p,d,d[0]||null),options:d,action:"initial-input-focus"},b=!c),"initial-input-focus"===(null==a?void 0:a.action)&&(y=null),(0,oo.Z)((0,oo.Z)((0,oo.Z)({},h),v),{},{prevProps:e,ariaSelection:y,prevWasFocused:b})}}],(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,bo.I)(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,bo.I)(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(ta):(0,oo.Z)((0,oo.Z)({},ta),this.props.theme):ta}},{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,u=c.isMulti,s=c.isRtl,l=c.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:u,isRtl:s,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 sa(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return la(this.props,e,t)}},{key:"filterOption",value:function(e,t){return fa(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,u=e.required,s=this.getComponents().Input,l=this.state,f=l.inputIsHidden,p=l.ariaSelection,d=this.commonProps,h=r||this.getElementId("input"),m=(0,oo.Z)((0,oo.Z)((0,oo.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":u,role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?Z.createElement(s,(0,uo.Z)({},d,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},m)):Z.createElement(Lo,(0,uo.Z)({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:bo.J,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,u=this.commonProps,s=this.props,l=s.controlShouldRenderValue,f=s.isDisabled,p=s.isMulti,d=s.inputValue,h=s.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!l)return d?null:Z.createElement(c,(0,uo.Z)({},u,{key:"placeholder",isDisabled:f,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(p)return g.map((function(t,i){var c=t===v,s="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return Z.createElement(n,(0,uo.Z)({},u,{components:{Container:r,Label:o,Remove:a},isFocused:c,isDisabled:f,key:s,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 Z.createElement(i,(0,uo.Z)({},u,{data:b,isDisabled:f}),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 Z.createElement(e,(0,uo.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?Z.createElement(e,(0,uo.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 Z.createElement(n,(0,uo.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 Z.createElement(e,(0,uo.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,u=t.NoOptionsMessage,s=t.Option,l=this.commonProps,f=this.state.focusedOption,p=this.props,d=p.captureMenuScroll,h=p.inputValue,m=p.isLoading,g=p.loadingMessage,v=p.minMenuHeight,y=p.maxMenuHeight,b=p.menuIsOpen,w=p.menuPlacement,O=p.menuPosition,x=p.menuPortalTarget,k=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,P=p.noOptionsMessage,j=p.onMenuScrollToTop,_=p.onMenuScrollToBottom;if(!b)return null;var E,C=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,c=t.label,u=t.value,p=f===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 Z.createElement(s,(0,uo.Z)({},l,{innerProps:g,data:o,isDisabled:a,isSelected:i,key:m,label:c,type:r,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())E=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),u="".concat(c,"-heading");return Z.createElement(n,(0,uo.Z)({},l,{key:c,data:o,options:a,Heading:r,headingProps:{id:u,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;E=Z.createElement(c,l,D)}else{var T=P({inputValue:h});if(null===T)return null;E=Z.createElement(u,l,T)}var M={minMenuHeight:v,maxMenuHeight:y,menuPlacement:w,menuPosition:O,menuShouldScrollIntoView:S},R=Z.createElement(bo.M,(0,uo.Z)({},l,M),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,c=r.maxHeight;return Z.createElement(o,(0,uo.Z)({},l,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:i}),Z.createElement(Xo,{captureEnabled:d,onTopArrive:j,onBottomArrive:_,lockEnabled:k},(function(t){return Z.createElement(a,(0,uo.Z)({},l,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:c,focusedOption:f}),E)})))}));return x||"fixed"===O?Z.createElement(i,(0,uo.Z)({},l,{appendTo:x,controlElement:this.controlRef,menuPlacement:w,menuPosition:O}),R):R}},{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(i&&!this.hasValue()&&!r)return Z.createElement($o,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(o){if(n){var u=c.map((function(t){return e.getOptionValue(t)})).join(n);return Z.createElement("input",{name:a,type:"hidden",value:u})}var s=c.length>0?c.map((function(t,n){return Z.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):Z.createElement("input",{name:a,type:"hidden",value:""});return Z.createElement("div",null,s)}var l=c[0]?this.getOptionValue(c[0]):"";return Z.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 Z.createElement(jo,(0,uo.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,u=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return Z.createElement(r,(0,uo.Z)({},f,{className:i,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:l}),this.renderLiveRegion(),Z.createElement(t,(0,uo.Z)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:l,menuIsOpen:s}),Z.createElement(o,(0,uo.Z)({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),Z.createElement(n,(0,uo.Z)({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}])&&so(t.prototype,n),r&&so(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(Z.Component);ha.defaultProps=na;i(66751),i(30314),i(73469);var ma=(0,Z.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,u=e.menuIsOpen,s=e.onChange,l=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,d=e.value,h=(0,io.Z)(e,co),m=(0,Z.useState)(void 0!==c?c:n),g=(0,ao.Z)(m,2),v=g[0],y=g[1],b=(0,Z.useState)(void 0!==u?u:o),w=(0,ao.Z)(b,2),O=w[0],x=w[1],k=(0,Z.useState)(void 0!==d?d:i),S=(0,ao.Z)(k,2),P=S[0],j=S[1],_=(0,Z.useCallback)((function(e,t){"function"==typeof s&&s(e,t),j(e)}),[s]),E=(0,Z.useCallback)((function(e,t){var n;"function"==typeof l&&(n=l(e,t)),y(void 0!==n?n:e)}),[l]),C=(0,Z.useCallback)((function(){"function"==typeof p&&p(),x(!0)}),[p]),D=(0,Z.useCallback)((function(){"function"==typeof f&&f(),x(!1)}),[f]),T=void 0!==c?c:v,M=void 0!==u?u:O,R=void 0!==d?d:P;return(0,oo.Z)((0,oo.Z)({},h),{},{inputValue:T,menuIsOpen:M,onChange:_,onInputChange:E,onMenuClose:D,onMenuOpen:C,value:R})}(e);return Z.createElement(ha,(0,uo.Z)({ref:t},n))}));function ga(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 n=null!=arguments[t]?arguments[t]:{};t%2?ga(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ga(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ya=(0,x.ZP)((function(e){var t;return(0,G.jsx)("span",va(va({},e.innerProps),{},{children:(0,G.jsx)($e.Z,{icon:"times",tabIndex:-1,"aria-label":(t="client.component.select.clearFieldLabel",e.intl.formatMessage({id:t}))})}))}));var ba=i(95497);function wa(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 Oa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wa(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const xa=function(e){var t=e.selectProps,n=t.isDisabled,r=t.menuIsOpen;return n?null:(0,G.jsx)(bo.c.DropdownIndicator,Oa(Oa({},e),{},{children:(0,G.jsx)(ba.M6,{children:(0,G.jsx)($e.Z,{icon:r?"chevron-up":"chevron-down",visible:!0,tabIndex:-1})})}))};var ka,Sa,Pa;function ja(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?ja(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ja(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ea=function(e,t,n){return function(r){r.stopPropagation(),e(t,n)}},Ca=function(e,t){return function(n){n.stopPropagation(),e(t)}},Da=function(e,t){return function(n){n.stopPropagation(),e(t)}},Ta=function(e){e.stopPropagation()};const Ma=function(e){var t=e.selectProps,n=t.openDocsTreeSearch,r=t.openAdvancedSearch,o=t.openRemoteCreate,a=t.isDisabled,i=t.hasDocsTreeSearch,c=t.hasAdvancedSearch,u=t.createPermission,s=t.value,l=t.isMulti,f=t.inputValue,p=l&&(c||i);return(0,G.jsx)(ba.HO,{isTopAligned:p,children:(0,G.jsxs)(bo.c.IndicatorsContainer,_a(_a({},e),{},{children:[e.children,n&&!a&&(0,G.jsx)("span",{onTouchEnd:Ta,onMouseDown:Ca(n,s),children:ka||(ka=(0,G.jsx)($e.Z,{icon:"folder",tabIndex:-1}))}),r&&!a&&(0,G.jsx)("span",{onTouchEnd:Ta,onMouseDown:Ea(r,f,s),children:Sa||(Sa=(0,G.jsx)($e.Z,{icon:"search",tabIndex:-1}))}),u&&!a&&(0,G.jsx)("span",{onTouchEnd:Ta,onMouseDown:Da(o,s),children:Pa||(Pa=(0,G.jsx)($e.Z,{icon:"plus",tabIndex:-1}))})]}))})};var Ra;const Ia=function(){return Ra||(Ra=(0,G.jsx)("span",{children:(0,G.jsx)(kt.Z,{size:"1.8rem"})}))};var Na=i(15315);function Aa(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 n=null!=arguments[t]?arguments[t]:{};t%2?Aa(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Aa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const La=function(e){var t=e.selectProps,n=e.children;return(0,G.jsx)(ba._M,{attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together"}],renderTarget:function(e){return(0,G.jsx)("div",{ref:e})},renderElement:function(r){return(0,G.jsx)("div",{ref:r,className:Na.c,children:(0,G.jsx)(ba.l2,Za(Za({},Sn()(e,["innerRef"])),{},{wrapperWidth:t.wrapperWidth,wrapperHeight:t.wrapperHeight,children:n}))})}})};function Fa(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 n=null!=arguments[t]?arguments[t]:{};t%2?Fa(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ba=function(e){var t=e.selectProps,n=e.children,r=t.moreOptionsAvailable,o=t.moreOptionsAvailableText;return(0,G.jsxs)(bo.c.MenuList,Ha(Ha({},e),{},{className:"MenuList",children:[n,r&&(0,G.jsx)(ba.OA,{children:o})]}))};var Ua=i(10535),Wa=i(76791);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 Ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?za(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Va=function(e){var t=e.data,n=e.innerProps,r=e.children,o=e.selectProps,a=o.tooltips,i=o.loadTooltip,c=o.DetailLink,u=Xe()(a,t.key,null),s=(0,G.jsx)("span",Ya(Ya({},n),{},{children:r})),l=c?(0,G.jsx)(ba.vR,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,G.jsx)(c,{entityKey:t.key,tabIndex:-1,children:(0,G.jsx)(Wa.Z,{content:u?(0,G.jsx)("div",{dangerouslySetInnerHTML:{__html:Ua.Z.sanitizeHtml(u)}}):null,children:(0,G.jsx)("span",{onMouseOver:function(){return i&&!u&&i(t.key)},children:s})})})}):s;return(0,G.jsx)(ba.B1,{children:l})};var qa=i(47037),Ga=i.n(qa),Ka=i(14176),Xa=i.n(Ka);function Qa(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?Qa(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ja=["linkComp"],ei=function(e,t){var n=de.Z.difference(e,t),r=Xa()(Sn()(n,Ja),(function(e){return 0===Object.keys(e).length}));return 0===Object.entries(r).length},ti=(0,Z.memo)((function(e){var t=e.linkComp,n=e.entityKey,r=e.children;return t&&Ga()(n)?(0,G.jsx)(ba.vR,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,G.jsx)(t,{entityKey:n,children:r})}):r}),ei);ti.propTypes={children:y().node,entityKey:y().any,linkComp:y().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,u=Xe()(a,t.key,null);return(0,G.jsx)(bo.c.SingleValue,$a($a({},e),{},{children:(0,G.jsx)(ba.xq,{onMouseOver:function(){return i&&!u&&i(t.key)},isDisabled:r,children:(0,G.jsx)(Wa.Z,{content:u?(0,G.jsx)("div",{dangerouslySetInnerHTML:{__html:Ua.Z.sanitizeHtml(u)}}):null,children:(0,G.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,n=e.hasValue,r=e.children,o=t.isMulti,a=t.hasAdvancedSearch,i=t.hasDocsTreeSearch,c=t.isDisabled;if(!(o&&(a||i)))return(0,G.jsx)(bo.c.ValueContainer,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ri(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ri(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e));var u=Z.Children.map(r,(function(e){return oi(e)?e:null})),s=Z.Children.map(r,(function(e){return oi(e)?null:e})),l=c&&n;return(0,G.jsxs)(G.Fragment,{children:[!l&&(0,G.jsx)(G.Fragment,{children:u}),(0,G.jsx)(ba.eQ,{children:s})]})};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 n=null!=arguments[t]?arguments[t]:{};t%2?ii(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ii(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ui=(0,$.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,u=e.moreOptionsAvailableText,s=e.noResultsText,l=e.noResultsComp,f=e.onChange,p=e.openDocsTreeSearch,d=e.openAdvancedSearch,h=e.options,m=e.searchOptions,g=e.theme,v=e.tooltips,y=e.value,b=e.DetailLink,w=e.createPermission,O=e.openRemoteCreate,x=(0,Z.useRef)(null),k=(0,Z.useRef)(null),S=function(){var e;return(null===(e=k.current)||void 0===e?void 0:e.clientWidth)||300},P=function(){var e;return(null===(e=k.current)||void 0===e?void 0:e.clientHeight)||35},j=(0,Z.useState)(S()),_=U()(j,2),E=_[0],C=_[1],D=(0,Z.useState)(P()),T=U()(D,2),M=T[0],R=T[1],I=(0,Z.useState)(!1),N=U()(I,2),A=N[0],L=N[1],F=function(e){t&&t(e)},B=(0,Z.useCallback)(m||function(){},[]),W=(0,Z.useCallback)(ro()(B,800,{trailing:!0}),[]),z=Boolean(d),Y=Boolean(p),V=Boolean(w);return(0,G.jsx)(ba.sP,{tabIndex:"-1",id:n,onFocus:function(){x.current.focus(),setTimeout((function(){C(S()),R(P())}),0)},children:(0,G.jsx)(ba.RU,{ref:k,children:(0,G.jsx)(ma,ci(ci({getOptionLabel:function(e){return e.display},getOptionValue:function(e){return e.key},wrapperWidth:E,wrapperHeight:M,components:{ClearIndicator:ya,LoadingIndicator:Ia,DropdownIndicator:xa,IndicatorsContainer:Ma,IndicatorSeparator:null,Menu:La,MenuList:Ba,MultiValueLabel:Va,SingleValue:ni,ValueContainer:ai},noOptionsMessage:function(e){return s||("function"==typeof l?(0,G.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:y||null,onChange:function(e){f(e),F(e)},onInputChange:function(e,t){var n=t.action;m&&e&&W(e,y),""===e&&"input-change"===n&&F(y)},options:H()(h||[]),onKeyDown:function(e){"Enter"===e.key&&A?(e.stopPropagation(),x.current&&null===x.current.focusedOptionRef&&e.preventDefault()):"Tab"===e.key&&(e.preventDefault=function(){})},isLoading:o,isDisabled:r,ref:x,onMenuOpen:function(){F(y),L(!0)},onMenuClose:function(){L(!1)},styles:(0,ba.i4)(g),loadTooltip:i,tooltips:v,DetailLink:b,hasDocsTreeSearch:Y,openDocsTreeSearch:p,hasAdvancedSearch:z,openAdvancedSearch:d,moreOptionsAvailable:c,moreOptionsAvailableText:u,blurInputOnSelect:!1,hasCreatePermission:V,createPermission:w,openRemoteCreate:O,closeMenuOnScroll:function(e){var t;return!(null!==(t=e.target.classList)&&void 0!==t&&t.contains("MenuList"))}}))})})}));const si=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,G.jsx)(ui,{id:t,immutable:n,isMulti:!1,onChange:function(e){return c(e?e.key:null)},value:to()(r)?r:{key:r,display:r?a:i},openMenuOnClick:!0,options:[{key:!0,display:a},{key:!1,display:i}]})};var li,fi=$.ZP.div.withConfig({displayName:"StyledBoolEdit"})(li||(li=Q()(["\n margin: 5px 0;\n"])));const pi=function(e){return(0,G.jsx)(fi,{children:(0,G.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,mi=i(79686);function gi(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 vi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gi(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yi=$.ZP.div.withConfig({displayName:"StyledOption"})(di||(di=Q()(["\n margin: "," 0;\n"])),te.Z.space(-1.4)),bi=$.ZP.span.withConfig({displayName:"StyledLabel"})(hi||(hi=Q()(["\n ","\n display: inline-block;\n margin-left: ",";\n"])),(0,et.Z)(),te.Z.space(-1.5)),wi={single:"radio",multiple:"checkbox"},Oi={single:{checked:!1},multiple:{}},xi=function(e,t){return t?(0,G.jsx)(mi.Z,{value:e}):e},ki=function(e){var t=e.groupName,n=e.id,r=e.label,o=e.labelComponent,a=e.checked,i=e.immutable,c=e.hideCheckbox,u=e.selectionType,s=e.renderHtmlInOptions,l=e.handleChange;return(0,G.jsxs)(yi,{children:[!c&&(0,G.jsx)("input",{name:t,type:wi[u],checked:a||!1,onChange:l,id:n,disabled:i}),(0,G.jsx)(bi,{children:o||xi(r,s)})]})};const Si=function(e){var t=function(t){if(e.onChange){var n=e.value.options.map((function(n){return vi(vi({},n),n.id===t.target.id?{checked:t.target.checked}:Oi[e.options.selectionType])}));e.onChange({options:n})}};return(0,G.jsx)(G.Fragment,{children:e.value.options.map((function(n){return(0,G.jsx)(ki,{groupName:e.id,id:n.id,label:n.label,labelComponent:n.labelComponent,checked:n.checked,immutable:e.immutable||n.immutable,hideCheckbox:n.hideCheckbox,selectionType:e.options.selectionType,renderHtmlInOptions:e.options.renderHtmlInOptions,handleChange:t},n.id)}))})};var Pi=i(23279),ji=i.n(Pi);function _i(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 n=null!=arguments[t]?arguments[t]:{};t%2?_i(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ci=(0,Z.lazy)((function(){return Promise.all([i.e(560),i.e(85)]).then(i.bind(i,30919))}));const Di=function(e){return(0,G.jsx)(Z.Suspense,{fallback:(t=e.value,(0,G.jsx)("div",{children:(0,G.jsx)("p",{children:t})})),children:(0,G.jsx)(Ci,Ei({},e))});var t};var Ti,Mi=$.ZP.div.withConfig({displayName:"StyledEditorWrapper"})(Ti||(Ti=Q()(["\n margin-top: ",";\n"])),te.Z.space(-1.5));const Ri=function(e){var t=e.value,n=e.onChange,r=e.immutable,o=e.options;return(0,G.jsx)(Mi,{children:(0,G.jsx)(Di,{value:t,onChange:ji()(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 Ii=i(86896),Ni=i(23842),Ai=i(93379),Zi=i.n(Ai),Li=i(7795),Fi=i.n(Li),Hi=i(90569),Bi=i.n(Hi),Ui=i(3565),Wi=i.n(Ui),zi=i(19216),Yi=i.n(zi),Vi=i(44589),qi=i.n(Vi),Gi=i(16721),Ki={};Ki.styleTagTransform=qi(),Ki.setAttributes=Wi(),Ki.insert=Bi().bind(null,"head"),Ki.domAPI=Fi(),Ki.insertStyleElement=Yi();Zi()(Gi.Z,Ki);Gi.Z&&Gi.Z.locals&&Gi.Z.locals;var Xi=i(9198),Qi=i.n(Xi),$i=(Math.pow(10,8),6e4),Ji=36e5,ec=i(13882),tc=i(83946);var nc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},rc=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,oc=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ac=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ic(e){var t,n={},r=e.split(nc.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],nc.timeZoneDelimiter.test(n.date)&&(n.date=e.split(nc.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var o=nc.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}function cc(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?o:100*a,restDateString:e.slice((r[1]||r[2]).length)}}function uc(e,t){if(null===t)return new Date(NaN);var n=e.match(rc);if(!n)return new Date(NaN);var r=!!n[4],o=sc(n[1]),a=sc(n[2])-1,i=sc(n[3]),c=sc(n[4]),u=sc(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,c,u)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7,a=7*(t-1)+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}(t,c,u):new Date(NaN);var s=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(dc[t]||(hc(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(hc(e)?366:365)}(t,o)?(s.setUTCFullYear(t,a,Math.max(o,i)),s):new Date(NaN)}function sc(e){return e?parseInt(e):1}function lc(e){var t=e.match(oc);if(!t)return NaN;var n=fc(t[1]),r=fc(t[2]),o=fc(t[3]);return function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,o)?n*Ji+r*$i+1e3*o:NaN}function fc(e){return e&&parseFloat(e.replace(",","."))||0}function pc(e){if("Z"===e)return 0;var t=e.match(ac);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,o)?n*(r*Ji+o*$i):NaN}var dc=[31,null,31,30,31,30,31,31,30,31,30,31];function hc(e){return e%400==0||e%4==0&&e%100!=0}var mc,gc,vc,yc=$.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(mc||(mc=Q()(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),bc=$.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(gc||(gc=Q()(["\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"])),Wr,Yr,(function(e){return e.hasTime&&"border-bottom: 1px solid #aeaeae;"})),wc=$.ZP.input.withConfig({displayName:"StyledTimeInput"})(vc||(vc=Q()(["\n &&&& {\n ","\n }\n"])),Yr),Oc=i(37042),xc=i(4543),kc=i(39880),Sc=i(85817),Pc=i(39159),jc=i(19013);function _c(e){(0,ec.Z)(1,arguments);var t=(0,jc.Z)(e),n=t.getSeconds();return n}var Ec=i(86);function Cc(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 Dc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Cc(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)?Cc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}var Tc=i(44941),Mc=i(29558);function Rc(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var Ic=i(97621),Nc=i(24262),Ac=i(5267);function Zc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lc(e,t){return(Lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Fc(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&&Lc(e,t)}function Hc(e){return(Hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bc(e,t){if(t&&("object"===(0,Ec.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Zc(e)}function Uc(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=Hc(e);if(t){var o=Hc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Bc(this,n)}}function Wc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zc(e){var t=function(e,t){if("object"!==(0,Ec.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==(0,Ec.Z)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,Ec.Z)(t)?t:String(t)}function Yc(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,zc(r.key),r)}}function Vc(e,t,n){return t&&Yc(e.prototype,t),n&&Yc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function qc(e,t,n){return(t=zc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gc=function(){function e(){Wc(this,e),qc(this,"priority",void 0),qc(this,"subPriority",0)}return Vc(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),Kc=function(e){Fc(n,e);var t=Uc(n);function n(e,r,o,a,i){var c;return Wc(this,n),(c=t.call(this)).value=e,c.validateValue=r,c.setValue=o,c.priority=a,i&&(c.subPriority=i),c}return Vc(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(Gc),Xc=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",10),qc(Zc(e),"subPriority",-1),e}return Vc(n,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),n}(Gc),Qc=function(){function e(){Wc(this,e),qc(this,"incompatibleTokens",void 0),qc(this,"priority",void 0),qc(this,"subPriority",void 0)}return Vc(e,[{key:"run",value:function(e,t,n,r){var o=this.parse(e,t,n,r);return o?{setter:new Kc(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}]),e}(),$c=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",140),qc(Zc(e),"incompatibleTokens",["R","u","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Jc=/^(1[0-2]|0?\d)/,eu=/^(3[0-1]|[0-2]?\d)/,tu=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,nu=/^(5[0-3]|[0-4]?\d)/,ru=/^(2[0-3]|[0-1]?\d)/,ou=/^(2[0-4]|[0-1]?\d)/,au=/^(1[0-1]|0?\d)/,iu=/^(1[0-2]|0?\d)/,cu=/^[0-5]?\d/,uu=/^[0-5]?\d/,su=/^\d/,lu=/^\d{1,2}/,fu=/^\d{1,3}/,pu=/^\d{1,4}/,du=/^-?\d+/,hu=/^-?\d/,mu=/^-?\d{1,2}/,gu=/^-?\d{1,3}/,vu=/^-?\d{1,4}/,yu=/^([+-])(\d{2})(\d{2})?|Z/,bu=/^([+-])(\d{2})(\d{2})|Z/,wu=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ou=/^([+-])(\d{2}):(\d{2})|Z/,xu=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function ku(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Su(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Pu(e,t){var n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};var r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*Ji+a*$i+1e3*i),rest:t.slice(n[0].length)}}function ju(e){return Su(du,e)}function _u(e,t){switch(e){case 1:return Su(su,t);case 2:return Su(lu,t);case 3:return Su(fu,t);case 4:return Su(pu,t);default:return Su(new RegExp("^\\d{1,"+e+"}"),t)}}function Eu(e,t){switch(e){case 1:return Su(hu,t);case 2:return Su(mu,t);case 3:return Su(gu,t);case 4:return Su(vu,t);default:return Su(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Cu(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Du(e,t){var n,r=t>0,o=r?t:1-t;if(o<=50)n=e||100;else{var a=o+50;n=e+100*Math.floor(a/100)-(e>=a%100?100:0)}return r?n:1-n}function Tu(e){return e%400==0||e%4==0&&e%100!=0}var Mu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",130),qc(Zc(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return ku(_u(4,e),r);case"yo":return ku(n.ordinalNumber(e,{unit:"year"}),r);default:return ku(_u(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var o=Du(n.year,r);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Ru=i(7651),Iu=i(59025),Nu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",130),qc(Zc(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return ku(_u(4,e),r);case"Yo":return ku(n.ordinalNumber(e,{unit:"year"}),r);default:return ku(_u(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n,r){var o=(0,Ru.Z)(e,r);if(n.isTwoDigitYear){var a=Du(n.year,o);return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,Iu.Z)(e,r)}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,Iu.Z)(e,r)}}]),n}(Qc),Au=i(66979),Zu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",130),qc(Zc(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t){return Eu("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),(0,Au.Z)(r)}}]),n}(Qc),Lu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",130),qc(Zc(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t){return Eu("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Fu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",120),qc(Zc(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return _u(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Hu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",120),qc(Zc(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return _u(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Bu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),qc(Zc(e),"priority",110),e}return Vc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"M":return ku(Su(Jc,e),r);case"MM":return ku(_u(2,e),r);case"Mo":return ku(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Uu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",110),qc(Zc(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"L":return ku(Su(Jc,e),r);case"LL":return ku(_u(2,e),r);case"Lo":return ku(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Wu=i(23324);var zu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",100),qc(Zc(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"w":return Su(nu,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,Iu.Z)(function(e,t,n){(0,ec.Z)(2,arguments);var r=(0,jc.Z)(e),o=(0,tc.Z)(t),a=(0,Wu.Z)(r,n)-o;return r.setUTCDate(r.getUTCDate()-7*a),r}(e,n,r),r)}}]),n}(Qc),Yu=i(49702);var Vu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",100),qc(Zc(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"I":return Su(nu,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n){return(0,Au.Z)(function(e,t){(0,ec.Z)(2,arguments);var n=(0,jc.Z)(e),r=(0,tc.Z)(t),o=(0,Yu.Z)(n)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(e,n))}}]),n}(Qc),qu=[31,28,31,30,31,30,31,31,30,31,30,31],Gu=[31,29,31,30,31,30,31,31,30,31,30,31],Ku=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",90),qc(Zc(e),"subPriority",1),qc(Zc(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"d":return Su(eu,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){var n=Tu(e.getUTCFullYear()),r=e.getUTCMonth();return n?t>=1&&t<=Gu[r]:t>=1&&t<=qu[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Xu=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",90),qc(Zc(e),"subpriority",1),qc(Zc(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return Su(tu,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return Tu(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}(Qc),Qu=i(84314);function $u(e,t,n){var r,o,a,i,c,u,s,l;(0,ec.Z)(2,arguments);var f=(0,Qu.j)(),p=(0,tc.Z)(null!==(r=null!==(o=null!==(a=null!==(i=null==n?void 0:n.weekStartsOn)&&void 0!==i?i:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==a?a:f.weekStartsOn)&&void 0!==o?o:null===(s=f.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,jc.Z)(e),h=(0,tc.Z)(t),m=d.getUTCDay(),g=h%7,v=(g+7)%7,y=(v<p?7:0)+h-m;return d.setUTCDate(d.getUTCDate()+y),d}var Ju=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",90),qc(Zc(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=$u(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(Qc),es=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",90),qc(Zc(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return ku(_u(t.length,e),o);case"eo":return ku(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=$u(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(Qc),ts=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",90),qc(Zc(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return ku(_u(t.length,e),o);case"co":return ku(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=$u(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}(Qc);var ns=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",90),qc(Zc(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return _u(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return ku(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return ku(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return ku(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiii":default:return ku(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}},{key:"set",value:function(e,t,n){return(e=function(e,t){(0,ec.Z)(2,arguments);var n=(0,tc.Z)(t);n%7==0&&(n-=7);var r=1,o=(0,jc.Z)(e),a=o.getUTCDay(),i=((n%7+7)%7<r?7:0)+n-a;return o.setUTCDate(o.getUTCDate()+i),o}(e,n)).setUTCHours(0,0,0,0),e}}]),n}(Qc),rs=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",80),qc(Zc(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Cu(n),0,0,0),e}}]),n}(Qc),os=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",80),qc(Zc(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Cu(n),0,0,0),e}}]),n}(Qc),as=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",80),qc(Zc(e),"incompatibleTokens",["a","b","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Cu(n),0,0,0),e}}]),n}(Qc),is=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",70),qc(Zc(e),"incompatibleTokens",["H","K","k","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"h":return Su(iu,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}(Qc),cs=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",70),qc(Zc(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"H":return Su(ru,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}(Qc),us=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",70),qc(Zc(e),"incompatibleTokens",["h","H","k","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"K":return Su(au,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}(Qc),ss=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",70),qc(Zc(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"k":return Su(ou,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}(Qc),ls=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",60),qc(Zc(e),"incompatibleTokens",["t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"m":return Su(cu,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}(Qc),fs=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",50),qc(Zc(e),"incompatibleTokens",["t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t,n){switch(t){case"s":return Su(uu,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return _u(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}(Qc),ps=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",30),qc(Zc(e),"incompatibleTokens",["t","T"]),e}return Vc(n,[{key:"parse",value:function(e,t){return ku(_u(t.length,e),(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}]),n}(Qc),ds=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",10),qc(Zc(e),"incompatibleTokens",["t","T","x"]),e}return Vc(n,[{key:"parse",value:function(e,t){switch(t){case"X":return Pu(yu,e);case"XX":return Pu(bu,e);case"XXXX":return Pu(wu,e);case"XXXXX":return Pu(xu,e);case"XXX":default:return Pu(Ou,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(Qc),hs=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",10),qc(Zc(e),"incompatibleTokens",["t","T","X"]),e}return Vc(n,[{key:"parse",value:function(e,t){switch(t){case"x":return Pu(yu,e);case"xx":return Pu(bu,e);case"xxxx":return Pu(wu,e);case"xxxxx":return Pu(xu,e);case"xxx":default:return Pu(Ou,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}(Qc),ms=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",40),qc(Zc(e),"incompatibleTokens","*"),e}return Vc(n,[{key:"parse",value:function(e){return ju(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}(Qc),gs=function(e){Fc(n,e);var t=Uc(n);function n(){var e;Wc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return qc(Zc(e=t.call.apply(t,[this].concat(o))),"priority",20),qc(Zc(e),"incompatibleTokens","*"),e}return Vc(n,[{key:"parse",value:function(e){return ju(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}(Qc),vs={G:new $c,y:new Mu,Y:new Nu,R:new Zu,u:new Lu,Q:new Fu,q:new Hu,M:new Bu,L:new Uu,w:new zu,I:new Vu,d:new Ku,D:new Xu,E:new Ju,e:new es,c:new ts,i:new ns,a:new rs,b:new os,B:new as,h:new is,H:new cs,K:new us,k:new ss,m:new ls,s:new fs,S:new ps,X:new ds,x:new hs,t:new ms,T:new gs},ys=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,bs=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ws=/^'([^]*?)'?$/,Os=/''/g,xs=/\S/,ks=/[a-zA-Z]/;function Ss(e,t,n,r){var o,a,i,c,u,s,l,f,p,d,h,m,g,v,y,b,w,O;(0,ec.Z)(3,arguments);var x=String(e),k=String(t),S=(0,Qu.j)(),P=null!==(o=null!==(a=null==r?void 0:r.locale)&&void 0!==a?a:S.locale)&&void 0!==o?o:Tc.Z;if(!P.match)throw new RangeError("locale must contain match property");var j=(0,tc.Z)(null!==(i=null!==(c=null!==(u=null!==(s=null==r?void 0:r.firstWeekContainsDate)&&void 0!==s?s:null==r||null===(l=r.locale)||void 0===l||null===(f=l.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==u?u:S.firstWeekContainsDate)&&void 0!==c?c:null===(p=S.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=(0,tc.Z)(null!==(h=null!==(m=null!==(g=null!==(v=null==r?void 0:r.weekStartsOn)&&void 0!==v?v:null==r||null===(y=r.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==g?g:S.weekStartsOn)&&void 0!==m?m:null===(w=S.locale)||void 0===w||null===(O=w.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==h?h:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?(0,jc.Z)(n):new Date(NaN);var E,C={firstWeekContainsDate:j,weekStartsOn:_,locale:P},D=[new Xc],T=k.match(bs).map((function(e){var t=e[0];return t in Ic.Z?(0,Ic.Z[t])(e,P.formatLong):e})).join("").match(ys),M=[],R=Dc(T);try{var I=function(){var t=E.value;null!=r&&r.useAdditionalWeekYearTokens||!(0,Ac.Do)(t)||(0,Ac.qp)(t,k,e),null!=r&&r.useAdditionalDayOfYearTokens||!(0,Ac.Iu)(t)||(0,Ac.qp)(t,k,e);var n=t[0],o=vs[n];if(o){var a=o.incompatibleTokens;if(Array.isArray(a)){var i=M.find((function(e){return a.includes(e.token)||e.token===n}));if(i)throw new RangeError("The format string mustn't contain `".concat(i.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===o.incompatibleTokens&&M.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));M.push({token:n,fullToken:t});var c=o.run(x,t,P.match,C);if(!c)return{v:new Date(NaN)};D.push(c.setter),x=c.rest}else{if(n.match(ks))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=Ps(t)),0!==x.indexOf(t))return{v:new Date(NaN)};x=x.slice(t.length)}};for(R.s();!(E=R.n()).done;){var N=I();if("object"===(0,Ec.Z)(N))return N.v}}catch(e){R.e(e)}finally{R.f()}if(x.length>0&&xs.test(x))return new Date(NaN);var A=D.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return D.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),Z=(0,jc.Z)(n);if(isNaN(Z.getTime()))return new Date(NaN);var L,F=(0,Mc.Z)(Z,(0,Nc.Z)(Z)),H={},B=Dc(A);try{for(B.s();!(L=B.n()).done;){var U=L.value;if(!U.validate(F,C))return new Date(NaN);var W=U.set(F,H,C);Array.isArray(W)?(F=W[0],Rc(H,W[1])):F=W}}catch(e){B.e(e)}finally{B.f()}return F}function Ps(e){return e.match(ws)[1].replace(Os,"'")}var js=i(49599);function _s(e,t,n){return(0,ec.Z)(2,arguments),(0,js.Z)(Ss(e,t,new Date,n))}function Es(e){(0,ec.Z)(1,arguments);var t=(0,jc.Z)(e);return t.setHours(0,0,0,0),t}var Cs="react-datepicker-time__input",Ds="react-datepicker__day",Ts="react-datepicker__input",Ms=function(e){return e.classList.contains(Ds)},Rs=function(e){return e.classList.contains(Cs)},Is=function(e){return e.classList.contains(Ts)},Ns=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,Oc.Z)((0,xc.Z)((0,kc.Z)(e,c),a),r)},As=function(e){setTimeout((function(){if(e){var t=e.querySelector(".".concat(Ds,'[tabindex="0"]'));t&&t.focus({preventScroll:!0})}}),0)},Zs=function(e){setTimeout((function(){e&&e.focus({preventScroll:!0})}),0)},Ls=function(e){var t=function(e,t){var n;(0,ec.Z)(1,arguments);var r=(0,tc.Z)(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var o,a=ic(e);if(a.date){var i=cc(a.date,r);o=uc(i.restDateString,i.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var c,u=o.getTime(),s=0;if(a.time&&(s=lc(a.time),isNaN(s)))return new Date(NaN);if(!a.timezone){var l=new Date(u+s),f=new Date(0);return f.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),f.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),f}return c=pc(a.timezone),isNaN(c)?new Date(NaN):new Date(u+s+c)}(e);return isNaN(t)?null:t},Fs=function(e){return e?e.toISOString():null};const Hs=function(e,t,n){var r=n.dateFormats,o=void 0===r?[]:r,a=n.minDate,i=n.maxDate,c=n.hasTime,u=n.valueToDate,s=void 0===u?Ls:u,l=n.dateToValue,f=void 0===l?Fs:l,p=(0,Z.useRef)(null),d=(0,Z.useState)(!1),h=U()(d,2),m=h[0],g=h[1],v=(0,Z.useState)(!1),y=U()(v,2),b=y[0],w=y[1],O=s(e),x=a?s(a):void 0,k=i?s(i):void 0;(0,Z.useEffect)((function(){(p.current&&"function"==typeof p.current.setOpen&&p.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)},P=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(p.current&&"function"==typeof p.current.getPreSelection){var t,n=e?p.current.getPreSelection():null;return(null===(t=p.current.state)||void 0===t?void 0:t.preSelection)||n}return null},j=function(e){p.current&&"function"==typeof p.current.setPreSelection&&p.current.setPreSelection(e)},_=function(){t(null),j(null)},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=P(!1);if(n){var r=O||new Date,o=t?Ns(n,{hour:(0,Sc.Z)(r),minute:(0,Pc.Z)(r),second:_c(r)}):n;C(o,e)}},C=function(n,r){if(n){var a,i=!e&&Boolean(n),u=null==r||null===(a=r.target)||void 0===a?void 0:a.value,s=!!u&&o.some((function(e){return _s(u,e)})),l=Es(n),d=(0,Sc.Z)(n)!==(0,Sc.Z)(l)||(0,Pc.Z)(n)!==(0,Pc.Z)(l);(i&&!d||s)&&c&&(n=Ni.Z.setCurrentTime(n)),t(f(n))}else _();var h;c||"click"!==(null==r?void 0:r.type)||(S(),Zs(null===(h=p.current)||void 0===h?void 0:h.input))},D=function(e){if("Tab"===e.key)if(e.shiftKey)if(Is(e.target))setTimeout((function(){return S()}),0);else if(Rs(e.target)){var t,n;j(O||P(!0)),As(null===(t=p.current)||void 0===t||null===(n=t.calendar)||void 0===n?void 0:n.componentNode)}else Ms(e.target)&&S();else Is(e.target)&&m?(E(e),setTimeout((function(){return S()}),0)):Rs(e.target)?S():Ms(e.target)&&(c?(E(e,!0),j(null),w(!0),setTimeout((function(){var e,t,n;n=null===(e=p.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(Cs));e&&e.focus({preventScroll:!0})}}),0),w(!1)}),0)):(E(e),S()));var r;"Enter"===e.key&&(S(),e.preventDefault(),e.stopPropagation(),Zs(null===(r=p.current)||void 0===r?void 0:r.input));if(["ArrowDown","ArrowUp","Enter"].includes(e.key))if(m){if(m&&null===P(!1)){var o,a;j(O||P(!0)),As(null===(o=p.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})),j(null),Zs(null===(e=p.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(){j(null)},onBlur:function(){p.current&&p.current.setState({inputValue:null})},preventOpenOnFocus:!0,enableTabLoop:!1,shouldCloseOnSelect:!1,open:m,selected:O,showTimeInput:c,minDate:x,maxDate:k,ref:p,className:Ts},timeInputProps:{onKeyDown:D,className:Cs,tabIndex:b?void 0:"-1"},clearButtonProps:{onMouseDown:function(e){e.preventDefault(),_()}},calendarButtonProps:{onClick:T,className:m?"react-datepicker-ignore-onclickoutside":""}}};var Bs=i(49546),Us=i(35997),Ws="HH:mm:ss",zs="HH:mm",Ys=function(e){return _s(e,zs)},Vs=function(e){var t=function(e){return _s(e,Ws)?Ss(e,Ws,new Date):_s(e,zs)?Ss(e,zs,new Date):_s(e,"HH:")?Ss(e,"HH:",new Date):_s(e,"H")?Ss(e,"H",new Date):null}(e);return t&&!isNaN(t)?function(e){return(0,Bs.Z)(e,zs)}(t):""};const qs=function(e,t){var n=Vs(e),r=(0,Z.useState)(n),o=U()(r,2),a=o[0],i=o[1],c=(0,Z.useRef)(a),u=Us.Z.usePrevious(n);(0,Z.useEffect)((function(){u!==n&&a===u&&i(n)}),[n,a,u]);return{inputProps:{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),u=n.substring(r+1),s=parseInt(o,10),l=parseInt(u,10),f=!o||!Number.isNaN(s)&&s<24,p=!u||!Number.isNaN(l)&&l<60;if(!f||!p)return!1;c.current=n,i(n),n&&!Ys(n)||t(n)}},onBlur:function(){if(a!==n){var e=Vs(a);e&&Ys(e)?(c.current=e,i(e),t(e)):i(n)}},onFocus:function(e){a&&"function"==typeof e.target.select&&e.target.select()},value:a||""},clearButtonProps:{onClick:function(){t(""),i("")}}}};var Gs=["value","onChange","onKeyDown"];function Ks(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 Xs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ks(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ks(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,Xi.registerLocale)("en",Ni.Z.getDateFnsLocale("en")),(0,Xi.registerLocale)("en-US",Ni.Z.getDateFnsLocale("en")),(0,Xi.registerLocale)("de-CH",Ni.Z.getDateFnsLocale("de-CH")),(0,Xi.registerLocale)("de",Ni.Z.getDateFnsLocale("de")),(0,Xi.registerLocale)("fr",Ni.Z.getDateFnsLocale("fr")),(0,Xi.registerLocale)("fr-CH",Ni.Z.getDateFnsLocale("fr")),(0,Xi.registerLocale)("it",Ni.Z.getDateFnsLocale("it")),(0,Xi.registerLocale)("it-CH",Ni.Z.getDateFnsLocale("it")),(0,Xi.setDefaultLocale)("de");var Qs=function(e){var t=e.onChange,n=e.label;return(0,G.jsx)(ee.Z,{onMouseDown:function(e){e.preventDefault(),t(null)},tabIndex:-1,children:n})},$s=function(e){var t=e.value,n=e.onChange,r=e.onKeyDown,o=ar()(e,Gs),a=qs(t,(function(e){n&&n(e||"00:00")})).inputProps;return(0,G.jsx)(wc,Xs(Xs(Xs({},a),o),{},{type:"text",onKeyDown:r,onClick:function(e){e.target.focus()}}))},Js={strategy:"fixed"};const el=(0,$.Zz)((0,x.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,u=e.onChange,s=e.intl,l=e.placeholder,f=e.hasTime,p=e.dateFormats,d=void 0===p?[]:p,h=e.dateTimeFormats,m=void 0===h?[]:h,g=e.events,v=(0,Z.useRef)(void 0),y=s.locale,b=function(e){return s.formatMessage({id:e})},w=(0,Z.useRef)(null),O=Boolean(r),x=!t&&O,k=function(e){v.current=e,u(e)},S=Hs(r,k,{dateFormats:d,dateTimeFormats:m,minDate:o,maxDate:a,valueToDate:i,dateToValue:c,hasTime:f}),P=S.reactDatePickerProps,j=S.timeInputProps,_=S.clearButtonProps,E=S.calendarButtonProps;return(0,G.jsx)(yc,{immutable:t,id:n,tabIndex:"-1",children:(0,G.jsxs)(bc,{immutable:t,ref:w,hasTime:f,onBlur:function(e){if("function"==typeof(null==g?void 0:g.onBlur)){var t=void 0!==v.current?v.current:r;g.onBlur(t)}e.stopPropagation()},children:[(0,G.jsx)(Qi(),Xs(Xs({},P),{},{disabled:t,dateFormat:[].concat(H()(m),H()(d)),placeholderText:l,showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!1,fixedHeight:!0,showPopperArrow:!1,locale:y,customTimeInput:(0,G.jsx)($s,Xs({},j)),timeInputLabel:"",popperProps:Js,todayButton:(0,G.jsx)(Qs,{onChange:k,label:b("client.component.datePicker.todayLabel")})})),x&&(0,G.jsx)($e.Z,Xs({icon:"times",tabIndex:-1,"aria-label":b("client.component.datePicker.clearDateLabel")},_)),!t&&(0,G.jsx)($e.Z,Xs({icon:"calendar",tabIndex:-1},E))]})})})));function tl(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 nl=function(e){var t=e.onChange,n=e.options,r=e.id,o=e.value,a=e.immutable,i=e.events,c=e.placeholder,u=(0,Ii.Z)(),s=(null==n?void 0:n.datePickerOptions)||{},l="".concat(Ni.Z.getLocalizedDateFormat(u.locale)),f=Ni.Z.getLocalizedDateFormatWithoutPunctuation(u.locale),p=[l,f,Ni.Z.useTwoDigitYear(l),Ni.Z.useTwoDigitYear(f)];return(0,G.jsx)(el,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tl(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:r,value:o,onChange:t,dateFormats:p,hasTime:!1,immutable:a,placeholder:c,events:i},s))};function rl(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 ol=(0,x.ZP)((function(e){var t=e.onChange,n=e.options,r=e.value,o=e.immutable,a=e.placeholder,i=(0,Ii.Z)(),c=(null==n?void 0:n.datePickerOptions)||{},u="".concat(Ni.Z.getLocalizedDateTimeFormat(i.locale)),s="".concat(Ni.Z.getLocalizedDateFormat(i.locale)),l=Ni.Z.getLocalizedDateTimeFormatWithoutPunctuation(i.locale),f=[u,l,Ni.Z.useTwoDigitYear(u),Ni.Z.useTwoDigitYear(l)],p=Ni.Z.getLocalizedDateFormatWithoutPunctuation(i.locale),d=[s,p,Ni.Z.useTwoDigitYear(s),Ni.Z.useTwoDigitYear(p)];return(0,G.jsx)(el,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rl(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({value:r,onChange:t,dateTimeFormats:f,dateFormats:d,hasTime:!0,immutable:o,placeholder:a},c))}));function al(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}u((r=r.apply(e,t||[])).next())}))}function il(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(u){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,u])}}}Object.create;function cl(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 ul(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 sl=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 ll(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=sl.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 fl=[".DS_Store","Thumbs.db"];function pl(e){return"object"==typeof e&&null!==e}function dl(e){return vl(e.target.files).map((function(e){return ll(e)}))}function hl(e){return al(this,void 0,void 0,(function(){return il(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 ll(e)}))]}}))}))}function ml(e,t){return al(this,void 0,void 0,(function(){var n;return il(this,(function(r){switch(r.label){case 0:return e.items?(n=vl(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(yl))]):[3,2];case 1:return[2,gl(bl(r.sent()))];case 2:return[2,gl(vl(e.files).map((function(e){return ll(e)})))]}}))}))}function gl(e){return e.filter((function(e){return-1===fl.indexOf(e.name)}))}function vl(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function yl(e){if("function"!=typeof e.webkitGetAsEntry)return wl(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?xl(t):wl(e)}function bl(e){return e.reduce((function(e,t){return ul(ul([],cl(e),!1),cl(Array.isArray(t)?bl(t):[t]),!1)}),[])}function wl(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=ll(t);return Promise.resolve(n)}function Ol(e){return al(this,void 0,void 0,(function(){return il(this,(function(t){return[2,e.isDirectory?xl(e):kl(e)]}))}))}function xl(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var a=this;t.readEntries((function(t){return al(a,void 0,void 0,(function(){var a,i,c;return il(this,(function(u){switch(u.label){case 0:if(t.length)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=u.sent(),e(a),[3,4];case 3:return i=u.sent(),n(i),[3,4];case 4:return[3,6];case 5:c=Promise.all(t.map(Ol)),r.push(c),o(),u.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function kl(e){return al(this,void 0,void 0,(function(){return il(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=ll(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var Sl=i(58363);function Pl(e){return function(e){if(Array.isArray(e))return Tl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Dl(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 jl(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 _l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jl(Object(n),!0).forEach((function(t){El(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function El(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cl(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)||Dl(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 Dl(e,t){if(e){if("string"==typeof e)return Tl(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)?Tl(e,t):void 0}}function Tl(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 Ml="file-invalid-type",Rl="file-too-large",Il="file-too-small",Nl="too-many-files",Al=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:Ml,message:"File type must be ".concat(t)}},Zl=function(e){return{code:Rl,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},Ll=function(e){return{code:Il,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},Fl={code:Nl,message:"Too many files"};function Hl(e,t){var n="application/x-moz-file"===e.type||(0,Sl.Z)(e,t);return[n,n?null:Al(t)]}function Bl(e,t,n){if(Ul(e.size))if(Ul(t)&&Ul(n)){if(e.size>n)return[!1,Zl(n)];if(e.size<t)return[!1,Ll(t)]}else{if(Ul(t)&&e.size<t)return[!1,Ll(t)];if(Ul(n)&&e.size>n)return[!1,Zl(n)]}return[!0,null]}function Ul(e){return null!=e}function Wl(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=Cl(Hl(e,n),1)[0],a=Cl(Bl(e,r,o),1)[0],i=c?c(e):null;return t&&a&&!i}))}function zl(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Yl(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 Vl(e){e.preventDefault()}function ql(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function Gl(e){return-1!==e.indexOf("Edge/")}function Kl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return ql(e)||Gl(e)}function Xl(){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!zl(e)&&t&&t.apply(void 0,[e].concat(r)),zl(e)}))}}function Ql(){return"showOpenFilePicker"in window}function $l(e){return Ul(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=Cl(e,2),n=t[0],r=t[1],o=!0;return nf(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(rf)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=Cl(t,2),r=n[0],o=n[1];return _l(_l({},e),{},El({},r,o))}),{})}]:e}function Jl(e){if(Ul(e))return Object.entries(e).reduce((function(e,t){var n=Cl(t,2),r=n[0],o=n[1];return[].concat(Pl(e),[r],Pl(o))}),[]).filter((function(e){return nf(e)||rf(e)})).join(",")}function ef(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function tf(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function nf(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function rf(e){return/^.*\.[\w]+$/.test(e)}var of=["children"],af=["open"],cf=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],uf=["refKey","onChange","onClick"];function sf(e){return function(e){if(Array.isArray(e))return pf(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ff(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 lf(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)||ff(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 ff(e,t){if(e){if("string"==typeof e)return pf(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)?pf(e,t):void 0}}function pf(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 df(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 hf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?df(Object(n),!0).forEach((function(t){mf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gf(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 vf=(0,Z.forwardRef)((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=hf(hf({},yf),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,i=t.minSize,c=t.multiple,u=t.maxFiles,s=t.onDragEnter,l=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,w=t.noClick,O=t.noKeyboard,x=t.noDrag,k=t.noDragEventsBubbling,S=t.onError,P=t.validator,j=(0,Z.useMemo)((function(){return Jl(n)}),[n]),_=(0,Z.useMemo)((function(){return $l(n)}),[n]),E=(0,Z.useMemo)((function(){return"function"==typeof g?g:xf}),[g]),C=(0,Z.useMemo)((function(){return"function"==typeof m?m:xf}),[m]),D=(0,Z.useRef)(null),T=(0,Z.useRef)(null),M=lf((0,Z.useReducer)(Of,wf),2),R=M[0],I=M[1],N=R.isFocused,A=R.isFileDialogActive,L=(0,Z.useRef)("undefined"!=typeof window&&window.isSecureContext&&v&&Ql()),F=function(){!L.current&&A&&setTimeout((function(){T.current&&(T.current.files.length||(I({type:"closeDialog"}),C()))}),300)};(0,Z.useEffect)((function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}}),[T,A,C,L]);var H=(0,Z.useRef)([]),B=function(e){D.current&&D.current.contains(e.target)||(e.preventDefault(),H.current=[])};(0,Z.useEffect)((function(){return b&&(document.addEventListener("dragover",Vl,!1),document.addEventListener("drop",B,!1)),function(){b&&(document.removeEventListener("dragover",Vl),document.removeEventListener("drop",B))}}),[D,b]),(0,Z.useEffect)((function(){return!r&&y&&D.current&&D.current.focus(),function(){}}),[D,y,r]);var U=(0,Z.useCallback)((function(e){S?S(e):console.error(e)}),[S]),W=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),H.current=[].concat(sf(H.current),[e.target]),Yl(e)&&Promise.resolve(o(e)).then((function(t){if(!zl(e)||k){var n=t.length,r=n>0&&Wl({files:t,accept:j,minSize:i,maxSize:a,multiple:c,maxFiles:u,validator:P});I({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),s&&s(e)}})).catch((function(e){return U(e)}))}),[o,s,U,k,j,i,a,c,u,P]),z=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=Yl(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&f&&f(e),!1}),[f,k]),Y=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=H.current.filter((function(e){return D.current&&D.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),H.current=t,t.length>0||(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Yl(e)&&l&&l(e))}),[D,l,k]),V=(0,Z.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=lf(Hl(e,j),2),o=t[0],c=t[1],u=lf(Bl(e,i,a),2),s=u[0],l=u[1],f=P?P(e):null;if(o&&s&&!f)n.push(e);else{var p=[c,l];f&&(p=p.concat(f)),r.push({file:e,errors:p.filter((function(e){return e}))})}})),(!c&&n.length>1||c&&u>=1&&n.length>u)&&(n.forEach((function(e){r.push({file:e,errors:[Fl]})})),n.splice(0)),I({acceptedFiles:n,fileRejections:r,type:"setFiles"}),p&&p(n,r,t),r.length>0&&h&&h(r,t),n.length>0&&d&&d(n,t)}),[I,c,j,i,a,u,p,d,h,P]),q=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),H.current=[],Yl(e)&&Promise.resolve(o(e)).then((function(t){zl(e)&&!k||V(t,e)})).catch((function(e){return U(e)})),I({type:"reset"})}),[o,V,U,k]),G=(0,Z.useCallback)((function(){if(L.current){I({type:"openDialog"}),E();var e={multiple:c,types:_};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){V(e,null),I({type:"closeDialog"})})).catch((function(e){ef(e)?(C(e),I({type:"closeDialog"})):tf(e)?(L.current=!1,T.current?(T.current.value=null,T.current.click()):U(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."))):U(e)}))}else T.current&&(I({type:"openDialog"}),E(),T.current.value=null,T.current.click())}),[I,E,C,v,V,U,_,c]),K=(0,Z.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]),X=(0,Z.useCallback)((function(){I({type:"focus"})}),[]),Q=(0,Z.useCallback)((function(){I({type:"blur"})}),[]),$=(0,Z.useCallback)((function(){w||(Kl()?setTimeout(G,0):G())}),[w,G]),J=function(e){return r?null:e},ee=function(e){return O?null:J(e)},te=function(e){return x?null:J(e)},ne=function(e){k&&e.stopPropagation()},re=(0,Z.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,u=e.onClick,s=e.onDragEnter,l=e.onDragOver,f=e.onDragLeave,p=e.onDrop,d=gf(e,cf);return hf(hf(mf({onKeyDown:ee(Xl(a,K)),onFocus:ee(Xl(i,X)),onBlur:ee(Xl(c,Q)),onClick:J(Xl(u,$)),onDragEnter:te(Xl(s,W)),onDragOver:te(Xl(l,z)),onDragLeave:te(Xl(f,Y)),onDrop:te(Xl(p,q)),role:"string"==typeof o&&""!==o?o:"presentation"},n,D),r||O?{}:{tabIndex:0}),d)}}),[D,K,X,Q,$,W,z,Y,q,O,x,r]),oe=(0,Z.useCallback)((function(e){e.stopPropagation()}),[]),ae=(0,Z.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=gf(e,uf);return hf(hf({},mf({accept:j,multiple:c,type:"file",style:{display:"none"},onChange:J(Xl(r,q)),onClick:J(Xl(o,oe)),tabIndex:-1},n,T)),a)}}),[T,n,c,q,r]);return hf(hf({},R),{},{isFocused:N&&!r,getRootProps:re,getInputProps:ae,rootRef:D,inputRef:T,open:J(G)})}(gf(e,of)),o=r.open,a=gf(r,af);return(0,Z.useImperativeHandle)(t,(function(){return{open:o}}),[o]),L().createElement(Z.Fragment,null,n(hf(hf({},a),{},{open:o})))}));vf.displayName="Dropzone";var yf={disabled:!1,getFilesFromEvent:function(e){return al(this,void 0,void 0,(function(){return il(this,(function(t){return pl(e)&&pl(e.dataTransfer)?[2,ml(e.dataTransfer,e.type)]:function(e){return pl(e)&&pl(e.target)}(e)?[2,dl(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,hl(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};vf.defaultProps=yf,vf.propTypes={children:y().func,accept:y().objectOf(y().arrayOf(y().string)),multiple:y().bool,preventDropOnDocument:y().bool,noClick:y().bool,noKeyboard:y().bool,noDrag:y().bool,noDragEventsBubbling:y().bool,minSize:y().number,maxSize:y().number,maxFiles:y().number,disabled:y().bool,getFilesFromEvent:y().func,onFileDialogCancel:y().func,onFileDialogOpen:y().func,useFsAccessApi:y().bool,autoFocus:y().bool,onDragEnter:y().func,onDragLeave:y().func,onDragOver:y().func,onDrop:y().func,onDropAccepted:y().func,onDropRejected:y().func,onError:y().func,validator:y().func};const bf=vf;var wf={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Of(e,t){switch(t.type){case"focus":return hf(hf({},e),{},{isFocused:!0});case"blur":return hf(hf({},e),{},{isFocused:!1});case"openDialog":return hf(hf({},wf),{},{isFileDialogActive:!0});case"closeDialog":return hf(hf({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return hf(hf({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return hf(hf({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return hf({},wf);default:return e}}function xf(){}var kf,Sf,Pf,jf,_f,Ef,Cf,Df,Tf,Mf=i(69829),Rf=i(40953),If=$.ZP.section.withConfig({displayName:"StyledSection"})(kf||(kf=Q()(["\n flex: 1;\n display: flex;\n justify-content: flex-end;\n"]))),Nf=$.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(Sf||(Sf=Q()(["\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"])),Lt.Z,te.Z.space(-2)),Af=$.ZP.div.withConfig({displayName:"StyledDropzone"})(Pf||(Pf=Q()(["\n width: 100%;\n\n &:hover {\n "," {\n background-color: ",";\n }\n }\n"])),Lt.Z,oe.FS.color("backgroundItemHover")),Zf=$.ZP.div.withConfig({displayName:"StyledUploadInput"})(jf||(jf=Q()(["\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,et.Z)(),(function(e){return e.immutable?"not-allowed":"pointer"}),oe.FS.color("paper"),(function(e){return e.immutable?Rf.v.shade2(e):Rf.v.base(e)}),te.Z.space(-2),Lt.Z,te.Z.space(-3.1),te.Z.space(-1.5)),Lf=$.ZP.div.withConfig({displayName:"StyledUploadProgress"})(_f||(_f=Q()(["\n && {\n padding-top: ",";\n text-align: center;\n display: inline-block;\n }\n"])),te.Z.space(-2)),Ff=(0,$.ZP)(Mf.Fe).withConfig({displayName:"StyledUploadProgressText"})(Ef||(Ef=Q()(["\n && {\n ","\n }\n"])),(0,et.Z)({fontSize:te.Z.font(-1)})),Hf=$.ZP.div.withConfig({displayName:"StyledUploadProgressIconAndText"})(Cf||(Cf=Q()(["\n && {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n margin-left: ",";\n }\n }\n"])),te.Z.space(-2)),Bf=$.ZP.div.withConfig({displayName:"StyledView"})(Df||(Df=Q()(["\n display: flex;\n justify-content: space-between;\n padding-top: ",";\n"])),te.Z.space(-2));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 Wf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uf(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const zf=function(e){var t=e.onDrop,n=e.immutable,r=e.text,o=e.onChoose;return(0,G.jsxs)(Zf,{immutable:n,children:[(0,G.jsx)(bf,{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,G.jsx)(If,{children:(0,G.jsxs)(Af,Wf(Wf({},t()),{},{children:[(0,G.jsx)("input",Wf({},n())),Tf||(Tf=(0,G.jsx)(ee.Z,{icon:"arrow-to-top"}))]}))})}}),o&&(0,G.jsx)(ee.Z,{onClick:function(e){o(),e.stopPropagation()},icon:"folder",label:"browse docs",iconOnly:!0})]})};var Yf=i(73906),Vf=i(23427),qf=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 Gf=function(e){var t=e.file,n=e.text;return(0,G.jsxs)(Lf,{children:[(0,G.jsx)(Yf.Z,{alt:t.name,caption:t.name,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:t.preview,thumbnailUrl:t.type.startsWith("image")?t.preview:null}),(0,G.jsxs)(Hf,{children:[(0,G.jsx)(kt.Z,{position:Vf.Z.position.PREPEND}),(0,G.jsxs)(Ff,{children:[n||"uploading"," (",qf(t.size),")"]})]})]})};var Kf=i(28247);function Xf(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 Qf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xf(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const $f=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,G.jsxs)(Bf,{className:"StyledView",children:[(0,G.jsx)(Yf.Z,Qf(Qf({alt:n.fileName},c&&{caption:n.fileName}),{},{fileName:n.fileName,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:n.binaryLink,thumbnailUrl:n.thumbnailLink})),(0,G.jsxs)(Nf,{children:[!o&&(0,G.jsx)(ee.Z,{icon:"trash",onClick:function(){return a(null)},tabIndex:-1,title:i||"delete"}),(0,G.jsx)(ee.Z,{children:(0,G.jsx)(Ur.Z,{neutral:!0,icon:"arrow-to-bottom",target:"_blank",href:Kf.Z.getDownloadUrl(n.binaryLink),tabIndex:-1,title:r||"download"})})]})]})};function Jf(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 ep(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jf(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tp=function(e){var t=e.value,n=e.textResources,r=e.onUpload,o=e.onChoose,a=(0,Z.useRef)(t),i=(0,Z.useState)({isUploading:!1,previewFile:null}),c=U()(i,2),u=c[0],s=c[1];return(0,Z.useEffect)((function(){Kt()(a.current,t)||s({isUploading:!1,previewFile:null}),a.current=t}),[t]),null!=t&&t.binaryLink?(0,G.jsx)($f,ep(ep({},e),{},{deleteTitle:n.delete,downloadTitle:n.download})):u.isUploading?(0,G.jsx)(Gf,ep({file:u.previewFile,text:n.uploading},e)):(0,G.jsx)(zf,ep(ep({},e),{},{onDrop:function(e){!function(e){s({isUploading:!0,previewFile:e})}(e),r(e)},onChoose:o}))};tp.defaultProps={textResources:{}};const np=tp;var rp=function(e){return(0,G.jsx)(np,{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})};rp.defaultProps={options:{}};const op=rp;var ap,ip,cp=function(e){return-1*Math.abs(e)},up=$.ZP.input.withConfig({displayName:"StyledDurationEdit"})(ap||(ap=Q()(["\n &&&& {\n ","\n flex-grow: 0;\n width: ","px;\n min-width: 2.5ch;\n }\n"])),Yr,(function(e){return e.width})),sp=$.ZP.label.withConfig({displayName:"StyledDurationEditFocusable"})(ip||(ip=Q()(["\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"])),te.Z.space(1),(function(e){return e.immutable?oe.FS.color("textDisabled"):oe.FS.color("text")}),(function(e){return e.immutable?"not-allowed":"default"})),lp=function(e){var t=e.value,n=e.immutable,r=e.onChange,o=e.options,a=Ni.Z.millisecondsToDuration(t),i=(0,Z.useState)(!1),c=U()(i,2),u=c[0],s=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=cp(n),o=cp(o)),60*(n||0)*6e4+6e4*(o||0)):null))):r(null)},f=function(){s(!0)},p=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 u||"number"==typeof t},m=function(e){return 9*(e+"").length},g=n&&Boolean(a.seconds);return(0,G.jsxs)(zr,{onBlur:function(){s(!1)},immutable:n,children:[(0,G.jsxs)(sp,{immutable:n,children:[(0,G.jsx)(up,{disabled:n,immutable:n,min:!0===o.allowNegative?void 0:0,onChange:function(){},onFocus:f,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(t,null)},onKeyPress:p,pattern:d(),step:1,width:m(a.hours),type:"number",value:"number"!=typeof a.hours||0===a.hours&&!n?"":a.hours+""}),h()&&(0,G.jsx)(q.ZP.Span,{children:o.hoursLabel})]}),(0,G.jsxs)(sp,{immutable:n,children:[(0,G.jsx)(up,{disabled:n,immutable:n,min:!0!==o.allowNegative||null!==a.hours&&0!==a.hours?0:void 0,onChange:function(){},onFocus:f,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(null,t)},onKeyPress:p,pattern:d(),step:1,width:m(a.minutes),type:"number",value:a.minutes+""}),h()&&(0,G.jsx)(q.ZP.Span,{children:o.minutesLabel})]}),g&&(0,G.jsxs)(sp,{immutable:n,children:[(0,G.jsx)(up,{disabled:n,immutable:n,onChange:function(){},width:m(a.seconds),type:"number",value:a.seconds+""}),h()&&(0,G.jsx)(q.ZP.Span,{children:o.secondsLabel})]})]})};lp.defaultProps={options:{hoursLabel:"hrs",minutesLabel:"min",secondsLabel:"s"}};const fp=lp;var pp;const dp=$.ZP.input.attrs((function(e){return{type:"text"}})).withConfig({displayName:"StyledStringEdit"})(pp||(pp=Q()(["\n &&&& {\n ","\n }\n"])),Yr);const hp=Us.Z.Debouncer((function(e){return(0,G.jsxs)(zr,{immutable:e.immutable,children:[(0,G.jsx)(dp,{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,G.jsx)(qr,{children:(0,G.jsx)(Ur.Z,{href:"mailto:".concat(e.value.toString()),icon:"envelope",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));var mp=i(2205),gp=i.n(mp),vp=i(99489),yp=i.n(vp),bp=i(78718),wp=i.n(bp);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}function xp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Op(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Op(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kp(){kp=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)),yp()(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 gp()(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"!=xn()(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,i)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},kp.apply(this,arguments)}var Sp,Pp=["key","display","postcode","city","country","latitude","longitude"],jp=function(e){return e*Math.PI/180},_p=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):"",u=n?"/ ".concat(n.display):"";return{key:r,display:"".concat(r," ").concat(o," ").concat(c," ").concat(u),postcode:r,city:o,country:n,latitude:jp(a),longitude:jp(i)}};function Ep(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 Cp(){}function Dp(e){return!!(e||"").match(/\d/)}function Tp(e){return null==e}function Mp(e){return"number"==typeof e&&isNaN(e)}function Rp(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Ip(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 Np(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function Ap(e,t){return Array(t+1).join(e)}function Zp(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."+Ap("0",Math.abs(i))+o:i>=c?o+=Ap("0",i-c):o=(o.substring(0,i)||"0")+"."+o.substring(i),n+o}function Lp(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,o=Ip(e),a=o.beforeDecimal,i=o.afterDecimal,c=o.hasNegation,u=parseFloat("0."+(i||"0")),s=(i.length<=t?"0."+i:u.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}),s[0])+(r?".":"")+Np(s[1]||"",t,n)}function Fp(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 Hp(e){return Math.max(e.selectionStart,e.selectionEnd)}function Bp(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Up(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 Wp(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(Dp(e[n])||Dp(e[n-1]));return t}function zp(e,t,n,r,o,a){void 0===a&&(a=Cp);var i,c,u=(0,Z.useRef)(),s=(i=function(e){var t,a;return Tp(e)||Mp(e)?(a="",t=""):"number"==typeof e||n?(a="number"==typeof e?Zp(e):e,t=r(a)):(a=o(e,void 0),t=e),{formattedValue:t,numAsString:a}},(c=(0,Z.useRef)(i)).current=i,(0,Z.useRef)((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return c.current.apply(c,e)})).current),l=(0,Z.useState)((function(){return s(t)})),f=l[0],p=l[1];return(0,Z.useMemo)((function(){Tp(e)?u.current=void 0:(u.current=s(e),p(u.current))}),[e,s]),[f,function(e,t){p({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}]}function Yp(e){return e.replace(/[^0-9]/g,"")}function Vp(e){return e}function qp(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=Vp);var c=e.removeFormatting;void 0===c&&(c=Yp);var u=e.defaultValue,s=e.valueIsNumericString,l=e.onValueChange,f=e.isAllowed,p=e.onChange;void 0===p&&(p=Cp);var d=e.onKeyDown;void 0===d&&(d=Cp);var h=e.onMouseUp;void 0===h&&(h=Cp);var m=e.onFocus;void 0===m&&(m=Cp);var g=e.onBlur;void 0===g&&(g=Cp);var v=e.value,y=e.getCaretBoundary;void 0===y&&(y=Wp);var b=e.isValidInputCharacter;void 0===b&&(b=Dp);var w=Ep(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter"]),O=zp(v,u,Boolean(s),i,c,l),x=O[0],k=x.formattedValue,S=x.numAsString,P=O[1],j=(0,Z.useRef)();(0,Z.useEffect)((function(){var e=i(S);if(void 0===j.current||e!==j.current){var t=D.current,n=c(e,void 0);F({formattedValue:e,numAsString:n,input:t,setCaretPosition:!0,source:Sp.props,event:void 0})}}));var _=(0,Z.useState)(!1),E=_[0],C=_[1],D=(0,Z.useRef)(null),T=(0,Z.useRef)({setCaretTimeout:null,focusTimeout:null});(0,Z.useEffect)((function(){return C(!0),function(){clearTimeout(T.current.setCaretTimeout),clearTimeout(T.current.focusTimeout)}}),[]);var M=i,R=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},I=function(e,t,n){Fp(e,t),T.current.setCaretTimeout=setTimeout((function(){e.value===n&&Fp(e,t)}),0)},N=function(e,t,n){return Up(e,t,y(e),n)},A=function(e,t,n){var r=y(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 u=n.length,s=e.length,l={},f=new Array(u),p=0;p<u;p++){f[p]=-1;for(var d=0,h=s;d<h;d++)if(n[p]===e[d]&&!0!==l[d]){f[p]=d,l[d]=!0;break}}for(var m=r;m<u&&(-1===f[m]||!a(n[m]));)m++;var g=m===u||-1===f[m]?s:f[m];for(m=r-1;m>0&&-1===f[m];)m--;var v=-1===m||-1===f[m]?0:f[m]+1;return v>g?g:r-v<g-r?v:g}(t,k,e,n,r,b);return o=Up(t,o,r)},F=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 u=e.inputValue||n.value,s=Hp(n);n.value=t,c=A(u,t,s)}n.value=t,r&&void 0!==c&&I(n,c,t)}t!==k&&function(e,t){j.current=e.formattedValue,P(e,t)}(R(t,i),{event:a,source:o})},H=!E||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",B=Object.assign({inputMode:H},w,{type:t,value:k,onChange:function(e){(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}}}(k,e),o=Object.assign(Object.assign({},r),{lastValue:k}),a=c(e,o),i=M(a);if(a=c(i,void 0),f&&!f(R(i,a))){var u=t.target,s=Hp(u),l=A(e,k,s);return I(u,l,k),!1}return F({formattedValue:i,numAsString:a,inputValue:e,event:t,source:n,setCaretPosition:!0,input:t.target}),!0})(e.target.value,e,Sp.event)&&p(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=N(i,t,"ArrowLeft"===r?"left":"right");else"Delete"!==r||b(i[t])?"Backspace"!==r||b(i[t])||(c=N(i,t,"left")):c=N(i,t,"right");c!==t&&I(n,c,i),e.isUnitTestRun&&I(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=N(o,n);a!==n&&I(t,a,o)}h(e)},onFocus:function(e){e.persist&&e.persist();var t=e.target;D.current=t,T.current.focusTimeout=setTimeout((function(){var n=t.selectionStart,r=t.selectionEnd,o=t.value;void 0===o&&(o="");var a=N(o,n);a===n||0===n&&r===o.length||I(t,a,o),m(e)}),0)},onBlur:function(e){D.current=null,clearTimeout(T.current.focusTimeout),clearTimeout(T.current.setCaretTimeout),g(e)}});if("text"===n)return o?L().createElement(L().Fragment,null,o(k,w)||null):L().createElement("span",Object.assign({},w,{ref:a}),k);if(r){var U=r;return L().createElement(U,Object.assign({},B,{ref:a}))}return L().createElement("input",Object.assign({},B,{ref:a}))}function Gp(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,c=t.thousandsGroupStyle;if(void 0===c&&(c="thousand"),""===e||"-"===e)return e;var u=Kp(t),s=u.thousandSeparator,l=u.decimalSeparator,f=0!==n&&-1!==e.indexOf(".")||n&&r,p=Ip(e,i),d=p.beforeDecimal,h=p.afterDecimal,m=p.addNegation;return void 0!==n&&(h=Np(h,n,!!r)),s&&(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;case"thousand":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,s,c)),o&&(d=o+d),a&&(h+=a),m&&(d="-"+d),e=d+(f&&l||"")+h}function Kp(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 Xp(e,t,n){var r;void 0===t&&(t=Bp(e));var o=n.allowNegative,a=n.prefix;void 0===a&&(a="");var i=n.suffix;void 0===i&&(i="");var c=n.decimalScale,u=t.from,s=t.to,l=s.start,f=s.end,p=Kp(n),d=p.allowedDecimalSeparators,h=p.decimalSeparator,m=e[f]===h;if(Dp(e)&&(e===a||e===i)&&""===t.lastValue)return e;if(f-l==1&&-1!==d.indexOf(e[l])){var g=0===c?"":h;e=e.substring(0,l)+g+e.substring(l+1,e.length)}var v=function(e,t,n){var r=!1,o=!1;a.startsWith("-")?r=!1:e.startsWith("--")?(r=!1,o=!0):i.startsWith("-")&&e.length===i.length?r=!1:"-"===e[0]&&(r=!0);var c=r?1:0;return o&&(c=2),c&&(e=e.substring(c),t-=c,n-=c),{value:e,start:t,end:n,hasNegation:r}},y=v(e,l,f),b=y.hasNegation;e=(r=y).value,l=r.start,f=r.end;var w=v(t.lastValue,u.start,u.end),O=w.start,x=w.end,k=w.value,S=e.substring(l,f);!(e.length&&k.length&&(O>k.length-i.length||x<a.length))||S&&i.startsWith(S)||(e=k);var P=0;e.startsWith(a)?P+=a.length:l<a.length&&(P=l),f-=P;var j=(e=e.substring(P)).length,_=e.length-i.length;e.endsWith(i)?j=_:(f>_||f>e.length-i.length)&&(j=f),e=e.substring(0,j);var E=(e=((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}(b?"-"+e:e,o)).match(function(e,t){return new RegExp("(^-)|[0-9]|"+Rp(e),t?"g":void 0)}(h,!0))||[]).join("")).indexOf(h),C=Ip(e=e.replace(new RegExp(Rp(h),"g"),(function(e,t){return t===E?".":""})),o),D=C.beforeDecimal,T=C.afterDecimal,M=C.addNegation;return s.end-s.start<u.end-u.start&&""===D&&m&&!parseFloat(T)&&(e=M?"-":""),e}function Qp(e){var t=(e=function(e){var t=Kp(e),n=t.thousandSeparator,r=t.decimalSeparator,o=e.prefix;void 0===o&&(o="");var a=e.allowNegative;if(void 0===a&&(a=!0),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 ");return o.startsWith("-")&&a&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: "+o+"\n allowNegative: "+a+"\n "),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}(e)).decimalSeparator;void 0===t&&(t=".");e.allowedDecimalSeparators,e.thousandsGroupStyle,e.suffix;var n=e.allowNegative,r=e.allowLeadingZeros,o=e.onKeyDown;void 0===o&&(o=Cp);var a=e.onBlur;void 0===a&&(a=Cp);var i=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,s=e.prefix;void 0===s&&(s="");var l=e.defaultValue,f=e.value,p=e.valueIsNumericString,d=e.onValueChange,h=Ep(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=function(t){return Gp(t,e)},g=function(t,n){return Xp(t,n,e)},v=p;Tp(f)?Tp(l)||(v=null!=p?p:"number"==typeof l):v=null!=p?p:"number"==typeof f;var y=function(e){return Tp(e)||Mp(e)?e:("number"==typeof e&&(e=Zp(e)),v&&"number"==typeof c?Lp(e,c,Boolean(u)):e)},b=zp(y(f),y(l),Boolean(v),m,g,d),w=b[0],O=w.numAsString,x=w.formattedValue,k=b[1];return Object.assign(Object.assign({},h),{value:x,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===t||Dp(e)},onValueChange:k,format:m,removeFormatting:g,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 r=t.target,a=t.key,l=r.selectionStart,f=r.selectionEnd,p=r.value;if(void 0===p&&(p=""),l===f){"Backspace"===a&&"-"===p[0]&&l===s.length+1&&n&&Fp(r,1);var d=Kp(e),h=d.decimalSeparator,m=d.allowedDecimalSeparators;"Backspace"===a&&p[l-1]===h&&c&&u&&(Fp(r,l-1),t.preventDefault()),(null==m?void 0:m.includes(a))&&p[l]===h&&Fp(r,l+1);var g=!0===i?",":i;"Backspace"===a&&p[l-1]===g&&Fp(r,l-1),"Delete"===a&&p[l]===g&&Fp(r,l+1),o(t)}else o(t)},onBlur:function(t){var n=O;if(n.match(/\d/g)||(n=""),r||(n=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:"")}(n)),u&&c&&(n=Lp(n,c,u)),n!==O){var o=Gp(n,e);k({formattedValue:o,value:n,floatValue:parseFloat(n)},{event:t,source:Sp.event})}a(t)}})}function $p(e){var t=Qp(e);return L().createElement(qp,Object.assign({},t))}!function(e){e.event="event",e.props="prop"}(Sp||(Sp={}));var Jp,ed=["immutable"];function td(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 nd=(0,$.ZP)((function(e){e.immutable;var t=ar()(e,ed);return(0,G.jsx)($p,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?td(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):td(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t))})).withConfig({displayName:"StyledNumberEdit"})(Jp||(Jp=Q()(["\n &&&& {\n ","\n }\n"])),Yr);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 od(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ad=function(e){return 0!==e?Math.ceil(Math.log10(Math.abs(e)+1)):1},id=function(e){return null!=e&&!isNaN(parseFloat(e))},cd=function(e,t,n){return!id(n)||!(id(t)&&n>t)&&!(id(e)&&n<e)},ud=function(e,t){return function(n){var r=n.floatValue;return ad(r)<ad(e)||cd(e,t,r)}};const sd=(0,x.ZP)(Us.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,u=a.minValue,s=a.maxValue,l=a.allowNegative,f=a.fixedDecimalScale,p=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,s),g=od(od({isAllowed:ud(u,m),allowNegative:!!l},isNaN(c)?{}:{decimalScale:c}),{},{fixedDecimalScale:!!f});return(0,G.jsx)(zr,{immutable:e.immutable,children:(0,G.jsx)(nd,od(od({decimalSeparator:o,disabled:e.immutable,id:e.id,valueIsNumericString:!0,name:e.name,onValueChange:function(t){e.onChange&&cd(u,m,t.floatValue)&&e.onChange(void 0!==t.floatValue?t.floatValue:null)},immutable:e.immutable,thousandSeparator:r,value:e.value,suffix:p,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&&!cd(u,m,r)&&(t.target.value=null)}}))})}),800));const ld=Us.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,u=r||{},s=u.minValue,l=u.maxValue,f=u.format,p=u.allowLeadingZeros,d=u.suffix;return(0,G.jsx)(zr,{immutable:o,children:(0,G.jsx)(nd,{isAllowed:ud(s,l),allowNegative:!0,decimalScale:0,disabled:o,id:i,name:a,onValueChange:function(e){var t=e.value,r=e.floatValue,o=p?t:r;void 0===o&&(o=null),cd(s,l,r)&&n(o)},value:t,allowLeadingZeros:p,suffix:d,format:f,placeholder:c})})}),800);var fd,pd,dd,hd=$.ZP.div.withConfig({displayName:"StyledWrapper"})(fd||(fd=Q()(["\n display: flex;\n justify-content: stretch;\n"]))),md=$.ZP.div.withConfig({displayName:"StyledLocationWrapper"})(pd||(pd=Q()(["\n flex-grow: 1;\n"]))),gd=$.ZP.div.withConfig({displayName:"StyledDistanceWrapper"})(dd||(dd=Q()(["\n width: 50px;\n border-left: 1px solid ",";\n margin-left: ",";\n padding-left: ",";\n"])),oe.FS.color("border"),te.Z.space(-.8),te.Z.space(.5));function vd(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 yd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const bd=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,u=i.isLoading,s=i.fetchSuggestions,l=i.latitudeField,f=i.longitudeField,p=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?wp()(e,Pp):void 0}(r),v=function(e){return e?e.map(_p):[]}(c);return(0,G.jsxs)(hd,{children:[(0,G.jsx)(md,{children:(0,G.jsx)(ui,{id:t,immutable:n,onChange:function(e){o(yd(yd({},function(e,t){return t?xp(xp({},e),wp()(t,Pp)):Sn()(e,Pp)}(r,e)),{},{latitudeField:l,longitudeField:f}))},isLoading:u,options:v,searchOptions:function(e){var t=function(e){if(!e)return null;var t=H()(e.matchAll(kp(/([\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 xp(xp({},r?{city:r.city}:{}),n?{postcode:n.postcode}:{})}(e);s(t,null)},fetchOptions:function(e){e||s(null,null)},value:g,noResultsComp:function(e){return e.inputValue?d:p}})}),(0,G.jsx)(gd,{children:(0,G.jsx)(ld,{value:m,onChange:function(e){o(yd(yd({},r),{},{distance:e}))},immutable:n,options:{minValue:0,maxValue:100,suffix:" ".concat(h)}})})]})};var wd,Od=(0,Z.lazy)((function(){return i.e(85).then(i.bind(i,17676))})),xd=function(e){var t=e.onChange,n=e.immutable,r=e.value,o=e.options;if(n)return(0,G.jsx)(q.ZP.Span,{children:(0,G.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})});var a=o||{},i=a.contentLang,c=a.ckEditorConfig;return(0,G.jsx)(Z.Suspense,{fallback:wd||(wd=(0,G.jsx)("i",{})),children:(0,G.jsx)(Od,{onChange:function(e){t&&t(e)},value:r,contentLang:i,ckEditorConfig:c})})};xd.defaultProps={value:""};const kd=xd;var Sd,Pd;function jd(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 _d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ed=function(e){var t=e.onChange,n=e.options,r=e.value,o=e.id,a=e.immutable,i=e.name,c=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,G.jsxs)(q.ZP.Span,{children:[r," ",o," ",a," ",i]})},s=function(e){return function(n,o){var a=o.newValue;t(_d(_d({},r),{},g()({},e,a)))}},l=function(e,n){var r=n.suggestion;t(r)},f=function(e){return function(t){var r=t.value;n.fetchSuggestions(g()({},e,r),n.locationValues.country)}},p={id:o,value:r.postcode||"",onChange:s("postcode"),disabled:a},d={value:r.city||"",onChange:s("city"),disabled:a};return(0,G.jsx)(Mr,{children:function(e){var t,o,s,h=e.focused,m=e.getRef;return(0,G.jsxs)(Kr,{immutable:a,name:i,ref:m,children:[(0,G.jsx)(Sr(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:f("postcode"),getSuggestionValue:c("postcode"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:p,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!a}}),(h||r.city||r.postcode)&&(Sd||(Sd=(0,G.jsx)(q.ZP.Span,{children:"/"}))),(0,G.jsx)(Sr(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:f("city"),getSuggestionValue:c("city"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:d,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!a}}),(0,G.jsxs)(qr,{children:[n.isLoading&&(Pd||(Pd=(0,G.jsx)(kt.Z,{size:"1.8rem"}))),(s=n.locationValues,Boolean(s.city||s.postcode)&&!s.street&&(0,G.jsx)(Ur.Z,{href:(t=n.locationValues,o=t?Object.values(t).filter(Boolean).map((function(e){return"object"===xn()(e)&&e.display?e.display:e})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(o)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:n.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};function Cd(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 Dd=function(e){return(0,G.jsx)(ui,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Td(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 Md=function(e){return(0,G.jsx)(ui,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Td(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Td(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};var Rd,Id=i(48926),Nd=i.n(Id),Ad=i(87757),Zd=i.n(Ad);const Ld=$.ZP.input.attrs((function(e){return{type:"tel"}})).withConfig({displayName:"StyledPhoneEdit"})(Rd||(Rd=Q()(["\n &&&& {\n ","\n }\n"])),Yr);const Fd=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.onLibLoaded,c=Xe()(e,"options.defaultCountry")||"CH",u=(0,Z.useState)(null),s=U()(u,2),l=s[0],f=s[1],p=L().createRef();(0,Z.useEffect)((function(){(function(){var e=Nd()(Zd().mark((function e(){var t;return Zd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([i.e(631),i.e(877)]).then(i.bind(i,41866));case 2:t=e.sent,f(t),a&&a();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[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,G.jsxs)(zr,{immutable:r,children:[(0,G.jsx)(Ld,{disabled:r||!l,id:o,name,onChange:function(e){var r=e.target.value,o=l?l.parseNumber(r,c):r,a=xr()(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(p.current))}}(r,n,i)},immutable:r||!l,ref:p,value:h}),h&&(0,G.jsx)(qr,{children:(0,G.jsx)(Ur.Z,{href:"tel:".concat(n),icon:"phone",tabIndex:-1,target:"_blank",neutral:!0})})]})};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 Bd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ud=function(e){return e.map((function(e){return wp()(e,["key","display"])}))};const Wd=function(e){var t=e.id,n=e.immutable,r=e.onChange,o=e.options.isMulti,a=e.value;return(0,G.jsx)(ui,{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 Bd(Bd({},e),t.includes(e.key)?{selected:!0}:{selected:!1})}));r({options:n})},value:Ud(a.options.filter((function(e){return e.selected}))),openMenuOnClick:!0,options:Ud(a.options)})};function zd(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 Yd=function(e){return(0,G.jsx)(ui,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!1,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Vd(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 qd=function(e){return(0,G.jsx)(ui,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Gd(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 Kd=function(e){return(0,G.jsx)(ui,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,immutable:e.immutable,isMulti:!1,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};const Xd=Us.Z.Debouncer((function(e){return(0,G.jsx)(zr,{immutable:e.immutable,children:(0,G.jsx)(dp,{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 Qd=function(){var e,t=(null===(e=navigator)||void 0===e?void 0:e.userAgent)||"";return/^((?!chrome|android).)*safari/i.test(t)};var $d,Jd,eh,th=(0,$.iv)($d||($d=Q()(["\n ","\n width: 100%;\n grid-area: 1 / 1 / 2 / 2;\n max-height: 25rem;\n box-sizing: border-box;\n"])),Yr),nh=$.ZP.div.withConfig({displayName:"StyledSizeWrapper"})(Jd||(Jd=Q()(["\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"])),th),rh=$.ZP.textarea.withConfig({displayName:"StyledTextarea"})(eh||(eh=Q()(["\n &&&& {\n ","\n resize: none;\n margin: 0;\n min-height: 4em;\n }\n"])),th);function oh(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 ah(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ih=function(e){var t=e.value,n=e.onChange,r=e.name,o=e.id,a=e.disabled,i=e.immutable,c=(0,Z.useState)(t),u=U()(c,2),s=u[0],l=u[1],f=!Qd(),p=(0,Z.useCallback)(ro()(l,500,{trailing:!0}),[]);return(0,Z.useEffect)((function(){f&&p(t)}),[t,f,p]),(0,G.jsx)(nh,ah(ah({"data-testid":"replicated-test"},f?{"data-replicated-value":s}:{}),{},{children:(0,G.jsx)(rh,{value:t,name:r,id:o,onChange:n,disabled:a,immutable:i,rows:"1"})}))};const ch=Us.Z.Debouncer((function(e){return(0,G.jsx)(zr,{immutable:e.immutable,children:(0,G.jsx)(ih,{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 uh;const sh=$.ZP.input.withConfig({displayName:"StyledTimeEdit"})(uh||(uh=Q()(["\n &&&& {\n ","\n }\n"])),Yr);function lh(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 fh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ph=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.name,i=qs(n,t),c=i.inputProps,u=i.clearButtonProps,s=n&&!r;return(0,G.jsxs)(zr,{immutable:r,children:[(0,G.jsx)(sh,fh({type:"text",disabled:r,id:o,immutable:r,name:a},c)),s&&(0,G.jsx)(qr,{children:(0,G.jsx)($e.Z,fh(fh({icon:"times"},u),{},{tabIndex:-1}))})]})};var dh;const hh=$.ZP.input.attrs((function(e){return{type:"url"}})).withConfig({displayName:"StyledUrlEdit"})(dh||(dh=Q()(["\n &&&& {\n ","\n }\n"])),Yr);const mh=Us.Z.Debouncer((function(e){return(0,G.jsxs)(zr,{immutable:e.immutable,children:[(0,G.jsx)(hh,{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,G.jsx)(qr,{children:(0,G.jsx)(Ur.Z,{href:e.value,icon:"external-link",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));function gh(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 vh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yh={boolean:pi,"boolean-select":si,choice:Si,code:Ri,date:nl,datetime:ol,document:op,duration:fp,email:hp,geosearch:bd,html:kd,integer:ld,address:Jr,location:Ed,"multi-remote":Dd,"multi-select":Md,number:sd,phone:Fd,"pseudo-select":Wd,remote:Yd,"search-filter":qd,"single-select":Kd,string:Xd,text:ch,url:mh,time:ph};const bh=function(e){var t=e.componentType,n=e.value,r=e.options,o=e.id,a=e.events,i=e.placeholder,c=e.readOnly,u=void 0!==c&&c;if(yh[t]){var s=yh[t],l=vh(vh({},Sn()(a,"onChange")),{},{onBlur:function(){"function"==typeof(null==a?void 0:a.onBlur)&&a.onBlur(n)}});return(0,G.jsx)("div",vh(vh({},l),{},{"data-cy":"form-field",children:(0,G.jsx)(s,vh(vh({value:n,onChange:null==a?void 0:a.onChange},xr()(r)?{}:{options:r}),{},{id:o,immutable:u,placeholder:i,events:a}))}))}return console.log("No type-editor defined for component type",t),null};function wh(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 Oh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const xh=function(e){return(0,G.jsx)(Gr,{children:(0,G.jsx)(bh,Oh({componentType:e.type},Sn()(e,"type")))})};function kh(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 Sh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ph="yyyy-MM-dd",jh=function(e){return _s(e,Ph)?Ss(e,Ph,new Date):_s(e,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")||_s(e,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")?Es(new Date(e)):null};const _h={datetime:{type:"date",toRange:function(e){return{from:e?jh(e).toISOString():null,to:e?function(e,t){(0,ec.Z)(2,arguments);var n=(0,jc.Z)(e),r=(0,tc.Z)(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(jh(e),1).toISOString():null,isRangeValue:!0}},fromRange:function(e){return null!=e&&e.from?(0,Bs.Z)(new Date(e.from),Ph):null!=e&&e.to?(0,Bs.Z)(new Date(e.to),Ph):null},getToOptions:function(e,t){return Sh(Sh({},e),{},{datePickerOptions:Sh({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return Sh(Sh({},e),{},{datePickerOptions:Sh({maxDate:t},null==e?void 0:e.datePickerOptions)})}},date:{getToOptions:function(e,t){return Sh(Sh({},e),{},{datePickerOptions:Sh({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return Sh(Sh({},e),{},{datePickerOptions:Sh({maxDate:t},null==e?void 0:e.datePickerOptions)})}}};var Eh,Ch,Dh,Th,Mh,Rh=$.ZP.div.withConfig({displayName:"StyledIconWrapper"})(Eh||(Eh=Q()(["\n font-size: ",";\n"])),te.Z.font(-2.7)),Ih=$.ZP.div.withConfig({displayName:"StyledRange"})(Ch||(Ch=Q()(["\n display: flex;\n align-items: baseline;\n"]))),Nh=$.ZP.div.withConfig({displayName:"StyledInput"})(Dh||(Dh=Q()(["\n flex: 1;\n display: flex;\n flex-direction: column;\n"]))),Ah=(0,$.ZP)($e.Z).withConfig({displayName:"StyledBall"})(Th||(Th=Q()(["\n position: relative;\n top: 0.5px; // offset false vertical alignment\n"])));function Zh(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 Lh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Fh=function(e){var t=e.value,n=e.events,r=e.readOnly,o=e.type,a=e.options,i=e.fromText,c=e.toText,u=_h[o],s=(null==t?void 0:t.isRangeValue)||!1,l=(0,Z.useRef)(t);l.current=t;var f=(0,Z.useMemo)((function(){return Lh(Lh({},n),{},{onChange:n.onChange})}),[n]),p={onChange:function(e){n.onChange(Lh(Lh({},l.current),{},{to:e}))}},d={onChange:function(e){n.onChange(Lh(Lh({},l.current),{},{from:e}))}},h=(null==u?void 0:u.type)||o,m=(0,G.jsx)(xh,Lh(Lh({type:h},Sn()(e,["type"])),{},{events:f})),g=(0,G.jsxs)(Nh,{children:[(0,G.jsx)(xh,Lh(Lh({},e),{},{options:function(e,t){return null!=u&&u.getFromOptions?u.getFromOptions(e,t):e}(a,null==t?void 0:t.to),value:(null==t?void 0:t.from)||null,events:d,placeholder:i})),Mh||(Mh=(0,G.jsx)(Rh,{children:(0,G.jsx)(V.Z,{icon:"horizontal-rule"})})),(0,G.jsx)(xh,Lh(Lh({},e),{},{options:function(e,t){return null!=u&&u.getToOptions?u.getToOptions(e,t):e}(a,null==t?void 0:t.from),value:(null==t?void 0:t.to)||null,events:p,placeholder:c}))]});return(0,G.jsxs)(Ih,{children:[s?g:m,(0,G.jsx)(Ah,{disabled:r,icon:s?"square-minus":"square-plus",onClick:function(){var e=s?function(e){return null!=u&&u.fromRange?u.fromRange(e):(null==e?void 0:e.from)||(null==e?void 0:e.to)||null}(t):function(e){return null!=u&&u.toRange?u.toRange(e):{from:e,to:e,isRangeValue:!0}}(t);n.onChange(e)}})]})};function Hh(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 n=null!=arguments[t]?arguments[t]:{};t%2?Hh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Uh=function(e){var t,n=e.componentType,r=e.mappingType,o=e.range,a=e.formField,i=e.entityField,c=e.formName,u=e.value,s=e.info,l=e.events,f=e.formData,p=a.dataType||a.componentType,d=null===(t=br[r||"editable"])||void 0===t?void 0:t[p],h=function(e,t,n,r,o){return null!=e&&e.getOptions?e.getOptions({formField:t,formName:n,formData:r,entityField:o}):{}}(d,a,c,f,i),m=function(e,t,n,r,o,a){return null!=e&&e.getValue?e.getValue({formField:t,formName:n,formData:r,entityField:o,value:a}):a}(d,a,c,f,i,u),g=function(e,t,n,r,o,a){return null!=e&&e.getEvents?e.getEvents({formField:t,formName:n,formData:r,entityField:o,events:a}):a}(d,a,c,f,i,l),v=o?Fh:xh;return(0,G.jsx)(v,Bh(Bh({type:n,events:g,value:m},s),{},{options:h},o&&{fromText:f.intl.formatMessage({id:"client.component.range.from"}),toText:f.intl.formatMessage({id:"client.component.range.to"})}))};const Wh=function(e,t){return function(n){return(0,G.jsx)(Uh,Bh({componentType:e,range:t},n))}};var zh=i(42060);const Yh={dataContainerProps:function(){return{tooltips:["Resource"],navigationStrategy:!0}},getOptions:function(e){var t=e.formData;return t?{downloadTitle:t.intl.formatMessage({id:"client.component.upload.downloadTitle"}),tooltips:Xe()(t.tooltips,"Resource",null),loadTooltip:function(e){return t.loadTooltip("Resource",e)}}:{}}},Vh={dataContainerProps:function(e){return{tooltips:[e.formField.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formData;return{tooltips:Xe()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},navigationStrategy:n.navigationStrategy,linkProps:{entityName:t.targetEntity}}}},qh={binary:Yh,document:Yh,image:Yh,"multi-remote-field":Vh,"single-remote-field":Vh,description:{getOptions:function(e){var t=e.formField;return{mode:t.mode,title:t.title}},getValue:function(e){return e.formField.text}},number:{getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null)}}},moneyamount:{getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",2)}}},percent:{getValue:function(e){return e.value/100},getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null)}}}};function Gh(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 Kh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xh=function(e){var t=e.componentType,n=e.formField,r=e.value,o=e.formData,a=e.key,i=e.breakWords,c=n.dataType||n.componentType,u=qh[c],s=function(e,t,n){return null!=e&&e.getOptions?e.getOptions({formField:t,formData:n}):{}}(u,n,o),l=function(e,t,n,r){return null!=e&&e.getValue?e.getValue({formField:t,formData:n,value:r}):r}(u,n,o,r);return(0,G.jsx)(zh.Z,{type:t,value:l,options:s,breakWords:i},a)};const Qh=function(e){return function(t){return(0,G.jsx)(Xh,Kh(Kh({},t),{},{componentType:e}))}};function $h(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 Jh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$h(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var em={address:Wh("address"),binary:Wh("document"),birthdate:Wh("date"),boolean:Wh("boolean"),char:Wh("string"),choice:Wh("choice"),code:Wh("code"),count:Wh("string"),counter:Wh("integer"),createts:Wh("datetime"),createuser:Wh("string"),"compressed-text":Wh("text"),date:Wh("date"),datetime:Wh("datetime"),decimal:Wh("number"),display:Qh("html"),description:Qh("description"),document:Wh("document"),double:Wh("number"),duration:Wh("duration"),email:Wh("email"),"fulltext-search":Wh("string"),html:Wh("html"),image:Wh("document"),identifier:Wh("string"),integer:Wh("integer"),ipaddress:Wh("string"),latitude:Wh("string"),location:Wh("location"),login:Wh("string"),long:Wh("integer"),longitude:Wh("string"),marking:Wh("boolean"),moneyamount:Wh("number"),"multi-remote-field":Wh("multi-remote"),"multi-select-box":Wh("multi-select"),"named-upload":Wh("document"),percent:Wh("number"),phone:Wh("phone"),postcode:Wh("string"),"pseudo-select":Wh("pseudo-select"),"pulldown-date":Wh("date"),"search-filter":Wh("search-filter"),serial:Wh("string"),"single-remote-field":Wh("remote"),"single-select-box":Wh("single-select"),sorting:Wh("integer"),string:Wh("string"),text:Wh("text"),"text-area":Wh("text"),time:Wh("time"),updatets:Wh("datetime"),updateuser:Wh("string"),upload:Wh("document"),url:Wh("url"),uuid:Wh("string"),version:Wh("integer")},tm={binary:Qh("document"),birthdate:Qh("date"),boolean:Qh("boolean"),code:Qh("text"),char:Qh("string"),choice:Wh("choice"),counter:Qh("integer"),createuser:Qh("string"),createts:Qh("datetime"),"compressed-text":Qh("text"),"data-amount":Qh("number"),date:Qh("date"),datetime:Qh("datetime"),decimal:Qh("number"),display:Qh("html"),description:Qh("description"),duration:Qh("duration"),document:Qh("document"),double:Qh("number"),email:Qh("email"),html:Qh("html"),image:Qh("document"),ipaddress:Qh("string"),identifier:Qh("string"),latitude:Qh("string"),login:Qh("string"),long:Qh("integer"),longitude:Qh("string"),moneyamount:Qh("number"),"multi-remote-field":Qh("multi-remote"),"multi-select-box":Qh("multi-select"),"named-upload":Qh("document"),integer:Qh("integer"),percent:Qh("percent"),phone:Qh("phone"),postcode:Qh("string"),"pseudo-select":Wh("pseudo-select"),"pulldown-date":Qh("date"),remote:Qh("remote"),"search-filter":Qh("search-filter"),serial:Qh("string"),"single-remote-field":Qh("remote"),"single-select-box":Qh("single-select"),sorting:Qh("integer"),string:Qh("string"),text:Qh("text"),"text-area":Qh("text"),time:Qh("time"),updatets:Qh("datetime"),updateuser:Qh("string"),upload:Qh("document"),url:Qh("url"),uuid:Qh("string"),version:Qh("integer")};const nm={editable:em,readOnly:tm,list:Jh(Jh({},tm),{},{binary:Qh("document-compact"),document:Qh("document-compact"),image:Qh("document-compact")}),search:Jh(Jh({},em),{},{url:Wh("string"),text:Wh("string"),geosearch:Wh("geosearch"),html:Wh("string"),birthdate:Wh("date",!0),code:Qh("text",!0),date:Wh("date",!0),updatets:Wh("datetime",!0),createts:Wh("datetime",!0),datetime:Wh("datetime",!0),moneyamount:Wh("number",!0),percent:Wh("number",!0),long:Wh("integer",!0),integer:Wh("integer",!0),decimal:Wh("number",!0),counter:Wh("integer",!0),time:Wh("time",!0),boolean:Wh("boolean-select"),marking:Wh("boolean-select")})};var rm;const om=function(e,t){return nm[e]&&nm[e][t]?nm[e][t]:(wr.Z.log("Unable to display field: unknown mapping type combination (".concat(e," / ").concat(t,")")),function(){return rm||(rm=(0,G.jsx)("span",{}))})};var am,im,cm,um,sm,lm,fm,pm,dm,hm=$.ZP.div.withConfig({displayName:"StyledMergeErrorWrapper"})(am||(am=Q()(["\n ","\n padding: "," 0 0 ",";\n"])),(0,et.Z)(),te.Z.space(-1),te.Z.space(0)),mm=$.ZP.div.withConfig({displayName:"StyledSummaryErrorWrapper"})(im||(im=Q()(["\n display: grid;\n align-items: center;\n grid-template-columns: "," 1fr;\n grid-column-gap: ",";\n margin-bottom: ",";\n"])),te.Z.font(10),te.Z.space(-.5),te.Z.space(-.7)),gm=$.ZP.span.withConfig({displayName:"StyledIconWrapper"})(cm||(cm=Q()(["\n display: flex;\n align-items: center;\n color: ",";\n font-size: ",";\n"])),oe.FS.color("signal.danger"),te.Z.font(10)),vm=$.ZP.p.withConfig({displayName:"StyledError"})(um||(um=Q()([""]))),ym=$.ZP.div.withConfig({displayName:"StyledLabelWrapper"})(sm||(sm=Q()(["\n display: flex;\n align-items: center;\n\n label {\n vertical-align: bottom;\n }\n"]))),bm=$.ZP.div.withConfig({displayName:"StyledTableWrapper"})(lm||(lm=Q()(["\n flex: 1;\n"]))),wm=$.ZP.span.withConfig({displayName:"StyledStatusWrapper"})(fm||(fm=Q()(["\n color: ",";\n"])),(function(e){return e.isChecked?oe.FS.color("signal.success"):oe.FS.color("signal.danger")})),Om=function(e,t){return 0===Object.keys(de.Z.difference(e,t)).length},xm=L().memo((function(e){var t=e.entityData,n=e.entityKey,r=e.name,o=e.setSelectedMultipleAll,a=e.isSelected,i=e.navigationStrategy;if(0===t.value.totalKeys)return null;return(0,G.jsxs)(ym,{children:[(0,G.jsx)("input",{type:"checkbox",onChange:function(e){return o(r,n,e.target.checked)},checked:a,id:"".concat(r).concat(n)}),(0,G.jsxs)(q.ZP.Label,{for:"".concat(r).concat(n),children:[pm||(pm=(0,G.jsx)(Y.Z,{id:"client.merge.allRelations"}))," ",(0,G.jsx)(K,{model:t.value.relationEntity,keys:t.value.keys,totalKeys:t.value.totalKeys,navigationStrategy:i})]})]})}),Om),km=L().memo((function(e){var t=e.entityData,n=e.entityKey,r=e.name,o=e.setSelectedMultiple,a=e.selectedMultiple,i=function(e){return Xe()(a,[r,e])===n},c=function(e,t){return o(r,n,e,t)},u=function(e,t){return e===t?"checked":t>0?"indeterminate":"unchecked"}(t.value.length,t.value.filter((function(e){return i(e.key)})).length);return(0,G.jsxs)(G.Fragment,{children:[t.value.length>0&&(0,G.jsxs)(ym,{children:[(0,G.jsx)(ye,{value:u,onChange:function(e){t.value.forEach((function(t){var n="checked"===e;i(t.key)!==n&&c(t.key,n)}))},id:"".concat(r).concat(n)}),(0,G.jsx)(q.ZP.Label,{for:"".concat(r).concat(n),children:dm||(dm=(0,G.jsx)(Y.Z,{id:"client.merge.allRelations"}))})]}),t.value.map((function(e){return(0,G.jsxs)(ym,{children:[(0,G.jsx)("input",{type:"checkbox",onChange:function(t){return c(e.key,t.target.checked)},checked:i(e.key),id:"".concat(r).concat(n,"-").concat(e.key)}),(0,G.jsx)(q.ZP.Label,{for:"".concat(r).concat(n,"-").concat(e.key),children:(0,G.jsx)(zh.Z,{type:"single-select",value:e})})]},"relation-checkbox-".concat(e.key))}))]})}),Om),Sm=L().memo((function(e){var t=e.entityData,n=e.entityKey,r=e.name,o=e.setSelectedSingle,a=e.isSelected,i=t.type,c=t.writable,u={entity:"single-select-box"}[i]||i,s=om("list",u);return(0,G.jsxs)(ym,{children:[(0,G.jsx)("input",{type:"radio",name:r,onChange:function(){o(r,n)},checked:a,id:"".concat(r).concat(n),disabled:!c}),(0,G.jsx)(q.ZP.Label,{for:"".concat(r).concat(n),children:(0,G.jsx)(s,{mappingType:"list",formField:{dataType:u},value:t.value})})]})}),Om);const Pm=function(e){var t=e.rowData,n=e.column,r=e.setSelectedSingle,o=e.selectedSingle,a=e.setSelectedMultiple,i=e.selectedMultiple,c=e.setSelectedMultipleAll,u=e.selectedMultipleAll,s=e.navigationStrategy,l=n.entityKey,f=t[l],p=f.type,d=t.__key;return"relations"===p?(0,G.jsx)(xm,{entityData:f,entityKey:l,name:d,setSelectedMultipleAll:c,isSelected:Xe()(u,[d],[]).includes(l),navigationStrategy:s}):"entity-list"===p?(0,G.jsx)(km,{entityData:f,entityKey:l,name:d,setSelectedMultiple:a,selectedMultiple:i}):(0,G.jsx)(Sm,{entityData:f,entityKey:l,name:d,setSelectedSingle:r,isSelected:o[d]===l})};var jm={setSelectedSingle:function(e,t){return{type:j,payload:{name:e,entityKey:t}}},setSelectedMultiple:function(e,t,n,r){return{type:_,payload:{name:e,entityKey:t,relatedEntityKey:n,isSelected:r}}},setSelectedMultipleAll:function(e,t,n){return{type:E,payload:{name:e,entityKey:t,isSelected:n}}}};const _m=(0,k.connect)((function(e){return{selectedSingle:e.merge.selected.single,selectedMultiple:e.merge.selected.multiple,selectedMultipleAll:e.merge.selected.multipleAll,navigationStrategy:e.input.navigationStrategy}}),jm)((0,x.ZP)(Pm));var Em;const Cm=function(e){var t=e.label,n=e.entityKey,r=e.setTargetEntity,o=e.targetEntity,a=e.mergeStrategyDisplay,i=o===n,c=i?Em||(Em=(0,G.jsx)(Y.Z,{id:"client.merge.strategy.keep"})):a;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("input",{type:"radio",name:"column",onChange:function(){return r(n)},checked:i,id:"targetEntity".concat(n)}),(0,G.jsxs)(q.ZP.Label,{for:"targetEntity".concat(n),children:[(0,G.jsx)(q.ZP.B,{children:t}),(0,G.jsxs)(wm,{isChecked:i,children:[" (",c,")"]})]})]})};var Dm={setTargetEntity:N};const Tm=(0,k.connect)((function(e){return{targetEntity:e.merge.selected.targetEntity,mergeStrategyDisplay:e.merge.sourceData.mergeStrategyDisplay}}),Dm)((0,x.ZP)(Cm));var Mm;y().arrayOf(y().shape({model:y().string,key:y().string,paths:y().objectOf(y().objectOf(y().arrayOf(y().string))),entityValidatorErrors:y().objectOf(y().arrayOf(y().string))}));const Rm=function(e){var t=e.sourceData,n=e.mergeErrorMsg,r=e.mergeValidationErrors.map((function(e){var n=Object.keys(e.paths).map((function(n){return Object.keys(e.paths[n]).map((function(r){return e.paths[n][r].map((function(e,o){return(0,G.jsxs)(vm,{children:[t.labels[n],": ",e]},"paths-".concat(n,"-").concat(r,"-").concat(o))}))}))})),r=Object.keys(e.entityValidatorErrors).map((function(t){return e.entityValidatorErrors[t].map((function(e,n){return(0,G.jsx)(vm,{children:e},"entity-".concat(t,"-").concat(n))}))}));return[].concat(H()(n),H()(r))}));return(0,G.jsxs)(hm,{children:[(r.length>0||Boolean(n))&&(Mm||(Mm=(0,G.jsxs)(mm,{children:[(0,G.jsx)(gm,{children:(0,G.jsx)(V.Z,{icon:"times"})}),(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.error"})})]}))),Boolean(n)&&(0,G.jsx)(vm,{children:n}),r]})};var Im,Nm,Am=function(e){var t=e.rowIdx,n=e.sourceData,r=e.allPaths[t];return(0,G.jsx)(q.ZP.B,{children:n.labels[r]})};const Zm=function(e){var t=e.sourceData,n=e.mergePending,r=e.mergeErrorMsg,o=e.mergeValidationErrors,a=e.executeMerge,i=(0,Z.useMemo)((function(){return t?function(e){var t=vn(e).map((function(t,n){return e.entities.reduce((function(n,r){var o=r.paths[t];return o&&o.value&&("entity"===o.type&&(o.value.display=wn(e,o.value.model,o.value.key)),"entity-list"===o.type&&(o.value=o.value.map((function(t){return t.display=wn(e,t.model,t.key),t})))),gn(gn({},n),{},g()({},r.key,o))}),{__key:t})})),n=yn(e).map((function(t,n){return e.relations.filter((function(e){return e.relationName===t})).reduce((function(e,t){return gn(gn({},e),{},g()({},t.entityKey,{type:"relations",value:{keys:t.keys,totalKeys:t.totalKeys,relationEntity:t.relationEntity}}))}),{__key:t})})),r=bn(e);return[].concat(H()(t),H()(n)).sort((function(e,t){return r.findIndex((function(t){return t===e.__key}))-r.findIndex((function(e){return e===t.__key}))}))}(t):[]}),[t]),c=(0,Z.useMemo)((function(){return t?function(e,t,n,r){var o=e.entities.map((function(r){return{id:r.key,entityKey:r.key,resizable:!0,sorting:{sortable:!1},CellRenderer:n,HeaderRenderer:function(n){return(0,G.jsx)(t,gn(gn({},n),{},{entityKey:r.key,label:wn(e,r.model,r.key)}))}}}));return[{id:"column-label",label:"",resizable:!0,sorting:{sortable:!1},CellRenderer:function(t){return(0,G.jsx)(r,gn(gn({},t),{},{sourceData:e,allPaths:bn(e)}))}}].concat(H()(o))}(t,Tm,_m,Am):[]}),[t]);return n?Im||(Im=(0,G.jsx)(pe.Z,{})):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ne,{children:(0,G.jsx)(re,{onClick:a,look:"raised",ink:"primary",disabled:null===t,children:Nm||(Nm=(0,G.jsx)(Y.Z,{id:"client.merge.saveButton"}))})}),(0,G.jsxs)(bm,{children:[(0,G.jsx)(Rm,{sourceData:t,mergeErrorMsg:r,mergeValidationErrors:o}),(0,G.jsx)(hn,{columns:c,data:i,selectionStyle:"none",dataLoadingInProgress:null===t,onColumnPositionChange:function(){}})]})]})};var Lm={executeMerge:function(){return{type:D}}};const Fm=(0,k.connect)((function(e){return{sourceData:e.merge.sourceData,mergePending:e.merge.mergePending,mergeErrorMsg:e.merge.mergeErrorMsg,mergeValidationErrors:e.merge.mergeValidationErrors}}),Lm)((0,x.ZP)(Zm));var Hm,Bm,Um,Wm=$.ZP.div.withConfig({displayName:"StyledMerge"})(Hm||(Hm=Q()(["\n height: 100%;\n overflow: hidden;\n background-color: ",";\n display: flex;\n flex-direction: column;\n"])),J.Z.color("paper"));const zm=function(e){var t=e.initialize,n=e.mergeDone;return(0,Z.useEffect)((function(){t()}),[t]),(0,G.jsx)(Wm,{children:n?Bm||(Bm=(0,G.jsx)(fe,{})):Um||(Um=(0,G.jsx)(Fm,{}))})};var Ym={initialize:function(){return{type:S}}};const Vm=(0,k.connect)((function(e){return{mergeDone:!!e.merge.mergeResponse}}),Ym)((0,x.ZP)(zm));var qm,Gm=i(34857),Km=i(31921),Xm=i.n(Km),Qm=i(81770);function $m(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 Jm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$m(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var eg=function(e,t){for(var n=function(){var n=U()(o[r],2),a=n[0],i=n[1];"entity-list"===i.type&&i.value.map((function(e){return e.key})).forEach((function(n){Xm()(e,[a,n],t.key,Object)}))},r=0,o=Object.entries(t.paths);r<o.length;r++)n()},tg=(qm={},g()(qm,P,Qm.Z.singleTransferReducer("sourceData")),g()(qm,D,(function(e){return Jm(Jm({},e),{},{mergePending:!0})})),g()(qm,T,(function(e,t){var n=t.payload.mergeResponse;return Jm(Jm({},e),{},{mergePending:!1,mergeResponse:n})})),g()(qm,M,(function(e,t){var n=t.payload,r=n.errorMsg,o=n.validationErrors;return Jm(Jm({},e),{},{mergePending:!1,mergeErrorMsg:r,mergeValidationErrors:o})})),g()(qm,j,(function(e,t){var n=t.payload,r=n.name,o=n.entityKey;return Jm(Jm({},e),{},{selected:Jm(Jm({},e.selected),{},{single:Jm(Jm({},e.selected.single),{},g()({},r,o))})})})),g()(qm,_,(function(e,t){var n,r=t.payload,o=r.name,a=r.entityKey,i=r.relatedEntityKey;return r.isSelected?n=Jm(Jm({},e.selected.multiple),{},g()({},o,Jm(Jm({},e.selected.multiple[o]),{},g()({},i,a)))):(n=Jm({},e.selected.multiple))[o]=Sn()(n[o],[i]),Jm(Jm({},e),{},{selected:Jm(Jm({},e.selected),{},{multiple:n})})})),g()(qm,E,(function(e,t){var n,r=t.payload,o=r.name,a=r.entityKey;return n=r.isSelected?[].concat(H()(e.selected.multipleAll[o]||[]),[a]):e.selected.multipleAll[o].filter((function(e){return e!==a})),Jm(Jm({},e),{},{selected:Jm(Jm({},e.selected),{},{multipleAll:Jm(Jm({},e.selected.multipleAll),{},g()({},o,n))})})})),g()(qm,C,(function(e,t){for(var n=t.payload.entityKey,r={},o={},a=e.sourceData.entities.find((function(e){return e.key===n})),i=0,c=Object.entries(a.paths);i<c.length;i++){var u=U()(c[i],2),s=u[0];"entity-list"!==u[1].type&&(r[s]=n)}e.sourceData.entities.filter((function(e){return e.key!==n})).forEach((function(e){return eg(o,e)})),eg(o,a);var l=e.sourceData.relations.reduce((function(e,t){return Jm(Jm({},e),{},g()({},t.relationName,[].concat(H()(e[t.relationName]||[]),[t.entityKey])))}),{});return Jm(Jm({},e),{},{selected:Jm(Jm({},e.selected),{},{targetEntity:n,single:r,multiple:o,multipleAll:l})})})),qm),ng={sourceData:null,mergePending:!1,mergeResponse:null,mergeErrorMsg:null,mergeValidationErrors:[],selected:{targetEntity:null,single:{},multiple:{},multipleAll:{}}};var rg=i(44908),og=i.n(rg),ag=i(81719),ig=Zd().mark(hg),cg=Zd().mark(mg),ug=Zd().mark(gg),sg=Zd().mark(vg),lg=Zd().mark(yg),fg=Zd().mark(bg),pg=function(e){return e.merge},dg=function(e){return e.input};function hg(){return Zd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Gm.$6)([(0,Gm.Fm)(S,mg),(0,Gm.Fm)(D,yg),(0,Gm.Fm)(R,bg)]);case 2:case"end":return e.stop()}}),ig)}function mg(){var e,t;return Zd().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Gm.Ys)(dg);case 2:return e=n.sent,t=e.selection,n.next=6,(0,Gm.RE)(gg,t);case 6:case"end":return n.stop()}}),cg)}function gg(e){var t,n,r;return Zd().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return"merge/sourceData",t={method:"POST",body:e},o.next=4,(0,Gm.RE)(ag.Z.requestSaga,"merge/sourceData",t);case 4:return n=o.sent,r=n.body,o.next=8,(0,Gm.gz)(I(r));case 8:return o.next=10,(0,Gm.gz)(N(r.entities[0].key));case 10:case"end":return o.stop()}}),ug)}function vg(){var e,t,n,r,o,a,i,c,u,s,l;return Zd().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,Gm.Ys)(pg);case 2:e=f.sent,t=e.selected,n=e.sourceData,r={},o=Zd().mark((function e(){var t,o,c,u;return Zd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=U()(i[a],2),o=t[0],c=t[1],(u=n.entities.find((function(e){return e.key===c})).paths[o]).writable&&("entity"===u.type?null===u.value?r[o]=null:r[o]={key:u.value.key}:r[o]=c);case 3:case"end":return e.stop()}}),e)})),a=0,i=Object.entries(t.single);case 8:if(!(a<i.length)){f.next=13;break}return f.delegateYield(o(),"t0",10);case 10:a++,f.next=8;break;case 13:c=Zd().mark((function e(){var t,n,o;return Zd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=U()(s[u],2),n=t[0],o=t[1],r[n]=[],Object.keys(o).forEach((function(e){return r[n].push({key:e})}));case 3:case"end":return e.stop()}}),e)})),u=0,s=Object.entries(t.multiple);case 15:if(!(u<s.length)){f.next=20;break}return f.delegateYield(c(),"t1",17);case 17:u++,f.next=15;break;case 20:return l=og()(n.relations.map((function(e){return e.relationName}))).map((function(e){return{relationName:e,sourceKey:t.multipleAll[e]||[]}})),f.abrupt("return",{entities:n.entities,targetEntity:{key:t.targetEntity,paths:r},mergeRelations:l});case 22:case"end":return f.stop()}}),sg)}function yg(){var e,t,n;return Zd().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e="merge/merge",r.t0=[400,500],r.next=4,(0,Gm.RE)(vg);case 4:return r.t1=r.sent,t={method:"POST",acceptedStatusCodes:r.t0,body:r.t1},r.next=8,(0,Gm.RE)(ag.Z.requestSaga,e,t);case 8:if(200!==(n=r.sent).status){r.next=14;break}return r.next=12,(0,Gm.gz)((o=n.body,{type:T,payload:{mergeResponse:o}}));case 12:r.next=21;break;case 14:if(!n.body||"VALIDATION_FAILED"!==n.body.errorCode){r.next=19;break}return r.next=17,(0,Gm.gz)(A(null,n.body.errors));case 17:r.next=21;break;case 19:return r.next=21,(0,Gm.gz)(A(n.body.message,[]));case 21:case"end":return r.stop()}var o}),lg)}function bg(){var e,t,n,r;return Zd().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Gm.Ys)(pg);case 2:return e=o.sent,t=e.sourceData,n=t.entities.map((function(e){return{entityName:e.model,key:e.key}})),r=[{type:"entity-update-event",payload:{entities:n}}],o.next=8,(0,Gm.gz)(w.Z.fireExternalEvent("onSuccess",{remoteEvents:r}));case 8:case"end":return o.stop()}}),fg)}var wg=Zd().mark(Og);function Og(){return Zd().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Gm.$6)([(0,Gm.rM)(hg)]);case 2:case"end":return e.stop()}}),wg)}const xg={merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ng,t=arguments.length>1?arguments[1]:void 0,n=tg[t.type];return n?n(e,t):e}};var kg,Sg,Pg=[Og];function jg(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="merge",Eg=["emitAction","onSuccess"],Cg=function(e,t,n,r){var o=h.Z.createStore(xg,Pg,t,_g);b.Z.addToStore(o,(function(e){return e.input.emitAction})),w.Z.addToStore(o,(function(e){return h.Z.getEvents(Eg,e.input)}));var a=!n.emitAction;O.Z.addToStore(o,a);var i=(0,G.jsxs)(G.Fragment,{children:[a&&(kg||(kg=(0,G.jsx)(O.Z.Notifications,{}))),Sg||(Sg=(0,G.jsx)(Vm,{}))]});return h.Z.createApp(_g,i,o,{input:t,events:n,publicPath:r,textResourceModules:["component","common",_g]})},Dg=function(e){return h.Z.useApp({initApp:Cg,props:e,packageName:_g,externalEvents:Eg}).component};Dg.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jg(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({selection:y().object},Eg.reduce((function(e,t){return e[t]=y().func,e}),{}));var Tg=h.Z.createBundleableApp(_g,Cg,Dg);h.Z.registerAppInRegistry(Tg.name,Tg.init)})(),c})()));
|
|
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,u=r.useEffect,s=r.useMemo,l=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var f=c(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=s((function(){function e(e){if(!u){if(u=!0,i=e,e=r(e),void 0!==o&&p.hasValue){var t=p.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,u=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,r,o]);var d=i(e,f[0],f[1]);return u((function(){p.hasValue=!0,p.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:()=>s});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 u(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 s=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 u(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}).apply(this,arguments)}n.d(t,{Z:()=>r})},86:(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})(e)}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}).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})(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=>"chunk-"+({85:"code-editor",198:"vendor-fontawesome",614:"vendor-icons",877:"vendor-libphonenumber-js"}[e]||e)+"."+{85:"2a582123630afe2abf6a",198:"ab9f2eea50d01a3a62a9",560:"e3d5772311dd2d78dc20",608:"c3b57ad1736c5780e353",614:"e897aeeb5a9116a3304b",631:"11bdfa70b80bb7423112",877:"a7f934130ec5ac7a8cff"}[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,u;if(void 0!==o)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var f=s[l];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==r+o){c=f;break}}c||(u=!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 p=(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(p.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=p.bind(null,c.onerror),c.onload=p.bind(null,c.onload),u&&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=381,i.p="/",(()=>{var e={381: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,u]=n,s=0;if(a.some((t=>0!==e[t]))){for(r in c)i.o(c,r)&&(i.m[r]=c[r]);if(u)u(i)}for(t&&t(n);s<a.length;s++)o=a[s],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),i.d(c,{app:()=>Mg});var e,t,n,r,o,a,u,s,l,f,p,d,h=i(18882),m=i(59713),g=i.n(m),v=i(45697),y=i.n(v),b=i(50600),w=i(19241),O=i(30604),x=i(74806),k=i(50558),S="merge/INITIALIZE",P="merge/SET_SOURCE_DATA",j="merge/SET_SELECTED_SINGLE",_="merge/SET_SELECTED_MULTIPLE",E="merge/SET_SELECTED_MULTIPLE_ALL",C="merge/SET_TARGET_ENTITY",D="merge/EXECUTE_MERGE",T="merge/SET_MERGE_RESPONSE",M="merge/SET_MERGE_ERROR",R="merge/CLOSE",I=function(e){return{type:P,payload:{sourceData:e}}},N=function(e){return{type:C,payload:{entityKey:e}}},A=function(e,t){return{type:M,payload:{errorMsg:e,validationErrors:t}}},Z=i(1024),L=i.n(Z),F=i(319),H=i.n(F),B=i(63038),U=i.n(B),W=i(7739),z=i.n(W),Y=i(44012),V=i(88162),q=i(34206),G=i(85893),K=function(e){var t=e.model,n=e.keys,r=e.totalKeys,o=e.navigationStrategy;return 0===r?(0,G.jsx)(q.ZP.Span,{children:r}):(0,G.jsxs)(o.ListLink,{entityName:t,entityKeys:n.slice(0,100),children:["(",r,")"]})},X=i(28655),Q=i.n(X),$=i(38205),J=i(88601),ee=i(65035),te=i(7281),ne=$.ZP.div.withConfig({displayName:"StyledButtonWrapper"})(e||(e=Q()(["\n border-bottom: 3px solid ",";\n"])),J.Z.color("backgroundBody")),re=(0,$.ZP)(ee.Z).withConfig({displayName:"StyledButton"})(t||(t=Q()(["\n align-self: flex-start;\n margin-top: ",";\n margin-bottom: ",";\n margin-left: ",";\n"])),te.Z.space(-.7),te.Z.space(-.7),te.Z.space(0)),oe=i(24875),ae=$.ZP.div.withConfig({displayName:"StyledSummarySuccessWrapper"})(n||(n=Q()(["\n display: grid;\n align-items: center;\n grid-template-columns: "," 1fr;\n grid-column-gap: ",";\n margin-bottom: ",";\n"])),te.Z.font(10),te.Z.space(-.5),te.Z.space(-.7)),ie=$.ZP.div.withConfig({displayName:"StyledMessageWrapper"})(r||(r=Q()(["\n margin-bottom: ",";\n\n && {\n p {\n margin-bottom: 0;\n }\n }\n"])),te.Z.space(-.7)),ce=$.ZP.div.withConfig({displayName:"StyledResultsWrapper"})(o||(o=Q()(["\n padding: "," 0 0 ",";\n"])),te.Z.space(-1),te.Z.space(0)),ue=$.ZP.span.withConfig({displayName:"StyledIconWrapper"})(a||(a=Q()(["\n display: flex;\n align-items: center;\n color: ",";\n font-size: ",";\n"])),oe.FS.color("signal.success"),te.Z.font(10));const se=function(e){var t=e.mergeResponse,n=e.navigationStrategy,r=e.close,o=function(e){return Object.entries(z()(e,(function(e){return e.entityLabel}))).map((function(t){var r=U()(t,2),o=r[0],a=r[1],i=e.find((function(e){return e.entityLabel===o})).entity,c=a.map((function(e){return e.pk}));return(0,G.jsxs)("span",{children:[o," ",(0,G.jsx)(K,{model:i,keys:c,totalKeys:c.length,navigationStrategy:n})]},i)})).reduce((function(e,t){return null===e?[t]:[].concat(H()(e),[", ",t])}),null)},a=o(t.notCopiedRelations),i=o(t.notDeletedEntities);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ne,{children:(0,G.jsx)(re,{onClick:r,look:"raised",ink:"primary",children:u||(u=(0,G.jsx)(Y.Z,{id:"client.merge.close"}))})}),(0,G.jsxs)(ce,{children:[s||(s=(0,G.jsxs)(ae,{children:[(0,G.jsx)(ue,{children:(0,G.jsx)(V.Z,{icon:"check"})}),(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.success"})})]})),(t.notCopiedRelations.length>0||t.notDeletedEntities.length>0)&&(l||(l=(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.successHint"})}))),t.notCopiedRelations.length>0&&(0,G.jsxs)(ie,{children:[f||(f=(0,G.jsxs)(q.ZP.P,{children:[(0,G.jsx)(Y.Z,{id:"client.merge.summary.notCopiedRelations"}),":"]})),(0,G.jsx)(q.ZP.B,{children:a})]}),t.notDeletedEntities.length>0&&(0,G.jsxs)(ie,{children:[p||(p=(0,G.jsxs)(q.ZP.P,{children:[(0,G.jsx)(Y.Z,{id:"client.merge.summary.notDeletedEntities"}),":"]})),(0,G.jsx)(q.ZP.B,{children:i})]}),t.showPermissionMessage&&(d||(d=(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.permission"})})))]})]})};var le={close:function(){return{type:R}}};const fe=(0,k.connect)((function(e){return{mergeResponse:e.merge.mergeResponse,navigationStrategy:e.input.navigationStrategy}}),le)((0,x.ZP)(se));var pe=i(35728),de=i(70696),he=i(71392),me="checked",ge="indeterminate",ve="unchecked";const ye=function(e){var t=e.value,n=e.id,r=e.onChange,o=e.label,a=(0,Z.useRef)(null);return(0,Z.useLayoutEffect)((function(){a.current.indeterminate=t===ge,a.current.checked=t===me}),[t]),(0,G.jsx)("input",{ref:a,onChange:function(e){r(t===ge?ve:e.target.checked?me:ve)},id:n,type:"checkbox","aria-checked":"checked"===t,"aria-label":o})};const be=function(e){var t,n=e.rowData,r=e.isSelected,o=e.selectionChange,a=e.selectionFilterFn,i=e.rowIdx;return"function"!=typeof a||a(n)?(0,G.jsx)("div",{onClick:function(e){e.shiftKey&&o(n.__key,!0,!0),e.stopPropagation()},"data-cy":"list-selection-checkbox",children:(0,G.jsx)(ye,{value:(t=n,r(t.__key)?"checked":"unchecked"),onChange:function(e){return function(t){return o(e.__key,"checked"===t)}}(n),label:"".concat(n.__model," ").concat(i+1),id:"list-selection-checkbox "+n.__key})}):null};const we=function(e){var t=e.data,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn,a=t.filter((function(e){return"function"!=typeof o||o(e)})).map((function(e){return e.__key})),i=function(e,t){return e?"checked":t?"indeterminate":"unchecked"}(a.every((function(e){return n(e)})),a.some((function(e){return n(e)})));return 0===a.length?null:(0,G.jsx)(ye,{value:i,onChange:function(e){r(a,"checked"===e)}})};var Oe={SINGLE:"single",MULTI:"multi",NONE:"none"};y().oneOf(Object.keys(Oe).map((function(e){return Oe[e]})));const xe=function(e){var t=e.rowData,n=e.isSelected,r=e.selectionChange,o=e.selectionFilterFn;return"function"!=typeof o||o(t)?(0,G.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:(0,G.jsx)("input",{type:"radio",checked:n(t.__key),onChange:function(e){r(t.__key,e.target.value)}})}):null};function ke(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 Se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pe=function(e,t,n){return{id:"single-selection",width:30,resizable:!1,fixedPosition:!0,dynamic:!0,sorting:{sortable:!1},HeaderRenderer:function(){return null},CellRenderer:function(r){return(0,G.jsx)(xe,Se(Se({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}},je=function(e,t,n){return{id:"multi-selection",dynamic:!0,resizable:!1,fixedPosition:!0,width:30,sorting:{sortable:!1},HeaderRenderer:function(r){return(0,G.jsx)(we,Se(Se({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))},CellRenderer:function(r){return(0,G.jsx)(be,Se(Se({},r),{},{isSelected:e,selectionChange:t,selectionFilterFn:n}))}}};const _e=function(e,t,n){var r=(0,Z.useState)(null),o=U()(r,2),a=o[0],i=o[1],c=(0,Z.useCallback)((function(t){return(e||[]).includes(t)}),[e]),u=(0,Z.useCallback)((function(e,r,o){if(Array.isArray(e))n(e,r),i(null);else if(o){document.getSelection&&document.getSelection().removeAllRanges();var u=a?t.findIndex((function(e){return e===a})):0,s=t.findIndex((function(t){return t===e}));n(t.slice(Math.min(u,s),Math.max(u,s)+1),r)}else n([e],r||!c(e)),i(e)}),[t,n,c,a]);return{isSelected:c,selectionChange:u}};var Ee,Ce,De,Te,Me,Re,Ie,Ne,Ae,Ze,Le,Fe,He,Be,Ue,We,ze,Ye,Ve,qe,Ge,Ke=i(27361),Xe=i.n(Ke),Qe=i(28926),$e=i(80470),Je=i(40493),et=i(30759),tt=function(e){var t=e.theme;return Xe()(t,"colors.border")},nt=te.Z.space(-1.5),rt=$.ZP.div.withConfig({displayName:"StyledTableFooter"})(Ee||(Ee=Q()(["\n grid-row-start: pagination-start;\n display: flex;\n flex-wrap: wrap;\n padding-top: ",";\n padding-bottom: ",";\n border-top: 1px solid ",";\n\n "," {\n margin-right: ",";\n }\n"])),te.Z.space(-.5),te.Z.space(-1),tt,Qe.Z,te.Z.space(-1)),ot=(0,$.ZP)($e.Z).withConfig({displayName:"StyledReloadButton"})(Ce||(Ce=Q()(["\n height: 25px;\n width: 25px;\n"]))),at=$.ZP.td.withConfig({displayName:"StyledTableCell"})(De||(De=Q()(["\n && {\n padding: ",";\n background-color: ",";\n border-bottom: 1px solid ",";\n align-content: center;\n box-sizing: content-box;\n\n &,\n input {\n text-align: ",";\n }\n\n "," {\n display: inline-block;\n margin-right: ",";\n }\n }\n"])),nt,oe.FS.color("paper"),tt,(function(e){return e.alignment}),Je.q,te.Z.space(-2)),it=$.ZP.div.withConfig({displayName:"StyledDnD"})(Te||(Te=Q()(["\n padding: ",";\n width: 100%;\n opacity: ",";\n"])),nt,(function(e){return e.isDragged?.2:1})),ct=$.ZP.span.withConfig({displayName:"StyledResizeHandle"})(Me||(Me=Q()(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n background: ",";\n opacity: 0;\n width: 3px;\n cursor: col-resize;\n"])),(function(e){return e.theme.colors.backgroundItemSelected})),ut=$.ZP.th.withConfig({displayName:"StyledTableHeaderCell"})(Re||(Re=Q()(["\n && {\n position: sticky;\n top: 0;\n background-color: ",";\n text-align: ",";\n border-bottom: 2px solid ",";\n ",";\n user-select: none;\n cursor: ",";\n white-space: nowrap;\n display: flex;\n border-right: ",";\n padding: 1px; /* default th padding */\n z-index: 2; /* higher than StyledIndicatorsContainerWrapper */\n ",";\n ","\n ","\n ","\n }\n"])),oe.FS.color("paper"),(function(e){return e.alignment}),tt,(0,et.Z)({fontWeight:oe.FS.fontWeight("bold")}),(function(e){return e.isSortable?"pointer":"auto"}),(function(e){var t=e.isDraggedOver,n=e.theme;return t?"3px solid ".concat(n.colors.text):"none"}),(function(e){return"header-cell-navigation-column"===e.id&&"z-index: 1"}),(function(e){var t=e.isResizingThisCell,n=e.theme;return t&&"\n background-color: ".concat(n.colors.backgroundItemHover,";\n\n > ").concat(ct," {\n opacity: 1;\n }\n ")}),(function(e){var t=e.isResizingAnyCell,n=e.theme;return!t&&"\n &:hover {\n background-color: ".concat(n.colors.backgroundItemHover,";\n\n > ").concat(ct," {\n opacity: 1;\n }\n }\n ")}),(function(e){var t=e.isResizingThisCell,n=e.isSortable,r=e.fixedPosition,o=e.theme;return n?!t&&!n&&!r&&"\n &:hover {\n background-color: transparent;\n }\n ":"\n &:hover {\n background-color: ".concat(o.colors.paper,";\n }\n ")})),st=(0,$.iv)(Ie||(Ie=Q()(["\n display: contents;\n ","\n\n &.selected {\n > "," {\n background-color: ",";\n }\n }\n\n &.selectableRow:not(.selected):hover {\n > "," {\n background-color: ",";\n }\n }\n"])),(function(e){return e.clickable&&"cursor: pointer;"}),at,(function(e){return e.theme.colors.backgroundItemSelected}),at,(function(e){return e.theme.colors.backgroundItemHover})),lt=$.ZP.span.withConfig({displayName:"StyledSortingSpan"})(Ne||(Ne=Q()(["\n height: 100%;\n margin-right: 2px;\n"]))),ft=$.ZP.span.withConfig({displayName:"StyledSortingRank"})(Ae||(Ae=Q()(["\n position: relative;\n top: -0.5rem;\n font-weight: ",";\n"])),oe.FS.fontWeight("regular")),pt=$.ZP.td.withConfig({displayName:"StyledFullRowProgress"})(Ze||(Ze=Q()(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n }\n"])),nt),dt=$.ZP.td.withConfig({displayName:"StyledFullRow"})(Le||(Le=Q()(["\n && {\n grid-column: 1 / -1;\n padding-top: "," 0 0 0;\n height: 50px;\n text-align: center;\n border: 0;\n ",";\n }\n"])),nt,(0,et.Z)()),ht=$.ZP.thead.withConfig({displayName:"StyledTableHead"})(Fe||(Fe=Q()(["\n ","\n"])),st),mt=$.ZP.tr.withConfig({displayName:"StyledTableRow"})(He||(He=Q()(["\n ","\n\n &:nth-child(even) td {\n background-color: ",";\n }\n"])),st,(function(e){return e.theme.colors.backgroundTableEvenRow})),gt=$.ZP.tbody.withConfig({displayName:"StyledTableBody"})(Be||(Be=Q()(["\n ","\n"])),st),vt=$.ZP.table.withConfig({displayName:"StyledTable"})(Ue||(Ue=Q()(["\n overflow: auto;\n display: grid;\n border-collapse: collapse;\n grid-template-columns: ",";\n grid-auto-rows: min-content;\n min-width: 100%;\n ","\n"])),(function(e){return e.columns.map((function(e){return e.width?e.width+"px":e.shrinkToContent?"max-content":"minmax(100px, auto)"})).join(" ")}),(function(e){return e.scrollBehaviour===he.P.INLINE&&(0,$.iv)(We||(We=Q()(["\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n "])))})),yt=$.ZP.div.withConfig({displayName:"StretchingTableContainer"})(ze||(ze=Q()(["\n grid-row-start: table-start;\n position: relative;\n overflow-x: auto;\n"]))),bt=$.ZP.div.withConfig({displayName:"StyledTableWrapper"})(Ye||(Ye=Q()(["\n display: grid;\n background-color: ",";\n grid-template-rows: [table-start] 1fr [pagination-start] auto auto;\n grid-template-columns: 100%;\n height: 100%;\n\n // reset external styles in old client\n input[type='checkbox'],\n input[type='radio'] {\n margin: 3px 3px 3px 4px !important;\n min-width: 12px;\n }\n"])),oe.FS.color("paper")),wt=$.ZP.div.withConfig({displayName:"StyledDraggable"})(Ve||(Ve=Q()(["\n width: 100%;\n height: 100%;\n display: flex;\n"]))),Ot=$.ZP.span.withConfig({displayName:"StyledHeaderContentWrapper"})(qe||(qe=Q()(["\n display: flex;\n"]))),xt=$.ZP.div.withConfig({displayName:"StyledHeaderContent"})(Ge||(Ge=Q()(["\n width: 100%;\n"]))),kt=i(93235),St=y().oneOfType([y().string,y().number]),Pt=y().shape({__key:St}),jt=(y().arrayOf(Pt),y().shape({id:y().string.isRequired,label:y().string,sorting:y().shape({sortable:y().bool,sortRank:y().number,order:y().oneOf(["asc","desc"])}),resizable:y().bool,width:y().number,HeaderRenderer:y().elementType,CellRenderer:y().elementType,rightAligned:y().bool})),_t=L().memo((function(e){var t=e.column,n=e.rowData,r=e.rowIdx;return(0,G.jsx)(at,{"data-cy":"list-cell",alignment:t.alignment,children:t.CellRenderer?(0,G.jsx)(t.CellRenderer,{rowData:n,column:t,rowIdx:r}):(0,G.jsx)(q.ZP.Span,{children:n[t.id]})})}));_t.propTypes={rowData:Pt.isRequired,column:jt.isRequired,rowIdx:y().number};var Et=function(e,t){return!e.column.dynamic||0===Object.keys(de.Z.difference(e,t)).length};const Ct=L().memo(_t,Et);var Dt,Tt,Mt,Rt,It=function(){return Dt||(Dt=(0,G.jsx)(mt,{children:(0,G.jsxs)(pt,{children:[(0,G.jsx)(kt.Z,{size:"20"}),(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.component.table.dataLoading"})})]})}))},Nt=function(){return Tt||(Tt=(0,G.jsx)(mt,{children:(0,G.jsx)(dt,{children:(0,G.jsx)(q.ZP.Span,{children:(0,G.jsx)(Y.Z,{id:"client.component.table.noData"})})})}))};const At=function(e){var t=e.data,n=e.columns,r=e.isSelected,o=e.selectionChange,a=e.dataLoadingInProgress,i=e.onRowClick,c=e.clickable;return a?Mt||(Mt=(0,G.jsx)(gt,{children:(0,G.jsx)(It,{})})):(0,G.jsx)(gt,{children:t.length>0?t.map((function(e,t){return(0,G.jsx)(mt,{className:"selectableRow ".concat(r(e.__key)&&"selected"),onClick:(a=e,function(e){e.shiftKey?o(a.__key,!0,!0):e.metaKey||e.ctrlKey?o(a.__key):c&&i&&i(a.__key)}),clickable:c,"data-cy":"list-row",children:n.map((function(n){return(0,G.jsx)(Ct,{selected:r(e.__key),rowData:e,column:n,rowIdx:t},"table-static-cell-".concat(e.__key,"-").concat(n.id))}))},"list-row-".concat(e.__key));var a})):Rt||(Rt=(0,G.jsx)(Nt,{}))})};var Zt,Lt=i(58129);const Ft=$.ZP.div.withConfig({displayName:"StyledButtonGroup"})(Zt||(Zt=Q()(["\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"])),Lt.Z);var Ht=L().forwardRef((function(e,t){return(0,G.jsx)(Ft,{ref:t,children:e.children})}));Ht.propTypes={children:y().node};const Bt=Ht;var Ut,Wt,zt=$.ZP.div.withConfig({displayName:"StyledPagination"})(Ut||(Ut=Q()(["\n display: flex;\n align-items: center;\n justify-content: flex-start;\n flex-wrap: wrap;\n gap: ",";\n margin-left: ",";\n"])),te.Z.space(-1),te.Z.space(-1.4)),Yt=(0,$.ZP)(ee.Z).withConfig({displayName:"StyledPaginationButton"})(Wt||(Wt=Q()(["\n padding: "," ",";\n"])),te.Z.space(-2),te.Z.space(-.5));const Vt=(0,x.ZP)((function(e){var t=e.totalCount,n=e.recordsPerPage,r=e.currentPage,o=e.onPageChange,a=e.intl,i=e.tableEl,c=e.children,u=Math.ceil(t/n),s=Math.min((r-1)*n+1,t),l=Math.min(r*n,t),f=function(e){return a.formatMessage({id:e})},p=function(e){o(e),i.current.scrollTop=0};return(0,G.jsxs)(zt,{children:[(0,G.jsxs)(Bt,{children:[(0,G.jsx)(Yt,{disabled:1===r,label:f("client.component.pagination.firstPageTitle"),iconOnly:!0,icon:"chevron-double-left",onClick:function(){return p(1)}}),(0,G.jsx)(Yt,{disabled:1===r,label:f("client.component.pagination.prePageTitle"),iconOnly:!0,icon:"chevron-left",onClick:function(){return p(r-1)}}),(0,G.jsx)(Yt,{disabled:r>=u,label:f("client.component.pagination.nextPageTitle"),iconOnly:!0,icon:"chevron-right",onClick:function(){return p(r+1)}}),(0,G.jsx)(Yt,{disabled:r>=u,label:f("client.component.pagination.lastPageTitle"),iconOnly:!0,icon:"chevron-double-right",onClick:function(){return p(u)}})]}),t>0&&(0,G.jsx)(q.ZP.Span,{children:(0,G.jsx)(Y.Z,{id:"client.component.pagination.text",values:{start:s,to:l,total:t}})}),c]})}));const qt=(0,x.ZP)((function(e){var t,n=e.onPageChange,r=e.onPageRefresh,o=e.paginationInfo,a=e.intl,i=e.tableEl,c=Boolean(o),u="function"==typeof r;return c||u?(0,G.jsx)(rt,{children:c&&(0,G.jsx)(Vt,{onPageChange:n,currentPage:o.currentPage,totalCount:o.totalCount,recordsPerPage:o.recordsPerPage,tableEl:i,children:u&&(0,G.jsx)(ot,{type:"button",title:(t="client.component.table.refreshTitle",a.formatMessage({id:t})),icon:"sync",onClick:r})})}):null}));var Gt=i(18446),Kt=i.n(Gt);function Xt(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 Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $t={currentlyDragging:null,currentlyDragOver:null,dropPosition:null,offset:null},Jt={Top:"Top",Bottom:"Bottom"};const en=function(e){var t=(0,Z.useState)($t),n=U()(t,2),r=n[0],o=n[1],a=r.currentlyDragging,i=r.currentlyDragOver,c=r.dropPosition,u=r.offset;return{dndEvents:(0,Z.useCallback)((function(t){return{onDragStart:function(e){o((function(e){return Qt(Qt({},e),{},{currentlyDragging:t})}));var n=e.target;n&&n.addEventListener("dragend",(function e(t){o($t),t.stopPropagation(),n&&n.removeEventListener("dragend",e)}),!1),e.stopPropagation()},onDragEnter:function(e){if(a&&!Kt()(i,t)){var n=e.target?e.target.getBoundingClientRect():{},r=n.y+n.height/2;o((function(e){return Qt(Qt({},e),{},{currentlyDragOver:t,offset:r})}))}e.stopPropagation()},onDragOver:function(e){if(a){var t=e.clientY-u>0?Jt.Bottom:Jt.Top;return o((function(e){return Qt(Qt({},e),{},{dropPosition:t})})),e.preventDefault(),e.stopPropagation(),!0}},onDrop:function(t){a&&i&&(e(a,i,c),o($t),t.stopPropagation())}}}),[i,a,c,u,e]),dndState:(0,Z.useMemo)((function(){return{currentlyDragOver:i,currentlyDragging:a,dropPosition:c,offset:u}}),[i,a,c,u])}};const tn=function(e,t,n){var r=t-e;return Math.max(50,n+r)},nn=function(e,t,n){var r=(0,Z.useState)(null),o=U()(r,2),a=o[0],i=o[1],c=(0,Z.useRef)(null),u=(0,Z.useRef)(),s=(0,Z.useState)(!1),l=U()(s,2),f=l[0],p=l[1],d=(0,Z.useState)(!1),h=U()(d,2),m=h[0],g=h[1],v=(0,Z.useMemo)((function(){return{resizingElement:a,isResizing:f}}),[a,f]),y=(0,Z.useCallback)((function(){a&&(n(a),g(!1),setTimeout((function(){p(!1),i(null),c.current=void 0}),0))}),[a,n]),b={onMouseMove:(0,Z.useCallback)((function(n){a&&m&&(u.current=requestAnimationFrame((function(){if(c.current){var r=e(a),o=tn(c.current.y,n.clientY,r.clientHeight),i=tn(c.current.x,n.clientX,r.clientWidth);t(a,{height:o,width:i})}c.current={y:n.clientY,x:n.clientX}})))}),[a,t,m,e]),onMouseUp:y};return(0,Z.useEffect)((function(){return m||cancelAnimationFrame(u.current),function(){cancelAnimationFrame(u.current)}}),[m]),{resizeState:v,startResize:function(e){return function(t){i(e),p(!0),g(!0),c.current=void 0,t.stopPropagation(),t.preventDefault()}},resizingEvents:b}};const rn=function(e){var t=e.column,n=e.startResize;return(0,G.jsx)(ct,{"data-cy":"header-cell-".concat(t.id,"-resizing-controller"),onMouseDown:n(t)})};const on=(0,x.ZP)((function(e){var t,n,r,o=e.column,a=e.intl,i=o.sorting&&o.sorting.sortRank&&o.sorting.order,c=(null===(t=o.sorting)||void 0===t?void 0:t.sortRank)>1&&(0,G.jsx)(ft,{children:o.sorting.sortRank}),u="sort-".concat("asc"===(null===(n=o.sorting)||void 0===n?void 0:n.order)?"up":"down");return i?(0,G.jsxs)(lt,{title:(r="client.component.table.sortingTitle",a.formatMessage({id:r})),children:[(0,G.jsx)(V.Z,{icon:u}),c]}):null}));function an(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 cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?an(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):an(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var un=function(e){var t=e.column,n=e.data;return t.HeaderRenderer?(0,G.jsx)(t.HeaderRenderer,{column:t,data:n}):(0,G.jsxs)(Ot,{children:[(0,G.jsx)(xt,{title:t.label,dangerouslySetInnerHTML:{__html:t.label}}),(0,G.jsx)(on,{column:t})]})};const sn=function(e){var t=e.columns,n=e.data,r=e.onColumnPositionChange,o=e.onSortingChange,a=e.tableEl,i=e.onColumnWidthChanging,c=e.onColumnWidthChanged,u=en(r),s=u.dndEvents,l=u.dndState,f=(0,Z.useCallback)((function(e){return a.current.querySelector("th[id='header-cell-".concat(e.id,"']"))}),[]),p=(0,Z.useCallback)((function(e,t){var n=t.width;return i(e.id,n)}),[i]),d=(0,Z.useCallback)((function(e){return c(e.id)}),[c]),h=nn(f,p,d),m=h.startResize,g=h.resizingEvents,v=h.resizeState,y=v.isResizing,b=v.resizingElement,w=function(e){return function(t){var n;!y&&null!==(n=e.sorting)&&void 0!==n&&n.sortable&&o(e.id,t.shiftKey)}},O=t.map((function(e){var t="header-cell-".concat(e.id),r="header-cell-drop-".concat(e.id),o=e.sorting&&e.sorting.sortable,a=y&&e.id===(null==b?void 0:b.id),i=l.currentlyDragOver===e.id&&l.currentlyDragging!==e.id,c=l.currentlyDragging===e.id;return(0,G.jsxs)(ut,{"data-cy":t,id:t,onClick:w(e),isResizingAnyCell:y,isResizingThisCell:a,isSortable:o,isDraggedOver:i,alignment:e.alignment,children:[(0,G.jsx)(wt,cn(cn({id:r},!e.fixedPosition&&cn({draggable:!0},s(e.id))),{},{children:(0,G.jsx)(it,{isDragged:c,children:(0,G.jsx)(un,{column:e,data:n})})}),r),e.resizable&&(0,G.jsx)(rn,{column:e,startResize:m})]},t)}));return(0,G.jsx)(ht,cn(cn({},g),{},{children:(0,G.jsx)(mt,{children:O})}))};function ln(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 fn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ln(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pn=function(e){var t=e.columns,n=e.selection,r=e.data,o=e.onSelectionChange,a=e.selectionStyle,i=e.paginationInfo,c=e.onColumnPositionChange,u=e.onSortingChange,s=e.dataLoadingInProgress,l=e.onRowClick,f=e.clickable,p=e.onPageChange,d=e.onPageRefresh,h=e.scrollBehaviour,m=void 0===h?he.P.INLINE:h,g=e.onColumnWidthChange,v=e.selectionFilterFn,y=(0,Z.useState)(t),b=U()(y,2),w=b[0],O=b[1],x=(0,Z.useRef)(null),k=(0,Z.useCallback)((function(e){var t,n=null===(t=w.find((function(t){return t.id===e})))||void 0===t?void 0:t.width;g&&g(e,n)}),[w,g]),S=(0,Z.useCallback)((function(e,t){O(H()(w.map((function(n){return n.id===e?fn(fn({},n),{},{width:t}):n}))))}),[w]),P=(0,Z.useMemo)((function(){return r?r.map((function(e){return e.__key})):[]}),[r]),j=_e(n,P,o),_=j.isSelected,E=j.selectionChange;return(0,Z.useEffect)((function(){var e=function(e,t,n,r,o){return e&&e!==Oe.NONE?e===Oe.MULTI?je(n,r,o):Pe(n,r,o):null}(a,0,_,E,v);O([].concat(H()(e?[e]:[]),H()(t)))}),[t,n,_,E,v,a]),(0,G.jsxs)(bt,{children:[(0,G.jsx)(yt,{children:(0,G.jsxs)(vt,{ref:x,columns:w,scrollBehaviour:m,children:[(0,G.jsx)(sn,{columns:w,data:r,onColumnWidthChanging:S,onColumnWidthChanged:k,onColumnPositionChange:c,tableEl:x,onSortingChange:u}),(0,G.jsx)(At,{columns:w,data:r,isSelected:_,selectionChange:E,dataLoadingInProgress:s,onRowClick:l,clickable:f})]})}),(0,G.jsx)(qt,{onPageChange:p,onPageRefresh:d,paginationInfo:i,tableEl:x})]})},dn=function(e,t){return 0===Object.keys(de.Z.difference(e,t)).length};const hn=L().memo(pn,dn);function mn(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 gn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vn=function(e){return Object.keys(e.entities[0].paths)},yn=function(e){return H()(new Set(e.relations.map((function(e){return e.relationName}))))},bn=function(e){var t=Object.entries(e.entities[0].paths).filter((function(e){var t=U()(e,2);t[0];return"counter"===t[1].type})).map((function(e){var t=U()(e,2),n=t[0];t[1];return n})),n=function(e){return[].concat(H()(vn(e)),H()(yn(e)))}(e).filter((function(e){return!t.includes(e)})),r=function(t){return t.map((function(t){return{name:t,label:e.labels[t]}})).sort((function(e,t){return e.label<t.label?-1:1})).map((function(e){return e.name}))};return[].concat(H()(r(t)),H()(r(n)))},wn=function(e,t,n){var r="PK: ".concat(n),o=e.displays.find((function(e){return e.model===t}));if(void 0===o)return r;var a=o.values.find((function(e){return e.key===n}));return a?a.display:r},On=i(50008),xn=i.n(On),kn=(i(2525),i(57557)),Sn=i.n(kn);i(54061);var Pn="--",jn=function(e){return e?e.replace(/\./g,Pn).replace(/\[/g,"=-=").replace(/\]/g,"=_="):e},_n=function(e,t){return e.split(".").reduce((function(e,t){var n=e[e.length-1];return[].concat(H()(e),[n?"".concat(n,".").concat(t):t])}),[]).map((function(e){return"paths.".concat(e.split(".").join(".value.paths.")).split(".")})).map((function(e){return Xe()(t,e)}))};function En(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 Cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?En(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):En(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Dn={hasValue:function(e){var t=e.formValues,n=e.formField.locationMapping;return!!t[jn(n.street)]},getValue:function(e){var t=e.formField,n=e.formData,r=t.locationMapping;return{street:n.formValues[jn(r.street)]}},hideIfEmptyValue:function(){return!0},getEvents:function(e){var t=e.formField,n=e.formName,r=e.formData,o=e.events,a=t.locationMapping||{};return Cn(Cn({},o),{},{onChange:function(e){for(var o in a)if(a[o]&&void 0!==e[o]){var i=null!==e[o]?e[o]:"";r.changeFieldValue(n,a[o],i)}var c=e.street;if(r.changeFieldValue(n,t.id,Cn({},void 0!==c?{street:c||""}:{})),t.postcodeCityField){var u=e.postcode,s=e.city;r.changeFieldValue(n,t.postcodeCityField,Cn(Cn({},void 0!==u?{postcode:u||""}:{}),void 0!==s?{city:s||""}:{}))}},onBlur:function(){r.touchField(n,t.id)}})},dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:t.locationMapping?Object.values(t.locationMapping).map((function(e){return jn(e)})):{}}}},getOptions:function(e){var t=e.formField,n=e.formData;return{fetchSuggestions:function(e,r){return n.loadLocationsSuggestions(t.id,e,r,Xe()(t,"countries"))},validateLocation:function(e,r){return n.validateLocation(t.id,e,Xe()(t,"countries"),r)},isLoading:Xe()(n,["locations",t.id,"isLoading"],!1),suggestions:Xe()(n,["locations",t.id,"suggestions"],null),mapButtonTitle:n.intl.formatMessage({id:"client.component.location.mapButtonTitle"}),locationValues:Object.keys(t.locationMapping||{}).reduce((function(e,r){return Cn(Cn({},e),{},g()({},r,n.formValues[jn(t.locationMapping[r])]))}),{})}},getMandatoryValidation:function(e){var t,n=e.formField,r=n.locationMapping,o=null===(t=n.siblings.find((function(e){return e.id===r.street})))||void 0===t?void 0:t.validation;return null==o?void 0:o.mandatory},isReadOnly:function(e){var t=e.formField,n=e.entity,r=t.locationMapping,o=_n(r.street,n).slice(-1)[0];return!o||!1===o.writable}},Tn={fixLabel:function(){return!0}},Mn={getOptions:function(e){var t=e.formData;return{trueLabel:t.intl.formatMessage({id:"client.common.yes"}),falseLabel:t.intl.formatMessage({id:"client.common.no"})}},hasValue:function(e){var t=e.value;return!0===t||!1===t}};var Rn=function(e,t){return{entityModel:e.model,key:e.key,field:t}},In=function(e,t){if(e.implicitModelField&&t.formValues){var n=e.implicitModelField,r=n.indexOf(".");return r?function(e,t,n){var r=e.substring(0,t),o=e.substring(t+1),a=n.formValues[r];if(a){if(!Array.isArray(a))return Rn(a,o);if(1===a.length)return Rn(a[0],o)}return null}(n,r,t):t.formValues[n]}return e.implicitModel},Nn=function(e){if(e.implicitModelField){var t=e.implicitModelField,n=t.indexOf(".");return n?[t.substring(0,n)]:[t]}return[]};const An={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField,n=e.formData;return{mode:t.mode,implicitModel:In(t,n)}},dataContainerProps:function(e){var t=e.formField;return{formValues:{formName:e.formName,fields:Nn(t)}}}};var Zn=function(e){if(!e||isNaN(e))return null;var t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate();return[t,(n>9?"":"0")+n,(r>9?"":"0")+r].join("-")};const Ln={getOptions:function(){return{datePickerOptions:{dateToValue:Zn}}}},Fn={getOptions:function(e){var t=e.entityField;if("long"===(null==t?void 0:t.type))return{datePickerOptions:{valueToDate:function(e){var t=e?new Date(e):null;return isNaN(t)?null:t},dateToValue:function(e){return e?e.getTime():null}}}}},Hn={getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null),prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}};function Bn(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 Un(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Wn={getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return Un(Un({upload:function(e){r.uploadDocument(n,t.id,e)}},r.chooseDocument?{choose:function(){return r.chooseDocument(r.setDocument,n,t.id)}}:{}),{},{uploadText:r.intl.formatMessage({id:"client.component.upload.upload"}),uploadingText:r.intl.formatMessage({id:"client.component.upload.uploading"}),downloadText:r.intl.formatMessage({id:"client.component.upload.downloadTitle"}),deleteText:r.intl.formatMessage({id:"client.component.upload.deleteTitle"})})},fixLabel:function(){return!0}};var zn=function(e){return!e.validation||!e.validation.numberRange||"number"!=typeof e.validation.numberRange.fromIncluding||e.validation.numberRange.fromIncluding<0};const Yn={getOptions:function(e){var t=e.formField,n=e.formData;return{hoursLabel:n.intl.formatMessage({id:"client.component.duration.hoursLabel"}),minutesLabel:n.intl.formatMessage({id:"client.component.duration.minutesLabel"}),secondsLabel:n.intl.formatMessage({id:"client.component.duration.secondsLabel"}),allowNegative:zn(t)}}};function Vn(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 qn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vn(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Gn={dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:[t.id]}}},getValue:function(e){var t=e.formField,n=e.formData.formValues[t.id];return qn(qn({},n),null!=n&&n.distance?{}:{distance:10})},getOptions:function(e){var t=e.formField,n=e.formData;return{latitudeField:t.latitudeField,longitudeField:t.longitudeField,noResultsText:n.intl.formatMessage({id:"client.component.geosearch.noResultsText"}),emptySearchText:n.intl.formatMessage({id:"client.component.geosearch.emptySearchText"}),kmSuffixText:n.intl.formatMessage({id:"client.component.geosearch.km"}),suggestions:Xe()(n,["locations",t.id,"suggestions"],[]),isLoading:Xe()(n,["locations",t.id,"isLoading"],!1),fetchSuggestions:function(e,r){e?n.loadLocationsSuggestions(t.id,e,r,Xe()(t,"countries")):n.setLocationSuggestions(t.id,[])}}}};var Kn=function(e){if(!["email_editor","correspondence_editor"].includes(e))return{removeButtons:["Font","FontSize","TextColor"]}};const Xn={fixLabel:function(){return!0},getOptions:function(e){var t=e.formField;return{ckEditorConfig:Kn(t.htmlconfig)}}},Qn={getOptions:function(e){var t=e.formField;return{minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null)}}};function $n(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 Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$n(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$n(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const er={hasValue:function(e){var t=e.formValues,n=e.formField.locationMapping;return!(!t[jn(n.city)]&&!t[jn(n.postcode)])},hideIfEmptyValue:function(){return!0},getValue:function(e){var t=e.formField,n=e.formData,r=t.locationMapping;return{postcode:n.formValues[jn(r.postcode)],city:n.formValues[jn(r.city)]}},getEvents:function(e){var t=e.formField,n=e.formName,r=e.formData,o=e.events,a=t.locationMapping||{};return Jn(Jn({},o),{},{onChange:function(e){for(var o in a)if(a[o]&&void 0!==e[o]&&"street"!==o){var i=null!==e[o]?e[o]:"";r.changeFieldValue(n,a[o],i)}var c=e.postcode,u=e.city;r.changeFieldValue(n,t.id,Jn(Jn({},void 0!==c?{postcode:c||""}:{}),void 0!==u?{city:u||""}:{}))},onBlur:function(){r.touchField(n,t.id)}})},dataContainerProps:function(e){var t=e.formField,n=e.formName;return{locations:[t.id],formValues:{formName:n,fields:t.locationMapping?Object.values(t.locationMapping).map((function(e){return jn(e)})):{}}}},getOptions:function(e){var t=e.formField,n=e.formData;return{fetchSuggestions:function(e,r){return n.loadLocationsSuggestions(t.id,e,r,Xe()(t,"countries"))},isLoading:Xe()(n,["locations",t.id,"isLoading"],!1),suggestions:Xe()(n,["locations",t.id,"suggestions"],null),mapButtonTitle:n.intl.formatMessage({id:"client.component.location.mapButtonTitle"}),locationValues:Object.keys(t.locationMapping||{}).reduce((function(e,r){return Jn(Jn({},e),{},g()({},r,n.formValues[jn(t.locationMapping[r])]))}),{})}},getMandatoryValidation:function(e){var t,n,r=e.formField,o=r.locationMapping,a=null===(t=r.siblings.find((function(e){return e.id===o.city})))||void 0===t?void 0:t.validation,i=null===(n=r.siblings.find((function(e){return e.id===o.postcode})))||void 0===n?void 0:n.validation;return(null==a?void 0:a.mandatory)||(null==i?void 0:i.mandatory)},isReadOnly:function(e){var t=e.formField,n=e.entity,r=t.locationMapping,o=_n(r.city,n).slice(-1)[0],a=_n(r.postcode,n).slice(-1)[0];return!o||!a||!1===o.writable||!1===a.writable}},tr={getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",2),prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!0,fixedDecimalScale:!0}}},nr={getOptions:function(e){var t=e.formField;return{prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!0}}},rr={getOptions:function(e){var t=e.formField;return{prePointDigits:Xe()(t,"validation.decimalDigits.prePointDigits",null),postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null),minValue:Xe()(t,"validation.numberRange.fromIncluding",null),maxValue:Xe()(t,"validation.numberRange.toIncluding",null),allowNegative:!1,suffix:"%"}}},or={getOptions:function(e){var t=e.formField;return{customPhoneRegex:Xe()(t,"validation.phone.customRegex",null),defaultCountry:Xe()(t,"validation.phone.defaultRegion",null)}}};var ar=i(6479),ir=i.n(ar),cr=["entityKey","children"];function ur(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 sr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ur(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var lr=50,fr=10,pr=function(e){return e.filter(Boolean).join(" and ")},dr=function(e){return e&&Array.isArray(e)&&0!==e.length?"not KEYS(".concat(e.map((function(e){return e.key})).join(", "),")"):void 0};const hr={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formName,r=e.formData;return{options:Xe()(r,["relationEntities",t.id,"data"],[]),moreOptionsAvailable:Xe()(r,["relationEntities",t.id,"moreEntitiesAvailable"],!1),isLoading:Xe()(r,["relationEntities",t.id,"isLoading"],!1),fetchOptions:function(e){r.loadRelationEntities(t.id,t.targetEntity,{forceReload:!0,limit:fr,formBase:t.formBase,formName:t.formName,where:pr([t.condition,dr(e)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},searchOptions:function(e,n){r.loadRelationEntities(t.id,t.targetEntity,{searchTerm:e,limit:lr,forceReload:!0,formBase:t.formBase,formName:t.formName,where:pr([t.condition,dr(n)]),loadRemoteFieldConfiguration:!0,constriction:t.constriction})},openDocsTreeSearch:t.displayDocsTree?function(e){return r.openDocsTreeSearch(n,t,e)}:void 0,openAdvancedSearch:!1===t.displayAdvancedSearch?void 0:function(e,o){return r.openAdvancedSearch(n,t,e,o)},tooltips:Xe()(r.tooltips,t.targetEntity,null),loadTooltip:function(e){return r.loadTooltip(t.targetEntity,e)},noResultsText:r.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),moreOptionsAvailableText:r.intl.formatMessage({id:"client.component.remoteselect.moreOptionsAvailableText"}),DetailLink:r.navigationStrategy&&r.navigationStrategy.DetailLink?function(e){var n=e.entityKey,o=e.children,a=ir()(e,cr);return(0,G.jsx)(r.navigationStrategy.DetailLink,sr(sr({entityName:t.targetEntity,entityKey:n},a),{},{children:o}))}:null,createPermission:t.relationName&&Xe()(r,["entityModel","paths",t.relationName,"createPermission"],!1)&&Xe()(r,["entityModel","paths",t.relationName,"useRemoteFieldNewButton"],!0)&&Xe()(t,"displayCreateButton",!0),openRemoteCreate:function(e){return r.openRemoteCreate(t,n,e)}}}},mr={dataContainerProps:function(e){var t=e.formField;return{relationEntities:[t.id],tooltips:[t.targetEntity]}},getOptions:function(e){var t=e.formField,n=e.formData;return{options:Xe()(n,["relationEntities",t.id,"data"],[]),isLoading:Xe()(n,["relationEntities",t.id,"isLoading"],!1),tooltips:Xe()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},noResultsText:n.intl.formatMessage({id:"client.component.remoteselect.noResultsText"}),fetchOptions:function(){return n.loadRelationEntities(t.id,t.targetEntity,{forceReload:!1,constriction:t.constriction,where:t.condition})}}}};function gr(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 vr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gr(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yr={address:Dn,binary:Wn,boolean:Tn,choice:{hasValue:function(e){return e.value.options.filter((function(e){return e.checked})).length>0},hideIfEmptyValue:function(){return!1},getOptions:function(e){var t=e.formField;return{selectionType:t.selectionType,renderHtmlInOptions:t.renderHtmlInOptions}}},code:An,counter:nr,"data-amount":nr,datetime:Fn,date:Ln,birthdate:Ln,"pulldown-date":Ln,decimal:Hn,document:Wn,double:Hn,duration:Yn,geosearch:Gn,html:Xn,image:Wn,integer:Qn,location:er,long:Qn,moneyamount:tr,marking:Tn,"multi-remote-field":hr,"multi-select-box":mr,"named-upload":Wn,number:nr,phone:or,"pseudo-select":{hasValue:function(e){return e.value.options.filter((function(e){return e.selected})).length>0},hideIfEmptyValue:function(){return!1},getOptions:function(e){return{isMulti:e.formField.isMulti}}},"search-filter":{dataContainerProps:function(e){return{searchFilters:[e.formField.model]}},getOptions:function(e){var t=e.formField,n=e.formData;return{isMulti:t.multiple,options:Xe()(n.searchFilters,t.model,null),fetchOptions:function(){return n.loadSearchFilters(t.model,t.group)},noResultsText:n.intl.formatMessage({id:"client.component.searchfilter.noResultsText"})}}},"single-remote-field":hr,"single-select-box":mr,sorting:nr,percent:rr},br=vr({},yr);const wr={editable:yr,readOnly:vr({},yr),list:br,search:vr(vr({},yr),{},{boolean:Mn,marking:Mn})};var Or=i(44759),xr=i(41609),kr=i.n(xr),Sr=i(58808),Pr=i.n(Sr),jr=i(41505),_r=i.n(jr),Er=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Cr=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},Dr=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},Tr={outline:"none"},Mr=function(e){function t(){var n,r;Er(this,t);for(var o=arguments.length,a=Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=r=Dr(this,e.call.apply(e,[this].concat(a))),r.state={focused:!1},r._isMounted=!1,r._lastBlurEvent=null,r.ref=L().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)},Dr(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?L().cloneElement(e({focused:t,getRef:this.ref}),n):L().createElement("div",Cr({ref:this.ref,style:Tr},n),e)},t}(L().Component);Mr.propTypes={children:_r().oneOfType([_r().node,_r().func]).isRequired,onBlur:_r().func,onFocus:_r().func},Mr.defaultProps={onBlur:function(){},onFocus:function(){}};const Rr=Mr;var Ir,Nr,Ar,Zr,Lr,Fr,Hr,Br,Ur,Wr=i(41291),zr=(0,$.iv)(Ir||(Ir=Q()(["\n align-items: center;\n cursor: ",";\n display: flex;\n"])),(function(e){return e.immutable?"not-allowed":"default"})),Yr=$.ZP.label.withConfig({displayName:"StyledEditableWrapper"})(Nr||(Nr=Q()(["\n &&& {\n margin: 0; /* reset Bootstrap and Ext JS */\n padding: 0; /* reset Ext JS */\n ","\n }\n"])),zr),Vr=(0,$.iv)(Ar||(Ar=Q()(["\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,et.Z)({color:oe.FS.color("text")})}),oe.FS.color("text"),(function(e){return e.immutable&&"margin: unset;"}),(function(e){return e.immutable?"none":"auto"})),qr=(0,$.iv)(Zr||(Zr=Q()(["\n display: flex;\n align-items: center;\n"]))),Gr=$.ZP.div.withConfig({displayName:"StyledEditableControl"})(Lr||(Lr=Q()(["\n &&& {\n ","\n }\n"])),qr),Kr=$.ZP.span.withConfig({displayName:"StyledEditableValue"})(Fr||(Fr=Q()(["\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"])),oe.FS.color("signal.danger")),Xr=$.ZP.div.withConfig({displayName:"StyledLocationEdit"})(Hr||(Hr=Q()(["\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"])),zr,te.Z.space(-2),te.Z.space(-2),(function(e){var t=e.immutable,n=e.theme;return t?Xe()(n,"colors.textDisabled"):Xe()(n,"colors.text")}),Vr,oe.FS.color("paper"),oe.FS.color("signal.info"),oe.FS.color("secondaryLight"),oe.FS.color("backgroundItemHover")),Qr=(0,$.ZP)(Xr).withConfig({displayName:"StyledAddressEdit"})(Br||(Br=Q()(["\n && {\n div {\n :nth-of-type(1) {\n flex: auto;\n width: 100%;\n }\n }\n }\n"])));function $r(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 Jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$r(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const eo=function(e){var t=e.onChange,n=e.options,r=e.value,o=e.id,a=e.immutable,i=e.name,c=function(e){var t=e.street,n=e.houseNr;return n?"".concat(t," ").concat(n):t},u=function(e){var t=e.street,n=e.state,r=e.country,o=e.postcode,a=e.city;if(!t)return null;var i=c(e),u=n?"- ".concat(n):"",s=r?"/ ".concat(r.display):"";return(0,G.jsxs)(q.ZP.Span,{children:[i,", ",o," ",a," ",u," ",s]})},s=function(e,r){var o=r.suggestion;!0===o.validationRequired?n.validateLocation(o,t):t(o)},l=function(e){var t=e.value,r=n.locationValues,o=r.postcode,a=r.city,i=r.country,c={street:t,postcode:o,city:a};n.fetchSuggestions(c,i)},f={id:o,value:r&&r.street?c(r):"",onChange:function(e){return function(n,o){var a=o.newValue;t(Jr(Jr({},r),{},g()({},e,a)))}}("street"),disabled:a};return(0,G.jsx)(Rr,{children:function(e){var t,r,o,c,p,d,h,m=e.getRef;return(0,G.jsxs)(Qr,{immutable:a,name:i,ref:m,children:[(0,G.jsx)(Pr(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:l,getSuggestionValue:(h="street",function(e){return e[h]}),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:f,onSuggestionSelected:s,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!a}}),(0,G.jsxs)(Gr,{children:[n.isLoading&&(Ur||(Ur=(0,G.jsx)(kt.Z,{size:"1.8rem"}))),(o=n.locationValues,c=o.street,p=o.city,d=o.postcode,Boolean(c&&(p||d))&&(0,G.jsx)(Wr.Z,{href:(t=n.locationValues,r=t?Object.values(t).filter(Boolean).map((function(e){var t="object"===xn()(e)&&e.display?e.display:e;return encodeURIComponent(t)})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(r)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:n.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};var to=i(14293),no=i.n(to),ro=i(23493),oo=i.n(ro),ao=i(33417),io=i(1972),co=i(32924),uo=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];var so=i(2717);function lo(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 fo(e,t){return(fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function po(e){return(po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ho=i(62360);function mo(e,t){if(t&&("object"===(0,ho.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 go(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=po(e);if(t){var o=po(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mo(this,n)}}var vo=i(31599);var yo=i(78001);function bo(e){return function(e){if(Array.isArray(e))return(0,vo.Z)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,yo.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 wo=i(29382),Oo=i(1537),xo=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ko(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||xo(r)&&xo(o)))return!1;var r,o;return!0}for(var So={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"},Po=function(e){return(0,Oo.tZ)("span",(0,so.Z)({css:So},e))},jo={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,u=e.isSelected,s=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(s(i,n),".");if("menu"===t){var l=c?" disabled":"",f="".concat(u?"selected":"focused").concat(l);return"option ".concat(a," ").concat(f,", ").concat(s(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},_o=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,i=e.selectValue,c=e.selectProps,u=e.id,s=c.ariaLiveMessages,l=c.getOptionLabel,f=c.inputValue,p=c.isMulti,d=c.isOptionDisabled,h=c.isSearchable,m=c.menuIsOpen,g=c.options,v=c.screenReaderStatus,y=c.tabSelectsValue,b=c["aria-label"],w=c["aria-live"],O=(0,Z.useMemo)((function(){return(0,ao.Z)((0,ao.Z)({},jo),s||{})}),[s]),x=(0,Z.useMemo)((function(){var e,n="";if(t&&O.onChange){var r=t.option,o=t.options,a=t.removedValue,c=t.removedValues,u=t.value,s=a||r||(e=u,Array.isArray(e)?null:e),f=s?l(s):"",p=o||c||void 0,h=p?p.map(l):[],m=(0,ao.Z)({isDisabled:s&&d(s,i),label:f,labels:h},t);n=O.onChange(m)}return n}),[t,O,d,i,l]),k=(0,Z.useMemo)((function(){var e="",t=n||r,a=!!(n&&i&&i.includes(n));if(t&&O.onFocus){var c={focused:t,label:l(t),isDisabled:d(t,i),isSelected:a,options:o,context:t===n?"menu":"value",selectValue:i};e=O.onFocus(c)}return e}),[n,r,l,d,O,o,i]),S=(0,Z.useMemo)((function(){var e="";if(m&&g.length&&O.onFilter){var t=v({count:o.length});e=O.onFilter({inputValue:f,resultsMessage:t})}return e}),[o,f,m,O,g,v]),P=(0,Z.useMemo)((function(){var e="";if(O.guidance){var t=r?"value":m?"menu":"input";e=O.guidance({"aria-label":b,context:t,isDisabled:n&&d(n,i),isMulti:p,isSearchable:h,tabSelectsValue:y})}return e}),[b,n,r,p,d,h,m,O,i,y]),j="".concat(k," ").concat(S," ").concat(P),_=(0,Oo.tZ)(Z.Fragment,null,(0,Oo.tZ)("span",{id:"aria-selection"},x),(0,Oo.tZ)("span",{id:"aria-context"},j)),E="initial-input-focus"===(null==t?void 0:t.action);return(0,Oo.tZ)(Z.Fragment,null,(0,Oo.tZ)(Po,{id:u},E&&_),(0,Oo.tZ)(Po,{"aria-live":w,"aria-atomic":"false","aria-relevant":"additions text"},a&&!E&&_))},Eo=[{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źẑżžẓẕƶȥɀⱬꝣ"}],Co=new RegExp("["+Eo.map((function(e){return e.letters})).join("")+"]","g"),Do={},To=0;To<Eo.length;To++)for(var Mo=Eo[To],Ro=0;Ro<Mo.letters.length;Ro++)Do[Mo.letters[Ro]]=Mo.base;var Io=function(e){return e.replace(Co,(function(e){return Do[e]}))},No=function(e,t){void 0===t&&(t=ko);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}(Io),Ao=function(e){return e.replace(/^\s+|\s+$/g,"")},Zo=function(e){return"".concat(e.label," ").concat(e.value)},Lo=["innerRef"];function Fo(e){var t=e.innerRef,n=(0,co.Z)(e,Lo),r=(0,wo.r)(n,"onExited","in","enter","exit","appear");return(0,Oo.tZ)("input",(0,so.Z)({ref:t},r,{css:(0,Oo.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 Ho=["boxSizing","height","overflow","paddingRight","position"],Bo={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Uo(e){e.preventDefault()}function Wo(e){e.stopPropagation()}function zo(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Yo(){return"ontouchstart"in window||navigator.maxTouchPoints}var Vo=!("undefined"==typeof window||!window.document||!window.document.createElement),qo=0,Go={capture:!1,passive:!1};var Ko=function(){return document.activeElement&&document.activeElement.blur()},Xo={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Qo(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,Z.useRef)(!1),c=(0,Z.useRef)(!1),u=(0,Z.useRef)(0),s=(0,Z.useRef)(null),l=(0,Z.useCallback)((function(e,t){if(null!==s.current){var u=s.current,l=u.scrollTop,f=u.scrollHeight,p=u.clientHeight,d=s.current,h=t>0,m=f-p-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=f,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]),f=(0,Z.useCallback)((function(e){l(e,e.deltaY)}),[l]),p=(0,Z.useCallback)((function(e){u.current=e.changedTouches[0].clientY}),[]),d=(0,Z.useCallback)((function(e){var t=u.current-e.changedTouches[0].clientY;l(e,t)}),[l]),h=(0,Z.useCallback)((function(e){if(e){var t=!!wo.s&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",d,t)}}),[d,p,f]),m=(0,Z.useCallback)((function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",d,!1))}),[d,p,f]);return(0,Z.useEffect)((function(){if(t){var e=s.current;return h(e),function(){m(e)}}}),[t,h,m]),function(e){s.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,Z.useRef)({}),a=(0,Z.useRef)(null),i=(0,Z.useCallback)((function(e){if(Vo){var t=document.body,n=t&&t.style;if(r&&Ho.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&qo<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,c=window.innerWidth-i+a||0;Object.keys(Bo).forEach((function(e){var t=Bo[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(c,"px"))}t&&Yo()&&(t.addEventListener("touchmove",Uo,Go),e&&(e.addEventListener("touchstart",zo,Go),e.addEventListener("touchmove",Wo,Go))),qo+=1}}),[r]),c=(0,Z.useCallback)((function(e){if(Vo){var t=document.body,n=t&&t.style;qo=Math.max(qo-1,0),r&&qo<1&&Ho.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&Yo()&&(t.removeEventListener("touchmove",Uo,Go),e&&(e.removeEventListener("touchstart",zo,Go),e.removeEventListener("touchmove",Wo,Go)))}}),[r]);return(0,Z.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,Oo.tZ)(Z.Fragment,null,n&&(0,Oo.tZ)("div",{onClick:Ko,css:Xo}),t((function(e){o(e),a(e)})))}var $o={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Jo=function(e){var t=e.name,n=e.onFocus;return(0,Oo.tZ)("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:$o,value:"",onChange:function(){}})},ea={clearIndicator:wo.a,container:wo.b,control:wo.d,dropdownIndicator:wo.e,group:wo.g,groupHeading:wo.f,indicatorsContainer:wo.i,indicatorSeparator:wo.h,input:wo.j,loadingIndicator:wo.l,loadingMessage:wo.k,menu:wo.m,menuList:wo.n,menuPortal:wo.o,multiValue:wo.p,multiValueLabel:wo.q,multiValueRemove:wo.t,noOptionsMessage:wo.u,option:wo.v,placeholder:wo.w,singleValue:wo.x,valueContainer:wo.y};var ta,na={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}},ra={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:(0,wo.z)(),captureMenuScroll:!(0,wo.z)(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=(0,ao.Z)({ignoreCase:!0,ignoreAccents:!0,stringify:Zo,trim:!0,matchFrom:"any"},ta),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,c=n.matchFrom,u=i?Ao(t):t,s=i?Ao(a(e)):a(e);return r&&(u=u.toLowerCase(),s=s.toLowerCase()),o&&(u=No(u),s=Io(s)),"start"===c?s.substr(0,u.length)===u:s.indexOf(u)>-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,wo.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 oa(e,t,n,r){return{type:"option",data:t,isDisabled:la(e,t,n),isSelected:fa(e,t,n),label:ua(e,t),value:sa(e,t),index:r}}function aa(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return oa(e,n,t,r)})).filter((function(t){return ca(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=oa(e,n,t,r);return ca(e,a)?a:void 0})).filter(wo.K)}function ia(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,bo(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function ca(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,c=t.value;return(!da(e)||!a)&&pa(e,{label:i,value:c,data:o},r)}var ua=function(e,t){return e.getOptionLabel(t)},sa=function(e,t){return e.getOptionValue(t)};function la(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function fa(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=sa(e,t);return n.some((function(t){return sa(e,t)===r}))}function pa(e,t,n){return!e.filterOption||e.filterOption(t,n)}var da=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},ha=1,ma=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&&fo(e,t)}(a,e);var t,n,r,o=go(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),u=t.isOptionDisabled(e,i);if(c){var s=t.getOptionValue(e);t.setValue((0,wo.B)(i.filter((function(e){return t.getOptionValue(e)!==s}))),"deselect-option",e)}else{if(u)return void t.ariaOnChange((0,wo.C)(e),{action:"select-option",option:e,name:a});o?t.setValue((0,wo.B)([].concat(bo(i),[e])),"select-option",e):t.setValue((0,wo.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,wo.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,wo.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,wo.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 wo.E.apply(void 0,[t.props.classNamePrefix].concat(n))},t.getOptionLabel=function(e){return ua(t.props,e)},t.getOptionValue=function(e){return sa(t.props,e)},t.getStyles=function(e,n){var r=t.props.unstyled,o=ea[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,wo.F)(t.props)},t.buildCategorizedOptions=function(){return aa(t.props,t.state.selectValue)},t.getCategorizedOptions=function(){return t.props.menuIsOpen?t.buildCategorizedOptions():[]},t.buildFocusableOptions=function(){return ia(t.buildCategorizedOptions())},t.getFocusableOptions=function(){return t.props.menuIsOpen?t.buildFocusableOptions():[]},t.ariaOnChange=function(e,n){t.setState({ariaSelection:(0,ao.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,wo.G)(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 da(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,u=n.isDisabled,s=n.menuIsOpen,l=n.onKeyDown,f=n.tabSelectsValue,p=n.openMenuOnFocus,d=t.state,h=d.focusedOption,m=d.focusedValue,g=d.selectValue;if(!(u||"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||!s||!f||!h||p&&t.isOptionSelected(h,g))return;t.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(s){if(!h)return;if(t.isComposing)return;t.selectOption(h);break}return;case"Escape":s?(t.setState({inputIsHiddenAfterUpdate:!1}),t.onInputChange("",{action:"menu-close",prevInputValue:i}),t.onMenuClose()):c&&a&&t.clearValue();break;case" ":if(i)return;if(!s){t.openMenu("first");break}if(!h)return;t.selectOption(h);break;case"ArrowUp":s?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":s?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!s)return;t.focusOption("pageup");break;case"PageDown":if(!s)return;t.focusOption("pagedown");break;case"Home":if(!s)return;t.focusOption("first");break;case"End":if(!s)return;t.focusOption("last");break;default:return}e.preventDefault()}},t.instancePrefix="react-select-"+(t.props.instanceId||++ha),t.state.selectValue=(0,wo.H)(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,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,u=e.options,s=e.value,l=e.menuIsOpen,f=e.inputValue,p=e.isMulti,d=(0,wo.H)(s),h={};if(n&&(s!==n.value||u!==n.options||l!==n.menuIsOpen||f!==n.inputValue)){var m=l?function(e,t){return ia(aa(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;h={selectValue:d,focusedOption:function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,m),focusedValue:g,clearFocusValueOnUpdate:!1}}var v=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},y=a,b=i&&c;return i&&!b&&(y={value:(0,wo.D)(p,d,d[0]||null),options:d,action:"initial-input-focus"},b=!c),"initial-input-focus"===(null==a?void 0:a.action)&&(y=null),(0,ao.Z)((0,ao.Z)((0,ao.Z)({},h),v),{},{prevProps:e,ariaSelection:y,prevWasFocused:b})}}],(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,wo.I)(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,wo.I)(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(na):(0,ao.Z)((0,ao.Z)({},na),this.props.theme):na}},{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,u=c.isMulti,s=c.isRtl,l=c.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:u,isRtl:s,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 la(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return fa(this.props,e,t)}},{key:"filterOption",value:function(e,t){return pa(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,u=e.required,s=this.getComponents().Input,l=this.state,f=l.inputIsHidden,p=l.ariaSelection,d=this.commonProps,h=r||this.getElementId("input"),m=(0,ao.Z)((0,ao.Z)((0,ao.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":u,role:"combobox"},c&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?Z.createElement(s,(0,so.Z)({},d,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},m)):Z.createElement(Fo,(0,so.Z)({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:wo.J,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,u=this.commonProps,s=this.props,l=s.controlShouldRenderValue,f=s.isDisabled,p=s.isMulti,d=s.inputValue,h=s.placeholder,m=this.state,g=m.selectValue,v=m.focusedValue,y=m.isFocused;if(!this.hasValue()||!l)return d?null:Z.createElement(c,(0,so.Z)({},u,{key:"placeholder",isDisabled:f,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(p)return g.map((function(t,i){var c=t===v,s="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return Z.createElement(n,(0,so.Z)({},u,{components:{Container:r,Label:o,Remove:a},isFocused:c,isDisabled:f,key:s,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 Z.createElement(i,(0,so.Z)({},u,{data:b,isDisabled:f}),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 Z.createElement(e,(0,so.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?Z.createElement(e,(0,so.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 Z.createElement(n,(0,so.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 Z.createElement(e,(0,so.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,u=t.NoOptionsMessage,s=t.Option,l=this.commonProps,f=this.state.focusedOption,p=this.props,d=p.captureMenuScroll,h=p.inputValue,m=p.isLoading,g=p.loadingMessage,v=p.minMenuHeight,y=p.maxMenuHeight,b=p.menuIsOpen,w=p.menuPlacement,O=p.menuPosition,x=p.menuPortalTarget,k=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,P=p.noOptionsMessage,j=p.onMenuScrollToTop,_=p.onMenuScrollToBottom;if(!b)return null;var E,C=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,c=t.label,u=t.value,p=f===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 Z.createElement(s,(0,so.Z)({},l,{innerProps:g,data:o,isDisabled:a,isSelected:i,key:m,label:c,type:r,value:u,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())E=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),u="".concat(c,"-heading");return Z.createElement(n,(0,so.Z)({},l,{key:c,data:o,options:a,Heading:r,headingProps:{id:u,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;E=Z.createElement(c,l,D)}else{var T=P({inputValue:h});if(null===T)return null;E=Z.createElement(u,l,T)}var M={minMenuHeight:v,maxMenuHeight:y,menuPlacement:w,menuPosition:O,menuShouldScrollIntoView:S},R=Z.createElement(wo.M,(0,so.Z)({},l,M),(function(t){var n=t.ref,r=t.placerProps,i=r.placement,c=r.maxHeight;return Z.createElement(o,(0,so.Z)({},l,M,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:m,placement:i}),Z.createElement(Qo,{captureEnabled:d,onTopArrive:j,onBottomArrive:_,lockEnabled:k},(function(t){return Z.createElement(a,(0,so.Z)({},l,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:m,maxHeight:c,focusedOption:f}),E)})))}));return x||"fixed"===O?Z.createElement(i,(0,so.Z)({},l,{appendTo:x,controlElement:this.controlRef,menuPlacement:w,menuPosition:O}),R):R}},{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(i&&!this.hasValue()&&!r)return Z.createElement(Jo,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(o){if(n){var u=c.map((function(t){return e.getOptionValue(t)})).join(n);return Z.createElement("input",{name:a,type:"hidden",value:u})}var s=c.length>0?c.map((function(t,n){return Z.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})})):Z.createElement("input",{name:a,type:"hidden",value:""});return Z.createElement("div",null,s)}var l=c[0]?this.getOptionValue(c[0]):"";return Z.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 Z.createElement(_o,(0,so.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,u=a.isDisabled,s=a.menuIsOpen,l=this.state.isFocused,f=this.commonProps=this.getCommonProps();return Z.createElement(r,(0,so.Z)({},f,{className:i,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:l}),this.renderLiveRegion(),Z.createElement(t,(0,so.Z)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:l,menuIsOpen:s}),Z.createElement(o,(0,so.Z)({},f,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),Z.createElement(n,(0,so.Z)({},f,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}])&&lo(t.prototype,n),r&&lo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(Z.Component);ma.defaultProps=ra;i(66751),i(30314),i(73469);var ga=(0,Z.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,u=e.menuIsOpen,s=e.onChange,l=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,d=e.value,h=(0,co.Z)(e,uo),m=(0,Z.useState)(void 0!==c?c:n),g=(0,io.Z)(m,2),v=g[0],y=g[1],b=(0,Z.useState)(void 0!==u?u:o),w=(0,io.Z)(b,2),O=w[0],x=w[1],k=(0,Z.useState)(void 0!==d?d:i),S=(0,io.Z)(k,2),P=S[0],j=S[1],_=(0,Z.useCallback)((function(e,t){"function"==typeof s&&s(e,t),j(e)}),[s]),E=(0,Z.useCallback)((function(e,t){var n;"function"==typeof l&&(n=l(e,t)),y(void 0!==n?n:e)}),[l]),C=(0,Z.useCallback)((function(){"function"==typeof p&&p(),x(!0)}),[p]),D=(0,Z.useCallback)((function(){"function"==typeof f&&f(),x(!1)}),[f]),T=void 0!==c?c:v,M=void 0!==u?u:O,R=void 0!==d?d:P;return(0,ao.Z)((0,ao.Z)({},h),{},{inputValue:T,menuIsOpen:M,onChange:_,onInputChange:E,onMenuClose:D,onMenuOpen:C,value:R})}(e);return Z.createElement(ma,(0,so.Z)({ref:t},n))}));function va(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 ya(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?va(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):va(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ba=(0,x.ZP)((function(e){var t;return(0,G.jsx)("span",ya(ya({},e.innerProps),{},{children:(0,G.jsx)($e.Z,{icon:"times",tabIndex:-1,"aria-label":(t="client.component.select.clearFieldLabel",e.intl.formatMessage({id:t}))})}))}));var wa=i(95497);function Oa(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 xa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oa(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ka=function(e){var t=e.selectProps,n=t.isDisabled,r=t.menuIsOpen;return n?null:(0,G.jsx)(wo.c.DropdownIndicator,xa(xa({},e),{},{children:(0,G.jsx)(wa.M6,{children:(0,G.jsx)($e.Z,{icon:r?"chevron-up":"chevron-down",visible:!0,tabIndex:-1})})}))};var Sa,Pa,ja;function _a(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 Ea(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_a(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ca=function(e,t,n){return function(r){r.stopPropagation(),e(t,n)}},Da=function(e,t){return function(n){n.stopPropagation(),e(t)}},Ta=function(e,t){return function(n){n.stopPropagation(),e(t)}},Ma=function(e){e.stopPropagation()};const Ra=function(e){var t=e.selectProps,n=t.openDocsTreeSearch,r=t.openAdvancedSearch,o=t.openRemoteCreate,a=t.isDisabled,i=t.hasDocsTreeSearch,c=t.hasAdvancedSearch,u=t.createPermission,s=t.value,l=t.isMulti,f=t.inputValue,p=l&&(c||i);return(0,G.jsx)(wa.HO,{isTopAligned:p,children:(0,G.jsxs)(wo.c.IndicatorsContainer,Ea(Ea({},e),{},{children:[e.children,n&&!a&&(0,G.jsx)("span",{onTouchEnd:Ma,onMouseDown:Da(n,s),children:Sa||(Sa=(0,G.jsx)($e.Z,{icon:"folder",tabIndex:-1}))}),r&&!a&&(0,G.jsx)("span",{onTouchEnd:Ma,onMouseDown:Ca(r,f,s),children:Pa||(Pa=(0,G.jsx)($e.Z,{icon:"search",tabIndex:-1}))}),u&&!a&&(0,G.jsx)("span",{onTouchEnd:Ma,onMouseDown:Ta(o,s),children:ja||(ja=(0,G.jsx)($e.Z,{icon:"plus",tabIndex:-1}))})]}))})};var Ia;const Na=function(){return Ia||(Ia=(0,G.jsx)("span",{children:(0,G.jsx)(kt.Z,{size:"1.8rem"})}))};var Aa=i(15315);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 La(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Za(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Fa=function(e){var t=e.selectProps,n=e.children;return(0,G.jsx)(wa._M,{attachment:"top left",targetAttachment:"bottom left",constraints:[{to:"window",attachment:"together"}],renderTarget:function(e){return(0,G.jsx)("div",{ref:e})},renderElement:function(r){return(0,G.jsx)("div",{ref:r,className:Aa.c,children:(0,G.jsx)(wa.l2,La(La({},Sn()(e,["innerRef"])),{},{wrapperWidth:t.wrapperWidth,wrapperHeight:t.wrapperHeight,children:n}))})}})};function Ha(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 Ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ha(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ha(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Ua=function(e){var t=e.selectProps,n=e.children,r=t.moreOptionsAvailable,o=t.moreOptionsAvailableText;return(0,G.jsxs)(wo.c.MenuList,Ba(Ba({},e),{},{className:"MenuList",children:[n,r&&(0,G.jsx)(wa.OA,{children:o})]}))};var Wa=i(10535),za=i(76791);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 n=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const qa=function(e){var t=e.data,n=e.innerProps,r=e.children,o=e.selectProps,a=o.tooltips,i=o.loadTooltip,c=o.DetailLink,u=Xe()(a,t.key,null),s=(0,G.jsx)("span",Va(Va({},n),{},{children:r})),l=c?(0,G.jsx)(wa.vR,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,G.jsx)(c,{entityKey:t.key,tabIndex:-1,children:(0,G.jsx)(za.Z,{content:u?(0,G.jsx)("div",{dangerouslySetInnerHTML:{__html:Wa.Z.sanitizeHtml(u)}}):null,children:(0,G.jsx)("span",{onMouseOver:function(){return i&&!u&&i(t.key)},children:s})})})}):s;return(0,G.jsx)(wa.B1,{children:l})};var Ga=i(47037),Ka=i.n(Ga),Xa=i(14176),Qa=i.n(Xa);function $a(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 Ja(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$a(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ei=["linkComp"],ti=function(e,t){var n=de.Z.difference(e,t),r=Qa()(Sn()(n,ei),(function(e){return 0===Object.keys(e).length}));return 0===Object.entries(r).length},ni=(0,Z.memo)((function(e){var t=e.linkComp,n=e.entityKey,r=e.children;return t&&Ka()(n)?(0,G.jsx)(wa.vR,{onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},children:(0,G.jsx)(t,{entityKey:n,children:r})}):r}),ti);ni.propTypes={children:y().node,entityKey:y().any,linkComp:y().func};const ri=function(e){var t=e.data,n=e.selectProps,r=e.isDisabled,o=e.children,a=n.tooltips,i=n.loadTooltip,c=n.DetailLink,u=Xe()(a,t.key,null);return(0,G.jsx)(wo.c.SingleValue,Ja(Ja({},e),{},{children:(0,G.jsx)(wa.xq,{onMouseOver:function(){return i&&!u&&i(t.key)},isDisabled:r,children:(0,G.jsx)(za.Z,{content:u?(0,G.jsx)("div",{dangerouslySetInnerHTML:{__html:Wa.Z.sanitizeHtml(u)}}):null,children:(0,G.jsx)(ni,{linkComp:c,entityKey:t.key,children:o})})})}))};function oi(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 ai=function(e){var t;return"Input"===(null==e||null===(t=e.type)||void 0===t?void 0:t.name)};const ii=function(e){var t=e.selectProps,n=e.hasValue,r=e.children,o=t.isMulti,a=t.hasAdvancedSearch,i=t.hasDocsTreeSearch,c=t.isDisabled;if(!(o&&(a||i)))return(0,G.jsx)(wo.c.ValueContainer,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oi(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e));var u=Z.Children.map(r,(function(e){return ai(e)?e:null})),s=Z.Children.map(r,(function(e){return ai(e)?null:e})),l=c&&n;return(0,G.jsxs)(G.Fragment,{children:[!l&&(0,G.jsx)(G.Fragment,{children:u}),(0,G.jsx)(wa.eQ,{children:s})]})};function ci(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 ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const si=(0,$.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,u=e.moreOptionsAvailableText,s=e.noResultsText,l=e.noResultsComp,f=e.onChange,p=e.openDocsTreeSearch,d=e.openAdvancedSearch,h=e.options,m=e.searchOptions,g=e.theme,v=e.tooltips,y=e.value,b=e.DetailLink,w=e.createPermission,O=e.openRemoteCreate,x=(0,Z.useRef)(null),k=(0,Z.useRef)(null),S=function(){var e;return(null===(e=k.current)||void 0===e?void 0:e.clientWidth)||300},P=function(){var e;return(null===(e=k.current)||void 0===e?void 0:e.clientHeight)||35},j=(0,Z.useState)(S()),_=U()(j,2),E=_[0],C=_[1],D=(0,Z.useState)(P()),T=U()(D,2),M=T[0],R=T[1],I=(0,Z.useState)(!1),N=U()(I,2),A=N[0],L=N[1],F=function(e){t&&t(e)},B=(0,Z.useCallback)(m||function(){},[]),W=(0,Z.useCallback)(oo()(B,800,{trailing:!0}),[]),z=Boolean(d),Y=Boolean(p),V=Boolean(w);return(0,G.jsx)(wa.sP,{tabIndex:"-1",id:n,onFocus:function(){x.current.focus(),setTimeout((function(){C(S()),R(P())}),0)},children:(0,G.jsx)(wa.RU,{ref:k,children:(0,G.jsx)(ga,ui(ui({getOptionLabel:function(e){return e.display},getOptionValue:function(e){return e.key},wrapperWidth:E,wrapperHeight:M,components:{ClearIndicator:ba,LoadingIndicator:Na,DropdownIndicator:ka,IndicatorsContainer:Ra,IndicatorSeparator:null,Menu:Fa,MenuList:Ua,MultiValueLabel:qa,SingleValue:ri,ValueContainer:ii},noOptionsMessage:function(e){return s||("function"==typeof l?(0,G.jsx)(l,ui({},e)):" - ")},isMulti:a,closeMenuOnSelect:!a,isSearchable:!0},m?{filterOption:function(){return!0}}:{}),{},{isClearable:!0,loadingMessage:function(){return null},placeholder:"",menuShouldScrollIntoView:!1,autoFocus:!1,value:y||null,onChange:function(e){f(e),F(e)},onInputChange:function(e,t){var n=t.action;m&&e&&W(e,y),""===e&&"input-change"===n&&F(y)},options:H()(h||[]),onKeyDown:function(e){"Enter"===e.key&&A?(e.stopPropagation(),x.current&&null===x.current.focusedOptionRef&&e.preventDefault()):"Tab"===e.key&&(e.preventDefault=function(){})},isLoading:o,isDisabled:r,ref:x,onMenuOpen:function(){F(y),L(!0)},onMenuClose:function(){L(!1)},styles:(0,wa.i4)(g),loadTooltip:i,tooltips:v,DetailLink:b,hasDocsTreeSearch:Y,openDocsTreeSearch:p,hasAdvancedSearch:z,openAdvancedSearch:d,moreOptionsAvailable:c,moreOptionsAvailableText:u,blurInputOnSelect:!1,hasCreatePermission:V,createPermission:w,openRemoteCreate:O,closeMenuOnScroll:function(e){var t;return!(null!==(t=e.target.classList)&&void 0!==t&&t.contains("MenuList"))}}))})})}));const li=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,G.jsx)(si,{id:t,immutable:n,isMulti:!1,onChange:function(e){return c(e?e.key:null)},value:no()(r)?r:{key:r,display:r?a:i},openMenuOnClick:!0,options:[{key:!0,display:a},{key:!1,display:i}]})};var fi,pi=$.ZP.div.withConfig({displayName:"StyledBoolEdit"})(fi||(fi=Q()(["\n margin: 5px 0;\n"])));const di=function(e){return(0,G.jsx)(pi,{children:(0,G.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 hi,mi,gi=i(79686);function vi(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 yi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vi(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bi=$.ZP.div.withConfig({displayName:"StyledOption"})(hi||(hi=Q()(["\n margin: "," 0;\n"])),te.Z.space(-1.4)),wi=$.ZP.span.withConfig({displayName:"StyledLabel"})(mi||(mi=Q()(["\n ","\n display: inline-block;\n margin-left: ",";\n"])),(0,et.Z)(),te.Z.space(-1.5)),Oi={single:"radio",multiple:"checkbox"},xi={single:{checked:!1},multiple:{}},ki=function(e,t){return t?(0,G.jsx)(gi.Z,{value:e}):e},Si=function(e){var t=e.groupName,n=e.id,r=e.label,o=e.labelComponent,a=e.checked,i=e.immutable,c=e.hideCheckbox,u=e.selectionType,s=e.renderHtmlInOptions,l=e.handleChange;return(0,G.jsxs)(bi,{children:[!c&&(0,G.jsx)("input",{name:t,type:Oi[u],checked:a||!1,onChange:l,id:n,disabled:i}),(0,G.jsx)(wi,{children:o||ki(r,s)})]})};const Pi=function(e){var t=function(t){if(e.onChange){var n=e.value.options.map((function(n){return yi(yi({},n),n.id===t.target.id?{checked:t.target.checked}:xi[e.options.selectionType])}));e.onChange({options:n})}};return(0,G.jsx)(G.Fragment,{children:e.value.options.map((function(n){return(0,G.jsx)(Si,{groupName:e.id,id:n.id,label:n.label,labelComponent:n.labelComponent,checked:n.checked,immutable:e.immutable||n.immutable,hideCheckbox:n.hideCheckbox,selectionType:e.options.selectionType,renderHtmlInOptions:e.options.renderHtmlInOptions,handleChange:t},n.id)}))})};var ji=i(23279),_i=i.n(ji);function Ei(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 n=null!=arguments[t]?arguments[t]:{};t%2?Ei(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ei(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Di=(0,Z.lazy)((function(){return Promise.all([i.e(560),i.e(85)]).then(i.bind(i,30919))}));const Ti=function(e){return(0,G.jsx)(Z.Suspense,{fallback:(t=e.value,(0,G.jsx)("div",{children:(0,G.jsx)("p",{children:t})})),children:(0,G.jsx)(Di,Ci({},e))});var t};var Mi,Ri=$.ZP.div.withConfig({displayName:"StyledEditorWrapper"})(Mi||(Mi=Q()(["\n margin-top: ",";\n"])),te.Z.space(-1.5));const Ii=function(e){var t=e.value,n=e.onChange,r=e.immutable,o=e.options;return(0,G.jsx)(Ri,{children:(0,G.jsx)(Ti,{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 Ni=i(86896),Ai=i(23842),Zi=i(93379),Li=i.n(Zi),Fi=i(7795),Hi=i.n(Fi),Bi=i(90569),Ui=i.n(Bi),Wi=i(3565),zi=i.n(Wi),Yi=i(19216),Vi=i.n(Yi),qi=i(44589),Gi=i.n(qi),Ki=i(16721),Xi={};Xi.styleTagTransform=Gi(),Xi.setAttributes=zi(),Xi.insert=Ui().bind(null,"head"),Xi.domAPI=Hi(),Xi.insertStyleElement=Vi();Li()(Ki.Z,Xi);Ki.Z&&Ki.Z.locals&&Ki.Z.locals;var Qi=i(9198),$i=i.n(Qi),Ji=(Math.pow(10,8),6e4),ec=36e5,tc=i(13882),nc=i(83946);var rc={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},oc=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ac=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,ic=/^([+-])(\d{2})(?::?(\d{2}))?$/;function cc(e){var t,n={},r=e.split(rc.dateTimeDelimiter);if(r.length>2)return n;if(/:/.test(r[0])?t=r[0]:(n.date=r[0],t=r[1],rc.timeZoneDelimiter.test(n.date)&&(n.date=e.split(rc.timeZoneDelimiter)[0],t=e.substr(n.date.length,e.length))),t){var o=rc.timezone.exec(t);o?(n.time=t.replace(o[1],""),n.timezone=o[1]):n.time=t}return n}function uc(e,t){var n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};var o=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?o:100*a,restDateString:e.slice((r[1]||r[2]).length)}}function sc(e,t){if(null===t)return new Date(NaN);var n=e.match(oc);if(!n)return new Date(NaN);var r=!!n[4],o=lc(n[1]),a=lc(n[2])-1,i=lc(n[3]),c=lc(n[4]),u=lc(n[5])-1;if(r)return function(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}(0,c,u)?function(e,t,n){var r=new Date(0);r.setUTCFullYear(e,0,4);var o=r.getUTCDay()||7,a=7*(t-1)+n+1-o;return r.setUTCDate(r.getUTCDate()+a),r}(t,c,u):new Date(NaN);var s=new Date(0);return function(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(hc[t]||(mc(e)?29:28))}(t,a,i)&&function(e,t){return t>=1&&t<=(mc(e)?366:365)}(t,o)?(s.setUTCFullYear(t,a,Math.max(o,i)),s):new Date(NaN)}function lc(e){return e?parseInt(e):1}function fc(e){var t=e.match(ac);if(!t)return NaN;var n=pc(t[1]),r=pc(t[2]),o=pc(t[3]);return function(e,t,n){if(24===e)return 0===t&&0===n;return n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}(n,r,o)?n*ec+r*Ji+1e3*o:NaN}function pc(e){return e&&parseFloat(e.replace(",","."))||0}function dc(e){if("Z"===e)return 0;var t=e.match(ic);if(!t)return 0;var n="+"===t[1]?-1:1,r=parseInt(t[2]),o=t[3]&&parseInt(t[3])||0;return function(e,t){return t>=0&&t<=59}(0,o)?n*(r*ec+o*Ji):NaN}var hc=[31,null,31,30,31,30,31,31,30,31,30,31];function mc(e){return e%400==0||e%4==0&&e%100!=0}var gc,vc,yc,bc=$.ZP.div.withConfig({displayName:"StyledDatePickerOuterWrapper"})(gc||(gc=Q()(["\n outline: ",";\n"])),(function(e){return e.immutable?0:"initial"})),wc=$.ZP.div.withConfig({displayName:"StyledDatePickerWrapper"})(vc||(vc=Q()(["\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"])),zr,Vr,(function(e){return e.hasTime&&"border-bottom: 1px solid #aeaeae;"})),Oc=$.ZP.input.withConfig({displayName:"StyledTimeInput"})(yc||(yc=Q()(["\n &&&& {\n ","\n }\n"])),Vr),xc=i(37042),kc=i(4543),Sc=i(39880),Pc=i(85817),jc=i(39159),_c=i(19013);function Ec(e){(0,tc.Z)(1,arguments);var t=(0,_c.Z)(e),n=t.getSeconds();return n}var Cc=i(86);function Dc(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 Tc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Dc(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)?Dc(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}var Mc=i(44941),Rc=i(29558);function Ic(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}var Nc=i(97621),Ac=i(24262),Zc=i(5267);function Lc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fc(e,t){return(Fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Hc(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&&Fc(e,t)}function Bc(e){return(Bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Uc(e,t){if(t&&("object"===(0,Cc.Z)(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Lc(e)}function Wc(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=Bc(e);if(t){var o=Bc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Uc(this,n)}}function zc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yc(e){var t=function(e,t){if("object"!==(0,Cc.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==(0,Cc.Z)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,Cc.Z)(t)?t:String(t)}function Vc(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,Yc(r.key),r)}}function qc(e,t,n){return t&&Vc(e.prototype,t),n&&Vc(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gc(e,t,n){return(t=Yc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kc=function(){function e(){zc(this,e),Gc(this,"priority",void 0),Gc(this,"subPriority",0)}return qc(e,[{key:"validate",value:function(e,t){return!0}}]),e}(),Xc=function(e){Hc(n,e);var t=Wc(n);function n(e,r,o,a,i){var c;return zc(this,n),(c=t.call(this)).value=e,c.validateValue=r,c.setValue=o,c.priority=a,i&&(c.subPriority=i),c}return qc(n,[{key:"validate",value:function(e,t){return this.validateValue(e,this.value,t)}},{key:"set",value:function(e,t,n){return this.setValue(e,t,this.value,n)}}]),n}(Kc),Qc=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",10),Gc(Lc(e),"subPriority",-1),e}return qc(n,[{key:"set",value:function(e,t){if(t.timestampIsSet)return e;var n=new Date(0);return n.setFullYear(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),n.setHours(e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds()),n}}]),n}(Kc),$c=function(){function e(){zc(this,e),Gc(this,"incompatibleTokens",void 0),Gc(this,"priority",void 0),Gc(this,"subPriority",void 0)}return qc(e,[{key:"run",value:function(e,t,n,r){var o=this.parse(e,t,n,r);return o?{setter:new Xc(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}},{key:"validate",value:function(e,t,n){return!0}}]),e}(),Jc=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",140),Gc(Lc(e),"incompatibleTokens",["R","u","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"G":case"GG":case"GGG":return n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"});case"GGGGG":return n.era(e,{width:"narrow"});case"GGGG":default:return n.era(e,{width:"wide"})||n.era(e,{width:"abbreviated"})||n.era(e,{width:"narrow"})}}},{key:"set",value:function(e,t,n){return t.era=n,e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}($c),eu=/^(1[0-2]|0?\d)/,tu=/^(3[0-1]|[0-2]?\d)/,nu=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,ru=/^(5[0-3]|[0-4]?\d)/,ou=/^(2[0-3]|[0-1]?\d)/,au=/^(2[0-4]|[0-1]?\d)/,iu=/^(1[0-1]|0?\d)/,cu=/^(1[0-2]|0?\d)/,uu=/^[0-5]?\d/,su=/^[0-5]?\d/,lu=/^\d/,fu=/^\d{1,2}/,pu=/^\d{1,3}/,du=/^\d{1,4}/,hu=/^-?\d+/,mu=/^-?\d/,gu=/^-?\d{1,2}/,vu=/^-?\d{1,3}/,yu=/^-?\d{1,4}/,bu=/^([+-])(\d{2})(\d{2})?|Z/,wu=/^([+-])(\d{2})(\d{2})|Z/,Ou=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,xu=/^([+-])(\d{2}):(\d{2})|Z/,ku=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Su(e,t){return e?{value:t(e.value),rest:e.rest}:e}function Pu(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ju(e,t){var n=t.match(e);if(!n)return null;if("Z"===n[0])return{value:0,rest:t.slice(1)};var r="+"===n[1]?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*ec+a*Ji+1e3*i),rest:t.slice(n[0].length)}}function _u(e){return Pu(hu,e)}function Eu(e,t){switch(e){case 1:return Pu(lu,t);case 2:return Pu(fu,t);case 3:return Pu(pu,t);case 4:return Pu(du,t);default:return Pu(new RegExp("^\\d{1,"+e+"}"),t)}}function Cu(e,t){switch(e){case 1:return Pu(mu,t);case 2:return Pu(gu,t);case 3:return Pu(vu,t);case 4:return Pu(yu,t);default:return Pu(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Du(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Tu(e,t){var n,r=t>0,o=r?t:1-t;if(o<=50)n=e||100;else{var a=o+50;n=e+100*Math.floor(a/100)-(e>=a%100?100:0)}return r?n:1-n}function Mu(e){return e%400==0||e%4==0&&e%100!=0}var Ru=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",130),Gc(Lc(e),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"yy"===t}};switch(t){case"y":return Su(Eu(4,e),r);case"yo":return Su(n.ordinalNumber(e,{unit:"year"}),r);default:return Su(Eu(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n){var r=e.getUTCFullYear();if(n.isTwoDigitYear){var o=Tu(n.year,r);return e.setUTCFullYear(o,0,1),e.setUTCHours(0,0,0,0),e}var a="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(a,0,1),e.setUTCHours(0,0,0,0),e}}]),n}($c),Iu=i(7651),Nu=i(59025),Au=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",130),Gc(Lc(e),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return{year:e,isTwoDigitYear:"YY"===t}};switch(t){case"Y":return Su(Eu(4,e),r);case"Yo":return Su(n.ordinalNumber(e,{unit:"year"}),r);default:return Su(Eu(t.length,e),r)}}},{key:"validate",value:function(e,t){return t.isTwoDigitYear||t.year>0}},{key:"set",value:function(e,t,n,r){var o=(0,Iu.Z)(e,r);if(n.isTwoDigitYear){var a=Tu(n.year,o);return e.setUTCFullYear(a,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,Nu.Z)(e,r)}var i="era"in t&&1!==t.era?1-n.year:n.year;return e.setUTCFullYear(i,0,r.firstWeekContainsDate),e.setUTCHours(0,0,0,0),(0,Nu.Z)(e,r)}}]),n}($c),Zu=i(66979),Lu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",130),Gc(Lc(e),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t){return Cu("R"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){var r=new Date(0);return r.setUTCFullYear(n,0,4),r.setUTCHours(0,0,0,0),(0,Zu.Z)(r)}}]),n}($c),Fu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",130),Gc(Lc(e),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t){return Cu("u"===t?4:t.length,e)}},{key:"set",value:function(e,t,n){return e.setUTCFullYear(n,0,1),e.setUTCHours(0,0,0,0),e}}]),n}($c),Hu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",120),Gc(Lc(e),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"Q":case"QQ":return Eu(t.length,e);case"Qo":return n.ordinalNumber(e,{unit:"quarter"});case"QQQ":return n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQQ":return n.quarter(e,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(e,{width:"wide",context:"formatting"})||n.quarter(e,{width:"abbreviated",context:"formatting"})||n.quarter(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}($c),Bu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",120),Gc(Lc(e),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"q":case"qq":return Eu(t.length,e);case"qo":return n.ordinalNumber(e,{unit:"quarter"});case"qqq":return n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"});case"qqqqq":return n.quarter(e,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(e,{width:"wide",context:"standalone"})||n.quarter(e,{width:"abbreviated",context:"standalone"})||n.quarter(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=1&&t<=4}},{key:"set",value:function(e,t,n){return e.setUTCMonth(3*(n-1),1),e.setUTCHours(0,0,0,0),e}}]),n}($c),Uu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Gc(Lc(e),"priority",110),e}return qc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"M":return Su(Pu(eu,e),r);case"MM":return Su(Eu(2,e),r);case"Mo":return Su(n.ordinalNumber(e,{unit:"month"}),r);case"MMM":return n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"});case"MMMMM":return n.month(e,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(e,{width:"wide",context:"formatting"})||n.month(e,{width:"abbreviated",context:"formatting"})||n.month(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}($c),Wu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",110),Gc(Lc(e),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return e-1};switch(t){case"L":return Su(Pu(eu,e),r);case"LL":return Su(Eu(2,e),r);case"Lo":return Su(n.ordinalNumber(e,{unit:"month"}),r);case"LLL":return n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"});case"LLLLL":return n.month(e,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(e,{width:"wide",context:"standalone"})||n.month(e,{width:"abbreviated",context:"standalone"})||n.month(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.setUTCMonth(n,1),e.setUTCHours(0,0,0,0),e}}]),n}($c),zu=i(23324);var Yu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",100),Gc(Lc(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"w":return Pu(ru,e);case"wo":return n.ordinalNumber(e,{unit:"week"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n,r){return(0,Nu.Z)(function(e,t,n){(0,tc.Z)(2,arguments);var r=(0,_c.Z)(e),o=(0,nc.Z)(t),a=(0,zu.Z)(r,n)-o;return r.setUTCDate(r.getUTCDate()-7*a),r}(e,n,r),r)}}]),n}($c),Vu=i(49702);var qu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",100),Gc(Lc(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"I":return Pu(ru,e);case"Io":return n.ordinalNumber(e,{unit:"week"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=53}},{key:"set",value:function(e,t,n){return(0,Zu.Z)(function(e,t){(0,tc.Z)(2,arguments);var n=(0,_c.Z)(e),r=(0,nc.Z)(t),o=(0,Vu.Z)(n)-r;return n.setUTCDate(n.getUTCDate()-7*o),n}(e,n))}}]),n}($c),Gu=[31,28,31,30,31,30,31,31,30,31,30,31],Ku=[31,29,31,30,31,30,31,31,30,31,30,31],Xu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",90),Gc(Lc(e),"subPriority",1),Gc(Lc(e),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"d":return Pu(tu,e);case"do":return n.ordinalNumber(e,{unit:"date"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){var n=Mu(e.getUTCFullYear()),r=e.getUTCMonth();return n?t>=1&&t<=Ku[r]:t>=1&&t<=Gu[r]}},{key:"set",value:function(e,t,n){return e.setUTCDate(n),e.setUTCHours(0,0,0,0),e}}]),n}($c),Qu=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",90),Gc(Lc(e),"subpriority",1),Gc(Lc(e),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"D":case"DD":return Pu(nu,e);case"Do":return n.ordinalNumber(e,{unit:"date"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return Mu(e.getUTCFullYear())?t>=1&&t<=366:t>=1&&t<=365}},{key:"set",value:function(e,t,n){return e.setUTCMonth(0,n),e.setUTCHours(0,0,0,0),e}}]),n}($c),$u=i(84314);function Ju(e,t,n){var r,o,a,i,c,u,s,l;(0,tc.Z)(2,arguments);var f=(0,$u.j)(),p=(0,nc.Z)(null!==(r=null!==(o=null!==(a=null!==(i=null==n?void 0:n.weekStartsOn)&&void 0!==i?i:null==n||null===(c=n.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==a?a:f.weekStartsOn)&&void 0!==o?o:null===(s=f.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==r?r:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=(0,_c.Z)(e),h=(0,nc.Z)(t),m=d.getUTCDay(),g=h%7,v=(g+7)%7,y=(v<p?7:0)+h-m;return d.setUTCDate(d.getUTCDate()+y),d}var es=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",90),Gc(Lc(e),"incompatibleTokens",["D","i","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"E":case"EE":case"EEE":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEEE":return n.day(e,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"EEEE":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=Ju(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}($c),ts=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",90),Gc(Lc(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"e":case"ee":return Su(Eu(t.length,e),o);case"eo":return Su(n.ordinalNumber(e,{unit:"day"}),o);case"eee":return n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeeee":return n.day(e,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"});case"eeee":default:return n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=Ju(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}($c),ns=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",90),Gc(Lc(e),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n,r){var o=function(e){var t=7*Math.floor((e-1)/7);return(e+r.weekStartsOn+6)%7+t};switch(t){case"c":case"cc":return Su(Eu(t.length,e),o);case"co":return Su(n.ordinalNumber(e,{unit:"day"}),o);case"ccc":return n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"ccccc":return n.day(e,{width:"narrow",context:"standalone"});case"cccccc":return n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"});case"cccc":default:return n.day(e,{width:"wide",context:"standalone"})||n.day(e,{width:"abbreviated",context:"standalone"})||n.day(e,{width:"short",context:"standalone"})||n.day(e,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(e,t){return t>=0&&t<=6}},{key:"set",value:function(e,t,n,r){return(e=Ju(e,n,r)).setUTCHours(0,0,0,0),e}}]),n}($c);var rs=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",90),Gc(Lc(e),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){var r=function(e){return 0===e?7:e};switch(t){case"i":case"ii":return Eu(t.length,e);case"io":return n.ordinalNumber(e,{unit:"day"});case"iii":return Su(n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiii":return Su(n.day(e,{width:"narrow",context:"formatting"}),r);case"iiiiii":return Su(n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r);case"iiii":default:return Su(n.day(e,{width:"wide",context:"formatting"})||n.day(e,{width:"abbreviated",context:"formatting"})||n.day(e,{width:"short",context:"formatting"})||n.day(e,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(e,t){return t>=1&&t<=7}},{key:"set",value:function(e,t,n){return(e=function(e,t){(0,tc.Z)(2,arguments);var n=(0,nc.Z)(t);n%7==0&&(n-=7);var r=1,o=(0,_c.Z)(e),a=o.getUTCDay(),i=((n%7+7)%7<r?7:0)+n-a;return o.setUTCDate(o.getUTCDate()+i),o}(e,n)).setUTCHours(0,0,0,0),e}}]),n}($c),os=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",80),Gc(Lc(e),"incompatibleTokens",["b","B","H","k","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaaa":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Du(n),0,0,0),e}}]),n}($c),as=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",80),Gc(Lc(e),"incompatibleTokens",["a","B","H","k","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"b":case"bb":case"bbb":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbbb":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Du(n),0,0,0),e}}]),n}($c),is=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",80),Gc(Lc(e),"incompatibleTokens",["a","b","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"B":case"BB":case"BBB":return n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBBB":return n.dayPeriod(e,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(e,{width:"wide",context:"formatting"})||n.dayPeriod(e,{width:"abbreviated",context:"formatting"})||n.dayPeriod(e,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(e,t,n){return e.setUTCHours(Du(n),0,0,0),e}}]),n}($c),cs=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",70),Gc(Lc(e),"incompatibleTokens",["H","K","k","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"h":return Pu(cu,e);case"ho":return n.ordinalNumber(e,{unit:"hour"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=12}},{key:"set",value:function(e,t,n){var r=e.getUTCHours()>=12;return r&&n<12?e.setUTCHours(n+12,0,0,0):r||12!==n?e.setUTCHours(n,0,0,0):e.setUTCHours(0,0,0,0),e}}]),n}($c),us=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",70),Gc(Lc(e),"incompatibleTokens",["a","b","h","K","k","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"H":return Pu(ou,e);case"Ho":return n.ordinalNumber(e,{unit:"hour"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=23}},{key:"set",value:function(e,t,n){return e.setUTCHours(n,0,0,0),e}}]),n}($c),ss=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",70),Gc(Lc(e),"incompatibleTokens",["h","H","k","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"K":return Pu(iu,e);case"Ko":return n.ordinalNumber(e,{unit:"hour"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=11}},{key:"set",value:function(e,t,n){return e.getUTCHours()>=12&&n<12?e.setUTCHours(n+12,0,0,0):e.setUTCHours(n,0,0,0),e}}]),n}($c),ls=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",70),Gc(Lc(e),"incompatibleTokens",["a","b","h","H","K","t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"k":return Pu(au,e);case"ko":return n.ordinalNumber(e,{unit:"hour"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=1&&t<=24}},{key:"set",value:function(e,t,n){var r=n<=24?n%24:n;return e.setUTCHours(r,0,0,0),e}}]),n}($c),fs=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",60),Gc(Lc(e),"incompatibleTokens",["t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"m":return Pu(uu,e);case"mo":return n.ordinalNumber(e,{unit:"minute"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCMinutes(n,0,0),e}}]),n}($c),ps=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",50),Gc(Lc(e),"incompatibleTokens",["t","T"]),e}return qc(n,[{key:"parse",value:function(e,t,n){switch(t){case"s":return Pu(su,e);case"so":return n.ordinalNumber(e,{unit:"second"});default:return Eu(t.length,e)}}},{key:"validate",value:function(e,t){return t>=0&&t<=59}},{key:"set",value:function(e,t,n){return e.setUTCSeconds(n,0),e}}]),n}($c),ds=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",30),Gc(Lc(e),"incompatibleTokens",["t","T"]),e}return qc(n,[{key:"parse",value:function(e,t){return Su(Eu(t.length,e),(function(e){return Math.floor(e*Math.pow(10,3-t.length))}))}},{key:"set",value:function(e,t,n){return e.setUTCMilliseconds(n),e}}]),n}($c),hs=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",10),Gc(Lc(e),"incompatibleTokens",["t","T","x"]),e}return qc(n,[{key:"parse",value:function(e,t){switch(t){case"X":return ju(bu,e);case"XX":return ju(wu,e);case"XXXX":return ju(Ou,e);case"XXXXX":return ju(ku,e);case"XXX":default:return ju(xu,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}($c),ms=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",10),Gc(Lc(e),"incompatibleTokens",["t","T","X"]),e}return qc(n,[{key:"parse",value:function(e,t){switch(t){case"x":return ju(bu,e);case"xx":return ju(wu,e);case"xxxx":return ju(Ou,e);case"xxxxx":return ju(ku,e);case"xxx":default:return ju(xu,e)}}},{key:"set",value:function(e,t,n){return t.timestampIsSet?e:new Date(e.getTime()-n)}}]),n}($c),gs=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",40),Gc(Lc(e),"incompatibleTokens","*"),e}return qc(n,[{key:"parse",value:function(e){return _u(e)}},{key:"set",value:function(e,t,n){return[new Date(1e3*n),{timestampIsSet:!0}]}}]),n}($c),vs=function(e){Hc(n,e);var t=Wc(n);function n(){var e;zc(this,n);for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return Gc(Lc(e=t.call.apply(t,[this].concat(o))),"priority",20),Gc(Lc(e),"incompatibleTokens","*"),e}return qc(n,[{key:"parse",value:function(e){return _u(e)}},{key:"set",value:function(e,t,n){return[new Date(n),{timestampIsSet:!0}]}}]),n}($c),ys={G:new Jc,y:new Ru,Y:new Au,R:new Lu,u:new Fu,Q:new Hu,q:new Bu,M:new Uu,L:new Wu,w:new Yu,I:new qu,d:new Xu,D:new Qu,E:new es,e:new ts,c:new ns,i:new rs,a:new os,b:new as,B:new is,h:new cs,H:new us,K:new ss,k:new ls,m:new fs,s:new ps,S:new ds,X:new hs,x:new ms,t:new gs,T:new vs},bs=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ws=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Os=/^'([^]*?)'?$/,xs=/''/g,ks=/\S/,Ss=/[a-zA-Z]/;function Ps(e,t,n,r){var o,a,i,c,u,s,l,f,p,d,h,m,g,v,y,b,w,O;(0,tc.Z)(3,arguments);var x=String(e),k=String(t),S=(0,$u.j)(),P=null!==(o=null!==(a=null==r?void 0:r.locale)&&void 0!==a?a:S.locale)&&void 0!==o?o:Mc.Z;if(!P.match)throw new RangeError("locale must contain match property");var j=(0,nc.Z)(null!==(i=null!==(c=null!==(u=null!==(s=null==r?void 0:r.firstWeekContainsDate)&&void 0!==s?s:null==r||null===(l=r.locale)||void 0===l||null===(f=l.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==u?u:S.firstWeekContainsDate)&&void 0!==c?c:null===(p=S.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==i?i:1);if(!(j>=1&&j<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=(0,nc.Z)(null!==(h=null!==(m=null!==(g=null!==(v=null==r?void 0:r.weekStartsOn)&&void 0!==v?v:null==r||null===(y=r.locale)||void 0===y||null===(b=y.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==g?g:S.weekStartsOn)&&void 0!==m?m:null===(w=S.locale)||void 0===w||null===(O=w.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==h?h:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?(0,_c.Z)(n):new Date(NaN);var E,C={firstWeekContainsDate:j,weekStartsOn:_,locale:P},D=[new Qc],T=k.match(ws).map((function(e){var t=e[0];return t in Nc.Z?(0,Nc.Z[t])(e,P.formatLong):e})).join("").match(bs),M=[],R=Tc(T);try{var I=function(){var t=E.value;null!=r&&r.useAdditionalWeekYearTokens||!(0,Zc.Do)(t)||(0,Zc.qp)(t,k,e),null!=r&&r.useAdditionalDayOfYearTokens||!(0,Zc.Iu)(t)||(0,Zc.qp)(t,k,e);var n=t[0],o=ys[n];if(o){var a=o.incompatibleTokens;if(Array.isArray(a)){var i=M.find((function(e){return a.includes(e.token)||e.token===n}));if(i)throw new RangeError("The format string mustn't contain `".concat(i.fullToken,"` and `").concat(t,"` at the same time"))}else if("*"===o.incompatibleTokens&&M.length>0)throw new RangeError("The format string mustn't contain `".concat(t,"` and any other token at the same time"));M.push({token:n,fullToken:t});var c=o.run(x,t,P.match,C);if(!c)return{v:new Date(NaN)};D.push(c.setter),x=c.rest}else{if(n.match(Ss))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");if("''"===t?t="'":"'"===n&&(t=js(t)),0!==x.indexOf(t))return{v:new Date(NaN)};x=x.slice(t.length)}};for(R.s();!(E=R.n()).done;){var N=I();if("object"===(0,Cc.Z)(N))return N.v}}catch(e){R.e(e)}finally{R.f()}if(x.length>0&&ks.test(x))return new Date(NaN);var A=D.map((function(e){return e.priority})).sort((function(e,t){return t-e})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return D.filter((function(t){return t.priority===e})).sort((function(e,t){return t.subPriority-e.subPriority}))})).map((function(e){return e[0]})),Z=(0,_c.Z)(n);if(isNaN(Z.getTime()))return new Date(NaN);var L,F=(0,Rc.Z)(Z,(0,Ac.Z)(Z)),H={},B=Tc(A);try{for(B.s();!(L=B.n()).done;){var U=L.value;if(!U.validate(F,C))return new Date(NaN);var W=U.set(F,H,C);Array.isArray(W)?(F=W[0],Ic(H,W[1])):F=W}}catch(e){B.e(e)}finally{B.f()}return F}function js(e){return e.match(Os)[1].replace(xs,"'")}var _s=i(49599);function Es(e,t,n){return(0,tc.Z)(2,arguments),(0,_s.Z)(Ps(e,t,new Date,n))}function Cs(e){(0,tc.Z)(1,arguments);var t=(0,_c.Z)(e);return t.setHours(0,0,0,0),t}var Ds="react-datepicker-time__input",Ts="react-datepicker__day",Ms="react-datepicker__input",Rs=function(e){return e.classList.contains(Ts)},Is=function(e){return e.classList.contains(Ds)},Ns=function(e){return e.classList.contains(Ms)},As=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,xc.Z)((0,kc.Z)((0,Sc.Z)(e,c),a),r)},Zs=function(e){setTimeout((function(){if(e){var t=e.querySelector(".".concat(Ts,'[tabindex="0"]'));t&&t.focus({preventScroll:!0})}}),0)},Ls=function(e){setTimeout((function(){e&&e.focus({preventScroll:!0})}),0)},Fs=function(e){var t=function(e,t){var n;(0,tc.Z)(1,arguments);var r=(0,nc.Z)(null!==(n=null==t?void 0:t.additionalDigits)&&void 0!==n?n:2);if(2!==r&&1!==r&&0!==r)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof e&&"[object String]"!==Object.prototype.toString.call(e))return new Date(NaN);var o,a=cc(e);if(a.date){var i=uc(a.date,r);o=sc(i.restDateString,i.year)}if(!o||isNaN(o.getTime()))return new Date(NaN);var c,u=o.getTime(),s=0;if(a.time&&(s=fc(a.time),isNaN(s)))return new Date(NaN);if(!a.timezone){var l=new Date(u+s),f=new Date(0);return f.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),f.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),f}return c=dc(a.timezone),isNaN(c)?new Date(NaN):new Date(u+s+c)}(e);return isNaN(t)?null:t},Hs=function(e){return e?e.toISOString():null};const Bs=function(e,t,n){var r=n.dateFormats,o=void 0===r?[]:r,a=n.minDate,i=n.maxDate,c=n.hasTime,u=n.valueToDate,s=void 0===u?Fs:u,l=n.dateToValue,f=void 0===l?Hs:l,p=(0,Z.useRef)(null),d=(0,Z.useState)(!1),h=U()(d,2),m=h[0],g=h[1],v=(0,Z.useState)(!1),y=U()(v,2),b=y[0],w=y[1],O=s(e),x=a?s(a):void 0,k=i?s(i):void 0;(0,Z.useEffect)((function(){(p.current&&"function"==typeof p.current.setOpen&&p.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)},P=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(p.current&&"function"==typeof p.current.getPreSelection){var t,n=e?p.current.getPreSelection():null;return(null===(t=p.current.state)||void 0===t?void 0:t.preSelection)||n}return null},j=function(e){p.current&&"function"==typeof p.current.setPreSelection&&p.current.setPreSelection(e)},_=function(){t(null),j(null)},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=P(!1);if(n){var r=O||new Date,o=t?As(n,{hour:(0,Pc.Z)(r),minute:(0,jc.Z)(r),second:Ec(r)}):n;C(o,e)}},C=function(n,r){if(n){var a,i=!e&&Boolean(n),u=null==r||null===(a=r.target)||void 0===a?void 0:a.value,s=!!u&&o.some((function(e){return Es(u,e)})),l=Cs(n),d=(0,Pc.Z)(n)!==(0,Pc.Z)(l)||(0,jc.Z)(n)!==(0,jc.Z)(l);(i&&!d||s)&&c&&(n=Ai.Z.setCurrentTime(n)),t(f(n))}else _();var h;c||"click"!==(null==r?void 0:r.type)||(S(),Ls(null===(h=p.current)||void 0===h?void 0:h.input))},D=function(e){if("Tab"===e.key)if(e.shiftKey)if(Ns(e.target))setTimeout((function(){return S()}),0);else if(Is(e.target)){var t,n;j(O||P(!0)),Zs(null===(t=p.current)||void 0===t||null===(n=t.calendar)||void 0===n?void 0:n.componentNode)}else Rs(e.target)&&S();else Ns(e.target)&&m?(E(e),setTimeout((function(){return S()}),0)):Is(e.target)?S():Rs(e.target)&&(c?(E(e,!0),j(null),w(!0),setTimeout((function(){var e,t,n;n=null===(e=p.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(Ds));e&&e.focus({preventScroll:!0})}}),0),w(!1)}),0)):(E(e),S()));var r;"Enter"===e.key&&(S(),e.preventDefault(),e.stopPropagation(),Ls(null===(r=p.current)||void 0===r?void 0:r.input));if(["ArrowDown","ArrowUp","Enter"].includes(e.key))if(m){if(m&&null===P(!1)){var o,a;j(O||P(!0)),Zs(null===(o=p.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})),j(null),Ls(null===(e=p.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(){j(null)},onBlur:function(){p.current&&p.current.setState({inputValue:null})},preventOpenOnFocus:!0,enableTabLoop:!1,shouldCloseOnSelect:!1,open:m,selected:O,showTimeInput:c,minDate:x,maxDate:k,ref:p,className:Ms},timeInputProps:{onKeyDown:D,className:Ds,tabIndex:b?void 0:"-1"},clearButtonProps:{onMouseDown:function(e){e.preventDefault(),_()}},calendarButtonProps:{onClick:T,className:m?"react-datepicker-ignore-onclickoutside":""}}};var Us=i(49546),Ws=i(35997),zs="HH:mm:ss",Ys="HH:mm",Vs=function(e){return Es(e,Ys)},qs=function(e){var t=function(e){return Es(e,zs)?Ps(e,zs,new Date):Es(e,Ys)?Ps(e,Ys,new Date):Es(e,"HH:")?Ps(e,"HH:",new Date):Es(e,"H")?Ps(e,"H",new Date):null}(e);return t&&!isNaN(t)?function(e){return(0,Us.Z)(e,Ys)}(t):""};const Gs=function(e,t){var n=qs(e),r=(0,Z.useState)(n),o=U()(r,2),a=o[0],i=o[1],c=(0,Z.useRef)(a),u=Ws.Z.usePrevious(n);(0,Z.useEffect)((function(){u!==n&&a===u&&i(n)}),[n,a,u]);return{inputProps:{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),u=n.substring(r+1),s=parseInt(o,10),l=parseInt(u,10),f=!o||!Number.isNaN(s)&&s<24,p=!u||!Number.isNaN(l)&&l<60;if(!f||!p)return!1;c.current=n,i(n),n&&!Vs(n)||t(n)}},onBlur:function(){if(a!==n){var e=qs(a);e&&Vs(e)?(c.current=e,i(e),t(e)):i(n)}},onFocus:function(e){a&&"function"==typeof e.target.select&&e.target.select()},value:a||""},clearButtonProps:{onClick:function(){t(""),i("")}}}};var Ks=["value","onChange","onKeyDown"];function Xs(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 Qs(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xs(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xs(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}(0,Qi.registerLocale)("en",Ai.Z.getDateFnsLocale("en")),(0,Qi.registerLocale)("en-US",Ai.Z.getDateFnsLocale("en")),(0,Qi.registerLocale)("de-CH",Ai.Z.getDateFnsLocale("de-CH")),(0,Qi.registerLocale)("de",Ai.Z.getDateFnsLocale("de")),(0,Qi.registerLocale)("fr",Ai.Z.getDateFnsLocale("fr")),(0,Qi.registerLocale)("fr-CH",Ai.Z.getDateFnsLocale("fr")),(0,Qi.registerLocale)("it",Ai.Z.getDateFnsLocale("it")),(0,Qi.registerLocale)("it-CH",Ai.Z.getDateFnsLocale("it")),(0,Qi.setDefaultLocale)("de");var $s=function(e){var t=e.onChange,n=e.label;return(0,G.jsx)(ee.Z,{onMouseDown:function(e){e.preventDefault(),t(null)},tabIndex:-1,children:n})},Js=function(e){var t=e.value,n=e.onChange,r=e.onKeyDown,o=ir()(e,Ks),a=Gs(t,(function(e){n&&n(e||"00:00")})).inputProps;return(0,G.jsx)(Oc,Qs(Qs(Qs({},a),o),{},{type:"text",onKeyDown:r,onClick:function(e){e.target.focus()}}))},el={strategy:"fixed"};const tl=(0,$.Zz)((0,x.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,u=e.onChange,s=e.intl,l=e.placeholder,f=e.hasTime,p=e.dateFormats,d=void 0===p?[]:p,h=e.dateTimeFormats,m=void 0===h?[]:h,g=e.events,v=(0,Z.useRef)(void 0),y=s.locale,b=function(e){return s.formatMessage({id:e})},w=(0,Z.useRef)(null),O=Boolean(r),x=!t&&O,k=function(e){v.current=e,u(e)},S=Bs(r,k,{dateFormats:d,dateTimeFormats:m,minDate:o,maxDate:a,valueToDate:i,dateToValue:c,hasTime:f}),P=S.reactDatePickerProps,j=S.timeInputProps,_=S.clearButtonProps,E=S.calendarButtonProps;return(0,G.jsx)(bc,{immutable:t,id:n,tabIndex:"-1",children:(0,G.jsxs)(wc,{immutable:t,ref:w,hasTime:f,onBlur:function(e){if("function"==typeof(null==g?void 0:g.onBlur)){var t=void 0!==v.current?v.current:r;g.onBlur(t)}e.stopPropagation()},children:[(0,G.jsx)($i(),Qs(Qs({},P),{},{disabled:t,dateFormat:[].concat(H()(m),H()(d)),placeholderText:l,showMonthDropdown:!0,showYearDropdown:!0,scrollableYearDropdown:!1,fixedHeight:!0,showPopperArrow:!1,locale:y,customTimeInput:(0,G.jsx)(Js,Qs({},j)),timeInputLabel:"",popperProps:el,todayButton:(0,G.jsx)($s,{onChange:k,label:b("client.component.datePicker.todayLabel")})})),x&&(0,G.jsx)($e.Z,Qs({icon:"times",tabIndex:-1,"aria-label":b("client.component.datePicker.clearDateLabel")},_)),!t&&(0,G.jsx)($e.Z,Qs({icon:"calendar",tabIndex:-1},E))]})})})));function nl(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 rl=function(e){var t=e.onChange,n=e.options,r=e.id,o=e.value,a=e.immutable,i=e.events,c=e.placeholder,u=(0,Ni.Z)(),s=(null==n?void 0:n.datePickerOptions)||{},l="".concat(Ai.Z.getLocalizedDateFormat(u.locale)),f=Ai.Z.getLocalizedDateFormatWithoutPunctuation(u.locale),p=[l,f,Ai.Z.useTwoDigitYear(l),Ai.Z.useTwoDigitYear(f)];return(0,G.jsx)(tl,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nl(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:r,value:o,onChange:t,dateFormats:p,hasTime:!1,immutable:a,placeholder:c,events:i},s))};function ol(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 al=(0,x.ZP)((function(e){var t=e.onChange,n=e.options,r=e.value,o=e.immutable,a=e.placeholder,i=(0,Ni.Z)(),c=(null==n?void 0:n.datePickerOptions)||{},u="".concat(Ai.Z.getLocalizedDateTimeFormat(i.locale)),s="".concat(Ai.Z.getLocalizedDateFormat(i.locale)),l=Ai.Z.getLocalizedDateTimeFormatWithoutPunctuation(i.locale),f=[u,l,Ai.Z.useTwoDigitYear(u),Ai.Z.useTwoDigitYear(l)],p=Ai.Z.getLocalizedDateFormatWithoutPunctuation(i.locale),d=[s,p,Ai.Z.useTwoDigitYear(s),Ai.Z.useTwoDigitYear(p)];return(0,G.jsx)(tl,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ol(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ol(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({value:r,onChange:t,dateTimeFormats:f,dateFormats:d,hasTime:!0,immutable:o,placeholder:a},c))}));function il(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{u(r.next(e))}catch(e){a(e)}}function c(e){try{u(r.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,c)}u((r=r.apply(e,t||[])).next())}))}function cl(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(u){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,u])}}}Object.create;function ul(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 sl(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 ll=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 fl(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=ll.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 pl=[".DS_Store","Thumbs.db"];function dl(e){return"object"==typeof e&&null!==e}function hl(e){return yl(e.target.files).map((function(e){return fl(e)}))}function ml(e){return il(this,void 0,void 0,(function(){return cl(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 fl(e)}))]}}))}))}function gl(e,t){return il(this,void 0,void 0,(function(){var n;return cl(this,(function(r){switch(r.label){case 0:return e.items?(n=yl(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(bl))]):[3,2];case 1:return[2,vl(wl(r.sent()))];case 2:return[2,vl(yl(e.files).map((function(e){return fl(e)})))]}}))}))}function vl(e){return e.filter((function(e){return-1===pl.indexOf(e.name)}))}function yl(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function bl(e){if("function"!=typeof e.webkitGetAsEntry)return Ol(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?kl(t):Ol(e)}function wl(e){return e.reduce((function(e,t){return sl(sl([],ul(e),!1),ul(Array.isArray(t)?wl(t):[t]),!1)}),[])}function Ol(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=fl(t);return Promise.resolve(n)}function xl(e){return il(this,void 0,void 0,(function(){return cl(this,(function(t){return[2,e.isDirectory?kl(e):Sl(e)]}))}))}function kl(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function o(){var a=this;t.readEntries((function(t){return il(a,void 0,void 0,(function(){var a,i,c;return cl(this,(function(u){switch(u.label){case 0:if(t.length)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=u.sent(),e(a),[3,4];case 3:return i=u.sent(),n(i),[3,4];case 4:return[3,6];case 5:c=Promise.all(t.map(xl)),r.push(c),o(),u.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function Sl(e){return il(this,void 0,void 0,(function(){return cl(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=fl(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var Pl=i(58363);function jl(e){return function(e){if(Array.isArray(e))return Ml(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Tl(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 _l(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 El(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_l(Object(n),!0).forEach((function(t){Cl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Cl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dl(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)||Tl(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 Tl(e,t){if(e){if("string"==typeof e)return Ml(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)?Ml(e,t):void 0}}function Ml(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 Rl="file-invalid-type",Il="file-too-large",Nl="file-too-small",Al="too-many-files",Zl=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:Rl,message:"File type must be ".concat(t)}},Ll=function(e){return{code:Il,message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},Fl=function(e){return{code:Nl,message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},Hl={code:Al,message:"Too many files"};function Bl(e,t){var n="application/x-moz-file"===e.type||(0,Pl.Z)(e,t);return[n,n?null:Zl(t)]}function Ul(e,t,n){if(Wl(e.size))if(Wl(t)&&Wl(n)){if(e.size>n)return[!1,Ll(n)];if(e.size<t)return[!1,Fl(t)]}else{if(Wl(t)&&e.size<t)return[!1,Fl(t)];if(Wl(n)&&e.size>n)return[!1,Ll(n)]}return[!0,null]}function Wl(e){return null!=e}function zl(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=Dl(Bl(e,n),1)[0],a=Dl(Ul(e,r,o),1)[0],i=c?c(e):null;return t&&a&&!i}))}function Yl(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function Vl(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 ql(e){e.preventDefault()}function Gl(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function Kl(e){return-1!==e.indexOf("Edge/")}function Xl(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return Gl(e)||Kl(e)}function Ql(){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!Yl(e)&&t&&t.apply(void 0,[e].concat(r)),Yl(e)}))}}function $l(){return"showOpenFilePicker"in window}function Jl(e){return Wl(e)?[{description:"Files",accept:Object.entries(e).filter((function(e){var t=Dl(e,2),n=t[0],r=t[1],o=!0;return rf(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(of)||(console.warn('Skipped "'.concat(n,'" because an invalid file extension was provided.')),o=!1),o})).reduce((function(e,t){var n=Dl(t,2),r=n[0],o=n[1];return El(El({},e),{},Cl({},r,o))}),{})}]:e}function ef(e){if(Wl(e))return Object.entries(e).reduce((function(e,t){var n=Dl(t,2),r=n[0],o=n[1];return[].concat(jl(e),[r],jl(o))}),[]).filter((function(e){return rf(e)||of(e)})).join(",")}function tf(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function nf(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}function rf(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)}function of(e){return/^.*\.[\w]+$/.test(e)}var af=["children"],cf=["open"],uf=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],sf=["refKey","onChange","onClick"];function lf(e){return function(e){if(Array.isArray(e))return df(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||pf(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 ff(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)||pf(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 pf(e,t){if(e){if("string"==typeof e)return df(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)?df(e,t):void 0}}function df(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 hf(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 mf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hf(Object(n),!0).forEach((function(t){gf(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function gf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vf(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 yf=(0,Z.forwardRef)((function(e,t){var n=e.children,r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=mf(mf({},bf),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,a=t.maxSize,i=t.minSize,c=t.multiple,u=t.maxFiles,s=t.onDragEnter,l=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,h=t.onDropRejected,m=t.onFileDialogCancel,g=t.onFileDialogOpen,v=t.useFsAccessApi,y=t.autoFocus,b=t.preventDropOnDocument,w=t.noClick,O=t.noKeyboard,x=t.noDrag,k=t.noDragEventsBubbling,S=t.onError,P=t.validator,j=(0,Z.useMemo)((function(){return ef(n)}),[n]),_=(0,Z.useMemo)((function(){return Jl(n)}),[n]),E=(0,Z.useMemo)((function(){return"function"==typeof g?g:kf}),[g]),C=(0,Z.useMemo)((function(){return"function"==typeof m?m:kf}),[m]),D=(0,Z.useRef)(null),T=(0,Z.useRef)(null),M=ff((0,Z.useReducer)(xf,Of),2),R=M[0],I=M[1],N=R.isFocused,A=R.isFileDialogActive,L=(0,Z.useRef)("undefined"!=typeof window&&window.isSecureContext&&v&&$l()),F=function(){!L.current&&A&&setTimeout((function(){T.current&&(T.current.files.length||(I({type:"closeDialog"}),C()))}),300)};(0,Z.useEffect)((function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}}),[T,A,C,L]);var H=(0,Z.useRef)([]),B=function(e){D.current&&D.current.contains(e.target)||(e.preventDefault(),H.current=[])};(0,Z.useEffect)((function(){return b&&(document.addEventListener("dragover",ql,!1),document.addEventListener("drop",B,!1)),function(){b&&(document.removeEventListener("dragover",ql),document.removeEventListener("drop",B))}}),[D,b]),(0,Z.useEffect)((function(){return!r&&y&&D.current&&D.current.focus(),function(){}}),[D,y,r]);var U=(0,Z.useCallback)((function(e){S?S(e):console.error(e)}),[S]),W=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),H.current=[].concat(lf(H.current),[e.target]),Vl(e)&&Promise.resolve(o(e)).then((function(t){if(!Yl(e)||k){var n=t.length,r=n>0&&zl({files:t,accept:j,minSize:i,maxSize:a,multiple:c,maxFiles:u,validator:P});I({isDragAccept:r,isDragReject:n>0&&!r,isDragActive:!0,type:"setDraggedFiles"}),s&&s(e)}})).catch((function(e){return U(e)}))}),[o,s,U,k,j,i,a,c,u,P]),z=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=Vl(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&f&&f(e),!1}),[f,k]),Y=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e);var t=H.current.filter((function(e){return D.current&&D.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),H.current=t,t.length>0||(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),Vl(e)&&l&&l(e))}),[D,l,k]),V=(0,Z.useCallback)((function(e,t){var n=[],r=[];e.forEach((function(e){var t=ff(Bl(e,j),2),o=t[0],c=t[1],u=ff(Ul(e,i,a),2),s=u[0],l=u[1],f=P?P(e):null;if(o&&s&&!f)n.push(e);else{var p=[c,l];f&&(p=p.concat(f)),r.push({file:e,errors:p.filter((function(e){return e}))})}})),(!c&&n.length>1||c&&u>=1&&n.length>u)&&(n.forEach((function(e){r.push({file:e,errors:[Hl]})})),n.splice(0)),I({acceptedFiles:n,fileRejections:r,type:"setFiles"}),p&&p(n,r,t),r.length>0&&h&&h(r,t),n.length>0&&d&&d(n,t)}),[I,c,j,i,a,u,p,d,h,P]),q=(0,Z.useCallback)((function(e){e.preventDefault(),e.persist(),ne(e),H.current=[],Vl(e)&&Promise.resolve(o(e)).then((function(t){Yl(e)&&!k||V(t,e)})).catch((function(e){return U(e)})),I({type:"reset"})}),[o,V,U,k]),G=(0,Z.useCallback)((function(){if(L.current){I({type:"openDialog"}),E();var e={multiple:c,types:_};window.showOpenFilePicker(e).then((function(e){return o(e)})).then((function(e){V(e,null),I({type:"closeDialog"})})).catch((function(e){tf(e)?(C(e),I({type:"closeDialog"})):nf(e)?(L.current=!1,T.current?(T.current.value=null,T.current.click()):U(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."))):U(e)}))}else T.current&&(I({type:"openDialog"}),E(),T.current.value=null,T.current.click())}),[I,E,C,v,V,U,_,c]),K=(0,Z.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]),X=(0,Z.useCallback)((function(){I({type:"focus"})}),[]),Q=(0,Z.useCallback)((function(){I({type:"blur"})}),[]),$=(0,Z.useCallback)((function(){w||(Xl()?setTimeout(G,0):G())}),[w,G]),J=function(e){return r?null:e},ee=function(e){return O?null:J(e)},te=function(e){return x?null:J(e)},ne=function(e){k&&e.stopPropagation()},re=(0,Z.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,u=e.onClick,s=e.onDragEnter,l=e.onDragOver,f=e.onDragLeave,p=e.onDrop,d=vf(e,uf);return mf(mf(gf({onKeyDown:ee(Ql(a,K)),onFocus:ee(Ql(i,X)),onBlur:ee(Ql(c,Q)),onClick:J(Ql(u,$)),onDragEnter:te(Ql(s,W)),onDragOver:te(Ql(l,z)),onDragLeave:te(Ql(f,Y)),onDrop:te(Ql(p,q)),role:"string"==typeof o&&""!==o?o:"presentation"},n,D),r||O?{}:{tabIndex:0}),d)}}),[D,K,X,Q,$,W,z,Y,q,O,x,r]),oe=(0,Z.useCallback)((function(e){e.stopPropagation()}),[]),ae=(0,Z.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=vf(e,sf);return mf(mf({},gf({accept:j,multiple:c,type:"file",style:{display:"none"},onChange:J(Ql(r,q)),onClick:J(Ql(o,oe)),tabIndex:-1},n,T)),a)}}),[T,n,c,q,r]);return mf(mf({},R),{},{isFocused:N&&!r,getRootProps:re,getInputProps:ae,rootRef:D,inputRef:T,open:J(G)})}(vf(e,af)),o=r.open,a=vf(r,cf);return(0,Z.useImperativeHandle)(t,(function(){return{open:o}}),[o]),L().createElement(Z.Fragment,null,n(mf(mf({},a),{},{open:o})))}));yf.displayName="Dropzone";var bf={disabled:!1,getFilesFromEvent:function(e){return il(this,void 0,void 0,(function(){return cl(this,(function(t){return dl(e)&&dl(e.dataTransfer)?[2,gl(e.dataTransfer,e.type)]:function(e){return dl(e)&&dl(e.target)}(e)?[2,hl(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,ml(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};yf.defaultProps=bf,yf.propTypes={children:y().func,accept:y().objectOf(y().arrayOf(y().string)),multiple:y().bool,preventDropOnDocument:y().bool,noClick:y().bool,noKeyboard:y().bool,noDrag:y().bool,noDragEventsBubbling:y().bool,minSize:y().number,maxSize:y().number,maxFiles:y().number,disabled:y().bool,getFilesFromEvent:y().func,onFileDialogCancel:y().func,onFileDialogOpen:y().func,useFsAccessApi:y().bool,autoFocus:y().bool,onDragEnter:y().func,onDragLeave:y().func,onDragOver:y().func,onDrop:y().func,onDropAccepted:y().func,onDropRejected:y().func,onError:y().func,validator:y().func};const wf=yf;var Of={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xf(e,t){switch(t.type){case"focus":return mf(mf({},e),{},{isFocused:!0});case"blur":return mf(mf({},e),{},{isFocused:!1});case"openDialog":return mf(mf({},Of),{},{isFileDialogActive:!0});case"closeDialog":return mf(mf({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return mf(mf({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return mf(mf({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return mf({},Of);default:return e}}function kf(){}var Sf,Pf,jf,_f,Ef,Cf,Df,Tf,Mf,Rf=i(69829),If=i(40953),Nf=$.ZP.section.withConfig({displayName:"StyledSection"})(Sf||(Sf=Q()(["\n flex: 1;\n display: flex;\n justify-content: flex-end;\n"]))),Af=$.ZP.div.withConfig({displayName:"StyledButtonsWrapper"})(Pf||(Pf=Q()(["\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"])),Lt.Z,te.Z.space(-2)),Zf=$.ZP.div.withConfig({displayName:"StyledDropzone"})(jf||(jf=Q()(["\n width: 100%;\n\n &:hover {\n "," {\n background-color: ",";\n }\n }\n"])),Lt.Z,oe.FS.color("backgroundItemHover")),Lf=$.ZP.div.withConfig({displayName:"StyledUploadInput"})(_f||(_f=Q()(["\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,et.Z)(),(function(e){return e.immutable?"not-allowed":"pointer"}),oe.FS.color("paper"),(function(e){return e.immutable?If.v.shade2(e):If.v.base(e)}),te.Z.space(-2),Lt.Z,te.Z.space(-3.1),te.Z.space(-1.5)),Ff=$.ZP.div.withConfig({displayName:"StyledUploadProgress"})(Ef||(Ef=Q()(["\n && {\n padding-top: ",";\n text-align: center;\n display: inline-block;\n }\n"])),te.Z.space(-2)),Hf=(0,$.ZP)(Rf.Fe).withConfig({displayName:"StyledUploadProgressText"})(Cf||(Cf=Q()(["\n && {\n ","\n }\n"])),(0,et.Z)({fontSize:te.Z.font(-1)})),Bf=$.ZP.div.withConfig({displayName:"StyledUploadProgressIconAndText"})(Df||(Df=Q()(["\n && {\n display: flex;\n justify-content: center;\n align-items: center;\n\n span {\n margin-left: ",";\n }\n }\n"])),te.Z.space(-2)),Uf=$.ZP.div.withConfig({displayName:"StyledView"})(Tf||(Tf=Q()(["\n display: flex;\n justify-content: space-between;\n padding-top: ",";\n"])),te.Z.space(-2));function Wf(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 zf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wf(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Yf=function(e){var t=e.onDrop,n=e.immutable,r=e.text,o=e.onChoose;return(0,G.jsxs)(Lf,{immutable:n,children:[(0,G.jsx)(wf,{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,G.jsx)(Nf,{children:(0,G.jsxs)(Zf,zf(zf({},t()),{},{children:[(0,G.jsx)("input",zf({},n())),Mf||(Mf=(0,G.jsx)(ee.Z,{icon:"arrow-to-top"}))]}))})}}),o&&(0,G.jsx)(ee.Z,{onClick:function(e){o(),e.stopPropagation()},icon:"folder",label:"browse docs",iconOnly:!0})]})};var Vf=i(73906),qf=i(23427),Gf=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 Kf=function(e){var t=e.file,n=e.text;return(0,G.jsxs)(Ff,{children:[(0,G.jsx)(Vf.Z,{alt:t.name,caption:t.name,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:t.preview,thumbnailUrl:t.type.startsWith("image")?t.preview:null}),(0,G.jsxs)(Bf,{children:[(0,G.jsx)(kt.Z,{position:qf.Z.position.PREPEND}),(0,G.jsxs)(Hf,{children:[n||"uploading"," (",Gf(t.size),")"]})]})]})};var Xf=i(28247);function Qf(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 $f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qf(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Jf=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,G.jsxs)(Uf,{className:"StyledView",children:[(0,G.jsx)(Vf.Z,$f($f({alt:n.fileName},c&&{caption:n.fileName}),{},{fileName:n.fileName,maxDimensionX:"96px",maxDimensionY:"96px",srcUrl:n.binaryLink,thumbnailUrl:n.thumbnailLink})),(0,G.jsxs)(Af,{children:[!o&&(0,G.jsx)(ee.Z,{icon:"trash",onClick:function(){return a(null)},tabIndex:-1,title:i||"delete"}),(0,G.jsx)(ee.Z,{children:(0,G.jsx)(Wr.Z,{neutral:!0,icon:"arrow-to-bottom",target:"_blank",href:Xf.Z.getDownloadUrl(n.binaryLink),tabIndex:-1,title:r||"download"})})]})]})};function ep(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 tp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ep(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var np=function(e){var t=e.value,n=e.textResources,r=e.onUpload,o=e.onChoose,a=(0,Z.useRef)(t),i=(0,Z.useState)({isUploading:!1,previewFile:null}),c=U()(i,2),u=c[0],s=c[1];return(0,Z.useEffect)((function(){Kt()(a.current,t)||s({isUploading:!1,previewFile:null}),a.current=t}),[t]),null!=t&&t.binaryLink?(0,G.jsx)(Jf,tp(tp({},e),{},{deleteTitle:n.delete,downloadTitle:n.download})):u.isUploading?(0,G.jsx)(Kf,tp({file:u.previewFile,text:n.uploading},e)):(0,G.jsx)(Yf,tp(tp({},e),{},{onDrop:function(e){!function(e){s({isUploading:!0,previewFile:e})}(e),r(e)},onChoose:o}))};np.defaultProps={textResources:{}};const rp=np;var op=function(e){return(0,G.jsx)(rp,{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})};op.defaultProps={options:{}};const ap=op;var ip,cp,up=function(e){return-1*Math.abs(e)},sp=$.ZP.input.withConfig({displayName:"StyledDurationEdit"})(ip||(ip=Q()(["\n &&&& {\n ","\n flex-grow: 0;\n width: ","px;\n min-width: 2.5ch;\n }\n"])),Vr,(function(e){return e.width})),lp=$.ZP.label.withConfig({displayName:"StyledDurationEditFocusable"})(cp||(cp=Q()(["\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"])),te.Z.space(1),(function(e){return e.immutable?oe.FS.color("textDisabled"):oe.FS.color("text")}),(function(e){return e.immutable?"not-allowed":"default"})),fp=function(e){var t=e.value,n=e.immutable,r=e.onChange,o=e.options,a=Ai.Z.millisecondsToDuration(t),i=(0,Z.useState)(!1),c=U()(i,2),u=c[0],s=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=up(n),o=up(o)),60*(n||0)*6e4+6e4*(o||0)):null))):r(null)},f=function(){s(!0)},p=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 u||"number"==typeof t},m=function(e){return 9*(e+"").length},g=n&&Boolean(a.seconds);return(0,G.jsxs)(Yr,{onBlur:function(){s(!1)},immutable:n,children:[(0,G.jsxs)(lp,{immutable:n,children:[(0,G.jsx)(sp,{disabled:n,immutable:n,min:!0===o.allowNegative?void 0:0,onChange:function(){},onFocus:f,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(t,null)},onKeyPress:p,pattern:d(),step:1,width:m(a.hours),type:"number",value:"number"!=typeof a.hours||0===a.hours&&!n?"":a.hours+""}),h()&&(0,G.jsx)(q.ZP.Span,{children:o.hoursLabel})]}),(0,G.jsxs)(lp,{immutable:n,children:[(0,G.jsx)(sp,{disabled:n,immutable:n,min:!0!==o.allowNegative||null!==a.hours&&0!==a.hours?0:void 0,onChange:function(){},onFocus:f,onInput:function(e){var t=e.target.value.replace(/[^-\d]/g,"");l(null,t)},onKeyPress:p,pattern:d(),step:1,width:m(a.minutes),type:"number",value:a.minutes+""}),h()&&(0,G.jsx)(q.ZP.Span,{children:o.minutesLabel})]}),g&&(0,G.jsxs)(lp,{immutable:n,children:[(0,G.jsx)(sp,{disabled:n,immutable:n,onChange:function(){},width:m(a.seconds),type:"number",value:a.seconds+""}),h()&&(0,G.jsx)(q.ZP.Span,{children:o.secondsLabel})]})]})};fp.defaultProps={options:{hoursLabel:"hrs",minutesLabel:"min",secondsLabel:"s"}};const pp=fp;var dp;const hp=$.ZP.input.attrs((function(e){return{type:"text"}})).withConfig({displayName:"StyledStringEdit"})(dp||(dp=Q()(["\n &&&& {\n ","\n }\n"])),Vr);const mp=Ws.Z.Debouncer((function(e){return(0,G.jsxs)(Yr,{immutable:e.immutable,children:[(0,G.jsx)(hp,{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,G.jsx)(Gr,{children:(0,G.jsx)(Wr.Z,{href:"mailto:".concat(e.value.toString()),icon:"envelope",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));var gp=i(2205),vp=i.n(gp),yp=i(99489),bp=i.n(yp),wp=i(78718),Op=i.n(wp);function xp(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 kp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xp(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Sp(){Sp=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)),bp()(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 vp()(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"!=xn()(e[e.length-1])&&(e=[].slice.call(e)).push(r(e,i)),o.apply(this,e)}))}return e[Symbol.replace].call(this,n,o)},Sp.apply(this,arguments)}var Pp,jp=["key","display","postcode","city","country","latitude","longitude"],_p=function(e){return e*Math.PI/180},Ep=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):"",u=n?"/ ".concat(n.display):"";return{key:r,display:"".concat(r," ").concat(o," ").concat(c," ").concat(u),postcode:r,city:o,country:n,latitude:_p(a),longitude:_p(i)}};function Cp(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 Dp(){}function Tp(e){return!!(e||"").match(/\d/)}function Mp(e){return null==e}function Rp(e){return"number"==typeof e&&isNaN(e)}function Ip(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function Np(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 Ap(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function Zp(e,t){return Array(t+1).join(e)}function Lp(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."+Zp("0",Math.abs(i))+o:i>=c?o+=Zp("0",i-c):o=(o.substring(0,i)||"0")+"."+o.substring(i),n+o}function Fp(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,o=Np(e),a=o.beforeDecimal,i=o.afterDecimal,c=o.hasNegation,u=parseFloat("0."+(i||"0")),s=(i.length<=t?"0."+i:u.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}),s[0])+(r?".":"")+Ap(s[1]||"",t,n)}function Hp(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 Bp(e){return Math.max(e.selectionStart,e.selectionEnd)}function Up(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function Wp(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 zp(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(Tp(e[n])||Tp(e[n-1]));return t}function Yp(e,t,n,r,o,a){void 0===a&&(a=Dp);var i,c,u=(0,Z.useRef)(),s=(i=function(e){var t,a;return Mp(e)||Rp(e)?(a="",t=""):"number"==typeof e||n?(a="number"==typeof e?Lp(e):e,t=r(a)):(a=o(e,void 0),t=e),{formattedValue:t,numAsString:a}},(c=(0,Z.useRef)(i)).current=i,(0,Z.useRef)((function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return c.current.apply(c,e)})).current),l=(0,Z.useState)((function(){return s(t)})),f=l[0],p=l[1];return(0,Z.useMemo)((function(){Mp(e)?u.current=void 0:(u.current=s(e),p(u.current))}),[e,s]),[f,function(e,t){p({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}]}function Vp(e){return e.replace(/[^0-9]/g,"")}function qp(e){return e}function Gp(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=qp);var c=e.removeFormatting;void 0===c&&(c=Vp);var u=e.defaultValue,s=e.valueIsNumericString,l=e.onValueChange,f=e.isAllowed,p=e.onChange;void 0===p&&(p=Dp);var d=e.onKeyDown;void 0===d&&(d=Dp);var h=e.onMouseUp;void 0===h&&(h=Dp);var m=e.onFocus;void 0===m&&(m=Dp);var g=e.onBlur;void 0===g&&(g=Dp);var v=e.value,y=e.getCaretBoundary;void 0===y&&(y=zp);var b=e.isValidInputCharacter;void 0===b&&(b=Tp);var w=Cp(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter"]),O=Yp(v,u,Boolean(s),i,c,l),x=O[0],k=x.formattedValue,S=x.numAsString,P=O[1],j=(0,Z.useRef)();(0,Z.useEffect)((function(){var e=i(S);if(void 0===j.current||e!==j.current){var t=D.current,n=c(e,void 0);F({formattedValue:e,numAsString:n,input:t,setCaretPosition:!0,source:Pp.props,event:void 0})}}));var _=(0,Z.useState)(!1),E=_[0],C=_[1],D=(0,Z.useRef)(null),T=(0,Z.useRef)({setCaretTimeout:null,focusTimeout:null});(0,Z.useEffect)((function(){return C(!0),function(){clearTimeout(T.current.setCaretTimeout),clearTimeout(T.current.focusTimeout)}}),[]);var M=i,R=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},I=function(e,t,n){Hp(e,t),T.current.setCaretTimeout=setTimeout((function(){e.value===n&&Hp(e,t)}),0)},N=function(e,t,n){return Wp(e,t,y(e),n)},A=function(e,t,n){var r=y(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 u=n.length,s=e.length,l={},f=new Array(u),p=0;p<u;p++){f[p]=-1;for(var d=0,h=s;d<h;d++)if(n[p]===e[d]&&!0!==l[d]){f[p]=d,l[d]=!0;break}}for(var m=r;m<u&&(-1===f[m]||!a(n[m]));)m++;var g=m===u||-1===f[m]?s:f[m];for(m=r-1;m>0&&-1===f[m];)m--;var v=-1===m||-1===f[m]?0:f[m]+1;return v>g?g:r-v<g-r?v:g}(t,k,e,n,r,b);return o=Wp(t,o,r)},F=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 u=e.inputValue||n.value,s=Bp(n);n.value=t,c=A(u,t,s)}n.value=t,r&&void 0!==c&&I(n,c,t)}t!==k&&function(e,t){j.current=e.formattedValue,P(e,t)}(R(t,i),{event:a,source:o})},H=!E||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",B=Object.assign({inputMode:H},w,{type:t,value:k,onChange:function(e){(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}}}(k,e),o=Object.assign(Object.assign({},r),{lastValue:k}),a=c(e,o),i=M(a);if(a=c(i,void 0),f&&!f(R(i,a))){var u=t.target,s=Bp(u),l=A(e,k,s);return I(u,l,k),!1}return F({formattedValue:i,numAsString:a,inputValue:e,event:t,source:n,setCaretPosition:!0,input:t.target}),!0})(e.target.value,e,Pp.event)&&p(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=N(i,t,"ArrowLeft"===r?"left":"right");else"Delete"!==r||b(i[t])?"Backspace"!==r||b(i[t])||(c=N(i,t,"left")):c=N(i,t,"right");c!==t&&I(n,c,i),e.isUnitTestRun&&I(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=N(o,n);a!==n&&I(t,a,o)}h(e)},onFocus:function(e){e.persist&&e.persist();var t=e.target;D.current=t,T.current.focusTimeout=setTimeout((function(){var n=t.selectionStart,r=t.selectionEnd,o=t.value;void 0===o&&(o="");var a=N(o,n);a===n||0===n&&r===o.length||I(t,a,o),m(e)}),0)},onBlur:function(e){D.current=null,clearTimeout(T.current.focusTimeout),clearTimeout(T.current.setCaretTimeout),g(e)}});if("text"===n)return o?L().createElement(L().Fragment,null,o(k,w)||null):L().createElement("span",Object.assign({},w,{ref:a}),k);if(r){var U=r;return L().createElement(U,Object.assign({},B,{ref:a}))}return L().createElement("input",Object.assign({},B,{ref:a}))}function Kp(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,c=t.thousandsGroupStyle;if(void 0===c&&(c="thousand"),""===e||"-"===e)return e;var u=Xp(t),s=u.thousandSeparator,l=u.decimalSeparator,f=0!==n&&-1!==e.indexOf(".")||n&&r,p=Np(e,i),d=p.beforeDecimal,h=p.afterDecimal,m=p.addNegation;return void 0!==n&&(h=Ap(h,n,!!r)),s&&(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;case"thousand":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,s,c)),o&&(d=o+d),a&&(h+=a),m&&(d="-"+d),e=d+(f&&l||"")+h}function Xp(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 Qp(e,t,n){var r;void 0===t&&(t=Up(e));var o=n.allowNegative,a=n.prefix;void 0===a&&(a="");var i=n.suffix;void 0===i&&(i="");var c=n.decimalScale,u=t.from,s=t.to,l=s.start,f=s.end,p=Xp(n),d=p.allowedDecimalSeparators,h=p.decimalSeparator,m=e[f]===h;if(Tp(e)&&(e===a||e===i)&&""===t.lastValue)return e;if(f-l==1&&-1!==d.indexOf(e[l])){var g=0===c?"":h;e=e.substring(0,l)+g+e.substring(l+1,e.length)}var v=function(e,t,n){var r=!1,o=!1;a.startsWith("-")?r=!1:e.startsWith("--")?(r=!1,o=!0):i.startsWith("-")&&e.length===i.length?r=!1:"-"===e[0]&&(r=!0);var c=r?1:0;return o&&(c=2),c&&(e=e.substring(c),t-=c,n-=c),{value:e,start:t,end:n,hasNegation:r}},y=v(e,l,f),b=y.hasNegation;e=(r=y).value,l=r.start,f=r.end;var w=v(t.lastValue,u.start,u.end),O=w.start,x=w.end,k=w.value,S=e.substring(l,f);!(e.length&&k.length&&(O>k.length-i.length||x<a.length))||S&&i.startsWith(S)||(e=k);var P=0;e.startsWith(a)?P+=a.length:l<a.length&&(P=l),f-=P;var j=(e=e.substring(P)).length,_=e.length-i.length;e.endsWith(i)?j=_:(f>_||f>e.length-i.length)&&(j=f),e=e.substring(0,j);var E=(e=((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}(b?"-"+e:e,o)).match(function(e,t){return new RegExp("(^-)|[0-9]|"+Ip(e),t?"g":void 0)}(h,!0))||[]).join("")).indexOf(h),C=Np(e=e.replace(new RegExp(Ip(h),"g"),(function(e,t){return t===E?".":""})),o),D=C.beforeDecimal,T=C.afterDecimal,M=C.addNegation;return s.end-s.start<u.end-u.start&&""===D&&m&&!parseFloat(T)&&(e=M?"-":""),e}function $p(e){var t=(e=function(e){var t=Xp(e),n=t.thousandSeparator,r=t.decimalSeparator,o=e.prefix;void 0===o&&(o="");var a=e.allowNegative;if(void 0===a&&(a=!0),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 ");return o.startsWith("-")&&a&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: "+o+"\n allowNegative: "+a+"\n "),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}(e)).decimalSeparator;void 0===t&&(t=".");e.allowedDecimalSeparators,e.thousandsGroupStyle,e.suffix;var n=e.allowNegative,r=e.allowLeadingZeros,o=e.onKeyDown;void 0===o&&(o=Dp);var a=e.onBlur;void 0===a&&(a=Dp);var i=e.thousandSeparator,c=e.decimalScale,u=e.fixedDecimalScale,s=e.prefix;void 0===s&&(s="");var l=e.defaultValue,f=e.value,p=e.valueIsNumericString,d=e.onValueChange,h=Cp(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=function(t){return Kp(t,e)},g=function(t,n){return Qp(t,n,e)},v=p;Mp(f)?Mp(l)||(v=null!=p?p:"number"==typeof l):v=null!=p?p:"number"==typeof f;var y=function(e){return Mp(e)||Rp(e)?e:("number"==typeof e&&(e=Lp(e)),v&&"number"==typeof c?Fp(e,c,Boolean(u)):e)},b=Yp(y(f),y(l),Boolean(v),m,g,d),w=b[0],O=w.numAsString,x=w.formattedValue,k=b[1];return Object.assign(Object.assign({},h),{value:x,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===t||Tp(e)},onValueChange:k,format:m,removeFormatting:g,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 r=t.target,a=t.key,l=r.selectionStart,f=r.selectionEnd,p=r.value;if(void 0===p&&(p=""),l===f){"Backspace"===a&&"-"===p[0]&&l===s.length+1&&n&&Hp(r,1);var d=Xp(e),h=d.decimalSeparator,m=d.allowedDecimalSeparators;"Backspace"===a&&p[l-1]===h&&c&&u&&(Hp(r,l-1),t.preventDefault()),(null==m?void 0:m.includes(a))&&p[l]===h&&Hp(r,l+1);var g=!0===i?",":i;"Backspace"===a&&p[l-1]===g&&Hp(r,l-1),"Delete"===a&&p[l]===g&&Hp(r,l+1),o(t)}else o(t)},onBlur:function(t){var n=O;if(n.match(/\d/g)||(n=""),r||(n=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:"")}(n)),u&&c&&(n=Fp(n,c,u)),n!==O){var o=Kp(n,e);k({formattedValue:o,value:n,floatValue:parseFloat(n)},{event:t,source:Pp.event})}a(t)}})}function Jp(e){var t=$p(e);return L().createElement(Gp,Object.assign({},t))}!function(e){e.event="event",e.props="prop"}(Pp||(Pp={}));var ed,td=["immutable"];function nd(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 rd=(0,$.ZP)((function(e){e.immutable;var t=ir()(e,td);return(0,G.jsx)(Jp,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t))})).withConfig({displayName:"StyledNumberEdit"})(ed||(ed=Q()(["\n &&&& {\n ","\n }\n"])),Vr);function od(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 ad(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?od(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):od(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var id=function(e){return 0!==e?Math.ceil(Math.log10(Math.abs(e)+1)):1},cd=function(e){return null!=e&&!isNaN(parseFloat(e))},ud=function(e,t,n){return!cd(n)||!(cd(t)&&n>t)&&!(cd(e)&&n<e)},sd=function(e,t){return function(n){var r=n.floatValue;return id(r)<id(e)||ud(e,t,r)}};const ld=(0,x.ZP)(Ws.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,u=a.minValue,s=a.maxValue,l=a.allowNegative,f=a.fixedDecimalScale,p=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,s),g=ad(ad({isAllowed:sd(u,m),allowNegative:!!l},isNaN(c)?{}:{decimalScale:c}),{},{fixedDecimalScale:!!f});return(0,G.jsx)(Yr,{immutable:e.immutable,children:(0,G.jsx)(rd,ad(ad({decimalSeparator:o,disabled:e.immutable,id:e.id,valueIsNumericString:!0,name:e.name,onValueChange:function(t){e.onChange&&ud(u,m,t.floatValue)&&e.onChange(void 0!==t.floatValue?t.floatValue:null)},immutable:e.immutable,thousandSeparator:r,value:e.value,suffix:p,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&&!ud(u,m,r)&&(t.target.value=null)}}))})}),800));const fd=Ws.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,u=r||{},s=u.minValue,l=u.maxValue,f=u.format,p=u.allowLeadingZeros,d=u.suffix;return(0,G.jsx)(Yr,{immutable:o,children:(0,G.jsx)(rd,{isAllowed:sd(s,l),allowNegative:!0,decimalScale:0,disabled:o,id:i,name:a,onValueChange:function(e){var t=e.value,r=e.floatValue,o=p?t:r;void 0===o&&(o=null),ud(s,l,r)&&n(o)},value:t,allowLeadingZeros:p,suffix:d,format:f,placeholder:c})})}),800);var pd,dd,hd,md=$.ZP.div.withConfig({displayName:"StyledWrapper"})(pd||(pd=Q()(["\n display: flex;\n justify-content: stretch;\n"]))),gd=$.ZP.div.withConfig({displayName:"StyledLocationWrapper"})(dd||(dd=Q()(["\n flex-grow: 1;\n"]))),vd=$.ZP.div.withConfig({displayName:"StyledDistanceWrapper"})(hd||(hd=Q()(["\n width: 50px;\n border-left: 1px solid ",";\n margin-left: ",";\n padding-left: ",";\n"])),oe.FS.color("border"),te.Z.space(-.8),te.Z.space(.5));function yd(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 bd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const wd=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,u=i.isLoading,s=i.fetchSuggestions,l=i.latitudeField,f=i.longitudeField,p=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?Op()(e,jp):void 0}(r),v=function(e){return e?e.map(Ep):[]}(c);return(0,G.jsxs)(md,{children:[(0,G.jsx)(gd,{children:(0,G.jsx)(si,{id:t,immutable:n,onChange:function(e){o(bd(bd({},function(e,t){return t?kp(kp({},e),Op()(t,jp)):Sn()(e,jp)}(r,e)),{},{latitudeField:l,longitudeField:f}))},isLoading:u,options:v,searchOptions:function(e){var t=function(e){if(!e)return null;var t=H()(e.matchAll(Sp(/([\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 kp(kp({},r?{city:r.city}:{}),n?{postcode:n.postcode}:{})}(e);s(t,null)},fetchOptions:function(e){e||s(null,null)},value:g,noResultsComp:function(e){return e.inputValue?d:p}})}),(0,G.jsx)(vd,{children:(0,G.jsx)(fd,{value:m,onChange:function(e){o(bd(bd({},r),{},{distance:e}))},immutable:n,options:{minValue:0,maxValue:100,suffix:" ".concat(h)}})})]})};var Od,xd=(0,Z.lazy)((function(){return i.e(85).then(i.bind(i,17676))})),kd=function(e){var t=e.onChange,n=e.immutable,r=e.value,o=e.options;if(n)return(0,G.jsx)(q.ZP.Span,{children:(0,G.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})});var a=o||{},i=a.contentLang,c=a.ckEditorConfig;return(0,G.jsx)(Z.Suspense,{fallback:Od||(Od=(0,G.jsx)("i",{})),children:(0,G.jsx)(xd,{onChange:function(e){t&&t(e)},value:r,contentLang:i,ckEditorConfig:c})})};kd.defaultProps={value:""};const Sd=kd;var Pd,jd;function _d(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 Ed(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_d(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Cd=function(e){var t=e.onChange,n=e.options,r=e.value,o=e.id,a=e.immutable,i=e.name,c=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,G.jsxs)(q.ZP.Span,{children:[r," ",o," ",a," ",i]})},s=function(e){return function(n,o){var a=o.newValue;t(Ed(Ed({},r),{},g()({},e,a)))}},l=function(e,n){var r=n.suggestion;t(r)},f=function(e){return function(t){var r=t.value;n.fetchSuggestions(g()({},e,r),n.locationValues.country)}},p={id:o,value:r.postcode||"",onChange:s("postcode"),disabled:a},d={value:r.city||"",onChange:s("city"),disabled:a};return(0,G.jsx)(Rr,{children:function(e){var t,o,s,h=e.focused,m=e.getRef;return(0,G.jsxs)(Xr,{immutable:a,name:i,ref:m,children:[(0,G.jsx)(Pr(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:f("postcode"),getSuggestionValue:c("postcode"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:p,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!a}}),(h||r.city||r.postcode)&&(Pd||(Pd=(0,G.jsx)(q.ZP.Span,{children:"/"}))),(0,G.jsx)(Pr(),{suggestions:n.suggestions||[],onSuggestionsFetchRequested:f("city"),getSuggestionValue:c("city"),renderSuggestion:u,onSuggestionsClearRequested:function(){},inputProps:d,onSuggestionSelected:l,focusInputOnSuggestionClick:!1,shouldRenderSuggestions:function(e){return e&&!a}}),(0,G.jsxs)(Gr,{children:[n.isLoading&&(jd||(jd=(0,G.jsx)(kt.Z,{size:"1.8rem"}))),(s=n.locationValues,Boolean(s.city||s.postcode)&&!s.street&&(0,G.jsx)(Wr.Z,{href:(t=n.locationValues,o=t?Object.values(t).filter(Boolean).map((function(e){return"object"===xn()(e)&&e.display?e.display:e})).join("+"):"","".concat("https://www.google.com/maps/search/?api=1&query=").concat(o)),icon:"map-marked",tabIndex:-1,target:"_blank",dense:!1,title:n.mapButtonTitle||"Show on map",neutral:!0}))]})]})}})};function Dd(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 Td=function(e){return(0,G.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Md(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 Rd=function(e){return(0,G.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Md(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!0,immutable:e.immutable,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};var Id,Nd=i(48926),Ad=i.n(Nd),Zd=i(87757),Ld=i.n(Zd);const Fd=$.ZP.input.attrs((function(e){return{type:"tel"}})).withConfig({displayName:"StyledPhoneEdit"})(Id||(Id=Q()(["\n &&&& {\n ","\n }\n"])),Vr);const Hd=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.onLibLoaded,c=Xe()(e,"options.defaultCountry")||"CH",u=(0,Z.useState)(null),s=U()(u,2),l=s[0],f=s[1],p=L().createRef();(0,Z.useEffect)((function(){(function(){var e=Ad()(Ld().mark((function e(){var t;return Ld().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([i.e(631),i.e(877)]).then(i.bind(i,41866));case 2:t=e.sent,f(t),a&&a();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()}),[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,G.jsxs)(Yr,{immutable:r,children:[(0,G.jsx)(Fd,{disabled:r||!l,id:o,name,onChange:function(e){var r=e.target.value,o=l?l.parseNumber(r,c):r,a=kr()(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(p.current))}}(r,n,i)},immutable:r||!l,ref:p,value:h}),h&&(0,G.jsx)(Gr,{children:(0,G.jsx)(Wr.Z,{href:"tel:".concat(n),icon:"phone",tabIndex:-1,target:"_blank",neutral:!0})})]})};function Bd(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 Ud(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wd=function(e){return e.map((function(e){return Op()(e,["key","display"])}))};const zd=function(e){var t=e.id,n=e.immutable,r=e.onChange,o=e.options.isMulti,a=e.value;return(0,G.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 Ud(Ud({},e),t.includes(e.key)?{selected:!0}:{selected:!1})}));r({options:n})},value:Wd(a.options.filter((function(e){return e.selected}))),openMenuOnClick:!0,options:Wd(a.options)})};function Yd(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 Vd=function(e){return(0,G.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,isMulti:!1,immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function qd(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 Gd=function(e){return(0,G.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({immutable:e.immutable,onChange:e.onChange,value:e.value},e.options))};function Kd(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 Xd=function(e){return(0,G.jsx)(si,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kd(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.id,immutable:e.immutable,isMulti:!1,onChange:e.onChange,value:e.value,openMenuOnClick:!0},e.options))};const Qd=Ws.Z.Debouncer((function(e){return(0,G.jsx)(Yr,{immutable:e.immutable,children:(0,G.jsx)(hp,{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 $d=function(){var e,t=(null===(e=navigator)||void 0===e?void 0:e.userAgent)||"";return/^((?!chrome|android).)*safari/i.test(t)};var Jd,eh,th,nh=(0,$.iv)(Jd||(Jd=Q()(["\n ","\n width: 100%;\n grid-area: 1 / 1 / 2 / 2;\n max-height: 25rem;\n box-sizing: border-box;\n"])),Vr),rh=$.ZP.div.withConfig({displayName:"StyledSizeWrapper"})(eh||(eh=Q()(["\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"])),nh),oh=$.ZP.textarea.withConfig({displayName:"StyledTextarea"})(th||(th=Q()(["\n &&&& {\n ","\n resize: none;\n margin: 0;\n min-height: 4em;\n }\n"])),nh);function ah(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 ih(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ah(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ah(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const ch=function(e){var t=e.value,n=e.onChange,r=e.name,o=e.id,a=e.disabled,i=e.immutable,c=(0,Z.useState)(t),u=U()(c,2),s=u[0],l=u[1],f=!$d(),p=(0,Z.useCallback)(oo()(l,500,{trailing:!0}),[]);return(0,Z.useEffect)((function(){f&&p(t)}),[t,f,p]),(0,G.jsx)(rh,ih(ih({"data-testid":"replicated-test"},f?{"data-replicated-value":s}:{}),{},{children:(0,G.jsx)(oh,{value:t,name:r,id:o,onChange:n,disabled:a,immutable:i,rows:"1"})}))};const uh=Ws.Z.Debouncer((function(e){return(0,G.jsx)(Yr,{immutable:e.immutable,children:(0,G.jsx)(ch,{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 sh;const lh=$.ZP.input.withConfig({displayName:"StyledTimeEdit"})(sh||(sh=Q()(["\n &&&& {\n ","\n }\n"])),Vr);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 ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const dh=function(e){var t=e.onChange,n=e.value,r=e.immutable,o=e.id,a=e.name,i=Gs(n,t),c=i.inputProps,u=i.clearButtonProps,s=n&&!r;return(0,G.jsxs)(Yr,{immutable:r,children:[(0,G.jsx)(lh,ph({type:"text",disabled:r,id:o,immutable:r,name:a},c)),s&&(0,G.jsx)(Gr,{children:(0,G.jsx)($e.Z,ph(ph({icon:"times"},u),{},{tabIndex:-1}))})]})};var hh;const mh=$.ZP.input.attrs((function(e){return{type:"url"}})).withConfig({displayName:"StyledUrlEdit"})(hh||(hh=Q()(["\n &&&& {\n ","\n }\n"])),Vr);const gh=Ws.Z.Debouncer((function(e){return(0,G.jsxs)(Yr,{immutable:e.immutable,children:[(0,G.jsx)(mh,{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,G.jsx)(Gr,{children:(0,G.jsx)(Wr.Z,{href:e.value,icon:"external-link",look:"ball",tabIndex:-1,target:"_blank",neutral:!0})})]})}));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 yh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bh={boolean:di,"boolean-select":li,choice:Pi,code:Ii,date:rl,datetime:al,document:ap,duration:pp,email:mp,geosearch:wd,html:Sd,integer:fd,address:eo,location:Cd,"multi-remote":Td,"multi-select":Rd,number:ld,phone:Hd,"pseudo-select":zd,remote:Vd,"search-filter":Gd,"single-select":Xd,string:Qd,text:uh,url:gh,time:dh};const wh=function(e){var t=e.componentType,n=e.value,r=e.options,o=e.id,a=e.events,i=e.placeholder,c=e.readOnly,u=void 0!==c&&c;if(bh[t]){var s=bh[t],l=yh(yh({},Sn()(a,"onChange")),{},{onBlur:function(){"function"==typeof(null==a?void 0:a.onBlur)&&a.onBlur(n)}});return(0,G.jsx)("div",yh(yh({},l),{},{"data-cy":"form-field",children:(0,G.jsx)(s,yh(yh({value:n,onChange:null==a?void 0:a.onChange},kr()(r)?{}:{options:r}),{},{id:o,immutable:u,placeholder:i,events:a}))}))}return console.log("No type-editor defined for component type",t),null};function Oh(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 xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const kh=function(e){return(0,G.jsx)(Kr,{children:(0,G.jsx)(wh,xh({componentType:e.type},Sn()(e,"type")))})};function Sh(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 Ph(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jh="yyyy-MM-dd",_h=function(e){return Es(e,jh)?Ps(e,jh,new Date):Es(e,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'")||Es(e,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx")?Cs(new Date(e)):null};const Eh={datetime:{type:"date",toRange:function(e){return{from:e?_h(e).toISOString():null,to:e?function(e,t){(0,tc.Z)(2,arguments);var n=(0,_c.Z)(e),r=(0,nc.Z)(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(_h(e),1).toISOString():null,isRangeValue:!0}},fromRange:function(e){return null!=e&&e.from?(0,Us.Z)(new Date(e.from),jh):null!=e&&e.to?(0,Us.Z)(new Date(e.to),jh):null},getToOptions:function(e,t){return Ph(Ph({},e),{},{datePickerOptions:Ph({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return Ph(Ph({},e),{},{datePickerOptions:Ph({maxDate:t},null==e?void 0:e.datePickerOptions)})}},date:{getToOptions:function(e,t){return Ph(Ph({},e),{},{datePickerOptions:Ph({minDate:t},null==e?void 0:e.datePickerOptions)})},getFromOptions:function(e,t){return Ph(Ph({},e),{},{datePickerOptions:Ph({maxDate:t},null==e?void 0:e.datePickerOptions)})}}};var Ch,Dh,Th,Mh,Rh,Ih=$.ZP.div.withConfig({displayName:"StyledIconWrapper"})(Ch||(Ch=Q()(["\n font-size: ",";\n"])),te.Z.font(-2.7)),Nh=$.ZP.div.withConfig({displayName:"StyledRange"})(Dh||(Dh=Q()(["\n display: flex;\n align-items: baseline;\n"]))),Ah=$.ZP.div.withConfig({displayName:"StyledInput"})(Th||(Th=Q()(["\n flex: 1;\n display: flex;\n flex-direction: column;\n"]))),Zh=(0,$.ZP)($e.Z).withConfig({displayName:"StyledBall"})(Mh||(Mh=Q()(["\n position: relative;\n top: 0.5px; // offset false vertical alignment\n"])));function Lh(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 Fh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Hh=function(e){var t=e.value,n=e.events,r=e.readOnly,o=e.type,a=e.options,i=e.fromText,c=e.toText,u=Eh[o],s=(null==t?void 0:t.isRangeValue)||!1,l=(0,Z.useRef)(t);l.current=t;var f=(0,Z.useMemo)((function(){return Fh(Fh({},n),{},{onChange:n.onChange})}),[n]),p={onChange:function(e){n.onChange(Fh(Fh({},l.current),{},{to:e}))}},d={onChange:function(e){n.onChange(Fh(Fh({},l.current),{},{from:e}))}},h=(null==u?void 0:u.type)||o,m=(0,G.jsx)(kh,Fh(Fh({type:h},Sn()(e,["type"])),{},{events:f})),g=(0,G.jsxs)(Ah,{children:[(0,G.jsx)(kh,Fh(Fh({},e),{},{options:function(e,t){return null!=u&&u.getFromOptions?u.getFromOptions(e,t):e}(a,null==t?void 0:t.to),value:(null==t?void 0:t.from)||null,events:d,placeholder:i})),Rh||(Rh=(0,G.jsx)(Ih,{children:(0,G.jsx)(V.Z,{icon:"horizontal-rule"})})),(0,G.jsx)(kh,Fh(Fh({},e),{},{options:function(e,t){return null!=u&&u.getToOptions?u.getToOptions(e,t):e}(a,null==t?void 0:t.from),value:(null==t?void 0:t.to)||null,events:p,placeholder:c}))]});return(0,G.jsxs)(Nh,{children:[s?g:m,(0,G.jsx)(Zh,{disabled:r,icon:s?"square-minus":"square-plus",onClick:function(){var e=s?function(e){return null!=u&&u.fromRange?u.fromRange(e):(null==e?void 0:e.from)||(null==e?void 0:e.to)||null}(t):function(e){return null!=u&&u.toRange?u.toRange(e):{from:e,to:e,isRangeValue:!0}}(t);n.onChange(e)}})]})};function Bh(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 Uh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wh=function(e){var t,n=e.componentType,r=e.mappingType,o=e.range,a=e.formField,i=e.entityField,c=e.formName,u=e.value,s=e.info,l=e.events,f=e.formData,p=a.dataType||a.componentType,d=null===(t=wr[r||"editable"])||void 0===t?void 0:t[p],h=function(e,t,n,r,o){return null!=e&&e.getOptions?e.getOptions({formField:t,formName:n,formData:r,entityField:o}):{}}(d,a,c,f,i),m=function(e,t,n,r,o,a){return null!=e&&e.getValue?e.getValue({formField:t,formName:n,formData:r,entityField:o,value:a}):a}(d,a,c,f,i,u),g=function(e,t,n,r,o,a){return null!=e&&e.getEvents?e.getEvents({formField:t,formName:n,formData:r,entityField:o,events:a}):a}(d,a,c,f,i,l),v=o?Hh:kh;return(0,G.jsx)(v,Uh(Uh({type:n,events:g,value:m},s),{},{options:h},o&&{fromText:f.intl.formatMessage({id:"client.component.range.from"}),toText:f.intl.formatMessage({id:"client.component.range.to"})}))};const zh=function(e,t){return function(n){return(0,G.jsx)(Wh,Uh({componentType:e,range:t},n))}};var Yh=i(42060);const Vh={dataContainerProps:function(){return{tooltips:["Resource"],navigationStrategy:!0}},getOptions:function(e){var t=e.formData;return t?{downloadTitle:t.intl.formatMessage({id:"client.component.upload.downloadTitle"}),tooltips:Xe()(t.tooltips,"Resource",null),loadTooltip:function(e){return t.loadTooltip("Resource",e)}}:{}}},qh={dataContainerProps:function(e){return{tooltips:[e.formField.targetEntity],navigationStrategy:!0}},getOptions:function(e){var t=e.formField,n=e.formData;return{tooltips:Xe()(n.tooltips,t.targetEntity,null),loadTooltip:function(e){return n.loadTooltip(t.targetEntity,e)},navigationStrategy:n.navigationStrategy,linkProps:{entityName:t.targetEntity}}}},Gh={binary:Vh,document:Vh,image:Vh,"multi-remote-field":qh,"single-remote-field":qh,description:{getOptions:function(e){var t=e.formField;return{mode:t.mode,title:t.title}},getValue:function(e){return e.formField.text}},number:{getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null)}}},moneyamount:{getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",2)}}},percent:{getValue:function(e){return e.value/100},getOptions:function(e){var t=e.formField;return{postPointDigits:Xe()(t,"validation.decimalDigits.postPointDigits",null)}}}};function Kh(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 Xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qh=function(e){var t=e.componentType,n=e.formField,r=e.value,o=e.formData,a=e.key,i=e.breakWords,c=n.dataType||n.componentType,u=Gh[c],s=function(e,t,n){return null!=e&&e.getOptions?e.getOptions({formField:t,formData:n}):{}}(u,n,o),l=function(e,t,n,r){return null!=e&&e.getValue?e.getValue({formField:t,formData:n,value:r}):r}(u,n,o,r);return(0,G.jsx)(Yh.Z,{type:t,value:l,options:s,breakWords:i},a)};const $h=function(e){return function(t){return(0,G.jsx)(Qh,Xh(Xh({},t),{},{componentType:e}))}};function Jh(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 em(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jh(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tm={address:zh("address"),binary:zh("document"),birthdate:zh("date"),boolean:zh("boolean"),char:zh("string"),choice:zh("choice"),code:zh("code"),count:zh("string"),counter:zh("integer"),createts:zh("datetime"),createuser:zh("string"),"compressed-text":zh("text"),date:zh("date"),datetime:zh("datetime"),decimal:zh("number"),display:$h("html"),description:$h("description"),document:zh("document"),double:zh("number"),duration:zh("duration"),email:zh("email"),"fulltext-search":zh("string"),html:zh("html"),image:zh("document"),identifier:zh("string"),integer:zh("integer"),ipaddress:zh("string"),latitude:zh("string"),location:zh("location"),login:zh("string"),long:zh("integer"),longitude:zh("string"),marking:zh("boolean"),moneyamount:zh("number"),"multi-remote-field":zh("multi-remote"),"multi-select-box":zh("multi-select"),"named-upload":zh("document"),percent:zh("number"),phone:zh("phone"),postcode:zh("string"),"pseudo-select":zh("pseudo-select"),"pulldown-date":zh("date"),"search-filter":zh("search-filter"),serial:zh("string"),"single-remote-field":zh("remote"),"single-select-box":zh("single-select"),sorting:zh("integer"),string:zh("string"),text:zh("text"),"text-area":zh("text"),time:zh("time"),updatets:zh("datetime"),updateuser:zh("string"),upload:zh("document"),url:zh("url"),uuid:zh("string"),version:zh("integer")},nm={address:zh("address"),binary:$h("document"),birthdate:$h("date"),boolean:$h("boolean"),code:$h("text"),char:$h("string"),choice:zh("choice"),counter:$h("integer"),createuser:$h("string"),createts:$h("datetime"),"compressed-text":$h("text"),"data-amount":$h("number"),date:$h("date"),datetime:$h("datetime"),decimal:$h("number"),display:$h("html"),description:$h("description"),duration:$h("duration"),document:$h("document"),double:$h("number"),email:$h("email"),html:$h("html"),image:$h("document"),ipaddress:$h("string"),identifier:$h("string"),latitude:$h("string"),location:zh("location"),login:$h("string"),long:$h("integer"),longitude:$h("string"),moneyamount:$h("number"),"multi-remote-field":$h("multi-remote"),"multi-select-box":$h("multi-select"),"named-upload":$h("document"),integer:$h("integer"),percent:$h("percent"),phone:$h("phone"),postcode:$h("string"),"pseudo-select":zh("pseudo-select"),"pulldown-date":$h("date"),remote:$h("remote"),"search-filter":$h("search-filter"),serial:$h("string"),"single-remote-field":$h("remote"),"single-select-box":$h("single-select"),sorting:$h("integer"),string:$h("string"),text:$h("text"),"text-area":$h("text"),time:$h("time"),updatets:$h("datetime"),updateuser:$h("string"),upload:$h("document"),url:$h("url"),uuid:$h("string"),version:$h("integer")};const rm={editable:tm,readOnly:nm,list:em(em({},nm),{},{binary:$h("document-compact"),document:$h("document-compact"),image:$h("document-compact")}),search:em(em({},tm),{},{url:zh("string"),text:zh("string"),geosearch:zh("geosearch"),html:zh("string"),birthdate:zh("date",!0),code:$h("text",!0),date:zh("date",!0),updatets:zh("datetime",!0),createts:zh("datetime",!0),datetime:zh("datetime",!0),moneyamount:zh("number",!0),percent:zh("number",!0),long:zh("integer",!0),integer:zh("integer",!0),decimal:zh("number",!0),counter:zh("integer",!0),time:zh("time",!0),boolean:zh("boolean-select"),marking:zh("boolean-select")})};var om;const am=function(e,t){return rm[e]&&rm[e][t]?rm[e][t]:(Or.Z.log("Unable to display field: unknown mapping type combination (".concat(e," / ").concat(t,")")),function(){return om||(om=(0,G.jsx)("span",{}))})};var im,cm,um,sm,lm,fm,pm,dm,hm,mm=$.ZP.div.withConfig({displayName:"StyledMergeErrorWrapper"})(im||(im=Q()(["\n ","\n padding: "," 0 0 ",";\n"])),(0,et.Z)(),te.Z.space(-1),te.Z.space(0)),gm=$.ZP.div.withConfig({displayName:"StyledSummaryErrorWrapper"})(cm||(cm=Q()(["\n display: grid;\n align-items: center;\n grid-template-columns: "," 1fr;\n grid-column-gap: ",";\n margin-bottom: ",";\n"])),te.Z.font(10),te.Z.space(-.5),te.Z.space(-.7)),vm=$.ZP.span.withConfig({displayName:"StyledIconWrapper"})(um||(um=Q()(["\n display: flex;\n align-items: center;\n color: ",";\n font-size: ",";\n"])),oe.FS.color("signal.danger"),te.Z.font(10)),ym=$.ZP.p.withConfig({displayName:"StyledError"})(sm||(sm=Q()([""]))),bm=$.ZP.div.withConfig({displayName:"StyledLabelWrapper"})(lm||(lm=Q()(["\n display: flex;\n align-items: center;\n\n label {\n vertical-align: bottom;\n }\n"]))),wm=$.ZP.div.withConfig({displayName:"StyledTableWrapper"})(fm||(fm=Q()(["\n flex: 1;\n"]))),Om=$.ZP.span.withConfig({displayName:"StyledStatusWrapper"})(pm||(pm=Q()(["\n color: ",";\n"])),(function(e){return e.isChecked?oe.FS.color("signal.success"):oe.FS.color("signal.danger")})),xm=function(e,t){return 0===Object.keys(de.Z.difference(e,t)).length},km=L().memo((function(e){var t=e.entityData,n=e.entityKey,r=e.name,o=e.setSelectedMultipleAll,a=e.isSelected,i=e.navigationStrategy;if(0===t.value.totalKeys)return null;return(0,G.jsxs)(bm,{children:[(0,G.jsx)("input",{type:"checkbox",onChange:function(e){return o(r,n,e.target.checked)},checked:a,id:"".concat(r).concat(n)}),(0,G.jsxs)(q.ZP.Label,{for:"".concat(r).concat(n),children:[dm||(dm=(0,G.jsx)(Y.Z,{id:"client.merge.allRelations"}))," ",(0,G.jsx)(K,{model:t.value.relationEntity,keys:t.value.keys,totalKeys:t.value.totalKeys,navigationStrategy:i})]})]})}),xm),Sm=L().memo((function(e){var t=e.entityData,n=e.entityKey,r=e.name,o=e.setSelectedMultiple,a=e.selectedMultiple,i=function(e){return Xe()(a,[r,e])===n},c=function(e,t){return o(r,n,e,t)},u=function(e,t){return e===t?"checked":t>0?"indeterminate":"unchecked"}(t.value.length,t.value.filter((function(e){return i(e.key)})).length);return(0,G.jsxs)(G.Fragment,{children:[t.value.length>0&&(0,G.jsxs)(bm,{children:[(0,G.jsx)(ye,{value:u,onChange:function(e){t.value.forEach((function(t){var n="checked"===e;i(t.key)!==n&&c(t.key,n)}))},id:"".concat(r).concat(n)}),(0,G.jsx)(q.ZP.Label,{for:"".concat(r).concat(n),children:hm||(hm=(0,G.jsx)(Y.Z,{id:"client.merge.allRelations"}))})]}),t.value.map((function(e){return(0,G.jsxs)(bm,{children:[(0,G.jsx)("input",{type:"checkbox",onChange:function(t){return c(e.key,t.target.checked)},checked:i(e.key),id:"".concat(r).concat(n,"-").concat(e.key)}),(0,G.jsx)(q.ZP.Label,{for:"".concat(r).concat(n,"-").concat(e.key),children:(0,G.jsx)(Yh.Z,{type:"single-select",value:e})})]},"relation-checkbox-".concat(e.key))}))]})}),xm),Pm=L().memo((function(e){var t=e.entityData,n=e.entityKey,r=e.name,o=e.setSelectedSingle,a=e.isSelected,i=t.type,c=t.writable,u={entity:"single-select-box"}[i]||i,s=am("list",u);return(0,G.jsxs)(bm,{children:[(0,G.jsx)("input",{type:"radio",name:r,onChange:function(){o(r,n)},checked:a,id:"".concat(r).concat(n),disabled:!c}),(0,G.jsx)(q.ZP.Label,{for:"".concat(r).concat(n),children:(0,G.jsx)(s,{mappingType:"list",formField:{dataType:u},value:t.value})})]})}),xm);const jm=function(e){var t=e.rowData,n=e.column,r=e.setSelectedSingle,o=e.selectedSingle,a=e.setSelectedMultiple,i=e.selectedMultiple,c=e.setSelectedMultipleAll,u=e.selectedMultipleAll,s=e.navigationStrategy,l=n.entityKey,f=t[l],p=f.type,d=t.__key;return"relations"===p?(0,G.jsx)(km,{entityData:f,entityKey:l,name:d,setSelectedMultipleAll:c,isSelected:Xe()(u,[d],[]).includes(l),navigationStrategy:s}):"entity-list"===p?(0,G.jsx)(Sm,{entityData:f,entityKey:l,name:d,setSelectedMultiple:a,selectedMultiple:i}):(0,G.jsx)(Pm,{entityData:f,entityKey:l,name:d,setSelectedSingle:r,isSelected:o[d]===l})};var _m={setSelectedSingle:function(e,t){return{type:j,payload:{name:e,entityKey:t}}},setSelectedMultiple:function(e,t,n,r){return{type:_,payload:{name:e,entityKey:t,relatedEntityKey:n,isSelected:r}}},setSelectedMultipleAll:function(e,t,n){return{type:E,payload:{name:e,entityKey:t,isSelected:n}}}};const Em=(0,k.connect)((function(e){return{selectedSingle:e.merge.selected.single,selectedMultiple:e.merge.selected.multiple,selectedMultipleAll:e.merge.selected.multipleAll,navigationStrategy:e.input.navigationStrategy}}),_m)((0,x.ZP)(jm));var Cm;const Dm=function(e){var t=e.label,n=e.entityKey,r=e.setTargetEntity,o=e.targetEntity,a=e.mergeStrategyDisplay,i=o===n,c=i?Cm||(Cm=(0,G.jsx)(Y.Z,{id:"client.merge.strategy.keep"})):a;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)("input",{type:"radio",name:"column",onChange:function(){return r(n)},checked:i,id:"targetEntity".concat(n)}),(0,G.jsxs)(q.ZP.Label,{for:"targetEntity".concat(n),children:[(0,G.jsx)(q.ZP.B,{children:t}),(0,G.jsxs)(Om,{isChecked:i,children:[" (",c,")"]})]})]})};var Tm={setTargetEntity:N};const Mm=(0,k.connect)((function(e){return{targetEntity:e.merge.selected.targetEntity,mergeStrategyDisplay:e.merge.sourceData.mergeStrategyDisplay}}),Tm)((0,x.ZP)(Dm));var Rm;y().arrayOf(y().shape({model:y().string,key:y().string,paths:y().objectOf(y().objectOf(y().arrayOf(y().string))),entityValidatorErrors:y().objectOf(y().arrayOf(y().string))}));const Im=function(e){var t=e.sourceData,n=e.mergeErrorMsg,r=e.mergeValidationErrors.map((function(e){var n=Object.keys(e.paths).map((function(n){return Object.keys(e.paths[n]).map((function(r){return e.paths[n][r].map((function(e,o){return(0,G.jsxs)(ym,{children:[t.labels[n],": ",e]},"paths-".concat(n,"-").concat(r,"-").concat(o))}))}))})),r=Object.keys(e.entityValidatorErrors).map((function(t){return e.entityValidatorErrors[t].map((function(e,n){return(0,G.jsx)(ym,{children:e},"entity-".concat(t,"-").concat(n))}))}));return[].concat(H()(n),H()(r))}));return(0,G.jsxs)(mm,{children:[(r.length>0||Boolean(n))&&(Rm||(Rm=(0,G.jsxs)(gm,{children:[(0,G.jsx)(vm,{children:(0,G.jsx)(V.Z,{icon:"times"})}),(0,G.jsx)(q.ZP.P,{children:(0,G.jsx)(Y.Z,{id:"client.merge.summary.error"})})]}))),Boolean(n)&&(0,G.jsx)(ym,{children:n}),r]})};var Nm,Am,Zm=function(e){var t=e.rowIdx,n=e.sourceData,r=e.allPaths[t];return(0,G.jsx)(q.ZP.B,{children:n.labels[r]})};const Lm=function(e){var t=e.sourceData,n=e.mergePending,r=e.mergeErrorMsg,o=e.mergeValidationErrors,a=e.executeMerge,i=(0,Z.useMemo)((function(){return t?function(e){var t=vn(e).map((function(t,n){return e.entities.reduce((function(n,r){var o=r.paths[t];return o&&o.value&&("entity"===o.type&&(o.value.display=wn(e,o.value.model,o.value.key)),"entity-list"===o.type&&(o.value=o.value.map((function(t){return t.display=wn(e,t.model,t.key),t})))),gn(gn({},n),{},g()({},r.key,o))}),{__key:t})})),n=yn(e).map((function(t,n){return e.relations.filter((function(e){return e.relationName===t})).reduce((function(e,t){return gn(gn({},e),{},g()({},t.entityKey,{type:"relations",value:{keys:t.keys,totalKeys:t.totalKeys,relationEntity:t.relationEntity}}))}),{__key:t})})),r=bn(e);return[].concat(H()(t),H()(n)).sort((function(e,t){return r.findIndex((function(t){return t===e.__key}))-r.findIndex((function(e){return e===t.__key}))}))}(t):[]}),[t]),c=(0,Z.useMemo)((function(){return t?function(e,t,n,r){var o=e.entities.map((function(r){return{id:r.key,entityKey:r.key,resizable:!0,sorting:{sortable:!1},CellRenderer:n,HeaderRenderer:function(n){return(0,G.jsx)(t,gn(gn({},n),{},{entityKey:r.key,label:wn(e,r.model,r.key)}))}}}));return[{id:"column-label",label:"",resizable:!0,sorting:{sortable:!1},CellRenderer:function(t){return(0,G.jsx)(r,gn(gn({},t),{},{sourceData:e,allPaths:bn(e)}))}}].concat(H()(o))}(t,Mm,Em,Zm):[]}),[t]);return n?Nm||(Nm=(0,G.jsx)(pe.Z,{})):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ne,{children:(0,G.jsx)(re,{onClick:a,look:"raised",ink:"primary",disabled:null===t,children:Am||(Am=(0,G.jsx)(Y.Z,{id:"client.merge.saveButton"}))})}),(0,G.jsxs)(wm,{children:[(0,G.jsx)(Im,{sourceData:t,mergeErrorMsg:r,mergeValidationErrors:o}),(0,G.jsx)(hn,{columns:c,data:i,selectionStyle:"none",dataLoadingInProgress:null===t,onColumnPositionChange:function(){}})]})]})};var Fm={executeMerge:function(){return{type:D}}};const Hm=(0,k.connect)((function(e){return{sourceData:e.merge.sourceData,mergePending:e.merge.mergePending,mergeErrorMsg:e.merge.mergeErrorMsg,mergeValidationErrors:e.merge.mergeValidationErrors}}),Fm)((0,x.ZP)(Lm));var Bm,Um,Wm,zm=$.ZP.div.withConfig({displayName:"StyledMerge"})(Bm||(Bm=Q()(["\n height: 100%;\n overflow: hidden;\n background-color: ",";\n display: flex;\n flex-direction: column;\n"])),J.Z.color("paper"));const Ym=function(e){var t=e.initialize,n=e.mergeDone;return(0,Z.useEffect)((function(){t()}),[t]),(0,G.jsx)(zm,{children:n?Um||(Um=(0,G.jsx)(fe,{})):Wm||(Wm=(0,G.jsx)(Hm,{}))})};var Vm={initialize:function(){return{type:S}}};const qm=(0,k.connect)((function(e){return{mergeDone:!!e.merge.mergeResponse}}),Vm)((0,x.ZP)(Ym));var Gm,Km=i(34857),Xm=i(31921),Qm=i.n(Xm),$m=i(81770);function Jm(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 eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jm(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var tg=function(e,t){for(var n=function(){var n=U()(o[r],2),a=n[0],i=n[1];"entity-list"===i.type&&i.value.map((function(e){return e.key})).forEach((function(n){Qm()(e,[a,n],t.key,Object)}))},r=0,o=Object.entries(t.paths);r<o.length;r++)n()},ng=(Gm={},g()(Gm,P,$m.Z.singleTransferReducer("sourceData")),g()(Gm,D,(function(e){return eg(eg({},e),{},{mergePending:!0})})),g()(Gm,T,(function(e,t){var n=t.payload.mergeResponse;return eg(eg({},e),{},{mergePending:!1,mergeResponse:n})})),g()(Gm,M,(function(e,t){var n=t.payload,r=n.errorMsg,o=n.validationErrors;return eg(eg({},e),{},{mergePending:!1,mergeErrorMsg:r,mergeValidationErrors:o})})),g()(Gm,j,(function(e,t){var n=t.payload,r=n.name,o=n.entityKey;return eg(eg({},e),{},{selected:eg(eg({},e.selected),{},{single:eg(eg({},e.selected.single),{},g()({},r,o))})})})),g()(Gm,_,(function(e,t){var n,r=t.payload,o=r.name,a=r.entityKey,i=r.relatedEntityKey;return r.isSelected?n=eg(eg({},e.selected.multiple),{},g()({},o,eg(eg({},e.selected.multiple[o]),{},g()({},i,a)))):(n=eg({},e.selected.multiple))[o]=Sn()(n[o],[i]),eg(eg({},e),{},{selected:eg(eg({},e.selected),{},{multiple:n})})})),g()(Gm,E,(function(e,t){var n,r=t.payload,o=r.name,a=r.entityKey;return n=r.isSelected?[].concat(H()(e.selected.multipleAll[o]||[]),[a]):e.selected.multipleAll[o].filter((function(e){return e!==a})),eg(eg({},e),{},{selected:eg(eg({},e.selected),{},{multipleAll:eg(eg({},e.selected.multipleAll),{},g()({},o,n))})})})),g()(Gm,C,(function(e,t){for(var n=t.payload.entityKey,r={},o={},a=e.sourceData.entities.find((function(e){return e.key===n})),i=0,c=Object.entries(a.paths);i<c.length;i++){var u=U()(c[i],2),s=u[0];"entity-list"!==u[1].type&&(r[s]=n)}e.sourceData.entities.filter((function(e){return e.key!==n})).forEach((function(e){return tg(o,e)})),tg(o,a);var l=e.sourceData.relations.reduce((function(e,t){return eg(eg({},e),{},g()({},t.relationName,[].concat(H()(e[t.relationName]||[]),[t.entityKey])))}),{});return eg(eg({},e),{},{selected:eg(eg({},e.selected),{},{targetEntity:n,single:r,multiple:o,multipleAll:l})})})),Gm),rg={sourceData:null,mergePending:!1,mergeResponse:null,mergeErrorMsg:null,mergeValidationErrors:[],selected:{targetEntity:null,single:{},multiple:{},multipleAll:{}}};var og=i(44908),ag=i.n(og),ig=i(81719),cg=Ld().mark(mg),ug=Ld().mark(gg),sg=Ld().mark(vg),lg=Ld().mark(yg),fg=Ld().mark(bg),pg=Ld().mark(wg),dg=function(e){return e.merge},hg=function(e){return e.input};function mg(){return Ld().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Km.$6)([(0,Km.Fm)(S,gg),(0,Km.Fm)(D,bg),(0,Km.Fm)(R,wg)]);case 2:case"end":return e.stop()}}),cg)}function gg(){var e,t;return Ld().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Km.Ys)(hg);case 2:return e=n.sent,t=e.selection,n.next=6,(0,Km.RE)(vg,t);case 6:case"end":return n.stop()}}),ug)}function vg(e){var t,n,r;return Ld().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return"merge/sourceData",t={method:"POST",body:e},o.next=4,(0,Km.RE)(ig.Z.requestSaga,"merge/sourceData",t);case 4:return n=o.sent,r=n.body,o.next=8,(0,Km.gz)(I(r));case 8:return o.next=10,(0,Km.gz)(N(r.entities[0].key));case 10:case"end":return o.stop()}}),sg)}function yg(){var e,t,n,r,o,a,i,c,u,s,l;return Ld().wrap((function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,(0,Km.Ys)(dg);case 2:e=f.sent,t=e.selected,n=e.sourceData,r={},o=Ld().mark((function e(){var t,o,c,u;return Ld().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=U()(i[a],2),o=t[0],c=t[1],(u=n.entities.find((function(e){return e.key===c})).paths[o]).writable&&("entity"===u.type?null===u.value?r[o]=null:r[o]={key:u.value.key}:r[o]=c);case 3:case"end":return e.stop()}}),e)})),a=0,i=Object.entries(t.single);case 8:if(!(a<i.length)){f.next=13;break}return f.delegateYield(o(),"t0",10);case 10:a++,f.next=8;break;case 13:c=Ld().mark((function e(){var t,n,o;return Ld().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=U()(s[u],2),n=t[0],o=t[1],r[n]=[],Object.keys(o).forEach((function(e){return r[n].push({key:e})}));case 3:case"end":return e.stop()}}),e)})),u=0,s=Object.entries(t.multiple);case 15:if(!(u<s.length)){f.next=20;break}return f.delegateYield(c(),"t1",17);case 17:u++,f.next=15;break;case 20:return l=ag()(n.relations.map((function(e){return e.relationName}))).map((function(e){return{relationName:e,sourceKey:t.multipleAll[e]||[]}})),f.abrupt("return",{entities:n.entities,targetEntity:{key:t.targetEntity,paths:r},mergeRelations:l});case 22:case"end":return f.stop()}}),lg)}function bg(){var e,t,n;return Ld().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return e="merge/merge",r.t0=[400,500],r.next=4,(0,Km.RE)(yg);case 4:return r.t1=r.sent,t={method:"POST",acceptedStatusCodes:r.t0,body:r.t1},r.next=8,(0,Km.RE)(ig.Z.requestSaga,e,t);case 8:if(200!==(n=r.sent).status){r.next=14;break}return r.next=12,(0,Km.gz)((o=n.body,{type:T,payload:{mergeResponse:o}}));case 12:r.next=21;break;case 14:if(!n.body||"VALIDATION_FAILED"!==n.body.errorCode){r.next=19;break}return r.next=17,(0,Km.gz)(A(null,n.body.errors));case 17:r.next=21;break;case 19:return r.next=21,(0,Km.gz)(A(n.body.message,[]));case 21:case"end":return r.stop()}var o}),fg)}function wg(){var e,t,n,r;return Ld().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,(0,Km.Ys)(dg);case 2:return e=o.sent,t=e.sourceData,n=t.entities.map((function(e){return{entityName:e.model,key:e.key}})),r=[{type:"entity-update-event",payload:{entities:n}}],o.next=8,(0,Km.gz)(w.Z.fireExternalEvent("onSuccess",{remoteEvents:r}));case 8:case"end":return o.stop()}}),pg)}var Og=Ld().mark(xg);function xg(){return Ld().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Km.$6)([(0,Km.rM)(mg)]);case 2:case"end":return e.stop()}}),Og)}const kg={merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:rg,t=arguments.length>1?arguments[1]:void 0,n=ng[t.type];return n?n(e,t):e}};var Sg,Pg,jg=[xg];function _g(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 Eg="merge",Cg=["emitAction","onSuccess"],Dg=function(e,t,n,r){var o=h.Z.createStore(kg,jg,t,Eg);b.Z.addToStore(o,(function(e){return e.input.emitAction})),w.Z.addToStore(o,(function(e){return h.Z.getEvents(Cg,e.input)}));var a=!n.emitAction;O.Z.addToStore(o,a);var i=(0,G.jsxs)(G.Fragment,{children:[a&&(Sg||(Sg=(0,G.jsx)(O.Z.Notifications,{}))),Pg||(Pg=(0,G.jsx)(qm,{}))]});return h.Z.createApp(Eg,i,o,{input:t,events:n,publicPath:r,textResourceModules:["component","common",Eg]})},Tg=function(e){return h.Z.useApp({initApp:Dg,props:e,packageName:Eg,externalEvents:Cg}).component};Tg.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_g(Object(n),!0).forEach((function(t){g()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({selection:y().object},Cg.reduce((function(e,t){return e[t]=y().func,e}),{}));var Mg=h.Z.createBundleableApp(Eg,Dg,Tg);h.Z.registerAppInRegistry(Mg.name,Mg.init)})(),c})()));
|