@alphakits/ui 1.10.5 → 1.10.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_commonjsHelpers-ed094449.js → _commonjsHelpers-d702e691.js} +0 -0
- package/dist/amount/component.js +1 -1
- package/dist/amount/index.js +1 -1
- package/dist/amount-input/component.d.ts +1 -1
- package/dist/amount-input/component.js +1 -1
- package/dist/amount-input/index.js +1 -1
- package/dist/avatar/component.js +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/bottom-sheet/component.js +1 -1
- package/dist/bottom-sheet/index.js +1 -1
- package/dist/button/component.js +1 -1
- package/dist/button/index.js +1 -1
- package/dist/calendar/component.js +1 -1
- package/dist/calendar/components/days-table/component.js +1 -1
- package/dist/calendar/components/days-table/index.js +1 -1
- package/dist/calendar/components/header/index.js +1 -1
- package/dist/calendar/components/header//321/201omponent.js +1 -1
- package/dist/calendar/components/months-table/index.js +1 -1
- package/dist/calendar/components/months-table//321/201omponent.js +1 -1
- package/dist/calendar/components/select-button/index.js +1 -1
- package/dist/calendar/components/select-button//321/201omponent.js +1 -1
- package/dist/calendar/components/years-table/index.js +1 -1
- package/dist/calendar/components/years-table//321/201omponent.js +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/calendar-input/component.d.ts +1 -1
- package/dist/calendar-input/component.js +1 -1
- package/dist/calendar-input/index.js +1 -1
- package/dist/cell/base/component.js +1 -1
- package/dist/cell/base/index.d.ts +1 -1
- package/dist/cell/base/index.js +1 -1
- package/dist/cell/component.js +1 -1
- package/dist/cell/index.js +1 -1
- package/dist/cell/pure/component.d.ts +1 -1
- package/dist/cell/pure/component.js +1 -1
- package/dist/cell/pure/index.js +1 -1
- package/dist/checkbox/component.d.ts +1 -1
- package/dist/checkbox/component.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox-group/component.js +1 -1
- package/dist/checkbox-group/index.js +1 -1
- package/dist/checkbox-lists/component.js +1 -1
- package/dist/checkbox-lists/index.js +1 -1
- package/dist/collapsable-row/addons.js +1 -1
- package/dist/collapsable-row/component.js +1 -1
- package/dist/collapsable-row/index.js +1 -1
- package/dist/collapse/component.js +1 -1
- package/dist/collapse/index.js +1 -1
- package/dist/{colors.module-c600e30e.js → colors.module-15fe00c9.js} +0 -0
- package/dist/{common.module-8b553c18.js → common.module-5a789ef4.js} +0 -0
- package/dist/{component-2e471c7d.d.ts → component-88d15048.d.ts} +0 -0
- package/dist/{component-2e471c7d.js → component-88d15048.js} +0 -0
- package/dist/{contact-block-cce73ea2.d.ts → contact-block-03e15bec.d.ts} +0 -0
- package/dist/{contact-block-cce73ea2.js → contact-block-03e15bec.js} +0 -0
- package/dist/copy-button/component.js +1 -1
- package/dist/copy-button/index.js +1 -1
- package/dist/date/component.js +1 -1
- package/dist/date/index.js +1 -1
- package/dist/date-switcher/component.js +1 -1
- package/dist/date-switcher/index.js +1 -1
- package/dist/footer/component.js +1 -1
- package/dist/footer/components/contacts-block.js +1 -1
- package/dist/footer/contact-block.js +1 -1
- package/dist/footer/index.js +1 -1
- package/dist/form/component.js +1 -1
- package/dist/form/components/form-footer/index.js +1 -1
- package/dist/form/components/index.js +1 -1
- package/dist/form/index.js +1 -1
- package/dist/form/templates/crud-form/index.js +1 -1
- package/dist/form/templates/filters-form/index.js +1 -1
- package/dist/form/templates/rest-form/index.js +1 -1
- package/dist/form/utils/get-default-values.js +1 -1
- package/dist/form-control/component.js +1 -1
- package/dist/form-control/index.js +1 -1
- package/dist/{formik.esm-a5e25b9d.js → formik.esm-44a3d377.js} +1 -1
- package/dist/grid/col/component.js +1 -1
- package/dist/grid/col/index.js +1 -1
- package/dist/grid/component.js +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/grid/row/component.js +1 -1
- package/dist/grid/row/index.js +1 -1
- package/dist/{gutters.module-bd036368.js → gutters.module-f51b1382.js} +0 -0
- package/dist/header-search/component.js +1 -1
- package/dist/header-search/index.js +1 -1
- package/dist/heading/component.js +1 -1
- package/dist/heading/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-crud-form-requests/index.js +1 -1
- package/dist/hooks/use-get-one/index.js +1 -1
- package/dist/icon-button/component.d.ts +1 -1
- package/dist/icon-button/component.js +1 -1
- package/dist/icon-button/index.js +1 -1
- package/dist/image/component.js +1 -1
- package/dist/image/index.js +1 -1
- package/dist/image/use-image-render-component.js +1 -1
- package/dist/{index-47d70135.js → index-7f4fec64.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/info-block-header/component.js +1 -1
- package/dist/info-block-header/index.js +1 -1
- package/dist/info-block-item/component.js +1 -1
- package/dist/info-block-item/index.js +1 -1
- package/dist/input/component.d.ts +1 -1
- package/dist/input/component.js +1 -1
- package/dist/input/index.js +1 -1
- package/dist/{intersection-observer-08260661.js → intersection-observer-d1e62065.js} +0 -0
- package/dist/link/component.js +1 -1
- package/dist/link/index.js +1 -1
- package/dist/list-allert/component.js +1 -1
- package/dist/list-allert/index.js +1 -1
- package/dist/masked-input/component.d.ts +1 -1
- package/dist/masked-input/component.js +1 -1
- package/dist/masked-input/index.js +1 -1
- package/dist/menu/component.js +1 -1
- package/dist/menu/components/content-header/index.js +1 -1
- package/dist/menu/components/index.js +1 -1
- package/dist/menu/components/menu-avatar/index.js +1 -1
- package/dist/menu/components/menu-button/index.js +1 -1
- package/dist/menu/components/menu-buttons-list/index.js +1 -1
- package/dist/menu/components/user-button/index.js +1 -1
- package/dist/menu/index.js +1 -1
- package/dist/message/component.js +1 -1
- package/dist/message/index.js +1 -1
- package/dist/modal/components/modals/index.js +1 -1
- package/dist/modal/context.js +1 -1
- package/dist/modal/hooks/use-modal.d.ts +1 -1
- package/dist/modal/hooks/use-modal.js +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/modal/types.d.ts +2 -2
- package/dist/not-found/component.js +1 -1
- package/dist/not-found/index.js +1 -1
- package/dist/notification/component.js +1 -1
- package/dist/notification/index.js +1 -1
- package/dist/{parse-query-params-266bff2e.d.ts → parse-query-params-cdba1ac6.d.ts} +0 -0
- package/dist/{parse-query-params-266bff2e.js → parse-query-params-cdba1ac6.js} +1 -1
- package/dist/picker-button/common/index.js +1 -1
- package/dist/picker-button/common/labeled-button/index.js +1 -1
- package/dist/picker-button/component.d.ts +1 -1
- package/dist/picker-button/component.js +1 -1
- package/dist/picker-button/field/Component.js +1 -1
- package/dist/picker-button/field/index.js +1 -1
- package/dist/picker-button/index.js +1 -1
- package/dist/popover/component.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/progress-bar/component.js +1 -1
- package/dist/progress-bar/index.js +1 -1
- package/dist/progress-index/component.js +1 -1
- package/dist/progress-index/index.js +1 -1
- package/dist/radio/component.d.ts +1 -1
- package/dist/radio/component.js +1 -1
- package/dist/radio/index.js +1 -1
- package/dist/radio-group/component.js +1 -1
- package/dist/radio-group/index.js +1 -1
- package/dist/radio-groups/component.js +1 -1
- package/dist/radio-groups/index.js +1 -1
- package/dist/select/component.d.ts +1 -1
- package/dist/select/component.js +1 -1
- package/dist/select/components/base-select/component.js +1 -1
- package/dist/select/components/base-select/index.js +1 -1
- package/dist/select/components/field/component.js +1 -1
- package/dist/select/components/field/index.js +1 -1
- package/dist/select/components/index.js +1 -1
- package/dist/select/components/native-select/component.js +1 -1
- package/dist/select/components/native-select/index.js +1 -1
- package/dist/select/components/option/component.js +1 -1
- package/dist/select/components/option/index.js +1 -1
- package/dist/select/components/virtual-options-list/component.js +1 -1
- package/dist/select/components/virtual-options-list/index.js +1 -1
- package/dist/select/index.js +1 -1
- package/dist/select/presets/index.js +1 -1
- package/dist/select/presets/use-lazy-loading/index.js +1 -1
- package/dist/select/presets/use-select-with-loading/hook.js +1 -1
- package/dist/sidepanel-header/component.js +1 -1
- package/dist/sidepanel-header/index.js +1 -1
- package/dist/space/Item.js +1 -1
- package/dist/space/component.js +1 -1
- package/dist/space/index.js +1 -1
- package/dist/suffix-input/component.d.ts +1 -1
- package/dist/suffix-input/component.js +1 -1
- package/dist/suffix-input/index.js +1 -1
- package/dist/super-list-header/component.js +1 -1
- package/dist/super-list-header/index.js +1 -1
- package/dist/super-list-item/component.js +1 -1
- package/dist/super-list-item/index.js +1 -1
- package/dist/switch/component.d.ts +1 -1
- package/dist/switch/component.js +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/table/columns.js +1 -1
- package/dist/table/component.js +1 -1
- package/dist/table/components/cell/component.js +1 -1
- package/dist/table/components/cell/index.js +1 -1
- package/dist/table/components/cells/index.js +1 -1
- package/dist/table/components/empty-list/index.js +1 -1
- package/dist/table/components/error/index.js +1 -1
- package/dist/table/components/pagination/index.js +1 -1
- package/dist/table/components/row/component.js +1 -1
- package/dist/table/components/row/index.js +1 -1
- package/dist/table/components/rows/index.js +1 -1
- package/dist/table/components/table-header/index.js +1 -1
- package/dist/table/hooks/use-table-data.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/table.js +1 -1
- package/dist/table/utils/add-query-param.js +1 -1
- package/dist/table/utils/get-query-from-url.js +1 -1
- package/dist/table/utils/index.d.ts +1 -1
- package/dist/table/utils/index.js +1 -1
- package/dist/table/utils/parse-query-params.js +1 -1
- package/dist/table/utils/query-adapter.js +1 -1
- package/dist/table/utils/remove-query-param.js +1 -1
- package/dist/table/utils/reset-query-param.js +1 -1
- package/dist/table-status/component.js +1 -1
- package/dist/table-status/index.js +1 -1
- package/dist/tag/component.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/tags-list/component.js +1 -1
- package/dist/tags-list/index.js +1 -1
- package/dist/tariff-builder/component.js +1 -1
- package/dist/tariff-builder/index.js +1 -1
- package/dist/textarea/component.d.ts +1 -1
- package/dist/textarea/component.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/toast/component.js +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast-notifier/component.js +1 -1
- package/dist/toast-notifier/index.js +1 -1
- package/dist/toast-plate/component.js +1 -1
- package/dist/toast-plate/index.js +1 -1
- package/dist/tooltip/component.js +1 -1
- package/dist/tooltip/index.js +1 -1
- package/dist/{tslib.es6-2245dd84.js → tslib.es6-accdafe3.js} +0 -0
- package/dist/typography/component.js +1 -1
- package/dist/typography/index.js +1 -1
- package/dist/typography/text/component.js +1 -1
- package/dist/typography/text/index.js +1 -1
- package/dist/typography/title/component.js +1 -1
- package/dist/typography/title/index.js +1 -1
- package/dist/typography/title-responsive/component.js +1 -1
- package/dist/typography/title-responsive/index.js +1 -1
- package/dist/{use-image-render-component-93d14cc8.d.ts → use-image-render-component-47411eae.d.ts} +0 -0
- package/dist/{use-image-render-component-93d14cc8.js → use-image-render-component-47411eae.js} +0 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/show-toast/index.js +1 -1
- package/dist/with-suffix/component.d.ts +2 -2
- package/dist/with-suffix/component.js +1 -1
- package/dist/with-suffix/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CheckboxGroups}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{CheckboxGroups}from"./component.js";import"../tslib.es6-accdafe3.js";import"react";import"alpha-cli-icons";import"classnames";import"../checkbox/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../collapse/component.js";import"../_commonjsHelpers-d702e691.js";import"resize-observer";import"../link/component.js";import"../divider/component.js";import"../flex-columns/component.js";import"../icon-button/component.js";import"../button/component.js";import"../loader/component.js";import"../padding/component.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"react";import{EditS as t,PlusS as e}from"alpha-cli-icons";import{Button as r}from"../button/component.js";import{IconButton as n}from"../icon-button/component.js";import{Typography as i}from"../typography/component.js";import"../tslib.es6-
|
|
1
|
+
import o from"react";import{EditS as t,PlusS as e}from"alpha-cli-icons";import{Button as r}from"../button/component.js";import{IconButton as n}from"../icon-button/component.js";import{Typography as i}from"../typography/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var m=function(e){var r=e.location,m=e.onClick;return o.createElement(o.Fragment,null,o.createElement(i.Text,{view:"title",weight:"bold",color:"primary"},r.address),o.createElement(n,{icon:t,onClick:m,size:"s",view:"ghost"}))},p=function(t){var n=t.onClick;return o.createElement(r,{leftAddons:o.createElement(e,null),size:"xs",onClick:n,view:"secondary"},"Добавить квест")};export{p as Addons,m as Content};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as o,useEffect as t}from"react";import{ChevronDownS as n}from"alpha-cli-icons";import r from"classnames";import{Collapse as m}from"../collapse/component.js";import{IconButton as i}from"../icon-button/component.js";import{Typography as s}from"../typography/component.js";import"../_commonjsHelpers-
|
|
1
|
+
import e,{useState as o,useEffect as t}from"react";import{ChevronDownS as n}from"alpha-cli-icons";import r from"classnames";import{Collapse as m}from"../collapse/component.js";import{IconButton as i}from"../icon-button/component.js";import{Typography as s}from"../typography/component.js";import"../_commonjsHelpers-d702e691.js";import"resize-observer";import"../link/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../button/component.js";import"../loader/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var p="index-module_wrapper__tyP5w",a="index-module_row__g6gnE",l="index-module_label__kuH6r",c="index-module_collapse_button__YrBPb",d="index-module_expanded_icon__AFfTh",_="index-module_collapse_container__YDAEr",u=function(u){var j,f=u.label,x=u.content,y=u.expanded,h=u.addons,b=u.children,g=u.disabled,v=o(y),E=v[0],w=v[1];return t((function(){w(y)}),[y]),e.createElement("div",null,e.createElement("div",{className:p},e.createElement("div",{className:a},f&&e.createElement(s.Text,{className:l,color:"secondary",view:"title",weight:"medium"},f),x),e.createElement("div",{className:a},h,e.createElement(i,{onClick:function(){return w(!E)},className:r(c,(j={},j[d]=E,j)),disabled:g,view:"ghost",icon:n,size:"s"}))),e.createElement(m,{contentClassName:_,expanded:E},b))};export{u as CollapsableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CollapsableRow}from"./component.js";import"react";import"alpha-cli-icons";import"classnames";import"../collapse/component.js";import"../_commonjsHelpers-
|
|
1
|
+
export{CollapsableRow}from"./component.js";import"react";import"alpha-cli-icons";import"classnames";import"../collapse/component.js";import"../_commonjsHelpers-d702e691.js";import"resize-observer";import"../link/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../icon-button/component.js";import"../button/component.js";import"../loader/component.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{forwardRef as t,useRef as n,useState as r,useCallback as o,useEffect as i,useMemo as
|
|
1
|
+
import e,{forwardRef as t,useRef as n,useState as r,useCallback as o,useEffect as i,useMemo as a}from"react";import u from"classnames";import{a as c}from"../_commonjsHelpers-d702e691.js";import{ResizeObserver as f}from"resize-observer";import{Link as l}from"../link/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"../hooks/useFocus/index.js";var s=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},d="object"==typeof c&&c&&c.Object===Object&&c,v="object"==typeof self&&self&&self.Object===Object&&self,m=d||v||Function("return this")(),p=function(){return m.Date.now()},b=/\s/;var y=function(e){for(var t=e.length;t--&&b.test(e.charAt(t)););return t},h=/^\s+/;var j=function(e){return e?e.slice(0,y(e)+1).replace(h,""):e},x=m.Symbol,g=Object.prototype,_=g.hasOwnProperty,w=g.toString,E=x?x.toStringTag:void 0;var T=function(e){var t=_.call(e,E),n=e[E];try{e[E]=void 0;var r=!0}catch(e){}var o=w.call(e);return r&&(t?e[E]=n:delete e[E]),o},O=Object.prototype.toString;var N=function(e){return O.call(e)},k=x?x.toStringTag:void 0;var z=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":k&&k in Object(e)?T(e):N(e)};var S=function(e){return null!=e&&"object"==typeof e};var C=function(e){return"symbol"==typeof e||S(e)&&"[object Symbol]"==z(e)},L=/^[-+]0x[0-9a-f]+$/i,H=/^0b[01]+$/i,$=/^0o[0-7]+$/i,D=parseInt;var F=function(e){if("number"==typeof e)return e;if(C(e))return NaN;if(s(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=s(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=j(e);var n=H.test(e);return n||$.test(e)?D(e.slice(2),n?2:8):L.test(e)?NaN:+e},I=Math.max,M=Math.min;var P=function(e,t,n){var r,o,i,a,u,c,f=0,l=!1,d=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=r,i=o;return r=o=void 0,f=t,a=e.apply(i,n)}function b(e){return f=e,u=setTimeout(h,t),l?m(e):a}function y(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-f>=i}function h(){var e=p();if(y(e))return j(e);u=setTimeout(h,function(e){var n=t-(e-c);return d?M(n,i-(e-f)):n}(e))}function j(e){return u=void 0,v&&r?m(e):(r=o=void 0,a)}function x(){var e=p(),n=y(e);if(r=arguments,o=this,c=e,n){if(void 0===u)return b(c);if(d)return clearTimeout(u),u=setTimeout(h,t),m(c)}return void 0===u&&(u=setTimeout(h,t)),a}return t=F(t)||0,s(n)&&(l=!!n.leading,i=(d="maxWait"in n)?I(F(n.maxWait)||0,t):i,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==u&&clearTimeout(u),f=0,r=c=o=u=void 0},x.flush=function(){return void 0===u?a:j(p())},x},U="index-module_collapse__ORa-f",W="index-module_content__UDk-m",A="index-module_expandedContent__iQszl",Q="index-module_children_wrap__ekYCk",R=t((function(t,c){var s,d=t.expanded,v=t.defaultExpanded,m=t.collapsedLabel,p=t.expandedLabel,b=t.children,y=t.className,h=t.contentClassName,j=t.id,x=t.onExpandedChange,g=t.onTransitionEnd,_=t.dataTestId,w=t.linkProps,E=void 0===d,T=n(null),O=n(null),N=r(v||d),k=N[0],z=N[1],S=E?k:d,C=o((function(){var e;O.current&&T.current&&(e=S?O.current.offsetHeight:0,T.current.style.height=e+"px")}),[S]),L=o((function(){g&&g(d)}),[d,g]),H=o((function(){E&&z(!S),console.log(S),x&&x()}),[S,x,E]);i((function(){var e=P((function(){return C()}),300);return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[C]),i((function(){var e=new f(C);return O.current&&e.observe(O.current),function(){e.disconnect()}}),[C]),i((function(){return C()}),[S,C]);var $=a((function(){var e,t=null===(e=T.current)||void 0===e?void 0:e.offsetHeight;return{height:S&&!t?"0px":t+"px"}}),[S]),D=!!p||!!m;return e.createElement("div",{ref:c,className:u(y,U),id:j,"data-test-id":_},e.createElement("div",{onTransitionEnd:L,ref:T,className:u(W,h,(s={},s[A]=S,s)),style:$},e.createElement("div",{className:u(Q),ref:O},b)),D&&e.createElement(l,{view:(null==w?void 0:w.view)||"secondary",size:(null==w?void 0:w.size)||"m",pseudo:!0,onClick:H},S?p:m))}));export{R as Collapse};
|
package/dist/collapse/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Collapse}from"./component.js";import"react";import"classnames";import"../_commonjsHelpers-
|
|
1
|
+
export{Collapse}from"./component.js";import"react";import"classnames";import"../_commonjsHelpers-d702e691.js";import"resize-observer";import"../link/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"../hooks/useFocus/index.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import{Button as o}from"../button/component.js";import{ToastNotifier as e}from"../toast-notifier/component.js";import{Typography as i}from"../typography/component.js";import"../tslib.es6-
|
|
1
|
+
import t from"react";import{Button as o}from"../button/component.js";import{ToastNotifier as e}from"../toast-notifier/component.js";import{Typography as i}from"../typography/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";import"react-dom";import"../toast-plate/component.js";import"alpha-cli-icons";import"../toast-notifier/use-timer.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var r="index-module_wrapper__dZRhL",n="index-module_link_button__VKWD-",m=function(m){var p=m.link,s=m.notifierText,a=m.visibleLink,c=m.icon;return t.createElement("div",{className:r},t.createElement(o,{leftAddons:c,className:n,onClick:function(t){t.stopPropagation(),navigator.clipboard.writeText(p).then((function(){e({title:s,view:"positive",offset:30})}))},view:"ghost"}),t.createElement(i.Text,{view:"title",weight:"medium",color:"secondary"},a||p))};export{m as CopyButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CopyButton}from"./component.js";import"react";import"../button/component.js";import"../tslib.es6-
|
|
1
|
+
export{CopyButton}from"./component.js";import"react";import"../button/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../toast-notifier/component.js";import"react-dom";import"../toast-plate/component.js";import"alpha-cli-icons";import"../toast-notifier/use-timer.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
package/dist/date/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,a as o}from"../tslib.es6-
|
|
1
|
+
import{_ as t,a as o}from"../tslib.es6-accdafe3.js";import e from"react";import{format as a}from"date-fns";import{ru as r,de as m,enGB as i}from"date-fns/locale";import{Typography as p}from"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"classnames";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var s={RU:r,DE:m,EN:i},n=function(t,o,e){void 0===o&&(o="dd.MM.yyyy"),void 0===e&&(e="RU");var r=new Date(t);return"[object Date]"===Object.prototype.toString.call(r)?Number.isNaN(r.getTime())?"invalid date":a(r,o,{locale:s[e]}):"invalid date"},d=function(a){var r=a.className,m=a.dataTestId,i=a.date,s=a.format,d=void 0===s?"dd.MM.yyyy":s,c=a.country,y=void 0===c?"RU":c,l=t(a,["className","dataTestId","date","format","country"]);return e.createElement(p.Text,o({},l,{className:r,"data-test-id":m}),n(i,d,y))};export{d as FormattedDate,n as normalizeDate};
|
package/dist/date/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FormattedDate,normalizeDate}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{FormattedDate,normalizeDate}from"./component.js";import"../tslib.es6-accdafe3.js";import"react";import"date-fns";import"date-fns/locale";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"classnames";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{ChevronBackM as t,ChevronForwardM as o}from"alpha-cli-icons";import
|
|
1
|
+
import e from"react";import{ChevronBackM as t,ChevronForwardM as o}from"alpha-cli-icons";import a from"classnames";import{startOfISOWeek as d,parseISO as r,isAfter as i,isBefore as n,isToday as m,format as y,add as s,subDays as c,subWeeks as p}from"date-fns";import{Button as l}from"../button/component.js";import{IconButton as _}from"../icon-button/component.js";import{Typography as u}from"../typography/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var f={date_switcher:"index-module_date_switcher__-TXru",date_wrap:"index-module_date_wrap__Tzlmm",day:"index-module_day__HX9YV",week:"index-module_week__s9uze"},w=function(w){var M=w.view,h=void 0===M?"day":M,j=w.startDate,g=w.onChange,v=w.minDate,x=w.maxDate,k=d(r(j)),b="day"===h?r(j):k,E=v?r(v):new Date,D=i(b,E),C=!x||n(b,r(x)),T=m(b);return e.createElement("div",{className:f.date_switcher},e.createElement(_,{disabled:!!v&&!D,onClick:function(){"day"===h&&g(y(c(b,1),"yyyy-MM-dd")),"week"===h&&g(y(p(b,1),"yyyy-MM-dd"))},icon:t}),e.createElement("div",{className:a(f.date_wrap,f[h])},e.createElement(u.Text,{tag:"div",view:"title",color:"secondary",weight:"bold"},"day"===h?y(b,"dd.MM.yy"):y(b,"dd.MM.yy")+" - "+y(s(b,{days:6}),"dd.MM.yy"))),e.createElement(_,{disabled:!C,onClick:function(){"day"===h&&g(y(s(b,{days:1}),"yyyy-MM-dd")),"week"===h&&g(y(s(b,{days:7}),"yyyy-MM-dd"))},icon:o}),e.createElement(l,{disabled:T,onClick:function(){g(y(new Date,"yyyy-MM-dd"))},view:"ghost"},"Сегодня"))};export{w as DateSwitcher};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{DateSwitcher}from"./component.js";import"react";import"alpha-cli-icons";import"classnames";import"date-fns";import"../button/component.js";import"../tslib.es6-
|
|
1
|
+
export{DateSwitcher}from"./component.js";import"react";import"alpha-cli-icons";import"classnames";import"date-fns";import"../button/component.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../icon-button/component.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
package/dist/footer/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"../tslib.es6-
|
|
1
|
+
import{a as e}from"../tslib.es6-accdafe3.js";import t from"react";import{AppStoreM as o,GooglePlayM as a,FacebookM as m,YoutubeM as r,InstagramM as n}from"alpha-cli-icons";import{Grid as i}from"../grid/component.js";import{IconButton as s}from"../icon-button/component.js";import{useMatchMedia as c}from"../mq/use-match-media.js";import{Padding as l}from"../padding/component.js";import{SectionWrapper as p}from"../section-wrapper/component.js";import{ContactsBlock as d}from"./components/contacts-block.js";import{s as f}from"../contact-block-03e15bec.js";import"../grid/row/component.js";import"classnames";import"../grid/utils/index.js";import"../gutters.module-f51b1382.js";import"../grid/col/component.js";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../mq/utils.js";var u=function(u){var E=u.sections,b=void 0===E?[]:E,g=u.contacts,j=void 0===g?[]:g,k=u.company,v=u.email,h=u.address,x=u.agbText,N=u.agbLink,w=void 0===N?"":N,y=u.facebookLink,L=u.instagramLink,B=u.youtubeLink,T=u.appText,q=u.google,C=u.appstore,F=c("(max-width: 712px)")[0],R=y||L||B,_=T||C||q;return t.createElement(p,{pb:"m",pt:"l",isBlackBg:!0},t.createElement("div",{className:f.wrapper},t.createElement(i.Row,{className:f.row_wrapper,justify:"left"},!!b.length&&b.map((function(e){var o;return t.createElement(i.Col,{key:e.title,width:{desktop:{xl:3,l:3,m:3,s:4},tablet:{xl:4,l:4,m:6,s:12},mobile:12}},t.createElement("div",{className:f.block},e.title&&t.createElement("span",{className:f.title},e.title),!!(null===(o=null==e?void 0:e.items)||void 0===o?void 0:o.length)&&e.items.map((function(e){return t.createElement("a",{key:e.text,className:f.link,href:e.link},e.text)}))))}))),t.createElement(d,{contacts:j,email:v,address:h,agbLink:w,agbText:x})),t.createElement("div",{className:f.bottomBlock},_&&t.createElement("div",{className:f.left},T&&t.createElement("span",{className:f.description},T),t.createElement("div",{className:f.buttons},C&&t.createElement(s,e({},{href:C},{icon:o})),q&&t.createElement(s,e({},{href:q},{icon:a})))),(k||R)&&t.createElement("div",{className:f.right},k&&t.createElement("span",null,k),!F&&R&&t.createElement(l,{padding:"8px"}),t.createElement("div",{className:f.buttons},y&&t.createElement(s,e({},{href:y},{icon:m})),B&&t.createElement(s,e({},{href:B},{icon:r})),L&&t.createElement(s,e({},{href:L},{icon:n}))))))};export{u as Footer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{s as t,C as a}from"../../contact-block-
|
|
1
|
+
import e from"react";import{s as t,C as a}from"../../contact-block-03e15bec.js";var l=function(l){var n=l.contacts,c=l.email,r=l.address,s=l.agbText,i=l.agbLink;return(null==n?void 0:n.length)||c||r||i||s?e.createElement("div",{className:t.contacts},!!(null==n?void 0:n.length)&&n.map((function(t){return e.createElement(a,{key:t.title,title:t.title,value:t.value,description:t.description})})),c&&e.createElement("span",{className:t.email},c),r&&e.createElement("span",{className:t.description},r),s&&e.createElement("a",{className:t.link,href:i},s)):null};export{l as ContactsBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react";export{C as ContactBlock}from"../contact-block-
|
|
1
|
+
import"react";export{C as ContactBlock}from"../contact-block-03e15bec.js";
|
package/dist/footer/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Footer}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{Footer}from"./component.js";import"../tslib.es6-accdafe3.js";import"react";import"alpha-cli-icons";import"../grid/component.js";import"../grid/row/component.js";import"classnames";import"../grid/utils/index.js";import"../gutters.module-f51b1382.js";import"../grid/col/component.js";import"../icon-button/component.js";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../mq/use-match-media.js";import"../mq/utils.js";import"../padding/component.js";import"../section-wrapper/component.js";import"./components/contacts-block.js";import"../contact-block-03e15bec.js";
|
package/dist/form/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"react";import{Button as e}from"../button/component.js";import{FlexColumns as t}from"../flex-columns/component.js";import{Input as n}from"../input/component.js";import{ModalContext as r}from"../modal/context.js";import{RestForm as m}from"./templates/rest-form/index.js";import"alpha-cli-icons";import"../formik.esm-
|
|
1
|
+
import o from"react";import{Button as e}from"../button/component.js";import{FlexColumns as t}from"../flex-columns/component.js";import{Input as n}from"../input/component.js";import{ModalContext as r}from"../modal/context.js";import{RestForm as m}from"./templates/rest-form/index.js";import"alpha-cli-icons";import"../formik.esm-44a3d377.js";import"../icon-button/component.js";import"classnames";import{FiltersForm as i}from"./templates/filters-form/index.js";import"../tslib.es6-accdafe3.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../form-control/component.js";import"../modal/components/modals/index.js";import"../modal/components/modal-backgroung/index.js";import"../modal/hooks/use-modal.js";import"uuid";import"../list-allert/component.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"../sidepanel-header/component.js";import"./components/form-footer/index.js";import"./components/form-loading/index.js";import"../skeleton/component.js";import"./components/form-outer/index.js";import"./components/form-wrapper/index.js";import"./components/form-updating/index.js";import"../index-7f4fec64.js";import"../_commonjsHelpers-d702e691.js";import"./utils/get-default-values.js";var a={baz:"baz",bar:"bar"},s=function(){var e=o.useState(!0),r=e[0],i=e[1],s=o.useState(!1),c=s[0],p=s[1],l=o.useState(!1),u=l[0],f=l[1];o.useEffect((function(){setTimeout((function(){return i(!1)}),3e3)}),[]);return o.createElement(m,{recordId:8273682763,initialValues:a,customValidationFields:["bar"],save:function(){return new Promise((function(o){p(!0),setTimeout((function(){o(),p(!1)}),3e3)}))},remove:function(){return new Promise((function(o){f(!0),setTimeout((function(){o(),f(!1)}),3e3)}))},title:"custom title",loading:r,submitButtonText:"csdcds",updating:c,removing:u,close:function(){},t:function(o){return o}},(function(e){var r=e.values,m=e.touched,i=e.errors,a=e.handleChange;return o.createElement(t,{columns:1,gr:16,gc:0},o.createElement(n,{label:"baz",value:r.baz,onChange:a("baz"),error:m.baz&&i.baz}),o.createElement(n,{label:"bar",value:r.bar,onChange:a("bar"),error:m.bar&&i.bar}))}))},c=function(){return o.createElement(i,{initialValues:{foo:"bar",bar:"baz"},defaultValues:{foo:"",bar:""},submitCallback:function(){return console.log()},close:function(){},t:function(o){return o}},(function(e){var r=e.values;return o.createElement(t,{columns:1,gr:16,gc:0},o.createElement(n,{value:r.bar}))}))},p=function(){var t=o.useContext(r).openModal,n=t(s),m=t(c);return o.createElement(o.Fragment,null,o.createElement(e,{onClick:m},"open filters modal"),o.createElement(e,{onClick:n},"open crud modal"))};export{p as Component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{Button as t}from"../../../button/component.js";import"../../../tslib.es6-
|
|
1
|
+
import e from"react";import{Button as t}from"../../../button/component.js";import"../../../tslib.es6-accdafe3.js";import"react-merge-refs";import"classnames";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";var o="index-module_component__ijVOx",n=function(n){var i=n.submitButtonText,a=void 0===i?"save":i,r=n.submit,s=n.close,c=n.children,m=n.loading,d=n.disabled,l=n.t;return e.createElement("div",{className:o},e.createElement(t,{view:"primary",size:"xs",loading:m,disabled:d,dataTestId:"buttonSave",onClick:function(){return r()}},l(a)),e.createElement(t,{view:"secondary",size:"xs",dataTestId:"buttonCancel",onClick:s},l("cancel")),c)};export{n as FormFooter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FormFooter as o}from"./form-footer/index.js";import{FormLoading as r}from"./form-loading/index.js";import{FormUpdating as t}from"./form-updating/index.js";import{FormWrapper as
|
|
1
|
+
import{FormFooter as o}from"./form-footer/index.js";import{FormLoading as r}from"./form-loading/index.js";import{FormUpdating as t}from"./form-updating/index.js";import{FormWrapper as e}from"./form-wrapper/index.js";import"react";import"../../button/component.js";import"../../tslib.es6-accdafe3.js";import"react-merge-refs";import"classnames";import"../../hooks/useFocus/index.js";import"../../loader/component.js";import"../../skeleton/component.js";import"./form-outer/index.js";var m={Footer:o,Wrapper:e,Updating:t,Loading:r};export{m as Form};
|
package/dist/form/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{CrudForm}from"./templates/crud-form/index.js";export{FiltersForm}from"./templates/filters-form/index.js";export{Form}from"./components/index.js";import"react";import"alpha-cli-icons";import"../formik.esm-
|
|
1
|
+
export{CrudForm}from"./templates/crud-form/index.js";export{FiltersForm}from"./templates/filters-form/index.js";export{Form}from"./components/index.js";import"react";import"alpha-cli-icons";import"../formik.esm-44a3d377.js";import"../index-7f4fec64.js";import"../_commonjsHelpers-d702e691.js";import"../icon-button/component.js";import"../tslib.es6-accdafe3.js";import"classnames";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../sidepanel-header/component.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-15fe00c9.js";import"../common.module-5a789ef4.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"./components/form-footer/index.js";import"./components/form-loading/index.js";import"../skeleton/component.js";import"./components/form-outer/index.js";import"./components/form-wrapper/index.js";import"./utils/get-default-values.js";import"./components/form-updating/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{TrashM as o}from"alpha-cli-icons";import{F as t}from"../../../formik.esm-
|
|
1
|
+
import e from"react";import{TrashM as o}from"alpha-cli-icons";import{F as t}from"../../../formik.esm-44a3d377.js";import{IconButton as r}from"../../../icon-button/component.js";import{SidepanelHeader as m}from"../../../sidepanel-header/component.js";import{FormFooter as n}from"../../components/form-footer/index.js";import{FormLoading as i}from"../../components/form-loading/index.js";import{FormOuter as s}from"../../components/form-outer/index.js";import{FormWrapper as a}from"../../components/form-wrapper/index.js";import{getDefaultValues as l}from"../../utils/get-default-values.js";import"../../../index-7f4fec64.js";import"../../../_commonjsHelpers-d702e691.js";import"../../../tslib.es6-accdafe3.js";import"classnames";import"../../../button/component.js";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";import"../../../colors.module-15fe00c9.js";import"../../../common.module-5a789ef4.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";import"../../../skeleton/component.js";var p="index-module_header_addons__BmSJ0",d="index-module_disabled_form_inner__F7BtU",c=function(c){var u=c.recordId,f=c.title,j=c.initialValues,h=c.defaultValues,g=c.validationSchema,v=c.submitButtonText,x=c.loading,b=c.updating,y=c.removing,_=c.save,E=c.remove,B=c.close,S=c.t,k=c.children,T=c.headerAddon;if(x)return e.createElement(i,null);var F=!!u&&!!E,V=F||T?e.createElement("div",{className:p},F&&e.createElement(r,{dataTestId:"removeTariffBtn",size:"m",disabled:b,loading:y,onClick:E,icon:o}),T):null;return e.createElement(t,{validationSchema:g,initialValues:l(j,h),onSubmit:_},(function(o){return e.createElement(s,null,e.createElement(m,{rightAddons:V,title:f,border:!1}),e.createElement(a,null,(b||y)&&e.createElement("div",{className:d}),k(o)),e.createElement(n,{t:S,loading:b,disabled:y,submit:o.handleSubmit,submitButtonText:v,close:B}))}))};export{c as CrudForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{F as o}from"../../../formik.esm-
|
|
1
|
+
import e from"react";import{F as o}from"../../../formik.esm-44a3d377.js";import{SidepanelHeader as t}from"../../../sidepanel-header/component.js";import{FormFooter as r}from"../../components/form-footer/index.js";import{FormOuter as m}from"../../components/form-outer/index.js";import{FormWrapper as i}from"../../components/form-wrapper/index.js";import{getDefaultValues as n}from"../../utils/get-default-values.js";import"../../../index-7f4fec64.js";import"../../../_commonjsHelpers-d702e691.js";import"classnames";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../tslib.es6-accdafe3.js";import"../../../typography/title/component.js";import"../../../colors.module-15fe00c9.js";import"../../../common.module-5a789ef4.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";import"../../../button/component.js";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";var s=function(s){var p=s.initialValues,l=s.defaultValues,a=s.children,c=s.submitCallback,f=s.close,u=s.t,j=n(p,l);return e.createElement(o,{initialValues:j,onSubmit:function(e){c(e),f()}},(function(o){return e.createElement(m,null,e.createElement(t,{title:u("filters"),border:!1}),e.createElement(i,null,a(o)),e.createElement(r,{t:u,submit:o.handleSubmit,close:f}))}))};export{s as FiltersForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{TrashM as t}from"alpha-cli-icons";import{F as o}from"../../../formik.esm-
|
|
1
|
+
import e from"react";import{TrashM as t}from"alpha-cli-icons";import{F as o}from"../../../formik.esm-44a3d377.js";import{IconButton as r}from"../../../icon-button/component.js";import{ListAllert as n}from"../../../list-allert/component.js";import{SidepanelHeader as i}from"../../../sidepanel-header/component.js";import{FormFooter as m}from"../../components/form-footer/index.js";import{FormLoading as s}from"../../components/form-loading/index.js";import{FormOuter as a}from"../../components/form-outer/index.js";import{FormUpdating as l}from"../../components/form-updating/index.js";import{FormWrapper as p}from"../../components/form-wrapper/index.js";import"../../../index-7f4fec64.js";import"../../../_commonjsHelpers-d702e691.js";import"../../../tslib.es6-accdafe3.js";import"classnames";import"../../../button/component.js";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";import"../../../colors.module-15fe00c9.js";import"../../../common.module-5a789ef4.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";import"../../../skeleton/component.js";var d="index-module_header_addons__Kx-q1",c="index-module_disabled_form_inner__9HqiU";function u(u){var f=u.recordId,j=u.title,v=u.initialValues,x=u.submitButtonText,b=u.loading,g=u.updating,h=u.removing,E=u.customValidationFields,y=u.validate,_=u.save,k=u.remove,T=u.close,q=u.t,A=u.children,B=u.headerAddon,F=u.error,N=u.softError;if(F)return e.createElement("div",null,"Ошибка ");if(b)return e.createElement(s,null);var S,V,w,C=!!f&&!!k,H=C||B?e.createElement("div",{className:d},C&&e.createElement(r,{dataTestId:"removeTariffBtn",size:"m",disabled:g,loading:h,onClick:k,icon:t}),B):null;return e.createElement(o,{validate:(S=y,V=E,S||(V?(w=V,function(e){return w.reduce((function(t,o){return("object"==typeof e?e:{})[o]||(t[o]="Required"),t}),{})}):void 0)),initialValues:v,onSubmit:_},(function(t){var o=N||(t.submitCount?JSON.stringify(t.errors):void 0);return e.createElement(a,null,(g||h)&&e.createElement(l,null),e.createElement(i,{rightAddons:H,bottomAddons:!!o&&e.createElement(n,{text:o,view:"negative"}),title:j,border:!1}),e.createElement(p,null,(g||h)&&e.createElement("div",{className:c}),A(t)),e.createElement(m,{t:q,disabled:h,submit:t.handleSubmit,submitButtonText:x,close:T}))}))}export{u as RestForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as e}from"../../tslib.es6-accdafe3.js";function r(r,t){return Object.entries(t).reduce((function(t,n){var c,a=n[0],i=n[1];return e(((c={})[a]=r[a]||i,c),t)}),{})}export{r as getDefaultValues};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as d}from"../tslib.es6-
|
|
1
|
+
import{_ as e,a as d}from"../tslib.es6-accdafe3.js";import l from"react";import s from"classnames";var a={component:"index-module_component__88xUs",inner:"index-module_inner__5E-18",inputWrapper:"index-module_inputWrapper__EYDad",input:"index-module_input__28cIX",label:"index-module_label__38axD",labelInner:"index-module_labelInner__EJhNP",addons:"index-module_addons__lhT1R",leftAddons:"index-module_leftAddons__LEkge",rightAddons:"index-module_rightAddons__zsPCo",sub:"index-module_sub__i9z6r",hint:"index-module_hint__RpKM-",block:"index-module_block__flzeK",s:"index-module_s__prKUx",hasLabel:"index-module_hasLabel__ZoVEF",m:"index-module_m__WsWRp",l:"index-module_l__GgDaN",hasLeftAddons:"index-module_hasLeftAddons__SCMwi",hasRightAddons:"index-module_hasRightAddons__-5ME3",disabled:"index-module_disabled__xb0nE",focused:"index-module_focused__gP4eM",hasError:"index-module_hasError__YIyAz",filled:"index-module_filled__eiB1o",error:"index-module_error__kbem3"},n=l.forwardRef((function(n,o){var i,r,t=n.block,_=void 0!==t&&t,m=n.size,c=void 0===m?"s":m,u=n.className,b=n.required,f=n.fieldClassName,h=n.labelClassName,x=n.addonsClassName,p=n.disabled,E=n.focused,N=n.filled,A=n.error,g=n.hint,v=n.label,C=n.leftAddons,k=n.rightAddons,I=n.bottomAddons,L=n.children,R=n.dataTestId,z=e(n,["block","size","className","required","fieldClassName","labelClassName","addonsClassName","disabled","focused","filled","error","hint","label","leftAddons","rightAddons","bottomAddons","children","dataTestId"]),W="string"==typeof A?A:"";return l.createElement("div",{"data-test-id":R,className:s(a.component,u,a[c],(i={},i[a.block]=_,i[a.hasLeftAddons]=C,i[a.hasRightAddons]=k||A,i))},l.createElement("div",d({},z,{className:s(f,a.inner,(r={},r[a.focused]=E,r[a.disabled]=p,r[a.filled]=N,r[a.hasError]=A,r[a.hasLabel]=v,r)),ref:o}),C&&l.createElement("div",{className:s(a.addons,a.leftAddons,x)},C),l.createElement("div",{className:a.inputWrapper},v&&l.createElement("div",{className:s(a.label,h)},l.createElement("span",{className:a.labelInner},b?v+" *":v)),l.createElement("div",{className:a.input},L)),k&&l.createElement("div",{className:s(a.addons,a.rightAddons,x)},k)),I,W&&l.createElement("span",{className:s(a.sub,a.error)},W),g&&!W&&l.createElement("span",{className:s(a.sub,a.hint)},g))}));export{n as FormControl};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{FormControl}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{FormControl}from"./component.js";import"../tslib.es6-accdafe3.js";import"react";import"classnames";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createContext as t,forwardRef as e,createElement as r,useContext as n,useImperativeHandle as o,useEffect as a,Children as i,useRef as u,useReducer as c,useCallback as l,useMemo as s,useLayoutEffect as f}from"react";import{r as p}from"./index-47d70135.js";var d=Array.isArray,v=Object.keys,y=Object.prototype.hasOwnProperty,b="undefined"!=typeof Element;function h(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var r,n,o,a=d(t),i=d(e);if(a&&i){if((n=t.length)!=e.length)return!1;for(r=n;0!=r--;)if(!h(t[r],e[r]))return!1;return!0}if(a!=i)return!1;var u=t instanceof Date,c=e instanceof Date;if(u!=c)return!1;if(u&&c)return t.getTime()==e.getTime();var l=t instanceof RegExp,s=e instanceof RegExp;if(l!=s)return!1;if(l&&s)return t.toString()==e.toString();var f=v(t);if((n=f.length)!==v(e).length)return!1;for(r=n;0!=r--;)if(!y.call(e,f[r]))return!1;if(b&&t instanceof Element&&e instanceof Element)return t===e;for(r=n;0!=r--;)if(!("_owner"===(o=f[r])&&t.$$typeof||h(t[o],e[o])))return!1;return!0}return t!=t&&e!=e}var m=function(t,e){try{return h(t,e)}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: react-fast-compare does not handle circular references.",t.name,t.message),!1;throw t}},_=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===g}(t)}(t)};var g="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function j(t,e){return!1!==e.clone&&e.isMergeableObject(t)?S((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function E(t,e,r){return t.concat(e).map((function(t){return j(t,r)}))}function S(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||E,r.isMergeableObject=r.isMergeableObject||_;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):function(t,e,r){var n={};return r.isMergeableObject(t)&&Object.keys(t).forEach((function(e){n[e]=j(t[e],r)})),Object.keys(e).forEach((function(o){r.isMergeableObject(e[o])&&t[o]?n[o]=S(t[o],e[o],r):n[o]=j(e[o],r)})),n}(t,e,r):j(e,r)}S.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return S(t,r,e)}),{})};var O=S,T="object"==typeof global&&global&&global.Object===Object&&global,A="object"==typeof self&&self&&self.Object===Object&&self,w=T||A||Function("return this")(),F=w.Symbol,I=Object.prototype,D=I.hasOwnProperty,R=I.toString,M=F?F.toStringTag:void 0;var N=Object.prototype.toString;var P=F?F.toStringTag:void 0;function V(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":P&&P in Object(t)?function(t){var e=D.call(t,M),r=t[M];try{t[M]=void 0;var n=!0}catch(t){}var o=R.call(t);return n&&(e?t[M]=r:delete t[M]),o}(t):function(t){return N.call(t)}(t)}function k(t,e){return function(r){return t(e(r))}}var x=k(Object.getPrototypeOf,Object);function U(t){return null!=t&&"object"==typeof t}var L=Function.prototype,C=Object.prototype,B=L.toString,z=C.hasOwnProperty,$=B.call(Object);function W(t){if(!U(t)||"[object Object]"!=V(t))return!1;var e=x(t);if(null===e)return!0;var r=z.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&B.call(r)==$}function G(t,e){return t===e||t!=t&&e!=e}function H(t,e){for(var r=t.length;r--;)if(G(t[r][0],e))return r;return-1}var K=Array.prototype.splice;function Y(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function q(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(t){var e=this.__data__,r=H(e,t);return!(r<0)&&(r==e.length-1?e.pop():K.call(e,r,1),--this.size,!0)},Y.prototype.get=function(t){var e=this.__data__,r=H(e,t);return r<0?void 0:e[r][1]},Y.prototype.has=function(t){return H(this.__data__,t)>-1},Y.prototype.set=function(t,e){var r=this.__data__,n=H(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function J(t){if(!q(t))return!1;var e=V(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Q,X=w["__core-js_shared__"],Z=(Q=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"";var tt=Function.prototype.toString;function et(t){if(null!=t){try{return tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var rt=/^\[object .+?Constructor\]$/,nt=Function.prototype,ot=Object.prototype,at=nt.toString,it=ot.hasOwnProperty,ut=RegExp("^"+at.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ct(t){return!(!q(t)||(e=t,Z&&Z in e))&&(J(t)?ut:rt).test(et(t));var e}function lt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return ct(r)?r:void 0}var st=lt(w,"Map"),ft=lt(Object,"create");var pt=Object.prototype.hasOwnProperty;var dt=Object.prototype.hasOwnProperty;function vt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function yt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function bt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}vt.prototype.clear=function(){this.__data__=ft?ft(null):{},this.size=0},vt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},vt.prototype.get=function(t){var e=this.__data__;if(ft){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return pt.call(e,t)?e[t]:void 0},vt.prototype.has=function(t){var e=this.__data__;return ft?void 0!==e[t]:dt.call(e,t)},vt.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ft&&void 0===e?"__lodash_hash_undefined__":e,this},bt.prototype.clear=function(){this.size=0,this.__data__={hash:new vt,map:new(st||Y),string:new vt}},bt.prototype.delete=function(t){var e=yt(this,t).delete(t);return this.size-=e?1:0,e},bt.prototype.get=function(t){return yt(this,t).get(t)},bt.prototype.has=function(t){return yt(this,t).has(t)},bt.prototype.set=function(t,e){var r=yt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ht(t){var e=this.__data__=new Y(t);this.size=e.size}ht.prototype.clear=function(){this.__data__=new Y,this.size=0},ht.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},ht.prototype.get=function(t){return this.__data__.get(t)},ht.prototype.has=function(t){return this.__data__.has(t)},ht.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!st||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new bt(n)}return r.set(t,e),this.size=r.size,this};var mt=function(){try{var t=lt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();function _t(t,e,r){"__proto__"==e&&mt?mt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var gt=Object.prototype.hasOwnProperty;function jt(t,e,r){var n=t[e];gt.call(t,e)&&G(n,r)&&(void 0!==r||e in t)||_t(t,e,r)}function Et(t,e,r,n){var o=!r;r||(r={});for(var a=-1,i=e.length;++a<i;){var u=e[a],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),o?_t(r,u,c):jt(r,u,c)}return r}function St(t){return U(t)&&"[object Arguments]"==V(t)}var Ot=Object.prototype,Tt=Ot.hasOwnProperty,At=Ot.propertyIsEnumerable,wt=St(function(){return arguments}())?St:function(t){return U(t)&&Tt.call(t,"callee")&&!At.call(t,"callee")},Ft=Array.isArray;var It="object"==typeof exports&&exports&&!exports.nodeType&&exports,Dt=It&&"object"==typeof module&&module&&!module.nodeType&&module,Rt=Dt&&Dt.exports===It?w.Buffer:void 0,Mt=(Rt?Rt.isBuffer:void 0)||function(){return!1},Nt=/^(?:0|[1-9]\d*)$/;function Pt(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Nt.test(t))&&t>-1&&t%1==0&&t<e}function Vt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}var kt={};function xt(t){return function(e){return t(e)}}kt["[object Float32Array]"]=kt["[object Float64Array]"]=kt["[object Int8Array]"]=kt["[object Int16Array]"]=kt["[object Int32Array]"]=kt["[object Uint8Array]"]=kt["[object Uint8ClampedArray]"]=kt["[object Uint16Array]"]=kt["[object Uint32Array]"]=!0,kt["[object Arguments]"]=kt["[object Array]"]=kt["[object ArrayBuffer]"]=kt["[object Boolean]"]=kt["[object DataView]"]=kt["[object Date]"]=kt["[object Error]"]=kt["[object Function]"]=kt["[object Map]"]=kt["[object Number]"]=kt["[object Object]"]=kt["[object RegExp]"]=kt["[object Set]"]=kt["[object String]"]=kt["[object WeakMap]"]=!1;var Ut="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Ut&&"object"==typeof module&&module&&!module.nodeType&&module,Ct=Lt&&Lt.exports===Ut&&T.process,Bt=function(){try{var t=Lt&&Lt.require&&Lt.require("util").types;return t||Ct&&Ct.binding&&Ct.binding("util")}catch(t){}}(),zt=Bt&&Bt.isTypedArray,$t=zt?xt(zt):function(t){return U(t)&&Vt(t.length)&&!!kt[V(t)]},Wt=Object.prototype.hasOwnProperty;function Gt(t,e){var r=Ft(t),n=!r&&wt(t),o=!r&&!n&&Mt(t),a=!r&&!n&&!o&&$t(t),i=r||n||o||a,u=i?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=u.length;for(var l in t)!e&&!Wt.call(t,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Pt(l,c))||u.push(l);return u}var Ht=Object.prototype;function Kt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ht)}var Yt=k(Object.keys,Object),qt=Object.prototype.hasOwnProperty;function Jt(t){return null!=t&&Vt(t.length)&&!J(t)}function Qt(t){return Jt(t)?Gt(t):function(t){if(!Kt(t))return Yt(t);var e=[];for(var r in Object(t))qt.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}var Xt=Object.prototype.hasOwnProperty;function Zt(t){if(!q(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Kt(t),r=[];for(var n in t)("constructor"!=n||!e&&Xt.call(t,n))&&r.push(n);return r}function te(t){return Jt(t)?Gt(t,!0):Zt(t)}var ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,re=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ne=re&&re.exports===ee?w.Buffer:void 0,oe=ne?ne.allocUnsafe:void 0;function ae(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function ie(){return[]}var ue=Object.prototype.propertyIsEnumerable,ce=Object.getOwnPropertySymbols,le=ce?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a}(ce(t),(function(e){return ue.call(t,e)})))}:ie;function se(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var fe=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)se(e,le(t)),t=x(t);return e}:ie;function pe(t,e,r){var n=e(t);return Ft(t)?n:se(n,r(t))}function de(t){return pe(t,Qt,le)}function ve(t){return pe(t,te,fe)}var ye=lt(w,"DataView"),be=lt(w,"Promise"),he=lt(w,"Set"),me=lt(w,"WeakMap"),_e=et(ye),ge=et(st),je=et(be),Ee=et(he),Se=et(me),Oe=V;(ye&&"[object DataView]"!=Oe(new ye(new ArrayBuffer(1)))||st&&"[object Map]"!=Oe(new st)||be&&"[object Promise]"!=Oe(be.resolve())||he&&"[object Set]"!=Oe(new he)||me&&"[object WeakMap]"!=Oe(new me))&&(Oe=function(t){var e=V(t),r="[object Object]"==e?t.constructor:void 0,n=r?et(r):"";if(n)switch(n){case _e:return"[object DataView]";case ge:return"[object Map]";case je:return"[object Promise]";case Ee:return"[object Set]";case Se:return"[object WeakMap]"}return e});var Te=Oe,Ae=Object.prototype.hasOwnProperty;var we=w.Uint8Array;function Fe(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}var Ie=/\w*$/;var De=F?F.prototype:void 0,Re=De?De.valueOf:void 0;function Me(t,e,r){var n,o,a,i=t.constructor;switch(e){case"[object ArrayBuffer]":return Fe(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t,e){var r=e?Fe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var r=e?Fe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return(a=new(o=t).constructor(o.source,Ie.exec(o))).lastIndex=o.lastIndex,a;case"[object Symbol]":return n=t,Re?Object(Re.call(n)):{}}}var Ne=Object.create,Pe=function(){function t(){}return function(e){if(!q(e))return{};if(Ne)return Ne(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Ve=Bt&&Bt.isMap,ke=Ve?xt(Ve):function(t){return U(t)&&"[object Map]"==Te(t)};var xe=Bt&&Bt.isSet,Ue=xe?xt(xe):function(t){return U(t)&&"[object Set]"==Te(t)},Le={};function Ce(t,e,r,n,o,a){var i,u=1&e,c=2&e,l=4&e;if(r&&(i=o?r(t,n,o,a):r(t)),void 0!==i)return i;if(!q(t))return t;var s=Ft(t);if(s){if(i=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Ae.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return ae(t,i)}else{var f=Te(t),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(Mt(t))return function(t,e){if(e)return t.slice();var r=t.length,n=oe?oe(r):new t.constructor(r);return t.copy(n),n}(t,u);if("[object Object]"==f||"[object Arguments]"==f||p&&!o){if(i=c||p?{}:function(t){return"function"!=typeof t.constructor||Kt(t)?{}:Pe(x(t))}(t),!u)return c?function(t,e){return Et(t,fe(t),e)}(t,function(t,e){return t&&Et(e,te(e),t)}(i,t)):function(t,e){return Et(t,le(t),e)}(t,function(t,e){return t&&Et(e,Qt(e),t)}(i,t))}else{if(!Le[f])return o?t:{};i=Me(t,f,u)}}a||(a=new ht);var d=a.get(t);if(d)return d;a.set(t,i),Ue(t)?t.forEach((function(n){i.add(Ce(n,e,r,n,t,a))})):ke(t)&&t.forEach((function(n,o){i.set(o,Ce(n,e,r,o,t,a))}));var v=s?void 0:(l?c?ve:de:c?te:Qt)(t);return function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););}(v||t,(function(n,o){v&&(n=t[o=n]),jt(i,o,Ce(n,e,r,o,t,a))})),i}Le["[object Arguments]"]=Le["[object Array]"]=Le["[object ArrayBuffer]"]=Le["[object DataView]"]=Le["[object Boolean]"]=Le["[object Date]"]=Le["[object Float32Array]"]=Le["[object Float64Array]"]=Le["[object Int8Array]"]=Le["[object Int16Array]"]=Le["[object Int32Array]"]=Le["[object Map]"]=Le["[object Number]"]=Le["[object Object]"]=Le["[object RegExp]"]=Le["[object Set]"]=Le["[object String]"]=Le["[object Symbol]"]=Le["[object Uint8Array]"]=Le["[object Uint8ClampedArray]"]=Le["[object Uint16Array]"]=Le["[object Uint32Array]"]=!0,Le["[object Error]"]=Le["[object Function]"]=Le["[object WeakMap]"]=!1;function Be(t){return Ce(t,4)}function ze(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function $e(t){return"symbol"==typeof t||U(t)&&"[object Symbol]"==V(t)}function We(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(We.Cache||bt),r}We.Cache=bt;var Ge,He,Ke,Ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/\\(\\)?/g,Je=(Ge=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ye,(function(t,r,n,o){e.push(n?o.replace(qe,"$1"):r||t)})),e},He=We(Ge,(function(t){return 500===Ke.size&&Ke.clear(),t})),Ke=He.cache,He);function Qe(t){if("string"==typeof t||$e(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}var Xe=F?F.prototype:void 0,Ze=Xe?Xe.toString:void 0;function tr(t){if("string"==typeof t)return t;if(Ft(t))return ze(t,tr)+"";if($e(t))return Ze?Ze.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function er(t){return Ft(t)?ze(t,Qe):$e(t)?[t]:ae(Je(function(t){return null==t?"":tr(t)}(t)))}var rr="production"===process.env.NODE_ENV;function nr(t,e){if(!rr){if(t)return;var r="Warning: "+e;"undefined"!=typeof console&&console.warn(r);try{throw Error(r)}catch(t){}}}var or={};function ar(){return ar=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ar.apply(this,arguments)}function ir(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}or[p.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},or[p.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var ur=function(t){return"function"==typeof t},cr=function(t){return null!==t&&"object"==typeof t},lr=function(t){return String(Math.floor(Number(t)))===t},sr=function(t){return"[object String]"===Object.prototype.toString.call(t)},fr=function(t){return cr(t)&&ur(t.then)};function pr(t,e,r,n){void 0===n&&(n=0);for(var o=er(e);t&&n<o.length;)t=t[o[n++]];return void 0===t?r:t}function dr(t,e,r){for(var n=Be(t),o=n,a=0,i=er(e);a<i.length-1;a++){var u=i[a],c=pr(t,i.slice(0,a+1));if(c&&(cr(c)||Array.isArray(c)))o=o[u]=Be(c);else{var l=i[a+1];o=o[u]=lr(l)&&Number(l)>=0?[]:{}}}return(0===a?t:o)[i[a]]===r?t:(void 0===r?delete o[i[a]]:o[i[a]]=r,0===a&&void 0===r&&delete n[i[a]],n)}function vr(t,e,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var o=0,a=Object.keys(t);o<a.length;o++){var i=a[o],u=t[i];cr(u)?r.get(u)||(r.set(u,!0),n[i]=Array.isArray(u)?[]:{},vr(u,e,r,n[i])):n[i]=e}return n}var yr=t(void 0);yr.displayName="FormikContext";var br=yr.Provider;function hr(t,e){switch(e.type){case"SET_VALUES":return ar({},t,{values:e.payload});case"SET_TOUCHED":return ar({},t,{touched:e.payload});case"SET_ERRORS":return m(t.errors,e.payload)?t:ar({},t,{errors:e.payload});case"SET_STATUS":return ar({},t,{status:e.payload});case"SET_ISSUBMITTING":return ar({},t,{isSubmitting:e.payload});case"SET_ISVALIDATING":return ar({},t,{isValidating:e.payload});case"SET_FIELD_VALUE":return ar({},t,{values:dr(t.values,e.payload.field,e.payload.value)});case"SET_FIELD_TOUCHED":return ar({},t,{touched:dr(t.touched,e.payload.field,e.payload.value)});case"SET_FIELD_ERROR":return ar({},t,{errors:dr(t.errors,e.payload.field,e.payload.value)});case"RESET_FORM":return ar({},t,e.payload);case"SET_FORMIK_STATE":return e.payload(t);case"SUBMIT_ATTEMPT":return ar({},t,{touched:vr(t.values,!0),isSubmitting:!0,submitCount:t.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return ar({},t,{isSubmitting:!1});default:return t}}yr.Consumer;var mr={},_r={};function gr(t){var e=t.validateOnChange,r=void 0===e||e,n=t.validateOnBlur,o=void 0===n||n,i=t.validateOnMount,f=void 0!==i&&i,p=t.isInitialValid,d=t.enableReinitialize,v=void 0!==d&&d,y=t.onSubmit,b=ir(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),h=ar({validateOnChange:r,validateOnBlur:o,validateOnMount:f,onSubmit:y},b),_=u(h.initialValues),g=u(h.initialErrors||mr),j=u(h.initialTouched||_r),E=u(h.initialStatus),S=u(!1),T=u({});"production"!==process.env.NODE_ENV&&a((function(){void 0!==p&&("production"!==process.env.NODE_ENV?nr(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):nr(!1))}),[]),a((function(){return S.current=!0,function(){S.current=!1}}),[]);var A=c(hr,{values:h.initialValues,errors:h.initialErrors||mr,touched:h.initialTouched||_r,status:h.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),w=A[0],F=A[1],I=l((function(t,e){return new Promise((function(r,n){var o=h.validate(t,e);null==o?r(mr):fr(o)?o.then((function(t){r(t||mr)}),(function(t){"production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",t),n(t)})):r(o)}))}),[h.validate]),D=l((function(t,e){var r=h.validationSchema,n=ur(r)?r(e):r,o=e&&n.validateAt?n.validateAt(e,t):function(t,e,r,n){void 0===r&&(r=!1);void 0===n&&(n={});var o=Sr(t);return e[r?"validateSync":"validate"](o,{abortEarly:!1,context:n})}(t,n);return new Promise((function(t,e){o.then((function(){t(mr)}),(function(r){"ValidationError"===r.name?t(function(t){var e={};if(t.inner){if(0===t.inner.length)return dr(e,t.path,t.message);var r=t.inner,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;pr(e,i.path)||(e=dr(e,i.path,i.message))}}return e}(r)):("production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",r),e(r))}))}))}),[h.validationSchema]),R=l((function(t,e){return new Promise((function(r){return r(T.current[t].validate(e))}))}),[]),M=l((function(t){var e=Object.keys(T.current).filter((function(t){return ur(T.current[t].validate)})),r=e.length>0?e.map((function(e){return R(e,pr(t,e))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(t){return t.reduce((function(t,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(t=dr(t,e[n],r)),t}),{})}))}),[R]),N=l((function(t){return Promise.all([M(t),h.validationSchema?D(t):{},h.validate?I(t):{}]).then((function(t){var e=t[0],r=t[1],n=t[2];return O.all([e,r,n],{arrayMerge:Or})}))}),[h.validate,h.validationSchema,M,I,D]),P=Ar((function(t){return void 0===t&&(t=w.values),F({type:"SET_ISVALIDATING",payload:!0}),N(t).then((function(t){return S.current&&(F({type:"SET_ISVALIDATING",payload:!1}),F({type:"SET_ERRORS",payload:t})),t}))}));a((function(){f&&!0===S.current&&m(_.current,h.initialValues)&&P(_.current)}),[f,P]);var V=l((function(t){var e=t&&t.values?t.values:_.current,r=t&&t.errors?t.errors:g.current?g.current:h.initialErrors||{},n=t&&t.touched?t.touched:j.current?j.current:h.initialTouched||{},o=t&&t.status?t.status:E.current?E.current:h.initialStatus;_.current=e,g.current=r,j.current=n,E.current=o;var a=function(){F({type:"RESET_FORM",payload:{isSubmitting:!!t&&!!t.isSubmitting,errors:r,touched:n,status:o,values:e,isValidating:!!t&&!!t.isValidating,submitCount:t&&t.submitCount&&"number"==typeof t.submitCount?t.submitCount:0}})};if(h.onReset){var i=h.onReset(w.values,tt);fr(i)?i.then(a):a()}else a()}),[h.initialErrors,h.initialStatus,h.initialTouched]);a((function(){!0!==S.current||m(_.current,h.initialValues)||(v&&(_.current=h.initialValues,V()),f&&P(_.current))}),[v,h.initialValues,V,f,P]),a((function(){v&&!0===S.current&&!m(g.current,h.initialErrors)&&(g.current=h.initialErrors||mr,F({type:"SET_ERRORS",payload:h.initialErrors||mr}))}),[v,h.initialErrors]),a((function(){v&&!0===S.current&&!m(j.current,h.initialTouched)&&(j.current=h.initialTouched||_r,F({type:"SET_TOUCHED",payload:h.initialTouched||_r}))}),[v,h.initialTouched]),a((function(){v&&!0===S.current&&!m(E.current,h.initialStatus)&&(E.current=h.initialStatus,F({type:"SET_STATUS",payload:h.initialStatus}))}),[v,h.initialStatus,h.initialTouched]);var k=Ar((function(t){if(T.current[t]&&ur(T.current[t].validate)){var e=pr(w.values,t),r=T.current[t].validate(e);return fr(r)?(F({type:"SET_ISVALIDATING",payload:!0}),r.then((function(t){return t})).then((function(e){F({type:"SET_FIELD_ERROR",payload:{field:t,value:e}}),F({type:"SET_ISVALIDATING",payload:!1})}))):(F({type:"SET_FIELD_ERROR",payload:{field:t,value:r}}),Promise.resolve(r))}return h.validationSchema?(F({type:"SET_ISVALIDATING",payload:!0}),D(w.values,t).then((function(t){return t})).then((function(e){F({type:"SET_FIELD_ERROR",payload:{field:t,value:e[t]}}),F({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),x=l((function(t,e){var r=e.validate;T.current[t]={validate:r}}),[]),U=l((function(t){delete T.current[t]}),[]),L=Ar((function(t,e){return F({type:"SET_TOUCHED",payload:t}),(void 0===e?o:e)?P(w.values):Promise.resolve()})),C=l((function(t){F({type:"SET_ERRORS",payload:t})}),[]),B=Ar((function(t,e){var n=ur(t)?t(w.values):t;return F({type:"SET_VALUES",payload:n}),(void 0===e?r:e)?P(n):Promise.resolve()})),z=l((function(t,e){F({type:"SET_FIELD_ERROR",payload:{field:t,value:e}})}),[]),$=Ar((function(t,e,n){return F({type:"SET_FIELD_VALUE",payload:{field:t,value:e}}),(void 0===n?r:n)?P(dr(w.values,t,e)):Promise.resolve()})),W=l((function(t,e){var r,n=e,o=t;if(!sr(t)){t.persist&&t.persist();var a=t.target?t.target:t.currentTarget,i=a.type,u=a.name,c=a.id,l=a.value,s=a.checked,f=a.outerHTML,p=a.options,d=a.multiple;(n=e||(u||c))||"production"===process.env.NODE_ENV||Er({htmlContent:f,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),o=/number|range/.test(i)?(r=parseFloat(l),isNaN(r)?"":r):/checkbox/.test(i)?function(t,e,r){if("boolean"==typeof t)return Boolean(e);var n=[],o=!1,a=-1;if(Array.isArray(t))n=t,o=(a=t.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(e);if(e&&r&&!o)return n.concat(r);if(!o)return n;return n.slice(0,a).concat(n.slice(a+1))}(pr(w.values,n),s,l):p&&d?function(t){return Array.from(t).filter((function(t){return t.selected})).map((function(t){return t.value}))}(p):l}n&&$(n,o)}),[$,w.values]),G=Ar((function(t){if(sr(t))return function(e){return W(e,t)};W(t)})),H=Ar((function(t,e,r){return void 0===e&&(e=!0),F({type:"SET_FIELD_TOUCHED",payload:{field:t,value:e}}),(void 0===r?o:r)?P(w.values):Promise.resolve()})),K=l((function(t,e){t.persist&&t.persist();var r=t.target,n=r.name,o=r.id,a=r.outerHTML,i=e||(n||o);i||"production"===process.env.NODE_ENV||Er({htmlContent:a,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),H(i,!0)}),[H]),Y=Ar((function(t){if(sr(t))return function(e){return K(e,t)};K(t)})),q=l((function(t){ur(t)?F({type:"SET_FORMIK_STATE",payload:t}):F({type:"SET_FORMIK_STATE",payload:function(){return t}})}),[]),J=l((function(t){F({type:"SET_STATUS",payload:t})}),[]),Q=l((function(t){F({type:"SET_ISSUBMITTING",payload:t})}),[]),X=Ar((function(){return F({type:"SUBMIT_ATTEMPT"}),P().then((function(t){var e=t instanceof Error;if(!e&&0===Object.keys(t).length){var r;try{if(void 0===(r=et()))return}catch(t){throw t}return Promise.resolve(r).then((function(t){return S.current&&F({type:"SUBMIT_SUCCESS"}),t})).catch((function(t){if(S.current)throw F({type:"SUBMIT_FAILURE"}),t}))}if(S.current&&(F({type:"SUBMIT_FAILURE"}),e))throw t}))})),Z=Ar((function(t){if(t&&t.preventDefault&&ur(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&ur(t.stopPropagation)&&t.stopPropagation(),"production"!==process.env.NODE_ENV&&"undefined"!=typeof document){var e=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}();null!==e&&e instanceof HTMLButtonElement&&(e.attributes&&e.attributes.getNamedItem("type")||("production"!==process.env.NODE_ENV?nr(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):nr(!1)))}X().catch((function(t){console.warn("Warning: An unhandled error was caught from submitForm()",t)}))})),tt={resetForm:V,validateForm:P,validateField:k,setErrors:C,setFieldError:z,setFieldTouched:H,setFieldValue:$,setStatus:J,setSubmitting:Q,setTouched:L,setValues:B,setFormikState:q,submitForm:X},et=Ar((function(){return y(w.values,tt)})),rt=Ar((function(t){t&&t.preventDefault&&ur(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&ur(t.stopPropagation)&&t.stopPropagation(),V()})),nt=l((function(t){return{value:pr(w.values,t),error:pr(w.errors,t),touched:!!pr(w.touched,t),initialValue:pr(_.current,t),initialTouched:!!pr(j.current,t),initialError:pr(g.current,t)}}),[w.errors,w.touched,w.values]),ot=l((function(t){return{setValue:function(e,r){return $(t,e,r)},setTouched:function(e,r){return H(t,e,r)},setError:function(e){return z(t,e)}}}),[$,H,z]),at=l((function(t){var e=cr(t),r=e?t.name:t,n=pr(w.values,r),o={name:r,value:n,onChange:G,onBlur:Y};if(e){var a=t.type,i=t.value,u=t.as,c=t.multiple;"checkbox"===a?void 0===i?o.checked=!!n:(o.checked=!(!Array.isArray(n)||!~n.indexOf(i)),o.value=i):"radio"===a?(o.checked=n===i,o.value=i):"select"===u&&c&&(o.value=o.value||[],o.multiple=!0)}return o}),[Y,G,w.values]),it=s((function(){return!m(_.current,w.values)}),[_.current,w.values]),ut=s((function(){return void 0!==p?it?w.errors&&0===Object.keys(w.errors).length:!1!==p&&ur(p)?p(h):p:w.errors&&0===Object.keys(w.errors).length}),[p,it,w.errors,h]);return ar({},w,{initialValues:_.current,initialErrors:g.current,initialTouched:j.current,initialStatus:E.current,handleBlur:Y,handleChange:G,handleReset:rt,handleSubmit:Z,resetForm:V,setErrors:C,setFormikState:q,setFieldTouched:H,setFieldValue:$,setFieldError:z,setStatus:J,setSubmitting:Q,setTouched:L,setValues:B,submitForm:X,validateForm:P,validateField:k,isValid:ut,dirty:it,unregisterField:U,registerField:x,getFieldProps:at,getFieldMeta:nt,getFieldHelpers:ot,validateOnBlur:o,validateOnChange:r,validateOnMount:f})}function jr(t){var e=gr(t),n=t.component,u=t.children,c=t.render,l=t.innerRef;return o(l,(function(){return e})),"production"!==process.env.NODE_ENV&&a((function(){t.render&&("production"!==process.env.NODE_ENV?nr(!1,"<Formik render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Formik render={(props) => ...} /> with <Formik>{(props) => ...}</Formik>"):nr(!1))}),[]),r(br,{value:e},n?r(n,e):c?c(e):u?ur(u)?u(e):function(t){return 0===i.count(t)}(u)?null:i.only(u):null)}function Er(t){var e=t.htmlContent,r=t.documentationAnchorLink,n=t.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+e+"\n Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#"+r+"\n ")}function Sr(t){var e=Array.isArray(t)?[]:{};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=String(r);!0===Array.isArray(t[n])?e[n]=t[n].map((function(t){return!0===Array.isArray(t)||W(t)?Sr(t):""!==t?t:void 0})):W(t[n])?e[n]=Sr(t[n]):e[n]=""!==t[n]?t[n]:void 0}return e}function Or(t,e,r){var n=t.slice();return e.forEach((function(e,o){if(void 0===n[o]){var a=!1!==r.clone&&r.isMergeableObject(e);n[o]=a?O(Array.isArray(e)?[]:{},e,r):e}else r.isMergeableObject(e)?n[o]=O(t[o],e,r):-1===t.indexOf(e)&&n.push(e)})),n}var Tr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?f:a;function Ar(t){var e=u(t);return Tr((function(){e.current=t})),l((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.current.apply(void 0,r)}),[])}e((function(t,e){var o,a=t.action,i=ir(t,["action"]),u=null!=a?a:"#",c=((o=n(yr))||("production"!==process.env.NODE_ENV?nr(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):nr(!1)),o),l=c.handleReset,s=c.handleSubmit;return r("form",Object.assign({onSubmit:s,ref:e,onReset:l,action:u},i))})).displayName="Form";export{jr as F};
|
|
1
|
+
import{createContext as t,forwardRef as e,createElement as r,useContext as n,useImperativeHandle as o,useEffect as a,Children as i,useRef as u,useReducer as c,useCallback as l,useMemo as s,useLayoutEffect as f}from"react";import{r as p}from"./index-7f4fec64.js";var d=Array.isArray,v=Object.keys,y=Object.prototype.hasOwnProperty,b="undefined"!=typeof Element;function h(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var r,n,o,a=d(t),i=d(e);if(a&&i){if((n=t.length)!=e.length)return!1;for(r=n;0!=r--;)if(!h(t[r],e[r]))return!1;return!0}if(a!=i)return!1;var u=t instanceof Date,c=e instanceof Date;if(u!=c)return!1;if(u&&c)return t.getTime()==e.getTime();var l=t instanceof RegExp,s=e instanceof RegExp;if(l!=s)return!1;if(l&&s)return t.toString()==e.toString();var f=v(t);if((n=f.length)!==v(e).length)return!1;for(r=n;0!=r--;)if(!y.call(e,f[r]))return!1;if(b&&t instanceof Element&&e instanceof Element)return t===e;for(r=n;0!=r--;)if(!("_owner"===(o=f[r])&&t.$$typeof||h(t[o],e[o])))return!1;return!0}return t!=t&&e!=e}var m=function(t,e){try{return h(t,e)}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: react-fast-compare does not handle circular references.",t.name,t.message),!1;throw t}},_=function(t){return function(t){return!!t&&"object"==typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===g}(t)}(t)};var g="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function j(t,e){return!1!==e.clone&&e.isMergeableObject(t)?S((r=t,Array.isArray(r)?[]:{}),t,e):t;var r}function E(t,e,r){return t.concat(e).map((function(t){return j(t,r)}))}function S(t,e,r){(r=r||{}).arrayMerge=r.arrayMerge||E,r.isMergeableObject=r.isMergeableObject||_;var n=Array.isArray(e);return n===Array.isArray(t)?n?r.arrayMerge(t,e,r):function(t,e,r){var n={};return r.isMergeableObject(t)&&Object.keys(t).forEach((function(e){n[e]=j(t[e],r)})),Object.keys(e).forEach((function(o){r.isMergeableObject(e[o])&&t[o]?n[o]=S(t[o],e[o],r):n[o]=j(e[o],r)})),n}(t,e,r):j(e,r)}S.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,r){return S(t,r,e)}),{})};var O=S,T="object"==typeof global&&global&&global.Object===Object&&global,A="object"==typeof self&&self&&self.Object===Object&&self,w=T||A||Function("return this")(),F=w.Symbol,I=Object.prototype,D=I.hasOwnProperty,R=I.toString,M=F?F.toStringTag:void 0;var N=Object.prototype.toString;var P=F?F.toStringTag:void 0;function V(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":P&&P in Object(t)?function(t){var e=D.call(t,M),r=t[M];try{t[M]=void 0;var n=!0}catch(t){}var o=R.call(t);return n&&(e?t[M]=r:delete t[M]),o}(t):function(t){return N.call(t)}(t)}function k(t,e){return function(r){return t(e(r))}}var x=k(Object.getPrototypeOf,Object);function U(t){return null!=t&&"object"==typeof t}var L=Function.prototype,C=Object.prototype,B=L.toString,z=C.hasOwnProperty,$=B.call(Object);function W(t){if(!U(t)||"[object Object]"!=V(t))return!1;var e=x(t);if(null===e)return!0;var r=z.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&B.call(r)==$}function G(t,e){return t===e||t!=t&&e!=e}function H(t,e){for(var r=t.length;r--;)if(G(t[r][0],e))return r;return-1}var K=Array.prototype.splice;function Y(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function q(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(t){var e=this.__data__,r=H(e,t);return!(r<0)&&(r==e.length-1?e.pop():K.call(e,r,1),--this.size,!0)},Y.prototype.get=function(t){var e=this.__data__,r=H(e,t);return r<0?void 0:e[r][1]},Y.prototype.has=function(t){return H(this.__data__,t)>-1},Y.prototype.set=function(t,e){var r=this.__data__,n=H(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function J(t){if(!q(t))return!1;var e=V(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Q,X=w["__core-js_shared__"],Z=(Q=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+Q:"";var tt=Function.prototype.toString;function et(t){if(null!=t){try{return tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var rt=/^\[object .+?Constructor\]$/,nt=Function.prototype,ot=Object.prototype,at=nt.toString,it=ot.hasOwnProperty,ut=RegExp("^"+at.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ct(t){return!(!q(t)||(e=t,Z&&Z in e))&&(J(t)?ut:rt).test(et(t));var e}function lt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return ct(r)?r:void 0}var st=lt(w,"Map"),ft=lt(Object,"create");var pt=Object.prototype.hasOwnProperty;var dt=Object.prototype.hasOwnProperty;function vt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function yt(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function bt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}vt.prototype.clear=function(){this.__data__=ft?ft(null):{},this.size=0},vt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},vt.prototype.get=function(t){var e=this.__data__;if(ft){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return pt.call(e,t)?e[t]:void 0},vt.prototype.has=function(t){var e=this.__data__;return ft?void 0!==e[t]:dt.call(e,t)},vt.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ft&&void 0===e?"__lodash_hash_undefined__":e,this},bt.prototype.clear=function(){this.size=0,this.__data__={hash:new vt,map:new(st||Y),string:new vt}},bt.prototype.delete=function(t){var e=yt(this,t).delete(t);return this.size-=e?1:0,e},bt.prototype.get=function(t){return yt(this,t).get(t)},bt.prototype.has=function(t){return yt(this,t).has(t)},bt.prototype.set=function(t,e){var r=yt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ht(t){var e=this.__data__=new Y(t);this.size=e.size}ht.prototype.clear=function(){this.__data__=new Y,this.size=0},ht.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},ht.prototype.get=function(t){return this.__data__.get(t)},ht.prototype.has=function(t){return this.__data__.has(t)},ht.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Y){var n=r.__data__;if(!st||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new bt(n)}return r.set(t,e),this.size=r.size,this};var mt=function(){try{var t=lt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();function _t(t,e,r){"__proto__"==e&&mt?mt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var gt=Object.prototype.hasOwnProperty;function jt(t,e,r){var n=t[e];gt.call(t,e)&&G(n,r)&&(void 0!==r||e in t)||_t(t,e,r)}function Et(t,e,r,n){var o=!r;r||(r={});for(var a=-1,i=e.length;++a<i;){var u=e[a],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),o?_t(r,u,c):jt(r,u,c)}return r}function St(t){return U(t)&&"[object Arguments]"==V(t)}var Ot=Object.prototype,Tt=Ot.hasOwnProperty,At=Ot.propertyIsEnumerable,wt=St(function(){return arguments}())?St:function(t){return U(t)&&Tt.call(t,"callee")&&!At.call(t,"callee")},Ft=Array.isArray;var It="object"==typeof exports&&exports&&!exports.nodeType&&exports,Dt=It&&"object"==typeof module&&module&&!module.nodeType&&module,Rt=Dt&&Dt.exports===It?w.Buffer:void 0,Mt=(Rt?Rt.isBuffer:void 0)||function(){return!1},Nt=/^(?:0|[1-9]\d*)$/;function Pt(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Nt.test(t))&&t>-1&&t%1==0&&t<e}function Vt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}var kt={};function xt(t){return function(e){return t(e)}}kt["[object Float32Array]"]=kt["[object Float64Array]"]=kt["[object Int8Array]"]=kt["[object Int16Array]"]=kt["[object Int32Array]"]=kt["[object Uint8Array]"]=kt["[object Uint8ClampedArray]"]=kt["[object Uint16Array]"]=kt["[object Uint32Array]"]=!0,kt["[object Arguments]"]=kt["[object Array]"]=kt["[object ArrayBuffer]"]=kt["[object Boolean]"]=kt["[object DataView]"]=kt["[object Date]"]=kt["[object Error]"]=kt["[object Function]"]=kt["[object Map]"]=kt["[object Number]"]=kt["[object Object]"]=kt["[object RegExp]"]=kt["[object Set]"]=kt["[object String]"]=kt["[object WeakMap]"]=!1;var Ut="object"==typeof exports&&exports&&!exports.nodeType&&exports,Lt=Ut&&"object"==typeof module&&module&&!module.nodeType&&module,Ct=Lt&&Lt.exports===Ut&&T.process,Bt=function(){try{var t=Lt&&Lt.require&&Lt.require("util").types;return t||Ct&&Ct.binding&&Ct.binding("util")}catch(t){}}(),zt=Bt&&Bt.isTypedArray,$t=zt?xt(zt):function(t){return U(t)&&Vt(t.length)&&!!kt[V(t)]},Wt=Object.prototype.hasOwnProperty;function Gt(t,e){var r=Ft(t),n=!r&&wt(t),o=!r&&!n&&Mt(t),a=!r&&!n&&!o&&$t(t),i=r||n||o||a,u=i?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=u.length;for(var l in t)!e&&!Wt.call(t,l)||i&&("length"==l||o&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Pt(l,c))||u.push(l);return u}var Ht=Object.prototype;function Kt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ht)}var Yt=k(Object.keys,Object),qt=Object.prototype.hasOwnProperty;function Jt(t){return null!=t&&Vt(t.length)&&!J(t)}function Qt(t){return Jt(t)?Gt(t):function(t){if(!Kt(t))return Yt(t);var e=[];for(var r in Object(t))qt.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}var Xt=Object.prototype.hasOwnProperty;function Zt(t){if(!q(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Kt(t),r=[];for(var n in t)("constructor"!=n||!e&&Xt.call(t,n))&&r.push(n);return r}function te(t){return Jt(t)?Gt(t,!0):Zt(t)}var ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,re=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ne=re&&re.exports===ee?w.Buffer:void 0,oe=ne?ne.allocUnsafe:void 0;function ae(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function ie(){return[]}var ue=Object.prototype.propertyIsEnumerable,ce=Object.getOwnPropertySymbols,le=ce?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a}(ce(t),(function(e){return ue.call(t,e)})))}:ie;function se(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var fe=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)se(e,le(t)),t=x(t);return e}:ie;function pe(t,e,r){var n=e(t);return Ft(t)?n:se(n,r(t))}function de(t){return pe(t,Qt,le)}function ve(t){return pe(t,te,fe)}var ye=lt(w,"DataView"),be=lt(w,"Promise"),he=lt(w,"Set"),me=lt(w,"WeakMap"),_e=et(ye),ge=et(st),je=et(be),Ee=et(he),Se=et(me),Oe=V;(ye&&"[object DataView]"!=Oe(new ye(new ArrayBuffer(1)))||st&&"[object Map]"!=Oe(new st)||be&&"[object Promise]"!=Oe(be.resolve())||he&&"[object Set]"!=Oe(new he)||me&&"[object WeakMap]"!=Oe(new me))&&(Oe=function(t){var e=V(t),r="[object Object]"==e?t.constructor:void 0,n=r?et(r):"";if(n)switch(n){case _e:return"[object DataView]";case ge:return"[object Map]";case je:return"[object Promise]";case Ee:return"[object Set]";case Se:return"[object WeakMap]"}return e});var Te=Oe,Ae=Object.prototype.hasOwnProperty;var we=w.Uint8Array;function Fe(t){var e=new t.constructor(t.byteLength);return new we(e).set(new we(t)),e}var Ie=/\w*$/;var De=F?F.prototype:void 0,Re=De?De.valueOf:void 0;function Me(t,e,r){var n,o,a,i=t.constructor;switch(e){case"[object ArrayBuffer]":return Fe(t);case"[object Boolean]":case"[object Date]":return new i(+t);case"[object DataView]":return function(t,e){var r=e?Fe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return function(t,e){var r=e?Fe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(t);case"[object RegExp]":return(a=new(o=t).constructor(o.source,Ie.exec(o))).lastIndex=o.lastIndex,a;case"[object Symbol]":return n=t,Re?Object(Re.call(n)):{}}}var Ne=Object.create,Pe=function(){function t(){}return function(e){if(!q(e))return{};if(Ne)return Ne(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Ve=Bt&&Bt.isMap,ke=Ve?xt(Ve):function(t){return U(t)&&"[object Map]"==Te(t)};var xe=Bt&&Bt.isSet,Ue=xe?xt(xe):function(t){return U(t)&&"[object Set]"==Te(t)},Le={};function Ce(t,e,r,n,o,a){var i,u=1&e,c=2&e,l=4&e;if(r&&(i=o?r(t,n,o,a):r(t)),void 0!==i)return i;if(!q(t))return t;var s=Ft(t);if(s){if(i=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Ae.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return ae(t,i)}else{var f=Te(t),p="[object Function]"==f||"[object GeneratorFunction]"==f;if(Mt(t))return function(t,e){if(e)return t.slice();var r=t.length,n=oe?oe(r):new t.constructor(r);return t.copy(n),n}(t,u);if("[object Object]"==f||"[object Arguments]"==f||p&&!o){if(i=c||p?{}:function(t){return"function"!=typeof t.constructor||Kt(t)?{}:Pe(x(t))}(t),!u)return c?function(t,e){return Et(t,fe(t),e)}(t,function(t,e){return t&&Et(e,te(e),t)}(i,t)):function(t,e){return Et(t,le(t),e)}(t,function(t,e){return t&&Et(e,Qt(e),t)}(i,t))}else{if(!Le[f])return o?t:{};i=Me(t,f,u)}}a||(a=new ht);var d=a.get(t);if(d)return d;a.set(t,i),Ue(t)?t.forEach((function(n){i.add(Ce(n,e,r,n,t,a))})):ke(t)&&t.forEach((function(n,o){i.set(o,Ce(n,e,r,o,t,a))}));var v=s?void 0:(l?c?ve:de:c?te:Qt)(t);return function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););}(v||t,(function(n,o){v&&(n=t[o=n]),jt(i,o,Ce(n,e,r,o,t,a))})),i}Le["[object Arguments]"]=Le["[object Array]"]=Le["[object ArrayBuffer]"]=Le["[object DataView]"]=Le["[object Boolean]"]=Le["[object Date]"]=Le["[object Float32Array]"]=Le["[object Float64Array]"]=Le["[object Int8Array]"]=Le["[object Int16Array]"]=Le["[object Int32Array]"]=Le["[object Map]"]=Le["[object Number]"]=Le["[object Object]"]=Le["[object RegExp]"]=Le["[object Set]"]=Le["[object String]"]=Le["[object Symbol]"]=Le["[object Uint8Array]"]=Le["[object Uint8ClampedArray]"]=Le["[object Uint16Array]"]=Le["[object Uint32Array]"]=!0,Le["[object Error]"]=Le["[object Function]"]=Le["[object WeakMap]"]=!1;function Be(t){return Ce(t,4)}function ze(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function $e(t){return"symbol"==typeof t||U(t)&&"[object Symbol]"==V(t)}function We(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(We.Cache||bt),r}We.Cache=bt;var Ge,He,Ke,Ye=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qe=/\\(\\)?/g,Je=(Ge=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Ye,(function(t,r,n,o){e.push(n?o.replace(qe,"$1"):r||t)})),e},He=We(Ge,(function(t){return 500===Ke.size&&Ke.clear(),t})),Ke=He.cache,He);function Qe(t){if("string"==typeof t||$e(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}var Xe=F?F.prototype:void 0,Ze=Xe?Xe.toString:void 0;function tr(t){if("string"==typeof t)return t;if(Ft(t))return ze(t,tr)+"";if($e(t))return Ze?Ze.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function er(t){return Ft(t)?ze(t,Qe):$e(t)?[t]:ae(Je(function(t){return null==t?"":tr(t)}(t)))}var rr="production"===process.env.NODE_ENV;function nr(t,e){if(!rr){if(t)return;var r="Warning: "+e;"undefined"!=typeof console&&console.warn(r);try{throw Error(r)}catch(t){}}}var or={};function ar(){return ar=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ar.apply(this,arguments)}function ir(t,e){if(null==t)return{};var r,n,o={},a=Object.keys(t);for(n=0;n<a.length;n++)r=a[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}or[p.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},or[p.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var ur=function(t){return"function"==typeof t},cr=function(t){return null!==t&&"object"==typeof t},lr=function(t){return String(Math.floor(Number(t)))===t},sr=function(t){return"[object String]"===Object.prototype.toString.call(t)},fr=function(t){return cr(t)&&ur(t.then)};function pr(t,e,r,n){void 0===n&&(n=0);for(var o=er(e);t&&n<o.length;)t=t[o[n++]];return void 0===t?r:t}function dr(t,e,r){for(var n=Be(t),o=n,a=0,i=er(e);a<i.length-1;a++){var u=i[a],c=pr(t,i.slice(0,a+1));if(c&&(cr(c)||Array.isArray(c)))o=o[u]=Be(c);else{var l=i[a+1];o=o[u]=lr(l)&&Number(l)>=0?[]:{}}}return(0===a?t:o)[i[a]]===r?t:(void 0===r?delete o[i[a]]:o[i[a]]=r,0===a&&void 0===r&&delete n[i[a]],n)}function vr(t,e,r,n){void 0===r&&(r=new WeakMap),void 0===n&&(n={});for(var o=0,a=Object.keys(t);o<a.length;o++){var i=a[o],u=t[i];cr(u)?r.get(u)||(r.set(u,!0),n[i]=Array.isArray(u)?[]:{},vr(u,e,r,n[i])):n[i]=e}return n}var yr=t(void 0);yr.displayName="FormikContext";var br=yr.Provider;function hr(t,e){switch(e.type){case"SET_VALUES":return ar({},t,{values:e.payload});case"SET_TOUCHED":return ar({},t,{touched:e.payload});case"SET_ERRORS":return m(t.errors,e.payload)?t:ar({},t,{errors:e.payload});case"SET_STATUS":return ar({},t,{status:e.payload});case"SET_ISSUBMITTING":return ar({},t,{isSubmitting:e.payload});case"SET_ISVALIDATING":return ar({},t,{isValidating:e.payload});case"SET_FIELD_VALUE":return ar({},t,{values:dr(t.values,e.payload.field,e.payload.value)});case"SET_FIELD_TOUCHED":return ar({},t,{touched:dr(t.touched,e.payload.field,e.payload.value)});case"SET_FIELD_ERROR":return ar({},t,{errors:dr(t.errors,e.payload.field,e.payload.value)});case"RESET_FORM":return ar({},t,e.payload);case"SET_FORMIK_STATE":return e.payload(t);case"SUBMIT_ATTEMPT":return ar({},t,{touched:vr(t.values,!0),isSubmitting:!0,submitCount:t.submitCount+1});case"SUBMIT_FAILURE":case"SUBMIT_SUCCESS":return ar({},t,{isSubmitting:!1});default:return t}}yr.Consumer;var mr={},_r={};function gr(t){var e=t.validateOnChange,r=void 0===e||e,n=t.validateOnBlur,o=void 0===n||n,i=t.validateOnMount,f=void 0!==i&&i,p=t.isInitialValid,d=t.enableReinitialize,v=void 0!==d&&d,y=t.onSubmit,b=ir(t,["validateOnChange","validateOnBlur","validateOnMount","isInitialValid","enableReinitialize","onSubmit"]),h=ar({validateOnChange:r,validateOnBlur:o,validateOnMount:f,onSubmit:y},b),_=u(h.initialValues),g=u(h.initialErrors||mr),j=u(h.initialTouched||_r),E=u(h.initialStatus),S=u(!1),T=u({});"production"!==process.env.NODE_ENV&&a((function(){void 0!==p&&("production"!==process.env.NODE_ENV?nr(!1,"isInitialValid has been deprecated and will be removed in future versions of Formik. Please use initialErrors or validateOnMount instead."):nr(!1))}),[]),a((function(){return S.current=!0,function(){S.current=!1}}),[]);var A=c(hr,{values:h.initialValues,errors:h.initialErrors||mr,touched:h.initialTouched||_r,status:h.initialStatus,isSubmitting:!1,isValidating:!1,submitCount:0}),w=A[0],F=A[1],I=l((function(t,e){return new Promise((function(r,n){var o=h.validate(t,e);null==o?r(mr):fr(o)?o.then((function(t){r(t||mr)}),(function(t){"production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validate />",t),n(t)})):r(o)}))}),[h.validate]),D=l((function(t,e){var r=h.validationSchema,n=ur(r)?r(e):r,o=e&&n.validateAt?n.validateAt(e,t):function(t,e,r,n){void 0===r&&(r=!1);void 0===n&&(n={});var o=Sr(t);return e[r?"validateSync":"validate"](o,{abortEarly:!1,context:n})}(t,n);return new Promise((function(t,e){o.then((function(){t(mr)}),(function(r){"ValidationError"===r.name?t(function(t){var e={};if(t.inner){if(0===t.inner.length)return dr(e,t.path,t.message);var r=t.inner,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;pr(e,i.path)||(e=dr(e,i.path,i.message))}}return e}(r)):("production"!==process.env.NODE_ENV&&console.warn("Warning: An unhandled error was caught during validation in <Formik validationSchema />",r),e(r))}))}))}),[h.validationSchema]),R=l((function(t,e){return new Promise((function(r){return r(T.current[t].validate(e))}))}),[]),M=l((function(t){var e=Object.keys(T.current).filter((function(t){return ur(T.current[t].validate)})),r=e.length>0?e.map((function(e){return R(e,pr(t,e))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(r).then((function(t){return t.reduce((function(t,r,n){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===r||r&&(t=dr(t,e[n],r)),t}),{})}))}),[R]),N=l((function(t){return Promise.all([M(t),h.validationSchema?D(t):{},h.validate?I(t):{}]).then((function(t){var e=t[0],r=t[1],n=t[2];return O.all([e,r,n],{arrayMerge:Or})}))}),[h.validate,h.validationSchema,M,I,D]),P=Ar((function(t){return void 0===t&&(t=w.values),F({type:"SET_ISVALIDATING",payload:!0}),N(t).then((function(t){return S.current&&(F({type:"SET_ISVALIDATING",payload:!1}),F({type:"SET_ERRORS",payload:t})),t}))}));a((function(){f&&!0===S.current&&m(_.current,h.initialValues)&&P(_.current)}),[f,P]);var V=l((function(t){var e=t&&t.values?t.values:_.current,r=t&&t.errors?t.errors:g.current?g.current:h.initialErrors||{},n=t&&t.touched?t.touched:j.current?j.current:h.initialTouched||{},o=t&&t.status?t.status:E.current?E.current:h.initialStatus;_.current=e,g.current=r,j.current=n,E.current=o;var a=function(){F({type:"RESET_FORM",payload:{isSubmitting:!!t&&!!t.isSubmitting,errors:r,touched:n,status:o,values:e,isValidating:!!t&&!!t.isValidating,submitCount:t&&t.submitCount&&"number"==typeof t.submitCount?t.submitCount:0}})};if(h.onReset){var i=h.onReset(w.values,tt);fr(i)?i.then(a):a()}else a()}),[h.initialErrors,h.initialStatus,h.initialTouched]);a((function(){!0!==S.current||m(_.current,h.initialValues)||(v&&(_.current=h.initialValues,V()),f&&P(_.current))}),[v,h.initialValues,V,f,P]),a((function(){v&&!0===S.current&&!m(g.current,h.initialErrors)&&(g.current=h.initialErrors||mr,F({type:"SET_ERRORS",payload:h.initialErrors||mr}))}),[v,h.initialErrors]),a((function(){v&&!0===S.current&&!m(j.current,h.initialTouched)&&(j.current=h.initialTouched||_r,F({type:"SET_TOUCHED",payload:h.initialTouched||_r}))}),[v,h.initialTouched]),a((function(){v&&!0===S.current&&!m(E.current,h.initialStatus)&&(E.current=h.initialStatus,F({type:"SET_STATUS",payload:h.initialStatus}))}),[v,h.initialStatus,h.initialTouched]);var k=Ar((function(t){if(T.current[t]&&ur(T.current[t].validate)){var e=pr(w.values,t),r=T.current[t].validate(e);return fr(r)?(F({type:"SET_ISVALIDATING",payload:!0}),r.then((function(t){return t})).then((function(e){F({type:"SET_FIELD_ERROR",payload:{field:t,value:e}}),F({type:"SET_ISVALIDATING",payload:!1})}))):(F({type:"SET_FIELD_ERROR",payload:{field:t,value:r}}),Promise.resolve(r))}return h.validationSchema?(F({type:"SET_ISVALIDATING",payload:!0}),D(w.values,t).then((function(t){return t})).then((function(e){F({type:"SET_FIELD_ERROR",payload:{field:t,value:e[t]}}),F({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),x=l((function(t,e){var r=e.validate;T.current[t]={validate:r}}),[]),U=l((function(t){delete T.current[t]}),[]),L=Ar((function(t,e){return F({type:"SET_TOUCHED",payload:t}),(void 0===e?o:e)?P(w.values):Promise.resolve()})),C=l((function(t){F({type:"SET_ERRORS",payload:t})}),[]),B=Ar((function(t,e){var n=ur(t)?t(w.values):t;return F({type:"SET_VALUES",payload:n}),(void 0===e?r:e)?P(n):Promise.resolve()})),z=l((function(t,e){F({type:"SET_FIELD_ERROR",payload:{field:t,value:e}})}),[]),$=Ar((function(t,e,n){return F({type:"SET_FIELD_VALUE",payload:{field:t,value:e}}),(void 0===n?r:n)?P(dr(w.values,t,e)):Promise.resolve()})),W=l((function(t,e){var r,n=e,o=t;if(!sr(t)){t.persist&&t.persist();var a=t.target?t.target:t.currentTarget,i=a.type,u=a.name,c=a.id,l=a.value,s=a.checked,f=a.outerHTML,p=a.options,d=a.multiple;(n=e||(u||c))||"production"===process.env.NODE_ENV||Er({htmlContent:f,documentationAnchorLink:"handlechange-e-reactchangeeventany--void",handlerName:"handleChange"}),o=/number|range/.test(i)?(r=parseFloat(l),isNaN(r)?"":r):/checkbox/.test(i)?function(t,e,r){if("boolean"==typeof t)return Boolean(e);var n=[],o=!1,a=-1;if(Array.isArray(t))n=t,o=(a=t.indexOf(r))>=0;else if(!r||"true"==r||"false"==r)return Boolean(e);if(e&&r&&!o)return n.concat(r);if(!o)return n;return n.slice(0,a).concat(n.slice(a+1))}(pr(w.values,n),s,l):p&&d?function(t){return Array.from(t).filter((function(t){return t.selected})).map((function(t){return t.value}))}(p):l}n&&$(n,o)}),[$,w.values]),G=Ar((function(t){if(sr(t))return function(e){return W(e,t)};W(t)})),H=Ar((function(t,e,r){return void 0===e&&(e=!0),F({type:"SET_FIELD_TOUCHED",payload:{field:t,value:e}}),(void 0===r?o:r)?P(w.values):Promise.resolve()})),K=l((function(t,e){t.persist&&t.persist();var r=t.target,n=r.name,o=r.id,a=r.outerHTML,i=e||(n||o);i||"production"===process.env.NODE_ENV||Er({htmlContent:a,documentationAnchorLink:"handleblur-e-any--void",handlerName:"handleBlur"}),H(i,!0)}),[H]),Y=Ar((function(t){if(sr(t))return function(e){return K(e,t)};K(t)})),q=l((function(t){ur(t)?F({type:"SET_FORMIK_STATE",payload:t}):F({type:"SET_FORMIK_STATE",payload:function(){return t}})}),[]),J=l((function(t){F({type:"SET_STATUS",payload:t})}),[]),Q=l((function(t){F({type:"SET_ISSUBMITTING",payload:t})}),[]),X=Ar((function(){return F({type:"SUBMIT_ATTEMPT"}),P().then((function(t){var e=t instanceof Error;if(!e&&0===Object.keys(t).length){var r;try{if(void 0===(r=et()))return}catch(t){throw t}return Promise.resolve(r).then((function(t){return S.current&&F({type:"SUBMIT_SUCCESS"}),t})).catch((function(t){if(S.current)throw F({type:"SUBMIT_FAILURE"}),t}))}if(S.current&&(F({type:"SUBMIT_FAILURE"}),e))throw t}))})),Z=Ar((function(t){if(t&&t.preventDefault&&ur(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&ur(t.stopPropagation)&&t.stopPropagation(),"production"!==process.env.NODE_ENV&&"undefined"!=typeof document){var e=function(t){if(void 0===(t=t||("undefined"!=typeof document?document:void 0)))return null;try{return t.activeElement||t.body}catch(e){return t.body}}();null!==e&&e instanceof HTMLButtonElement&&(e.attributes&&e.attributes.getNamedItem("type")||("production"!==process.env.NODE_ENV?nr(!1,'You submitted a Formik form using a button with an unspecified `type` attribute. Most browsers default button elements to `type="submit"`. If this is not a submit button, please add `type="button"`.'):nr(!1)))}X().catch((function(t){console.warn("Warning: An unhandled error was caught from submitForm()",t)}))})),tt={resetForm:V,validateForm:P,validateField:k,setErrors:C,setFieldError:z,setFieldTouched:H,setFieldValue:$,setStatus:J,setSubmitting:Q,setTouched:L,setValues:B,setFormikState:q,submitForm:X},et=Ar((function(){return y(w.values,tt)})),rt=Ar((function(t){t&&t.preventDefault&&ur(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&ur(t.stopPropagation)&&t.stopPropagation(),V()})),nt=l((function(t){return{value:pr(w.values,t),error:pr(w.errors,t),touched:!!pr(w.touched,t),initialValue:pr(_.current,t),initialTouched:!!pr(j.current,t),initialError:pr(g.current,t)}}),[w.errors,w.touched,w.values]),ot=l((function(t){return{setValue:function(e,r){return $(t,e,r)},setTouched:function(e,r){return H(t,e,r)},setError:function(e){return z(t,e)}}}),[$,H,z]),at=l((function(t){var e=cr(t),r=e?t.name:t,n=pr(w.values,r),o={name:r,value:n,onChange:G,onBlur:Y};if(e){var a=t.type,i=t.value,u=t.as,c=t.multiple;"checkbox"===a?void 0===i?o.checked=!!n:(o.checked=!(!Array.isArray(n)||!~n.indexOf(i)),o.value=i):"radio"===a?(o.checked=n===i,o.value=i):"select"===u&&c&&(o.value=o.value||[],o.multiple=!0)}return o}),[Y,G,w.values]),it=s((function(){return!m(_.current,w.values)}),[_.current,w.values]),ut=s((function(){return void 0!==p?it?w.errors&&0===Object.keys(w.errors).length:!1!==p&&ur(p)?p(h):p:w.errors&&0===Object.keys(w.errors).length}),[p,it,w.errors,h]);return ar({},w,{initialValues:_.current,initialErrors:g.current,initialTouched:j.current,initialStatus:E.current,handleBlur:Y,handleChange:G,handleReset:rt,handleSubmit:Z,resetForm:V,setErrors:C,setFormikState:q,setFieldTouched:H,setFieldValue:$,setFieldError:z,setStatus:J,setSubmitting:Q,setTouched:L,setValues:B,submitForm:X,validateForm:P,validateField:k,isValid:ut,dirty:it,unregisterField:U,registerField:x,getFieldProps:at,getFieldMeta:nt,getFieldHelpers:ot,validateOnBlur:o,validateOnChange:r,validateOnMount:f})}function jr(t){var e=gr(t),n=t.component,u=t.children,c=t.render,l=t.innerRef;return o(l,(function(){return e})),"production"!==process.env.NODE_ENV&&a((function(){t.render&&("production"!==process.env.NODE_ENV?nr(!1,"<Formik render> has been deprecated and will be removed in future versions of Formik. Please use a child callback function instead. To get rid of this warning, replace <Formik render={(props) => ...} /> with <Formik>{(props) => ...}</Formik>"):nr(!1))}),[]),r(br,{value:e},n?r(n,e):c?c(e):u?ur(u)?u(e):function(t){return 0===i.count(t)}(u)?null:i.only(u):null)}function Er(t){var e=t.htmlContent,r=t.documentationAnchorLink,n=t.handlerName;console.warn("Warning: Formik called `"+n+"`, but you forgot to pass an `id` or `name` attribute to your input:\n "+e+"\n Formik cannot determine which value to update. For more info see https://formik.org/docs/api/formik#"+r+"\n ")}function Sr(t){var e=Array.isArray(t)?[]:{};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=String(r);!0===Array.isArray(t[n])?e[n]=t[n].map((function(t){return!0===Array.isArray(t)||W(t)?Sr(t):""!==t?t:void 0})):W(t[n])?e[n]=Sr(t[n]):e[n]=""!==t[n]?t[n]:void 0}return e}function Or(t,e,r){var n=t.slice();return e.forEach((function(e,o){if(void 0===n[o]){var a=!1!==r.clone&&r.isMergeableObject(e);n[o]=a?O(Array.isArray(e)?[]:{},e,r):e}else r.isMergeableObject(e)?n[o]=O(t[o],e,r):-1===t.indexOf(e)&&n.push(e)})),n}var Tr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?f:a;function Ar(t){var e=u(t);return Tr((function(){e.current=t})),l((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.current.apply(void 0,r)}),[])}e((function(t,e){var o,a=t.action,i=ir(t,["action"]),u=null!=a?a:"#",c=((o=n(yr))||("production"!==process.env.NODE_ENV?nr(!1,"Formik context is undefined, please verify you are calling useFormikContext() as child of a <Formik> component."):nr(!1)),o),l=c.handleReset,s=c.handleSubmit;return r("form",Object.assign({onSubmit:s,ref:e,onReset:l,action:u},i))})).displayName="Form";export{jr as F};
|