@ytsaurus/ui 1.95.0 → 1.97.0

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.
Files changed (74) hide show
  1. package/README.md +1 -0
  2. package/dist/public/build/assets-manifest.json +39 -37
  3. package/dist/public/build/css/1454.e1b6441b.chunk.css +2 -0
  4. package/dist/public/build/css/1454.e1b6441b.chunk.css.map +1 -0
  5. package/dist/public/build/css/333.4b28585f.chunk.css +2 -0
  6. package/dist/public/build/css/333.4b28585f.chunk.css.map +1 -0
  7. package/dist/public/build/css/{3716.f1b13197.chunk.css → 3716.932479b0.chunk.css} +2 -2
  8. package/dist/public/build/css/3716.932479b0.chunk.css.map +1 -0
  9. package/dist/public/build/css/4592.687b04fa.chunk.css +2 -0
  10. package/dist/public/build/css/4592.687b04fa.chunk.css.map +1 -0
  11. package/dist/public/build/css/8944.c58273b7.chunk.css +2 -0
  12. package/dist/public/build/css/8944.c58273b7.chunk.css.map +1 -0
  13. package/dist/public/build/css/{navigation.32b6fca4.chunk.css → navigation.4b7a1ff3.chunk.css} +2 -2
  14. package/dist/public/build/css/navigation.4b7a1ff3.chunk.css.map +1 -0
  15. package/dist/public/build/js/1016.3ced9e8b.chunk.js +2 -0
  16. package/dist/public/build/js/1016.3ced9e8b.chunk.js.map +1 -0
  17. package/dist/public/build/js/2150.647430c7.chunk.js +2 -0
  18. package/dist/public/build/js/2150.647430c7.chunk.js.map +1 -0
  19. package/dist/public/build/js/4776.b922a445.chunk.js.map +1 -1
  20. package/dist/public/build/js/{5082.b1a7f7b1.chunk.js → 5082.b475d219.chunk.js} +2 -2
  21. package/dist/public/build/js/5082.b475d219.chunk.js.map +1 -0
  22. package/dist/public/build/js/cluster-page-wrapper.b7cb91f7.chunk.js +2 -0
  23. package/dist/public/build/js/cluster-page-wrapper.b7cb91f7.chunk.js.map +1 -0
  24. package/dist/public/build/js/dashboard.8850118b.chunk.js +3 -0
  25. package/dist/public/build/js/dashboard.8850118b.chunk.js.map +1 -0
  26. package/dist/public/build/js/main.a609b753.js +3 -0
  27. package/dist/public/build/js/main.a609b753.js.map +1 -0
  28. package/dist/public/build/js/navigation.7e85a761.chunk.js +2 -0
  29. package/dist/public/build/js/navigation.7e85a761.chunk.js.map +1 -0
  30. package/dist/public/build/js/runtime.78bd9bc8.js +2 -0
  31. package/dist/public/build/js/runtime.78bd9bc8.js.map +1 -0
  32. package/dist/public/build/js/scheduling.680c5ca7.chunk.js +2 -0
  33. package/dist/public/build/js/scheduling.680c5ca7.chunk.js.map +1 -0
  34. package/dist/public/build/js/tablet-errors-by-bundle.95473558.chunk.js +2 -0
  35. package/dist/public/build/js/tablet-errors-by-bundle.95473558.chunk.js.map +1 -0
  36. package/dist/public/build/js/{yt-df-dialog.ba05eea6.chunk.js → yt-df-dialog.5aa0b817.chunk.js} +3 -3
  37. package/dist/public/build/js/yt-df-dialog.5aa0b817.chunk.js.map +1 -0
  38. package/dist/public/build/manifest.json +34 -32
  39. package/dist/server/components/requestsSetup.d.ts +1 -1
  40. package/dist/server/components/requestsSetup.js +5 -2
  41. package/dist/server/controllers/yt-tablet-errors-api.js +7 -3
  42. package/dist/shared/tablet-errors-manager.d.ts +1 -0
  43. package/package.json +2 -2
  44. package/dist/public/build/css/1454.cc1b5254.chunk.css +0 -2
  45. package/dist/public/build/css/1454.cc1b5254.chunk.css.map +0 -1
  46. package/dist/public/build/css/333.dc69b4bd.chunk.css +0 -2
  47. package/dist/public/build/css/333.dc69b4bd.chunk.css.map +0 -1
  48. package/dist/public/build/css/3716.f1b13197.chunk.css.map +0 -1
  49. package/dist/public/build/css/6975.7cc85b1a.chunk.css +0 -2
  50. package/dist/public/build/css/6975.7cc85b1a.chunk.css.map +0 -1
  51. package/dist/public/build/css/navigation.32b6fca4.chunk.css.map +0 -1
  52. package/dist/public/build/js/1016.d5d3729e.chunk.js +0 -2
  53. package/dist/public/build/js/1016.d5d3729e.chunk.js.map +0 -1
  54. package/dist/public/build/js/45.12c412c1.chunk.js +0 -2
  55. package/dist/public/build/js/45.12c412c1.chunk.js.map +0 -1
  56. package/dist/public/build/js/5082.b1a7f7b1.chunk.js.map +0 -1
  57. package/dist/public/build/js/cluster-page-wrapper.fe57aae8.chunk.js +0 -2
  58. package/dist/public/build/js/cluster-page-wrapper.fe57aae8.chunk.js.map +0 -1
  59. package/dist/public/build/js/dashboard.0a7085cc.chunk.js +0 -3
  60. package/dist/public/build/js/dashboard.0a7085cc.chunk.js.map +0 -1
  61. package/dist/public/build/js/main.0aacb164.js +0 -3
  62. package/dist/public/build/js/main.0aacb164.js.map +0 -1
  63. package/dist/public/build/js/navigation.f37d6960.chunk.js +0 -2
  64. package/dist/public/build/js/navigation.f37d6960.chunk.js.map +0 -1
  65. package/dist/public/build/js/runtime.f44b62dd.js +0 -2
  66. package/dist/public/build/js/runtime.f44b62dd.js.map +0 -1
  67. package/dist/public/build/js/scheduling.83bb157a.chunk.js +0 -2
  68. package/dist/public/build/js/scheduling.83bb157a.chunk.js.map +0 -1
  69. package/dist/public/build/js/tablet-errors-by-bundle.2dba0b10.chunk.js +0 -2
  70. package/dist/public/build/js/tablet-errors-by-bundle.2dba0b10.chunk.js.map +0 -1
  71. package/dist/public/build/js/yt-df-dialog.ba05eea6.chunk.js.map +0 -1
  72. /package/dist/public/build/js/{dashboard.0a7085cc.chunk.js.LICENSE.txt → dashboard.8850118b.chunk.js.LICENSE.txt} +0 -0
  73. /package/dist/public/build/js/{main.0aacb164.js.LICENSE.txt → main.a609b753.js.LICENSE.txt} +0 -0
  74. /package/dist/public/build/js/{yt-df-dialog.ba05eea6.chunk.js.LICENSE.txt → yt-df-dialog.5aa0b817.chunk.js.LICENSE.txt} +0 -0
@@ -1,3 +1,3 @@
1
- /*! For license information please see yt-df-dialog.ba05eea6.chunk.js.LICENSE.txt */
2
- (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[2736],{11896:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});var r={CLUSTER_PARAMS:"CLUSTER_PARAMS",ACCOUNTS:"ACCOUNTS_",NAVIGATION_PRELOAD:"NAVIGATION_PRELOAD",NAVIGATION_CONTENT_DOCUMENT:"NAVIGATION_CONTENT_DOCUMENT",NAVIGATION_CONTENT_FILE:"NAVIGATION_CONTENT_FILE",NAVIGATION_CONTENT_LINK:"NAVIGATION_CONTENT_LINK",NAVIGATION_CONTENT_MAP_NODE:"NAVIGATION_CONTENT_MAP_NODE_",NAVIGATION_CONTENT_REPLICATED_TABLE:"NAVIGATION_CONTENT_REPLICATED_TABLE",NAVIGATION_CONTENT_TABLE_STATIC:"NAVIGATION_CONTENT_TABLE_STATIC",NAVIGATION_CONTENT_TABLE_DYNAMIC:"NAVIGATION_CONTENT_TABLE_DYNAMIC",NAVIGATION_CONTENT_TRANSACTION:"NAVIGATION_CONTENT_TRANSACTION",NAVIGATION_CONTENT_TRANSACTION_MAP:"NAVIGATION_CONTENT_TRANSACTION_MAP",NAVIGATION_TAB_ACL:"NAVIGATION_TAB_ACL",NAVIGATION_TAB_ACL_ACCESS:"NAVIGATION_TAB_ACL_ACCESS",NAVIGATION_TAB_ANNOTATION:"NAVIGATION_TAB_ANNOTATION",NAVIGATION_TAB_ATTRIBUTES:"NAVIGATION_TAB_ATTRIBUTES",NAVIGATION_TAB_USER_ATTRIBUTES:"NAVIGATION_TAB_USER_ATTRIBUTES",NAVIGATION_TAB_LOCKS:"NAVIGATION_TAB_LOCKS",NAVIGATION_TAB_SCHEMA:"NAVIGATION_TAB_SCHEMA",NAVIGATION_TAB_TABLETS:"NAVIGATION_TAB_TABLETS",NAVIGATION_TAB_TABLET_ERRORS:"NAVIGATION_TAB_TABLET_ERRORS",OPERATIONS_LIST:"OPERATIONS_LIST_",OPERATION:"OPERATION",OPERATION_TAB_DETAILS:"OPERATION_TAB_DETAILS",OPERATION_TAB_ATTRIBUTES:"OPERATION_TAB_ATTRIBUTES",OPERATION_TAB_SPECIFICATION:"OPERATION_TAB_SPECIFICATION",OPERATION_TAB_STATISTICS:"OPERATION_TAB_STATISTICS",OPERATION_TAB_MONITOR:"OPERATION_TAB_MONITOR",OPERATION_TAB_PARTITION_SIZES:"OPERATION_TAB_PARTITION_SIZES",OPERATION_TAB_JOB_SIZES:"OPERATION_TAB_JOB_SIZES",OPERATION_TAB_JOBS:"OPERATION_TAB_JOBS",SCHEDULING:"SCHEDULING_",SCHEDULING_OVERVIEW:"SCHEDULING_OVERVIEW",SCHEDULING_DETAILS:"SCHEDULING_DETAILS",SCHEDULING_MONITOR:"SCHEDULING_MONITOR",SCHEDULING_ACL:"SCHEDULING_ACL",YQL_KIT_WIDGET:"YQL_KIT_WIDGET"}},11970:(e,t,n)=>{"use strict";n.d(t,{k:()=>v});var r=n(64922),i=n(77810);const a=(0,n(21086).om)("progress");function o(e){const{text:t,offset:n=0}=e;return t?(0,r.jsx)("div",{className:a("text-inner"),style:{transform:`translateX(calc(var(--g-flow-direction) * ${-n}%))`},children:t}):null}function l({item:e}){const{value:t,color:n,className:i,theme:o,title:l,content:s,loading:u}=e,c={loading:u};return void 0===n&&(c.theme=o||"default"),Number.isFinite(t)?(0,r.jsx)("div",{className:a("item",c,i),style:{width:`${t}%`,backgroundColor:n},title:l,children:s}):null}function s(e){return e<100?e-100:0}function u(e){const{theme:t,colorStops:n,colorStopsValue:r,value:i}=e;if(n){const e=n.find(((e,t)=>{const a="number"==typeof r?r:i,o=t>1?n[t-1].stop:0,l=t<n.length-1?e.stop:100;return a>=o&&a<=l}));return e?e.theme:t}return t}function c(e){const{stack:t,stackClassName:n,value:i,text:u}=e,c=s(i||function(e){return e.reduce(((e,{value:t})=>e+t),0)}(t));return(0,r.jsxs)("div",{className:a("stack",n),style:{transform:`translateX(calc(var(--g-flow-direction) * ${c}%))`},children:[(0,r.jsx)("div",{className:a("item"),style:{width:-c+"%"}}),t.map(((e,t)=>(0,r.jsx)(l,{item:e},t))),(0,r.jsx)(o,{offset:c,text:u})]})}function d(e){const{value:t,loading:n,text:i}=e,l=s(t);return Number.isFinite(t)?(0,r.jsx)("div",{className:a("item",{theme:u(e),loading:n}),style:{transform:`translateX(calc(var(--g-flow-direction) * ${l}%))`},children:(0,r.jsx)(o,{offset:l,text:i})}):null}function f(e){return void 0!==e.stack}const v=i.forwardRef((function(e,t){const{text:n="",theme:i="default",size:o="m",loading:l=!1,className:s,qa:u}=e,v=Object.assign(Object.assign({},e),{text:n,theme:i,size:o,loading:l});return(0,r.jsxs)("div",{ref:t,className:a({size:o},s),"data-qa":u,children:[(0,r.jsx)("div",{className:a("text"),children:n}),f(v)?(0,r.jsx)(c,Object.assign({},v)):(0,r.jsx)(d,Object.assign({},v))]})}))},12990:e=>{function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},15672:(e,t,n)=>{"use strict";n.d(t,{t1:()=>r.t}),n(40319),n(77810);var r=n(54299);n(64922),r.S},16538:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(40319),i=n(64922);const a=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75",clipRule:"evenodd"})}))}},17271:(e,t,n)=>{"use strict";n.d(t,{W9:()=>S,Ay:()=>N,Fl:()=>C,$x:()=>A});var r=n(40319),i=n(18801),a=n(29121),o=n(12937),l=n(66134),s=n(10785),u=n(77810),c=n(76872),d=n(24893),f=n(19410),v=n(73822),h=n(53332),m=n(26264),p=n(64922),g=["value","onChange","min","max","validator","format","defaultValue"],b=["value","error","onChange"],y=(0,c.A)("yt-number-input");function A(e,t){if(""!==e){var n=e.replace(/\s/g,"");return"Bytes"===t?(0,h.z_)(n):Number(n)}}function C(e,t,n){if(void 0===e)return"";var r="Bytes"===t?v.A.format.Bytes(e,n):v.A.format.Number(e,n);return r===v.A.format.NO_VALUE?"":r}function x(e){return void 0===e?"":e}var S=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,l.A)(this,t,[].concat(r))).state={parsedValue:NaN},e.onChange=function(n){var r=e.parseValue(n),i=t.errorFromValue(r,e.props),a=e.format(null==r?void 0:r.value);e.setState({parsedValue:null==r?void 0:r.value,parsedError:i,rawValue:n,formattedValue:a}),(0,e.props.onChange)({value:null==r?void 0:r.value,error:i})},e.onBlur=function(){e.setState({focused:!1})},e.onFocus=function(){e.setState({focused:!0})},e.onKeyDown=function(t){t.keyCode===m.DD.ENTER&&e.props.onEnterKeyDown&&e.props.onEnterKeyDown()},e}return(0,s.A)(t,e),(0,o.A)(t,[{key:"parseValue",value:function(e){return this.props.parseFn?this.props.parseFn(e):{value:A(e,this.props.format)}}},{key:"format",value:function(e){var t=this.props,n=t.format,r=t.decimalPlaces,i=t.formatFn;return i?i(e):C(e,n,{digits:r})}},{key:"getRestProps",value:function(){var e=this.props;return e.value,e.onChange,e.min,e.max,e.validator,e.format,e.defaultValue,(0,i.A)(e,g)}},{key:"renderMinMaxHint",value:function(){var e=this.props,t=e.min,n=e.max,r=e.showHint,i=e.size,a=!isNaN(t),o=!isNaN(n);return r&&(a||o)?(0,p.jsxs)("div",{className:y("hint",{size:i}),children:[a&&(0,p.jsxs)(f.m,{content:String(t),placement:"bottom",children:["min: ",(0,p.jsx)("b",{children:this.format(t)})]}),a&&(0,p.jsx)(p.Fragment,{children:"   "}),o&&(0,p.jsxs)(f.m,{content:String(n),placement:"bottom",children:["max: ",(0,p.jsx)("b",{children:this.format(n)})]})]}):null}},{key:"renderPrettyValue",value:function(){var e=this.props,t=e.size,n=e.hidePrettyValue,r=this.state.formattedValue;return n?null:(0,p.jsxs)("div",{className:y("pretty-value",{size:t}),children:[r," "]})}},{key:"renderDefaultValue",value:function(){var e=this.props,t=e.defaultValue,n=e.defaultValueClassName;return(0,p.jsx)(d.k,{disabled:!0,className:n,value:this.format(t),pin:"clear-round"})}},{key:"isBottomLineVisible",value:function(){var e=this.props.bottomLineVisibility,t=this.state.focused;return"visible"===e||t&&"focused"===e}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.className,i=e.showHint,a=e.hidePrettyValue,o=e.showDefaultValue,l=this.state,s=l.parsedError,c=l.rawValue,f=l.formattedValue,v=l.focused,h=this.getRestProps(),m=h.size,g=h.view,b=h.hasClear,A=(null!=t?t:{}).error||s,C=v?c:f;return(0,p.jsxs)("div",{className:y(null,n),children:[(0,p.jsxs)("div",{className:y("top"),children:[(0,p.jsx)(d.k,(0,r.A)((0,r.A)({},h),{},{error:A,autoComplete:!1,onUpdate:this.onChange,onKeyDown:this.onKeyDown,hasClear:b,value:C,size:m,view:g,onBlur:this.onBlur,onFocus:this.onFocus,pin:o?"round-brick":void 0})),o&&this.renderDefaultValue()]}),!A&&this.isBottomLineVisible()&&(0,p.jsx)(u.Fragment,{children:!i||v&&!a?this.renderPrettyValue():this.renderMinMaxHint()})]})}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r=e.value,i=e.format,a=e.preciseInitialRawValue,o=e.decimalPlaces,l=e.formatFn;if(void 0===n.rawValue){var s=l?l(null==r?void 0:r.value):C(null==r?void 0:r.value,i,{digits:o});return{parsedValue:null==r?void 0:r.value,parsedError:t.errorFromValue(r,e),rawValue:a?x(null==r?void 0:r.value):s,formattedValue:s}}return null}},{key:"errorFromValue",value:function(e,t){var n=t.validator,r=void 0===n?function(){}:n,i=t.min,a=t.max,o=t.integerOnly,l=e||{},s=l.value,u=l.error;if(u)return u;if(null!=s){try{if(isNaN(s))return"wrong format";var c=r(s);if(c)return c}catch(u){return String(u)}return o&&s%1!=0?"The value must be an integer":void 0!==i&&s<i?"The value must be ≥ ".concat(i):void 0!==a&&s>a?"The value must be ≤ ".concat(a):void 0}}}])}(u.Component);S.defaultProps={size:"m",view:"normal",hasClear:!0,bottomLineVisibility:"visible"};var N=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,l.A)(this,t,[].concat(r))).onChange=function(t){e.props.onChange(null==t?void 0:t.value)},e}return(0,s.A)(t,e),(0,o.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.error,a=(e.onChange,(0,i.A)(e,b));return(0,p.jsx)(S,(0,r.A)((0,r.A)({},a),{},{onChange:this.onChange,value:{value:t,error:n}}))}}],[{key:"format",value:function(e,t,n){return C(e,t,n)}}])}(u.Component)},22228:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(40319),i=n(18801),a=n(77810),o=n(15647),l=n(53144),s=n.n(l),u=n(49214),c=n.n(u),d=n(27528),f=n.n(d),v=n(76872),h=n(20361),m=n(52797),p=n(67270),g=n(64922),b=["items","width","multiple","onChange","placeholder","className","showTags","value","disablePortal"],y=(0,v.A)("group-suggest");function A(e){var t=e.items,n=e.width,o=e.multiple,l=e.onChange,u=e.placeholder,d=e.className,v=e.showTags,m=e.value,A=e.disablePortal,C=void 0===A||A,x=(0,i.A)(e,b),S=f()(t,(function(e){return{value:e,text:e}})),N=!(null!=m&&m.length),w=a.useMemo((function(){return f()(s()([],m),(function(e){return{title:e}}))}),[m]),E=a.useCallback((function(e){var t=c()(e,(function(e){return!e.removed})).map((function(e){return e.title}));l(t)}),[m,l]);return(0,g.jsxs)("div",{className:y({empty:N},d),children:[(0,g.jsx)(p.A,(0,r.A)((0,r.A)({},x),{},{items:S,onUpdate:l,placeholder:u,value:e.value,multiple:o,width:null!=n?n:"max",filterable:!0,disablePortal:C})),o&&v&&(0,g.jsx)(h.Vm,{onChange:E,value:w})]})}A.isEmpty=function(e){return!(null!=e&&e.length)},A.getDefaultValue=function(){return[]};const C=(0,o.Ng)((function(e,t){return{items:t.idmOnly?(0,m.yP)(e):(0,m.Gd)(e)}}))(A)},27241:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(77810);const i=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06",clipRule:"evenodd"}))},29094:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(77810),i=n(76872),a=n(27528),o=n.n(a),l=n(49214),s=n.n(l),u=n(67270),c=n(33547),d=n(64922),f=(0,i.A)("cluster-select-control");function v(e){var t=e.className,n=e.excludeClusters,i=e.onChange,a=e.value,l=e.placeholder,v=e.disabled,h=e.filterPredicate,m=void 0===h?function(){return!0}:h,p=e.width,g=r.useMemo((function(){return o()(s()(c.YT.clusters,m),(function(e){var t=e.name;return{value:e.id,text:t}}))}),[m]),b=r.useMemo((function(){if(null==n||!n.length)return g;var e=new Set(n);return s()(g,(function(t){var n=t.value;return!e.has(n)}))}),[g,n]),y=r.useCallback((function(e){i(e[0])}),[i]);return(0,d.jsx)(r.Fragment,{children:(0,d.jsx)(u.A,{value:[a],className:f({empty:!a},t),onUpdate:y,items:b,placeholder:null!=l?l:"Cluster...",disabled:v,width:p})})}v.getDefaultValue=function(){return""},v.isEmpty=function(e){return!e};const h=v},36197:(e,t,n)=>{"use strict";n.d(t,{g:()=>O});var r=n(9736),i=n(77810),a=n(76872),o=n(73384),l=n(6542),s=n(72890),u=n(32235),c=n(4564),d=n(65986),f=n(37338);const v=JSON.parse('{"button_select-all":"Select all","button_deselect-all":"Clear","button_select":"Select","label_selected":"Selected","placeholder_search":"Search"}'),h=JSON.parse('{"button_select-all":"Выбрать все","button_deselect-all":"Очистить","button_select":"Выбрать","label_selected":"Выбрано","placeholder_search":"Поиск"}'),m=(0,f.N)({en:v,ru:h},`${d.C}item-selector`),p=(0,d.o)("item-selector");class g extends i.Component{constructor(){super(...arguments),this.renderItemTitle=e=>{const{renderItemValue:t,getItemId:n}=this.props;return t?t(e):n(e)},this.renderItem=(e,t)=>i.createElement("div",{className:p("item",{active:t})},i.createElement("span",{className:p("item-text")},this.renderItemTitle(e)),i.createElement(l.$,{view:"flat-secondary",size:"s",className:p("item-select"),onClick:this.onAddItem.bind(this,e)},m("button_select"))),this.filterItem=e=>t=>{const{getItemId:n}=this.props;return n(t).includes(e)},this.renderValueItem=(e,t)=>i.createElement("div",{className:p("value-item",{active:t})},i.createElement("span",{className:p("value-item-text")},this.renderItemTitle(e)),i.createElement(l.$,{view:"flat-secondary",size:"s",className:p("value-item-remove"),onClick:()=>this.onRemoveItem(e)},i.createElement(u.I,{data:s.A,size:16}))),this.onAddItem=e=>{const{getItemId:t,value:n}=this.props,r=t(e),i=new Set(n).has(r)?n:[...n,r];setTimeout((()=>{this.onUpdate(i)}),0)},this.onRemoveItem=e=>{const{value:t,getItemId:n}=this.props,r=n(e),i=t.filter((e=>e!==r));setTimeout((()=>{this.onUpdate(i)}),0)},this.onErase=()=>{this.onUpdate([])},this.onSelectAll=()=>{const{items:e,getItemId:t}=this.props,n=e.map(t);this.onUpdate(n)},this.onMoveItem=({oldIndex:e,newIndex:t})=>{if(e!==t){const n=this.props.value.slice();this.onUpdate(c.B.moveListElement(n,e,t))}},this.onUpdate=e=>{this.props.onUpdate(e)}}getActualItems(){const{items:e,value:t,hideSelected:n,getItemId:r}=this.props,i=[],a=new Array(t.length),o=new Map(t.map(((e,t)=>[e,t])));for(const t of e){const e=o.get(r(t));void 0!==e&&(a[e]=t),n&&void 0!==e||i.push(t)}return[i,a]}render(){const{value:e,selectorTitle:t,renderItem:n=this.renderItem,filterItem:r=this.filterItem,hideSelectAllButton:a}=this.props,[o,s]=this.getActualItems();return i.createElement("div",{className:p()},i.createElement("div",{className:p("list")},i.createElement("div",{className:p("list-header")},i.createElement("span",{className:p("list-title")},t),!a&&i.createElement(l.$,{view:"flat",size:"s",disabled:0===o.length,onClick:this.onSelectAll},m("button_select-all"))),i.createElement(c.B,{items:o,renderItem:n,filterItem:r,filterPlaceholder:m("placeholder_search"),itemsHeight:196})),i.createElement("div",{className:p("list")},i.createElement("div",{className:p("list-header")},i.createElement("span",{className:p("list-title")},`${m("label_selected")}: ${e.length}`),i.createElement(l.$,{view:"flat",size:"s",disabled:0===e.length,onClick:this.onErase},m("button_deselect-all"))),i.createElement(c.B,{items:s,renderItem:this.renderValueItem,filterItem:r,filterPlaceholder:m("placeholder_search"),sortable:!0,onSortEnd:this.onMoveItem,itemsHeight:196})))}}g.defaultProps={hideSelected:!0,selectorTitle:"",getItemId:function(e){return`${e}`}};var b=n(40319),y=n(64922);const A=function(e){return(0,y.jsx)("svg",(0,b.A)((0,b.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),{},{children:(0,y.jsx)("path",{fill:"none",stroke:"currentColor",d:"m3 6 5 5 5-5"})}))};var C=(0,a.A)("yc-selector-control");function x(e){var t=e.value,n=e.placeholder;return t.length>0?(0,y.jsx)("span",{className:C("value"),children:t.join(", ")}):(0,y.jsx)("span",{className:C("placeholder"),children:n})}function S(e){var t=e.size,n=void 0===t?"s":t,r=e.width,a=e.label,o=e.focused,l=e.disabled,s=e.displayArrow,c=e.value,d=e.icon,f=e.badgeFocused,v=e.badgeRef,h=e.onBadgeClick,m=e.onClick,p=e.placeholder,g={};r&&(g.width=r);var b=i.useRef(null);return c?(0,y.jsxs)("div",{ref:b,className:C({size:n,focused:o,disabled:l}),style:g,onClick:m,children:[Boolean(a)&&(0,y.jsx)("span",{className:C("label"),children:a}),Boolean(d)&&(0,y.jsx)("div",{className:C("selected-item-icon"),children:d}),x({value:c,placeholder:p}),Boolean(c.length>0)&&(0,y.jsx)("div",{ref:v,className:C("badge",{focused:f}),onClick:h,children:c.length}),s&&(0,y.jsx)("div",{className:C("arrow"),children:(0,y.jsx)(u.I,{data:A})})]}):null}var N=n(50326);const w=JSON.parse('{"button_apply":"Apply","button_cancel":"Cancel","label_columns":"Columns","label_placeholder":"Select 1 or more columns"}');var E=new N.TH;E.setLang("en");var j="yc-column-selector";E.registerKeyset("en",j,w);const T=E.keyset(j);var k=(0,a.A)("yc-column-selector"),I=["bottom-start","bottom-end","top-start","top-end"];function O(e){var t=e.className,n=e.switcher,a=e.disabled,s=e.controlWidth,u=e.items,c=e.value,d=e.onUpdate,f=e.renderItem,v=e.renderItemValue,h=e.getItemId,m=e.filterItem,p=e.popupPlacement,b=void 0===p?I:p,A=i.useRef(null),C=i.useState(!1),x=(0,r.A)(C,2),N=x[0],w=x[1],E=i.useState(!1),j=(0,r.A)(E,2),O=j[0],R=j[1],V=i.useState(),_=(0,r.A)(V,2),F=_[0],B=_[1];i.useEffect((function(){B(void 0)}),[u,c]),i.useEffect((function(){a&&(w(!1),B(void 0))}),[a]);var L=i.useCallback((function(e){B(e)}),[]),D=i.useCallback((function(){w(!1)}),[]),P=i.useCallback((function(){w(!1),B(void 0)}),[]),z=i.useCallback((function(){w(!1),B(void 0),F&&c!==F&&d(F)}),[F,d,c]);return(0,y.jsxs)("div",{className:k(null,t),children:[(0,y.jsx)("div",{className:k("control"),ref:A,onClick:function(){a||(w((function(e){return!e})),B(void 0),O||R(!0))},children:n||(0,y.jsx)(S,{displayArrow:!0,disabled:a,placeholder:T("label_placeholder"),value:c,focused:N,width:s})}),O&&(0,y.jsxs)(o.z,{anchorRef:A,placement:b,open:N,onClose:D,children:[(0,y.jsx)(g,{selectorTitle:T("label_columns"),items:u,value:null!=F?F:c,onUpdate:L,getItemId:h,filterItem:m,renderItem:f,renderItemValue:v}),(0,y.jsxs)("div",{className:k("controls"),children:[(0,y.jsx)(l.$,{view:"flat",className:k("control"),onClick:P,children:T("button_cancel")}),(0,y.jsx)(l.$,{view:"action",className:k("control"),onClick:z,children:T("button_apply")})]})]})]})}},58541:(e,t,n)=>{var r=n(12990).default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},a=Object.prototype,o=a.hasOwnProperty,l="function"==typeof Symbol?Symbol:{},s=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function d(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{d({},"")}catch(t){d=function(e,t,n){return e[t]=n}}function f(e,n,r,i){var a=n&&n.prototype instanceof m?n:m,o=Object.create(a.prototype);return d(o,"_invoke",function(e,n,r){var i=1;return function(a,o){if(3===i)throw Error("Generator is already running");if(4===i){if("throw"===a)throw o;return{value:t,done:!0}}for(r.method=a,r.arg=o;;){var l=r.delegate;if(l){var s=N(l,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===i)throw i=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=3;var u=v(e,n,r);if("normal"===u.type){if(i=r.done?4:2,u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=4,r.method="throw",r.arg=u.arg)}}}(e,r,new j(i||[])),!0),o}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var h={};function m(){}function p(){}function g(){}var b={};d(b,s,(function(){return this}));var y=Object.getPrototypeOf,A=y&&y(y(T([])));A&&A!==a&&o.call(A,s)&&(b=A);var C=g.prototype=m.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,l,s){var u=v(e[i],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,l,s)}),(function(e){n("throw",e,l,s)})):t.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return n("throw",e,l,s)}))}s(u.arg)}var i;d(this,"_invoke",(function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}),!0)}function N(e,n){var r=n.method,i=e.i[r];if(i===t)return n.delegate=null,"throw"===r&&e.i.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var a=v(i,e.i,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,h;var o=a.arg;return o?o.done?(n[e.r]=o.value,n.next=e.n,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function w(e){this.tryEntries.push(e)}function E(e){var n=e[4]||{};n.type="normal",n.arg=t,e[4]=n}function j(e){this.tryEntries=[[-1]],e.forEach(w,this),this.reset(!0)}function T(e){if(null!=e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return p.prototype=g,d(C,"constructor",g),d(g,"constructor",p),p.displayName=d(g,c,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,d(e,c,"GeneratorFunction")),e.prototype=Object.create(C),e},n.awrap=function(e){return{__await:e}},x(S.prototype),d(S.prototype,u,(function(){return this})),n.AsyncIterator=S,n.async=function(e,t,r,i,a){void 0===a&&(a=Promise);var o=new S(f(e,t,r,i),a);return n.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(C),d(C,c,"Generator"),d(C,s,(function(){return this})),d(C,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},n.values=T,j.prototype={constructor:j,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t){o.type="throw",o.arg=e,n.next=t}for(var i=n.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a[4],l=this.prev,s=a[1],u=a[2];if(-1===a[0])return r("end"),!1;if(!s&&!u)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=l){if(l<s)return this.method="next",this.arg=t,r(s),!0;if(l<u)return r(u),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var i=r;break}}i&&("break"===e||"continue"===e)&&i[0]<=t&&t<=i[2]&&(i=null);var a=i?i[4]:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i[2],h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var i=r.arg;E(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={i:T(e),r:n,n:r},"next"===this.method&&(this.arg=t),h}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},58595:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(29121),i=n(12937),a=n(66134),o=n(10785),l=n(77810),s=n(76872),u=n(73822),c=n(17271),d=n(64922),f=(0,s.A)("yt-quota-editor"),v=function(e){function t(){var e;(0,r.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=(0,a.A)(this,t,[].concat(i))).onEnterKeyDown=function(){var t=e.props.onEnterKeyDown;(void 0===t?function(){}:t)()},e.onBytesChange=function(t){var n=e.props,r=n.onChange,i=n.sourceAccount;r({limit:null==t?void 0:t.value,source:i,error:(null==t?void 0:t.error)||e.checkForError(null==t?void 0:t.value,i)})},e.onAccountChange=function(t){var n=e.props,r=n.onChange,i=n.limit;r({limit:i,source:t,error:n.error||e.checkForError(i,t)})},e}return(0,o.A)(t,e),(0,i.A)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.format,r=e.sourceSuggestTitle,i=e.renderSourceSuggest,a=e.sourceAccount,o=e.limitInputTitle,s=e.showHint,u=e.error,v=e.decimalPlaces,h=e.sourceSuggestDisabled;return(0,d.jsxs)("div",{className:f(null,t),children:[i&&(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)("div",{className:f("item-title"),children:r||"Account to distribution"}),i({value:a||"",onChange:this.onAccountChange,disabled:h}),(0,d.jsx)("div",{className:f("free"),children:(0,d.jsxs)(l.Fragment,{children:["Free to distribute",(0,d.jsxs)("span",{className:f("free-value"),children:[" ",this.getFreeFormatted()]})]})})]}),(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)("div",{className:f("item-title"),children:o||"New quota limit"}),(0,d.jsx)(c.W9,{onChange:this.onBytesChange,value:{value:this.getLimit(),error:u},format:n,showHint:s,min:this.getMinLimit(),max:this.getMaxLimit(),onEnterKeyDown:this.onEnterKeyDown,decimalPlaces:v,qa:"quota-editor-new-limit"})]})]})}},{key:"getLimit",value:function(){var e=this.props,t=e.limit,n=e.prevLimit;return void 0!==t?t:n}},{key:"getFreeImpl",value:function(){var e=this.props.sourceAccount,t=this.calcLimitTotal(e),n=t.limit,r=t.total,i=t.allowChildrenOverCommit,a=t.totalChildrenLimit,o=void 0===a?0:a;if(void 0===n||void 0===r)return{};if(i){var l=Math.max(0,n);return{free:l,maxValue:l}}var s=this.props.prevLimit,u=void 0===s?0:s,c=this.props.limit,d=void 0===c?u:c,f=Math.max(0,n-o);return{free:f+u-d,maxValue:f+u}}},{key:"getFree",value:function(){return this.getFreeImpl().free}},{key:"calcLimitTotal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.props.getInfoByName(e)}},{key:"getMinLimit",value:function(){var e=this.props.min;if(void 0!==e)return e;var t=this.props,n=t.currentAccount,r=(0,t.getInfoByName)(n),i=r.totalChildrenLimit;return(r.total||0)+(i||0)}},{key:"getMaxLimit",value:function(){var e=this.props.max;return void 0!==e?e:this.getFreeImpl().maxValue}},{key:"getFreeFormatted",value:function(){return this.props.sourceAccount?c.Ay.format(Number(this.getFree()),this.props.format):u.A.format.NO_VALUE}},{key:"checkForError",value:function(e,t){if(void 0!==e){if(isNaN(e))return"wrong format!";if(this.props.currentAccount===t)return"The same source account";if(!(e<=this.props.prevLimit)){var n=this.getMaxLimit();return t&&(void 0===n||e>n)?"New value is too big":void 0}}}}])}(l.Component)},63082:(e,t,n)=>{"use strict";n.d(t,{X:()=>A});var r=n(64922),i=n(77810),a=n(81214),o=n.n(a),l=n(25930),s=n.n(l),u=n(23313),c=n.n(u),d=n(21086),f=n(82835),v=n(37338);const h=JSON.parse('{"label_empty":"No data","label-actions":"Actions","label-row-select":"Select"}'),m=JSON.parse('{"label_empty":"Нет данных","label-actions":"Действия","label-row-select":"Выбрать"}'),p=(0,v.N)({en:h,ru:m},"Table");function g(e){(0,f.m)(`[Table] Physical values (left, right) of "${e}" property are deprecated. Use logical values (start, end) instead.`)}function b(e,t){return"left"===e?(g(t),"start"):"right"===e?(g(t),"end"):e}const y=(0,d.om)("table");class A extends i.Component{constructor(){super(...arguments),this.state={activeScrollElement:"scrollContainer",columnsStyles:Array.from(this.props.columns,(()=>({}))),columnHeaderRefs:Array.from(this.props.columns,(()=>i.createRef()))},this.tableRef=i.createRef(),this.scrollContainerRef=i.createRef(),this.horizontalScrollBarRef=i.createRef(),this.horizontalScrollBarInnerRef=i.createRef(),this.renderRow=(e,t)=>{const{columns:n,isRowDisabled:i,onRowClick:a,onRowMouseEnter:o,onRowMouseLeave:l,onRowMouseDown:s,getRowClassNames:u,verticalAlign:c,edgePadding:d,wordWrap:f,getRowDescriptor:v}=this.props,{columnsStyles:h}=this.state,m=null==v?void 0:v(e,t),p=(null==m?void 0:m.disabled)||(null==i?void 0:i(e,t))||!1,g=(null==m?void 0:m.classNames)||(null==u?void 0:u(e,t))||[],C=Boolean(!p&&a);return(0,r.jsx)("tr",{onClick:!p&&a?a.bind(null,e,t):void 0,onMouseEnter:!p&&o?o.bind(null,e,t):void 0,onMouseLeave:!p&&l?l.bind(null,e,t):void 0,onMouseDown:!p&&s?s.bind(null,e,t):void 0,className:y("row",{disabled:p,interactive:C,"vertical-align":c},g.join(" ")),children:n.map(((n,i)=>{const{id:a,align:o,primary:l,className:s,sticky:u}=n,c=A.getBodyCellContent(n,e,t),v=b(o,"column.align"),m=b(u,"column.sticky");return(0,r.jsx)("td",{style:h[i],className:y("cell",{align:v,primary:l,sticky:m,"edge-padding":d,"word-wrap":f},s),children:c},a)}))},A.getRowId(this.props,e,t))},this.handleScrollContainerMouseenter=()=>{this.setState({activeScrollElement:"scrollContainer"})},this.handleScrollContainerScroll=()=>{"scrollContainer"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.horizontalScrollBarRef.current.scrollLeft=this.scrollContainerRef.current.scrollLeft)},this.handleHorizontalScrollBarMouseenter=()=>{this.setState({activeScrollElement:"scrollBar"})},this.handleHorizontalScrollBarScroll=()=>{"scrollBar"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.scrollContainerRef.current.scrollLeft=this.horizontalScrollBarRef.current.scrollLeft)}}static getRowId(e,t,n){const{data:r,getRowId:i,getRowDescriptor:a}=e,o=null!=n?n:r.indexOf(t),l=null==a?void 0:a(t,o);return void 0!==(null==l?void 0:l.id)?l.id:"function"==typeof i?i(t,o):String(i&&i in t?t[i]:o)}static getHeadCellContent(e){const{id:t,name:n}=e;let r;return r="function"==typeof n?n():"string"==typeof n?n:t,r}static getBodyCellContent(e,t,n){const{id:r,template:i,placeholder:a}=e;let l,u;return l="function"==typeof a?a(t,n):null!=a?a:"—","function"==typeof i?u=i(t,n):"string"==typeof i?u=o()(t,i):s()(t,r)&&(u=o()(t,r)),[void 0,null,""].includes(u)&&l?l:u}static getDerivedStateFromProps(e,t){return e.columns.length===t.columnHeaderRefs.length?null:{columnHeaderRefs:Array.from(e.columns,(()=>i.createRef()))}}componentDidMount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver=new ResizeObserver((e=>{var t;const{contentRect:n}=e[0];null===(t=this.horizontalScrollBarInnerRef.current)||void 0===t||t.style.setProperty("width",`${n.width}px`)})),this.tableRef.current&&this.tableResizeObserver.observe(this.tableRef.current),this.scrollContainerRef.current&&(this.scrollContainerRef.current.addEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.addEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.addEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.addEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver=new ResizeObserver((e=>{window.requestAnimationFrame((()=>{Array.isArray(e)&&e.length&&this.updateColumnStyles()}))})),this.tableRef.current&&this.columnsResizeObserver.observe(this.tableRef.current),this.updateColumnStyles()}componentDidUpdate(e){this.props.columns!==e.columns&&this.updateColumnStyles()}componentWillUnmount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver&&this.tableResizeObserver.disconnect(),this.scrollContainerRef.current&&(this.scrollContainerRef.current.removeEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.removeEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.removeEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.removeEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver&&this.columnsResizeObserver.disconnect()}render(){const{columns:e,stickyHorizontalScroll:t,className:n,qa:a}=this.props,o=e.some((({primary:e})=>e));return(0,r.jsx)("div",{className:y({"with-primary":o,"with-sticky-scroll":t},n),"data-qa":a,children:t?(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)("div",{ref:this.scrollContainerRef,className:y("scroll-container"),children:this.renderTable()}),this.renderHorizontalScrollBar()]}):this.renderTable()})}renderHead(){const{columns:e,edgePadding:t,wordWrap:n}=this.props,{columnsStyles:i}=this.state;return(0,r.jsx)("thead",{className:y("head"),children:(0,r.jsx)("tr",{className:y("row"),children:e.map(((e,a)=>{const{id:o,align:l,primary:s,sticky:u,className:c}=e,d=b(l,"column.align"),f=b(u,"column.sticky"),v=A.getHeadCellContent(e);return(0,r.jsx)("th",{ref:this.state.columnHeaderRefs[a],style:i[a],className:y("cell",{align:d,primary:s,sticky:f,"edge-padding":t,"word-wrap":n},c),children:v},o)}))})})}renderBody(){const{data:e}=this.props;return(0,r.jsx)("tbody",{className:y("body"),children:e.length>0?e.map(this.renderRow):this.renderEmptyRow()})}renderTable(){const{width:e="auto"}=this.props;return(0,r.jsxs)("table",{ref:this.tableRef,className:y("table",{width:e}),children:[this.renderHead(),this.renderBody()]})}renderEmptyRow(){const{columns:e,emptyMessage:t}=this.props;return(0,r.jsx)("tr",{className:y("row",{empty:!0}),children:(0,r.jsx)("td",{className:y("cell"),colSpan:e.length,children:t||p("label_empty")})})}renderHorizontalScrollBar(){const{stickyHorizontalScroll:e,stickyHorizontalScrollBreakpoint:t=0}=this.props;return(0,r.jsx)("div",{ref:this.horizontalScrollBarRef,className:y("horizontal-scroll-bar",{"sticky-horizontal-scroll":e}),style:{bottom:`${t}px`},"data-qa":"sticky-horizontal-scroll-breakpoint-qa",children:(0,r.jsx)("div",{ref:this.horizontalScrollBarInnerRef,className:y("horizontal-scroll-bar-inner")})})}updateColumnStyles(){this.setState((e=>{const t=e.columnHeaderRefs.map((e=>null===e.current?void 0:e.current.getBoundingClientRect().width));return{columnsStyles:this.props.columns.map(((e,n)=>this.getColumnStyles(n,t)))}}))}getColumnStyles(e,t){const{columns:n}=this.props,r=n[e],i={};if("string"==typeof r.width)return{maxWidth:0,width:r.width};if(void 0!==r.width&&(i.width=r.width),!r.sticky)return i;const a="left"===r.sticky||"start"===r.sticky?t.slice(0,e):t.slice(e+1);return i["left"===r.sticky||"start"===r.sticky?"insetInlineStart":"insetInlineEnd"]=a.reduce(((e,t)=>c()(t)?e+t:e),0),i}}A.defaultProps={edgePadding:!0}},63863:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(77810);const i=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75",clipRule:"evenodd"}))},65986:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,o:()=>a});var r=n(29717);const i="gc-",a=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:i,e:"__",m:"_",v:"_"}))},70232:(e,t,n)=>{var r=n(58541)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},72207:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditableList:()=>Sn,RoleListControl:()=>jr,TabFieldVertical:()=>Zn,YTDialog:()=>Co,registerDialogControl:()=>xr,registerDialogTabControl:()=>Sr});var r=n(68175),i=n(40319),a=n(77810),o=n(76872),l=n(29121),s=n(12937),u=n(66134),c=n(10785),d=n(7787),f=function(e){function t(){return(0,l.A)(this,t),(0,u.A)(this,t,arguments)}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){return d.Ay.renderAclSubjectsSuggestControl(this.props)}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!e||!e.length}}])}(a.Component),v=n(2944),h=n(30627),m=n(64922);function p(e){var t=e.value,n=e.onChange,r=e.columnGroups,i=e.disabled,o=a.useMemo((function(){return null==r?void 0:r.reduce((function(e,t){return t.removed||e.push({value:t.id,content:t.name,data:t}),e}),[])}),[r]);return(0,m.jsx)(h.l,{placeholder:"Select column group",value:t?[t]:[],disabled:i,options:o,onUpdate:function(e){return n(e[0])},width:"max"})}p.isEmpty=function(e){return!(null!=e&&e.length)},p.getDefaultValue=function(){};var g=n(87871),b=n(22228),y=n(29094),A=n(18801),C=n(9736),x=n(13322),S=n(43676),N=n(88787),w=["value","onChange","error"],E=(0,o.A)("ic-sortable-list-control"),j=(0,S.D)((function(e){var t=e.children;return(0,m.jsxs)("div",{className:E("drag-handle"),children:[(0,m.jsx)(N.A,{className:E("icon"),face:"solid",awesome:"list"}),t]})})),T=(0,S.Zj)((function(e){var t=e.value;return(0,m.jsx)("li",{className:E("item"),children:(0,m.jsx)(j,{children:t})})})),k=(0,S.q6)((function(e){var t=e.items;return(0,m.jsx)("ul",{className:E(),children:t.map((function(e,t){return(0,m.jsx)(T,{index:t,value:e},"item-".concat(e))}))})})),I=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).state={items:e.props.value},e.onSortEnd=function(t){var n=t.oldIndex,r=t.newIndex,i=e.props.onChange;e.setState((function(e){var t=e.items,a=(0,x.A)(t),o=a.splice(n,1),l=(0,C.A)(o,1)[0];return a.splice(r,0,l),i(a),{items:a}}))},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=(e.value,e.onChange,e.error,(0,A.A)(e,w)),n=this.state.items;return(0,m.jsx)(k,(0,i.A)((0,i.A)({},t),{},{useDragHandle:!0,items:n,onSortEnd:this.onSortEnd}))}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!Array.isArray(e)||!e.length}}])}(a.Component);I.defaultProps={extras:{}};const O=I;var R=n(17271),V=(0,o.A)("ic-bytes-control"),_=function(e){function t(){return(0,l.A)(this,t),(0,u.A)(this,t,arguments)}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props.value;return(0,m.jsx)(R.Ay,(0,i.A)((0,i.A)({className:V()},this.props),{},{value:""===e?void 0:e,format:"Bytes"}))}}],[{key:"getDefaultValue",value:function(){}},{key:"isEmpty",value:function(e){return void 0===e||""===e}}])}(a.Component);_.hasErrorRenderer=!0;var F=function(e){function t(){return(0,l.A)(this,t),(0,u.A)(this,t,arguments)}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props.value;return(0,m.jsx)(R.W9,(0,i.A)((0,i.A)({className:V()},this.props),{},{value:""===(null==e?void 0:e.value)?(0,i.A)((0,i.A)({},e),{},{value:void 0}):e}))}}],[{key:"getDefaultValue",value:function(){return{value:void 0}}},{key:"isEmpty",value:function(e){return void 0===e||""===e}},{key:"isEqual",value:function(e,t){return(null==e?void 0:e.value)===(null==t?void 0:t.value)&&(null==e?void 0:e.error)===(null==t?void 0:t.error)}},{key:"validate",value:function(e){return null!=e&&e.error?null==e?void 0:e.error:void 0}}])}(a.Component);F.hasErrorRenderer=!0;var B=n(64180),L=n(86887),D=".".charCodeAt(0),P=/\\(\\)?/g,z=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),M={},U=/[.[\]]+/,q=function(e){if(null==e||!e.length)return[];if("string"!=typeof e)throw new Error("toPath() expects a string");var t,n;return null==M[e]&&(e.endsWith("[]")?M[e]=e.split(U).filter(Boolean):M[e]=(n=[],(t=e).charCodeAt(0)===D&&n.push(""),t.replace(z,(function(e,t,r,i){var a=e;r?a=i.replace(P,"$1"):t&&(a=t.trim()),n.push(a)})),n)),M[e]},H=function(e,t){for(var n=q(t),r=e,i=0;i<n.length;i++){var a=n[i];if(null==r||"object"!=typeof r||Array.isArray(r)&&isNaN(a))return;r=r[a]}return r};function G(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var $=function e(t,n,r,i,a){if(n>=r.length)return i;var o=r[n];if(isNaN(o)){var l;if(null==t){var s,u=e(void 0,n+1,r,i,a);return void 0===u?void 0:((s={})[o]=u,s)}if(Array.isArray(t))throw new Error("Cannot set a non-numeric property on an array");var c=e(t[o],n+1,r,i,a);if(void 0===c){var d=Object.keys(t).length;if(void 0===t[o]&&0===d)return;return void 0!==t[o]&&d<=1?isNaN(r[n-1])||a?void 0:{}:(t[o],(0,L.A)(t,[o].map(G)))}return(0,B.A)({},t,((l={})[o]=c,l))}var f=Number(o);if(null==t){var v=e(void 0,n+1,r,i,a);if(void 0===v)return;var h=[];return h[f]=v,h}if(!Array.isArray(t))throw new Error("Cannot set a numeric property on an object");var m=e(t[f],n+1,r,i,a),p=[].concat(t);if(a&&void 0===m){if(p.splice(f,1),0===p.length)return}else p[f]=m;return p},W=function(e,t,n,r){if(void 0===r&&(r=!1),null==e)throw new Error("Cannot call setIn() with "+String(e)+" state");if(null==t)throw new Error("Cannot call setIn() with "+String(t)+" key");return $(e,0,q(t),n,r)},K="FINAL_FORM/form-error",Z="FINAL_FORM/array-error";function J(e,t){var n=e.errors,r=e.initialValues,i=e.lastSubmittedValues,a=e.submitErrors,o=e.submitFailed,l=e.submitSucceeded,s=e.submitting,u=e.values,c=t.active,d=t.blur,f=t.change,v=t.data,h=t.focus,m=t.modified,p=t.modifiedSinceLastSubmit,g=t.name,b=t.touched,y=t.validating,A=t.visited,C=H(u,g),x=H(n,g);x&&x[Z]&&(x=x[Z]);var S=a&&H(a,g),N=r&&H(r,g),w=t.isEqual(N,C),E=!x&&!S;return{active:c,blur:d,change:f,data:v,dirty:!w,dirtySinceLastSubmit:!(!i||t.isEqual(H(i,g),C)),error:x,focus:h,initial:N,invalid:!E,length:Array.isArray(C)?C.length:void 0,modified:m,modifiedSinceLastSubmit:p,name:g,pristine:w,submitError:S,submitFailed:o,submitSucceeded:l,submitting:s,touched:b,valid:E,value:C,visited:A,validating:y}}var Y=["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","value","visited","validating"],Q=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),a=0;a<n.length;a++){var o=n[a];if(!i(o)||e[o]!==t[o])return!1}return!0};function X(e,t,n,r,i,a){var o=!1;return i.forEach((function(i){r[i]&&(e[i]=t[i],n&&(~a.indexOf(i)?Q(t[i],n[i]):t[i]===n[i])||(o=!0))})),o}var ee=["data"],te=function(e,t,n,r){var i={blur:e.blur,change:e.change,focus:e.focus,name:e.name};return X(i,e,t,n,Y,ee)||!t||r?i:void 0},ne=["active","dirty","dirtyFields","dirtyFieldsSinceLastSubmit","dirtySinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","invalid","modified","modifiedSinceLastSubmit","pristine","submitting","submitError","submitErrors","submitFailed","submitSucceeded","touched","valid","validating","values","visited"],re=["touched","visited"];function ie(e,t,n,r){var i={};return X(i,e,t,n,ne,re)||!t||r?i:void 0}var ae=function(e){var t,n;return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t&&i.length===t.length&&!i.some((function(e,n){return!Q(t[n],e)}))||(t=i,n=e.apply(void 0,i)),n}},oe=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},le="4.20.10",se=function(e,t){return e===t},ue=function e(t){return Object.keys(t).some((function(n){var r=t[n];return!r||"object"!=typeof r||r instanceof Error?void 0!==r:e(r)}))};function ce(e,t,n,r,i,a){var o=i(n,r,t,a);return!!o&&(e(o),!0)}function de(e,t,n,r,i){var a=e.entries;Object.keys(a).forEach((function(e){var o=a[Number(e)];if(o){var l=o.subscription,s=o.subscriber,u=o.notified;ce(s,l,t,n,r,i||!u)&&(o.notified=!0)}}))}function fe(e){var t=a.useRef(void 0);return a.useEffect((function(){return t.current=e,function(){t.current=void 0}}),[e]),a.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[])}var ve=new Proxy({lang:"en"},{set:function(){throw new Error("Do not edit the config directly")}});var he=n(28325),me=["value","onChange"],pe=["children"];function ge(e){var t=e.value,n=e.onChange,r=(0,A.A)(e,me),o=(0,a.useCallback)((function(){return n(!t)}),[n,t]),l=r||{},s=l.children,u=(0,A.A)(l,pe);return(0,m.jsx)(he.S,(0,i.A)((0,i.A)({onChange:o,size:"l"},u),{},{checked:t,children:s}))}ge.getDefaultValue=function(){return!1},ge.isEmpty=function(e){return"boolean"!=typeof e||!e};var be=n(29906),ye=n(42572),Ae=n(28782),Ce=n(28407),xe=n(70232),Se=n.n(xe),Ne=n(75414),we=n.n(Ne),Ee=n(34455),je=n.n(Ee),Te=n(49339),ke=n.n(Te),Ie=n(31470),Oe=n.n(Ie),Re=n(81214),Ve=n.n(Re),_e=n(96843),Fe=n.n(_e),Be=n(27528),Le=n.n(Be),De=n(59864),Pe=n(20686),ze=(0,n(29717).withNaming)({n:"df-",e:"__",m:"_"}),Me=["render","children","component"];function Ue(e,t,n){var r=e.render,i=e.children,o=e.component,l=(0,L.A)(e,Me);if(o)return a.createElement(o,Object.assign(t,l,{children:i,render:r}));if(r)return r(void 0===i?Object.assign(t,l):Object.assign(t,l,{children:i}));if("function"!=typeof i)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+n);return i(Object.assign(t,l))}function qe(e,t,n){void 0===n&&(n=function(e,t){return e===t});var r=a.useRef(e);a.useEffect((function(){n(e,r.current)||(t(),r.current=e)}))}var He=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),a=0;a<n.length;a++){var o=n[a];if(!i(o)||e[o]!==t[o])return!1}return!0},Ge=function(e){return!(!e||"function"!=typeof e.stopPropagation)},$e=a.createContext();function We(e){var t=a.useRef(e);return a.useEffect((function(){t.current=e})),t}var Ke="6.5.8",Ze=function(e,t,n){n.forEach((function(n){Object.defineProperty(e,n,{get:function(){return t[n]},enumerable:!0})}))},Je=function(e,t){return Ze(e,t,["active","dirty","dirtyFields","dirtySinceLastSubmit","dirtyFieldsSinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","invalid","modified","modifiedSinceLastSubmit","pristine","submitError","submitErrors","submitFailed","submitSucceeded","submitting","touched","valid","validating","values","visited"])},Ye=["debug","decorators","destroyOnUnregister","form","initialValues","initialValuesEqual","keepDirtyOnReinitialize","mutators","onSubmit","subscription","validate","validateOnBlur"],Qe={"final-form":le,"react-final-form":Ke},Xe=ne.reduce((function(e,t){return e[t]=!0,e}),{});function et(e){var t,n,r=e.debug,i=e.decorators,o=void 0===i?[]:i,l=e.destroyOnUnregister,s=e.form,u=e.initialValues,c=e.initialValuesEqual,d=e.keepDirtyOnReinitialize,f=e.mutators,v=e.onSubmit,h=e.subscription,m=void 0===h?Xe:h,p=e.validate,g=e.validateOnBlur,b=(0,L.A)(e,Ye),y={debug:r,destroyOnUnregister:l,initialValues:u,keepDirtyOnReinitialize:d,mutators:f,onSubmit:v,validate:p,validateOnBlur:g},A=(t=function(){var e=s||function(e){if(!e)throw new Error("No config specified");var t=e.debug,n=e.destroyOnUnregister,r=e.keepDirtyOnReinitialize,i=e.initialValues,a=e.mutators,o=e.onSubmit,l=e.validate,s=e.validateOnBlur;if(!o)throw new Error("No onSubmit function specified");var u={subscribers:{index:0,entries:{}},fieldSubscribers:{},fields:{},formState:{asyncErrors:{},dirtySinceLastSubmit:!1,modifiedSinceLastSubmit:!1,errors:{},initialValues:i&&(0,B.A)({},i),invalid:!1,pristine:!0,submitting:!1,submitFailed:!1,submitSucceeded:!1,resetWhileSubmitting:!1,valid:!0,validating:0,values:i?(0,B.A)({},i):{}},lastFormState:void 0},c=0,d=!1,f=!1,v=!1,h=0,m={},p=function(e,t,n){var r=n(H(e.formState.values,t));e.formState.values=W(e.formState.values,t,r)||{}},g=function(e,t,n){if(e.fields[t]){var r,i;e.fields=(0,B.A)({},e.fields,((r={})[n]=(0,B.A)({},e.fields[t],{name:n,blur:function(){return k.blur(n)},change:function(e){return k.change(n,e)},focus:function(){return k.focus(n)},lastFieldState:void 0}),r)),delete e.fields[t],e.fieldSubscribers=(0,B.A)({},e.fieldSubscribers,((i={})[n]=e.fieldSubscribers[t],i)),delete e.fieldSubscribers[t];var a=H(e.formState.values,t);e.formState.values=W(e.formState.values,t,void 0)||{},e.formState.values=W(e.formState.values,n,a),delete e.lastFormState}},b=function(e){return function(){if(a){for(var t={formState:u.formState,fields:u.fields,fieldSubscribers:u.fieldSubscribers,lastFormState:u.lastFormState},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=a[e](r,t,{changeValue:p,getIn:H,renameField:g,resetFieldState:k.resetFieldState,setIn:W,shallowEqual:Q});return u.formState=t.formState,u.fields=t.fields,u.fieldSubscribers=t.fieldSubscribers,u.lastFormState=t.lastFormState,C(void 0,(function(){x(),j()})),o}}},y=a?Object.keys(a).reduce((function(e,t){return e[t]=b(t),e}),{}):{},A=function(e){return Object.keys(e.validators).reduce((function(t,n){var r=e.validators[Number(n)]();return r&&t.push(r),t}),[])},C=function(e,t){if(d)return f=!0,void t();var n=u.fields,r=u.formState,i=(0,B.A)({},n),a=Object.keys(i);if(l||a.some((function(e){return A(i[e]).length}))){var o=!1;if(e){var s=i[e];if(s){var c=s.validateFields;c&&(o=!0,a=c.length?c.concat(e):[e])}}var v,p={},g={},b={},y=[].concat(function(e){var t=[];if(l){var n=l((0,B.A)({},u.formState.values));oe(n)?t.push(n.then((function(t){return e(t,!0)}))):e(n,!1)}return t}((function(e,t){t?g=e||{}:p=e||{}})),a.reduce((function(e,t){return e.concat(function(e,t){var n,r=[],i=A(e);return i.length&&(i.forEach((function(i){var a=i(H(u.formState.values,e.name),u.formState.values,0===i.length||3===i.length?J(u.formState,u.fields[e.name]):void 0);if(a&&oe(a)){e.validating=!0;var o=a.then((function(n){u.fields[e.name]&&(u.fields[e.name].validating=!1,t(n))}));r.push(o)}else n||(n=a)})),t(n)),r}(n[t],(function(e){b[t]=e})))}),[])),C=y.length>0,x=++h,S=Promise.all(y).then((v=x,function(e){return delete m[v],e}));C&&(m[x]=S);var N=function(e){var t=(0,B.A)({},o?r.errors:{},p,e?g:r.asyncErrors),s=function(e){a.forEach((function(r){if(n[r]){var a=H(p,r),s=H(t,r),u=A(i[r]).length,c=b[r];e(r,u&&c||l&&a||(a||o?void 0:s))}}))};s((function(e,n){t=W(t,e,n)||{}})),s((function(e,n){if(n&&n[Z]){var r=H(t,e),i=[].concat(r);i[Z]=n[Z],t=W(t,e,i)}})),Q(r.errors,t)||(r.errors=t),e&&(r.asyncErrors=g),r.error=p[K]};if(C&&(u.formState.validating++,t()),N(!1),t(),C){var w=function(){u.formState.validating--,t(),0===u.formState.validating&&u.lastFormState.validating&&j()};S.then((function(){h>x||N(!0)})).then(w,w)}}else t()},x=function(e){if(!c){var t=u.fields,n=u.fieldSubscribers,r=u.formState,i=(0,B.A)({},t),a=function(e){var t=i[e],a=J(r,t),o=t.lastFieldState;t.lastFieldState=a;var l=n[e];l&&de(l,a,o,te,void 0===o)};e?a(e):Object.keys(i).forEach(a)}},S=function(){Object.keys(u.fields).forEach((function(e){u.fields[e].touched=!0}))},N=function(){var e=u.fields,t=u.formState,n=u.lastFormState,r=(0,B.A)({},e),i=Object.keys(r),a=!1,o=i.reduce((function(e,n){return!r[n].isEqual(H(t.values,n),H(t.initialValues||{},n))&&(a=!0,e[n]=!0),e}),{}),l=i.reduce((function(e,n){var i=t.lastSubmittedValues||{};return r[n].isEqual(H(t.values,n),H(i,n))||(e[n]=!0),e}),{});t.pristine=!a,t.dirtySinceLastSubmit=!(!t.lastSubmittedValues||!Object.values(l).some((function(e){return e}))),t.modifiedSinceLastSubmit=!(!t.lastSubmittedValues||!Object.keys(r).some((function(e){return r[e].modifiedSinceLastSubmit}))),t.valid=!(t.error||t.submitError||ue(t.errors)||t.submitErrors&&ue(t.submitErrors));var s=function(e){var t=e.active,n=e.dirtySinceLastSubmit,r=e.modifiedSinceLastSubmit,i=e.error,a=e.errors,o=e.initialValues,l=e.pristine,s=e.submitting,u=e.submitFailed,c=e.submitSucceeded,d=e.submitError,f=e.submitErrors,v=e.valid,h=e.validating,m=e.values;return{active:t,dirty:!l,dirtySinceLastSubmit:n,modifiedSinceLastSubmit:r,error:i,errors:a,hasSubmitErrors:!!(d||f&&ue(f)),hasValidationErrors:!(!i&&!ue(a)),invalid:!v,initialValues:o,pristine:l,submitting:s,submitFailed:u,submitSucceeded:c,submitError:d,submitErrors:f,valid:v,validating:h>0,values:m}}(t),c=i.reduce((function(e,t){return e.modified[t]=r[t].modified,e.touched[t]=r[t].touched,e.visited[t]=r[t].visited,e}),{modified:{},touched:{},visited:{}}),d=c.modified,f=c.touched,v=c.visited;return s.dirtyFields=n&&Q(n.dirtyFields,o)?n.dirtyFields:o,s.dirtyFieldsSinceLastSubmit=n&&Q(n.dirtyFieldsSinceLastSubmit,l)?n.dirtyFieldsSinceLastSubmit:l,s.modified=n&&Q(n.modified,d)?n.modified:d,s.touched=n&&Q(n.touched,f)?n.touched:f,s.visited=n&&Q(n.visited,v)?n.visited:v,n&&Q(n,s)?n:s},w=!1,E=!1,j=function e(){if(w)E=!0;else{if(w=!0,t&&t(N(),Object.keys(u.fields).reduce((function(e,t){return e[t]=u.fields[t],e}),{})),!(c||d&&v)){var n=u.lastFormState,r=N();r!==n&&(u.lastFormState=r,de(u.subscribers,r,n,ie))}w=!1,E&&(E=!1,e())}},T=function(){return Object.keys(u.fields).forEach((function(e){return u.fields[e].modifiedSinceLastSubmit=!1}))};C(void 0,(function(){j()}));var k={batch:function(e){c++,e(),c--,x(),j()},blur:function(e){var t=u.fields,n=u.formState,r=t[e];r&&(delete n.active,t[e]=(0,B.A)({},r,{active:!1,touched:!0}),s?C(e,(function(){x(),j()})):(x(),j()))},change:function(e,t){var n=u.fields,r=u.formState;if(H(r.values,e)!==t){p(u,e,(function(){return t}));var i=n[e];i&&(n[e]=(0,B.A)({},i,{modified:!0,modifiedSinceLastSubmit:!!r.lastSubmittedValues})),s?(x(),j()):C(e,(function(){x(),j()}))}},get destroyOnUnregister(){return!!n},set destroyOnUnregister(e){n=e},focus:function(e){var t=u.fields[e];t&&!t.active&&(u.formState.active=e,t.active=!0,t.visited=!0,x(),j())},mutators:y,getFieldState:function(e){var t=u.fields[e];return t&&t.lastFieldState},getRegisteredFields:function(){return Object.keys(u.fields)},getState:function(){return N()},initialize:function(e){var t=u.fields,n=u.formState,i=(0,B.A)({},t),a="function"==typeof e?e(n.values):e;r||(n.values=a);var o=r?Object.keys(i).reduce((function(e,t){return i[t].isEqual(H(n.values,t),H(n.initialValues||{},t))||(e[t]=H(n.values,t)),e}),{}):{};n.initialValues=a,n.values=a,Object.keys(o).forEach((function(e){n.values=W(n.values,e,o[e])||{}})),C(void 0,(function(){x(),j()}))},isValidationPaused:function(){return d},pauseValidation:function(e){void 0===e&&(e=!0),d=!0,v=e},registerField:function(e,t,r,i){void 0===r&&(r={}),u.fieldSubscribers[e]||(u.fieldSubscribers[e]={index:0,entries:{}});var a=u.fieldSubscribers[e].index++;u.fieldSubscribers[e].entries[a]={subscriber:ae(t),subscription:r,notified:!1};var o=u.fields[e]||{active:!1,afterSubmit:i&&i.afterSubmit,beforeSubmit:i&&i.beforeSubmit,data:i&&i.data||{},isEqual:i&&i.isEqual||se,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:e,touched:!1,valid:!0,validateFields:i&&i.validateFields,validators:{},validating:!1,visited:!1};o.blur=o.blur||function(){return k.blur(e)},o.change=o.change||function(t){return k.change(e,t)},o.focus=o.focus||function(){return k.focus(e)},u.fields[e]=o;var l=!1,s=i&&i.silent,c=function(){s&&u.fields[e]?x(e):(j(),x())};if(i){l=!(!i.getValidator||!i.getValidator()),i.getValidator&&(u.fields[e].validators[a]=i.getValidator);var d=void 0===H(u.formState.values,e);void 0===i.initialValue||!d&&H(u.formState.values,e)!==H(u.formState.initialValues,e)||(u.formState.initialValues=W(u.formState.initialValues||{},e,i.initialValue),u.formState.values=W(u.formState.values,e,i.initialValue),C(void 0,c)),void 0!==i.defaultValue&&void 0===i.initialValue&&void 0===H(u.formState.initialValues,e)&&d&&(u.formState.values=W(u.formState.values,e,i.defaultValue))}return l?C(void 0,c):c(),function(){var t=!1;u.fields[e]&&(t=!(!u.fields[e].validators[a]||!u.fields[e].validators[a]()),delete u.fields[e].validators[a]);var r=!!u.fieldSubscribers[e];r&&delete u.fieldSubscribers[e].entries[a];var i=r&&!Object.keys(u.fieldSubscribers[e].entries).length;i&&(delete u.fieldSubscribers[e],delete u.fields[e],t&&(u.formState.errors=W(u.formState.errors,e,void 0)||{}),n&&(u.formState.values=W(u.formState.values,e,void 0,!0)||{})),s||(t?C(void 0,(function(){j(),x()})):i&&j())}},reset:function(e){void 0===e&&(e=u.formState.initialValues),u.formState.submitting&&(u.formState.resetWhileSubmitting=!0),u.formState.submitFailed=!1,u.formState.submitSucceeded=!1,delete u.formState.submitError,delete u.formState.submitErrors,delete u.formState.lastSubmittedValues,k.initialize(e||{})},resetFieldState:function(e){u.fields[e]=(0,B.A)({},u.fields[e],{active:!1,lastFieldState:void 0,modified:!1,touched:!1,valid:!0,validating:!1,visited:!1}),C(void 0,(function(){x(),j()}))},restart:function(e){void 0===e&&(e=u.formState.initialValues),k.batch((function(){for(var t in u.fields)k.resetFieldState(t),u.fields[t]=(0,B.A)({},u.fields[t],{active:!1,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,touched:!1,valid:!0,validating:!1,visited:!1});k.reset(e)}))},resumeValidation:function(){d=!1,v=!1,f&&C(void 0,(function(){x(),j()})),f=!1},setConfig:function(e,i){switch(e){case"debug":t=i;break;case"destroyOnUnregister":n=i;break;case"initialValues":k.initialize(i);break;case"keepDirtyOnReinitialize":r=i;break;case"mutators":a=i,i?(Object.keys(y).forEach((function(e){e in i||delete y[e]})),Object.keys(i).forEach((function(e){y[e]=b(e)}))):Object.keys(y).forEach((function(e){delete y[e]}));break;case"onSubmit":o=i;break;case"validate":l=i,C(void 0,(function(){x(),j()}));break;case"validateOnBlur":s=i;break;default:throw new Error("Unrecognised option "+e)}},submit:function(){var e=u.formState;if(!e.submitting){if(delete e.submitErrors,delete e.submitError,e.lastSubmittedValues=(0,B.A)({},e.values),u.formState.error||ue(u.formState.errors))return S(),T(),u.formState.submitFailed=!0,j(),void x();var t=Object.keys(m);if(t.length)Promise.all(t.map((function(e){return m[Number(e)]}))).then(k.submit,console.error);else if(!Object.keys(u.fields).some((function(e){return u.fields[e].beforeSubmit&&!1===u.fields[e].beforeSubmit()}))){var n,r=!1,i=function(t){e.submitting=!1;var i=e.resetWhileSubmitting;return i&&(e.resetWhileSubmitting=!1),t&&ue(t)?(e.submitFailed=!0,e.submitSucceeded=!1,e.submitErrors=t,e.submitError=t[K],S()):(i||(e.submitFailed=!1,e.submitSucceeded=!0),Object.keys(u.fields).forEach((function(e){return u.fields[e].afterSubmit&&u.fields[e].afterSubmit()}))),j(),x(),r=!0,n&&n(t),t};e.submitting=!0,e.submitFailed=!1,e.submitSucceeded=!1,e.lastSubmittedValues=(0,B.A)({},e.values),T();var a=o(e.values,k,i);if(!r){if(a&&oe(a))return j(),x(),a.then(i,(function(e){throw i(),e}));if(o.length>=3)return j(),x(),new Promise((function(e){n=e}));i(a)}}}},subscribe:function(e,t){if(!e)throw new Error("No callback given.");if(!t)throw new Error("No subscription provided. What values do you want to listen to?");var n=ae(e),r=u.subscribers,i=r.index++;r.entries[i]={subscriber:n,subscription:t,notified:!1};var a=N();return ce(n,t,a,a,ie,!0),function(){delete r.entries[i]}}};return k}(y);return e.pauseValidation(),e},(n=a.useRef()).current||(n.current=t()),n.current),C=a.useState((function(){var e={};return A.subscribe((function(t){e=t}),m)(),e})),x=C[0],S=C[1],N=We(x);a.useEffect((function(){A.isValidationPaused()&&A.resumeValidation();var e=[A.subscribe((function(e){He(e,N.current)||S(e)}),m)].concat(o?o.map((function(e){return e(A)})):[]);return function(){A.pauseValidation(),e.reverse().forEach((function(e){return e()}))}}),o),qe(r,(function(){A.setConfig("debug",r)})),qe(l,(function(){A.destroyOnUnregister=!!l})),qe(d,(function(){A.setConfig("keepDirtyOnReinitialize",d)})),qe(u,(function(){A.setConfig("initialValues",u)}),c||He),qe(f,(function(){A.setConfig("mutators",f)})),qe(v,(function(){A.setConfig("onSubmit",v)})),qe(p,(function(){A.setConfig("validate",p)})),qe(g,(function(){A.setConfig("validateOnBlur",g)}));var w={form:(0,B.A)({},A,{reset:function(e){Ge(e)?A.reset():A.reset(e)}}),handleSubmit:function(e){return e&&("function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()),A.submit()}};return Je(w,x),a.createElement($e.Provider,{value:A},Ue((0,B.A)({},b,{__versions:Qe}),w,"ReactFinalForm"))}function tt(e){var t=a.useContext($e);if(!t)throw new Error((e||"useForm")+" must be used inside of a <Form> component");return t}var nt=["onChange","subscription"];function rt(e){var t=e.onChange,n=e.subscription,r=(0,L.A)(e,nt),i=tt("FormSpy"),o=function(e){var t=void 0===e?{}:e,n=t.onChange,r=t.subscription,i=void 0===r?Xe:r,o=tt("useFormState"),l=a.useRef(!0),s=a.useRef(n);s.current=n;var u=a.useState((function(){var e={};return o.subscribe((function(t){e=t}),i)(),n&&n(e),e})),c=u[0],d=u[1];a.useEffect((function(){return o.subscribe((function(e){l.current?l.current=!1:(d(e),s.current&&s.current(e))}),i)}),[]);var f={};return Je(f,c),f}({onChange:t,subscription:n});if(t)return null;var l={form:(0,B.A)({},i,{reset:function(e){Ge(e)?i.reset():i.reset(e)}})};return Ue((0,B.A)({},r,l),o,"FormSpy")}var it="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;function at(e){var t=a.useRef(e);return a.useEffect((function(){t.current=e})),a.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(null,n)}),[])}var ot=Y.reduce((function(e,t){return e[t]=!0,e}),{}),lt=function(e,t){return void 0===e?"":e},st=function(e,t){return""===e?void 0:e},ut=function(e,t){return e===t};function ct(e,t){void 0===t&&(t={});var n=t,r=n.afterSubmit,i=n.allowNull,o=n.component,l=n.data,s=n.defaultValue,u=n.format,c=void 0===u?lt:u,d=n.formatOnBlur,f=n.initialValue,v=n.multiple,h=n.parse,m=void 0===h?st:h,p=n.subscription,g=void 0===p?ot:p,b=n.type,y=n.validateFields,A=n.value,C=tt("useField"),x=We(t),S=function(t,n){return C.registerField(e,t,g,{afterSubmit:r,beforeSubmit:function(){var t=x.current,n=t.beforeSubmit,r=t.formatOnBlur,i=t.format,a=void 0===i?lt:i;if(r){var o=C.getFieldState(e).value,l=a(o,e);l!==o&&C.change(e,l)}return n&&n()},data:l,defaultValue:s,getValidator:function(){return x.current.validate},initialValue:f,isEqual:function(e,t){return(x.current.isEqual||ut)(e,t)},silent:n,validateFields:y})},N=a.useRef(!0),w=a.useState((function(){var e={},t=C.destroyOnUnregister;return C.destroyOnUnregister=!1,S((function(t){e=t}),!0)(),C.destroyOnUnregister=t,e})),E=w[0],j=w[1];a.useEffect((function(){return S((function(e){N.current?N.current=!1:j(e)}),!1)}),[e,l,s,f]);var T={};!function(e,t){Ze(e,t,["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","validating","visited"])}(T,E);var k={name:e,get value(){var t=E.value;return d?"input"===o&&(t=lt(t)):t=c(t,e),null!==t||i||(t=""),"checkbox"===b||"radio"===b?A:"select"===o&&v?t||[]:t},get checked(){var t=E.value;return"checkbox"===b?(t=c(t,e),void 0===A?!!t:!(!Array.isArray(t)||!~t.indexOf(A))):"radio"===b?c(t,e)===A:void 0},onBlur:at((function(e){if(E.blur(),d){var t=C.getFieldState(E.name);E.change(c(t.value,E.name))}})),onChange:at((function(t){var n=t&&t.target?function(e,t,n,r){if(!r&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(r&&e.nativeEvent)return e.nativeEvent.text;var i=e.target,a=i.type,o=i.value,l=i.checked;switch(a){case"checkbox":if(void 0!==n){if(l)return Array.isArray(t)?t.concat(n):[n];if(!Array.isArray(t))return t;var s=t.indexOf(n);return s<0?t:t.slice(0,s).concat(t.slice(s+1))}return!!l;case"select-multiple":return function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t}(e.target.options);default:return o}}(t,E.value,A,it):t;E.change(m(n,e))})),onFocus:at((function(e){return E.focus()}))};return v&&(k.multiple=v),void 0!==b&&(k.type=b),{input:k,meta:T}}var dt=["afterSubmit","allowNull","beforeSubmit","children","component","data","defaultValue","format","formatOnBlur","initialValue","isEqual","multiple","name","parse","subscription","type","validate","validateFields","value"],ft=a.forwardRef((function(e,t){var n=e.afterSubmit,r=e.allowNull,i=e.beforeSubmit,o=e.children,l=e.component,s=e.data,u=e.defaultValue,c=e.format,d=e.formatOnBlur,f=e.initialValue,v=e.isEqual,h=e.multiple,m=e.name,p=e.parse,g=e.subscription,b=e.type,y=e.validate,A=e.validateFields,C=e.value,x=(0,L.A)(e,dt),S=ct(m,{afterSubmit:n,allowNull:r,beforeSubmit:i,children:o,component:l,data:s,defaultValue:u,format:c,formatOnBlur:d,initialValue:f,isEqual:v,multiple:h,parse:p,subscription:g,type:b,validate:y,validateFields:A,value:C});if("function"==typeof o)return o((0,B.A)({},S,x));if("string"==typeof l)return a.createElement(l,(0,B.A)({},S.input,{children:o,ref:t},x));if(!m)throw new Error("prop name cannot be undefined in <Field> component");return Ue((0,B.A)({children:o,component:l,ref:t},x),S,"Field("+m+")")}));function vt(){return vt=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},vt.apply(this,arguments)}function ht(e,t,n,r){n[r]=vt({},e[t],{name:r,change:e[r]&&e[r].change,blur:e[r]&&e[r].blur,focus:e[r]&&e[r].focus,lastFieldState:void 0}),n[r].change||delete n[r].change,n[r].blur||delete n[r].blur,n[r].focus||delete n[r].focus}var mt=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},pt=function(e,t,n){var r=e[0],i=e[1],a=e[2];(0,n.changeValue)(t,r,(function(e){var t=[].concat(e||[]);return t.splice(i,0,a),t}));var o=new RegExp("^"+mt(r)+"\\[(\\d+)\\](.*)"),l={};Object.keys(t.fields).forEach((function(e){var n=o.exec(e);if(n){var a=Number(n[1]);if(a>=i){var s=r+"["+(a+1)+"]"+n[2];return void ht(t.fields,e,l,s)}}l[e]=t.fields[e]})),t.fields=l},gt=function(e,t,n){var r,i=e[0],a=e[1],o=n.changeValue,l=n.getIn,s=n.setIn;o(t,i,(function(e){if(!e)return e;var t=[].concat(e);return r=t[a],t.splice(a,1),t.length>0?t:void 0}));var u=new RegExp("^"+mt(i)+"\\[(\\d+)\\](.*)"),c={};return Object.keys(t.fields).forEach((function(e){var n=u.exec(e);if(n){var r=Number(n[1]);if(r===a){if(e===i+"["+a+"]"){var o="formState.submitErrors."+i,d=l(t,o);Array.isArray(d)&&(d.splice(a,1),t=s(t,o,d))}return}if(r>a){var f=i+"["+(r-1)+"]"+n[2];return void ht(t.fields,e,c,f)}}c[e]=t.fields[e]})),t.fields=c,r},bt={insert:pt,concat:function(e,t,n){var r=e[0],i=e[1];(0,n.changeValue)(t,r,(function(e){return e?[].concat(e,i):i}))},move:function(e,t,n){var r=e[0],i=e[1],a=e[2],o=n.changeValue;if(i!==a){o(t,r,(function(e){var t=[].concat(e||[]),n=t[i];return t.splice(i,1),t.splice(a,0,n),t}));var l,s,u,c={},d=new RegExp("^"+mt(r)+"\\[(\\d+)\\](.*)");i>a?(l=a,s=i,u=1):(l=i,s=a,u=-1),Object.keys(t.fields).forEach((function(e){var n=d.exec(e);if(n){var o=Number(n[1]);if(o===i){var f=r+"["+a+"]"+n[2];return void ht(t.fields,e,c,f)}if(l<=o&&o<=s){var v=r+"["+(o+u)+"]"+n[2];return void ht(t.fields,e,c,v)}}c[e]=t.fields[e]})),t.fields=c}},pop:function(e,t,n){var r=e[0],i=(0,n.getIn)(t.formState.values,r);return i&&i.length>0?gt([r,i.length-1],t,n):void 0},push:function(e,t,n){var r=e[0],i=e[1];(0,n.changeValue)(t,r,(function(e){return e?[].concat(e,[i]):[i]}))},remove:gt,removeBatch:function(e,t,n){var r=e[0],i=e[1],a=n.changeValue;if(0===i.length)return[];var o=[].concat(i);o.sort();for(var l=o.length-1;l>0;l-=1)o[l]===o[l-1]&&o.splice(l,1);var s=[];a(t,r,(function(e){if(s=i.map((function(t){return e&&e[t]})),!e)return e;for(var t=[].concat(e),n=o.length-1;n>=0;n-=1){var r=o[n];t.splice(r,1)}return t.length>0?t:void 0}));var u=new RegExp("^"+mt(r)+"\\[(\\d+)\\](.*)"),c={};return Object.keys(t.fields).forEach((function(e){var n=u.exec(e);if(n){var i=Number(n[1]),a=function(e,t){for(var n=0,r=e.length-1,i=0;n<=r;){if(e[i=Math.floor((n+r)/2)]===t)return i;e[i]>t?r=i-1:n=i+1}return~n}(o,i);if(a>=0)return;if(i>o[0]){var l=r+"["+(i-~a)+"]"+n[2];return void ht(t.fields,e,c,l)}}c[e]=t.fields[e]})),t.fields=c,s},shift:function(e,t,n){var r=e[0];return gt([r,0],t,n)},swap:function(e,t,n){var r=e[0],i=e[1],a=e[2],o=n.changeValue;if(i!==a){o(t,r,(function(e){var t=[].concat(e||[]),n=t[i];return t[i]=t[a],t[a]=n,t}));var l=r+"["+i+"]",s=r+"["+a+"]",u={};Object.keys(t.fields).forEach((function(e){if(e.substring(0,l.length)===l){var n=e.substring(l.length),r=s+n;ht(t.fields,e,u,r)}else if(e.substring(0,s.length)===s){var i=e.substring(s.length),a=l+i;ht(t.fields,e,u,a)}else u[e]=t.fields[e]})),t.fields=u}},unshift:function(e,t,n){var r=e[0],i=e[1];return pt([r,0,i],t,n)},update:function(e,t,n){var r=e[0],i=e[1],a=e[2];(0,n.changeValue)(t,r,(function(e){var t=[].concat(e||[]);return t.splice(i,1,a),t}))}};const yt=bt;var At=["render","children","component"],Ct=function(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&!e.some((function(e,n){return e!==t[n]}))},xt=["length"],St=["meta","input"],Nt=Y.reduce((function(e,t){return e[t]=!0,e}),{}),wt=["name","subscription","defaultValue","initialValue","isEqual","validate"],Et={"final-form":le,"react-final-form":Ke,"react-final-form-arrays":"3.1.3"},jt=function(e){var t=e.name,n=e.subscription,r=e.defaultValue,i=e.initialValue,o=e.isEqual,l=e.validate,s=(0,L.A)(e,wt),u=function(e,t){var n=void 0===t?{}:t,r=n.subscription,i=void 0===r?Nt:r,o=n.defaultValue,l=n.initialValue,s=n.isEqual,u=void 0===s?Ct:s,c=n.validate,d=tt("useFieldArray").mutators;if(!(d&&d.push&&d.pop))throw new Error("Array mutators not found. You need to provide the mutators from final-form-arrays to your form");var f,v,h=(0,a.useMemo)((function(){return Object.keys(d).reduce((function(t,n){return t[n]=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return d[n].apply(d,[e].concat(r))},t}),{})}),[e,d]),m=(f=function(){return function(e,t,n){if(c){var r=c(e,t,n);if(!r||Array.isArray(r))return r;var i=[];return i[Z]=r,i}}},(v=a.useRef()).current||(v.current=f()),v.current),p=ct(e,{subscription:(0,B.A)({},i,{length:!0}),defaultValue:o,initialValue:l,isEqual:u,validate:m,format:function(e){return e}}),g=p.meta,b=g.length,y=(0,L.A)(g,xt),A=p.input,C=(0,L.A)(p,St);return{fields:(0,B.A)({name:e,forEach:function(t){for(var n=b||0,r=0;r<n;r++)t(e+"["+r+"]",r)},length:b||0,map:function(t){for(var n=b||0,r=[],i=0;i<n;i++)r.push(t(e+"["+i+"]",i));return r}},h,C,{value:A.value}),meta:y}}(t,{subscription:n,defaultValue:r,initialValue:i,isEqual:o,validate:l}),c=u.fields,d=u.meta;return function(e,t){var n=e.render,r=e.children,i=e.component,o=(0,L.A)(e,At);if(i)return a.createElement(i,(0,B.A)({},o,{children:r,render:n}));if(n)return n(void 0===r?o:(0,B.A)({},o,{children:r}));if("function"!=typeof r)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+t);return r(o)}((0,B.A)({fields:c,meta:(0,B.A)({},d,{__versions:Et})},s),"FieldArray("+t+")")},Tt=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},kt=function(e,t){return e===t};const It=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var n={};return e.subscribe((function(r){var i=r.values;e.batch((function(){var r=function(t,r,a){var o=i&&H(i,t),l=n&&H(n,t);if(!r(o,l))if("function"==typeof a){var s=a(o,t,i,n);Tt(s)?s.then((function(t){Object.keys(t).forEach((function(n){e.change(n,t[n])}))})):Object.keys(s).forEach((function(t){e.change(t,s[t])}))}else Object.keys(a).forEach((function(t){var r=(0,a[t])(o,i,n);Tt(r)?r.then((function(n){e.change(t,n)})):e.change(t,r)}))},a=e.getRegisteredFields();t.forEach((function(e){var t=e.field,n=e.isEqual,i=e.updates;if("string"==typeof t)r(t,n||kt,i);else{var o=Array.isArray(t)?function(e){return~t.indexOf(e)||-1!==t.findIndex((function(t){return t instanceof RegExp&&t.test(e)}))}:function(e){return t.test(e)};a.forEach((function(e){o(e)&&r(e,n||kt,i)}))}})),n=i}))}),{values:!0})}};function Ot(){return Ot=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},Ot.apply(this,arguments)}var Rt=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={previous:t.input.value},n}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var i=t.prototype;return i.componentDidUpdate=function(){var e=this.props,t=e.children,n=e.input.value,r=this.state.previous;n!==r&&(this.setState({previous:n}),t(n,r))},i.render=function(){return null},t}(a.Component),Vt=function(e){var t=e.name,n=e.children;return(0,a.createElement)(ft,{name:t,subscription:{value:!0},allowNull:!0,render:function(e){return(0,a.createElement)(Rt,Ot({},e,{children:n}))}})};function _t(e){return(0,m.jsxs)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,m.jsx)("rect",{opacity:"0.01",width:"24",height:"24",fill:"none"}),(0,m.jsx)("path",{d:"M6.5 6.5L17.5 17.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M17.5 6.5L6.5 17.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}))}function Ft(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M3.713 9a.75.75 0 0 1-.697-1.026l1.862-4.705a.75.75 0 0 1 1.318-.145l.9 1.328a9 9 0 1 1-3.939 9.234 1 1 0 0 1 1.966-.373 7 7 0 1 0 3.096-7.205l1.167 1.721A.75.75 0 0 1 8.766 9H3.712z"})}))}function Bt(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,m.jsx)("path",{d:"M7.08594 6.30469C7.0625 6.23438 7.08594 6.16406 7.15625 6.09375C7.20312 6.04688 7.27344 6 7.36719 6H8.63281C8.70312 6 8.77344 6.04688 8.84375 6.09375C8.89062 6.16406 8.91406 6.23438 8.91406 6.30469L8.77344 8.92969C8.75 9 8.70312 9.07031 8.65625 9.11719C8.60938 9.16406 8.53906 9.1875 8.49219 9.1875H7.50781C7.4375 9.1875 7.36719 9.16406 7.32031 9.11719C7.27344 9.07031 7.22656 9 7.22656 8.92969L7.08594 6.30469ZM8.98438 10.5C8.98438 10.2422 8.86719 10.0078 8.67969 9.82031C8.49219 9.63281 8.25781 9.51562 8 9.51562C7.71875 9.51562 7.48438 9.63281 7.29688 9.82031C7.10938 10.0078 7.01562 10.2422 7.01562 10.5C7.01562 10.7812 7.10938 11.0156 7.29688 11.2031C7.48438 11.3906 7.71875 11.4844 8 11.4844C8.25781 11.4844 8.49219 11.3906 8.67969 11.2031C8.86719 11.0156 8.98438 10.7812 8.98438 10.5ZM8.98438 2.0625L14.6094 11.8125C14.7266 12.0703 14.7734 12.3281 14.7266 12.5859C14.6797 12.8438 14.5391 13.0547 14.3516 13.2422C14.1406 13.4297 13.9062 13.5 13.625 13.5H2.375C2.09375 13.5 1.83594 13.4297 1.64844 13.2422C1.4375 13.0547 1.32031 12.8438 1.27344 12.5859C1.22656 12.3281 1.25 12.0703 1.39062 11.8125L7.01562 2.0625C7.15625 1.82812 7.34375 1.66406 7.60156 1.57031C7.85938 1.47656 8.11719 1.47656 8.375 1.57031C8.63281 1.66406 8.84375 1.82812 8.98438 2.0625ZM2.49219 12.1641C2.44531 12.2109 2.44531 12.2578 2.49219 12.3047C2.51562 12.3516 2.5625 12.375 2.60938 12.375H13.3906C13.4375 12.375 13.4609 12.3516 13.5078 12.3047C13.5312 12.2578 13.5312 12.2109 13.5078 12.1641L8.11719 2.83594C8.07031 2.78906 8.04688 2.76562 8 2.76562C7.95312 2.76562 7.90625 2.78906 7.88281 2.83594L2.49219 12.1641Z",fill:"#FF0400",fillOpacity:"0.5"})}))}function Lt(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,m.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M7.54268 14.6625C7.3269 14.644 7.11187 14.6178 6.89798 14.5839C3.9426 14.09 1.67759 11.6887 1.35703 8.70957C1.3237 8.42756 1.3237 7.57085 1.35703 7.2895C1.54171 5.74409 2.17174 4.41136 3.22846 3.32997C4.31451 2.21991 5.69592 1.54855 7.28866 1.35854C7.57001 1.3252 8.42739 1.3252 8.70873 1.35854C10.3015 1.54855 11.6829 2.21991 12.7689 3.32997C13.8257 4.41136 14.4557 5.74342 14.6404 7.28883C14.6737 7.57085 14.6737 8.42756 14.6404 8.70891C14.4557 10.2543 13.8257 11.5877 12.7689 12.6684C11.6849 13.7765 10.2981 14.4512 8.7154 14.6392C8.32477 14.6635 7.93329 14.6713 7.54201 14.6625H7.54268ZM7.63388 13.3299C7.46126 13.3151 7.28923 13.2941 7.11812 13.267C4.75382 12.8719 2.94181 10.9509 2.68537 8.5676C2.6587 8.342 2.6587 7.65664 2.68537 7.43156C2.83311 6.19526 3.33713 5.12909 4.18251 4.26399C5.05135 3.37596 6.15647 2.83888 7.43067 2.68687C7.65575 2.6602 8.34165 2.6602 8.56673 2.68687C9.84092 2.83888 10.946 3.37596 11.8149 4.26399C12.6603 5.12909 13.1643 6.19472 13.312 7.43103C13.3387 7.65664 13.3387 8.342 13.312 8.56707C13.1643 9.80338 12.6603 10.8701 11.8149 11.7346C10.9476 12.6211 9.83826 13.1608 8.57206 13.3112C8.25956 13.3307 7.94637 13.3369 7.63335 13.3299H7.63388ZM8.83236 9.3352V6.66854H7.16436V12.0019H8.83236V9.3352ZM8.20036 5.6312C8.4837 5.56387 8.72503 5.32387 8.80036 5.0332C8.82636 4.93254 8.82636 4.73054 8.80036 4.6292C8.72225 4.33618 8.49338 4.10732 8.20036 4.0292C8.15636 4.01854 8.06836 4.0092 7.99836 4.0092C7.76236 4.0092 7.58436 4.0832 7.41703 4.25054C7.25746 4.40072 7.17006 4.61219 7.17703 4.8312C7.17703 5.05454 7.24903 5.23854 7.39903 5.39654C7.61036 5.61854 7.89903 5.7032 8.20036 5.6312Z"})}))}function Dt(e){return(0,m.jsxs)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.10067 13.1764L7.25321 2.41823C7.57211 1.86059 8.4284 1.86059 8.74642 2.41823L14.899 13.1764C15.2002 13.7023 14.7915 14.3375 14.1528 14.3375H1.84772C1.20815 14.3375 0.800269 13.7023 1.10067 13.1764Z",fill:"var(--g-color-base-warning-heavy)"}),(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.87908 9.43224C8.87908 9.70838 8.65523 9.93224 8.37908 9.93224H7.61719C7.34105 9.93224 7.11719 9.70838 7.11719 9.43224V6.55078C7.11719 6.27464 7.34105 6.05078 7.61719 6.05078H8.37908C8.65522 6.05078 8.87908 6.27464 8.87908 6.55078V9.43224Z",fill:"var(--g-color-text-complementary)"}),(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.87908 12.0989C8.87908 12.375 8.65523 12.5989 8.37908 12.5989H7.61719C7.34105 12.5989 7.11719 12.375 7.11719 12.0989V11.5176C7.11719 11.2414 7.34105 11.0176 7.61719 11.0176H8.37908C8.65522 11.0176 8.87908 11.2414 8.87908 11.5176V12.0989Z",fill:"var(--g-color-text-complementary)"})]}))}function Pt(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).className;return(0,m.jsxs)("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,m.jsx)("path",{d:"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z",stroke:"currentColor",strokeOpacity:"0.15"}),(0,m.jsx)("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M8.46436 9.92432H7.09473C7.09115 9.72738 7.08936 9.60742 7.08936 9.56445C7.08936 9.12044 7.16276 8.75521 7.30957 8.46875C7.45638 8.18229 7.75 7.86003 8.19043 7.50195C8.63086 7.14388 8.89404 6.90934 8.97998 6.79834C9.11247 6.62288 9.17871 6.42953 9.17871 6.21826C9.17871 5.92464 9.06144 5.6731 8.8269 5.46362C8.59237 5.25415 8.27637 5.14941 7.87891 5.14941C7.49577 5.14941 7.17529 5.25863 6.91748 5.47705C6.65967 5.69548 6.48242 6.02848 6.38574 6.47607L5 6.3042C5.03939 5.66325 5.31242 5.11898 5.81909 4.67139C6.32577 4.22379 6.99088 4 7.81445 4C8.68099 4 9.37028 4.22648 9.88232 4.67944C10.3944 5.13241 10.6504 5.65966 10.6504 6.26123C10.6504 6.59424 10.5564 6.90934 10.3684 7.20654C10.1804 7.50375 9.77849 7.90836 9.1626 8.42041C8.84391 8.68539 8.64608 8.89844 8.56909 9.05957C8.49211 9.2207 8.45719 9.50895 8.46436 9.92432ZM7.09473 11.9546V10.4453H8.604V11.9546H7.09473Z"})]})}var zt=n(24893),Mt=["value","onChange"],Ut=ze("text-control"),qt=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.value,r=e.onChange,a=(0,A.A)(e,Mt),o=t.isEmpty(n);return(0,m.jsx)("div",{className:Ut({empty:o}),children:(0,m.jsx)(zt.k,(0,i.A)((0,i.A)({hasClear:!0},a),{},{autoComplete:!1,onUpdate:r,value:n}))})}}],[{key:"getDefaultValue",value:function(){return""}},{key:"isEmpty",value:function(e){return!e}}])}(a.Component);qt.defaultProps={extras:{}},qt.hasErrorRenderer=!0;var Ht=n(75854),Gt=n(13778),$t=n(2320),Wt=n(72664),Kt=n(21086),Zt=n(38496),Jt=n(99582),Yt=n(11661);const Qt=(0,Kt.om)("text-area");function Xt(e){var t;const{name:n,id:r,tabIndex:i,autoComplete:o,placeholder:l,value:s,defaultValue:u,controlRef:c,controlProps:d,size:f,rows:v,minRows:h=1,maxRows:p,autoFocus:g,disabled:b,readOnly:y,onChange:A,onFocus:C,onBlur:x,onKeyDown:S,onKeyUp:N,onKeyPress:w}=e,E=a.useRef(null),j=(0,Gt.N)(c,E),T=v||h,k=s||(null===(t=null==E?void 0:E.current)||void 0===t?void 0:t.value),I=a.useCallback((()=>{const e=null==E?void 0:E.current;if(e&&!v){const t=getComputedStyle(e),n=parseInt(t.getPropertyValue("line-height"),10),r=parseInt(t.getPropertyValue("padding-top"),10),i=parseInt(t.getPropertyValue("padding-bottom"),10),a=((null==k?void 0:k.match(/\n/g))||[]).length+1,o=(e=>{const{height:t,lineHeight:n}=e;return(t-(Number.isNaN(e.paddingTop)?0:e.paddingTop)-(Number.isNaN(e.paddingBottom)?0:e.paddingBottom))/n})({height:e.scrollHeight,paddingTop:r,paddingBottom:i,lineHeight:n});e.style.height="auto",p&&p<Math.max(o,a)?e.style.height=p*n+2*r+"px":(a>1||o>1)&&(e.style.height=`${e.scrollHeight}px`)}}),[v,p,k]);return a.useEffect((()=>{I()}),[I,f,s]),(0,m.jsx)("textarea",Object.assign({},d,{ref:j,style:Object.assign(Object.assign({},d.style),{height:v?"auto":void 0}),className:Qt("control",d.className),name:n,id:r,tabIndex:i,placeholder:l,value:s,defaultValue:u,rows:T,autoFocus:g,autoComplete:o,onChange:A,onFocus:C,onBlur:x,onKeyDown:S,onKeyUp:N,onKeyPress:w,disabled:null!=b?b:d.disabled,readOnly:null!=y?y:d.readOnly}))}const en=(0,Kt.om)("text-area"),tn=a.forwardRef((function(e,t){const{view:n="normal",size:r="m",pin:i="round-round",name:o,value:l,defaultValue:s,disabled:u,readOnly:c,hasClear:d=!1,error:f,errorMessage:v,validationState:h,autoComplete:p,id:g,tabIndex:b,style:y,className:A,qa:C,controlProps:x,note:S,onUpdate:N,onChange:w}=e,{errorMessage:E,validationState:j}=(0,Yt.Av)({error:f,errorMessage:v,validationState:h}),[T,k]=(0,Ht.P)(l,null!=s?s:"",N),I=a.useRef(null),O=(0,Wt.d)({initialValue:T,onReset:k}),R=(0,Gt.N)(e.controlRef,I,O),[V,_]=a.useState(!1),F=(0,Yt.lf)(j),B=(0,$t.u)(),L="invalid"===j&&Boolean(E),D=Boolean(d&&!u&&!c&&T),P=g||B,z=(0,$t.u)(),M=(0,$t.u)(),U=[null==x?void 0:x["aria-describedby"],S?M:void 0,L?z:void 0].filter(Boolean).join(" "),q={id:P,tabIndex:b,name:o,onChange(e){k(e.target.value),w&&w(e)},autoComplete:(0,Yt.o$)(p),controlProps:Object.assign(Object.assign({},x),{"aria-describedby":U||void 0,"aria-invalid":"invalid"===j||void 0})};return a.useEffect((()=>{const e=I.current;if(e){const t=e.scrollHeight>e.clientHeight;V!==t&&_(t)}}),[T,V]),(0,m.jsxs)("span",{ref:t,style:y,className:en({view:n,size:r,disabled:u,state:F,pin:"clear"===n?void 0:i,"has-clear":D,"has-scrollbar":V},A),"data-qa":C,children:[(0,m.jsxs)("span",{className:en("content"),children:[(0,m.jsx)(Xt,Object.assign({},e,q,{controlRef:R})),D&&(0,m.jsx)(Zt.k,{className:en("clear",{size:r}),size:(0,Zt.v)(r),onClick:e=>{const t=I.current;if(t){t.focus();const n=Object.create(e);n.target=t,n.currentTarget=t,t.value="",w&&w(n)}k("")}})]}),(0,m.jsx)(Jt.o,{errorMessage:L?E:null,errorMessageId:z,note:S,noteId:M})]})}));var nn=["value","onChange"],rn=ze("field-textarea"),an=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,r=(0,A.A)(e,nn);return(0,m.jsx)(tn,(0,i.A)((0,i.A)({className:rn(),autoComplete:!1,hasClear:!0,rows:4},r),{},{value:t,onUpdate:n}))}}],[{key:"getDefaultValue",value:function(){return""}},{key:"isEmpty",value:function(e){return!e}}])}(a.Component);an.hasErrorRenderer=!0;var on=["onChange"];function ln(e){var t=e.onChange,n=(0,A.A)(e,on);return(0,m.jsx)(h.l,(0,i.A)((0,i.A)({},n),{},{onUpdate:t}))}ln.getDefaultValue=function(){},ln.isEmpty=function(e){return!(null!=e&&e.length)};var sn=n(80268),un=["value","onChange"],cn=["labelLeft","labelRight","size","className"],dn=ze("tumbler-control");function fn(e){var t=e.value,n=e.onChange,r=(0,A.A)(e,un),o=(0,a.useCallback)((function(){return n(!t)}),[n,t]),l=r.labelLeft,s=r.labelRight,u=r.size,c=void 0===u?"m":u,d=r.className,f=(0,A.A)(r,cn);return(0,m.jsxs)("span",{className:dn({size:c}),children:[l,(0,m.jsx)(sn.d,(0,i.A)((0,i.A)({},f),{},{size:c,className:dn("switch",{"label-left":Boolean(l),"label-right":Boolean(s)},d),onChange:o,checked:t})),s]})}fn.getDefaultValue=function(){return!1},fn.isEmpty=function(e){return"boolean"!=typeof e||!e};var vn=ze("plain-text"),hn=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.placeholder,r=e.className;return(0,m.jsx)("div",{className:vn(null,r),children:t||(0,m.jsx)("span",{className:vn("placeholder"),children:n})})}}],[{key:"getDefaultValue",value:function(){return""}},{key:"isEmpty",value:function(e){return!e}}])}(a.Component);function mn(e){var t=e.when,n=e.isActive,r=e.children;return(0,m.jsx)(ft,{name:t,subscription:{value:!0},children:function(e){var t=e.input.value;return n(t)?r:null}})}var pn=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){return this.props.children||null}}])}(a.Component);pn.renderLabel=function(){return null},pn.getDefaultValue=function(){};var gn=n(30513),bn=["value","onChange"],yn=["options","size"];function An(e){var t=e.value,n=e.onChange,r=(0,A.A)(e,bn),o=(0,a.useCallback)((function(e){return n(e.target.value)}),[n]),l=r.options,s=void 0===l?[]:l,u=r.size,c=void 0===u?"m":u,d=(0,A.A)(r,yn);return(0,m.jsx)(gn.a,(0,i.A)((0,i.A)({},d),{},{size:c,value:t,onChange:o,children:Le()(s,(function(e){var t=e.value,n=e.label;return(0,m.jsx)(gn.a.Option,{value:t,children:n},t)}))}))}An.defaultProps={extras:{}},An.getDefaultValue=function(){return""},An.isEmpty=function(e){return"string"!=typeof e||!e};var Cn=ze("editable-list");function xn(e){var t=e.index,n=e.className,r=e.item,i=e.frozen,o=e.toggleRemove,l=e.itemRenderer,s=a.useCallback((function(){o(r,t)}),[r,o,t]),u=r.removed?(0,m.jsx)(Ft,{}):(0,m.jsx)(_t,{}),c=!i&&!r.frozen;return(0,m.jsxs)("span",{className:Cn("item",n),children:[(0,m.jsx)("span",{className:Cn("item-content",{removed:r.removed}),title:r.title,children:l(r)}),c&&(0,m.jsx)("span",{className:Cn("item-action"),onClick:s,children:u})]})}xn.defaultProps={itemRenderer:function(e){return e.title}};var Sn=function(e){function t(){var e,n,r,a;(0,l.A)(this,t);for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return n=this,r=t,a=[].concat(s),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,a||[],(0,Ae.A)(n).constructor):r.apply(n,a))).state={showAll:!1},e.renderItem=function(t,n){var r=e.props,i=r.itemClassName,a=r.itemRenderer,o=r.frozen;return(0,m.jsx)(xn,{className:i,index:n,item:t,frozen:o,toggleRemove:e.toggleRemove,itemRenderer:a},n)},e.toggleRemove=function(t,n){var r=e.props,a=r.value,o=r.onChange,l=(0,x.A)(a);l[n]=(0,i.A)((0,i.A)({},t),{},{removed:!t.removed}),o(l)},e.onShowAll=function(){e.setState({showAll:!e.state.showAll})},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"renderShowAll",value:function(){var e=this.state.showAll?"Hide":"Show all";return(0,m.jsx)("span",{className:Cn("show-all"),onClick:this.onShowAll,children:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.value,r=e.maxVisibleCount,i=this.state.showAll,a=!i&&r?n.slice(0,r):n,o=i||a.length!==n.length;return(0,m.jsxs)("div",{className:Cn(null,t),children:[a.map(this.renderItem),o&&this.renderShowAll()]})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(){return!1}}])}(a.Component);Sn.defaultProps={value:[]};var Nn,wn,En=["title","data"],jn=ze("editable-many-lists"),Tn=function(e){function t(){var e,n,r,a;(0,l.A)(this,t);for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return n=this,r=t,a=[].concat(s),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,a||[],(0,Ae.A)(n).constructor):r.apply(n,a))).onChange=function(t,n){var r=e.props,a=r.value,o=r.onChange,l=(0,i.A)((0,i.A)({},a[t]),{},{data:n}),s=(0,x.A)(a);s.splice(t,1,l),o(s)},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.value,o=t.itemRenderer,l=t.titleClassName,s=t.maxVisibleCount;return(0,m.jsx)("div",{className:jn(null,n),children:r.map((function(t,n){var r=t.title,u=t.data,c=(0,A.A)(t,En);return(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)("span",{className:jn("title",l),children:r},n),(0,m.jsx)(Sn,(0,i.A)((0,i.A)({itemRenderer:o,maxVisibleCount:s},c),{},{value:u,onChange:e.onChange.bind(e,n)}))]},n)}))})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(){return!1}}])}(a.Component),kn=n(46747),In=n(6542),On=ze("labels-group"),Rn=(Nn=function(e){function t(){var e,n,r,i;(0,l.A)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=this,r=t,i=[].concat(o),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,i||[],(0,Ae.A)(n).constructor):r.apply(n,i))).handleLabelClick=function(t){var n=e.props.onClick;"function"==typeof n&&n(t)},e.handleRemoveClick=function(t,n){var r=e.props.onRemove;t.stopPropagation(),"function"==typeof r&&r(n)},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"renderLabel",value:function(e){var t=this,n=this.props,r=n.onRemove,i=n.disabled,a=e.name,o=e.isDefault;return(0,m.jsx)(kn.J,{className:On("label"),type:r&&!o?"close":"default",onClick:function(){return t.handleLabelClick(e)},onCloseClick:function(n){return t.handleRemoveClick(n,e)},size:"s",disabled:i,children:a},a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,r=t.renderToggler,i=t.onRemoveAll,a=t.disabled;return(0,m.jsxs)("div",{className:On(),children:[Le()(n,(function(t){return e.renderLabel(t)})),null==r?void 0:r(),i&&n.length>0&&(0,m.jsx)(In.$,{size:"s",view:"flat-secondary",onClick:i,disabled:a,children:"Clear all"})]})}}])}(a.Component),(wn=function(e){function t(e){var n,r,i,a;return(0,l.A)(this,t),r=this,i=t,a=[e],i=(0,Ae.A)(i),(n=(0,be.A)(r,(0,ye.A)()?Reflect.construct(i,a||[],(0,Ae.A)(r).constructor):i.apply(r,a))).state={collapsed:!0},n.handleToggle=function(){return n.setState((function(e){return{collapsed:!e.collapsed}}))},n.renderToggler=function(){var e=n.props,t=e.items,r=e.visibleCount,i=n.state.collapsed,a=t.length>r,o=t.length-r;return a&&(0,m.jsx)(In.$,{size:"s",view:"flat",onClick:n.handleToggle,children:i?"Show more (".concat(o,")"):"Show less"})},n.state={collapsed:!e.initialExpanded},e.renderToggler&&console.warn('"renderToggler" property will be overriden'),n}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){return(0,m.jsx)(Nn,(0,i.A)((0,i.A)({},this.props),{},{items:this.getItems(),renderToggler:this.renderToggler}))}},{key:"getItems",value:function(){var e=this.getVisibleItemsCount(),t=this.props.items;return e<t.length?t.slice(0,e):t}},{key:"getVisibleItemsCount",value:function(){var e=this.props,t=e.items,n=e.visibleCount;return this.state.collapsed&&t.length>n?n:t.length}}])}(a.Component)).displayName="WithCollapsible(".concat(function(e){return e.displayName||e.name||"Component"}(Nn),")"),wn);function Vn(e){return e.id}function _n(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.forEach((function(e){return null==e?void 0:e.apply(void 0,n)}))}}function Fn(){}function Bn(e){var t=e.children,n=e.className,r=e.onFocus,i=e.onBlur,o=void 0===i?Fn:i,l=a.useState(!1),s=(0,C.A)(l,2),u=s[0],c=s[1],d=fe(_n(o,(function(){c(!1)}))),f=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=a.useRef(!1);return a.useEffect((function(){if(t){var r=function(){n.current=!1,window.setTimeout((function(){n.current||e()}),0)};return window.addEventListener("focus",r,{capture:!0}),function(){window.removeEventListener("focus",r,{capture:!0})}}}),[t,e]),a.useCallback((function(){n.current=!0}),[])}(d,u),v=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=a.useRef(!1);return a.useEffect((function(){if(t){var r=function(){n.current=!1,window.setTimeout((function(){n.current||e()}),0)};return window.addEventListener("click",r,{capture:!0}),function(){window.removeEventListener("click",r,{capture:!0})}}}),[t,e]),a.useCallback((function(){n.current=!0}),[])}(d,u);return(0,m.jsx)("div",{className:n,onFocus:_n(f,r,(function(){c(!0)})),onClick:v,children:t})}var Ln=["value","onChange","onBlur","onFocus","disabled"],Dn=ze("multi-text-control"),Pn=function(e){function t(){var e,n,r,i;(0,l.A)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=this,r=t,i=[].concat(o),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,i||[],(0,Ae.A)(n).constructor):r.apply(n,i))).state={currentLabel:""},e.updateLabel=function(t){e.setState({currentLabel:t})},e.confirmText=function(){var t=e.state.currentLabel;if((null==t?void 0:t.length)>0){var n=e.props,r=n.onChange,i=n.value;je()(i,(function(e){return e.name===t}))||r(i.concat({name:t})),e.setState({currentLabel:""})}},e.handleAdd=function(n){n.keyCode===t.ENTER&&e.confirmText()},e.handleClear=function(){e.props.onChange(t.getDefaultValue())},e.handleRemove=function(n){var r=e.props,i=r.onChange,a=r.value;i(t.remove(n,a))},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=(e.onChange,e.onBlur),r=e.onFocus,a=e.disabled,o=(0,A.A)(e,Ln);return(0,m.jsxs)(Bn,{className:Dn(),onBlur:n,onFocus:r,children:[(0,m.jsx)(zt.k,(0,i.A)((0,i.A)({size:"s",view:"normal",autoComplete:!1,hasClear:!0,disabled:a},o),{},{onUpdate:this.updateLabel,onKeyDown:this.handleAdd,onBlur:this.confirmText,value:this.state.currentLabel})),(0,m.jsx)(Rn,{items:t,visibleCount:4,disabled:a,onRemoveAll:this.handleClear,onRemove:this.handleRemove})]})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!e.length}},{key:"remove",value:function(e,t){var n=ke()(t,(function(t){return e.name===t.name}));if(n>-1){var r=(0,x.A)(t);return r.splice(n,1),r}return t}}])}(a.Component);Pn.ENTER=13,Pn.hasErrorRenderer=!0;var zn=n(62167),Mn=n(17239),Un=n.n(Mn),qn=ze("dialog-tab"),Hn=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.className,r=e.tabItems,i=e.activeTab,a=e.setActiveTab,o=e.onRemoveTab,l=e.onCreateTab;return(0,m.jsx)(zn.t,{className:qn("control",n),items:r,activeTab:i,onSelectTab:a,wrapTo:t.wrapTabItem.bind(null,o,l)})}}],[{key:"getDefaultValue",value:function(e){return e.multiple?[]:{}}},{key:"isEmpty",value:function(e,t){return t.multiple?!e.length:!Object.keys(e).length}}])}(a.Component);Hn.isTabControl=!0,Hn.isTabControlVertical=!1,Hn.wrapTabItem=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=n.error&&("string"==typeof n.error||Un()(n.error,(function(e){return Boolean(e)})));return(0,m.jsxs)("div",{className:qn("wrapper",i),children:[(0,m.jsxs)("span",{className:qn("name"),children:[(0,m.jsx)("span",{className:qn("name-text"),children:r}),a&&(0,m.jsx)("span",{className:qn("warning-icon"),title:"Some fields in this tab are not valid",children:(0,m.jsx)(Bt,{})})]}),n.multiple&&n.removable&&(0,m.jsx)("span",{className:qn("remove-icon"),onClick:function(t){t.stopPropagation(),e(n)},children:(0,m.jsx)(_t,{})})]},n.id)};var Gn=n(4564),$n=["className","activeTab","size","sortable","tabItems","onOrderChanged"],Wn=ze("tab-field-vertical"),Kn={s:28,m:36,l:48},Zn=function(e){function t(){var e,n,r,i;(0,l.A)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=this,r=t,i=[].concat(o),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,i||[],(0,Ae.A)(n).constructor):r.apply(n,i))).onItemClick=function(t){(0,e.props.setActiveTab)(t.id)},e.renderItem=function(t){var n=e.props,r=n.onRemoveTab,i=n.onCreateTab,a=n.wrapTo,o=Hn.wrapTabItem(r,i,t,t.title,{vertical:!0});return a?a(o,t):o},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.className,r=e.activeTab,a=e.size,o=e.sortable,l=e.tabItems,s=e.onOrderChanged,u=(0,A.A)(e,$n),c=ke()(l,(function(e){return e.id===r}));return(0,m.jsx)("div",{className:Wn({size:a},n),children:(0,m.jsx)(Gn.B,(0,i.A)({className:Wn("list"),itemHeight:Kn[a||t.defaultProps.size],size:a,items:l,renderItem:this.renderItem,onItemClick:this.onItemClick,selectedItemIndex:c,filterable:!1,onSortEnd:s,sortable:o},u))})}}])}(a.Component);Zn.defaultProps={size:"s"},Zn.isTabControl=!0,Zn.isTabControlVertical=!0,Zn.getDefaultValue=Hn.getDefaultValue,Zn.isEmpty=Hn.isEmpty;var Jn,Yn=new(n(50326).TH);Jn=function(e){Yn.setLang(e.lang)},[].push(Jn),Jn(ve);const Qn=(Xn="infra-components-dialog",tr=(er={ru:JSON.parse('{"validator:value-required":"Требуется значение"}'),en:JSON.parse('{"validator:value-required":"Value is required"}')}).ru,nr=er.en,Yn.registerKeyset("ru",Xn,tr),Yn.registerKeyset("en",Xn,nr),Yn.keyset(Xn));var Xn,er,tr,nr,rr=n(51036),ir=n(27241),ar=ze("collapsible-section");function or(e){var t=e.className,n=e.alwaysExpanded,r=e.initialCollapsed,i=e.children,o=e.caption,l=e.captionClassName,s=a.useState(r&&!n),u=(0,C.A)(s,2),c=u[0],d=u[1],f=a.useCallback((function(){d(!c)}),[c]);return(0,m.jsxs)("section",{className:ar(null,t),children:[(0,m.jsxs)("h2",{className:ar("caption",{collapsed:c,collapsible:!n},l),onClick:n?void 0:f,children:[o,!n&&(0,m.jsxs)("span",{children:[" ",c?(0,m.jsx)(rr.A,{}):(0,m.jsx)(ir.A,{})]})]}),(0,m.jsx)("section",{className:ar("content",{collapsed:c}),children:i})]})}var lr=["form"],sr=["id"],ur=ze("dialog"),cr=ze("page-dialog");function dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){var e=(0,Ce.A)(Se().mark((function e(n,r,i){var a,o,l,s;return Se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=0,o=t;case 1:if(!(a<o.length)){e.next=17;break}return l=o[a],e.prev=3,e.next=6,l(n,r,i);case 6:if(!(s=e.sent)){e.next=9;break}return e.abrupt("return",s);case 9:e.next=14;break;case 11:return e.prev=11,e.t0=e.catch(3),e.abrupt("return","Validation exception: "+e.t0);case 14:a++,e.next=1;break;case 17:return e.abrupt("return",void 0);case 18:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,n,r){return e.apply(this,arguments)}}()}var fr=function(){},vr=[];function hr(e){return void 0!==e.section}function mr(e){return gr(e.type)}function pr(e){return Ar.hasTabs(e)}function gr(e){return"string"==typeof e&&-1!==vr.indexOf(e)}var br=new Map;function yr(e){if(br.has(e))return br.get(e);throw new Error("Control '".concat(e,"' is not registered as the Dialog control!"))}var Ar=function(e){function t(e){var n,r,o,s;return(0,l.A)(this,t),r=this,o=t,s=[e],o=(0,Ae.A)(o),(n=(0,be.A)(r,(0,ye.A)()?Reflect.construct(o,s||[],(0,Ae.A)(r).constructor):o.apply(r,s))).state={tabsCount:1,activeTabId:void 0,verticalTabs:void 0},n.form=void 0,n.onClose=function(e,r){if("outsideClick"!==r){n.setState({activeTabId:void 0});var i=n.props,a=i.onClose,o=void 0===a?t.defaultProps.onClose:a,l=i.disableFormReset;o(n.form),l||window.setTimeout((function(){n.form.reset()}),0)}},n.onApply=function(){return(0,n.props.onAdd)(n.form).then((function(e){return(e||{}).validationErrors||(n.onClose(),null)})).catch((function(e){return console.error(e)}))},n.isActiveTab=function(e){return Vn(e)===n.state.activeTabId},n.onActiveTabChange=function(e){var t=n.props.onActiveTabChange;n.setState({activeTabId:e}),"function"==typeof t&&t(e)},n.renderTabs=function(e){var t,r=e.form,i=(0,A.A)(e,lr),a=n.state,o=a.activeTabId,l=a.verticalTabs,s=n.props,u=s.size,c=s.fields,d=n.prepareTabs(r,i),f=d.tabItems,v=d.removeTab,h=d.createTab,p=yr(null===(t=c[0])||void 0===t?void 0:t.type);return(0,m.jsx)(p,{className:ur("tabs-control",{vertical:Boolean(l)}),size:u,tabItems:f,activeTab:o,setActiveTab:n.onActiveTabChange,onRemoveTab:v,onCreateTab:h})},n.renderDialogContent=function(e,r){n.form=r;var o=n.props,l=o.waitingMessage,s=o.headerProps,u=o.footerProps,c=o.fields,d=o.formId,f=o.size,v=n.state.verticalTabs,h=s||{},p=h.title,g=h.insertAfter,b=h.insertBefore,y=t.defaultProps.footerProps,A=y.textApply,C=y.textCancel,x=u||{},S=x.textApply,N=void 0===S?A:S,w=x.textCancel,E=void 0===w?C:w,j=x.content,T=x.propsButtonCancel,k=void 0===T?{}:T,I=x.propsButtonApply,O=void 0===I?{}:I,R=x.hidden,V=r.getState(),_=n.isApplyDisabled(V);return(0,m.jsxs)(a.Fragment,{children:[p&&(0,m.jsx)(De.l.Header,{caption:(0,m.jsx)("span",{className:ur("caption"),children:p}),insertAfter:g,insertBefore:b}),(0,m.jsxs)("form",{id:d,onSubmit:e,children:[(0,m.jsx)(De.l.Body,{className:ur("body",{with_vertical_tabs:Boolean(v)}),children:(0,m.jsx)("div",{className:ur({size:f,with_vertical_tabs:Boolean(v)}),children:pr(c)?n.renderTabbedFields():(0,m.jsxs)(a.Fragment,{children:[n.renderFields(c),n.renderFormError()]})})}),!R&&(0,m.jsx)(De.l.Footer,{preset:"default",loading:V.submitting,textButtonCancel:E,textButtonApply:N,propsButtonApply:(0,i.A)({disabled:_,type:"submit"},O),propsButtonCancel:k,onClickButtonCancel:n.onClose,onClickButtonApply:fr,children:(0,m.jsx)("div",{className:ur("footer-controls"),children:j})})]}),l&&(0,m.jsx)("div",{className:ur("waiting-message"),children:(0,m.jsxs)("div",{className:ur("waiting-message-inner"),children:[(0,m.jsx)(Lt,{}),l]})})]})},n.renderPageDialog=function(e){var t=e.handleSubmit,r=e.form,i=n.props,a=i.className,o=i.modal,l=i.size;return(0,m.jsx)("div",{className:cr("wrapper",{modal:o},a),children:(0,m.jsx)("div",{className:cr({size:l}),children:n.renderDialogContent(t,r)})})},n.renderModalDialog=function(e){var t=e.handleSubmit,r=e.form,i=n.props,a=i.visible,o=i.className,l=i.size;return a&&(0,m.jsx)(De.l,{className:o,open:!0,hasCloseButton:!0,size:l,onClose:n.onClose,children:n.renderDialogContent(t,r)})},n.getFieldsCalculator=function(){var e=t.collectSubscribers("",n.props.fields).map((function(e){return{field:e.name,updates:e.subscribers}}));if(e.length)return It.apply(void 0,(0,x.A)(e))},function(e){var t,n,r,i=(n=(t=e.fields).filter(mr),r="Invalid prop '".concat(t,"' passed to '").concat(Cr.name||"DFDialog","'."),0<n.length&&n.length<t.length?new Error("".concat(r," No top level real fields are allowed if there are tab fields on top-level.")):n.filter((function(e){return e.multiple})).length>1?new Error("".concat(r," It is forbidden to have more than one multiple tab fields.")):void 0);i&&console.error("Tab specification is wrong, please recheck provided `field` property",i)}(e),n}return(0,c.A)(t,e),(0,s.A)(t,[{key:"componentDidUpdate",value:function(e,t){t.tabsCount!==this.state.tabsCount&&setTimeout((function(){var e;return null===(e=document.querySelector(".g-dialog__modal"))||void 0===e?void 0:e.scrollTo(0,0)}),0)}},{key:"_isApplyDisabled",value:function(e){var t=this.props.pristineSubmittable,n=e.pristine,r=e.invalid,i=e.hasSubmitErrors,a=e.dirtySinceLastSubmit,o=e.hasValidationErrors;return r?o||i&&!a:!t&&n}},{key:"isApplyDisabled",value:function(e){var t=this.props.isApplyDisabled;return"function"==typeof t?t(e):this._isApplyDisabled(e)}},{key:"renderFieldGroup",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.name,a=e.type,o=e.className,l=e.warning,s=e.fullWidth,u=r?"".concat(r,".").concat(i):i,c=e.required,d=e.validator,f=e.validateFields,v=void 0===f?[]:f,h=e.initialValue,p=e.onChange,g=[];c&&g.push(t.makeRequiredValidator(e)),"function"==typeof d&&g.push(d);var b=yr(e.type),y=b.format,A=b.validate,C=b.isEqual;A&&g.push(A);var x=dr.apply(void 0,g);return(0,m.jsx)(ft,{name:u,initialValue:h,validate:x,validateFields:v,isEqual:C,format:y,formatOnBlur:!0,children:function(r){var i=r.input,c=r.meta;return(0,m.jsxs)("div",{className:ur("field-group",{type:a,"full-width":s,dirty:c.dirty},o),children:[t.renderLabel(e),(0,m.jsxs)("div",{className:ur("field-wrapper",{type:a,empty:t.isEmptyField(e,i.value),"full-width":s}),children:[t.renderField(e,i,c),l&&(0,m.jsxs)("div",{className:ur("field-warning"),children:[(0,m.jsx)(Dt,{}),(0,m.jsx)("span",{className:ur("field-warning-content"),children:l})]})]}),"function"==typeof p&&(0,m.jsx)(Vt,{name:u,children:function(t,r){t!==r&&p(t,r,e,u,n.form,n.form.getState())}})]})}},u)}},{key:"renderSection",value:function(e,t,n){var r,i=e.wrapTo,o=void 0===i?function(e){return e}:i,l=e.section,s=e.collapsible,u=e.initialCollapsed;r=Array.isArray(e.fields)&&0!==e.fields.length?this.renderFields(e.fields,n):[];var c="section-field-".concat(t);return(0,m.jsx)(a.Fragment,{children:o((0,m.jsx)(or,{className:ur("section"),caption:l,captionClassName:ur("section-title"),initialCollapsed:u,alwaysExpanded:!s,children:r}))},c)}},{key:"renderFields",value:function(e,n){var r=this;return e.map((function(e,a){if(hr(e))return r.renderSection(e,a,n);if(function(e){return void 0!==e.separator}(e))return t.renderSeparator(e,a);var o=e.visibilityCondition;return o?(0,m.jsx)(mn,(0,i.A)((0,i.A)({},o),{},{children:r.renderFieldGroup(e,n)}),"cond-".concat(a)):r.renderFieldGroup(e,n)}))}},{key:"renderFormError",value:function(){var e=(this.form.getState().submitErrors||{})[K];return e?(0,m.jsx)("div",{className:ur("error-message"),children:e}):null}},{key:"renderMultiTabContent",value:function(e){var t=this,n=this.props.virtualized,r=e.name,a=e.fields,o=e.renderControls;return(0,m.jsx)(jt,{name:r,children:function(e){var l=e.fields;return l.map((function(e,s){var u=l.value[s],c=t.isActiveTab(u);return(c||!n)&&(0,m.jsxs)("div",{className:ur("tabs-content-item",{hidden:!c,name:r}),children:[t.renderFields(a,e),t.renderFormError(),o&&(0,m.jsx)("div",{className:ur("extra-controls"),children:o(u,(function(e){var n=t.form.getState();(0,t.prepareTabs(t.form,n).createTab)(r,e)}),0!==s?function(){var e=t.form.getState();(0,t.prepareTabs(t.form,e).removeTab)((0,i.A)((0,i.A)({},u),{},{name:r}))}:void 0)})]},s)}))}},r)}},{key:"renderSingleTabContent",value:function(e){var t=this.props.virtualized,n=this.state.activeTabId,r=e.name,i=e.fields,a=r===n;return(a||!t)&&(0,m.jsxs)("div",{className:ur("tabs-content-item",{hidden:!a,name:r}),children:[this.renderFields(i,r),this.renderFormError()]},"single-tab-".concat(r))}},{key:"isVisibleTab",value:function(e,t){var n=e.visibilityCondition;if(!n)return!0;var r=Ve()(t,n.when);return n.isActive(r)}},{key:"prepareTabs",value:function(e,n){var r,a=this,o=e.mutators,l=o.remove,s=o.push,u=this.state.activeTabId,c=this.props.fields,d=n.values,f=n.errors,v=[],h=0,m=d,p=c,g=!1,b=!1;return t.operateOnTabs({fields:p,values:m,errors:f},(function(e){var t=e.id,n=e.error,r=e.name,o=e.multiple,l=e.index,s=e.renderControls,c=e.title,f=e.isRemovable;a.isVisibleTab(e,d)?(o&&!g&&(g=!0,h=l),v.push((0,i.A)((0,i.A)({id:t,error:n,name:r,multiple:o},{renderControls:s}),{},{title:c,removable:f(l-h)}))):b=b||u===t})),b&&this.setState({activeTabId:null===(r=v[0])||void 0===r?void 0:r.id}),{tabItems:v,createTab:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=je()(p,(function(t){return t.name===e})),i=(r||{}).onCreateTab;if(null!=r&&r.multiple){var o=n.userOptions,l=ke()(m[e],a.isActiveTab),u=m[e][-1===l?0:l],c=(u.id,(0,A.A)(u,sr)),d=i?i(c,{userOptions:o}):c;if(void 0===d.id)for(var f=new Set(Le()(m[e],(function(e){var t=e.id;return String(t)}))),h=0;h<=f.size;++h){var g=String(h+1);if(!f.has(g)){d.id=g;break}}else!function(e,t){var n=Vn(e);if(void 0===n)throw new Error("id field must be defined");if(je()(t,(function(e){return n===Vn(e)})))throw new Error("id of a tab must be unique")}(d,m[e]);s(e,d),a.setState({tabsCount:v.length+1}),t&&a.onActiveTabChange(Vn(d))}},removeTab:function(e){var t=ke()(v,(function(t){return t.id===e.id}));if(!(t<0)){if(e.id===u){var n=v[t-1].id;a.setState({activeTabId:n})}l(e.name,t-h),a.setState({tabsCount:v.length-1})}}}}},{key:"renderTabbedFields",value:function(){var e=this,t=this.props.fields,n=this.state.verticalTabs,r=t;return(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)(rt,{render:this.renderTabs,subscription:{values:!0,errors:!0}}),(0,m.jsx)("div",{className:ur("tabs-content",{with_vertical_tabs:n}),children:r.map((function(t){return t.multiple?e.renderMultiTabContent(t):e.renderSingleTabContent(t)}))})]})}},{key:"hasTabs",value:function(){return t.hasTabs(this.props.fields)}},{key:"render",value:function(){var e,n=this.props,r=n.initialValues,a=n.modal,o=n.formExtras,l=n.validate,s=this.state.defaultValues,u=this.getFieldsCalculator(),c=u?[u]:void 0;e=r?Object.assign({},s,r):s;var d=a?this.renderModalDialog:this.renderPageDialog,f=(null!=o?o:{}).mutators;return(0,m.jsx)(et,(0,i.A)((0,i.A)({initialValuesEqual:Oe(),keepDirtyOnReinitialize:!0},o),{},{onSubmit:this.onApply,validate:l,subscription:t.FINAL_FORM_SUBSCRIPTIONS,mutators:this.hasTabs()?(0,i.A)((0,i.A)({},f),yt):f,initialValues:e,decorators:c,render:d}))}}],[{key:"registerControl",value:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).suppressDuplicateWarning;br.has(e)&&!n&&console.warn("Control '".concat(e,"' is already registered as the Dialog control!")),t.isTabControl&&vr.push(e),br.set(e,t)}},{key:"registerTabControl",value:function(e,n,r){t.registerControl(e,n,r)}},{key:"isEmptyField",value:function(e,t){var n=yr(e.type);return(n&&n.isEmpty?n.isEmpty:function(){return!1})(t)}},{key:"getDefaultValues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return we()(e,(function(e,n){var r=n;if(hr(r)){if(Array.isArray(r.fields))return(0,i.A)((0,i.A)({},e),t.getDefaultValues(r.fields))}else if(mr(r)){var a=t.getDefaultValues(r.fields);e[r.name]=r.multiple?[(0,i.A)((0,i.A)({},a),{},{id:1})]:a}else(function(e){try{return!mr(e)&&void 0!==yr(e.type)}catch(e){return!1}})(r)&&(e[r.name]=yr(r.type).getDefaultValue());return e}),{})}},{key:"makeRequiredValidator",value:function(e){return function(n){return t.isEmptyField(e,n)?Qn("validator:value-required"):void 0}}},{key:"getDerivedStateFromProps",value:function(e,n){var r={},i=e.fields;if(n.defaultValues||(r.defaultValues=t.getDefaultValues(i)),void 0===n.verticalTabs&&(r.verticalTabs=t.getTabsOrientation(i)),t.hasTabs(i)){var a=e.initialValues;void 0===n.activeTabId&&(r.activeTabId=t.getFirstTabId(i,a))}return Fe()(r)?null:r}},{key:"hasTabs",value:function(e){return e.some(mr)}},{key:"getFirstTabId",value:function(e,t){var n=e[0],r=n.multiple,i=n.name;return r?Vn(t[i][0]):i}},{key:"getTabsOrientation",value:function(e){var t=(0,C.A)(e,1)[0];if(!t||!mr(t))return null;var n=yr(t.type),r=n.isTabControl,i=n.isTabControlVertical;return void 0===r?null:i}},{key:"renderField",value:function(e,t,n){var r=e.extras;return"function"==typeof r?(0,m.jsx)(rt,{subscription:{values:!0},children:function(i){var a=i.values,o=i.form,l=r(a,{input:t,form:o,field:e});return(0,m.jsx)(Nr,{field:e,input:t,meta:n,extras:l})}}):(0,m.jsx)(Nr,{field:e,input:t,meta:n,extras:r})}},{key:"renderSeparator",value:function(e,t){return(0,m.jsx)("div",{className:ur("separator")},"separator-".concat(t))}},{key:"renderLabel",value:function(e){var t=e.name,n=e.type,r=e.required,i=e.caption,a=e.tooltip,o=br.get(n)&&br.get(n).renderLabel;return"function"==typeof o?o(e):(0,m.jsxs)("label",{className:ur("label"),htmlFor:t,children:[(0,m.jsx)("div",{className:ur("label-text",{required:r}),children:i}),Boolean(a)&&(0,m.jsx)("div",{children:(0,m.jsx)(Pe.A,{content:a,delayOpening:150,delayClosing:150,placement:["bottom","top","right"],children:(0,m.jsx)(Pt,{className:ur("q-icon")})})})]})}},{key:"operateOnTabs",value:function(e,t){var n=e.fields,r=e.values,a=e.errors,o=0;n.forEach((function(e){var n=e.name,l=e.type,s=e.multiple,u=e.renderControls,c=e.title,d=void 0===c?n:c,f=e.getTitle,v=e.isRemovable,h=e.visibilityCondition;if(!gr(l))throw new Error("Expected field of type 'tab', got '".concat(l,"'"));var m=r[n],p=a&&a[n],g={multiple:s,name:n,renderControls:u,visibilityCondition:h};s?m.forEach((function(e,n){var r=Vn(e);t((0,i.A)({id:r,error:p&&p[n],index:o,title:"function"==typeof f?f(e):"".concat(d," ").concat(r),isRemovable:"function"==typeof v?v:function(e){return 0!==e}},g)),o++})):(t((0,i.A)({id:n,error:p,index:o,title:"function"==typeof f?f(m):d,isRemovable:function(){return!1}},g)),o++)}))}},{key:"collectSubscribers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return we()(n,(function(n,r){var i=r;if(hr(i))Array.isArray(i.fields)&&t.collectSubscribers(e,i.fields,n);else{var a=i.name,o=i.subscribers,l="".concat(e).concat(a);o&&n.push({name:l,subscribers:o}),mr(i)&&t.collectSubscribers("".concat(l,"."),i.fields,n)}return n}),r)}}])}(a.Component);function Cr(e){return(0,m.jsx)(Ar,(0,i.A)({},e))}Ar.defaultProps={pristineSubmittable:!1,modal:!0,size:"m",headerProps:{},footerProps:{textApply:"Confirm",textCancel:"Cancel"},onClose:function(){}},Ar.FINAL_FORM_SUBSCRIPTIONS={submitting:!0,pristine:!0,invalid:!0,dirtySinceLastSubmit:!0,hasValidationErrors:!0,hasSubmitErrors:!0},Ar.registerTabControl("tab",Hn),Ar.registerTabControl("tab-vertical",Zn),Ar.registerControl("text",qt),Ar.registerControl("textarea",an),Ar.registerControl("select",ln),Ar.registerControl("tumbler",fn),Ar.registerControl("block",pn),Ar.registerControl("plain",hn),Ar.registerControl("checkbox",ge),Ar.registerControl("radio",An),Ar.registerControl("editable-list",Sn),Ar.registerControl("multi-editable-lists",Tn),Ar.registerControl("multi-text",Pn);var xr=Ar.registerControl,Sr=Ar.registerTabControl;function Nr(e){var t,n=e.field,r=e.extras,o=void 0===r?{}:r,l=e.meta,s=e.input,u=n.type,c=n.name,d=n.touched;l.error&&(d||l.touched||l.dirty)?t=l.error:!l.submitError||l.dirtySinceLastSubmit||l.submitting||(t=l.submitError);var f=o.onFocus,v=o.onBlur,h=s.onFocus,p=s.onBlur,g=fe(_n(f,h)),b=fe(_n(v,p)),y=(0,i.A)((0,i.A)((0,i.A)({id:c},o),s),{},{onFocus:g,onBlur:b}),A=yr(u);return A.hasErrorRenderer&&(y.error=t,t=null),(0,m.jsxs)(a.Fragment,{children:[a.createElement(A,(0,i.A)({},y)),t&&(0,m.jsx)("div",{className:ur("field-error"),children:t})]})}var wr=n(95664),Er=n(17852),jr=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,u.A)(this,t,[].concat(r))).onSubejctsControlChange=function(t){var n=e.props,r=n.value;(0,n.onChange)((0,i.A)((0,i.A)({},r),{},{newItems:t}))},e.onManyListsChange=function(t){var n=(0,C.A)(t,1)[0];if(n){var r=e.props,a=r.value;(0,r.onChange)((0,i.A)((0,i.A)({},a),{},{current:n}))}},e.renderItem=function(e){var t=e.title;return"users"===(e.data||{}).type?(0,m.jsx)(wr.R,{name:t}):t},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.className,r=e.value,i=e.placeholder,a=e.maxVisibleCount,o=e.allowedTypes,l=t.prepareManyListData(r);return(0,m.jsxs)("div",{className:(0,Er.om)(null,n),children:[(0,m.jsx)(f,{onChange:this.onSubejctsControlChange,value:r.newItems||[],placeholder:i,allowedTypes:o}),l.length>0&&(0,m.jsx)(Tn,{className:(0,Er.om)("many-lists"),value:l,titleClassName:(0,Er.om)("many-lists-title"),onChange:this.onManyListsChange,maxVisibleCount:a,itemRenderer:this.renderItem})]})}}],[{key:"getDefaultValue",value:function(){return{newItems:[],current:{title:"",data:[]},toAdd:{title:"",data:[]},toRemove:{title:"",data:[]},unrecognized:{title:"",data:[]}}}},{key:"isEmpty",value:function(){return!1}},{key:"prepareManyListData",value:function(e){var t=e.current,n=e.toAdd,r=e.toRemove,a=e.unrecognized;return[(0,i.A)({},t),n,r,a].filter((function(e){return e.data&&e.data.length>0}))}}])}(a.Component);jr.defaultProps={maxVisibleCount:3};var Tr=n(48377),kr=n(15647),Ir=n(50916),Or=n(87319),Rr=["className","value","onChange","children","suggestions"],Vr=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).getItems=function(e){return e},e.onChange=function(t){(0,e.props.onChange)("string"==typeof t?t:t.value)},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=(e.className,e.value),n=(e.onChange,e.children,e.suggestions),r=(0,A.A)(e,Rr);return(0,m.jsx)(Or.A,(0,i.A)((0,i.A)({},r),{},{text:t,apply:this.onChange,items:n,filter:this.getItems}))}}])}(a.Component);Vr.isEmpty=function(e){return""===e||null==e},Vr.getDefaultValue=function(){return""};var _r=(0,kr.Ng)((function(e){return{suggestions:(0,Ir.l$)(e)}}))(Vr),Fr=(0,kr.Ng)((function(e){return{suggestions:(0,Ir.bl)(e)}}))(Vr),Br=(0,o.A)("ic-select-with-subitems"),Lr=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).onChange=function(t){var n=e.props,r=n.value,i=n.onChange,a=n.subItemsMap,o=void 0===a?{}:a,l=r||[],s=(0,C.A)(l,2),u=s[0],c=s[1],d=o[t];u!==t&&i(d?[t,d.find((function(e){return e.value===c}))?c:d[0].value]:[t])},e.onSubValueChange=function(t){var n=e.props,r=n.value||[];(0,n.onChange)([(0,C.A)(r,1)[0],t])},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.value,r=e.items,i=e.labels,a=e.placeholder,o=e.subItemsMap,l=void 0===o?{}:o,s=n||[],u=(0,C.A)(s,2),c=u[0],d=u[1],f=i||[],v=(0,C.A)(f,2),h=v[0],p=v[1],g=l[c],b=d||g&&g[0].value;return(0,m.jsxs)("div",{className:Br(null,t),children:[this.renderSelect(c,r,this.onChange,h,a),this.renderSelect(b,l[c],this.onSubValueChange,p,void 0)]})}},{key:"renderSelect",value:function(e,t,n,r,i){if(!t||!t.length)return null;var a=this.props.labelClassName;return(0,m.jsxs)("div",{className:Br("control"),children:[r&&(0,m.jsx)("span",{className:Br("control-label",a),children:r}),(0,m.jsx)(h.l,{options:t,value:[e],onUpdate:function(e){return n(e[0])},placeholder:i,width:"max",disablePortal:!0})]})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!e||0===e.length}}])}(a.Component),Dr=n(14242),Pr=n(67270),zr=["onChange","placeholder","value","error"],Mr=(0,o.A)("accounts-suggest");function Ur(e){var t=e.onChange,n=e.placeholder,r=e.value,a=e.error,o=(0,A.A)(e,zr),l=(0,kr.d4)(Dr.wY).sortedFlatTree,s=Le()(l,(function(e){return{value:e,text:e}}));return(0,m.jsxs)("div",{className:Mr({empty:!r,error:Boolean(a)}),children:[(0,m.jsx)(Pr.A,(0,i.A)((0,i.A)({},o),{},{items:s,onUpdate:function(e){return t(e[0])},placeholder:n,value:r?[r]:void 0,width:"max"})),a&&(0,m.jsx)("div",{className:Mr("error"),children:a})]})}Ur.isEmpty=function(e){return!e},Ur.getDefaultValue=function(){return""},Ur.hasErrorRenderer=!0;var qr=function(e){return e.suggests.tabletCellBundles.items},Hr=n(52797),Gr=n(27859),$r=["onChange","placeholder"],Wr=(0,o.A)("tablet-cell-bundles-suggest");function Kr(e){var t=(0,kr.d4)(qr),n=(0,kr.wA)();a.useEffect((function(){n((function(e,t){e({type:"SUGGEST_TABLET_CELL_BUNDLES_REQUEST"});var n=(0,Hr.ID)(t());return Gr.Qq.get(Gr.Vu.getUsableBundles,{path:"//sys/users/".concat(n,"/@usable_tablet_cell_bundles")}).then((function(t){e({type:"SUGGEST_TABLET_CELL_BUNDLES_SUCCESS",data:{items:t}})})).catch((function(t){e({type:"SUGGEST_TABLET_CELL_BUNDLES_ERROR",data:t})}))}))}),[]);var r=e.onChange,o=e.placeholder,l=(0,A.A)(e,$r),s=e.value,u=Le()(t,(function(e){return{value:e,text:e}}));return(0,m.jsx)("div",{className:Wr({empty:!s}),children:(0,m.jsx)(Pr.A,(0,i.A)((0,i.A)({},l),{},{items:u,onUpdate:function(e){return r(e[0])},placeholder:o,value:s?[s]:void 0,width:"max",disablePortal:!0}))})}Kr.isEmpty=function(e){return!e},Kr.getDefaultValue=function(){return""};const Zr=Kr;var Jr=n(63281),Yr=n.n(Jr),Qr=n(62044),Xr=(0,o.A)("editable-path-list"),ei=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).onListChange=function(t){var n=we()(t,(function(e,t){var n=t.title;return t.removed||e.push(n),e}),[]);e.props.onChange(n)},e.onPathEditorChange=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=e.props,o=a.value,l=void 0===o?[]:o;(0,a.onChange)([].concat((0,x.A)(l),[i]).sort())},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.defaultPath,r=e.placeholder,i=Le()(Yr()(t),(function(e){return{title:e}}));return(0,m.jsxs)("div",{className:Xr(),children:[(0,m.jsx)(Qr.A,{placeholder:r,defaultPath:n,onApply:this.onPathEditorChange}),(0,m.jsx)(Sn,{className:Xr("list"),value:i,onChange:this.onListChange})]})}}],[{key:"getDefaultValue",value:function(){return Sn.getDefaultValue()}},{key:"isEmpty",value:function(e){return!(null!=e&&e.length)}}])}(a.Component),ti=["value","placeholder","onChange"],ni=(0,o.A)("path-editor-control");function ri(e){var t=e.value,n=e.placeholder,r=e.onChange,o=(0,A.A)(e,ti),l=a.useCallback((function(e){r(e)}),[r]);return(0,m.jsx)(Qr.A,(0,i.A)({className:ni(),defaultPath:t,placeholder:n,onApply:l,onChange:l},o))}ri.getDefaultValue=function(){return""},ri.isEmpty=function(e){return!e};var ii=n(32235),ai=n(73384),oi=n(16538),li=n(75299),si=n(87446),ui=n(79703),ci=(0,o.A)("form-option-item"),di=function(e){var t=e.name,n=e.tooltip,r=e.checked,i=e.onUpdate;return(0,m.jsxs)("div",{className:ci(),children:[(0,m.jsx)(he.S,{checked:r,onUpdate:function(e){i(t,e)},children:t}),(0,m.jsx)(si.m,{content:n,className:ci("tooltip"),children:(0,m.jsx)(ii.I,{data:ui.A,className:ci("info"),size:16})})]})},fi=n(59381),vi=(0,r.A)((0,r.A)((0,r.A)({},fi.CN.COMPRESSION_CODEC,"Sets the compression format for output table. The attribute can be specified with the write_file, write_table commands, and on operation output paths. This attribute is incompatible with <append=true>."),fi.CN.ERASURE_CODEC,"Turn off erasure-coding to create a table. The attribute can be monitored with the write_file, write_table commands, and on operation output paths. This attribute is incompatible with <append=true>."),fi.CN.OPTIMIZE_FOR,"Sets the storage format for output table. The attribute can be specified with the write_table command and on the output paths of operations. This attribute is not compatible with <append=true>."),hi=function(e){return e in vi?vi[e]:void 0},mi=(0,o.A)("add-option-form"),pi=function(e){var t=e.attributes,n=e.onChange,r=(0,a.useRef)(null),i=(0,li.A)(!1),o=(0,C.A)(i,2),l=o[0],s=o[1],u=(0,a.useMemo)((function(){return Object.values(t).map((function(e){var t=e.active,r=e.type;return(0,m.jsx)(di,{name:r,onUpdate:n,tooltip:hi(r)||"",checked:t},r)}))}),[t,n]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(In.$,{ref:r,view:"outlined",onClick:s,children:(0,m.jsx)(ii.I,{data:oi.A,size:16})}),(0,m.jsx)(ai.z,{anchorRef:r,open:l,contentClassName:mi(),onClose:s,children:u})]})},gi=n(21533),bi=n(50704),yi=[{value:"scan",content:"Scan"},{value:"lookup",content:"Lookup"}],Ai=function(e){var t=e.attribute,n=e.onChange;return t.active?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:"Optimize for:"}),(0,m.jsx)(gn.a,{defaultValue:t.value,onUpdate:function(e){n((0,i.A)((0,i.A)({},t),{},{value:e}))},options:yi})]}):null},Ci=function(e){var t=e.attribute,n=e.codecs,r=e.onChange;if(!t.active)return null;var o=t.value.split("_");return o.length>1&&(2===o.length?o[0]="".concat(o[0],"_"):o=[t.value]),(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)("div",{children:"Compression:"}),(0,m.jsx)(Lr,(0,i.A)((0,i.A)({value:o},n),{},{labels:["","level"],onChange:function(e){r((0,i.A)((0,i.A)({},t),{},{value:e.join("")}))}}))]})},xi=n(16455),Si=function(e){var t=e.attribute,n=e.codecs,r=e.onChange;return t.active?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:"Erasure codec:"}),(0,m.jsx)(Pr.L,{value:t.value,onChange:function(e){r((0,i.A)((0,i.A)({},t),{},{value:e||""}))},items:n})]}):null},Ni=(0,o.A)("output-path-control"),wi=function(e){var t=e.value,n=e.onChange,r=e.placeholder,i=e.disabled,o=(0,kr.wA)(),l=(0,kr.d4)(gi.CG),s=(0,kr.d4)(xi.gX),u=(0,kr.d4)(xi.dw);(0,a.useEffect)((function(){return t&&o((0,bi.Hw)(t)),function(){o((0,fi.jl)())}}),[o,t]);var c=(0,a.useCallback)((function(e,t){o((0,fi.Xy)({key:e,isActive:t}))}),[o]),d=(0,a.useCallback)((function(e){o((0,fi.XM)(e))}),[o]);return(0,m.jsxs)("div",{className:Ni(),children:[(0,m.jsxs)("div",{className:Ni("form"),children:[(0,m.jsx)(pi,{attributes:l,onChange:c}),(0,m.jsx)(zt.k,{hasClear:!0,value:t||"",onUpdate:n,placeholder:r,disabled:i})]}),(0,m.jsxs)("div",{className:Ni("attributes"),children:[(0,m.jsx)(Ai,{attribute:l[fi.CN.OPTIMIZE_FOR],onChange:d}),(0,m.jsx)(Ci,{attribute:l[fi.CN.COMPRESSION_CODEC],codecs:s,onChange:d}),(0,m.jsx)(Si,{attribute:l[fi.CN.ERASURE_CODEC],codecs:u,onChange:d})]})]})};wi.getDefaultValue=function(){return""},wi.isEmpty=function(e){return!e};var Ei=n(70243),ji=n(63863),Ti=n(49214),ki=n.n(Ti),Ii=n(53144),Oi=n.n(Ii),Ri=n(68309),Vi=n(89999),_i=n(82947),Fi=n(29746),Bi=n(19261);function Li(e){var t=e.value,n=e.onChange,r=(0,kr.d4)(_i.Gf),i=(0,Ri.Ou)({parameters:{requests:[{command:"list",parameters:{path:"//sys/accounts"}}]},id:Bi.V.listAccounts,errorTitle:"Failed to fetch accounts list"}),a=i.data,o=i.isLoading,l=(0,Vi.W)(void 0).data,s=a&&a.length&&a[0].output?Le()(ki()(Fi.A.getValue(a[0].output),Boolean),(function(e){return{value:e,content:e}})):[];return(0,m.jsxs)(Ei.s,{gap:2,direction:"column",children:[(0,m.jsx)(h.l,{onUpdate:n,options:s,multiple:!0,popupWidth:"fit",value:t,filterable:!0,hasClear:!0,width:"max",loading:o}),(0,m.jsxs)(Ei.s,{direction:"row",gap:1,children:[(0,m.jsx)(In.$,{size:"m",onClick:function(){var e=t.length&&""!==t[0]?(0,x.A)(t):[];n(Oi()(e,Le()(r,(function(e){return e.path}))))},children:(0,m.jsxs)(Ei.s,{alignItems:"center",gap:2,children:[(0,m.jsx)(ji.A,{}),"Favourites"]})}),(0,m.jsx)(In.$,{size:"m",onClick:function(){var e=t.length&&""!==t[0]?(0,x.A)(t):[];n(Oi()(e,l||[]))},children:(0,m.jsxs)(Ei.s,{alignItems:"center",gap:2,children:[(0,m.jsx)(ji.A,{}),"Usable"]})})]})]})}Li.isEmpty=function(e){return!e},Li.getDefaultValue=function(){return[]};var Di=n(70353),Pi=n(20803),zi=n.n(Pi),Mi=n(80648),Ui=n.n(Mi),qi=n(80676),Hi=n.n(qi),Gi=n(88144),$i=n.n(Gi),Wi=n(41169),Ki=n(40519),Zi=n(48971),Ji=n(74069),Yi=(0,o.A)("pool-suggest-control");function Qi(e){var t=e.allowEmpty,n=e.allowEphemeral,r=e.value,o=e.onChange,l=e.placeholder,s=e.poolTrees,u=e.cluster,c=e.calculateValueOnPoolsLoaded,d=e.disabled,f=a.useState([]),v=(0,C.A)(f,2),h=v[0],p=v[1],g=function(e,t){t=t||[];var n=a.useState(null),r=(0,C.A)(n,2),o=r[0],l=r[1],s=(0,Ji.BL)();return a.useMemo((function(){var n,r=t.length?t:s?[s]:[];if(r.length)return n=e?function(e,t){return Promise.all(t.map((function(t){return Wi.A.get("/api/pool-names/".concat(e,"?poolTree=").concat(t))}))).then((function(e){var t,n={},r=(0,Di.A)(e);try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=(0,Di.A)(a.data.names);try{for(o.s();!(i=o.n()).done;)n[i.value]=!0}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n)}))}(e,r):function(e){return Promise.all(e.map((function(e){return Gr.Qq.list(Gr.Vu.listPoolNames,(0,i.A)({path:"//sys/scheduler/orchid/scheduler/pool_trees/".concat(e,"/pools")},Ki.v))}))).then((function(e){var t,n={},r=(0,Di.A)(e);try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=(0,Di.A)(Fi.A.getValue(a));try{for(o.s();!(i=o.n()).done;)n[i.value]=!0}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n)}))}(r),(0,Zi.fI)(n,{skipSuccessToast:!0,toasterName:"load-pool-names",errorTitle:"Failed to load pools"}).then((function(e){l(e)}))}),[e,s,t.join()]),o}(u,s);a.useEffect((function(){if(g){var e=ki()(g,(function(e){return"<Root>"!==e})),t=zi()(e,r);r&&-1===t&&o(""),p(Yr()(e)),c&&o(c({loadedPoolNames:e}))}}),[g&&g.join(),p,o,c]);var b=a.useCallback((function(e,t){if(!t)return h;var n=Hi()(h,t,(function(e){return e.substring(0,t.length)})),r=$i()(h,t,(function(e){return e.substring(0,t.length)}));return Ui()(h,n,r)}),[h]);return(0,m.jsx)(Or.A,{popupClassName:Yi("popup"),text:r,filter:b,onItemClick:function(e){return o("string"==typeof e?e:e.value)},onTextUpdate:function(e){t&&!e?o(""):n&&o(e)},placeholder:l,disabled:d})}function Xi(e){var t=e.value,n=e.onChange,r=e.disabled,i=e.placeholder,o=(0,kr.d4)(Hr.iq);(0,Ji.si)();var l=a.useMemo((function(){return Le()(o,(function(e){return{value:e,content:e}}))}),[o]);return(0,m.jsx)(h.l,{disabled:r,value:t,options:l,onUpdate:n,placeholder:i,width:"max",filterable:(null==l?void 0:l.length)>5,multiple:!0})}Qi.getDefaultValue=function(){return""},Qi.isEmpty=function(e){return!e},Xi.getDefaultValue=function(){return[]},Xi.isEmpty=function(e){return!e.length};var ea=n(3659),ta=n(36197),na=(0,o.A)("table-sort-by-control");function ra(e){var t=e.value,n=e.suggestColumns,r=e.onChange,o=e.allowDescending,l=a.useMemo((function(){return Le()(t,"name")}),[t]),s=a.useState({}),u=(0,C.A)(s,2),c=u[0],d=u[1],f=a.useCallback((function(e){var t=Le()(e,(function(e){var t={name:e};return c[e]&&(t.descending=!0),t}));r(t)}),[c,r]);return(0,m.jsx)(ta.g,{className:na(),value:l,onUpdate:f,items:n,renderItemValue:function(e){var t=c[e],n=t?"sort-amount-up":"sort-amount-down-alt";return(0,m.jsxs)("div",{className:na("item"),children:[o&&(0,m.jsx)("span",{className:na("item-icon"),title:t?"Descending":"Ascending",onClick:function(){var t=(0,i.A)({},c);c[e]?delete t[e]:t[e]=!0,d(t)},children:(0,m.jsx)(N.A,{awesome:n})}),(0,m.jsx)("span",{className:na("item-name"),children:ea.A.decode(e)})]})}})}ra.getDefaultValue=function(){return[]},ra.isEmpty=function(e){return!(null!=e&&e.length)};var ia=n(64772),aa=n(53332),oa=(0,o.A)("table-chunk-size");function la(e){if(!e)return"";var t=(0,aa.z_)(e);return isNaN(t)?"Cannot parse as bytes":ia.A.Bytes(t)}function sa(){return["512M","2G"]}function ua(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,i=e.placeholder;return(0,m.jsxs)("div",{className:oa(),children:[(0,m.jsx)(Or.A,{text:n,popupClassName:oa("popup"),apply:function(e){return r("string"==typeof e?e:e.value)},filter:sa,items:["512M","2G"],placeholder:i||"Chunk size...",popupPlacement:["top"]}),(0,m.jsx)("div",{className:oa("pretty"),children:(0,m.jsxs)("span",{children:[la(n)," "]})})]})}ua.getDefaultValue=function(){},ua.isEmpty=function(e){return!e};var ca=n(10720);function da(e){var t=e.onChange,n=e.placeholder,r=e.value,i=a.useState([]),o=(0,C.A)(i,2),l=o[0],s=o[1],u=(0,kr.d4)(Hr.ID);return a.useEffect((function(){Gr.Qq.get(Gr.Vu.listUsableAccounts,{path:"//sys/users/".concat(u,"/@usable_accounts")}).then((function(e){s(e)})).catch((function(e){(new ca.I).add({name:"usable_accounts",theme:"danger",title:"Failed to load usable accounts",content:null==e?void 0:e.message,actions:[{label:" Details",onClick:function(){return(0,Zi.eW)(e)}}],autoHiding:!1})}))}),[u,s]),(0,m.jsx)(g.Oo,{placeholder:n,value:r,onChange:t,items:l})}da.isEmpty=function(e){return!e},da.getDefaultValue=function(){return""};var fa=n(65399),va=n(89648),ha=n(36877),ma=n(78519),pa=n(71217),ga=["value","onChange","unipikaSettings","nullPreview","folding"],ba=a.memo(Aa);function ya(e){var t=e.value,n=e.onChange,r=e.unipikaSettings,o=e.nullPreview,l=e.folding,s=(0,A.A)(e,ga),u=t.value,c=a.useCallback((function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).value;if(u!==e)if(void 0===u&&""===e);else try{e&&JSON.parse(e),n({value:e})}catch(t){if(!(t instanceof Error))return;n({value:e,error:t.message})}}),[n,u]),d=a.useCallback((function(e){n({value:u,error:"".concat(e)})}),[u,n]);return(0,m.jsx)(ha.O,(0,i.A)((0,i.A)({initialShowPreview:!0},s),{},{value:t,onChange:c,editorTitle:"Use JSON syntax"+(s.disabled?" (readonly)":""),editorLang:"json",renderPreview:function(){return(0,m.jsx)(pa.A,{maxCompactMessageLength:200,onError:d,disableRum:!0,children:(0,m.jsx)(ba,{value:t,nullPreview:o,settings:r,onError:d,folding:l})},u)}}))}function Aa(e){var t=e.value,n=t.value,r=t.error,i=e.settings,o=e.folding,l=e.onError,s=e.nullPreview,u=a.useMemo((function(){try{return JSON.parse(n||"null")}catch(e){return void l(e)}}),[n,l]);return r?(0,m.jsx)(va.E,{color:"danger",children:r}):null==u?(0,m.jsxs)(a.Fragment,{children:["Default value:",(0,m.jsx)(ma.A,{value:null!=s?s:null,folding:o,settings:i})]}):(0,m.jsx)(ma.A,{value:u,folding:o,settings:i})}ya.isEmpty=function(e){return!e},ya.validate=function(e){try{if(!e.value)return;return void JSON.parse(e.value)}catch(e){return e.message}},ya.getDefaultValue=function(){return{value:void 0}};var Ca=n(58595),xa=n(19948),Sa=n(66205),Na=n(11865),wa=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).onChange=function(t){var n=t.limit,r=t.source,i=t.error;(0,e.props.onChange)({limit:n,source:r,error:i})},e.getInfoByName=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props,r=n.poolsByName,i=n.resourceType,a=r[t];if(Fe()(a))return{limit:1/0,total:1/0};var o=(0,Na.h)(a,i),l=o.value;return{totalChildrenLimit:o.childrenSum,total:0,limit:l}},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.pool,n=e.format,r=e.value,a=void 0===r?{}:r,o=a.source,l=a.limit,s=e.error,u=e.initialLimit,c=e.decimalPlaces,d=e.min,f=e.max,v=e.sourcesSkipParent,h=e.limitInputTitle;return(0,m.jsx)(Ca.A,{currentAccount:t,sourceAccount:o,limit:l,prevLimit:u,min:d,max:f,error:s,format:n,onChange:this.onChange,getInfoByName:this.getInfoByName,renderSourceSuggest:function(e){return(0,m.jsx)(ja,(0,i.A)((0,i.A)({},e),{},{skipParent:v}))},limitInputTitle:h||"Guaranteed",sourceSuggestTitle:"Pool for distribution",decimalPlaces:c})}}],[{key:"getDefaultValue",value:function(){return{}}},{key:"isEmpty",value:function(e){return Fe()(e)}},{key:"validate",value:function(e){return e.error}},{key:"isEqual",value:function(e,t){return Oe()(e,t)}}])}(a.Component);wa.hasErrorRenderer=!0;const Ea=(0,kr.Ng)((function(e){return{poolsByName:(0,xa.w3)(e)}}))(wa);function ja(e){var t=e.value,n=e.onChange,r=e.disabled,i=e.skipParent,o=(0,kr.d4)(Sa.D2),l=(0,kr.d4)(Sa.m2),s=a.useMemo((function(){var e=i?l:o;return Le()(e,(function(e){return{value:e,text:e}}))}),[i,o,l]);return(0,m.jsx)(Pr.A,{value:t?[t]:void 0,onUpdate:function(e){return n(e[0])},items:s,disabled:!(null!=o&&o.length)||r,placeholder:"Select pool..."})}var Ta=n(80200),ka=n(63082),Ia=(0,o.A)("bundle-table-field"),Oa=[{id:"type",name:"Type",width:"25%"},{id:"memory",name:"Memory",width:"25%"},{id:"vcpu",name:"vCPU",width:"25%"},{id:"net",name:"Network",width:"25%"}];function Ra(e){var t=e.value,n=e.onChange,r=e.onRadioClick,i=e.data,o=(0,a.useMemo)((function(){return[{id:"radio",name:"",template:function(e){var i=(null==t?void 0:t.type)===e.id;return(0,m.jsx)(Ta.s,{value:e.id,checked:i,onUpdate:function(t){t&&(n(e.initialData),"function"==typeof r&&r(e.initialData))},disabled:e.disabled})}}].concat(Oa)}),[i,t]);return(0,m.jsx)(ka.X,{className:Ia("table"),columns:o,data:i,edgePadding:!0})}Ra.isEmpty=function(e){return!e},Ra.getDefaultValue=function(){return""};var Va=n(79240);const _a=function(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14"},e),{},{children:(0,m.jsx)("path",{fillOpacity:.3,d:"M1.21 1.361a.293.293 0 0 0-.507.203v3.631c0 .178.127.305.305.305h3.63a.293.293 0 0 0 .204-.508L3.47 3.622A4.88 4.88 0 0 1 7 2.147a4.985 4.985 0 0 1 4.977 4.977A4.97 4.97 0 0 1 7 12.102a4.94 4.94 0 0 1-3.326-1.245c-.127-.101-.305-.101-.406 0l-.508.508a.32.32 0 0 0 0 .457 6.4 6.4 0 0 0 4.24 1.6c3.453 0 6.272-2.793 6.297-6.272 0-3.478-2.844-6.322-6.322-6.322-1.727 0-3.301.711-4.444 1.854z"})}))};var Fa=(0,o.A)("bundle-title");function Ba(e){var t=e.className,n=e.params,r=e.onReset;return(0,m.jsxs)("div",{className:Fa(null,t),children:[(0,m.jsx)(Va.h,{className:Fa("params"),params:n,size:"m"}),(0,m.jsxs)(In.$,{className:Fa("btn"),onClick:r,children:[(0,m.jsx)(ii.I,{className:Fa("icon"),data:_a}),"Reset to default"]})]})}Ba.isEmpty=function(e){return!e},Ba.getDefaultValue=function(){return""};var La=n(11970),Da=n(19410),Pa=(0,o.A)("yt-bundle-input");function za(e){var t=e.value,n=e.onChange,r=e.postfix,o=e.hint,l=e.readonly,s=e.format,u=e.progress,c=e.withoutDetailedBar,d=void 0!==c&&c,f=e.hasClear,v=void 0!==f&&f,h=e.decimalPlaces,p=e.preciseInitialRawValue,g=e.error,b=e.disabled,y=(0,a.useState)(),A=(0,C.A)(y,2),x=A[0],S=A[1],N=(0,a.useState)(),w=(0,C.A)(N,2),E=w[0],j=w[1],T=(0,a.useState)(),k=(0,C.A)(T,2),I=k[0],O=k[1],V=(0,a.useState)(),_=(0,C.A)(V,2),F=_[0],B=_[1],L=(0,a.useState)(!1),D=(0,C.A)(L,2),P=D[0],z=D[1];(0,a.useEffect)((function(){E!==g&&j(g)}),[g]),(0,a.useEffect)((function(){if(x!==t){var e=(0,R.Fl)(t,s,{digits:h});S(t),B(e),void 0===I&&O(p?function(e){return void 0===e?"":String(e)}(t):e)}}),[t]);var M=P?I:F,U=u&&(0,Zi.z)((null==u?void 0:u.usage)||0,Number(t)||0,s);return(0,m.jsxs)("div",{className:Pa(null),children:[(0,m.jsx)("div",{className:Pa("row"),children:(0,m.jsx)("div",{className:Pa("right"),children:(0,m.jsxs)("div",{className:Pa("control-block"),children:[l?(0,m.jsx)("span",{className:Pa("text"),children:t}):(0,m.jsx)(zt.k,{className:Pa("input"),autoComplete:!1,value:M,onUpdate:function(e){var t=(0,R.$x)(e,s),r=function(e){if(Number.isNaN(e))return"wrong format"}(t);S(t),O(e),B((0,R.Fl)(t,s,{digits:h})),j(r),r||n(t)},hasClear:v,error:Boolean(E),onFocus:function(){return z(!0)},onBlur:function(){return z(!1)},disabled:b}),!d&&(0,m.jsx)(Ma,{data:r||F})]})})}),U&&(0,m.jsx)("div",{className:Pa("row"),children:(0,m.jsx)(Da.m,{content:"Usage",children:(0,m.jsx)("div",{className:Pa("left"),children:(0,m.jsx)(La.k,(0,i.A)({className:Pa("progress")},U))})})}),!E&&o&&(0,m.jsx)("div",{className:Pa("row"),children:(0,m.jsx)("span",{className:Pa("hint",Pa("right")),children:o})}),E&&(0,m.jsx)("div",{className:Pa("row"),children:(0,m.jsx)("span",{className:Pa("error",Pa("right")),children:E})})]})}function Ma(e){var t=e.data;return t?(0,m.jsx)("span",{className:Pa("meta"),children:t}):null}function Ua(e){var t=d.Ay.renderControlAbcService(e);return(0,m.jsx)(m.Fragment,{children:t||"-"})}za.isEmpty=function(e){return!e},za.getDefaultValue=function(){return""},za.hasErrorRenderer=!0,Ua.getDefaultValue=function(){};var qa=n(15672),Ha=(0,o.A)("before-date-picker"),Ga="unlimited",$a="period",Wa="date",Ka=[Ga,$a,Wa],Za=(0,r.A)((0,r.A)((0,r.A)({},Ga,"Forever"),$a,"Period"),Wa,"To Date"),Ja=864e5,Ya=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).state={viewType:null,period:null,periodError:null},e.onChangeViewType=function(n){var r=n.target.value;e.setState({viewType:r,periodError:null,period:null});var i=e.props.value;r===t.UNLIMITED&&null!==i&&e.onNewDate(null)},e.onChangePeriod=function(t){e.setState({period:t});var n=Number.parseInt(t);String(n)===t?e.onNewDate(function(e){var t=(new Date).getTime();return new Date(t+e*Ja)}(n)):""!==t&&e.setState({periodError:"Please enter a valid number"})},e.onDate=function(t){e.onNewDate(new Date(t.from))},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"renderRadioButton",value:function(){var e=this.state.viewType,t=this.props.size;return(0,m.jsx)("div",{children:(0,m.jsx)(gn.a,{size:t,value:e||void 0,onChange:this.onChangeViewType,className:Ha("view-type"),children:Ka.map((function(e){return(0,m.jsx)(gn.a.Option,{value:e,children:Za[e]},e)}))})})}},{key:"renderDateInput",value:function(){var e=this.state,n=e.viewType,r=e.periodError,i=e.period,a=this.props,o=a.value,l=a.size,s=null;if(n===t.PERIOD){var u=null===i?function(e){if(e instanceof Date){var t=e.getTime()-(new Date).getTime();return Math.ceil(t/Ja)}}(o):i;s=(0,m.jsx)(zt.k,{error:r||void 0,onUpdate:this.onChangePeriod,value:String(u||""),size:l,placeholder:"Enter days"})}return n===t.DATE&&(s=(0,m.jsx)(qa.t1,{controlSize:l,from:o&&o.getTime(),range:!1,onUpdate:this.onDate,controlWidth:"unset"})),(0,m.jsx)("div",{className:Ha("input-container"),children:s})}},{key:"onNewDate",value:function(e){var t=this.props.onChange;this.setState({periodError:null,period:null}),t(e)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.onFocus,r=e.onBlur;return(0,m.jsxs)(Bn,{className:Ha(null,t),onBlur:r,onFocus:n,children:[this.renderRadioButton(),this.renderDateInput()]})}}],[{key:"getDefaultValue",value:function(){}},{key:"isEmpty",value:function(){return!1}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r={};return t.viewType||"unlimited"===t.viewType||(r.viewType=n?"date":"unlimited"),Object.keys(r).length>0?r:null}}])}(a.Component);Ya.UNLIMITED=Ga,Ya.PERIOD=$a,Ya.DATE=Wa,Ya.defaultProps={value:null};const Qa=Ya;var Xa=n(81954),eo=["value","onChange"];function to(e){var t=e.value,n=void 0===t?{}:t,r=e.onChange,a=(0,A.A)(e,eo);return(0,m.jsx)(qa.t1,(0,i.A)((0,i.A)((0,i.A)({},a),{},{allowNullableValues:!0},n),{},{onUpdate:function(e){r(e)}}))}to.getDefaultValue=function(){};var no=n(47293),ro=["onChange"];function io(e){var t=e.onChange,n=(0,A.A)(e,ro);return(0,m.jsx)(no.O,(0,i.A)((0,i.A)({},n),{},{onUpdate:t}))}function ao(e){e.stopPropagation()}function oo(e){var t;return null!==(t=null==e?void 0:e.join("\n"))&&void 0!==t?t:""}function lo(e){var t=e.value,n=e.onChange,r=e.disabled,i=a.useState(),o=(0,C.A)(i,2),l=o[0],s=o[1],u=a.useMemo((function(){return oo(t)}),[t]);return(0,m.jsx)(tn,{placeholder:"Enter one column name per line",value:null!=l?l:u,disabled:r,onUpdate:function(e){s(e)},onFocus:function(){s(oo(t))},onBlur:function(){var e,t;n(null!==(t=null==(e=l)?void 0:e.split("\n"))&&void 0!==t?t:[]),s(void 0)},minRows:5,maxRows:10,onKeyDown:ao,onKeyUp:ao,onKeyPress:ao})}io.getDefaultValue=function(){return NaN},io.isEmpty=function(e){return void 0===e},lo.isEmpty=function(e){return!(null!=e&&e.length)},lo.getDefaultValue=function(){};var so=n(38790),uo=n(39760),co=n.n(uo);function fo(e){var t,n,r=e.value,o=void 0===r?[{tree:"",pool:""}]:r,l=e.onChange,s=e.disabled,u=function(e){var t=(0,Ri.Ou)({id:Gr.Vu.listPoolsTrees,parameters:{requests:[{command:"list",parameters:{path:"//sys/scheduler/orchid/scheduler/pool_trees"}}]},errorTitle:"Failed to fetch list of pools trees"}),n=t.data,r=t.isLoading,i=n&&(null==n?void 0:n.length)&&(null==n?void 0:n[0].output),o=(0,a.useMemo)((function(){return i?Le()(n[0].output,(function(e){return{value:e,content:e}})):[]}),[i]);return{trees:(0,a.useMemo)((function(){return e.map((function(e){return e.tree})).filter((function(e){return Boolean(e)}))}),[e]),isTreesLoading:r,treesOptions:o}}(o),c=u.trees,d=u.isTreesLoading,f=u.treesOptions,v=function(e){var t=(0,a.useMemo)((function(){return e.map((function(e){return{command:"list",parameters:{path:"//sys/scheduler/orchid/scheduler/pool_trees/".concat(e,"/pools")}}}))}),[e]),n=(0,Ri.Ou)({id:Gr.Vu.listPools,parameters:{requests:t},errorTitle:"Failed to fetch pools list"}),r=n.data;return{isPoolsLoading:n.isLoading,poolOptionsMap:(0,a.useMemo)((function(){var t={};return r&&r.length&&co()(e,(function(e,n){r[n]&&r[n].output?t[e]=Le()(Fi.A.getValue(r[n].output),(function(e){return{value:e,content:e}})):t[e]=[]})),t}),[r,e])}}(c),p=v.poolOptionsMap,g=v.isPoolsLoading,b=function(e,t){return{addPair:function(){t([].concat((0,x.A)(e),[{tree:"",pool:""}]))},removePair:function(n){var r=(0,x.A)(e);r.splice(n,1),t(r)},updateTree:function(n,r){var a=(0,x.A)(e);a[n]=(0,i.A)((0,i.A)({},a[n]),{},{tree:r,pool:""}),t(a)},updatePool:function(n,r){var a=(0,x.A)(e);a[n]=(0,i.A)((0,i.A)({},a[n]),{},{pool:r}),t(a)}}}(o,l),y=b.removePair,A=b.addPair,C=b.updateTree,S=b.updatePool,N=Boolean(o.length)&&(null===(t=o[o.length-1])||void 0===t?void 0:t.pool)&&(null===(n=o[o.length-1])||void 0===n?void 0:n.tree);return(0,m.jsxs)(Ei.s,{gap:2,direction:"column",children:[o.map((function(e,t){return(0,m.jsxs)(Ei.s,{gap:2,direction:"row",alignItems:"center",children:[(0,m.jsx)(h.l,{onUpdate:function(e){return C(t,e[0])},options:f,popupWidth:"fit",value:[e.tree],filterable:!0,hasClear:!0,width:"max",loading:d,disabled:s,placeholder:"Select tree"}),(0,m.jsx)(h.l,{onUpdate:function(e){return S(t,e[0])},options:e.tree&&p[e.tree]||[],popupWidth:"fit",value:[e.pool],filterable:!0,hasClear:!0,width:"max",loading:g&&Boolean(e.tree),disabled:s||!e.tree,placeholder:"Select pool"}),o.length>1&&(0,m.jsx)(In.$,{view:"flat",onClick:function(){return y(t)},disabled:s,children:"Remove"})]},t)})),N&&(0,m.jsx)(Ei.s,{children:(0,m.jsx)(In.$,{size:"m",onClick:A,disabled:s,children:(0,m.jsxs)(Ei.s,{alignItems:"center",gap:2,children:[(0,m.jsx)(ji.A,{}),"Add Pool Pair"]})})})]})}fo.isEmpty=function(e){return!e||0===e.length||e.every((function(e){return!e.tree||!e.pool}))},fo.getDefaultValue=function(){return[{tree:"",pool:""}]},fo.validate=function(e){if(e.length)return e[e.length-1].tree&&!e[e.length-1].pool?"Pool option is required":void 0};var vo=n(68051),ho=n(65667);function mo(e,t){try{var n=t.getState();if(!Boolean((0,Hr.jU)(n).chyt_controller_base_url))throw new Error("CHYT is not allowed on current cluster");return{data:ho.v.apply(void 0,(0,x.A)(e))}}catch(e){return{error:e}}}var po=vo.v.injectEndpoints({endpoints:function(e){return{chytFetch:e.query({queryFn:mo})}}}).useChytFetchQuery,go=n(79366),bo=n(27091);function yo(e){var t,n,r,a=e.value,o=void 0===a?[{service:"",item:""}]:a,l=e.onChange,s=e.disabled,u=(0,kr.d4)(Hr.jU).chyt_controller_base_url,c=(0,Ri.Ou)({parameters:{requests:[{command:"exists",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles"}}]},id:Gr.Vu.tabletBundleControllerState,errorTitle:"Failed to fetch bundle controller existance"}).data,d=[];u&&d.push({value:"chyt",content:"CHYT"}),null!=c&&null!==(t=c[0])&&void 0!==t&&t.output&&d.push({value:"bundle",content:"Bundle"});var f,v,p,g,b,y={bundles:(b=(0,Ri.Ou)({id:Gr.Vu.listBundles,parameters:{requests:[{command:"list",parameters:(0,i.A)({path:"//sys/tablet_cell_bundles"},Ki.v)}]},errorTitle:"Failed to fetch bundles list"},{selectFromResult:function(e){var t;return{bundles:null!=e&&e.data&&null!==(t=e.data)&&void 0!==t&&t.length?e.data[0].output:[],isBunldesLoading:e.isLoading}}})).bundles,isBundlesLoading:b.isBundlesLoading},A=y.bundles,C=y.isBundlesLoading,S=(f=(0,kr.d4)(Hr.dB),v=(0,kr.d4)(go.dU),p=new Set(["yt_operation_id","creator","state","health","health_reason"].concat((0,x.A)(bo.F))),{cliques:(g=po(["list",f,{attributes:(0,x.A)(p)},{isAdmin:v}],{selectFromResult:function(e){return{cliques:null!=e&&e.data&&"result"in e.data&&e.data.result?Le()(e.data.result,(function(e){return Fi.A.getValue(e)})):[],isCliquesLoading:e.isLoading}}})).cliques,isCliquesLoading:g.isCliquesLoading}),N=S.cliques,w=S.isCliquesLoading,E=function(e,t){return{addPair:function(){t([].concat((0,x.A)(e),[{service:"",item:""}]))},removePair:function(n){var r=(0,x.A)(e);r.splice(n,1),t(r)},updateService:function(n,r){var a=r,o=(0,x.A)(e);o[n]=(0,i.A)((0,i.A)({},o[n]),{},{service:a,item:""}),t(o)},updateItem:function(n,r){var a=(0,x.A)(e);a[n]=(0,i.A)((0,i.A)({},a[n]),{},{item:r}),t(a)}}}(o,l),j=E.addPair,T=E.removePair,k=E.updateItem,I=E.updateService,O=function(e){if(!e.service)return[];var t="chyt"===e.service?N:A;return Le()(t,(function(e){return{value:e,content:e}}))},R=function(e){return!!e.service&&("chyt"===e.service?w:C)},V=function(e){return e.service?"Select ".concat("chyt"===e.service?"clique":"bundle"):"Select item"};return(0,m.jsx)(m.Fragment,{children:d.length?(0,m.jsxs)(Ei.s,{direction:"column",gap:2,children:[o.map((function(e,t){return(0,m.jsxs)(Ei.s,{gap:2,children:[(0,m.jsx)(h.l,{options:d,onUpdate:function(e){return I(t,e[0])},popupWidth:"fit",value:[e.service],hasClear:!0,width:"max",disabled:s,placeholder:"Select service"}),(0,m.jsx)(h.l,{onUpdate:function(e){return k(t,e[0])},width:"max",hasClear:!0,filterable:!0,value:[e.item],options:O(e),loading:R(e),disabled:s||!e.service,placeholder:V(e)}),o.length>1&&(0,m.jsx)(In.$,{view:"flat",onClick:function(){return T(t)},disabled:s,children:"Remove"})]},t)})),Boolean(o.length)&&(null===(n=o[o.length-1])||void 0===n?void 0:n.service)&&(null===(r=o[o.length-1])||void 0===r?void 0:r.item)&&(0,m.jsx)(Ei.s,{children:(0,m.jsx)(In.$,{size:"m",onClick:j,disabled:s,children:(0,m.jsxs)(Ei.s,{alignItems:"center",gap:2,children:[(0,m.jsx)(ji.A,{}),"Add Service"]})})})]}):(0,m.jsx)(va.E,{color:"danger",variant:"body-2",children:"There are no services available on current cluster"})})}yo.isEmpty=function(e){return!e},yo.getDefaultValue=function(){return[{service:"",item:""}]},yo.validate=function(e){var t,n;if(e.length&&null!==(t=e[e.length-1])&&void 0!==t&&t.service&&(null===(n=e[e.length-1])||void 0===n||!n.item)){var r=e[e.length-1].service;return"".concat("chyt"===r?"Clique":"Bundle"," option is required")}};var Ao=(0,o.A)("yt-dialog");function Co(e){var t=e.modal,n=e.asLeftTopBlock,a=e.headerProps,o=e.hotkeyScope,l=void 0===o?"yt-dialog":o,s=(0,m.jsx)(Cr,(0,i.A)((0,i.A)({},e),{},{modal:!n&&t}));return(0,so.B)(l,e.visible),n?(0,m.jsx)("div",{className:Ao("as-block",(0,r.A)({},"has-header",Boolean(a))),children:s}):s}xr("abc-control",Ua),xr("accountsSuggest",g.Ay),xr("usable-account",da),xr("accounts-suggest-with-loading",g.Dk),xr("accounts-with-presets",Li),xr("cluster",y.A),xr("acl-subjects",f),xr("acl-roles",jr),xr("acl-column-group",p),xr("acl-columns",lo),xr("permissions",v.A),xr("yt-group",b.A),xr("sortable-list",O),xr("bytes",_),xr("number",F),xr("time-duration",Xa.WM),xr("datepicker",to),xr("select-with-subitems",Lr),xr("yt-select",Pr.A),xr("yt-select-single",Pr.L),xr("create-table-lock-suggest",_r),xr("create-table-group-suggest",Fr),xr("create-pool-parent",Ur),xr("tablet-cell-bundle",Zr),xr("path",ri),xr("output-path",wi),xr("editable-path-list",ei),xr("pool",Qi),xr("pool-tree",Xi),xr("pools-multiple",fo),xr("table-sort-by",ra),xr("table-chunk-size",ua),xr("annotation",fa.U),xr("json",ya),xr("pool-quota-editor",Ea),xr("bundle-table-field",Ra),xr("bundle-title",Ba),xr("bundle-input",za),xr("range-input-picker",io),xr("before-date",Qa),xr("services-select",yo),Sr("yt-create-table-tab",Tr.Ay)},75299:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(77810),i=function(e,t){return"boolean"==typeof t?t:!e};const a=function(e){return(0,r.useReducer)(i,e)}},76866:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(77810),i=n(33882),a=n(84549),o=n(64922),l=r.lazy((function(){return Promise.all([n.e(3872),n.e(8967),n.e(8810)]).then(n.bind(n,79647))}));const s=(0,i.A)(l,(0,o.jsx)(a.A,{visible:!0}))},77654:(e,t,n)=>{"use strict";n.d(t,{W:()=>u}),n(77810);var r=n(44415),i=n(15647),a=n(71217),o=n(13542),l=n(52797),s=n(64922);function u(e){var t=e.children;return(0,s.jsx)(i.Kq,{store:(0,o.ai)(),children:(0,s.jsx)(c,{children:(0,s.jsx)(a.A,{children:t})})})}function c(e){var t=e.children,n=(0,i.d4)(l.O4);return(0,s.jsx)(r.N,{theme:n,children:t})}},79240:(e,t,n)=>{"use strict";n.d(t,{h:()=>o}),n(77810);var r=n(76872),i=n(64922),a=(0,r.A)("bundle-params-list"),o=function(e){var t=e.className,n=e.params,r=e.size,o=void 0===r?"s":r;return(0,i.jsx)("div",{className:a({size:o},t),children:n.map((function(e){return(0,i.jsxs)("span",{children:[e.title," ",(0,i.jsxs)("span",{className:a("value",{type:e.type}),children:[e.value," ",e.postfix]})]},e.title)}))})}},79703:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(40319),i=n(64922);const a=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.44 4.54c.43-.354.994-.565 1.56-.565 1.217 0 2.34.82 2.34 2.14 0 .377-.078.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.325.257-.379.328-.038.052-.038.07-.038.089a.75.75 0 0 1-1.5 0c0-.794.544-1.286 1.057-1.645.28-.196.4-.332.458-.426a.54.54 0 0 0 .075-.312c0-.3-.244-.641-.84-.641a1 1 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 0 1-1.5 0c0-.674.345-1.22.78-1.577M8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})}))}},81954:(e,t,n)=>{"use strict";n.d(t,{WM:()=>m,zA:()=>p});var r=n(70353),i=n(13322),a=n(40319),o=(n(77810),n(41655)),l=n.n(o),s=n(76872),u=n(17271),c=n(19410),d=n(42321),f=n(88787),v=n(64922),h=(0,s.A)("yt-time-duration");function m(e){var t,n=e.value,r=e.onChange,i=e.error;return(0,v.jsxs)("div",{className:h(),children:[(0,v.jsx)(u.W9,{className:h("input"),value:(0,a.A)((0,a.A)({},n),{},{value:null==n?void 0:n.value,error:null!==(t=null==n?void 0:n.error)&&void 0!==t?t:i}),onChange:r,formatFn:p,parseFn:g}),(0,v.jsx)(c.m,{content:(0,v.jsxs)("div",{children:[(0,v.jsx)(d.Ay,{items:[b({y:"years",w:"weeks",M:"months",d:"days"}),b({h:"hours",m:"minutes",s:"seconds",ms:"milliseconds"})]}),"1M=30d",(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),"Examles: 1M2d3h, 4h15m"]}),children:(0,v.jsx)(f.A,{className:h("info"),awesome:"question-circle"})})]})}function p(e){if(!e&&0!==e)return"";var t=e,n="",r=36e5,i=24*r,a={y:365*i,M:30*i,d:i,h:r,m:6e4,s:1e3,ms:1};return Object.keys(a).forEach((function(e){var r=a[e],i=Math.floor(t/r);i>0&&(n+="".concat(i).concat(e," "),t-=i*r)})),n}function g(e){if(!e)return{value:void 0};if(!/^[\d\sa-zA-Z]*$/.test(e))return{value:void 0,error:"only digits and latin characters are allowed"};var t=e.replace(/\s+/g,""),n=(0,i.A)(t.matchAll(/\d+[a-zA-Z]*/g));if(!n.length||0!==n[0].index)return{value:void 0,error:"wrong format"};var a,o=0,s=(0,r.A)(n);try{for(s.s();!(a=s.n()).done;){var u,c=a.value[0].match(/\d+/)||{},d=c[0],f=c.input;if(!d)return{value:void 0,error:"wring fromat 1"};var v=null!==(u=null==f?void 0:f.substring(d.length))&&void 0!==u?u:"",h=Number(d),m=l().duration(h,v).valueOf();if(0===m&&0!==h)return{value:void 0,error:"wrong format of ".concat(f)};o+=m}}catch(e){s.e(e)}finally{s.f()}return{value:o}}function b(e){return Object.keys(e).map((function(t){return{key:t,label:t,value:e[t]}}))}m.hasErrorRenderer=!0,m.getDefaultValue=function(){return{value:void 0}},m.isEmpty=function(e){return!e},m.validator=function(e){return null==e?void 0:e.error}},87446:(e,t,n)=>{"use strict";n.d(t,{m:()=>v});var r=n(64922),i=n(77810),a=n(13778),o=n(1093),l=n(73384),s=n(89648),u=n(21086),c=n(93434);const d=(0,u.om)("tooltip"),f=["bottom","top"],v=e=>{const{children:t,content:n,disabled:u,placement:v=f,qa:h,id:m,className:p,style:g,disablePortal:b,contentClassName:y,openDelay:A=1e3,closeDelay:C}=e,[x,S]=i.useState(null),N=(0,o.d)(x,{openDelay:A,closeDelay:C,preventTriggerOnFocus:!0}),w=i.Children.only(t),E=(0,c.Q)(w),j=(0,a.N)(S,E);return(0,r.jsxs)(i.Fragment,{children:[i.cloneElement(w,{ref:j}),x?(0,r.jsx)(l.z,{id:m,role:"tooltip",className:d(null,p),style:g,open:N&&!u,placement:v,anchorRef:{current:x},disablePortal:b,disableEscapeKeyDown:!0,disableOutsideClick:!0,disableLayer:!0,qa:h,children:(0,r.jsx)("div",{className:d("content",y),children:(0,r.jsx)(s.E,{variant:"body-short",color:"complementary",children:n})})}):null]})}},87871:(e,t,n)=>{"use strict";n.d(t,{Oo:()=>C,Dk:()=>N,_C:()=>S,Ay:()=>x});var r=n(40319),i=n(9736),a=n(77810),o=n(15647),l=n(27528),s=n.n(l),u=n(76872),c=n(8208),d=n(48109),f=n(99526),v=n(10352),h=n(88681),m=n(40519),p=n(27859),g=n(67270),b=n(64922),y=(0,u.A)("accounts-suggest"),A="<Root>";function C(e){var t=e.items,n=e.onChange,r=e.placeholder,i=e.allowRootAccount,a=e.disabled,o=e.validate,l=void 0===o?function(){}:o,u=e.touched,c=e.value,f=s()(t,(function(e){return{value:e,text:e}}));i&&f.splice(0,0,{value:d.$T,text:A});var v=u&&l(c);return(0,b.jsxs)("div",{className:y({empty:!c,error:Boolean(v)}),children:[(0,b.jsx)(g.L,{disabled:a,items:f,onChange:n,placeholder:r,value:c,width:"max",hideClear:!0}),v&&(0,b.jsx)("div",{className:y("error"),children:v})]})}C.isEmpty=function(e){return!e},C.getDefaultValue=function(){return""},C.hasErrorRenderer=!0;const x=(0,o.Ng)((function(e){return{items:(0,v.SD)(e)}}))(C);var S=(0,o.Ng)((function(e){return{items:(0,f.nD)(e)}}))(C);function N(e){var t=a.useState({items:[]}),n=(0,i.A)(t,2),o=n[0],l=o.items,s=o.error,u=n[1];return a.useMemo((function(){(0,h.IF)(p.Vu.listAccounts,(0,r.A)({path:"//sys/accounts"},m.R)).then((function(e){u({items:e})})).catch((function(e){u({error:e})}))}),[]),(0,b.jsxs)(a.Fragment,{children:[(0,b.jsx)(C,(0,r.A)((0,r.A)({},e),{},{items:l||[]})),s&&(0,b.jsx)(c.z,{error:s})]})}N.isEmpty=function(e){return!e},N.getDefaultValue=function(){return d.$T}},89999:(e,t,n)=>{"use strict";n.d(t,{h:()=>d,W:()=>f});var r=n(68051),i=n(53775),a=n(28407),o=n(52797),l=n(27859),s=n(48971);function u(e,t){return c.apply(this,arguments)}function c(){return c=(0,a.A)((0,i.A)().mark((function e(t,n){var r,a,u,c,d,f;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a=n.getState(),u=(0,o.ID)(a),e.next=5,l.Qq.executeBatch(l.Vu.usableAccounts,{parameters:{requests:[{command:"get",parameters:{path:"//sys/users/".concat(u,"/@usable_accounts")}}]}});case 5:if(c=e.sent,!(d=(0,s.$7)(c,"Failed to get usable accounts"))){e.next=9;break}throw d;case 9:return f=null==c||null===(r=c[0])||void 0===r?void 0:r.output,e.abrupt("return",{data:f});case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",{error:e.t0});case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),c.apply(this,arguments)}var d=r.v.injectEndpoints({endpoints:function(e){return{usableAccounts:e.query({queryFn:u})}}}),f=d.useUsableAccountsQuery},95664:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(7787);function i(e){return r.Ay.renderSubjectCard(e)}}}]);
3
- //# sourceMappingURL=yt-df-dialog.ba05eea6.chunk.js.map
1
+ /*! For license information please see yt-df-dialog.5aa0b817.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_ytsaurus_ui=self.webpackChunk_ytsaurus_ui||[]).push([[2736],{11896:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});var r={CLUSTER_PARAMS:"CLUSTER_PARAMS",ACCOUNTS:"ACCOUNTS_",NAVIGATION_PRELOAD:"NAVIGATION_PRELOAD",NAVIGATION_CONTENT_DOCUMENT:"NAVIGATION_CONTENT_DOCUMENT",NAVIGATION_CONTENT_FILE:"NAVIGATION_CONTENT_FILE",NAVIGATION_CONTENT_LINK:"NAVIGATION_CONTENT_LINK",NAVIGATION_CONTENT_MAP_NODE:"NAVIGATION_CONTENT_MAP_NODE_",NAVIGATION_CONTENT_REPLICATED_TABLE:"NAVIGATION_CONTENT_REPLICATED_TABLE",NAVIGATION_CONTENT_TABLE_STATIC:"NAVIGATION_CONTENT_TABLE_STATIC",NAVIGATION_CONTENT_TABLE_DYNAMIC:"NAVIGATION_CONTENT_TABLE_DYNAMIC",NAVIGATION_CONTENT_TRANSACTION:"NAVIGATION_CONTENT_TRANSACTION",NAVIGATION_CONTENT_TRANSACTION_MAP:"NAVIGATION_CONTENT_TRANSACTION_MAP",NAVIGATION_TAB_ACL:"NAVIGATION_TAB_ACL",NAVIGATION_TAB_ACL_ACCESS:"NAVIGATION_TAB_ACL_ACCESS",NAVIGATION_TAB_ANNOTATION:"NAVIGATION_TAB_ANNOTATION",NAVIGATION_TAB_ATTRIBUTES:"NAVIGATION_TAB_ATTRIBUTES",NAVIGATION_TAB_USER_ATTRIBUTES:"NAVIGATION_TAB_USER_ATTRIBUTES",NAVIGATION_TAB_LOCKS:"NAVIGATION_TAB_LOCKS",NAVIGATION_TAB_SCHEMA:"NAVIGATION_TAB_SCHEMA",NAVIGATION_TAB_TABLETS:"NAVIGATION_TAB_TABLETS",NAVIGATION_TAB_TABLET_ERRORS:"NAVIGATION_TAB_TABLET_ERRORS",OPERATIONS_LIST:"OPERATIONS_LIST_",OPERATION:"OPERATION",OPERATION_TAB_DETAILS:"OPERATION_TAB_DETAILS",OPERATION_TAB_ATTRIBUTES:"OPERATION_TAB_ATTRIBUTES",OPERATION_TAB_SPECIFICATION:"OPERATION_TAB_SPECIFICATION",OPERATION_TAB_STATISTICS:"OPERATION_TAB_STATISTICS",OPERATION_TAB_MONITOR:"OPERATION_TAB_MONITOR",OPERATION_TAB_PARTITION_SIZES:"OPERATION_TAB_PARTITION_SIZES",OPERATION_TAB_JOB_SIZES:"OPERATION_TAB_JOB_SIZES",OPERATION_TAB_JOBS:"OPERATION_TAB_JOBS",SCHEDULING:"SCHEDULING_",SCHEDULING_OVERVIEW:"SCHEDULING_OVERVIEW",SCHEDULING_DETAILS:"SCHEDULING_DETAILS",SCHEDULING_MONITOR:"SCHEDULING_MONITOR",SCHEDULING_ACL:"SCHEDULING_ACL",YQL_KIT_WIDGET:"YQL_KIT_WIDGET"}},11970:(e,t,n)=>{"use strict";n.d(t,{k:()=>v});var r=n(64922),i=n(77810);const a=(0,n(21086).om)("progress");function o(e){const{text:t,offset:n=0}=e;return t?(0,r.jsx)("div",{className:a("text-inner"),style:{transform:`translateX(calc(var(--g-flow-direction) * ${-n}%))`},children:t}):null}function l({item:e}){const{value:t,color:n,className:i,theme:o,title:l,content:s,loading:u}=e,c={loading:u};return void 0===n&&(c.theme=o||"default"),Number.isFinite(t)?(0,r.jsx)("div",{className:a("item",c,i),style:{width:`${t}%`,backgroundColor:n},title:l,children:s}):null}function s(e){return e<100?e-100:0}function u(e){const{theme:t,colorStops:n,colorStopsValue:r,value:i}=e;if(n){const e=n.find(((e,t)=>{const a="number"==typeof r?r:i,o=t>1?n[t-1].stop:0,l=t<n.length-1?e.stop:100;return a>=o&&a<=l}));return e?e.theme:t}return t}function c(e){const{stack:t,stackClassName:n,value:i,text:u}=e,c=s(i||function(e){return e.reduce(((e,{value:t})=>e+t),0)}(t));return(0,r.jsxs)("div",{className:a("stack",n),style:{transform:`translateX(calc(var(--g-flow-direction) * ${c}%))`},children:[(0,r.jsx)("div",{className:a("item"),style:{width:-c+"%"}}),t.map(((e,t)=>(0,r.jsx)(l,{item:e},t))),(0,r.jsx)(o,{offset:c,text:u})]})}function d(e){const{value:t,loading:n,text:i}=e,l=s(t);return Number.isFinite(t)?(0,r.jsx)("div",{className:a("item",{theme:u(e),loading:n}),style:{transform:`translateX(calc(var(--g-flow-direction) * ${l}%))`},children:(0,r.jsx)(o,{offset:l,text:i})}):null}function f(e){return void 0!==e.stack}const v=i.forwardRef((function(e,t){const{text:n="",theme:i="default",size:o="m",loading:l=!1,className:s,qa:u}=e,v=Object.assign(Object.assign({},e),{text:n,theme:i,size:o,loading:l});return(0,r.jsxs)("div",{ref:t,className:a({size:o},s),"data-qa":u,children:[(0,r.jsx)("div",{className:a("text"),children:n}),f(v)?(0,r.jsx)(c,Object.assign({},v)):(0,r.jsx)(d,Object.assign({},v))]})}))},12990:e=>{function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},15672:(e,t,n)=>{"use strict";n.d(t,{t1:()=>r.t}),n(40319),n(77810);var r=n(54299);n(64922),r.S},16538:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(40319),i=n(64922);const a=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75",clipRule:"evenodd"})}))}},17271:(e,t,n)=>{"use strict";n.d(t,{W9:()=>S,Ay:()=>N,Fl:()=>C,$x:()=>A});var r=n(40319),i=n(18801),a=n(29121),o=n(12937),l=n(66134),s=n(10785),u=n(77810),c=n(76872),d=n(24893),f=n(19410),v=n(73822),h=n(53332),m=n(26264),p=n(64922),g=["value","onChange","min","max","validator","format","defaultValue"],b=["value","error","onChange"],y=(0,c.A)("yt-number-input");function A(e,t){if(""!==e){var n=e.replace(/\s/g,"");return"Bytes"===t?(0,h.z_)(n):Number(n)}}function C(e,t,n){if(void 0===e)return"";var r="Bytes"===t?v.A.format.Bytes(e,n):v.A.format.Number(e,n);return r===v.A.format.NO_VALUE?"":r}function x(e){return void 0===e?"":e}var S=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,l.A)(this,t,[].concat(r))).state={parsedValue:NaN},e.onChange=function(n){var r=e.parseValue(n),i=t.errorFromValue(r,e.props),a=e.format(null==r?void 0:r.value);e.setState({parsedValue:null==r?void 0:r.value,parsedError:i,rawValue:n,formattedValue:a}),(0,e.props.onChange)({value:null==r?void 0:r.value,error:i})},e.onBlur=function(){e.setState({focused:!1})},e.onFocus=function(){e.setState({focused:!0})},e.onKeyDown=function(t){t.keyCode===m.DD.ENTER&&e.props.onEnterKeyDown&&e.props.onEnterKeyDown()},e}return(0,s.A)(t,e),(0,o.A)(t,[{key:"parseValue",value:function(e){return this.props.parseFn?this.props.parseFn(e):{value:A(e,this.props.format)}}},{key:"format",value:function(e){var t=this.props,n=t.format,r=t.decimalPlaces,i=t.formatFn;return i?i(e):C(e,n,{digits:r})}},{key:"getRestProps",value:function(){var e=this.props;return e.value,e.onChange,e.min,e.max,e.validator,e.format,e.defaultValue,(0,i.A)(e,g)}},{key:"renderMinMaxHint",value:function(){var e=this.props,t=e.min,n=e.max,r=e.showHint,i=e.size,a=!isNaN(t),o=!isNaN(n);return r&&(a||o)?(0,p.jsxs)("div",{className:y("hint",{size:i}),children:[a&&(0,p.jsxs)(f.m,{content:String(t),placement:"bottom",children:["min: ",(0,p.jsx)("b",{children:this.format(t)})]}),a&&(0,p.jsx)(p.Fragment,{children:"   "}),o&&(0,p.jsxs)(f.m,{content:String(n),placement:"bottom",children:["max: ",(0,p.jsx)("b",{children:this.format(n)})]})]}):null}},{key:"renderPrettyValue",value:function(){var e=this.props,t=e.size,n=e.hidePrettyValue,r=this.state.formattedValue;return n?null:(0,p.jsxs)("div",{className:y("pretty-value",{size:t}),children:[r," "]})}},{key:"renderDefaultValue",value:function(){var e=this.props,t=e.defaultValue,n=e.defaultValueClassName;return(0,p.jsx)(d.k,{disabled:!0,className:n,value:this.format(t),pin:"clear-round"})}},{key:"isBottomLineVisible",value:function(){var e=this.props.bottomLineVisibility,t=this.state.focused;return"visible"===e||t&&"focused"===e}},{key:"render",value:function(){var e=this.props,t=e.value,n=e.className,i=e.showHint,a=e.hidePrettyValue,o=e.showDefaultValue,l=this.state,s=l.parsedError,c=l.rawValue,f=l.formattedValue,v=l.focused,h=this.getRestProps(),m=h.size,g=h.view,b=h.hasClear,A=(null!=t?t:{}).error||s,C=v?c:f;return(0,p.jsxs)("div",{className:y(null,n),children:[(0,p.jsxs)("div",{className:y("top"),children:[(0,p.jsx)(d.k,(0,r.A)((0,r.A)({},h),{},{error:A,autoComplete:!1,onUpdate:this.onChange,onKeyDown:this.onKeyDown,hasClear:b,value:C,size:m,view:g,onBlur:this.onBlur,onFocus:this.onFocus,pin:o?"round-brick":void 0})),o&&this.renderDefaultValue()]}),!A&&this.isBottomLineVisible()&&(0,p.jsx)(u.Fragment,{children:!i||v&&!a?this.renderPrettyValue():this.renderMinMaxHint()})]})}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r=e.value,i=e.format,a=e.preciseInitialRawValue,o=e.decimalPlaces,l=e.formatFn;if(void 0===n.rawValue){var s=l?l(null==r?void 0:r.value):C(null==r?void 0:r.value,i,{digits:o});return{parsedValue:null==r?void 0:r.value,parsedError:t.errorFromValue(r,e),rawValue:a?x(null==r?void 0:r.value):s,formattedValue:s}}return null}},{key:"errorFromValue",value:function(e,t){var n=t.validator,r=void 0===n?function(){}:n,i=t.min,a=t.max,o=t.integerOnly,l=e||{},s=l.value,u=l.error;if(u)return u;if(null!=s){try{if(isNaN(s))return"wrong format";var c=r(s);if(c)return c}catch(u){return String(u)}return o&&s%1!=0?"The value must be an integer":void 0!==i&&s<i?"The value must be ≥ ".concat(i):void 0!==a&&s>a?"The value must be ≤ ".concat(a):void 0}}}])}(u.Component);S.defaultProps={size:"m",view:"normal",hasClear:!0,bottomLineVisibility:"visible"};var N=function(e){function t(){var e;(0,a.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,l.A)(this,t,[].concat(r))).onChange=function(t){e.props.onChange(null==t?void 0:t.value)},e}return(0,s.A)(t,e),(0,o.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.error,a=(e.onChange,(0,i.A)(e,b));return(0,p.jsx)(S,(0,r.A)((0,r.A)({},a),{},{onChange:this.onChange,value:{value:t,error:n}}))}}],[{key:"format",value:function(e,t,n){return C(e,t,n)}}])}(u.Component)},22228:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(40319),i=n(18801),a=n(77810),o=n(15647),l=n(53144),s=n.n(l),u=n(49214),c=n.n(u),d=n(27528),f=n.n(d),v=n(76872),h=n(20361),m=n(52797),p=n(67270),g=n(64922),b=["items","width","multiple","onChange","placeholder","className","showTags","value","disablePortal"],y=(0,v.A)("group-suggest");function A(e){var t=e.items,n=e.width,o=e.multiple,l=e.onChange,u=e.placeholder,d=e.className,v=e.showTags,m=e.value,A=e.disablePortal,C=void 0===A||A,x=(0,i.A)(e,b),S=f()(t,(function(e){return{value:e,text:e}})),N=!(null!=m&&m.length),w=a.useMemo((function(){return f()(s()([],m),(function(e){return{title:e}}))}),[m]),E=a.useCallback((function(e){var t=c()(e,(function(e){return!e.removed})).map((function(e){return e.title}));l(t)}),[m,l]);return(0,g.jsxs)("div",{className:y({empty:N},d),children:[(0,g.jsx)(p.A,(0,r.A)((0,r.A)({},x),{},{items:S,onUpdate:l,placeholder:u,value:e.value,multiple:o,width:null!=n?n:"max",filterable:!0,disablePortal:C})),o&&v&&(0,g.jsx)(h.Vm,{onChange:E,value:w})]})}A.isEmpty=function(e){return!(null!=e&&e.length)},A.getDefaultValue=function(){return[]};const C=(0,o.Ng)((function(e,t){return{items:t.idmOnly?(0,m.yP)(e):(0,m.Gd)(e)}}))(A)},27241:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(77810);const i=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M13.03 10.53a.75.75 0 0 1-1.06 0L8 6.56l-3.97 3.97a.75.75 0 1 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1 0 1.06",clipRule:"evenodd"}))},29094:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(77810),i=n(76872),a=n(27528),o=n.n(a),l=n(49214),s=n.n(l),u=n(67270),c=n(33547),d=n(64922),f=(0,i.A)("cluster-select-control");function v(e){var t=e.className,n=e.excludeClusters,i=e.onChange,a=e.value,l=e.placeholder,v=e.disabled,h=e.filterPredicate,m=void 0===h?function(){return!0}:h,p=e.width,g=r.useMemo((function(){return o()(s()(c.YT.clusters,m),(function(e){var t=e.name;return{value:e.id,text:t}}))}),[m]),b=r.useMemo((function(){if(null==n||!n.length)return g;var e=new Set(n);return s()(g,(function(t){var n=t.value;return!e.has(n)}))}),[g,n]),y=r.useCallback((function(e){i(e[0])}),[i]);return(0,d.jsx)(r.Fragment,{children:(0,d.jsx)(u.A,{value:[a],className:f({empty:!a},t),onUpdate:y,items:b,placeholder:null!=l?l:"Cluster...",disabled:v,width:p})})}v.getDefaultValue=function(){return""},v.isEmpty=function(e){return!e};const h=v},36197:(e,t,n)=>{"use strict";n.d(t,{g:()=>O});var r=n(9736),i=n(77810),a=n(76872),o=n(73384),l=n(6542),s=n(72890),u=n(32235),c=n(4564),d=n(65986),f=n(37338);const v=JSON.parse('{"button_select-all":"Select all","button_deselect-all":"Clear","button_select":"Select","label_selected":"Selected","placeholder_search":"Search"}'),h=JSON.parse('{"button_select-all":"Выбрать все","button_deselect-all":"Очистить","button_select":"Выбрать","label_selected":"Выбрано","placeholder_search":"Поиск"}'),m=(0,f.N)({en:v,ru:h},`${d.C}item-selector`),p=(0,d.o)("item-selector");class g extends i.Component{constructor(){super(...arguments),this.renderItemTitle=e=>{const{renderItemValue:t,getItemId:n}=this.props;return t?t(e):n(e)},this.renderItem=(e,t)=>i.createElement("div",{className:p("item",{active:t})},i.createElement("span",{className:p("item-text")},this.renderItemTitle(e)),i.createElement(l.$,{view:"flat-secondary",size:"s",className:p("item-select"),onClick:this.onAddItem.bind(this,e)},m("button_select"))),this.filterItem=e=>t=>{const{getItemId:n}=this.props;return n(t).includes(e)},this.renderValueItem=(e,t)=>i.createElement("div",{className:p("value-item",{active:t})},i.createElement("span",{className:p("value-item-text")},this.renderItemTitle(e)),i.createElement(l.$,{view:"flat-secondary",size:"s",className:p("value-item-remove"),onClick:()=>this.onRemoveItem(e)},i.createElement(u.I,{data:s.A,size:16}))),this.onAddItem=e=>{const{getItemId:t,value:n}=this.props,r=t(e),i=new Set(n).has(r)?n:[...n,r];setTimeout((()=>{this.onUpdate(i)}),0)},this.onRemoveItem=e=>{const{value:t,getItemId:n}=this.props,r=n(e),i=t.filter((e=>e!==r));setTimeout((()=>{this.onUpdate(i)}),0)},this.onErase=()=>{this.onUpdate([])},this.onSelectAll=()=>{const{items:e,getItemId:t}=this.props,n=e.map(t);this.onUpdate(n)},this.onMoveItem=({oldIndex:e,newIndex:t})=>{if(e!==t){const n=this.props.value.slice();this.onUpdate(c.B.moveListElement(n,e,t))}},this.onUpdate=e=>{this.props.onUpdate(e)}}getActualItems(){const{items:e,value:t,hideSelected:n,getItemId:r}=this.props,i=[],a=new Array(t.length),o=new Map(t.map(((e,t)=>[e,t])));for(const t of e){const e=o.get(r(t));void 0!==e&&(a[e]=t),n&&void 0!==e||i.push(t)}return[i,a]}render(){const{value:e,selectorTitle:t,renderItem:n=this.renderItem,filterItem:r=this.filterItem,hideSelectAllButton:a}=this.props,[o,s]=this.getActualItems();return i.createElement("div",{className:p()},i.createElement("div",{className:p("list")},i.createElement("div",{className:p("list-header")},i.createElement("span",{className:p("list-title")},t),!a&&i.createElement(l.$,{view:"flat",size:"s",disabled:0===o.length,onClick:this.onSelectAll},m("button_select-all"))),i.createElement(c.B,{items:o,renderItem:n,filterItem:r,filterPlaceholder:m("placeholder_search"),itemsHeight:196})),i.createElement("div",{className:p("list")},i.createElement("div",{className:p("list-header")},i.createElement("span",{className:p("list-title")},`${m("label_selected")}: ${e.length}`),i.createElement(l.$,{view:"flat",size:"s",disabled:0===e.length,onClick:this.onErase},m("button_deselect-all"))),i.createElement(c.B,{items:s,renderItem:this.renderValueItem,filterItem:r,filterPlaceholder:m("placeholder_search"),sortable:!0,onSortEnd:this.onMoveItem,itemsHeight:196})))}}g.defaultProps={hideSelected:!0,selectorTitle:"",getItemId:function(e){return`${e}`}};var b=n(40319),y=n(64922);const A=function(e){return(0,y.jsx)("svg",(0,b.A)((0,b.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},e),{},{children:(0,y.jsx)("path",{fill:"none",stroke:"currentColor",d:"m3 6 5 5 5-5"})}))};var C=(0,a.A)("yc-selector-control");function x(e){var t=e.value,n=e.placeholder;return t.length>0?(0,y.jsx)("span",{className:C("value"),children:t.join(", ")}):(0,y.jsx)("span",{className:C("placeholder"),children:n})}function S(e){var t=e.size,n=void 0===t?"s":t,r=e.width,a=e.label,o=e.focused,l=e.disabled,s=e.displayArrow,c=e.value,d=e.icon,f=e.badgeFocused,v=e.badgeRef,h=e.onBadgeClick,m=e.onClick,p=e.placeholder,g={};r&&(g.width=r);var b=i.useRef(null);return c?(0,y.jsxs)("div",{ref:b,className:C({size:n,focused:o,disabled:l}),style:g,onClick:m,children:[Boolean(a)&&(0,y.jsx)("span",{className:C("label"),children:a}),Boolean(d)&&(0,y.jsx)("div",{className:C("selected-item-icon"),children:d}),x({value:c,placeholder:p}),Boolean(c.length>0)&&(0,y.jsx)("div",{ref:v,className:C("badge",{focused:f}),onClick:h,children:c.length}),s&&(0,y.jsx)("div",{className:C("arrow"),children:(0,y.jsx)(u.I,{data:A})})]}):null}var N=n(50326);const w=JSON.parse('{"button_apply":"Apply","button_cancel":"Cancel","label_columns":"Columns","label_placeholder":"Select 1 or more columns"}');var E=new N.TH;E.setLang("en");var j="yc-column-selector";E.registerKeyset("en",j,w);const T=E.keyset(j);var k=(0,a.A)("yc-column-selector"),I=["bottom-start","bottom-end","top-start","top-end"];function O(e){var t=e.className,n=e.switcher,a=e.disabled,s=e.controlWidth,u=e.items,c=e.value,d=e.onUpdate,f=e.renderItem,v=e.renderItemValue,h=e.getItemId,m=e.filterItem,p=e.popupPlacement,b=void 0===p?I:p,A=i.useRef(null),C=i.useState(!1),x=(0,r.A)(C,2),N=x[0],w=x[1],E=i.useState(!1),j=(0,r.A)(E,2),O=j[0],R=j[1],V=i.useState(),_=(0,r.A)(V,2),F=_[0],B=_[1];i.useEffect((function(){B(void 0)}),[u,c]),i.useEffect((function(){a&&(w(!1),B(void 0))}),[a]);var L=i.useCallback((function(e){B(e)}),[]),D=i.useCallback((function(){w(!1)}),[]),P=i.useCallback((function(){w(!1),B(void 0)}),[]),z=i.useCallback((function(){w(!1),B(void 0),F&&c!==F&&d(F)}),[F,d,c]);return(0,y.jsxs)("div",{className:k(null,t),children:[(0,y.jsx)("div",{className:k("control"),ref:A,onClick:function(){a||(w((function(e){return!e})),B(void 0),O||R(!0))},children:n||(0,y.jsx)(S,{displayArrow:!0,disabled:a,placeholder:T("label_placeholder"),value:c,focused:N,width:s})}),O&&(0,y.jsxs)(o.z,{anchorRef:A,placement:b,open:N,onClose:D,children:[(0,y.jsx)(g,{selectorTitle:T("label_columns"),items:u,value:null!=F?F:c,onUpdate:L,getItemId:h,filterItem:m,renderItem:f,renderItemValue:v}),(0,y.jsxs)("div",{className:k("controls"),children:[(0,y.jsx)(l.$,{view:"flat",className:k("control"),onClick:P,children:T("button_cancel")}),(0,y.jsx)(l.$,{view:"action",className:k("control"),onClick:z,children:T("button_apply")})]})]})]})}},58541:(e,t,n)=>{var r=n(12990).default;function i(){"use strict";e.exports=i=function(){return n},e.exports.__esModule=!0,e.exports.default=e.exports;var t,n={},a=Object.prototype,o=a.hasOwnProperty,l="function"==typeof Symbol?Symbol:{},s=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",c=l.toStringTag||"@@toStringTag";function d(e,t,n,r){return Object.defineProperty(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r})}try{d({},"")}catch(t){d=function(e,t,n){return e[t]=n}}function f(e,n,r,i){var a=n&&n.prototype instanceof m?n:m,o=Object.create(a.prototype);return d(o,"_invoke",function(e,n,r){var i=1;return function(a,o){if(3===i)throw Error("Generator is already running");if(4===i){if("throw"===a)throw o;return{value:t,done:!0}}for(r.method=a,r.arg=o;;){var l=r.delegate;if(l){var s=N(l,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(1===i)throw i=4,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=3;var u=v(e,n,r);if("normal"===u.type){if(i=r.done?4:2,u.arg===h)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=4,r.method="throw",r.arg=u.arg)}}}(e,r,new j(i||[])),!0),o}function v(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var h={};function m(){}function p(){}function g(){}var b={};d(b,s,(function(){return this}));var y=Object.getPrototypeOf,A=y&&y(y(T([])));A&&A!==a&&o.call(A,s)&&(b=A);var C=g.prototype=m.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,a,l,s){var u=v(e[i],e,a);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==r(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,l,s)}),(function(e){n("throw",e,l,s)})):t.resolve(d).then((function(e){c.value=e,l(c)}),(function(e){return n("throw",e,l,s)}))}s(u.arg)}var i;d(this,"_invoke",(function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}),!0)}function N(e,n){var r=n.method,i=e.i[r];if(i===t)return n.delegate=null,"throw"===r&&e.i.return&&(n.method="return",n.arg=t,N(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),h;var a=v(i,e.i,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,h;var o=a.arg;return o?o.done?(n[e.r]=o.value,n.next=e.n,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function w(e){this.tryEntries.push(e)}function E(e){var n=e[4]||{};n.type="normal",n.arg=t,e[4]=n}function j(e){this.tryEntries=[[-1]],e.forEach(w,this),this.reset(!0)}function T(e){if(null!=e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function n(){for(;++i<e.length;)if(o.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return p.prototype=g,d(C,"constructor",g),d(g,"constructor",p),p.displayName=d(g,c,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,d(e,c,"GeneratorFunction")),e.prototype=Object.create(C),e},n.awrap=function(e){return{__await:e}},x(S.prototype),d(S.prototype,u,(function(){return this})),n.AsyncIterator=S,n.async=function(e,t,r,i,a){void 0===a&&(a=Promise);var o=new S(f(e,t,r,i),a);return n.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},x(C),d(C,c,"Generator"),d(C,s,(function(){return this})),d(C,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},n.values=T,j.prototype={constructor:j,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0][4];if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(t){o.type="throw",o.arg=e,n.next=t}for(var i=n.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a[4],l=this.prev,s=a[1],u=a[2];if(-1===a[0])return r("end"),!1;if(!s&&!u)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=l){if(l<s)return this.method="next",this.arg=t,r(s),!0;if(l<u)return r(u),!1}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r[0]>-1&&r[0]<=this.prev&&this.prev<r[2]){var i=r;break}}i&&("break"===e||"continue"===e)&&i[0]<=t&&t<=i[2]&&(i=null);var a=i?i[4]:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i[2],h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[2]===e)return this.complete(n[4],n[3]),E(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n[0]===e){var r=n[4];if("throw"===r.type){var i=r.arg;E(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={i:T(e),r:n,n:r},"next"===this.method&&(this.arg=t),h}},n}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},58595:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(29121),i=n(12937),a=n(66134),o=n(10785),l=n(77810),s=n(76872),u=n(73822),c=n(17271),d=n(64922),f=(0,s.A)("yt-quota-editor"),v=function(e){function t(){var e;(0,r.A)(this,t);for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return(e=(0,a.A)(this,t,[].concat(i))).onEnterKeyDown=function(){var t=e.props.onEnterKeyDown;(void 0===t?function(){}:t)()},e.onBytesChange=function(t){var n=e.props,r=n.onChange,i=n.sourceAccount;r({limit:null==t?void 0:t.value,source:i,error:(null==t?void 0:t.error)||e.checkForError(null==t?void 0:t.value,i)})},e.onAccountChange=function(t){var n=e.props,r=n.onChange,i=n.limit;r({limit:i,source:t,error:n.error||e.checkForError(i,t)})},e}return(0,o.A)(t,e),(0,i.A)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.format,r=e.sourceSuggestTitle,i=e.renderSourceSuggest,a=e.sourceAccount,o=e.limitInputTitle,s=e.showHint,u=e.error,v=e.decimalPlaces,h=e.sourceSuggestDisabled;return(0,d.jsxs)("div",{className:f(null,t),children:[i&&(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)("div",{className:f("item-title"),children:r||"Account to distribution"}),i({value:a||"",onChange:this.onAccountChange,disabled:h}),(0,d.jsx)("div",{className:f("free"),children:(0,d.jsxs)(l.Fragment,{children:["Free to distribute",(0,d.jsxs)("span",{className:f("free-value"),children:[" ",this.getFreeFormatted()]})]})})]}),(0,d.jsxs)("div",{className:f("item"),children:[(0,d.jsx)("div",{className:f("item-title"),children:o||"New quota limit"}),(0,d.jsx)(c.W9,{onChange:this.onBytesChange,value:{value:this.getLimit(),error:u},format:n,showHint:s,min:this.getMinLimit(),max:this.getMaxLimit(),onEnterKeyDown:this.onEnterKeyDown,decimalPlaces:v,qa:"quota-editor-new-limit"})]})]})}},{key:"getLimit",value:function(){var e=this.props,t=e.limit,n=e.prevLimit;return void 0!==t?t:n}},{key:"getFreeImpl",value:function(){var e=this.props.sourceAccount,t=this.calcLimitTotal(e),n=t.limit,r=t.total,i=t.allowChildrenOverCommit,a=t.totalChildrenLimit,o=void 0===a?0:a;if(void 0===n||void 0===r)return{};if(i){var l=Math.max(0,n);return{free:l,maxValue:l}}var s=this.props.prevLimit,u=void 0===s?0:s,c=this.props.limit,d=void 0===c?u:c,f=Math.max(0,n-o);return{free:f+u-d,maxValue:f+u}}},{key:"getFree",value:function(){return this.getFreeImpl().free}},{key:"calcLimitTotal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.props.getInfoByName(e)}},{key:"getMinLimit",value:function(){var e=this.props.min;if(void 0!==e)return e;var t=this.props,n=t.currentAccount,r=(0,t.getInfoByName)(n),i=r.totalChildrenLimit;return(r.total||0)+(i||0)}},{key:"getMaxLimit",value:function(){var e=this.props.max;return void 0!==e?e:this.getFreeImpl().maxValue}},{key:"getFreeFormatted",value:function(){return this.props.sourceAccount?c.Ay.format(Number(this.getFree()),this.props.format):u.A.format.NO_VALUE}},{key:"checkForError",value:function(e,t){if(void 0!==e){if(isNaN(e))return"wrong format!";if(this.props.currentAccount===t)return"The same source account";if(!(e<=this.props.prevLimit)){var n=this.getMaxLimit();return t&&(void 0===n||e>n)?"New value is too big":void 0}}}}])}(l.Component)},63082:(e,t,n)=>{"use strict";n.d(t,{X:()=>A});var r=n(64922),i=n(77810),a=n(81214),o=n.n(a),l=n(25930),s=n.n(l),u=n(23313),c=n.n(u),d=n(21086),f=n(82835),v=n(37338);const h=JSON.parse('{"label_empty":"No data","label-actions":"Actions","label-row-select":"Select"}'),m=JSON.parse('{"label_empty":"Нет данных","label-actions":"Действия","label-row-select":"Выбрать"}'),p=(0,v.N)({en:h,ru:m},"Table");function g(e){(0,f.m)(`[Table] Physical values (left, right) of "${e}" property are deprecated. Use logical values (start, end) instead.`)}function b(e,t){return"left"===e?(g(t),"start"):"right"===e?(g(t),"end"):e}const y=(0,d.om)("table");class A extends i.Component{constructor(){super(...arguments),this.state={activeScrollElement:"scrollContainer",columnsStyles:Array.from(this.props.columns,(()=>({}))),columnHeaderRefs:Array.from(this.props.columns,(()=>i.createRef()))},this.tableRef=i.createRef(),this.scrollContainerRef=i.createRef(),this.horizontalScrollBarRef=i.createRef(),this.horizontalScrollBarInnerRef=i.createRef(),this.renderRow=(e,t)=>{const{columns:n,isRowDisabled:i,onRowClick:a,onRowMouseEnter:o,onRowMouseLeave:l,onRowMouseDown:s,getRowClassNames:u,verticalAlign:c,edgePadding:d,wordWrap:f,getRowDescriptor:v}=this.props,{columnsStyles:h}=this.state,m=null==v?void 0:v(e,t),p=(null==m?void 0:m.disabled)||(null==i?void 0:i(e,t))||!1,g=(null==m?void 0:m.classNames)||(null==u?void 0:u(e,t))||[],C=Boolean(!p&&a);return(0,r.jsx)("tr",{onClick:!p&&a?a.bind(null,e,t):void 0,onMouseEnter:!p&&o?o.bind(null,e,t):void 0,onMouseLeave:!p&&l?l.bind(null,e,t):void 0,onMouseDown:!p&&s?s.bind(null,e,t):void 0,className:y("row",{disabled:p,interactive:C,"vertical-align":c},g.join(" ")),children:n.map(((n,i)=>{const{id:a,align:o,primary:l,className:s,sticky:u}=n,c=A.getBodyCellContent(n,e,t),v=b(o,"column.align"),m=b(u,"column.sticky");return(0,r.jsx)("td",{style:h[i],className:y("cell",{align:v,primary:l,sticky:m,"edge-padding":d,"word-wrap":f},s),children:c},a)}))},A.getRowId(this.props,e,t))},this.handleScrollContainerMouseenter=()=>{this.setState({activeScrollElement:"scrollContainer"})},this.handleScrollContainerScroll=()=>{"scrollContainer"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.horizontalScrollBarRef.current.scrollLeft=this.scrollContainerRef.current.scrollLeft)},this.handleHorizontalScrollBarMouseenter=()=>{this.setState({activeScrollElement:"scrollBar"})},this.handleHorizontalScrollBarScroll=()=>{"scrollBar"===this.state.activeScrollElement&&this.horizontalScrollBarRef.current&&this.scrollContainerRef.current&&(this.scrollContainerRef.current.scrollLeft=this.horizontalScrollBarRef.current.scrollLeft)}}static getRowId(e,t,n){const{data:r,getRowId:i,getRowDescriptor:a}=e,o=null!=n?n:r.indexOf(t),l=null==a?void 0:a(t,o);return void 0!==(null==l?void 0:l.id)?l.id:"function"==typeof i?i(t,o):String(i&&i in t?t[i]:o)}static getHeadCellContent(e){const{id:t,name:n}=e;let r;return r="function"==typeof n?n():"string"==typeof n?n:t,r}static getBodyCellContent(e,t,n){const{id:r,template:i,placeholder:a}=e;let l,u;return l="function"==typeof a?a(t,n):null!=a?a:"—","function"==typeof i?u=i(t,n):"string"==typeof i?u=o()(t,i):s()(t,r)&&(u=o()(t,r)),[void 0,null,""].includes(u)&&l?l:u}static getDerivedStateFromProps(e,t){return e.columns.length===t.columnHeaderRefs.length?null:{columnHeaderRefs:Array.from(e.columns,(()=>i.createRef()))}}componentDidMount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver=new ResizeObserver((e=>{var t;const{contentRect:n}=e[0];null===(t=this.horizontalScrollBarInnerRef.current)||void 0===t||t.style.setProperty("width",`${n.width}px`)})),this.tableRef.current&&this.tableResizeObserver.observe(this.tableRef.current),this.scrollContainerRef.current&&(this.scrollContainerRef.current.addEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.addEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.addEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.addEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver=new ResizeObserver((e=>{window.requestAnimationFrame((()=>{Array.isArray(e)&&e.length&&this.updateColumnStyles()}))})),this.tableRef.current&&this.columnsResizeObserver.observe(this.tableRef.current),this.updateColumnStyles()}componentDidUpdate(e){this.props.columns!==e.columns&&this.updateColumnStyles()}componentWillUnmount(){this.props.stickyHorizontalScroll&&(this.tableResizeObserver&&this.tableResizeObserver.disconnect(),this.scrollContainerRef.current&&(this.scrollContainerRef.current.removeEventListener("scroll",this.handleScrollContainerScroll),this.scrollContainerRef.current.removeEventListener("mouseenter",this.handleScrollContainerMouseenter)),this.horizontalScrollBarRef.current&&(this.horizontalScrollBarRef.current.removeEventListener("scroll",this.handleHorizontalScrollBarScroll),this.horizontalScrollBarRef.current.removeEventListener("mouseenter",this.handleHorizontalScrollBarMouseenter))),this.columnsResizeObserver&&this.columnsResizeObserver.disconnect()}render(){const{columns:e,stickyHorizontalScroll:t,className:n,qa:a}=this.props,o=e.some((({primary:e})=>e));return(0,r.jsx)("div",{className:y({"with-primary":o,"with-sticky-scroll":t},n),"data-qa":a,children:t?(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)("div",{ref:this.scrollContainerRef,className:y("scroll-container"),children:this.renderTable()}),this.renderHorizontalScrollBar()]}):this.renderTable()})}renderHead(){const{columns:e,edgePadding:t,wordWrap:n}=this.props,{columnsStyles:i}=this.state;return(0,r.jsx)("thead",{className:y("head"),children:(0,r.jsx)("tr",{className:y("row"),children:e.map(((e,a)=>{const{id:o,align:l,primary:s,sticky:u,className:c}=e,d=b(l,"column.align"),f=b(u,"column.sticky"),v=A.getHeadCellContent(e);return(0,r.jsx)("th",{ref:this.state.columnHeaderRefs[a],style:i[a],className:y("cell",{align:d,primary:s,sticky:f,"edge-padding":t,"word-wrap":n},c),children:v},o)}))})})}renderBody(){const{data:e}=this.props;return(0,r.jsx)("tbody",{className:y("body"),children:e.length>0?e.map(this.renderRow):this.renderEmptyRow()})}renderTable(){const{width:e="auto"}=this.props;return(0,r.jsxs)("table",{ref:this.tableRef,className:y("table",{width:e}),children:[this.renderHead(),this.renderBody()]})}renderEmptyRow(){const{columns:e,emptyMessage:t}=this.props;return(0,r.jsx)("tr",{className:y("row",{empty:!0}),children:(0,r.jsx)("td",{className:y("cell"),colSpan:e.length,children:t||p("label_empty")})})}renderHorizontalScrollBar(){const{stickyHorizontalScroll:e,stickyHorizontalScrollBreakpoint:t=0}=this.props;return(0,r.jsx)("div",{ref:this.horizontalScrollBarRef,className:y("horizontal-scroll-bar",{"sticky-horizontal-scroll":e}),style:{bottom:`${t}px`},"data-qa":"sticky-horizontal-scroll-breakpoint-qa",children:(0,r.jsx)("div",{ref:this.horizontalScrollBarInnerRef,className:y("horizontal-scroll-bar-inner")})})}updateColumnStyles(){this.setState((e=>{const t=e.columnHeaderRefs.map((e=>null===e.current?void 0:e.current.getBoundingClientRect().width));return{columnsStyles:this.props.columns.map(((e,n)=>this.getColumnStyles(n,t)))}}))}getColumnStyles(e,t){const{columns:n}=this.props,r=n[e],i={};if("string"==typeof r.width)return{maxWidth:0,width:r.width};if(void 0!==r.width&&(i.width=r.width),!r.sticky)return i;const a="left"===r.sticky||"start"===r.sticky?t.slice(0,e):t.slice(e+1);return i["left"===r.sticky||"start"===r.sticky?"insetInlineStart":"insetInlineEnd"]=a.reduce(((e,t)=>c()(t)?e+t:e),0),i}}A.defaultProps={edgePadding:!0}},63863:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(77810);const i=e=>r.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16"},e),r.createElement("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 1.75a.75.75 0 0 1 .75.75v4.75h4.75a.75.75 0 0 1 0 1.5H8.75v4.75a.75.75 0 0 1-1.5 0V8.75H2.5a.75.75 0 0 1 0-1.5h4.75V2.5A.75.75 0 0 1 8 1.75",clipRule:"evenodd"}))},65986:(e,t,n)=>{"use strict";n.d(t,{C:()=>i,o:()=>a});var r=n(29717);const i="gc-",a=((0,r.withNaming)({e:"__",m:"_",v:"_"}),(0,r.withNaming)({n:i,e:"__",m:"_",v:"_"}))},70232:(e,t,n)=>{var r=n(58541)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},72207:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EditableList:()=>Sn,RoleListControl:()=>jr,TabFieldVertical:()=>Zn,YTDialog:()=>Co,registerDialogControl:()=>xr,registerDialogTabControl:()=>Sr});var r=n(68175),i=n(40319),a=n(77810),o=n(76872),l=n(29121),s=n(12937),u=n(66134),c=n(10785),d=n(7787),f=function(e){function t(){return(0,l.A)(this,t),(0,u.A)(this,t,arguments)}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){return d.Ay.renderAclSubjectsSuggestControl(this.props)}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!e||!e.length}}])}(a.Component),v=n(2944),h=n(30627),m=n(64922);function p(e){var t=e.value,n=e.onChange,r=e.columnGroups,i=e.disabled,o=a.useMemo((function(){return null==r?void 0:r.reduce((function(e,t){return t.removed||e.push({value:t.id,content:t.name,data:t}),e}),[])}),[r]);return(0,m.jsx)(h.l,{placeholder:"Select column group",value:t?[t]:[],disabled:i,options:o,onUpdate:function(e){return n(e[0])},width:"max"})}p.isEmpty=function(e){return!(null!=e&&e.length)},p.getDefaultValue=function(){};var g=n(87871),b=n(22228),y=n(29094),A=n(18801),C=n(9736),x=n(13322),S=n(43676),N=n(88787),w=["value","onChange","error"],E=(0,o.A)("ic-sortable-list-control"),j=(0,S.D)((function(e){var t=e.children;return(0,m.jsxs)("div",{className:E("drag-handle"),children:[(0,m.jsx)(N.A,{className:E("icon"),face:"solid",awesome:"list"}),t]})})),T=(0,S.Zj)((function(e){var t=e.value;return(0,m.jsx)("li",{className:E("item"),children:(0,m.jsx)(j,{children:t})})})),k=(0,S.q6)((function(e){var t=e.items;return(0,m.jsx)("ul",{className:E(),children:t.map((function(e,t){return(0,m.jsx)(T,{index:t,value:e},"item-".concat(e))}))})})),I=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).state={items:e.props.value},e.onSortEnd=function(t){var n=t.oldIndex,r=t.newIndex,i=e.props.onChange;e.setState((function(e){var t=e.items,a=(0,x.A)(t),o=a.splice(n,1),l=(0,C.A)(o,1)[0];return a.splice(r,0,l),i(a),{items:a}}))},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=(e.value,e.onChange,e.error,(0,A.A)(e,w)),n=this.state.items;return(0,m.jsx)(k,(0,i.A)((0,i.A)({},t),{},{useDragHandle:!0,items:n,onSortEnd:this.onSortEnd}))}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!Array.isArray(e)||!e.length}}])}(a.Component);I.defaultProps={extras:{}};const O=I;var R=n(17271),V=(0,o.A)("ic-bytes-control"),_=function(e){function t(){return(0,l.A)(this,t),(0,u.A)(this,t,arguments)}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props.value;return(0,m.jsx)(R.Ay,(0,i.A)((0,i.A)({className:V()},this.props),{},{value:""===e?void 0:e,format:"Bytes"}))}}],[{key:"getDefaultValue",value:function(){}},{key:"isEmpty",value:function(e){return void 0===e||""===e}}])}(a.Component);_.hasErrorRenderer=!0;var F=function(e){function t(){return(0,l.A)(this,t),(0,u.A)(this,t,arguments)}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props.value;return(0,m.jsx)(R.W9,(0,i.A)((0,i.A)({className:V()},this.props),{},{value:""===(null==e?void 0:e.value)?(0,i.A)((0,i.A)({},e),{},{value:void 0}):e}))}}],[{key:"getDefaultValue",value:function(){return{value:void 0}}},{key:"isEmpty",value:function(e){return void 0===e||""===e}},{key:"isEqual",value:function(e,t){return(null==e?void 0:e.value)===(null==t?void 0:t.value)&&(null==e?void 0:e.error)===(null==t?void 0:t.error)}},{key:"validate",value:function(e){return null!=e&&e.error?null==e?void 0:e.error:void 0}}])}(a.Component);F.hasErrorRenderer=!0;var B=n(64180),L=n(86887),D=".".charCodeAt(0),P=/\\(\\)?/g,z=RegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),M={},U=/[.[\]]+/,q=function(e){if(null==e||!e.length)return[];if("string"!=typeof e)throw new Error("toPath() expects a string");var t,n;return null==M[e]&&(e.endsWith("[]")?M[e]=e.split(U).filter(Boolean):M[e]=(n=[],(t=e).charCodeAt(0)===D&&n.push(""),t.replace(z,(function(e,t,r,i){var a=e;r?a=i.replace(P,"$1"):t&&(a=t.trim()),n.push(a)})),n)),M[e]},H=function(e,t){for(var n=q(t),r=e,i=0;i<n.length;i++){var a=n[i];if(null==r||"object"!=typeof r||Array.isArray(r)&&isNaN(a))return;r=r[a]}return r};function G(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var $=function e(t,n,r,i,a){if(n>=r.length)return i;var o=r[n];if(isNaN(o)){var l;if(null==t){var s,u=e(void 0,n+1,r,i,a);return void 0===u?void 0:((s={})[o]=u,s)}if(Array.isArray(t))throw new Error("Cannot set a non-numeric property on an array");var c=e(t[o],n+1,r,i,a);if(void 0===c){var d=Object.keys(t).length;if(void 0===t[o]&&0===d)return;return void 0!==t[o]&&d<=1?isNaN(r[n-1])||a?void 0:{}:(t[o],(0,L.A)(t,[o].map(G)))}return(0,B.A)({},t,((l={})[o]=c,l))}var f=Number(o);if(null==t){var v=e(void 0,n+1,r,i,a);if(void 0===v)return;var h=[];return h[f]=v,h}if(!Array.isArray(t))throw new Error("Cannot set a numeric property on an object");var m=e(t[f],n+1,r,i,a),p=[].concat(t);if(a&&void 0===m){if(p.splice(f,1),0===p.length)return}else p[f]=m;return p},W=function(e,t,n,r){if(void 0===r&&(r=!1),null==e)throw new Error("Cannot call setIn() with "+String(e)+" state");if(null==t)throw new Error("Cannot call setIn() with "+String(t)+" key");return $(e,0,q(t),n,r)},K="FINAL_FORM/form-error",Z="FINAL_FORM/array-error";function J(e,t){var n=e.errors,r=e.initialValues,i=e.lastSubmittedValues,a=e.submitErrors,o=e.submitFailed,l=e.submitSucceeded,s=e.submitting,u=e.values,c=t.active,d=t.blur,f=t.change,v=t.data,h=t.focus,m=t.modified,p=t.modifiedSinceLastSubmit,g=t.name,b=t.touched,y=t.validating,A=t.visited,C=H(u,g),x=H(n,g);x&&x[Z]&&(x=x[Z]);var S=a&&H(a,g),N=r&&H(r,g),w=t.isEqual(N,C),E=!x&&!S;return{active:c,blur:d,change:f,data:v,dirty:!w,dirtySinceLastSubmit:!(!i||t.isEqual(H(i,g),C)),error:x,focus:h,initial:N,invalid:!E,length:Array.isArray(C)?C.length:void 0,modified:m,modifiedSinceLastSubmit:p,name:g,pristine:w,submitError:S,submitFailed:o,submitSucceeded:l,submitting:s,touched:b,valid:E,value:C,visited:A,validating:y}}var Y=["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","value","visited","validating"],Q=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),a=0;a<n.length;a++){var o=n[a];if(!i(o)||e[o]!==t[o])return!1}return!0};function X(e,t,n,r,i,a){var o=!1;return i.forEach((function(i){r[i]&&(e[i]=t[i],n&&(~a.indexOf(i)?Q(t[i],n[i]):t[i]===n[i])||(o=!0))})),o}var ee=["data"],te=function(e,t,n,r){var i={blur:e.blur,change:e.change,focus:e.focus,name:e.name};return X(i,e,t,n,Y,ee)||!t||r?i:void 0},ne=["active","dirty","dirtyFields","dirtyFieldsSinceLastSubmit","dirtySinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","invalid","modified","modifiedSinceLastSubmit","pristine","submitting","submitError","submitErrors","submitFailed","submitSucceeded","touched","valid","validating","values","visited"],re=["touched","visited"];function ie(e,t,n,r){var i={};return X(i,e,t,n,ne,re)||!t||r?i:void 0}var ae=function(e){var t,n;return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t&&i.length===t.length&&!i.some((function(e,n){return!Q(t[n],e)}))||(t=i,n=e.apply(void 0,i)),n}},oe=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},le="4.20.10",se=function(e,t){return e===t},ue=function e(t){return Object.keys(t).some((function(n){var r=t[n];return!r||"object"!=typeof r||r instanceof Error?void 0!==r:e(r)}))};function ce(e,t,n,r,i,a){var o=i(n,r,t,a);return!!o&&(e(o),!0)}function de(e,t,n,r,i){var a=e.entries;Object.keys(a).forEach((function(e){var o=a[Number(e)];if(o){var l=o.subscription,s=o.subscriber,u=o.notified;ce(s,l,t,n,r,i||!u)&&(o.notified=!0)}}))}function fe(e){var t=a.useRef(void 0);return a.useEffect((function(){return t.current=e,function(){t.current=void 0}}),[e]),a.useCallback((function(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return null===(e=t.current)||void 0===e?void 0:e.call.apply(e,[t].concat(r))}),[])}var ve=new Proxy({lang:"en"},{set:function(){throw new Error("Do not edit the config directly")}});var he=n(28325),me=["value","onChange"],pe=["children"];function ge(e){var t=e.value,n=e.onChange,r=(0,A.A)(e,me),o=(0,a.useCallback)((function(){return n(!t)}),[n,t]),l=r||{},s=l.children,u=(0,A.A)(l,pe);return(0,m.jsx)(he.S,(0,i.A)((0,i.A)({onChange:o,size:"l"},u),{},{checked:t,children:s}))}ge.getDefaultValue=function(){return!1},ge.isEmpty=function(e){return"boolean"!=typeof e||!e};var be=n(29906),ye=n(42572),Ae=n(28782),Ce=n(28407),xe=n(70232),Se=n.n(xe),Ne=n(75414),we=n.n(Ne),Ee=n(34455),je=n.n(Ee),Te=n(49339),ke=n.n(Te),Ie=n(31470),Oe=n.n(Ie),Re=n(81214),Ve=n.n(Re),_e=n(96843),Fe=n.n(_e),Be=n(27528),Le=n.n(Be),De=n(59864),Pe=n(20686),ze=(0,n(29717).withNaming)({n:"df-",e:"__",m:"_"}),Me=["render","children","component"];function Ue(e,t,n){var r=e.render,i=e.children,o=e.component,l=(0,L.A)(e,Me);if(o)return a.createElement(o,Object.assign(t,l,{children:i,render:r}));if(r)return r(void 0===i?Object.assign(t,l):Object.assign(t,l,{children:i}));if("function"!=typeof i)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+n);return i(Object.assign(t,l))}function qe(e,t,n){void 0===n&&(n=function(e,t){return e===t});var r=a.useRef(e);a.useEffect((function(){n(e,r.current)||(t(),r.current=e)}))}var He=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=Object.prototype.hasOwnProperty.bind(t),a=0;a<n.length;a++){var o=n[a];if(!i(o)||e[o]!==t[o])return!1}return!0},Ge=function(e){return!(!e||"function"!=typeof e.stopPropagation)},$e=a.createContext();function We(e){var t=a.useRef(e);return a.useEffect((function(){t.current=e})),t}var Ke="6.5.8",Ze=function(e,t,n){n.forEach((function(n){Object.defineProperty(e,n,{get:function(){return t[n]},enumerable:!0})}))},Je=function(e,t){return Ze(e,t,["active","dirty","dirtyFields","dirtySinceLastSubmit","dirtyFieldsSinceLastSubmit","error","errors","hasSubmitErrors","hasValidationErrors","initialValues","invalid","modified","modifiedSinceLastSubmit","pristine","submitError","submitErrors","submitFailed","submitSucceeded","submitting","touched","valid","validating","values","visited"])},Ye=["debug","decorators","destroyOnUnregister","form","initialValues","initialValuesEqual","keepDirtyOnReinitialize","mutators","onSubmit","subscription","validate","validateOnBlur"],Qe={"final-form":le,"react-final-form":Ke},Xe=ne.reduce((function(e,t){return e[t]=!0,e}),{});function et(e){var t,n,r=e.debug,i=e.decorators,o=void 0===i?[]:i,l=e.destroyOnUnregister,s=e.form,u=e.initialValues,c=e.initialValuesEqual,d=e.keepDirtyOnReinitialize,f=e.mutators,v=e.onSubmit,h=e.subscription,m=void 0===h?Xe:h,p=e.validate,g=e.validateOnBlur,b=(0,L.A)(e,Ye),y={debug:r,destroyOnUnregister:l,initialValues:u,keepDirtyOnReinitialize:d,mutators:f,onSubmit:v,validate:p,validateOnBlur:g},A=(t=function(){var e=s||function(e){if(!e)throw new Error("No config specified");var t=e.debug,n=e.destroyOnUnregister,r=e.keepDirtyOnReinitialize,i=e.initialValues,a=e.mutators,o=e.onSubmit,l=e.validate,s=e.validateOnBlur;if(!o)throw new Error("No onSubmit function specified");var u={subscribers:{index:0,entries:{}},fieldSubscribers:{},fields:{},formState:{asyncErrors:{},dirtySinceLastSubmit:!1,modifiedSinceLastSubmit:!1,errors:{},initialValues:i&&(0,B.A)({},i),invalid:!1,pristine:!0,submitting:!1,submitFailed:!1,submitSucceeded:!1,resetWhileSubmitting:!1,valid:!0,validating:0,values:i?(0,B.A)({},i):{}},lastFormState:void 0},c=0,d=!1,f=!1,v=!1,h=0,m={},p=function(e,t,n){var r=n(H(e.formState.values,t));e.formState.values=W(e.formState.values,t,r)||{}},g=function(e,t,n){if(e.fields[t]){var r,i;e.fields=(0,B.A)({},e.fields,((r={})[n]=(0,B.A)({},e.fields[t],{name:n,blur:function(){return k.blur(n)},change:function(e){return k.change(n,e)},focus:function(){return k.focus(n)},lastFieldState:void 0}),r)),delete e.fields[t],e.fieldSubscribers=(0,B.A)({},e.fieldSubscribers,((i={})[n]=e.fieldSubscribers[t],i)),delete e.fieldSubscribers[t];var a=H(e.formState.values,t);e.formState.values=W(e.formState.values,t,void 0)||{},e.formState.values=W(e.formState.values,n,a),delete e.lastFormState}},b=function(e){return function(){if(a){for(var t={formState:u.formState,fields:u.fields,fieldSubscribers:u.fieldSubscribers,lastFormState:u.lastFormState},n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=a[e](r,t,{changeValue:p,getIn:H,renameField:g,resetFieldState:k.resetFieldState,setIn:W,shallowEqual:Q});return u.formState=t.formState,u.fields=t.fields,u.fieldSubscribers=t.fieldSubscribers,u.lastFormState=t.lastFormState,C(void 0,(function(){x(),j()})),o}}},y=a?Object.keys(a).reduce((function(e,t){return e[t]=b(t),e}),{}):{},A=function(e){return Object.keys(e.validators).reduce((function(t,n){var r=e.validators[Number(n)]();return r&&t.push(r),t}),[])},C=function(e,t){if(d)return f=!0,void t();var n=u.fields,r=u.formState,i=(0,B.A)({},n),a=Object.keys(i);if(l||a.some((function(e){return A(i[e]).length}))){var o=!1;if(e){var s=i[e];if(s){var c=s.validateFields;c&&(o=!0,a=c.length?c.concat(e):[e])}}var v,p={},g={},b={},y=[].concat(function(e){var t=[];if(l){var n=l((0,B.A)({},u.formState.values));oe(n)?t.push(n.then((function(t){return e(t,!0)}))):e(n,!1)}return t}((function(e,t){t?g=e||{}:p=e||{}})),a.reduce((function(e,t){return e.concat(function(e,t){var n,r=[],i=A(e);return i.length&&(i.forEach((function(i){var a=i(H(u.formState.values,e.name),u.formState.values,0===i.length||3===i.length?J(u.formState,u.fields[e.name]):void 0);if(a&&oe(a)){e.validating=!0;var o=a.then((function(n){u.fields[e.name]&&(u.fields[e.name].validating=!1,t(n))}));r.push(o)}else n||(n=a)})),t(n)),r}(n[t],(function(e){b[t]=e})))}),[])),C=y.length>0,x=++h,S=Promise.all(y).then((v=x,function(e){return delete m[v],e}));C&&(m[x]=S);var N=function(e){var t=(0,B.A)({},o?r.errors:{},p,e?g:r.asyncErrors),s=function(e){a.forEach((function(r){if(n[r]){var a=H(p,r),s=H(t,r),u=A(i[r]).length,c=b[r];e(r,u&&c||l&&a||(a||o?void 0:s))}}))};s((function(e,n){t=W(t,e,n)||{}})),s((function(e,n){if(n&&n[Z]){var r=H(t,e),i=[].concat(r);i[Z]=n[Z],t=W(t,e,i)}})),Q(r.errors,t)||(r.errors=t),e&&(r.asyncErrors=g),r.error=p[K]};if(C&&(u.formState.validating++,t()),N(!1),t(),C){var w=function(){u.formState.validating--,t(),0===u.formState.validating&&u.lastFormState.validating&&j()};S.then((function(){h>x||N(!0)})).then(w,w)}}else t()},x=function(e){if(!c){var t=u.fields,n=u.fieldSubscribers,r=u.formState,i=(0,B.A)({},t),a=function(e){var t=i[e],a=J(r,t),o=t.lastFieldState;t.lastFieldState=a;var l=n[e];l&&de(l,a,o,te,void 0===o)};e?a(e):Object.keys(i).forEach(a)}},S=function(){Object.keys(u.fields).forEach((function(e){u.fields[e].touched=!0}))},N=function(){var e=u.fields,t=u.formState,n=u.lastFormState,r=(0,B.A)({},e),i=Object.keys(r),a=!1,o=i.reduce((function(e,n){return!r[n].isEqual(H(t.values,n),H(t.initialValues||{},n))&&(a=!0,e[n]=!0),e}),{}),l=i.reduce((function(e,n){var i=t.lastSubmittedValues||{};return r[n].isEqual(H(t.values,n),H(i,n))||(e[n]=!0),e}),{});t.pristine=!a,t.dirtySinceLastSubmit=!(!t.lastSubmittedValues||!Object.values(l).some((function(e){return e}))),t.modifiedSinceLastSubmit=!(!t.lastSubmittedValues||!Object.keys(r).some((function(e){return r[e].modifiedSinceLastSubmit}))),t.valid=!(t.error||t.submitError||ue(t.errors)||t.submitErrors&&ue(t.submitErrors));var s=function(e){var t=e.active,n=e.dirtySinceLastSubmit,r=e.modifiedSinceLastSubmit,i=e.error,a=e.errors,o=e.initialValues,l=e.pristine,s=e.submitting,u=e.submitFailed,c=e.submitSucceeded,d=e.submitError,f=e.submitErrors,v=e.valid,h=e.validating,m=e.values;return{active:t,dirty:!l,dirtySinceLastSubmit:n,modifiedSinceLastSubmit:r,error:i,errors:a,hasSubmitErrors:!!(d||f&&ue(f)),hasValidationErrors:!(!i&&!ue(a)),invalid:!v,initialValues:o,pristine:l,submitting:s,submitFailed:u,submitSucceeded:c,submitError:d,submitErrors:f,valid:v,validating:h>0,values:m}}(t),c=i.reduce((function(e,t){return e.modified[t]=r[t].modified,e.touched[t]=r[t].touched,e.visited[t]=r[t].visited,e}),{modified:{},touched:{},visited:{}}),d=c.modified,f=c.touched,v=c.visited;return s.dirtyFields=n&&Q(n.dirtyFields,o)?n.dirtyFields:o,s.dirtyFieldsSinceLastSubmit=n&&Q(n.dirtyFieldsSinceLastSubmit,l)?n.dirtyFieldsSinceLastSubmit:l,s.modified=n&&Q(n.modified,d)?n.modified:d,s.touched=n&&Q(n.touched,f)?n.touched:f,s.visited=n&&Q(n.visited,v)?n.visited:v,n&&Q(n,s)?n:s},w=!1,E=!1,j=function e(){if(w)E=!0;else{if(w=!0,t&&t(N(),Object.keys(u.fields).reduce((function(e,t){return e[t]=u.fields[t],e}),{})),!(c||d&&v)){var n=u.lastFormState,r=N();r!==n&&(u.lastFormState=r,de(u.subscribers,r,n,ie))}w=!1,E&&(E=!1,e())}},T=function(){return Object.keys(u.fields).forEach((function(e){return u.fields[e].modifiedSinceLastSubmit=!1}))};C(void 0,(function(){j()}));var k={batch:function(e){c++,e(),c--,x(),j()},blur:function(e){var t=u.fields,n=u.formState,r=t[e];r&&(delete n.active,t[e]=(0,B.A)({},r,{active:!1,touched:!0}),s?C(e,(function(){x(),j()})):(x(),j()))},change:function(e,t){var n=u.fields,r=u.formState;if(H(r.values,e)!==t){p(u,e,(function(){return t}));var i=n[e];i&&(n[e]=(0,B.A)({},i,{modified:!0,modifiedSinceLastSubmit:!!r.lastSubmittedValues})),s?(x(),j()):C(e,(function(){x(),j()}))}},get destroyOnUnregister(){return!!n},set destroyOnUnregister(e){n=e},focus:function(e){var t=u.fields[e];t&&!t.active&&(u.formState.active=e,t.active=!0,t.visited=!0,x(),j())},mutators:y,getFieldState:function(e){var t=u.fields[e];return t&&t.lastFieldState},getRegisteredFields:function(){return Object.keys(u.fields)},getState:function(){return N()},initialize:function(e){var t=u.fields,n=u.formState,i=(0,B.A)({},t),a="function"==typeof e?e(n.values):e;r||(n.values=a);var o=r?Object.keys(i).reduce((function(e,t){return i[t].isEqual(H(n.values,t),H(n.initialValues||{},t))||(e[t]=H(n.values,t)),e}),{}):{};n.initialValues=a,n.values=a,Object.keys(o).forEach((function(e){n.values=W(n.values,e,o[e])||{}})),C(void 0,(function(){x(),j()}))},isValidationPaused:function(){return d},pauseValidation:function(e){void 0===e&&(e=!0),d=!0,v=e},registerField:function(e,t,r,i){void 0===r&&(r={}),u.fieldSubscribers[e]||(u.fieldSubscribers[e]={index:0,entries:{}});var a=u.fieldSubscribers[e].index++;u.fieldSubscribers[e].entries[a]={subscriber:ae(t),subscription:r,notified:!1};var o=u.fields[e]||{active:!1,afterSubmit:i&&i.afterSubmit,beforeSubmit:i&&i.beforeSubmit,data:i&&i.data||{},isEqual:i&&i.isEqual||se,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:e,touched:!1,valid:!0,validateFields:i&&i.validateFields,validators:{},validating:!1,visited:!1};o.blur=o.blur||function(){return k.blur(e)},o.change=o.change||function(t){return k.change(e,t)},o.focus=o.focus||function(){return k.focus(e)},u.fields[e]=o;var l=!1,s=i&&i.silent,c=function(){s&&u.fields[e]?x(e):(j(),x())};if(i){l=!(!i.getValidator||!i.getValidator()),i.getValidator&&(u.fields[e].validators[a]=i.getValidator);var d=void 0===H(u.formState.values,e);void 0===i.initialValue||!d&&H(u.formState.values,e)!==H(u.formState.initialValues,e)||(u.formState.initialValues=W(u.formState.initialValues||{},e,i.initialValue),u.formState.values=W(u.formState.values,e,i.initialValue),C(void 0,c)),void 0!==i.defaultValue&&void 0===i.initialValue&&void 0===H(u.formState.initialValues,e)&&d&&(u.formState.values=W(u.formState.values,e,i.defaultValue))}return l?C(void 0,c):c(),function(){var t=!1;u.fields[e]&&(t=!(!u.fields[e].validators[a]||!u.fields[e].validators[a]()),delete u.fields[e].validators[a]);var r=!!u.fieldSubscribers[e];r&&delete u.fieldSubscribers[e].entries[a];var i=r&&!Object.keys(u.fieldSubscribers[e].entries).length;i&&(delete u.fieldSubscribers[e],delete u.fields[e],t&&(u.formState.errors=W(u.formState.errors,e,void 0)||{}),n&&(u.formState.values=W(u.formState.values,e,void 0,!0)||{})),s||(t?C(void 0,(function(){j(),x()})):i&&j())}},reset:function(e){void 0===e&&(e=u.formState.initialValues),u.formState.submitting&&(u.formState.resetWhileSubmitting=!0),u.formState.submitFailed=!1,u.formState.submitSucceeded=!1,delete u.formState.submitError,delete u.formState.submitErrors,delete u.formState.lastSubmittedValues,k.initialize(e||{})},resetFieldState:function(e){u.fields[e]=(0,B.A)({},u.fields[e],{active:!1,lastFieldState:void 0,modified:!1,touched:!1,valid:!0,validating:!1,visited:!1}),C(void 0,(function(){x(),j()}))},restart:function(e){void 0===e&&(e=u.formState.initialValues),k.batch((function(){for(var t in u.fields)k.resetFieldState(t),u.fields[t]=(0,B.A)({},u.fields[t],{active:!1,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,touched:!1,valid:!0,validating:!1,visited:!1});k.reset(e)}))},resumeValidation:function(){d=!1,v=!1,f&&C(void 0,(function(){x(),j()})),f=!1},setConfig:function(e,i){switch(e){case"debug":t=i;break;case"destroyOnUnregister":n=i;break;case"initialValues":k.initialize(i);break;case"keepDirtyOnReinitialize":r=i;break;case"mutators":a=i,i?(Object.keys(y).forEach((function(e){e in i||delete y[e]})),Object.keys(i).forEach((function(e){y[e]=b(e)}))):Object.keys(y).forEach((function(e){delete y[e]}));break;case"onSubmit":o=i;break;case"validate":l=i,C(void 0,(function(){x(),j()}));break;case"validateOnBlur":s=i;break;default:throw new Error("Unrecognised option "+e)}},submit:function(){var e=u.formState;if(!e.submitting){if(delete e.submitErrors,delete e.submitError,e.lastSubmittedValues=(0,B.A)({},e.values),u.formState.error||ue(u.formState.errors))return S(),T(),u.formState.submitFailed=!0,j(),void x();var t=Object.keys(m);if(t.length)Promise.all(t.map((function(e){return m[Number(e)]}))).then(k.submit,console.error);else if(!Object.keys(u.fields).some((function(e){return u.fields[e].beforeSubmit&&!1===u.fields[e].beforeSubmit()}))){var n,r=!1,i=function(t){e.submitting=!1;var i=e.resetWhileSubmitting;return i&&(e.resetWhileSubmitting=!1),t&&ue(t)?(e.submitFailed=!0,e.submitSucceeded=!1,e.submitErrors=t,e.submitError=t[K],S()):(i||(e.submitFailed=!1,e.submitSucceeded=!0),Object.keys(u.fields).forEach((function(e){return u.fields[e].afterSubmit&&u.fields[e].afterSubmit()}))),j(),x(),r=!0,n&&n(t),t};e.submitting=!0,e.submitFailed=!1,e.submitSucceeded=!1,e.lastSubmittedValues=(0,B.A)({},e.values),T();var a=o(e.values,k,i);if(!r){if(a&&oe(a))return j(),x(),a.then(i,(function(e){throw i(),e}));if(o.length>=3)return j(),x(),new Promise((function(e){n=e}));i(a)}}}},subscribe:function(e,t){if(!e)throw new Error("No callback given.");if(!t)throw new Error("No subscription provided. What values do you want to listen to?");var n=ae(e),r=u.subscribers,i=r.index++;r.entries[i]={subscriber:n,subscription:t,notified:!1};var a=N();return ce(n,t,a,a,ie,!0),function(){delete r.entries[i]}}};return k}(y);return e.pauseValidation(),e},(n=a.useRef()).current||(n.current=t()),n.current),C=a.useState((function(){var e={};return A.subscribe((function(t){e=t}),m)(),e})),x=C[0],S=C[1],N=We(x);a.useEffect((function(){A.isValidationPaused()&&A.resumeValidation();var e=[A.subscribe((function(e){He(e,N.current)||S(e)}),m)].concat(o?o.map((function(e){return e(A)})):[]);return function(){A.pauseValidation(),e.reverse().forEach((function(e){return e()}))}}),o),qe(r,(function(){A.setConfig("debug",r)})),qe(l,(function(){A.destroyOnUnregister=!!l})),qe(d,(function(){A.setConfig("keepDirtyOnReinitialize",d)})),qe(u,(function(){A.setConfig("initialValues",u)}),c||He),qe(f,(function(){A.setConfig("mutators",f)})),qe(v,(function(){A.setConfig("onSubmit",v)})),qe(p,(function(){A.setConfig("validate",p)})),qe(g,(function(){A.setConfig("validateOnBlur",g)}));var w={form:(0,B.A)({},A,{reset:function(e){Ge(e)?A.reset():A.reset(e)}}),handleSubmit:function(e){return e&&("function"==typeof e.preventDefault&&e.preventDefault(),"function"==typeof e.stopPropagation&&e.stopPropagation()),A.submit()}};return Je(w,x),a.createElement($e.Provider,{value:A},Ue((0,B.A)({},b,{__versions:Qe}),w,"ReactFinalForm"))}function tt(e){var t=a.useContext($e);if(!t)throw new Error((e||"useForm")+" must be used inside of a <Form> component");return t}var nt=["onChange","subscription"];function rt(e){var t=e.onChange,n=e.subscription,r=(0,L.A)(e,nt),i=tt("FormSpy"),o=function(e){var t=void 0===e?{}:e,n=t.onChange,r=t.subscription,i=void 0===r?Xe:r,o=tt("useFormState"),l=a.useRef(!0),s=a.useRef(n);s.current=n;var u=a.useState((function(){var e={};return o.subscribe((function(t){e=t}),i)(),n&&n(e),e})),c=u[0],d=u[1];a.useEffect((function(){return o.subscribe((function(e){l.current?l.current=!1:(d(e),s.current&&s.current(e))}),i)}),[]);var f={};return Je(f,c),f}({onChange:t,subscription:n});if(t)return null;var l={form:(0,B.A)({},i,{reset:function(e){Ge(e)?i.reset():i.reset(e)}})};return Ue((0,B.A)({},r,l),o,"FormSpy")}var it="undefined"!=typeof window&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product;function at(e){var t=a.useRef(e);return a.useEffect((function(){t.current=e})),a.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current.apply(null,n)}),[])}var ot=Y.reduce((function(e,t){return e[t]=!0,e}),{}),lt=function(e,t){return void 0===e?"":e},st=function(e,t){return""===e?void 0:e},ut=function(e,t){return e===t};function ct(e,t){void 0===t&&(t={});var n=t,r=n.afterSubmit,i=n.allowNull,o=n.component,l=n.data,s=n.defaultValue,u=n.format,c=void 0===u?lt:u,d=n.formatOnBlur,f=n.initialValue,v=n.multiple,h=n.parse,m=void 0===h?st:h,p=n.subscription,g=void 0===p?ot:p,b=n.type,y=n.validateFields,A=n.value,C=tt("useField"),x=We(t),S=function(t,n){return C.registerField(e,t,g,{afterSubmit:r,beforeSubmit:function(){var t=x.current,n=t.beforeSubmit,r=t.formatOnBlur,i=t.format,a=void 0===i?lt:i;if(r){var o=C.getFieldState(e).value,l=a(o,e);l!==o&&C.change(e,l)}return n&&n()},data:l,defaultValue:s,getValidator:function(){return x.current.validate},initialValue:f,isEqual:function(e,t){return(x.current.isEqual||ut)(e,t)},silent:n,validateFields:y})},N=a.useRef(!0),w=a.useState((function(){var e={},t=C.destroyOnUnregister;return C.destroyOnUnregister=!1,S((function(t){e=t}),!0)(),C.destroyOnUnregister=t,e})),E=w[0],j=w[1];a.useEffect((function(){return S((function(e){N.current?N.current=!1:j(e)}),!1)}),[e,l,s,f]);var T={};!function(e,t){Ze(e,t,["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","validating","visited"])}(T,E);var k={name:e,get value(){var t=E.value;return d?"input"===o&&(t=lt(t)):t=c(t,e),null!==t||i||(t=""),"checkbox"===b||"radio"===b?A:"select"===o&&v?t||[]:t},get checked(){var t=E.value;return"checkbox"===b?(t=c(t,e),void 0===A?!!t:!(!Array.isArray(t)||!~t.indexOf(A))):"radio"===b?c(t,e)===A:void 0},onBlur:at((function(e){if(E.blur(),d){var t=C.getFieldState(E.name);E.change(c(t.value,E.name))}})),onChange:at((function(t){var n=t&&t.target?function(e,t,n,r){if(!r&&e.nativeEvent&&void 0!==e.nativeEvent.text)return e.nativeEvent.text;if(r&&e.nativeEvent)return e.nativeEvent.text;var i=e.target,a=i.type,o=i.value,l=i.checked;switch(a){case"checkbox":if(void 0!==n){if(l)return Array.isArray(t)?t.concat(n):[n];if(!Array.isArray(t))return t;var s=t.indexOf(n);return s<0?t:t.slice(0,s).concat(t.slice(s+1))}return!!l;case"select-multiple":return function(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n];r.selected&&t.push(r.value)}return t}(e.target.options);default:return o}}(t,E.value,A,it):t;E.change(m(n,e))})),onFocus:at((function(e){return E.focus()}))};return v&&(k.multiple=v),void 0!==b&&(k.type=b),{input:k,meta:T}}var dt=["afterSubmit","allowNull","beforeSubmit","children","component","data","defaultValue","format","formatOnBlur","initialValue","isEqual","multiple","name","parse","subscription","type","validate","validateFields","value"],ft=a.forwardRef((function(e,t){var n=e.afterSubmit,r=e.allowNull,i=e.beforeSubmit,o=e.children,l=e.component,s=e.data,u=e.defaultValue,c=e.format,d=e.formatOnBlur,f=e.initialValue,v=e.isEqual,h=e.multiple,m=e.name,p=e.parse,g=e.subscription,b=e.type,y=e.validate,A=e.validateFields,C=e.value,x=(0,L.A)(e,dt),S=ct(m,{afterSubmit:n,allowNull:r,beforeSubmit:i,children:o,component:l,data:s,defaultValue:u,format:c,formatOnBlur:d,initialValue:f,isEqual:v,multiple:h,parse:p,subscription:g,type:b,validate:y,validateFields:A,value:C});if("function"==typeof o)return o((0,B.A)({},S,x));if("string"==typeof l)return a.createElement(l,(0,B.A)({},S.input,{children:o,ref:t},x));if(!m)throw new Error("prop name cannot be undefined in <Field> component");return Ue((0,B.A)({children:o,component:l,ref:t},x),S,"Field("+m+")")}));function vt(){return vt=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},vt.apply(this,arguments)}function ht(e,t,n,r){n[r]=vt({},e[t],{name:r,change:e[r]&&e[r].change,blur:e[r]&&e[r].blur,focus:e[r]&&e[r].focus,lastFieldState:void 0}),n[r].change||delete n[r].change,n[r].blur||delete n[r].blur,n[r].focus||delete n[r].focus}var mt=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},pt=function(e,t,n){var r=e[0],i=e[1],a=e[2];(0,n.changeValue)(t,r,(function(e){var t=[].concat(e||[]);return t.splice(i,0,a),t}));var o=new RegExp("^"+mt(r)+"\\[(\\d+)\\](.*)"),l={};Object.keys(t.fields).forEach((function(e){var n=o.exec(e);if(n){var a=Number(n[1]);if(a>=i){var s=r+"["+(a+1)+"]"+n[2];return void ht(t.fields,e,l,s)}}l[e]=t.fields[e]})),t.fields=l},gt=function(e,t,n){var r,i=e[0],a=e[1],o=n.changeValue,l=n.getIn,s=n.setIn;o(t,i,(function(e){if(!e)return e;var t=[].concat(e);return r=t[a],t.splice(a,1),t.length>0?t:void 0}));var u=new RegExp("^"+mt(i)+"\\[(\\d+)\\](.*)"),c={};return Object.keys(t.fields).forEach((function(e){var n=u.exec(e);if(n){var r=Number(n[1]);if(r===a){if(e===i+"["+a+"]"){var o="formState.submitErrors."+i,d=l(t,o);Array.isArray(d)&&(d.splice(a,1),t=s(t,o,d))}return}if(r>a){var f=i+"["+(r-1)+"]"+n[2];return void ht(t.fields,e,c,f)}}c[e]=t.fields[e]})),t.fields=c,r},bt={insert:pt,concat:function(e,t,n){var r=e[0],i=e[1];(0,n.changeValue)(t,r,(function(e){return e?[].concat(e,i):i}))},move:function(e,t,n){var r=e[0],i=e[1],a=e[2],o=n.changeValue;if(i!==a){o(t,r,(function(e){var t=[].concat(e||[]),n=t[i];return t.splice(i,1),t.splice(a,0,n),t}));var l,s,u,c={},d=new RegExp("^"+mt(r)+"\\[(\\d+)\\](.*)");i>a?(l=a,s=i,u=1):(l=i,s=a,u=-1),Object.keys(t.fields).forEach((function(e){var n=d.exec(e);if(n){var o=Number(n[1]);if(o===i){var f=r+"["+a+"]"+n[2];return void ht(t.fields,e,c,f)}if(l<=o&&o<=s){var v=r+"["+(o+u)+"]"+n[2];return void ht(t.fields,e,c,v)}}c[e]=t.fields[e]})),t.fields=c}},pop:function(e,t,n){var r=e[0],i=(0,n.getIn)(t.formState.values,r);return i&&i.length>0?gt([r,i.length-1],t,n):void 0},push:function(e,t,n){var r=e[0],i=e[1];(0,n.changeValue)(t,r,(function(e){return e?[].concat(e,[i]):[i]}))},remove:gt,removeBatch:function(e,t,n){var r=e[0],i=e[1],a=n.changeValue;if(0===i.length)return[];var o=[].concat(i);o.sort();for(var l=o.length-1;l>0;l-=1)o[l]===o[l-1]&&o.splice(l,1);var s=[];a(t,r,(function(e){if(s=i.map((function(t){return e&&e[t]})),!e)return e;for(var t=[].concat(e),n=o.length-1;n>=0;n-=1){var r=o[n];t.splice(r,1)}return t.length>0?t:void 0}));var u=new RegExp("^"+mt(r)+"\\[(\\d+)\\](.*)"),c={};return Object.keys(t.fields).forEach((function(e){var n=u.exec(e);if(n){var i=Number(n[1]),a=function(e,t){for(var n=0,r=e.length-1,i=0;n<=r;){if(e[i=Math.floor((n+r)/2)]===t)return i;e[i]>t?r=i-1:n=i+1}return~n}(o,i);if(a>=0)return;if(i>o[0]){var l=r+"["+(i-~a)+"]"+n[2];return void ht(t.fields,e,c,l)}}c[e]=t.fields[e]})),t.fields=c,s},shift:function(e,t,n){var r=e[0];return gt([r,0],t,n)},swap:function(e,t,n){var r=e[0],i=e[1],a=e[2],o=n.changeValue;if(i!==a){o(t,r,(function(e){var t=[].concat(e||[]),n=t[i];return t[i]=t[a],t[a]=n,t}));var l=r+"["+i+"]",s=r+"["+a+"]",u={};Object.keys(t.fields).forEach((function(e){if(e.substring(0,l.length)===l){var n=e.substring(l.length),r=s+n;ht(t.fields,e,u,r)}else if(e.substring(0,s.length)===s){var i=e.substring(s.length),a=l+i;ht(t.fields,e,u,a)}else u[e]=t.fields[e]})),t.fields=u}},unshift:function(e,t,n){var r=e[0],i=e[1];return pt([r,0,i],t,n)},update:function(e,t,n){var r=e[0],i=e[1],a=e[2];(0,n.changeValue)(t,r,(function(e){var t=[].concat(e||[]);return t.splice(i,1,a),t}))}};const yt=bt;var At=["render","children","component"],Ct=function(e,t){return e===t||Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&!e.some((function(e,n){return e!==t[n]}))},xt=["length"],St=["meta","input"],Nt=Y.reduce((function(e,t){return e[t]=!0,e}),{}),wt=["name","subscription","defaultValue","initialValue","isEqual","validate"],Et={"final-form":le,"react-final-form":Ke,"react-final-form-arrays":"3.1.3"},jt=function(e){var t=e.name,n=e.subscription,r=e.defaultValue,i=e.initialValue,o=e.isEqual,l=e.validate,s=(0,L.A)(e,wt),u=function(e,t){var n=void 0===t?{}:t,r=n.subscription,i=void 0===r?Nt:r,o=n.defaultValue,l=n.initialValue,s=n.isEqual,u=void 0===s?Ct:s,c=n.validate,d=tt("useFieldArray").mutators;if(!(d&&d.push&&d.pop))throw new Error("Array mutators not found. You need to provide the mutators from final-form-arrays to your form");var f,v,h=(0,a.useMemo)((function(){return Object.keys(d).reduce((function(t,n){return t[n]=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return d[n].apply(d,[e].concat(r))},t}),{})}),[e,d]),m=(f=function(){return function(e,t,n){if(c){var r=c(e,t,n);if(!r||Array.isArray(r))return r;var i=[];return i[Z]=r,i}}},(v=a.useRef()).current||(v.current=f()),v.current),p=ct(e,{subscription:(0,B.A)({},i,{length:!0}),defaultValue:o,initialValue:l,isEqual:u,validate:m,format:function(e){return e}}),g=p.meta,b=g.length,y=(0,L.A)(g,xt),A=p.input,C=(0,L.A)(p,St);return{fields:(0,B.A)({name:e,forEach:function(t){for(var n=b||0,r=0;r<n;r++)t(e+"["+r+"]",r)},length:b||0,map:function(t){for(var n=b||0,r=[],i=0;i<n;i++)r.push(t(e+"["+i+"]",i));return r}},h,C,{value:A.value}),meta:y}}(t,{subscription:n,defaultValue:r,initialValue:i,isEqual:o,validate:l}),c=u.fields,d=u.meta;return function(e,t){var n=e.render,r=e.children,i=e.component,o=(0,L.A)(e,At);if(i)return a.createElement(i,(0,B.A)({},o,{children:r,render:n}));if(n)return n(void 0===r?o:(0,B.A)({},o,{children:r}));if("function"!=typeof r)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+t);return r(o)}((0,B.A)({fields:c,meta:(0,B.A)({},d,{__versions:Et})},s),"FieldArray("+t+")")},Tt=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then},kt=function(e,t){return e===t};const It=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){var n={};return e.subscribe((function(r){var i=r.values;e.batch((function(){var r=function(t,r,a){var o=i&&H(i,t),l=n&&H(n,t);if(!r(o,l))if("function"==typeof a){var s=a(o,t,i,n);Tt(s)?s.then((function(t){Object.keys(t).forEach((function(n){e.change(n,t[n])}))})):Object.keys(s).forEach((function(t){e.change(t,s[t])}))}else Object.keys(a).forEach((function(t){var r=(0,a[t])(o,i,n);Tt(r)?r.then((function(n){e.change(t,n)})):e.change(t,r)}))},a=e.getRegisteredFields();t.forEach((function(e){var t=e.field,n=e.isEqual,i=e.updates;if("string"==typeof t)r(t,n||kt,i);else{var o=Array.isArray(t)?function(e){return~t.indexOf(e)||-1!==t.findIndex((function(t){return t instanceof RegExp&&t.test(e)}))}:function(e){return t.test(e)};a.forEach((function(e){o(e)&&r(e,n||kt,i)}))}})),n=i}))}),{values:!0})}};function Ot(){return Ot=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},Ot.apply(this,arguments)}var Rt=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={previous:t.input.value},n}var n,r;r=e,(n=t).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var i=t.prototype;return i.componentDidUpdate=function(){var e=this.props,t=e.children,n=e.input.value,r=this.state.previous;n!==r&&(this.setState({previous:n}),t(n,r))},i.render=function(){return null},t}(a.Component),Vt=function(e){var t=e.name,n=e.children;return(0,a.createElement)(ft,{name:t,subscription:{value:!0},allowNull:!0,render:function(e){return(0,a.createElement)(Rt,Ot({},e,{children:n}))}})};function _t(e){return(0,m.jsxs)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,m.jsx)("rect",{opacity:"0.01",width:"24",height:"24",fill:"none"}),(0,m.jsx)("path",{d:"M6.5 6.5L17.5 17.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),(0,m.jsx)("path",{d:"M17.5 6.5L6.5 17.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}))}function Ft(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M3.713 9a.75.75 0 0 1-.697-1.026l1.862-4.705a.75.75 0 0 1 1.318-.145l.9 1.328a9 9 0 1 1-3.939 9.234 1 1 0 0 1 1.966-.373 7 7 0 1 0 3.096-7.205l1.167 1.721A.75.75 0 0 1 8.766 9H3.712z"})}))}function Bt(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,m.jsx)("path",{d:"M7.08594 6.30469C7.0625 6.23438 7.08594 6.16406 7.15625 6.09375C7.20312 6.04688 7.27344 6 7.36719 6H8.63281C8.70312 6 8.77344 6.04688 8.84375 6.09375C8.89062 6.16406 8.91406 6.23438 8.91406 6.30469L8.77344 8.92969C8.75 9 8.70312 9.07031 8.65625 9.11719C8.60938 9.16406 8.53906 9.1875 8.49219 9.1875H7.50781C7.4375 9.1875 7.36719 9.16406 7.32031 9.11719C7.27344 9.07031 7.22656 9 7.22656 8.92969L7.08594 6.30469ZM8.98438 10.5C8.98438 10.2422 8.86719 10.0078 8.67969 9.82031C8.49219 9.63281 8.25781 9.51562 8 9.51562C7.71875 9.51562 7.48438 9.63281 7.29688 9.82031C7.10938 10.0078 7.01562 10.2422 7.01562 10.5C7.01562 10.7812 7.10938 11.0156 7.29688 11.2031C7.48438 11.3906 7.71875 11.4844 8 11.4844C8.25781 11.4844 8.49219 11.3906 8.67969 11.2031C8.86719 11.0156 8.98438 10.7812 8.98438 10.5ZM8.98438 2.0625L14.6094 11.8125C14.7266 12.0703 14.7734 12.3281 14.7266 12.5859C14.6797 12.8438 14.5391 13.0547 14.3516 13.2422C14.1406 13.4297 13.9062 13.5 13.625 13.5H2.375C2.09375 13.5 1.83594 13.4297 1.64844 13.2422C1.4375 13.0547 1.32031 12.8438 1.27344 12.5859C1.22656 12.3281 1.25 12.0703 1.39062 11.8125L7.01562 2.0625C7.15625 1.82812 7.34375 1.66406 7.60156 1.57031C7.85938 1.47656 8.11719 1.47656 8.375 1.57031C8.63281 1.66406 8.84375 1.82812 8.98438 2.0625ZM2.49219 12.1641C2.44531 12.2109 2.44531 12.2578 2.49219 12.3047C2.51562 12.3516 2.5625 12.375 2.60938 12.375H13.3906C13.4375 12.375 13.4609 12.3516 13.5078 12.3047C13.5312 12.2578 13.5312 12.2109 13.5078 12.1641L8.11719 2.83594C8.07031 2.78906 8.04688 2.76562 8 2.76562C7.95312 2.76562 7.90625 2.78906 7.88281 2.83594L2.49219 12.1641Z",fill:"#FF0400",fillOpacity:"0.5"})}))}function Lt(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:(0,m.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M7.54268 14.6625C7.3269 14.644 7.11187 14.6178 6.89798 14.5839C3.9426 14.09 1.67759 11.6887 1.35703 8.70957C1.3237 8.42756 1.3237 7.57085 1.35703 7.2895C1.54171 5.74409 2.17174 4.41136 3.22846 3.32997C4.31451 2.21991 5.69592 1.54855 7.28866 1.35854C7.57001 1.3252 8.42739 1.3252 8.70873 1.35854C10.3015 1.54855 11.6829 2.21991 12.7689 3.32997C13.8257 4.41136 14.4557 5.74342 14.6404 7.28883C14.6737 7.57085 14.6737 8.42756 14.6404 8.70891C14.4557 10.2543 13.8257 11.5877 12.7689 12.6684C11.6849 13.7765 10.2981 14.4512 8.7154 14.6392C8.32477 14.6635 7.93329 14.6713 7.54201 14.6625H7.54268ZM7.63388 13.3299C7.46126 13.3151 7.28923 13.2941 7.11812 13.267C4.75382 12.8719 2.94181 10.9509 2.68537 8.5676C2.6587 8.342 2.6587 7.65664 2.68537 7.43156C2.83311 6.19526 3.33713 5.12909 4.18251 4.26399C5.05135 3.37596 6.15647 2.83888 7.43067 2.68687C7.65575 2.6602 8.34165 2.6602 8.56673 2.68687C9.84092 2.83888 10.946 3.37596 11.8149 4.26399C12.6603 5.12909 13.1643 6.19472 13.312 7.43103C13.3387 7.65664 13.3387 8.342 13.312 8.56707C13.1643 9.80338 12.6603 10.8701 11.8149 11.7346C10.9476 12.6211 9.83826 13.1608 8.57206 13.3112C8.25956 13.3307 7.94637 13.3369 7.63335 13.3299H7.63388ZM8.83236 9.3352V6.66854H7.16436V12.0019H8.83236V9.3352ZM8.20036 5.6312C8.4837 5.56387 8.72503 5.32387 8.80036 5.0332C8.82636 4.93254 8.82636 4.73054 8.80036 4.6292C8.72225 4.33618 8.49338 4.10732 8.20036 4.0292C8.15636 4.01854 8.06836 4.0092 7.99836 4.0092C7.76236 4.0092 7.58436 4.0832 7.41703 4.25054C7.25746 4.40072 7.17006 4.61219 7.17703 4.8312C7.17703 5.05454 7.24903 5.23854 7.39903 5.39654C7.61036 5.61854 7.89903 5.7032 8.20036 5.6312Z"})}))}function Dt(e){return(0,m.jsxs)("svg",(0,i.A)((0,i.A)({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),{},{children:[(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.10067 13.1764L7.25321 2.41823C7.57211 1.86059 8.4284 1.86059 8.74642 2.41823L14.899 13.1764C15.2002 13.7023 14.7915 14.3375 14.1528 14.3375H1.84772C1.20815 14.3375 0.800269 13.7023 1.10067 13.1764Z",fill:"var(--g-color-base-warning-heavy)"}),(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.87908 9.43224C8.87908 9.70838 8.65523 9.93224 8.37908 9.93224H7.61719C7.34105 9.93224 7.11719 9.70838 7.11719 9.43224V6.55078C7.11719 6.27464 7.34105 6.05078 7.61719 6.05078H8.37908C8.65522 6.05078 8.87908 6.27464 8.87908 6.55078V9.43224Z",fill:"var(--g-color-text-complementary)"}),(0,m.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.87908 12.0989C8.87908 12.375 8.65523 12.5989 8.37908 12.5989H7.61719C7.34105 12.5989 7.11719 12.375 7.11719 12.0989V11.5176C7.11719 11.2414 7.34105 11.0176 7.61719 11.0176H8.37908C8.65522 11.0176 8.87908 11.2414 8.87908 11.5176V12.0989Z",fill:"var(--g-color-text-complementary)"})]}))}function Pt(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).className;return(0,m.jsxs)("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,m.jsx)("path",{d:"M15.5 8C15.5 12.1421 12.1421 15.5 8 15.5C3.85786 15.5 0.5 12.1421 0.5 8C0.5 3.85786 3.85786 0.5 8 0.5C12.1421 0.5 15.5 3.85786 15.5 8Z",stroke:"currentColor",strokeOpacity:"0.15"}),(0,m.jsx)("path",{opacity:"0.5",fillRule:"evenodd",clipRule:"evenodd",fill:"currentColor",d:"M8.46436 9.92432H7.09473C7.09115 9.72738 7.08936 9.60742 7.08936 9.56445C7.08936 9.12044 7.16276 8.75521 7.30957 8.46875C7.45638 8.18229 7.75 7.86003 8.19043 7.50195C8.63086 7.14388 8.89404 6.90934 8.97998 6.79834C9.11247 6.62288 9.17871 6.42953 9.17871 6.21826C9.17871 5.92464 9.06144 5.6731 8.8269 5.46362C8.59237 5.25415 8.27637 5.14941 7.87891 5.14941C7.49577 5.14941 7.17529 5.25863 6.91748 5.47705C6.65967 5.69548 6.48242 6.02848 6.38574 6.47607L5 6.3042C5.03939 5.66325 5.31242 5.11898 5.81909 4.67139C6.32577 4.22379 6.99088 4 7.81445 4C8.68099 4 9.37028 4.22648 9.88232 4.67944C10.3944 5.13241 10.6504 5.65966 10.6504 6.26123C10.6504 6.59424 10.5564 6.90934 10.3684 7.20654C10.1804 7.50375 9.77849 7.90836 9.1626 8.42041C8.84391 8.68539 8.64608 8.89844 8.56909 9.05957C8.49211 9.2207 8.45719 9.50895 8.46436 9.92432ZM7.09473 11.9546V10.4453H8.604V11.9546H7.09473Z"})]})}var zt=n(24893),Mt=["value","onChange"],Ut=ze("text-control"),qt=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.value,r=e.onChange,a=(0,A.A)(e,Mt),o=t.isEmpty(n);return(0,m.jsx)("div",{className:Ut({empty:o}),children:(0,m.jsx)(zt.k,(0,i.A)((0,i.A)({hasClear:!0},a),{},{autoComplete:!1,onUpdate:r,value:n}))})}}],[{key:"getDefaultValue",value:function(){return""}},{key:"isEmpty",value:function(e){return!e}}])}(a.Component);qt.defaultProps={extras:{}},qt.hasErrorRenderer=!0;var Ht=n(75854),Gt=n(13778),$t=n(2320),Wt=n(72664),Kt=n(21086),Zt=n(38496),Jt=n(99582),Yt=n(11661);const Qt=(0,Kt.om)("text-area");function Xt(e){var t;const{name:n,id:r,tabIndex:i,autoComplete:o,placeholder:l,value:s,defaultValue:u,controlRef:c,controlProps:d,size:f,rows:v,minRows:h=1,maxRows:p,autoFocus:g,disabled:b,readOnly:y,onChange:A,onFocus:C,onBlur:x,onKeyDown:S,onKeyUp:N,onKeyPress:w}=e,E=a.useRef(null),j=(0,Gt.N)(c,E),T=v||h,k=s||(null===(t=null==E?void 0:E.current)||void 0===t?void 0:t.value),I=a.useCallback((()=>{const e=null==E?void 0:E.current;if(e&&!v){const t=getComputedStyle(e),n=parseInt(t.getPropertyValue("line-height"),10),r=parseInt(t.getPropertyValue("padding-top"),10),i=parseInt(t.getPropertyValue("padding-bottom"),10),a=((null==k?void 0:k.match(/\n/g))||[]).length+1,o=(e=>{const{height:t,lineHeight:n}=e;return(t-(Number.isNaN(e.paddingTop)?0:e.paddingTop)-(Number.isNaN(e.paddingBottom)?0:e.paddingBottom))/n})({height:e.scrollHeight,paddingTop:r,paddingBottom:i,lineHeight:n});e.style.height="auto",p&&p<Math.max(o,a)?e.style.height=p*n+2*r+"px":(a>1||o>1)&&(e.style.height=`${e.scrollHeight}px`)}}),[v,p,k]);return a.useEffect((()=>{I()}),[I,f,s]),(0,m.jsx)("textarea",Object.assign({},d,{ref:j,style:Object.assign(Object.assign({},d.style),{height:v?"auto":void 0}),className:Qt("control",d.className),name:n,id:r,tabIndex:i,placeholder:l,value:s,defaultValue:u,rows:T,autoFocus:g,autoComplete:o,onChange:A,onFocus:C,onBlur:x,onKeyDown:S,onKeyUp:N,onKeyPress:w,disabled:null!=b?b:d.disabled,readOnly:null!=y?y:d.readOnly}))}const en=(0,Kt.om)("text-area"),tn=a.forwardRef((function(e,t){const{view:n="normal",size:r="m",pin:i="round-round",name:o,value:l,defaultValue:s,disabled:u,readOnly:c,hasClear:d=!1,error:f,errorMessage:v,validationState:h,autoComplete:p,id:g,tabIndex:b,style:y,className:A,qa:C,controlProps:x,note:S,onUpdate:N,onChange:w}=e,{errorMessage:E,validationState:j}=(0,Yt.Av)({error:f,errorMessage:v,validationState:h}),[T,k]=(0,Ht.P)(l,null!=s?s:"",N),I=a.useRef(null),O=(0,Wt.d)({initialValue:T,onReset:k}),R=(0,Gt.N)(e.controlRef,I,O),[V,_]=a.useState(!1),F=(0,Yt.lf)(j),B=(0,$t.u)(),L="invalid"===j&&Boolean(E),D=Boolean(d&&!u&&!c&&T),P=g||B,z=(0,$t.u)(),M=(0,$t.u)(),U=[null==x?void 0:x["aria-describedby"],S?M:void 0,L?z:void 0].filter(Boolean).join(" "),q={id:P,tabIndex:b,name:o,onChange(e){k(e.target.value),w&&w(e)},autoComplete:(0,Yt.o$)(p),controlProps:Object.assign(Object.assign({},x),{"aria-describedby":U||void 0,"aria-invalid":"invalid"===j||void 0})};return a.useEffect((()=>{const e=I.current;if(e){const t=e.scrollHeight>e.clientHeight;V!==t&&_(t)}}),[T,V]),(0,m.jsxs)("span",{ref:t,style:y,className:en({view:n,size:r,disabled:u,state:F,pin:"clear"===n?void 0:i,"has-clear":D,"has-scrollbar":V},A),"data-qa":C,children:[(0,m.jsxs)("span",{className:en("content"),children:[(0,m.jsx)(Xt,Object.assign({},e,q,{controlRef:R})),D&&(0,m.jsx)(Zt.k,{className:en("clear",{size:r}),size:(0,Zt.v)(r),onClick:e=>{const t=I.current;if(t){t.focus();const n=Object.create(e);n.target=t,n.currentTarget=t,t.value="",w&&w(n)}k("")}})]}),(0,m.jsx)(Jt.o,{errorMessage:L?E:null,errorMessageId:z,note:S,noteId:M})]})}));var nn=["value","onChange"],rn=ze("field-textarea"),an=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.onChange,r=(0,A.A)(e,nn);return(0,m.jsx)(tn,(0,i.A)((0,i.A)({className:rn(),autoComplete:!1,hasClear:!0,rows:4},r),{},{value:t,onUpdate:n}))}}],[{key:"getDefaultValue",value:function(){return""}},{key:"isEmpty",value:function(e){return!e}}])}(a.Component);an.hasErrorRenderer=!0;var on=["onChange"];function ln(e){var t=e.onChange,n=(0,A.A)(e,on);return(0,m.jsx)(h.l,(0,i.A)((0,i.A)({},n),{},{onUpdate:t}))}ln.getDefaultValue=function(){},ln.isEmpty=function(e){return!(null!=e&&e.length)};var sn=n(80268),un=["value","onChange"],cn=["labelLeft","labelRight","size","className"],dn=ze("tumbler-control");function fn(e){var t=e.value,n=e.onChange,r=(0,A.A)(e,un),o=(0,a.useCallback)((function(){return n(!t)}),[n,t]),l=r.labelLeft,s=r.labelRight,u=r.size,c=void 0===u?"m":u,d=r.className,f=(0,A.A)(r,cn);return(0,m.jsxs)("span",{className:dn({size:c}),children:[l,(0,m.jsx)(sn.d,(0,i.A)((0,i.A)({},f),{},{size:c,className:dn("switch",{"label-left":Boolean(l),"label-right":Boolean(s)},d),onChange:o,checked:t})),s]})}fn.getDefaultValue=function(){return!1},fn.isEmpty=function(e){return"boolean"!=typeof e||!e};var vn=ze("plain-text"),hn=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.placeholder,r=e.className;return(0,m.jsx)("div",{className:vn(null,r),children:t||(0,m.jsx)("span",{className:vn("placeholder"),children:n})})}}],[{key:"getDefaultValue",value:function(){return""}},{key:"isEmpty",value:function(e){return!e}}])}(a.Component);function mn(e){var t=e.when,n=e.isActive,r=e.children;return(0,m.jsx)(ft,{name:t,subscription:{value:!0},children:function(e){var t=e.input.value;return n(t)?r:null}})}var pn=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){return this.props.children||null}}])}(a.Component);pn.renderLabel=function(){return null},pn.getDefaultValue=function(){};var gn=n(30513),bn=["value","onChange"],yn=["options","size"];function An(e){var t=e.value,n=e.onChange,r=(0,A.A)(e,bn),o=(0,a.useCallback)((function(e){return n(e.target.value)}),[n]),l=r.options,s=void 0===l?[]:l,u=r.size,c=void 0===u?"m":u,d=(0,A.A)(r,yn);return(0,m.jsx)(gn.a,(0,i.A)((0,i.A)({},d),{},{size:c,value:t,onChange:o,children:Le()(s,(function(e){var t=e.value,n=e.label;return(0,m.jsx)(gn.a.Option,{value:t,children:n},t)}))}))}An.defaultProps={extras:{}},An.getDefaultValue=function(){return""},An.isEmpty=function(e){return"string"!=typeof e||!e};var Cn=ze("editable-list");function xn(e){var t=e.index,n=e.className,r=e.item,i=e.frozen,o=e.toggleRemove,l=e.itemRenderer,s=a.useCallback((function(){o(r,t)}),[r,o,t]),u=r.removed?(0,m.jsx)(Ft,{}):(0,m.jsx)(_t,{}),c=!i&&!r.frozen;return(0,m.jsxs)("span",{className:Cn("item",n),children:[(0,m.jsx)("span",{className:Cn("item-content",{removed:r.removed}),title:r.title,children:l(r)}),c&&(0,m.jsx)("span",{className:Cn("item-action"),onClick:s,children:u})]})}xn.defaultProps={itemRenderer:function(e){return e.title}};var Sn=function(e){function t(){var e,n,r,a;(0,l.A)(this,t);for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return n=this,r=t,a=[].concat(s),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,a||[],(0,Ae.A)(n).constructor):r.apply(n,a))).state={showAll:!1},e.renderItem=function(t,n){var r=e.props,i=r.itemClassName,a=r.itemRenderer,o=r.frozen;return(0,m.jsx)(xn,{className:i,index:n,item:t,frozen:o,toggleRemove:e.toggleRemove,itemRenderer:a},n)},e.toggleRemove=function(t,n){var r=e.props,a=r.value,o=r.onChange,l=(0,x.A)(a);l[n]=(0,i.A)((0,i.A)({},t),{},{removed:!t.removed}),o(l)},e.onShowAll=function(){e.setState({showAll:!e.state.showAll})},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"renderShowAll",value:function(){var e=this.state.showAll?"Hide":"Show all";return(0,m.jsx)("span",{className:Cn("show-all"),onClick:this.onShowAll,children:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.value,r=e.maxVisibleCount,i=this.state.showAll,a=!i&&r?n.slice(0,r):n,o=i||a.length!==n.length;return(0,m.jsxs)("div",{className:Cn(null,t),children:[a.map(this.renderItem),o&&this.renderShowAll()]})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(){return!1}}])}(a.Component);Sn.defaultProps={value:[]};var Nn,wn,En=["title","data"],jn=ze("editable-many-lists"),Tn=function(e){function t(){var e,n,r,a;(0,l.A)(this,t);for(var o=arguments.length,s=new Array(o),u=0;u<o;u++)s[u]=arguments[u];return n=this,r=t,a=[].concat(s),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,a||[],(0,Ae.A)(n).constructor):r.apply(n,a))).onChange=function(t,n){var r=e.props,a=r.value,o=r.onChange,l=(0,i.A)((0,i.A)({},a[t]),{},{data:n}),s=(0,x.A)(a);s.splice(t,1,l),o(s)},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.value,o=t.itemRenderer,l=t.titleClassName,s=t.maxVisibleCount;return(0,m.jsx)("div",{className:jn(null,n),children:r.map((function(t,n){var r=t.title,u=t.data,c=(0,A.A)(t,En);return(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)("span",{className:jn("title",l),children:r},n),(0,m.jsx)(Sn,(0,i.A)((0,i.A)({itemRenderer:o,maxVisibleCount:s},c),{},{value:u,onChange:e.onChange.bind(e,n)}))]},n)}))})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(){return!1}}])}(a.Component),kn=n(46747),In=n(6542),On=ze("labels-group"),Rn=(Nn=function(e){function t(){var e,n,r,i;(0,l.A)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=this,r=t,i=[].concat(o),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,i||[],(0,Ae.A)(n).constructor):r.apply(n,i))).handleLabelClick=function(t){var n=e.props.onClick;"function"==typeof n&&n(t)},e.handleRemoveClick=function(t,n){var r=e.props.onRemove;t.stopPropagation(),"function"==typeof r&&r(n)},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"renderLabel",value:function(e){var t=this,n=this.props,r=n.onRemove,i=n.disabled,a=e.name,o=e.isDefault;return(0,m.jsx)(kn.J,{className:On("label"),type:r&&!o?"close":"default",onClick:function(){return t.handleLabelClick(e)},onCloseClick:function(n){return t.handleRemoveClick(n,e)},size:"s",disabled:i,children:a},a)}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,r=t.renderToggler,i=t.onRemoveAll,a=t.disabled;return(0,m.jsxs)("div",{className:On(),children:[Le()(n,(function(t){return e.renderLabel(t)})),null==r?void 0:r(),i&&n.length>0&&(0,m.jsx)(In.$,{size:"s",view:"flat-secondary",onClick:i,disabled:a,children:"Clear all"})]})}}])}(a.Component),(wn=function(e){function t(e){var n,r,i,a;return(0,l.A)(this,t),r=this,i=t,a=[e],i=(0,Ae.A)(i),(n=(0,be.A)(r,(0,ye.A)()?Reflect.construct(i,a||[],(0,Ae.A)(r).constructor):i.apply(r,a))).state={collapsed:!0},n.handleToggle=function(){return n.setState((function(e){return{collapsed:!e.collapsed}}))},n.renderToggler=function(){var e=n.props,t=e.items,r=e.visibleCount,i=n.state.collapsed,a=t.length>r,o=t.length-r;return a&&(0,m.jsx)(In.$,{size:"s",view:"flat",onClick:n.handleToggle,children:i?"Show more (".concat(o,")"):"Show less"})},n.state={collapsed:!e.initialExpanded},e.renderToggler&&console.warn('"renderToggler" property will be overriden'),n}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){return(0,m.jsx)(Nn,(0,i.A)((0,i.A)({},this.props),{},{items:this.getItems(),renderToggler:this.renderToggler}))}},{key:"getItems",value:function(){var e=this.getVisibleItemsCount(),t=this.props.items;return e<t.length?t.slice(0,e):t}},{key:"getVisibleItemsCount",value:function(){var e=this.props,t=e.items,n=e.visibleCount;return this.state.collapsed&&t.length>n?n:t.length}}])}(a.Component)).displayName="WithCollapsible(".concat(function(e){return e.displayName||e.name||"Component"}(Nn),")"),wn);function Vn(e){return e.id}function _n(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.forEach((function(e){return null==e?void 0:e.apply(void 0,n)}))}}function Fn(){}function Bn(e){var t=e.children,n=e.className,r=e.onFocus,i=e.onBlur,o=void 0===i?Fn:i,l=a.useState(!1),s=(0,C.A)(l,2),u=s[0],c=s[1],d=fe(_n(o,(function(){c(!1)}))),f=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=a.useRef(!1);return a.useEffect((function(){if(t){var r=function(){n.current=!1,window.setTimeout((function(){n.current||e()}),0)};return window.addEventListener("focus",r,{capture:!0}),function(){window.removeEventListener("focus",r,{capture:!0})}}}),[t,e]),a.useCallback((function(){n.current=!0}),[])}(d,u),v=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=a.useRef(!1);return a.useEffect((function(){if(t){var r=function(){n.current=!1,window.setTimeout((function(){n.current||e()}),0)};return window.addEventListener("click",r,{capture:!0}),function(){window.removeEventListener("click",r,{capture:!0})}}}),[t,e]),a.useCallback((function(){n.current=!0}),[])}(d,u);return(0,m.jsx)("div",{className:n,onFocus:_n(f,r,(function(){c(!0)})),onClick:v,children:t})}var Ln=["value","onChange","onBlur","onFocus","disabled"],Dn=ze("multi-text-control"),Pn=function(e){function t(){var e,n,r,i;(0,l.A)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=this,r=t,i=[].concat(o),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,i||[],(0,Ae.A)(n).constructor):r.apply(n,i))).state={currentLabel:""},e.updateLabel=function(t){e.setState({currentLabel:t})},e.confirmText=function(){var t=e.state.currentLabel;if((null==t?void 0:t.length)>0){var n=e.props,r=n.onChange,i=n.value;je()(i,(function(e){return e.name===t}))||r(i.concat({name:t})),e.setState({currentLabel:""})}},e.handleAdd=function(n){n.keyCode===t.ENTER&&e.confirmText()},e.handleClear=function(){e.props.onChange(t.getDefaultValue())},e.handleRemove=function(n){var r=e.props,i=r.onChange,a=r.value;i(t.remove(n,a))},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=(e.onChange,e.onBlur),r=e.onFocus,a=e.disabled,o=(0,A.A)(e,Ln);return(0,m.jsxs)(Bn,{className:Dn(),onBlur:n,onFocus:r,children:[(0,m.jsx)(zt.k,(0,i.A)((0,i.A)({size:"s",view:"normal",autoComplete:!1,hasClear:!0,disabled:a},o),{},{onUpdate:this.updateLabel,onKeyDown:this.handleAdd,onBlur:this.confirmText,value:this.state.currentLabel})),(0,m.jsx)(Rn,{items:t,visibleCount:4,disabled:a,onRemoveAll:this.handleClear,onRemove:this.handleRemove})]})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!e.length}},{key:"remove",value:function(e,t){var n=ke()(t,(function(t){return e.name===t.name}));if(n>-1){var r=(0,x.A)(t);return r.splice(n,1),r}return t}}])}(a.Component);Pn.ENTER=13,Pn.hasErrorRenderer=!0;var zn=n(62167),Mn=n(17239),Un=n.n(Mn),qn=ze("dialog-tab"),Hn=function(e){function t(){return(0,l.A)(this,t),e=this,n=t,r=arguments,n=(0,Ae.A)(n),(0,be.A)(e,(0,ye.A)()?Reflect.construct(n,r||[],(0,Ae.A)(e).constructor):n.apply(e,r));var e,n,r}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.className,r=e.tabItems,i=e.activeTab,a=e.setActiveTab,o=e.onRemoveTab,l=e.onCreateTab;return(0,m.jsx)(zn.t,{className:qn("control",n),items:r,activeTab:i,onSelectTab:a,wrapTo:t.wrapTabItem.bind(null,o,l)})}}],[{key:"getDefaultValue",value:function(e){return e.multiple?[]:{}}},{key:"isEmpty",value:function(e,t){return t.multiple?!e.length:!Object.keys(e).length}}])}(a.Component);Hn.isTabControl=!0,Hn.isTabControlVertical=!1,Hn.wrapTabItem=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},a=n.error&&("string"==typeof n.error||Un()(n.error,(function(e){return Boolean(e)})));return(0,m.jsxs)("div",{className:qn("wrapper",i),children:[(0,m.jsxs)("span",{className:qn("name"),children:[(0,m.jsx)("span",{className:qn("name-text"),children:r}),a&&(0,m.jsx)("span",{className:qn("warning-icon"),title:"Some fields in this tab are not valid",children:(0,m.jsx)(Bt,{})})]}),n.multiple&&n.removable&&(0,m.jsx)("span",{className:qn("remove-icon"),onClick:function(t){t.stopPropagation(),e(n)},children:(0,m.jsx)(_t,{})})]},n.id)};var Gn=n(4564),$n=["className","activeTab","size","sortable","tabItems","onOrderChanged"],Wn=ze("tab-field-vertical"),Kn={s:28,m:36,l:48},Zn=function(e){function t(){var e,n,r,i;(0,l.A)(this,t);for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return n=this,r=t,i=[].concat(o),r=(0,Ae.A)(r),(e=(0,be.A)(n,(0,ye.A)()?Reflect.construct(r,i||[],(0,Ae.A)(n).constructor):r.apply(n,i))).onItemClick=function(t){(0,e.props.setActiveTab)(t.id)},e.renderItem=function(t){var n=e.props,r=n.onRemoveTab,i=n.onCreateTab,a=n.wrapTo,o=Hn.wrapTabItem(r,i,t,t.title,{vertical:!0});return a?a(o,t):o},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.className,r=e.activeTab,a=e.size,o=e.sortable,l=e.tabItems,s=e.onOrderChanged,u=(0,A.A)(e,$n),c=ke()(l,(function(e){return e.id===r}));return(0,m.jsx)("div",{className:Wn({size:a},n),children:(0,m.jsx)(Gn.B,(0,i.A)({className:Wn("list"),itemHeight:Kn[a||t.defaultProps.size],size:a,items:l,renderItem:this.renderItem,onItemClick:this.onItemClick,selectedItemIndex:c,filterable:!1,onSortEnd:s,sortable:o},u))})}}])}(a.Component);Zn.defaultProps={size:"s"},Zn.isTabControl=!0,Zn.isTabControlVertical=!0,Zn.getDefaultValue=Hn.getDefaultValue,Zn.isEmpty=Hn.isEmpty;var Jn,Yn=new(n(50326).TH);Jn=function(e){Yn.setLang(e.lang)},[].push(Jn),Jn(ve);const Qn=(Xn="infra-components-dialog",tr=(er={ru:JSON.parse('{"validator:value-required":"Требуется значение"}'),en:JSON.parse('{"validator:value-required":"Value is required"}')}).ru,nr=er.en,Yn.registerKeyset("ru",Xn,tr),Yn.registerKeyset("en",Xn,nr),Yn.keyset(Xn));var Xn,er,tr,nr,rr=n(51036),ir=n(27241),ar=ze("collapsible-section");function or(e){var t=e.className,n=e.alwaysExpanded,r=e.initialCollapsed,i=e.children,o=e.caption,l=e.captionClassName,s=a.useState(r&&!n),u=(0,C.A)(s,2),c=u[0],d=u[1],f=a.useCallback((function(){d(!c)}),[c]);return(0,m.jsxs)("section",{className:ar(null,t),children:[(0,m.jsxs)("h2",{className:ar("caption",{collapsed:c,collapsible:!n},l),onClick:n?void 0:f,children:[o,!n&&(0,m.jsxs)("span",{children:[" ",c?(0,m.jsx)(rr.A,{}):(0,m.jsx)(ir.A,{})]})]}),(0,m.jsx)("section",{className:ar("content",{collapsed:c}),children:i})]})}var lr=["form"],sr=["id"],ur=ze("dialog"),cr=ze("page-dialog");function dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){var e=(0,Ce.A)(Se().mark((function e(n,r,i){var a,o,l,s;return Se().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=0,o=t;case 1:if(!(a<o.length)){e.next=17;break}return l=o[a],e.prev=3,e.next=6,l(n,r,i);case 6:if(!(s=e.sent)){e.next=9;break}return e.abrupt("return",s);case 9:e.next=14;break;case 11:return e.prev=11,e.t0=e.catch(3),e.abrupt("return","Validation exception: "+e.t0);case 14:a++,e.next=1;break;case 17:return e.abrupt("return",void 0);case 18:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(t,n,r){return e.apply(this,arguments)}}()}var fr=function(){},vr=[];function hr(e){return void 0!==e.section}function mr(e){return gr(e.type)}function pr(e){return Ar.hasTabs(e)}function gr(e){return"string"==typeof e&&-1!==vr.indexOf(e)}var br=new Map;function yr(e){if(br.has(e))return br.get(e);throw new Error("Control '".concat(e,"' is not registered as the Dialog control!"))}var Ar=function(e){function t(e){var n,r,o,s;return(0,l.A)(this,t),r=this,o=t,s=[e],o=(0,Ae.A)(o),(n=(0,be.A)(r,(0,ye.A)()?Reflect.construct(o,s||[],(0,Ae.A)(r).constructor):o.apply(r,s))).state={tabsCount:1,activeTabId:void 0,verticalTabs:void 0},n.form=void 0,n.onClose=function(e,r){if("outsideClick"!==r){n.setState({activeTabId:void 0});var i=n.props,a=i.onClose,o=void 0===a?t.defaultProps.onClose:a,l=i.disableFormReset;o(n.form),l||window.setTimeout((function(){n.form.reset()}),0)}},n.onApply=function(){return(0,n.props.onAdd)(n.form).then((function(e){return(e||{}).validationErrors||(n.onClose(),null)})).catch((function(e){return console.error(e)}))},n.isActiveTab=function(e){return Vn(e)===n.state.activeTabId},n.onActiveTabChange=function(e){var t=n.props.onActiveTabChange;n.setState({activeTabId:e}),"function"==typeof t&&t(e)},n.renderTabs=function(e){var t,r=e.form,i=(0,A.A)(e,lr),a=n.state,o=a.activeTabId,l=a.verticalTabs,s=n.props,u=s.size,c=s.fields,d=n.prepareTabs(r,i),f=d.tabItems,v=d.removeTab,h=d.createTab,p=yr(null===(t=c[0])||void 0===t?void 0:t.type);return(0,m.jsx)(p,{className:ur("tabs-control",{vertical:Boolean(l)}),size:u,tabItems:f,activeTab:o,setActiveTab:n.onActiveTabChange,onRemoveTab:v,onCreateTab:h})},n.renderDialogContent=function(e,r){n.form=r;var o=n.props,l=o.waitingMessage,s=o.headerProps,u=o.footerProps,c=o.fields,d=o.formId,f=o.size,v=n.state.verticalTabs,h=s||{},p=h.title,g=h.insertAfter,b=h.insertBefore,y=t.defaultProps.footerProps,A=y.textApply,C=y.textCancel,x=u||{},S=x.textApply,N=void 0===S?A:S,w=x.textCancel,E=void 0===w?C:w,j=x.content,T=x.propsButtonCancel,k=void 0===T?{}:T,I=x.propsButtonApply,O=void 0===I?{}:I,R=x.hidden,V=r.getState(),_=n.isApplyDisabled(V);return(0,m.jsxs)(a.Fragment,{children:[p&&(0,m.jsx)(De.l.Header,{caption:(0,m.jsx)("span",{className:ur("caption"),children:p}),insertAfter:g,insertBefore:b}),(0,m.jsxs)("form",{id:d,onSubmit:e,children:[(0,m.jsx)(De.l.Body,{className:ur("body",{with_vertical_tabs:Boolean(v)}),children:(0,m.jsx)("div",{className:ur({size:f,with_vertical_tabs:Boolean(v)}),children:pr(c)?n.renderTabbedFields():(0,m.jsxs)(a.Fragment,{children:[n.renderFields(c),n.renderFormError()]})})}),!R&&(0,m.jsx)(De.l.Footer,{preset:"default",loading:V.submitting,textButtonCancel:E,textButtonApply:N,propsButtonApply:(0,i.A)({disabled:_,type:"submit"},O),propsButtonCancel:k,onClickButtonCancel:n.onClose,onClickButtonApply:fr,children:(0,m.jsx)("div",{className:ur("footer-controls"),children:j})})]}),l&&(0,m.jsx)("div",{className:ur("waiting-message"),children:(0,m.jsxs)("div",{className:ur("waiting-message-inner"),children:[(0,m.jsx)(Lt,{}),l]})})]})},n.renderPageDialog=function(e){var t=e.handleSubmit,r=e.form,i=n.props,a=i.className,o=i.modal,l=i.size;return(0,m.jsx)("div",{className:cr("wrapper",{modal:o},a),children:(0,m.jsx)("div",{className:cr({size:l}),children:n.renderDialogContent(t,r)})})},n.renderModalDialog=function(e){var t=e.handleSubmit,r=e.form,i=n.props,a=i.visible,o=i.className,l=i.size;return a&&(0,m.jsx)(De.l,{className:o,open:!0,hasCloseButton:!0,size:l,onClose:n.onClose,children:n.renderDialogContent(t,r)})},n.getFieldsCalculator=function(){var e=t.collectSubscribers("",n.props.fields).map((function(e){return{field:e.name,updates:e.subscribers}}));if(e.length)return It.apply(void 0,(0,x.A)(e))},function(e){var t,n,r,i=(n=(t=e.fields).filter(mr),r="Invalid prop '".concat(t,"' passed to '").concat(Cr.name||"DFDialog","'."),0<n.length&&n.length<t.length?new Error("".concat(r," No top level real fields are allowed if there are tab fields on top-level.")):n.filter((function(e){return e.multiple})).length>1?new Error("".concat(r," It is forbidden to have more than one multiple tab fields.")):void 0);i&&console.error("Tab specification is wrong, please recheck provided `field` property",i)}(e),n}return(0,c.A)(t,e),(0,s.A)(t,[{key:"componentDidUpdate",value:function(e,t){t.tabsCount!==this.state.tabsCount&&setTimeout((function(){var e;return null===(e=document.querySelector(".g-dialog__modal"))||void 0===e?void 0:e.scrollTo(0,0)}),0)}},{key:"_isApplyDisabled",value:function(e){var t=this.props.pristineSubmittable,n=e.pristine,r=e.invalid,i=e.hasSubmitErrors,a=e.dirtySinceLastSubmit,o=e.hasValidationErrors;return r?o||i&&!a:!t&&n}},{key:"isApplyDisabled",value:function(e){var t=this.props.isApplyDisabled;return"function"==typeof t?t(e):this._isApplyDisabled(e)}},{key:"renderFieldGroup",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=e.name,a=e.type,o=e.className,l=e.warning,s=e.fullWidth,u=r?"".concat(r,".").concat(i):i,c=e.required,d=e.validator,f=e.validateFields,v=void 0===f?[]:f,h=e.initialValue,p=e.onChange,g=[];c&&g.push(t.makeRequiredValidator(e)),"function"==typeof d&&g.push(d);var b=yr(e.type),y=b.format,A=b.validate,C=b.isEqual;A&&g.push(A);var x=dr.apply(void 0,g);return(0,m.jsx)(ft,{name:u,initialValue:h,validate:x,validateFields:v,isEqual:C,format:y,formatOnBlur:!0,children:function(r){var i=r.input,c=r.meta;return(0,m.jsxs)("div",{className:ur("field-group",{type:a,"full-width":s,dirty:c.dirty},o),children:[t.renderLabel(e),(0,m.jsxs)("div",{className:ur("field-wrapper",{type:a,empty:t.isEmptyField(e,i.value),"full-width":s}),children:[t.renderField(e,i,c),l&&(0,m.jsxs)("div",{className:ur("field-warning"),children:[(0,m.jsx)(Dt,{}),(0,m.jsx)("span",{className:ur("field-warning-content"),children:l})]})]}),"function"==typeof p&&(0,m.jsx)(Vt,{name:u,children:function(t,r){t!==r&&p(t,r,e,u,n.form,n.form.getState())}})]})}},u)}},{key:"renderSection",value:function(e,t,n){var r,i=e.wrapTo,o=void 0===i?function(e){return e}:i,l=e.section,s=e.collapsible,u=e.initialCollapsed;r=Array.isArray(e.fields)&&0!==e.fields.length?this.renderFields(e.fields,n):[];var c="section-field-".concat(t);return(0,m.jsx)(a.Fragment,{children:o((0,m.jsx)(or,{className:ur("section"),caption:l,captionClassName:ur("section-title"),initialCollapsed:u,alwaysExpanded:!s,children:r}))},c)}},{key:"renderFields",value:function(e,n){var r=this;return e.map((function(e,a){if(hr(e))return r.renderSection(e,a,n);if(function(e){return void 0!==e.separator}(e))return t.renderSeparator(e,a);var o=e.visibilityCondition;return o?(0,m.jsx)(mn,(0,i.A)((0,i.A)({},o),{},{children:r.renderFieldGroup(e,n)}),"cond-".concat(a)):r.renderFieldGroup(e,n)}))}},{key:"renderFormError",value:function(){var e=(this.form.getState().submitErrors||{})[K];return e?(0,m.jsx)("div",{className:ur("error-message"),children:e}):null}},{key:"renderMultiTabContent",value:function(e){var t=this,n=this.props.virtualized,r=e.name,a=e.fields,o=e.renderControls;return(0,m.jsx)(jt,{name:r,children:function(e){var l=e.fields;return l.map((function(e,s){var u=l.value[s],c=t.isActiveTab(u);return(c||!n)&&(0,m.jsxs)("div",{className:ur("tabs-content-item",{hidden:!c,name:r}),children:[t.renderFields(a,e),t.renderFormError(),o&&(0,m.jsx)("div",{className:ur("extra-controls"),children:o(u,(function(e){var n=t.form.getState();(0,t.prepareTabs(t.form,n).createTab)(r,e)}),0!==s?function(){var e=t.form.getState();(0,t.prepareTabs(t.form,e).removeTab)((0,i.A)((0,i.A)({},u),{},{name:r}))}:void 0)})]},s)}))}},r)}},{key:"renderSingleTabContent",value:function(e){var t=this.props.virtualized,n=this.state.activeTabId,r=e.name,i=e.fields,a=r===n;return(a||!t)&&(0,m.jsxs)("div",{className:ur("tabs-content-item",{hidden:!a,name:r}),children:[this.renderFields(i,r),this.renderFormError()]},"single-tab-".concat(r))}},{key:"isVisibleTab",value:function(e,t){var n=e.visibilityCondition;if(!n)return!0;var r=Ve()(t,n.when);return n.isActive(r)}},{key:"prepareTabs",value:function(e,n){var r,a=this,o=e.mutators,l=o.remove,s=o.push,u=this.state.activeTabId,c=this.props.fields,d=n.values,f=n.errors,v=[],h=0,m=d,p=c,g=!1,b=!1;return t.operateOnTabs({fields:p,values:m,errors:f},(function(e){var t=e.id,n=e.error,r=e.name,o=e.multiple,l=e.index,s=e.renderControls,c=e.title,f=e.isRemovable;a.isVisibleTab(e,d)?(o&&!g&&(g=!0,h=l),v.push((0,i.A)((0,i.A)({id:t,error:n,name:r,multiple:o},{renderControls:s}),{},{title:c,removable:f(l-h)}))):b=b||u===t})),b&&this.setState({activeTabId:null===(r=v[0])||void 0===r?void 0:r.id}),{tabItems:v,createTab:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=je()(p,(function(t){return t.name===e})),i=(r||{}).onCreateTab;if(null!=r&&r.multiple){var o=n.userOptions,l=ke()(m[e],a.isActiveTab),u=m[e][-1===l?0:l],c=(u.id,(0,A.A)(u,sr)),d=i?i(c,{userOptions:o}):c;if(void 0===d.id)for(var f=new Set(Le()(m[e],(function(e){var t=e.id;return String(t)}))),h=0;h<=f.size;++h){var g=String(h+1);if(!f.has(g)){d.id=g;break}}else!function(e,t){var n=Vn(e);if(void 0===n)throw new Error("id field must be defined");if(je()(t,(function(e){return n===Vn(e)})))throw new Error("id of a tab must be unique")}(d,m[e]);s(e,d),a.setState({tabsCount:v.length+1}),t&&a.onActiveTabChange(Vn(d))}},removeTab:function(e){var t=ke()(v,(function(t){return t.id===e.id}));if(!(t<0)){if(e.id===u){var n=v[t-1].id;a.setState({activeTabId:n})}l(e.name,t-h),a.setState({tabsCount:v.length-1})}}}}},{key:"renderTabbedFields",value:function(){var e=this,t=this.props.fields,n=this.state.verticalTabs,r=t;return(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)(rt,{render:this.renderTabs,subscription:{values:!0,errors:!0}}),(0,m.jsx)("div",{className:ur("tabs-content",{with_vertical_tabs:n}),children:r.map((function(t){return t.multiple?e.renderMultiTabContent(t):e.renderSingleTabContent(t)}))})]})}},{key:"hasTabs",value:function(){return t.hasTabs(this.props.fields)}},{key:"render",value:function(){var e,n=this.props,r=n.initialValues,a=n.modal,o=n.formExtras,l=n.validate,s=this.state.defaultValues,u=this.getFieldsCalculator(),c=u?[u]:void 0;e=r?Object.assign({},s,r):s;var d=a?this.renderModalDialog:this.renderPageDialog,f=(null!=o?o:{}).mutators;return(0,m.jsx)(et,(0,i.A)((0,i.A)({initialValuesEqual:Oe(),keepDirtyOnReinitialize:!0},o),{},{onSubmit:this.onApply,validate:l,subscription:t.FINAL_FORM_SUBSCRIPTIONS,mutators:this.hasTabs()?(0,i.A)((0,i.A)({},f),yt):f,initialValues:e,decorators:c,render:d}))}}],[{key:"registerControl",value:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).suppressDuplicateWarning;br.has(e)&&!n&&console.warn("Control '".concat(e,"' is already registered as the Dialog control!")),t.isTabControl&&vr.push(e),br.set(e,t)}},{key:"registerTabControl",value:function(e,n,r){t.registerControl(e,n,r)}},{key:"isEmptyField",value:function(e,t){var n=yr(e.type);return(n&&n.isEmpty?n.isEmpty:function(){return!1})(t)}},{key:"getDefaultValues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return we()(e,(function(e,n){var r=n;if(hr(r)){if(Array.isArray(r.fields))return(0,i.A)((0,i.A)({},e),t.getDefaultValues(r.fields))}else if(mr(r)){var a=t.getDefaultValues(r.fields);e[r.name]=r.multiple?[(0,i.A)((0,i.A)({},a),{},{id:1})]:a}else(function(e){try{return!mr(e)&&void 0!==yr(e.type)}catch(e){return!1}})(r)&&(e[r.name]=yr(r.type).getDefaultValue());return e}),{})}},{key:"makeRequiredValidator",value:function(e){return function(n){return t.isEmptyField(e,n)?Qn("validator:value-required"):void 0}}},{key:"getDerivedStateFromProps",value:function(e,n){var r={},i=e.fields;if(n.defaultValues||(r.defaultValues=t.getDefaultValues(i)),void 0===n.verticalTabs&&(r.verticalTabs=t.getTabsOrientation(i)),t.hasTabs(i)){var a=e.initialValues;void 0===n.activeTabId&&(r.activeTabId=t.getFirstTabId(i,a))}return Fe()(r)?null:r}},{key:"hasTabs",value:function(e){return e.some(mr)}},{key:"getFirstTabId",value:function(e,t){var n=e[0],r=n.multiple,i=n.name;return r?Vn(t[i][0]):i}},{key:"getTabsOrientation",value:function(e){var t=(0,C.A)(e,1)[0];if(!t||!mr(t))return null;var n=yr(t.type),r=n.isTabControl,i=n.isTabControlVertical;return void 0===r?null:i}},{key:"renderField",value:function(e,t,n){var r=e.extras;return"function"==typeof r?(0,m.jsx)(rt,{subscription:{values:!0},children:function(i){var a=i.values,o=i.form,l=r(a,{input:t,form:o,field:e});return(0,m.jsx)(Nr,{field:e,input:t,meta:n,extras:l})}}):(0,m.jsx)(Nr,{field:e,input:t,meta:n,extras:r})}},{key:"renderSeparator",value:function(e,t){return(0,m.jsx)("div",{className:ur("separator")},"separator-".concat(t))}},{key:"renderLabel",value:function(e){var t=e.name,n=e.type,r=e.required,i=e.caption,a=e.tooltip,o=br.get(n)&&br.get(n).renderLabel;return"function"==typeof o?o(e):(0,m.jsxs)("label",{className:ur("label"),htmlFor:t,children:[(0,m.jsx)("div",{className:ur("label-text",{required:r}),children:i}),Boolean(a)&&(0,m.jsx)("div",{children:(0,m.jsx)(Pe.A,{content:a,delayOpening:150,delayClosing:150,placement:["bottom","top","right"],children:(0,m.jsx)(Pt,{className:ur("q-icon")})})})]})}},{key:"operateOnTabs",value:function(e,t){var n=e.fields,r=e.values,a=e.errors,o=0;n.forEach((function(e){var n=e.name,l=e.type,s=e.multiple,u=e.renderControls,c=e.title,d=void 0===c?n:c,f=e.getTitle,v=e.isRemovable,h=e.visibilityCondition;if(!gr(l))throw new Error("Expected field of type 'tab', got '".concat(l,"'"));var m=r[n],p=a&&a[n],g={multiple:s,name:n,renderControls:u,visibilityCondition:h};s?m.forEach((function(e,n){var r=Vn(e);t((0,i.A)({id:r,error:p&&p[n],index:o,title:"function"==typeof f?f(e):"".concat(d," ").concat(r),isRemovable:"function"==typeof v?v:function(e){return 0!==e}},g)),o++})):(t((0,i.A)({id:n,error:p,index:o,title:"function"==typeof f?f(m):d,isRemovable:function(){return!1}},g)),o++)}))}},{key:"collectSubscribers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return we()(n,(function(n,r){var i=r;if(hr(i))Array.isArray(i.fields)&&t.collectSubscribers(e,i.fields,n);else{var a=i.name,o=i.subscribers,l="".concat(e).concat(a);o&&n.push({name:l,subscribers:o}),mr(i)&&t.collectSubscribers("".concat(l,"."),i.fields,n)}return n}),r)}}])}(a.Component);function Cr(e){return(0,m.jsx)(Ar,(0,i.A)({},e))}Ar.defaultProps={pristineSubmittable:!1,modal:!0,size:"m",headerProps:{},footerProps:{textApply:"Confirm",textCancel:"Cancel"},onClose:function(){}},Ar.FINAL_FORM_SUBSCRIPTIONS={submitting:!0,pristine:!0,invalid:!0,dirtySinceLastSubmit:!0,hasValidationErrors:!0,hasSubmitErrors:!0},Ar.registerTabControl("tab",Hn),Ar.registerTabControl("tab-vertical",Zn),Ar.registerControl("text",qt),Ar.registerControl("textarea",an),Ar.registerControl("select",ln),Ar.registerControl("tumbler",fn),Ar.registerControl("block",pn),Ar.registerControl("plain",hn),Ar.registerControl("checkbox",ge),Ar.registerControl("radio",An),Ar.registerControl("editable-list",Sn),Ar.registerControl("multi-editable-lists",Tn),Ar.registerControl("multi-text",Pn);var xr=Ar.registerControl,Sr=Ar.registerTabControl;function Nr(e){var t,n=e.field,r=e.extras,o=void 0===r?{}:r,l=e.meta,s=e.input,u=n.type,c=n.name,d=n.touched;l.error&&(d||l.touched||l.dirty)?t=l.error:!l.submitError||l.dirtySinceLastSubmit||l.submitting||(t=l.submitError);var f=o.onFocus,v=o.onBlur,h=s.onFocus,p=s.onBlur,g=fe(_n(f,h)),b=fe(_n(v,p)),y=(0,i.A)((0,i.A)((0,i.A)({id:c},o),s),{},{onFocus:g,onBlur:b}),A=yr(u);return A.hasErrorRenderer&&(y.error=t,t=null),(0,m.jsxs)(a.Fragment,{children:[a.createElement(A,(0,i.A)({},y)),t&&(0,m.jsx)("div",{className:ur("field-error"),children:t})]})}var wr=n(95664),Er=n(17852),jr=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(e=(0,u.A)(this,t,[].concat(r))).onSubejctsControlChange=function(t){var n=e.props,r=n.value;(0,n.onChange)((0,i.A)((0,i.A)({},r),{},{newItems:t}))},e.onManyListsChange=function(t){var n=(0,C.A)(t,1)[0];if(n){var r=e.props,a=r.value;(0,r.onChange)((0,i.A)((0,i.A)({},a),{},{current:n}))}},e.renderItem=function(e){var t=e.title;return"users"===(e.data||{}).type?(0,m.jsx)(wr.R,{name:t}):t},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,n=e.className,r=e.value,i=e.placeholder,a=e.maxVisibleCount,o=e.allowedTypes,l=t.prepareManyListData(r);return(0,m.jsxs)("div",{className:(0,Er.om)(null,n),children:[(0,m.jsx)(f,{onChange:this.onSubejctsControlChange,value:r.newItems||[],placeholder:i,allowedTypes:o}),l.length>0&&(0,m.jsx)(Tn,{className:(0,Er.om)("many-lists"),value:l,titleClassName:(0,Er.om)("many-lists-title"),onChange:this.onManyListsChange,maxVisibleCount:a,itemRenderer:this.renderItem})]})}}],[{key:"getDefaultValue",value:function(){return{newItems:[],current:{title:"",data:[]},toAdd:{title:"",data:[]},toRemove:{title:"",data:[]},unrecognized:{title:"",data:[]}}}},{key:"isEmpty",value:function(){return!1}},{key:"prepareManyListData",value:function(e){var t=e.current,n=e.toAdd,r=e.toRemove,a=e.unrecognized;return[(0,i.A)({},t),n,r,a].filter((function(e){return e.data&&e.data.length>0}))}}])}(a.Component);jr.defaultProps={maxVisibleCount:3};var Tr=n(48377),kr=n(15647),Ir=n(50916),Or=n(87319),Rr=["className","value","onChange","children","suggestions"],Vr=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).getItems=function(e){return e},e.onChange=function(t){(0,e.props.onChange)("string"==typeof t?t:t.value)},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=(e.className,e.value),n=(e.onChange,e.children,e.suggestions),r=(0,A.A)(e,Rr);return(0,m.jsx)(Or.A,(0,i.A)((0,i.A)({},r),{},{text:t,apply:this.onChange,items:n,filter:this.getItems}))}}])}(a.Component);Vr.isEmpty=function(e){return""===e||null==e},Vr.getDefaultValue=function(){return""};var _r=(0,kr.Ng)((function(e){return{suggestions:(0,Ir.l$)(e)}}))(Vr),Fr=(0,kr.Ng)((function(e){return{suggestions:(0,Ir.bl)(e)}}))(Vr),Br=(0,o.A)("ic-select-with-subitems"),Lr=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).onChange=function(t){var n=e.props,r=n.value,i=n.onChange,a=n.subItemsMap,o=void 0===a?{}:a,l=r||[],s=(0,C.A)(l,2),u=s[0],c=s[1],d=o[t];u!==t&&i(d?[t,d.find((function(e){return e.value===c}))?c:d[0].value]:[t])},e.onSubValueChange=function(t){var n=e.props,r=n.value||[];(0,n.onChange)([(0,C.A)(r,1)[0],t])},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.className,n=e.value,r=e.items,i=e.labels,a=e.placeholder,o=e.subItemsMap,l=void 0===o?{}:o,s=n||[],u=(0,C.A)(s,2),c=u[0],d=u[1],f=i||[],v=(0,C.A)(f,2),h=v[0],p=v[1],g=l[c],b=d||g&&g[0].value;return(0,m.jsxs)("div",{className:Br(null,t),children:[this.renderSelect(c,r,this.onChange,h,a),this.renderSelect(b,l[c],this.onSubValueChange,p,void 0)]})}},{key:"renderSelect",value:function(e,t,n,r,i){if(!t||!t.length)return null;var a=this.props.labelClassName;return(0,m.jsxs)("div",{className:Br("control"),children:[r&&(0,m.jsx)("span",{className:Br("control-label",a),children:r}),(0,m.jsx)(h.l,{options:t,value:[e],onUpdate:function(e){return n(e[0])},placeholder:i,width:"max",disablePortal:!0})]})}}],[{key:"getDefaultValue",value:function(){return[]}},{key:"isEmpty",value:function(e){return!e||0===e.length}}])}(a.Component),Dr=n(14242),Pr=n(67270),zr=["onChange","placeholder","value","error"],Mr=(0,o.A)("accounts-suggest");function Ur(e){var t=e.onChange,n=e.placeholder,r=e.value,a=e.error,o=(0,A.A)(e,zr),l=(0,kr.d4)(Dr.wY).sortedFlatTree,s=Le()(l,(function(e){return{value:e,text:e}}));return(0,m.jsxs)("div",{className:Mr({empty:!r,error:Boolean(a)}),children:[(0,m.jsx)(Pr.A,(0,i.A)((0,i.A)({},o),{},{items:s,onUpdate:function(e){return t(e[0])},placeholder:n,value:r?[r]:void 0,width:"max"})),a&&(0,m.jsx)("div",{className:Mr("error"),children:a})]})}Ur.isEmpty=function(e){return!e},Ur.getDefaultValue=function(){return""},Ur.hasErrorRenderer=!0;var qr=function(e){return e.suggests.tabletCellBundles.items},Hr=n(52797),Gr=n(27859),$r=["onChange","placeholder"],Wr=(0,o.A)("tablet-cell-bundles-suggest");function Kr(e){var t=(0,kr.d4)(qr),n=(0,kr.wA)();a.useEffect((function(){n((function(e,t){e({type:"SUGGEST_TABLET_CELL_BUNDLES_REQUEST"});var n=(0,Hr.ID)(t());return Gr.Qq.get(Gr.Vu.getUsableBundles,{path:"//sys/users/".concat(n,"/@usable_tablet_cell_bundles")}).then((function(t){e({type:"SUGGEST_TABLET_CELL_BUNDLES_SUCCESS",data:{items:t}})})).catch((function(t){e({type:"SUGGEST_TABLET_CELL_BUNDLES_ERROR",data:t})}))}))}),[]);var r=e.onChange,o=e.placeholder,l=(0,A.A)(e,$r),s=e.value,u=Le()(t,(function(e){return{value:e,text:e}}));return(0,m.jsx)("div",{className:Wr({empty:!s}),children:(0,m.jsx)(Pr.A,(0,i.A)((0,i.A)({},l),{},{items:u,onUpdate:function(e){return r(e[0])},placeholder:o,value:s?[s]:void 0,width:"max",disablePortal:!0}))})}Kr.isEmpty=function(e){return!e},Kr.getDefaultValue=function(){return""};const Zr=Kr;var Jr=n(63281),Yr=n.n(Jr),Qr=n(62044),Xr=(0,o.A)("editable-path-list"),ei=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).onListChange=function(t){var n=we()(t,(function(e,t){var n=t.title;return t.removed||e.push(n),e}),[]);e.props.onChange(n)},e.onPathEditorChange=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=e.props,o=a.value,l=void 0===o?[]:o;(0,a.onChange)([].concat((0,x.A)(l),[i]).sort())},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.defaultPath,r=e.placeholder,i=Le()(Yr()(t),(function(e){return{title:e}}));return(0,m.jsxs)("div",{className:Xr(),children:[(0,m.jsx)(Qr.A,{placeholder:r,defaultPath:n,onApply:this.onPathEditorChange}),(0,m.jsx)(Sn,{className:Xr("list"),value:i,onChange:this.onListChange})]})}}],[{key:"getDefaultValue",value:function(){return Sn.getDefaultValue()}},{key:"isEmpty",value:function(e){return!(null!=e&&e.length)}}])}(a.Component),ti=["value","placeholder","onChange"],ni=(0,o.A)("path-editor-control");function ri(e){var t=e.value,n=e.placeholder,r=e.onChange,o=(0,A.A)(e,ti),l=a.useCallback((function(e){r(e)}),[r]);return(0,m.jsx)(Qr.A,(0,i.A)({className:ni(),defaultPath:t,placeholder:n,onApply:l,onChange:l},o))}ri.getDefaultValue=function(){return""},ri.isEmpty=function(e){return!e};var ii=n(32235),ai=n(73384),oi=n(16538),li=n(75299),si=n(87446),ui=n(79703),ci=(0,o.A)("form-option-item"),di=function(e){var t=e.name,n=e.tooltip,r=e.checked,i=e.onUpdate;return(0,m.jsxs)("div",{className:ci(),children:[(0,m.jsx)(he.S,{checked:r,onUpdate:function(e){i(t,e)},children:t}),(0,m.jsx)(si.m,{content:n,className:ci("tooltip"),children:(0,m.jsx)(ii.I,{data:ui.A,className:ci("info"),size:16})})]})},fi=n(59381),vi=(0,r.A)((0,r.A)((0,r.A)({},fi.CN.COMPRESSION_CODEC,"Sets the compression format for output table. The attribute can be specified with the write_file, write_table commands, and on operation output paths. This attribute is incompatible with <append=true>."),fi.CN.ERASURE_CODEC,"Turn off erasure-coding to create a table. The attribute can be monitored with the write_file, write_table commands, and on operation output paths. This attribute is incompatible with <append=true>."),fi.CN.OPTIMIZE_FOR,"Sets the storage format for output table. The attribute can be specified with the write_table command and on the output paths of operations. This attribute is not compatible with <append=true>."),hi=function(e){return e in vi?vi[e]:void 0},mi=(0,o.A)("add-option-form"),pi=function(e){var t=e.attributes,n=e.onChange,r=(0,a.useRef)(null),i=(0,li.A)(!1),o=(0,C.A)(i,2),l=o[0],s=o[1],u=(0,a.useMemo)((function(){return Object.values(t).map((function(e){var t=e.active,r=e.type;return(0,m.jsx)(di,{name:r,onUpdate:n,tooltip:hi(r)||"",checked:t},r)}))}),[t,n]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(In.$,{ref:r,view:"outlined",onClick:s,children:(0,m.jsx)(ii.I,{data:oi.A,size:16})}),(0,m.jsx)(ai.z,{anchorRef:r,open:l,contentClassName:mi(),onClose:s,children:u})]})},gi=n(21533),bi=n(50704),yi=[{value:"scan",content:"Scan"},{value:"lookup",content:"Lookup"}],Ai=function(e){var t=e.attribute,n=e.onChange;return t.active?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:"Optimize for:"}),(0,m.jsx)(gn.a,{defaultValue:t.value,onUpdate:function(e){n((0,i.A)((0,i.A)({},t),{},{value:e}))},options:yi})]}):null},Ci=function(e){var t=e.attribute,n=e.codecs,r=e.onChange;if(!t.active)return null;var o=t.value.split("_");return o.length>1&&(2===o.length?o[0]="".concat(o[0],"_"):o=[t.value]),(0,m.jsxs)(a.Fragment,{children:[(0,m.jsx)("div",{children:"Compression:"}),(0,m.jsx)(Lr,(0,i.A)((0,i.A)({value:o},n),{},{labels:["","level"],onChange:function(e){r((0,i.A)((0,i.A)({},t),{},{value:e.join("")}))}}))]})},xi=n(16455),Si=function(e){var t=e.attribute,n=e.codecs,r=e.onChange;return t.active?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:"Erasure codec:"}),(0,m.jsx)(Pr.L,{value:t.value,onChange:function(e){r((0,i.A)((0,i.A)({},t),{},{value:e||""}))},items:n})]}):null},Ni=(0,o.A)("output-path-control"),wi=function(e){var t=e.value,n=e.onChange,r=e.placeholder,i=e.disabled,o=(0,kr.wA)(),l=(0,kr.d4)(gi.CG),s=(0,kr.d4)(xi.gX),u=(0,kr.d4)(xi.dw);(0,a.useEffect)((function(){return t&&o((0,bi.Hw)(t)),function(){o((0,fi.jl)())}}),[o,t]);var c=(0,a.useCallback)((function(e,t){o((0,fi.Xy)({key:e,isActive:t}))}),[o]),d=(0,a.useCallback)((function(e){o((0,fi.XM)(e))}),[o]);return(0,m.jsxs)("div",{className:Ni(),children:[(0,m.jsxs)("div",{className:Ni("form"),children:[(0,m.jsx)(pi,{attributes:l,onChange:c}),(0,m.jsx)(zt.k,{hasClear:!0,value:t||"",onUpdate:n,placeholder:r,disabled:i})]}),(0,m.jsxs)("div",{className:Ni("attributes"),children:[(0,m.jsx)(Ai,{attribute:l[fi.CN.OPTIMIZE_FOR],onChange:d}),(0,m.jsx)(Ci,{attribute:l[fi.CN.COMPRESSION_CODEC],codecs:s,onChange:d}),(0,m.jsx)(Si,{attribute:l[fi.CN.ERASURE_CODEC],codecs:u,onChange:d})]})]})};wi.getDefaultValue=function(){return""},wi.isEmpty=function(e){return!e};var Ei=n(70243),ji=n(49214),Ti=n.n(ji),ki=n(68309),Ii=n(89999),Oi=n(82947),Ri=n(29746),Vi=n(19261),_i=n(40519);function Fi(e){var t=e.value,n=e.onChange,r=(0,kr.d4)(Oi.Gf),a=(0,kr.d4)(Hr.dB),o=(0,ki.Ou)({parameters:{requests:[{command:"list",parameters:(0,i.A)((0,i.A)({path:"//sys/accounts"},_i.v),_i.R)}]},id:Vi.V.listAccounts,errorTitle:"Failed to fetch accounts list"}),l=o.data,s=o.isLoading,u=(0,Ii.W)({cluster:a}).data,c=l&&l.length&&l[0].output?Le()(Ti()(Ri.A.getValue(l[0].output),Boolean),(function(e){return{value:e,content:e}})):[];return(0,m.jsxs)(Ei.s,{gap:1,direction:"column",children:[(0,m.jsxs)(Ei.s,{gap:1,direction:"column",children:[(0,m.jsx)(h.l,{onUpdate:n,options:c,multiple:!0,popupWidth:"fit",value:t,filterable:!0,hasClear:!0,width:"max",loading:s}),(0,m.jsx)("div",{children:null!=t&&t.length?(0,m.jsx)(Bi,{items:t,onDelete:function(e){n(t.filter((function(t){return t!==e})))}}):null})]}),(0,m.jsx)("div",{children:(0,m.jsxs)(Ei.s,{direction:"row",gap:1,children:[(0,m.jsx)(In.$,{size:"m",onClick:function(){n(Le()(r,(function(e){return e.path})))},children:(0,m.jsx)(Ei.s,{alignItems:"center",gap:2,children:"Favourite"})}),(0,m.jsx)(In.$,{size:"m",onClick:function(){n(u||[])},children:(0,m.jsx)(Ei.s,{alignItems:"center",gap:2,children:"Usable"})})]})})]})}function Bi(e){var t=e.items,n=e.onDelete;return(0,m.jsx)(Ei.s,{gap:1,wrap:"wrap",children:t.map((function(e){return(0,m.jsx)(Li,{item:e,onDelete:n},e)}))})}function Li(e){var t=e.item,n=e.onDelete;return(0,m.jsx)(kn.J,{theme:"unknown",type:"close",size:"xs",onCloseClick:function(){return n(t)},children:t})}Fi.isEmpty=function(e){return!e},Fi.getDefaultValue=function(){return[]};var Di=n(70353),Pi=n(20803),zi=n.n(Pi),Mi=n(80648),Ui=n.n(Mi),qi=n(80676),Hi=n.n(qi),Gi=n(88144),$i=n.n(Gi),Wi=n(41169),Ki=n(48971),Zi=n(74069),Ji=(0,o.A)("pool-suggest-control");function Yi(e){var t=e.allowEmpty,n=e.allowEphemeral,r=e.value,o=e.onChange,l=e.placeholder,s=e.poolTrees,u=e.cluster,c=e.calculateValueOnPoolsLoaded,d=e.disabled,f=a.useState([]),v=(0,C.A)(f,2),h=v[0],p=v[1],g=function(e,t){t=t||[];var n=a.useState(null),r=(0,C.A)(n,2),o=r[0],l=r[1],s=(0,Zi.BL)();return a.useMemo((function(){var n,r=t.length?t:s?[s]:[];if(r.length)return n=e?function(e,t){return Promise.all(t.map((function(t){return Wi.A.get("/api/pool-names/".concat(e,"?poolTree=").concat(t))}))).then((function(e){var t,n={},r=(0,Di.A)(e);try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=(0,Di.A)(a.data.names);try{for(o.s();!(i=o.n()).done;)n[i.value]=!0}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n)}))}(e,r):function(e){return Promise.all(e.map((function(e){return Gr.Qq.list(Gr.Vu.listPoolNames,(0,i.A)({path:"//sys/scheduler/orchid/scheduler/pool_trees/".concat(e,"/pools")},_i.v))}))).then((function(e){var t,n={},r=(0,Di.A)(e);try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=(0,Di.A)(Ri.A.getValue(a));try{for(o.s();!(i=o.n()).done;)n[i.value]=!0}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return Object.keys(n)}))}(r),(0,Ki.fI)(n,{skipSuccessToast:!0,toasterName:"load-pool-names",errorTitle:"Failed to load pools"}).then((function(e){l(e)}))}),[e,s,t.join()]),o}(u,s);a.useEffect((function(){if(g){var e=Ti()(g,(function(e){return"<Root>"!==e})),t=zi()(e,r);r&&-1===t&&o(""),p(Yr()(e)),c&&o(c({loadedPoolNames:e}))}}),[g&&g.join(),p,o,c]);var b=a.useCallback((function(e,t){if(!t)return h;var n=Hi()(h,t,(function(e){return e.substring(0,t.length)})),r=$i()(h,t,(function(e){return e.substring(0,t.length)}));return Ui()(h,n,r)}),[h]);return(0,m.jsx)(Or.A,{popupClassName:Ji("popup"),text:r,filter:b,onItemClick:function(e){return o("string"==typeof e?e:e.value)},onTextUpdate:function(e){t&&!e?o(""):n&&o(e)},placeholder:l,disabled:d})}function Qi(e){var t=e.value,n=e.onChange,r=e.disabled,i=e.placeholder,o=(0,kr.d4)(Hr.iq);(0,Zi.si)();var l=a.useMemo((function(){return Le()(o,(function(e){return{value:e,content:e}}))}),[o]);return(0,m.jsx)(h.l,{disabled:r,value:t,options:l,onUpdate:n,placeholder:i,width:"max",filterable:(null==l?void 0:l.length)>5,multiple:!0})}Yi.getDefaultValue=function(){return""},Yi.isEmpty=function(e){return!e},Qi.getDefaultValue=function(){return[]},Qi.isEmpty=function(e){return!e.length};var Xi=n(3659),ea=n(36197),ta=(0,o.A)("table-sort-by-control");function na(e){var t=e.value,n=e.suggestColumns,r=e.onChange,o=e.allowDescending,l=a.useMemo((function(){return Le()(t,"name")}),[t]),s=a.useState({}),u=(0,C.A)(s,2),c=u[0],d=u[1],f=a.useCallback((function(e){var t=Le()(e,(function(e){var t={name:e};return c[e]&&(t.descending=!0),t}));r(t)}),[c,r]);return(0,m.jsx)(ea.g,{className:ta(),value:l,onUpdate:f,items:n,renderItemValue:function(e){var t=c[e],n=t?"sort-amount-up":"sort-amount-down-alt";return(0,m.jsxs)("div",{className:ta("item"),children:[o&&(0,m.jsx)("span",{className:ta("item-icon"),title:t?"Descending":"Ascending",onClick:function(){var t=(0,i.A)({},c);c[e]?delete t[e]:t[e]=!0,d(t)},children:(0,m.jsx)(N.A,{awesome:n})}),(0,m.jsx)("span",{className:ta("item-name"),children:Xi.A.decode(e)})]})}})}na.getDefaultValue=function(){return[]},na.isEmpty=function(e){return!(null!=e&&e.length)};var ra=n(64772),ia=n(53332),aa=(0,o.A)("table-chunk-size");function oa(e){if(!e)return"";var t=(0,ia.z_)(e);return isNaN(t)?"Cannot parse as bytes":ra.A.Bytes(t)}function la(){return["512M","2G"]}function sa(e){var t=e.value,n=void 0===t?"":t,r=e.onChange,i=e.placeholder;return(0,m.jsxs)("div",{className:aa(),children:[(0,m.jsx)(Or.A,{text:n,popupClassName:aa("popup"),apply:function(e){return r("string"==typeof e?e:e.value)},filter:la,items:["512M","2G"],placeholder:i||"Chunk size...",popupPlacement:["top"]}),(0,m.jsx)("div",{className:aa("pretty"),children:(0,m.jsxs)("span",{children:[oa(n)," "]})})]})}sa.getDefaultValue=function(){},sa.isEmpty=function(e){return!e};var ua=n(10720);function ca(e){var t=e.onChange,n=e.placeholder,r=e.value,i=a.useState([]),o=(0,C.A)(i,2),l=o[0],s=o[1],u=(0,kr.d4)(Hr.ID);return a.useEffect((function(){Gr.Qq.get(Gr.Vu.listUsableAccounts,{path:"//sys/users/".concat(u,"/@usable_accounts")}).then((function(e){s(e)})).catch((function(e){(new ua.I).add({name:"usable_accounts",theme:"danger",title:"Failed to load usable accounts",content:null==e?void 0:e.message,actions:[{label:" Details",onClick:function(){return(0,Ki.eW)(e)}}],autoHiding:!1})}))}),[u,s]),(0,m.jsx)(g.Oo,{placeholder:n,value:r,onChange:t,items:l})}ca.isEmpty=function(e){return!e},ca.getDefaultValue=function(){return""};var da=n(65399),fa=n(89648),va=n(36877),ha=n(78519),ma=n(71217),pa=["value","onChange","unipikaSettings","nullPreview","folding"],ga=a.memo(ya);function ba(e){var t=e.value,n=e.onChange,r=e.unipikaSettings,o=e.nullPreview,l=e.folding,s=(0,A.A)(e,pa),u=t.value,c=a.useCallback((function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).value;if(u!==e)if(void 0===u&&""===e);else try{e&&JSON.parse(e),n({value:e})}catch(t){if(!(t instanceof Error))return;n({value:e,error:t.message})}}),[n,u]),d=a.useCallback((function(e){n({value:u,error:"".concat(e)})}),[u,n]);return(0,m.jsx)(va.O,(0,i.A)((0,i.A)({initialShowPreview:!0},s),{},{value:t,onChange:c,editorTitle:"Use JSON syntax"+(s.disabled?" (readonly)":""),editorLang:"json",renderPreview:function(){return(0,m.jsx)(ma.A,{maxCompactMessageLength:200,onError:d,disableRum:!0,children:(0,m.jsx)(ga,{value:t,nullPreview:o,settings:r,onError:d,folding:l})},u)}}))}function ya(e){var t=e.value,n=t.value,r=t.error,i=e.settings,o=e.folding,l=e.onError,s=e.nullPreview,u=a.useMemo((function(){try{return JSON.parse(n||"null")}catch(e){return void l(e)}}),[n,l]);return r?(0,m.jsx)(fa.E,{color:"danger",children:r}):null==u?(0,m.jsxs)(a.Fragment,{children:["Default value:",(0,m.jsx)(ha.A,{value:null!=s?s:null,folding:o,settings:i})]}):(0,m.jsx)(ha.A,{value:u,folding:o,settings:i})}ba.isEmpty=function(e){return!e},ba.validate=function(e){try{if(!e.value)return;return void JSON.parse(e.value)}catch(e){return e.message}},ba.getDefaultValue=function(){return{value:void 0}};var Aa=n(58595),Ca=n(19948),xa=n(66205),Sa=n(11865),Na=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).onChange=function(t){var n=t.limit,r=t.source,i=t.error;(0,e.props.onChange)({limit:n,source:r,error:i})},e.getInfoByName=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=e.props,r=n.poolsByName,i=n.resourceType,a=r[t];if(Fe()(a))return{limit:1/0,total:1/0};var o=(0,Sa.h)(a,i),l=o.value;return{totalChildrenLimit:o.childrenSum,total:0,limit:l}},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"render",value:function(){var e=this.props,t=e.pool,n=e.format,r=e.value,a=void 0===r?{}:r,o=a.source,l=a.limit,s=e.error,u=e.initialLimit,c=e.decimalPlaces,d=e.min,f=e.max,v=e.sourcesSkipParent,h=e.limitInputTitle;return(0,m.jsx)(Aa.A,{currentAccount:t,sourceAccount:o,limit:l,prevLimit:u,min:d,max:f,error:s,format:n,onChange:this.onChange,getInfoByName:this.getInfoByName,renderSourceSuggest:function(e){return(0,m.jsx)(Ea,(0,i.A)((0,i.A)({},e),{},{skipParent:v}))},limitInputTitle:h||"Guaranteed",sourceSuggestTitle:"Pool for distribution",decimalPlaces:c})}}],[{key:"getDefaultValue",value:function(){return{}}},{key:"isEmpty",value:function(e){return Fe()(e)}},{key:"validate",value:function(e){return e.error}},{key:"isEqual",value:function(e,t){return Oe()(e,t)}}])}(a.Component);Na.hasErrorRenderer=!0;const wa=(0,kr.Ng)((function(e){return{poolsByName:(0,Ca.w3)(e)}}))(Na);function Ea(e){var t=e.value,n=e.onChange,r=e.disabled,i=e.skipParent,o=(0,kr.d4)(xa.D2),l=(0,kr.d4)(xa.m2),s=a.useMemo((function(){var e=i?l:o;return Le()(e,(function(e){return{value:e,text:e}}))}),[i,o,l]);return(0,m.jsx)(Pr.A,{value:t?[t]:void 0,onUpdate:function(e){return n(e[0])},items:s,disabled:!(null!=o&&o.length)||r,placeholder:"Select pool..."})}var ja=n(80200),Ta=n(63082),ka=(0,o.A)("bundle-table-field"),Ia=[{id:"type",name:"Type",width:"25%"},{id:"memory",name:"Memory",width:"25%"},{id:"vcpu",name:"vCPU",width:"25%"},{id:"net",name:"Network",width:"25%"}];function Oa(e){var t=e.value,n=e.onChange,r=e.onRadioClick,i=e.data,o=(0,a.useMemo)((function(){return[{id:"radio",name:"",template:function(e){var i=(null==t?void 0:t.type)===e.id;return(0,m.jsx)(ja.s,{value:e.id,checked:i,onUpdate:function(t){t&&(n(e.initialData),"function"==typeof r&&r(e.initialData))},disabled:e.disabled})}}].concat(Ia)}),[i,t]);return(0,m.jsx)(Ta.X,{className:ka("table"),columns:o,data:i,edgePadding:!0})}Oa.isEmpty=function(e){return!e},Oa.getDefaultValue=function(){return""};var Ra=n(79240);const Va=function(e){return(0,m.jsx)("svg",(0,i.A)((0,i.A)({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 14"},e),{},{children:(0,m.jsx)("path",{fillOpacity:.3,d:"M1.21 1.361a.293.293 0 0 0-.507.203v3.631c0 .178.127.305.305.305h3.63a.293.293 0 0 0 .204-.508L3.47 3.622A4.88 4.88 0 0 1 7 2.147a4.985 4.985 0 0 1 4.977 4.977A4.97 4.97 0 0 1 7 12.102a4.94 4.94 0 0 1-3.326-1.245c-.127-.101-.305-.101-.406 0l-.508.508a.32.32 0 0 0 0 .457 6.4 6.4 0 0 0 4.24 1.6c3.453 0 6.272-2.793 6.297-6.272 0-3.478-2.844-6.322-6.322-6.322-1.727 0-3.301.711-4.444 1.854z"})}))};var _a=(0,o.A)("bundle-title");function Fa(e){var t=e.className,n=e.params,r=e.onReset;return(0,m.jsxs)("div",{className:_a(null,t),children:[(0,m.jsx)(Ra.h,{className:_a("params"),params:n,size:"m"}),(0,m.jsxs)(In.$,{className:_a("btn"),onClick:r,children:[(0,m.jsx)(ii.I,{className:_a("icon"),data:Va}),"Reset to default"]})]})}Fa.isEmpty=function(e){return!e},Fa.getDefaultValue=function(){return""};var Ba=n(11970),La=n(19410),Da=(0,o.A)("yt-bundle-input");function Pa(e){var t=e.value,n=e.onChange,r=e.postfix,o=e.hint,l=e.readonly,s=e.format,u=e.progress,c=e.withoutDetailedBar,d=void 0!==c&&c,f=e.hasClear,v=void 0!==f&&f,h=e.decimalPlaces,p=e.preciseInitialRawValue,g=e.error,b=e.disabled,y=(0,a.useState)(),A=(0,C.A)(y,2),x=A[0],S=A[1],N=(0,a.useState)(),w=(0,C.A)(N,2),E=w[0],j=w[1],T=(0,a.useState)(),k=(0,C.A)(T,2),I=k[0],O=k[1],V=(0,a.useState)(),_=(0,C.A)(V,2),F=_[0],B=_[1],L=(0,a.useState)(!1),D=(0,C.A)(L,2),P=D[0],z=D[1];(0,a.useEffect)((function(){E!==g&&j(g)}),[g]),(0,a.useEffect)((function(){if(x!==t){var e=(0,R.Fl)(t,s,{digits:h});S(t),B(e),void 0===I&&O(p?function(e){return void 0===e?"":String(e)}(t):e)}}),[t]);var M=P?I:F,U=u&&(0,Ki.z)((null==u?void 0:u.usage)||0,Number(t)||0,s);return(0,m.jsxs)("div",{className:Da(null),children:[(0,m.jsx)("div",{className:Da("row"),children:(0,m.jsx)("div",{className:Da("right"),children:(0,m.jsxs)("div",{className:Da("control-block"),children:[l?(0,m.jsx)("span",{className:Da("text"),children:t}):(0,m.jsx)(zt.k,{className:Da("input"),autoComplete:!1,value:M,onUpdate:function(e){var t=(0,R.$x)(e,s),r=function(e){if(Number.isNaN(e))return"wrong format"}(t);S(t),O(e),B((0,R.Fl)(t,s,{digits:h})),j(r),r||n(t)},hasClear:v,error:Boolean(E),onFocus:function(){return z(!0)},onBlur:function(){return z(!1)},disabled:b}),!d&&(0,m.jsx)(za,{data:r||F})]})})}),U&&(0,m.jsx)("div",{className:Da("row"),children:(0,m.jsx)(La.m,{content:"Usage",children:(0,m.jsx)("div",{className:Da("left"),children:(0,m.jsx)(Ba.k,(0,i.A)({className:Da("progress")},U))})})}),!E&&o&&(0,m.jsx)("div",{className:Da("row"),children:(0,m.jsx)("span",{className:Da("hint",Da("right")),children:o})}),E&&(0,m.jsx)("div",{className:Da("row"),children:(0,m.jsx)("span",{className:Da("error",Da("right")),children:E})})]})}function za(e){var t=e.data;return t?(0,m.jsx)("span",{className:Da("meta"),children:t}):null}function Ma(e){var t=d.Ay.renderControlAbcService(e);return(0,m.jsx)(m.Fragment,{children:t||"-"})}Pa.isEmpty=function(e){return!e},Pa.getDefaultValue=function(){return""},Pa.hasErrorRenderer=!0,Ma.getDefaultValue=function(){};var Ua=n(15672),qa=(0,o.A)("before-date-picker"),Ha="unlimited",Ga="period",$a="date",Wa=[Ha,Ga,$a],Ka=(0,r.A)((0,r.A)((0,r.A)({},Ha,"Forever"),Ga,"Period"),$a,"To Date"),Za=864e5,Ja=function(e){function t(){var e;(0,l.A)(this,t);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(e=(0,u.A)(this,t,[].concat(r))).state={viewType:null,period:null,periodError:null},e.onChangeViewType=function(n){var r=n.target.value;e.setState({viewType:r,periodError:null,period:null});var i=e.props.value;r===t.UNLIMITED&&null!==i&&e.onNewDate(null)},e.onChangePeriod=function(t){e.setState({period:t});var n=Number.parseInt(t);String(n)===t?e.onNewDate(function(e){var t=(new Date).getTime();return new Date(t+e*Za)}(n)):""!==t&&e.setState({periodError:"Please enter a valid number"})},e.onDate=function(t){e.onNewDate(new Date(t.from))},e}return(0,c.A)(t,e),(0,s.A)(t,[{key:"renderRadioButton",value:function(){var e=this.state.viewType,t=this.props.size;return(0,m.jsx)("div",{children:(0,m.jsx)(gn.a,{size:t,value:e||void 0,onChange:this.onChangeViewType,className:qa("view-type"),children:Wa.map((function(e){return(0,m.jsx)(gn.a.Option,{value:e,children:Ka[e]},e)}))})})}},{key:"renderDateInput",value:function(){var e=this.state,n=e.viewType,r=e.periodError,i=e.period,a=this.props,o=a.value,l=a.size,s=null;if(n===t.PERIOD){var u=null===i?function(e){if(e instanceof Date){var t=e.getTime()-(new Date).getTime();return Math.ceil(t/Za)}}(o):i;s=(0,m.jsx)(zt.k,{error:r||void 0,onUpdate:this.onChangePeriod,value:String(u||""),size:l,placeholder:"Enter days"})}return n===t.DATE&&(s=(0,m.jsx)(Ua.t1,{controlSize:l,from:o&&o.getTime(),range:!1,onUpdate:this.onDate,controlWidth:"unset"})),(0,m.jsx)("div",{className:qa("input-container"),children:s})}},{key:"onNewDate",value:function(e){var t=this.props.onChange;this.setState({periodError:null,period:null}),t(e)}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.onFocus,r=e.onBlur;return(0,m.jsxs)(Bn,{className:qa(null,t),onBlur:r,onFocus:n,children:[this.renderRadioButton(),this.renderDateInput()]})}}],[{key:"getDefaultValue",value:function(){}},{key:"isEmpty",value:function(){return!1}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.value,r={};return t.viewType||"unlimited"===t.viewType||(r.viewType=n?"date":"unlimited"),Object.keys(r).length>0?r:null}}])}(a.Component);Ja.UNLIMITED=Ha,Ja.PERIOD=Ga,Ja.DATE=$a,Ja.defaultProps={value:null};const Ya=Ja;var Qa=n(81954),Xa=["value","onChange"];function eo(e){var t=e.value,n=void 0===t?{}:t,r=e.onChange,a=(0,A.A)(e,Xa);return(0,m.jsx)(Ua.t1,(0,i.A)((0,i.A)((0,i.A)({},a),{},{allowNullableValues:!0},n),{},{onUpdate:function(e){r(e)}}))}eo.getDefaultValue=function(){};var to=n(47293),no=["onChange"];function ro(e){var t=e.onChange,n=(0,A.A)(e,no);return(0,m.jsx)(to.O,(0,i.A)((0,i.A)({},n),{},{onUpdate:t}))}function io(e){e.stopPropagation()}function ao(e){var t;return null!==(t=null==e?void 0:e.join("\n"))&&void 0!==t?t:""}function oo(e){var t=e.value,n=e.onChange,r=e.disabled,i=a.useState(),o=(0,C.A)(i,2),l=o[0],s=o[1],u=a.useMemo((function(){return ao(t)}),[t]);return(0,m.jsx)(tn,{placeholder:"Enter one column name per line",value:null!=l?l:u,disabled:r,onUpdate:function(e){s(e)},onFocus:function(){s(ao(t))},onBlur:function(){var e,t;n(null!==(t=null==(e=l)?void 0:e.split("\n"))&&void 0!==t?t:[]),s(void 0)},minRows:5,maxRows:10,onKeyDown:io,onKeyUp:io,onKeyPress:io})}ro.getDefaultValue=function(){return NaN},ro.isEmpty=function(e){return void 0===e},oo.isEmpty=function(e){return!(null!=e&&e.length)},oo.getDefaultValue=function(){};var lo=n(38790),so=n(63863),uo=n(39760),co=n.n(uo);function fo(e){var t,n,r=e.value,o=void 0===r?[{tree:"",pool:""}]:r,l=e.onChange,s=e.disabled,u=function(e){var t=(0,ki.Ou)({id:Gr.Vu.listPoolsTrees,parameters:{requests:[{command:"list",parameters:{path:"//sys/scheduler/orchid/scheduler/pool_trees"}}]},errorTitle:"Failed to fetch list of pools trees"}),n=t.data,r=t.isLoading,i=n&&(null==n?void 0:n.length)&&(null==n?void 0:n[0].output),o=(0,a.useMemo)((function(){return i?Le()(n[0].output,(function(e){return{value:e,content:e}})):[]}),[i]);return{trees:(0,a.useMemo)((function(){return e.map((function(e){return e.tree})).filter((function(e){return Boolean(e)}))}),[e]),isTreesLoading:r,treesOptions:o}}(o),c=u.trees,d=u.isTreesLoading,f=u.treesOptions,v=function(e){var t=(0,a.useMemo)((function(){return e.map((function(e){return{command:"list",parameters:(0,i.A)((0,i.A)({path:"//sys/scheduler/orchid/scheduler/pool_trees/".concat(e,"/pools")},_i.v),_i.R)}}))}),[e]),n=(0,ki.Ou)({id:Gr.Vu.listPools,parameters:{requests:t},errorTitle:"Failed to fetch pools list"}),r=n.data;return{isPoolsLoading:n.isLoading,poolOptionsMap:(0,a.useMemo)((function(){var t={};return r&&r.length&&co()(e,(function(e,n){r[n]&&r[n].output?t[e]=Le()(Ri.A.getValue(r[n].output),(function(e){return{value:e,content:e}})):t[e]=[]})),t}),[r,e])}}(c),p=v.poolOptionsMap,g=v.isPoolsLoading,b=function(e,t){return{addPair:function(){t([].concat((0,x.A)(e),[{tree:"",pool:""}]))},removePair:function(n){var r=(0,x.A)(e);r.splice(n,1),t(r)},updateTree:function(n,r){var a=(0,x.A)(e);a[n]=(0,i.A)((0,i.A)({},a[n]),{},{tree:r,pool:""}),t(a)},updatePool:function(n,r){var a=(0,x.A)(e);a[n]=(0,i.A)((0,i.A)({},a[n]),{},{pool:r}),t(a)}}}(o,l),y=b.removePair,A=b.addPair,C=b.updateTree,S=b.updatePool,N=Boolean(o.length)&&(null===(t=o[o.length-1])||void 0===t?void 0:t.pool)&&(null===(n=o[o.length-1])||void 0===n?void 0:n.tree);return(0,m.jsxs)(Ei.s,{gap:2,direction:"column",children:[o.map((function(e,t){return(0,m.jsxs)(Ei.s,{gap:2,direction:"row",alignItems:"center",children:[(0,m.jsx)(h.l,{onUpdate:function(e){return C(t,e[0])},options:f,popupWidth:"fit",value:[e.tree],filterable:!0,hasClear:!0,width:"max",loading:d,disabled:s,placeholder:"Select tree"}),(0,m.jsx)(h.l,{onUpdate:function(e){return S(t,e[0])},options:e.tree&&p[e.tree]||[],popupWidth:"fit",value:[e.pool],filterable:!0,hasClear:!0,width:"max",loading:g&&Boolean(e.tree),disabled:s||!e.tree,placeholder:"Select pool"}),o.length>1&&(0,m.jsx)(In.$,{view:"flat",onClick:function(){return y(t)},disabled:s,children:"Remove"})]},t)})),N&&(0,m.jsx)(Ei.s,{children:(0,m.jsx)(In.$,{size:"m",onClick:A,disabled:s,children:(0,m.jsxs)(Ei.s,{alignItems:"center",gap:2,children:[(0,m.jsx)(so.A,{}),"Add Pool Pair"]})})})]})}fo.isEmpty=function(e){return!e||0===e.length||e.every((function(e){return!e.tree||!e.pool}))},fo.getDefaultValue=function(){return[{tree:"",pool:""}]},fo.validate=function(e){if(e.length)return e[e.length-1].tree&&!e[e.length-1].pool?"Pool option is required":void 0};var vo=n(68051),ho=n(65667);function mo(e,t){try{var n=t.getState();if(!Boolean((0,Hr.jU)(n).chyt_controller_base_url))throw new Error("CHYT is not allowed on current cluster");return{data:ho.v.apply(void 0,(0,x.A)(e))}}catch(e){return{error:e}}}var po=vo.v.injectEndpoints({endpoints:function(e){return{chytFetch:e.query({queryFn:mo})}}}).useChytFetchQuery,go=n(79366),bo=n(27091);function yo(e){var t,n,r,a=e.value,o=void 0===a?[{service:"",item:""}]:a,l=e.onChange,s=e.disabled,u=(0,kr.d4)(Hr.jU).chyt_controller_base_url,c=(0,ki.Ou)({parameters:{requests:[{command:"exists",parameters:{path:"//sys/bundle_controller/orchid/bundle_controller/state/bundles"}}]},id:Gr.Vu.tabletBundleControllerState,errorTitle:"Failed to fetch bundle controller existance"}).data,d=[];u&&d.push({value:"chyt",content:"CHYT"}),null!=c&&null!==(t=c[0])&&void 0!==t&&t.output&&d.push({value:"bundle",content:"Bundle"});var f,v,p,g,b,y={bundles:(b=(0,ki.Ou)({id:Gr.Vu.listBundles,parameters:{requests:[{command:"list",parameters:(0,i.A)({path:"//sys/tablet_cell_bundles"},_i.v)}]},errorTitle:"Failed to fetch bundles list"},{selectFromResult:function(e){var t;return{bundles:null!=e&&e.data&&null!==(t=e.data)&&void 0!==t&&t.length?e.data[0].output:[],isBunldesLoading:e.isLoading}}})).bundles,isBundlesLoading:b.isBundlesLoading},A=y.bundles,C=y.isBundlesLoading,S=(f=(0,kr.d4)(Hr.dB),v=(0,kr.d4)(go.dU),p=new Set(["yt_operation_id","creator","state","health","health_reason"].concat((0,x.A)(bo.F))),{cliques:(g=po(["list",f,{attributes:(0,x.A)(p)},{isAdmin:v}],{selectFromResult:function(e){return{cliques:null!=e&&e.data&&"result"in e.data&&e.data.result?Le()(e.data.result,(function(e){return Ri.A.getValue(e)})):[],isCliquesLoading:e.isLoading}}})).cliques,isCliquesLoading:g.isCliquesLoading}),N=S.cliques,w=S.isCliquesLoading,E=function(e,t){return{addPair:function(){t([].concat((0,x.A)(e),[{service:"",item:""}]))},removePair:function(n){var r=(0,x.A)(e);r.splice(n,1),t(r)},updateService:function(n,r){var a=r,o=(0,x.A)(e);o[n]=(0,i.A)((0,i.A)({},o[n]),{},{service:a,item:""}),t(o)},updateItem:function(n,r){var a=(0,x.A)(e);a[n]=(0,i.A)((0,i.A)({},a[n]),{},{item:r}),t(a)}}}(o,l),j=E.addPair,T=E.removePair,k=E.updateItem,I=E.updateService,O=function(e){if(!e.service)return[];var t="chyt"===e.service?N:A;return Le()(t,(function(e){return{value:e,content:e}}))},R=function(e){return!!e.service&&("chyt"===e.service?w:C)},V=function(e){return e.service?"Select ".concat("chyt"===e.service?"clique":"bundle"):"Select item"};return(0,m.jsx)(m.Fragment,{children:d.length?(0,m.jsxs)(Ei.s,{direction:"column",gap:2,children:[o.map((function(e,t){return(0,m.jsxs)(Ei.s,{gap:2,children:[(0,m.jsx)(h.l,{options:d,onUpdate:function(e){return I(t,e[0])},popupWidth:"fit",value:[e.service],hasClear:!0,width:"max",disabled:s,placeholder:"Select service"}),(0,m.jsx)(h.l,{onUpdate:function(e){return k(t,e[0])},width:"max",hasClear:!0,filterable:!0,value:[e.item],options:O(e),loading:R(e),disabled:s||!e.service,placeholder:V(e)}),o.length>1&&(0,m.jsx)(In.$,{view:"flat",onClick:function(){return T(t)},disabled:s,children:"Remove"})]},t)})),Boolean(o.length)&&(null===(n=o[o.length-1])||void 0===n?void 0:n.service)&&(null===(r=o[o.length-1])||void 0===r?void 0:r.item)&&(0,m.jsx)(Ei.s,{children:(0,m.jsx)(In.$,{size:"m",onClick:j,disabled:s,children:(0,m.jsxs)(Ei.s,{alignItems:"center",gap:2,children:[(0,m.jsx)(so.A,{}),"Add Service"]})})})]}):(0,m.jsx)(fa.E,{color:"danger",variant:"body-2",children:"There are no services available on current cluster"})})}yo.isEmpty=function(e){return!e},yo.getDefaultValue=function(){return[{service:"",item:""}]},yo.validate=function(e){var t,n;if(e.length&&null!==(t=e[e.length-1])&&void 0!==t&&t.service&&(null===(n=e[e.length-1])||void 0===n||!n.item)){var r=e[e.length-1].service;return"".concat("chyt"===r?"Clique":"Bundle"," option is required")}};var Ao=(0,o.A)("yt-dialog");function Co(e){var t=e.modal,n=e.asLeftTopBlock,a=e.headerProps,o=e.hotkeyScope,l=void 0===o?"yt-dialog":o,s=(0,m.jsx)(Cr,(0,i.A)((0,i.A)({},e),{},{modal:!n&&t}));return(0,lo.B)(l,e.visible),n?(0,m.jsx)("div",{className:Ao("as-block",(0,r.A)({},"has-header",Boolean(a))),children:s}):s}xr("abc-control",Ma),xr("accountsSuggest",g.Ay),xr("usable-account",ca),xr("accounts-suggest-with-loading",g.Dk),xr("accounts-with-presets",Fi),xr("cluster",y.A),xr("acl-subjects",f),xr("acl-roles",jr),xr("acl-column-group",p),xr("acl-columns",oo),xr("permissions",v.A),xr("yt-group",b.A),xr("sortable-list",O),xr("bytes",_),xr("number",F),xr("time-duration",Qa.WM),xr("datepicker",eo),xr("select-with-subitems",Lr),xr("yt-select",Pr.A),xr("yt-select-single",Pr.L),xr("create-table-lock-suggest",_r),xr("create-table-group-suggest",Fr),xr("create-pool-parent",Ur),xr("tablet-cell-bundle",Zr),xr("path",ri),xr("output-path",wi),xr("editable-path-list",ei),xr("pool",Yi),xr("pool-tree",Qi),xr("pools-multiple",fo),xr("table-sort-by",na),xr("table-chunk-size",sa),xr("annotation",da.U),xr("json",ba),xr("pool-quota-editor",wa),xr("bundle-table-field",Oa),xr("bundle-title",Fa),xr("bundle-input",Pa),xr("range-input-picker",ro),xr("before-date",Ya),xr("services-select",yo),Sr("yt-create-table-tab",Tr.Ay)},75299:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(77810),i=function(e,t){return"boolean"==typeof t?t:!e};const a=function(e){return(0,r.useReducer)(i,e)}},76866:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(77810),i=n(33882),a=n(84549),o=n(64922),l=r.lazy((function(){return Promise.all([n.e(3872),n.e(8967),n.e(8810)]).then(n.bind(n,79647))}));const s=(0,i.A)(l,(0,o.jsx)(a.A,{visible:!0}))},77654:(e,t,n)=>{"use strict";n.d(t,{W:()=>u}),n(77810);var r=n(44415),i=n(15647),a=n(71217),o=n(13542),l=n(52797),s=n(64922);function u(e){var t=e.children;return(0,s.jsx)(i.Kq,{store:(0,o.ai)(),children:(0,s.jsx)(c,{children:(0,s.jsx)(a.A,{children:t})})})}function c(e){var t=e.children,n=(0,i.d4)(l.O4);return(0,s.jsx)(r.N,{theme:n,children:t})}},79240:(e,t,n)=>{"use strict";n.d(t,{h:()=>o}),n(77810);var r=n(76872),i=n(64922),a=(0,r.A)("bundle-params-list"),o=function(e){var t=e.className,n=e.params,r=e.size,o=void 0===r?"s":r;return(0,i.jsx)("div",{className:a({size:o},t),children:n.map((function(e){return(0,i.jsxs)("span",{children:[e.title," ",(0,i.jsxs)("span",{className:a("value",{type:e.type}),children:[e.value," ",e.postfix]})]},e.title)}))})}},79703:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(40319),i=n(64922);const a=function(e){return(0,i.jsx)("svg",(0,r.A)((0,r.A)({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 16 16"},e),{},{children:(0,i.jsx)("path",{fill:"currentColor",fillRule:"evenodd",d:"M8 13.5a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14M6.44 4.54c.43-.354.994-.565 1.56-.565 1.217 0 2.34.82 2.34 2.14 0 .377-.078.745-.298 1.1-.208.339-.513.614-.875.867-.217.153-.325.257-.379.328-.038.052-.038.07-.038.089a.75.75 0 0 1-1.5 0c0-.794.544-1.286 1.057-1.645.28-.196.4-.332.458-.426a.54.54 0 0 0 .075-.312c0-.3-.244-.641-.84-.641a1 1 0 0 0-.608.223c-.167.138-.231.287-.231.418a.75.75 0 0 1-1.5 0c0-.674.345-1.22.78-1.577M8 12a1 1 0 1 0 0-2 1 1 0 0 0 0 2",clipRule:"evenodd"})}))}},81954:(e,t,n)=>{"use strict";n.d(t,{WM:()=>m,zA:()=>p});var r=n(70353),i=n(13322),a=n(40319),o=(n(77810),n(41655)),l=n.n(o),s=n(76872),u=n(17271),c=n(19410),d=n(42321),f=n(88787),v=n(64922),h=(0,s.A)("yt-time-duration");function m(e){var t,n=e.value,r=e.onChange,i=e.error;return(0,v.jsxs)("div",{className:h(),children:[(0,v.jsx)(u.W9,{className:h("input"),value:(0,a.A)((0,a.A)({},n),{},{value:null==n?void 0:n.value,error:null!==(t=null==n?void 0:n.error)&&void 0!==t?t:i}),onChange:r,formatFn:p,parseFn:g}),(0,v.jsx)(c.m,{content:(0,v.jsxs)("div",{children:[(0,v.jsx)(d.Ay,{items:[b({y:"years",w:"weeks",M:"months",d:"days"}),b({h:"hours",m:"minutes",s:"seconds",ms:"milliseconds"})]}),"1M=30d",(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),"Examles: 1M2d3h, 4h15m"]}),children:(0,v.jsx)(f.A,{className:h("info"),awesome:"question-circle"})})]})}function p(e){if(!e&&0!==e)return"";var t=e,n="",r=36e5,i=24*r,a={y:365*i,M:30*i,d:i,h:r,m:6e4,s:1e3,ms:1};return Object.keys(a).forEach((function(e){var r=a[e],i=Math.floor(t/r);i>0&&(n+="".concat(i).concat(e," "),t-=i*r)})),n}function g(e){if(!e)return{value:void 0};if(!/^[\d\sa-zA-Z]*$/.test(e))return{value:void 0,error:"only digits and latin characters are allowed"};var t=e.replace(/\s+/g,""),n=(0,i.A)(t.matchAll(/\d+[a-zA-Z]*/g));if(!n.length||0!==n[0].index)return{value:void 0,error:"wrong format"};var a,o=0,s=(0,r.A)(n);try{for(s.s();!(a=s.n()).done;){var u,c=a.value[0].match(/\d+/)||{},d=c[0],f=c.input;if(!d)return{value:void 0,error:"wring fromat 1"};var v=null!==(u=null==f?void 0:f.substring(d.length))&&void 0!==u?u:"",h=Number(d),m=l().duration(h,v).valueOf();if(0===m&&0!==h)return{value:void 0,error:"wrong format of ".concat(f)};o+=m}}catch(e){s.e(e)}finally{s.f()}return{value:o}}function b(e){return Object.keys(e).map((function(t){return{key:t,label:t,value:e[t]}}))}m.hasErrorRenderer=!0,m.getDefaultValue=function(){return{value:void 0}},m.isEmpty=function(e){return!e},m.validator=function(e){return null==e?void 0:e.error}},87446:(e,t,n)=>{"use strict";n.d(t,{m:()=>v});var r=n(64922),i=n(77810),a=n(13778),o=n(1093),l=n(73384),s=n(89648),u=n(21086),c=n(93434);const d=(0,u.om)("tooltip"),f=["bottom","top"],v=e=>{const{children:t,content:n,disabled:u,placement:v=f,qa:h,id:m,className:p,style:g,disablePortal:b,contentClassName:y,openDelay:A=1e3,closeDelay:C}=e,[x,S]=i.useState(null),N=(0,o.d)(x,{openDelay:A,closeDelay:C,preventTriggerOnFocus:!0}),w=i.Children.only(t),E=(0,c.Q)(w),j=(0,a.N)(S,E);return(0,r.jsxs)(i.Fragment,{children:[i.cloneElement(w,{ref:j}),x?(0,r.jsx)(l.z,{id:m,role:"tooltip",className:d(null,p),style:g,open:N&&!u,placement:v,anchorRef:{current:x},disablePortal:b,disableEscapeKeyDown:!0,disableOutsideClick:!0,disableLayer:!0,qa:h,children:(0,r.jsx)("div",{className:d("content",y),children:(0,r.jsx)(s.E,{variant:"body-short",color:"complementary",children:n})})}):null]})}},87871:(e,t,n)=>{"use strict";n.d(t,{Oo:()=>C,Dk:()=>N,_C:()=>S,Ay:()=>x});var r=n(40319),i=n(9736),a=n(77810),o=n(15647),l=n(27528),s=n.n(l),u=n(76872),c=n(8208),d=n(48109),f=n(99526),v=n(10352),h=n(88681),m=n(40519),p=n(27859),g=n(67270),b=n(64922),y=(0,u.A)("accounts-suggest"),A="<Root>";function C(e){var t=e.items,n=e.onChange,r=e.placeholder,i=e.allowRootAccount,a=e.disabled,o=e.validate,l=void 0===o?function(){}:o,u=e.touched,c=e.value,f=s()(t,(function(e){return{value:e,text:e}}));i&&f.splice(0,0,{value:d.$T,text:A});var v=u&&l(c);return(0,b.jsxs)("div",{className:y({empty:!c,error:Boolean(v)}),children:[(0,b.jsx)(g.L,{disabled:a,items:f,onChange:n,placeholder:r,value:c,width:"max",hideClear:!0}),v&&(0,b.jsx)("div",{className:y("error"),children:v})]})}C.isEmpty=function(e){return!e},C.getDefaultValue=function(){return""},C.hasErrorRenderer=!0;const x=(0,o.Ng)((function(e){return{items:(0,v.SD)(e)}}))(C);var S=(0,o.Ng)((function(e){return{items:(0,f.nD)(e)}}))(C);function N(e){var t=a.useState({items:[]}),n=(0,i.A)(t,2),o=n[0],l=o.items,s=o.error,u=n[1];return a.useMemo((function(){(0,h.IF)(p.Vu.listAccounts,(0,r.A)({path:"//sys/accounts"},m.R)).then((function(e){u({items:e})})).catch((function(e){u({error:e})}))}),[]),(0,b.jsxs)(a.Fragment,{children:[(0,b.jsx)(C,(0,r.A)((0,r.A)({},e),{},{items:l||[]})),s&&(0,b.jsx)(c.z,{error:s})]})}N.isEmpty=function(e){return!e},N.getDefaultValue=function(){return d.$T}},89999:(e,t,n)=>{"use strict";n.d(t,{h:()=>d,W:()=>f});var r=n(68051),i=n(53775),a=n(28407),o=n(52797),l=n(27859),s=n(48971);function u(e,t){return c.apply(this,arguments)}function c(){return c=(0,a.A)((0,i.A)().mark((function e(t,n){var r,a,u,c,d,f;return(0,i.A)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a=n.getState(),u=(0,o.ID)(a),e.next=5,l.Qq.executeBatch(l.Vu.usableAccounts,{parameters:{requests:[{command:"get",parameters:{path:"//sys/users/".concat(u,"/@usable_accounts")}}]}});case 5:if(c=e.sent,!(d=(0,s.$7)(c,"Failed to get usable accounts"))){e.next=9;break}throw d;case 9:return f=null==c||null===(r=c[0])||void 0===r?void 0:r.output,e.abrupt("return",{data:f});case 13:return e.prev=13,e.t0=e.catch(0),e.abrupt("return",{error:e.t0});case 16:case"end":return e.stop()}}),e,null,[[0,13]])}))),c.apply(this,arguments)}var d=r.v.injectEndpoints({endpoints:function(e){return{usableAccounts:e.query({queryFn:u})}}}),f=d.useUsableAccountsQuery},95664:(e,t,n)=>{"use strict";n.d(t,{R:()=>i});var r=n(7787);function i(e){return r.Ay.renderSubjectCard(e)}}}]);
3
+ //# sourceMappingURL=yt-df-dialog.5aa0b817.chunk.js.map