Local modifications to ClusterLabs/Anvil by Alteeve
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
9.8 KiB

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[336],{7504:function(n,e,t){var r=t(5893),u=t(7294),o=t(6886),l=t(7357);function i(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function a(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function c(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})))),r.forEach((function(e){a(n,e,t[e])}))}return n}function f(n,e){if(null==n)return{};var t,r,u=function(n,e){if(null==n)return{};var t,r,u={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(u[t]=n[t]);return u}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function s(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,u,o=[],l=!0,i=!1;try{for(t=t.call(n);!(l=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);l=!0);}catch(a){i=!0,u=a}finally{try{l||null==t.return||t.return()}finally{if(i)throw u}}return o}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return i(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.Z=function(n){var e=n.calculateItemBreakpoints,t=void 0===e?function(){return{xs:1}}:e,i=n.layout,a=n.wrapperBoxProps,v=f(n,["calculateItemBreakpoints","layout","wrapperBoxProps"]),y=(0,u.useMemo)((function(){return Object.entries(i).map((function(n,e){var r=s(n,2),l=r[0],i=r[1],a=l;return i?(0,u.createElement)(o.ZP,c({},t(e,a),{key:a,item:!0},i)):void 0}))}),[t,i]);return(0,r.jsx)(l.Z,c({},a,{children:(0,r.jsx)(o.ZP,c({container:!0},v,{children:y}))}))}},4069:function(n,e,t){t.d(e,{Z:function(){return g}});var r=t(7294),u=t(3675),o=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.postSet,t=n.preSet,r=n.set,o=n.setType,l=void 0===o?"string":o,i=n.valueKey,a=void 0===i?"value":i;return function(n){var o=n.target[a],i=u.Z[l](o);null===t||void 0===t||t.call(null,n),null===r||void 0===r||r.call(null,i),null===e||void 0===e||e.call(null,n)}},l=t(7987);function i(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function a(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function c(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{},r=Object.keys(t);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})))),r.forEach((function(e){a(n,e,t[e])}))}return n}function f(n,e){if(null==n)return{};var t,r,u=function(n,e){if(null==n)return{};var t,r,u={},o=Object.keys(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||(u[t]=n[t]);return u}(n,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)t=o[r],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(n,t)&&(u[t]=n[t])}return u}function s(n){return function(n){if(Array.isArray(n))return i(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(!n)return;if("string"===typeof n)return i(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return i(n,e)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(n){var e=function(n,e){if("object"!==y(n)||null===n)return n;var t=n[Symbol.toPrimitive];if(void 0!==t){var r=t.call(n,e||"default");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(n)}(n,"string");return"symbol"===y(e)?e:String(e)}var y=function(n){return n&&"undefined"!==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n};var p="input",d={boolean:!1,number:0,string:""},b={createInputOnChangeHandlerOptions:{},required:!1,valueType:"string"},m=(0,r.forwardRef)((function(n,e){var t=n.input,u=n.inputTestBatch,i=n.onBlurAppend,y=n.onFirstRender,m=n.onFocusAppend,g=n.onUnmount,h=n.required,O=void 0===h?b.required:h,S=n.valueKey,j=n.valueType,w=void 0===j?b.valueType:j,k=n.createInputOnChangeHandlerOptions,C=void 0===k?b.createInputOnChangeHandlerOptions:k,I=C.postSet,A=C.valueKey,P=void 0===A?S:A,M=f(n.createInputOnChangeHandlerOptions,["postSet","valueKey"]),E=t.props,F=(0,r.useMemo)((function(){return null!==P&&void 0!==P?P:"checked"in E?"checked":"value"}),[E,P]),T=E.onBlur,x=E.onChange,B=E.onFocus,Z=E[F],R=void 0===Z?d[w]:Z,V=f(E,["onBlur","onChange","onFocus",F].map(v)),K=(0,r.useState)(R),U=K[0],q=K[1],H=(0,r.useState)(!1),N=H[0],_=H[1],$=(0,r.useState)(!1),D=$[0],L=$[1],W=(0,r.useCallback)((function(n){q(n)}),[]),z=(0,r.useMemo)((function(){var n;return u&&(u.isRequired=O,n=(0,l.LT)(a({},p,u))),n}),[u,O]),G=(0,r.useMemo)((function(){return null!==T&&void 0!==T?T:z&&function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];var r,u=e[0],o=u.target.value,l=z({inputs:a({},p,{value:o})});L(l),null===i||void 0===i||(r=i).call.apply(r,[null].concat(s(e)))}}),[T,i,z]),J=(0,r.useMemo)((function(){return o(c({postSet:function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];var r,u;_(!0),null===x||void 0===x||(r=x).call.apply(r,[null].concat(s(e))),null===I||void 0===I||(u=I).call.apply(u,[null].concat(s(e)))},set:W,setType:w,valueKey:F},M))}),[x,I,M,W,F,w]),Q=(0,r.useMemo)((function(){return null!==B&&void 0!==B?B:u&&function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];var r,o,l;null===(o=u.defaults)||void 0===o||null===(l=o.onSuccess)||void 0===l||l.call(null,{append:{}}),null===m||void 0===m||(r=m).call.apply(r,[null].concat(s(e)))}}),[B,u,m]);return(0,r.useEffect)((function(){var n,e=null!==(n=null===z||void 0===z?void 0:z.call(null,{inputs:a({},p,{value:U}),isIgnoreOnCallbacks:!0}))&&void 0!==n&&n;return null===y||void 0===y||y.call(null,{isValid:e}),g}),[]),(0,r.useImperativeHandle)(e,(function(){return{getIsChangedByUser:function(){return N},getValue:function(){return U},isValid:function(){return D},setValue:W}}),[U,N,D,W]),(0,r.cloneElement)(t,c({},V,a({onBlur:G,onChange:J,onFocus:Q,required:O},F,U)))}));m.defaultProps=b,m.displayName="InputWithRef";var g=m},8859:function(n,e,t){var r=t(7294),u=t(4390),o=t(6607),l=t(1770),i=t(2749);function a(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,r=new Array(e);t<e;t++)r[t]=n[t];return r}function c(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var t=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var r,u,o=[],l=!0,i=!1;try{for(t=t.call(n);!(l=(r=t.next()).done)&&(o.push(r.value),!e||o.length!==e);l=!0);}catch(a){i=!0,u=a}finally{try{l||null==t.return||t.return()}finally{if(i)throw u}}return o}}(n,e)||function(n,e){if(!n)return;if("string"===typeof n)return a(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return a(n,e)}(n,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.Z=function(n,e){var t,a=c((0,i.Z)(!1),2),f=a[0],s=a[1],v=(0,r.useState)({}),y=v[0],p=v[1],d=(0,r.useCallback)((function(n,t){var r,u;null===e||void 0===e||null===(r=e.current)||void 0===r||null===(u=r.setMessage)||void 0===u||u.call(null,String(n),t)}),[e]),b=(0,r.useCallback)((function(n,t){var r,u;null===e||void 0===e||null===(r=e.current)||void 0===r||null===(u=r.setMessageRe)||void 0===u||u.call(null,n,t)}),[e]),m=(0,r.useCallback)((function(n,e){p((0,o.ZP)(n,e))}),[]),g=(0,r.useCallback)((function(n,e){p((0,o.Um)(n,e))}),[]),h=(0,r.useCallback)((function(n){d(n),m(n)}),[d,m]),O=(0,r.useCallback)((function(n){b(n),g(n)}),[b,g]),S=(0,r.useCallback)((function(n){return function(e){m(n,e)}}),[m]),j=(0,r.useCallback)((function(n){return function(e){var t=e.isValid;m(n,t)}}),[m]),w=(0,r.useCallback)((function(n){return function(){h(n)}}),[h]),k=(0,r.useCallback)((function(n){var r=n.body,o=n.getErrorMsg,i=n.msgKey,a=void 0===i?"api":i,c=n.method,f=n.setMsg,v=void 0===f?null===e||void 0===e||null===(t=e.current)||void 0===t?void 0:t.setMessage:f,y=n.successMsg,p=n.url;s(!0),u.Z.request({data:r,method:c,url:p}).then((function(){null===v||void 0===v||v.call(null,a,{children:y,type:"info"})})).catch((function(n){var e=(0,l.Z)(n);e.children=o(e.children),null===v||void 0===v||v.call(null,a,e)})).finally((function(){s(!1)}))}),[e,s]),C=(0,r.useMemo)((function(){return Object.values(y).some((function(n){return!n}))}),[y]);return{buildFinishInputTestBatchFunction:S,buildInputFirstRenderFunction:j,buildInputUnmountFunction:w,formValidity:y,isFormInvalid:C,isFormSubmitting:f,setFormValidity:p,setMessage:d,setMessageRe:b,setValidity:m,setValidityRe:g,submitForm:k,unsetKey:h,unsetKeyRe:O}}}}]);