From d47486c137bcef64bb5fd91d6b5fdba024bf14bb Mon Sep 17 00:00:00 2001 From: Aris FM Date: Mon, 27 Jun 2022 11:17:22 +0700 Subject: [PATCH] feat(ValidSelect): Add creatable option prop #minor --- CHANGELOG.md | 5 ++++ .../ValidatedInput/ValidSelect.d.ts | 2 +- .../styled-atlaskit/Select/Select.d.ts | 3 +- build/index.es.js | 2 +- build/index.es.js.map | 2 +- package.json | 2 +- src/components/ValidatedInput/ValidSelect.tsx | 2 ++ .../styled-atlaskit/Select/Select.tsx | 30 ++++++++++++------- 8 files changed, 32 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a315e9e4..a081d0be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [0.6.0] +### Added +- `ValidSelect` add creatable props + ## [0.5.1] ### Fixed - `Pagination` fix display styling diff --git a/build/components/ValidatedInput/ValidSelect.d.ts b/build/components/ValidatedInput/ValidSelect.d.ts index 34afd6e1..592402fe 100644 --- a/build/components/ValidatedInput/ValidSelect.d.ts +++ b/build/components/ValidatedInput/ValidSelect.d.ts @@ -30,4 +30,4 @@ export interface ValidSelectProps extends SelectProps { className?: string; helperText?: React.ReactNode; } -export declare const ValidSelect: ({ label, placeholder, options, name, value, onChange, errMessage, optionalLabel, isInvalid, isDisabled, isRequired, isClearable, tooltip, selectDataQa, isMulti, className, helperText, ...props }: ValidSelectProps) => JSX.Element; +export declare const ValidSelect: ({ label, placeholder, options, name, value, onChange, errMessage, optionalLabel, isInvalid, isDisabled, isRequired, isClearable, tooltip, selectDataQa, isMulti, className, helperText, isCreatable, ...props }: ValidSelectProps) => JSX.Element; diff --git a/build/components/styled-atlaskit/Select/Select.d.ts b/build/components/styled-atlaskit/Select/Select.d.ts index 5b55736b..6f94b9ac 100644 --- a/build/components/styled-atlaskit/Select/Select.d.ts +++ b/build/components/styled-atlaskit/Select/Select.d.ts @@ -4,5 +4,6 @@ import { SelectOption } from "../../../types"; import "./Select.scss"; export interface SelectProps extends Omit, "onChange"> { onChange?: (option: SelectOption) => void; + isCreatable?: boolean; } -export declare const Select: ({ isMulti, onChange, ...props }: SelectProps) => JSX.Element; +export declare const Select: ({ isMulti, isCreatable, onChange, ...props }: SelectProps) => JSX.Element; diff --git a/build/index.es.js b/build/index.es.js index 93ac9471..67223e79 100644 --- a/build/index.es.js +++ b/build/index.es.js @@ -1,2 +1,2 @@ -import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import o,{Children as i,Component as a,createContext as l,useState as s,useRef as c,useEffect as u,useContext as d,useCallback as p,forwardRef as f,createElement as h,Fragment as g,useLayoutEffect as m,useMemo as v,useReducer as y,memo as A,PureComponent as b}from"react";import E,{css as w,keyframes as k,ThemeProvider as x}from"styled-components";import B from"crypto";import I from"stream";var R=function(e,t){return R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},R(e,t)};function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var C=function(){return C=Object.assign||function(e){for(var t,n=1,r=arguments.length;n,;:_=?*+#."&§%°()\\|\\[\\]\\-\\$\\^\\@\\/]{8,32}$',G=0,Q="*",_=256,j=O("poor","weak","average","good","excellent"),U=function(e,t){return U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},U(e,t)};function Y(e,t){function n(){this.constructor=e}U(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var P=function(){return P=Object.assign||function(e){for(var t,n=1,r=arguments.length;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),rt;function t(t,n,r,o,l){for(var s=t[n],c=0;c0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return l((function(t,n,r,o,i){var l=t[n],s=d(l);if("object"!==s)return new a("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");for(var u in e){var f=e[u];if("function"!=typeof f)return c(r,o,i,u,p(f));var h=f(l,u,r,o,i+"."+u,$e);if(h)return h}return null}))},exact:function(e){return l((function(t,n,r,o,i){var l=t[n],s=d(l);if("object"!==s)return new a("Invalid "+o+" `"+i+"` of type `"+s+"` supplied to `"+r+"`, expected `object`.");var u=Ke({},t[n],e);for(var f in u){var h=e[f];if(et(e,f)&&"function"!=typeof h)return c(r,o,i,f,p(h));if(!h)return new a("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=h(l,f,r,o,i+"."+f,$e);if(g)return g}return null}))}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function a(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function l(e){if("production"!==process.env.NODE_ENV)var n={},o=0;function i(i,l,s,c,u,d,p){if(c=c||r,d=d||s,p!==$e){if(t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=c+":"+s;!n[h]&&o<3&&(nt("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[h]=!0,o++)}}return null==l[s]?i?null===l[s]?new a("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`."):new a("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(l,s,c,u,d)}var l=i.bind(null,!1);return l.isRequired=i.bind(null,!0),l}function s(e){return l((function(t,n,r,o,i,l){var s=t[n];return d(s)!==e?new a("Invalid "+o+" `"+i+"` of type `"+p(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function c(e,t,n,r,o){return new a((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function u(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(u);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!u(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!u(a[1]))return!1}return!0;default:return!1}}function d(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function p(e){if(null==e)return""+e;var t=d(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function f(e){var t=p(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return a.prototype=Error.prototype,o.checkPropTypes=tt,o.resetWarningCache=tt.resetWarningCache,o.PropTypes=o,o}(at.isElement,!0)}else he.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:it,resetWarningCache:ot};return n.PropTypes=n,n}();var lt=he.exports,st={getAtlaskitAnalyticsContext:lt.func},ct=function(e){function t(){var e,n;Z(this,t);for(var r=arguments.length,o=new Array(r),i=0;i=0||(o[n]=e[n]);return o}function pt(e,t){if(null==e)return{};var n,r,o=dt(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}z(ct,"contextTypes",st),z(ct,"childContextTypes",st);var ft=function(e){function t(){var e,n;Z(this,t);for(var r=arguments.length,o=new Array(r),i=0;i>16&255,r>>8&255,255&r].join(",")+", "+t+")"}throw new Error("Bad Hex")},Jt={fallbacks:{background:xt({light:Ft,dark:_t}),color:xt({light:"#505F79",dark:Qt}),textDecoration:"none"},theme:{default:{background:{default:xt({light:Ft,dark:_t}),hover:xt({light:Gt,dark:"#313D52"}),active:xt({light:Wt(Rt,.6),dark:Rt}),disabled:xt({light:Ft,dark:_t}),selected:xt({light:Dt,dark:Ut}),focusSelected:xt({light:Dt,dark:Ut})},boxShadowColor:{focus:xt({light:Wt(St,.6),dark:Rt}),focusSelected:xt({light:Wt(St,.6),dark:Rt})},color:{default:xt({light:"#505F79",dark:Qt}),active:xt({light:Ct,dark:Ct}),disabled:xt({light:Ot,dark:jt}),selected:xt({light:Nt,dark:Qt}),focusSelected:xt({light:Nt,dark:Qt})}},primary:{background:{default:xt({light:Ct,dark:"#4C9AFF"}),hover:xt({light:"#0065FF",dark:Rt}),active:xt({light:"#0747A6",dark:St}),disabled:xt({light:Ft,dark:_t}),selected:xt({light:Dt,dark:Ut}),focusSelected:xt({light:Dt,dark:Ut})},boxShadowColor:{focus:xt({light:Wt(St,.6),dark:Rt}),focusSelected:xt({light:Wt(St,.6),dark:Rt})},color:{default:xt({light:Mt,dark:jt}),disabled:xt({light:Ot,dark:jt}),selected:xt({light:Nt,dark:Qt}),focusSelected:xt({light:Nt,dark:Qt})}},warning:{background:{default:xt({light:"#FFAB00",dark:"#FFAB00"}),hover:xt({light:"#FFC400",dark:"#FFC400"}),active:xt({light:It,dark:It}),disabled:xt({light:Ft,dark:_t}),selected:xt({light:It,dark:It}),focusSelected:xt({light:It,dark:It})},boxShadowColor:{focus:xt({light:"#FF8B00",dark:"#FF8B00"}),focusSelected:xt({light:"#FF8B00",dark:"#FF8B00"})},color:{default:xt({light:Tt,dark:Tt}),disabled:xt({light:Ot,dark:jt}),selected:xt({light:Tt,dark:Tt}),focusSelected:xt({light:Tt,dark:Tt})}},danger:{background:{default:xt({light:"#DE350B",dark:"#DE350B"}),hover:xt({light:"#FF5630",dark:"#FF5630"}),active:xt({light:Bt,dark:Bt}),disabled:xt({light:Ft,dark:_t}),selected:xt({light:Bt,dark:Bt}),focusSelected:xt({light:Bt,dark:Bt})},boxShadowColor:{focus:xt({light:"#FF8F73",dark:"#FF8F73"}),focusSelected:xt({light:"#FF8F73",dark:"#FF8F73"})},color:{default:xt({light:Mt,dark:Mt}),disabled:xt({light:Ot,dark:jt}),selected:xt({light:Mt,dark:Mt}),focusSelected:xt({light:Mt,dark:Mt})}},help:{background:{default:xt({light:"#5243AA",dark:"#5243AA"}),hover:xt({light:"#8777D9",dark:"#8777D9"}),active:xt({light:"#403294",dark:"#403294"}),disabled:xt({light:Ft,dark:_t}),selected:xt({light:Dt,dark:Ut}),focusSelected:xt({light:Bt,dark:Bt})},boxShadowColor:{focus:xt({light:"#998DD9",dark:"#998DD9"}),focusSelected:xt({light:"#998DD9",dark:"#998DD9"})},color:{default:xt({light:Mt,dark:Mt}),disabled:xt({light:Ot,dark:jt}),selected:xt({light:Nt,dark:Qt}),focusSelected:xt({light:Mt,dark:Mt})}},link:{background:{default:xt({light:"none",dark:"none"}),selected:xt({light:Dt,dark:Nt}),focusSelected:xt({light:Dt,dark:Nt})},boxShadowColor:{focus:xt({light:Wt(St,.6),dark:Rt}),focusSelected:xt({light:Wt(St,.6),dark:Rt})},color:{default:xt({light:Ct,dark:"#4C9AFF"}),hover:xt({light:"#0065FF",dark:Rt}),active:xt({light:"#0747A6",dark:St}),disabled:xt({light:Ot,dark:"#67758F"}),selected:xt({light:Nt,dark:Dt}),focusSelected:xt({light:Nt,dark:Dt})},textDecoration:{hover:"underline"}},subtle:{background:{default:xt({light:"none",dark:"none"}),hover:xt({light:Gt,dark:"#313D52"}),active:xt({light:Wt(Rt,.6),dark:Rt}),disabled:xt({light:"none",dark:"none"}),selected:xt({light:Dt,dark:Ut}),focusSelected:xt({light:Dt,dark:Ut})},boxShadowColor:{focus:xt({light:Wt(St,.6),dark:Rt}),focusSelected:xt({light:Wt(St,.6),dark:Rt})},color:{default:xt({light:"#505F79",dark:Qt}),active:xt({light:Ct,dark:Ct}),disabled:xt({light:Ot,dark:"#67758F"}),selected:xt({light:Nt,dark:Qt}),focusSelected:xt({light:Nt,dark:Qt})}},"subtle-link":{background:{default:xt({light:"none",dark:"none"}),selected:xt({light:Dt,dark:Nt}),focusSelected:xt({light:Dt,dark:Nt})},boxShadowColor:{focus:xt({light:Wt(St,.6),dark:Rt}),focusSelected:xt({light:Wt(St,.6),dark:Rt})},color:{default:xt({light:"#6B778C",dark:Qt}),hover:xt({light:"#8993A4",dark:"#DEEBFF"}),active:xt({light:"#505F79",dark:"#8C9CB8"}),disabled:xt({light:Ot,dark:"#67758F"}),selected:xt({light:Nt,dark:Qt}),focusSelected:xt({light:Nt,dark:Qt})},textDecoration:{hover:"underline"}}}},Xt=function(e,t,n){void 0===t&&(t={}),void 0===n&&(n=Jt);var r=t.appearance,o=n.fallbacks,i=n.theme,a=function(e){var t=e.theme;return t&&t["@atlaskit-shared-theme/button"]||{}}(t),l=function(e,t,n,r){var o=r.default;if(!t)return o[e];var i=n[t],a=r[t];return i&&i[e]||a&&a[e]||o[e]}(e,r,a,i);if(!l)return o[e]||"initial";var s=function(e){var t=e.disabled,n=e.isActive,r=e.isFocus,o=e.isHover,i=e.isSelected;return t?"disabled":i&&r?"focusSelected":i?"selected":n?"active":o?"hover":r?"focus":"default"}(t);return l[s]||l.default||o[e]};function qt(e){var t=Vt(Pt(wt,4),14)(e)+"em",n=Vt(Pt(wt,3),14)(e)+"em",r="default",o=t,i=t,a="none",l="0 8px",s="0.1s, 0.15s",c="background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)",u="middle",d="auto",p=Xt("background",e),f=Xt("color",e),h=Xt("boxShadowColor",e),g=h?w(Ht||(Ht=V(["\n box-shadow: 0 0 0 2px ",";\n "],["\n box-shadow: 0 0 0 2px ",";\n "])),h):null,m=Xt("textDecoration",e);"compact"===e.spacing&&(o=n,i=n),"none"===e.spacing&&(o="auto",i="inherit",l="0",u="baseline"),e.isHover&&(r="pointer",c="background 0s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38)"),e.isActive&&(s="0s"),e.isFocus&&(a="none",s="0s, 0.2s"),e.disabled&&(r="not-allowed");return e.fit&&(d="100%"),w(Zt||(Zt=V(["\n align-items: baseline;\n background: ",";\n border-radius: ","px;\n border-width: 0;\n box-sizing: border-box;\n color: "," !important;\n cursor: ",";\n display: inline-flex;\n font-size: inherit;\n font-style: normal;\n height: ",";\n line-height: ",";\n margin: 0;\n max-width: 100%;\n outline: "," !important;\n padding: ",";\n text-align: center;\n text-decoration: ",";\n transition: ",";\n transition-duration: ",";\n vertical-align: ",";\n white-space: nowrap;\n width: ",";\n "," &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n ",";\n "],["\n align-items: baseline;\n background: ",";\n border-radius: ","px;\n border-width: 0;\n box-sizing: border-box;\n color: "," !important;\n cursor: ",";\n display: inline-flex;\n font-size: inherit;\n font-style: normal;\n height: ",";\n line-height: ",";\n margin: 0;\n max-width: 100%;\n outline: "," !important;\n padding: ",";\n text-align: center;\n text-decoration: ",";\n transition: ",";\n transition-duration: ",";\n vertical-align: ",";\n white-space: nowrap;\n width: ",";\n "," &::-moz-focus-inner {\n border: 0;\n margin: 0;\n padding: 0;\n }\n ",";\n "])),p,Et,f,r,o,i,a,l,m,c,s,u,d,g,(function(e){return e.isLoading?"pointer-events: none;":null}))}w(Kt||(Kt=V(["\n transition: opacity 0.3s;\n opacity: ",";\n"],["\n transition: opacity 0.3s;\n opacity: ",";\n"])),(function(e){return e.isLoading?0:1}));var Kt,$t=function(e){return{transition:"opacity 0.3s",opacity:e.isLoading?0:1}},en=function(e){return e.followsIcon?"baseline":"center"},tn=Vt(wt,2),nn=function(e){return"none"===e.spacing?0:"0 "+tn(e)+"px"},rn=function(e){var t=P({alignItems:en(e),alignSelf:en(e),flex:"1 1 auto",margin:nn(e),maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},$t(e));return r.createElement("span",{style:t},e.children)},on=function(e){var t={alignSelf:"center",display:"inline-flex",flexWrap:"nowrap",maxWidth:"100%",position:"relative"};e.fit&&(t.width="100%",t.justifyContent="center");var n={};return e.onClick&&(n.onClick=e.onClick),r.createElement("span",P({style:t},n),e.children)},an=function(e){return"none"===e.spacing?0:e.isOnlyChild?"0 -"+Vt(wt,4)(e)+"px":"0 "+Vt(wt,2)(e)+"px"},ln=function(e){var t=P({alignSelf:"center",display:"flex",flexShrink:0,lineHeight:0,fontSize:0,margin:an(e),userSelect:"none"},$t(e));return r.createElement("span",{style:t},e.children)},sn={exports:{}},cn={exports:{}},un={exports:{}};!function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}(un);var dn={exports:{}};function pn(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}!function(e,t){t.__esModule=!0,t.default=function(e,t){return e.classList?!!t&&e.classList.contains(t):-1!==(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")},e.exports=t.default}(dn,dn.exports),function(e,t){var n=un.exports;t.__esModule=!0,t.default=function(e,t){e.classList?e.classList.add(t):(0,r.default)(e,t)||("string"==typeof e.className?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))};var r=n(dn.exports);e.exports=t.default}(cn,cn.exports);var fn=function(e,t){e.classList?e.classList.remove(t):"string"==typeof e.className?e.className=pn(e.className,t):e.setAttribute("class",pn(e.className&&e.className.baseVal||"",t))},hn={},gn={exports:{}},mn={},vn={exports:{}},yn={};!function(e){var t,n,r,o;if("object"==typeof performance&&"function"==typeof performance.now){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,c=null,u=function(){if(null!==s)try{var t=e.unstable_now();s(!0,t),s=null}catch(e){throw setTimeout(u,0),e}};t=function(e){null!==s?setTimeout(t,0,e):(s=e,setTimeout(u,0))},n=function(e,t){c=setTimeout(e,t)},r=function(){clearTimeout(c)},e.unstable_shouldYield=function(){return!1},o=e.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,p=window.clearTimeout;if("undefined"!=typeof console){var f=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var h=!1,g=null,m=-1,v=5,y=0;e.unstable_shouldYield=function(){return e.unstable_now()>=y},o=function(){},e.unstable_forceFrameRate=function(e){0>e||125>>1,o=e[r];if(!(void 0!==o&&0x(a,n))void 0!==s&&0>x(s,a)?(e[r]=s,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==s&&0>x(s,n)))break e;e[r]=s,e[l]=n,r=l}}}return t}return null}function x(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var B=[],I=[],R=1,S=null,C=3,M=!1,N=!1,O=!1;function D(e){for(var t=w(I);null!==t;){if(null===t.callback)k(I);else{if(!(t.startTime<=e))break;k(I),t.sortIndex=t.expirationTime,E(B,t)}t=w(I)}}function T(e){if(O=!1,D(e),!N)if(null!==w(B))N=!0,t(F);else{var r=w(I);null!==r&&n(T,r.startTime-e)}}function F(t,o){N=!1,O&&(O=!1,r()),M=!0;var i=C;try{for(D(o),S=w(B);null!==S&&(!(S.expirationTime>o)||t&&!e.unstable_shouldYield());){var a=S.callback;if("function"==typeof a){S.callback=null,C=S.priorityLevel;var l=a(S.expirationTime<=o);o=e.unstable_now(),"function"==typeof l?S.callback=l:S===w(B)&&k(B),D(o)}else k(B);S=w(B)}if(null!==S)var s=!0;else{var c=w(I);null!==c&&n(T,c.startTime-o),s=!1}return s}finally{S=null,C=i,M=!1}}var G=o;e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){N||M||(N=!0,t(F))},e.unstable_getCurrentPriorityLevel=function(){return C},e.unstable_getFirstCallbackNode=function(){return w(B)},e.unstable_next=function(e){switch(C){case 1:case 2:case 3:var t=3;break;default:t=C}var n=C;C=t;try{return e()}finally{C=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=G,e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=C;C=e;try{return t()}finally{C=n}},e.unstable_scheduleCallback=function(o,i,a){var l=e.unstable_now();switch("object"==typeof a&&null!==a?a="number"==typeof(a=a.delay)&&0l?(o.sortIndex=a,E(I,o),null===w(B)&&o===w(I)&&(O?r():O=!0,n(T,a-l))):(o.sortIndex=s,E(B,o),N||M||(N=!0,t(F))),o},e.unstable_wrapCallback=function(e){var t=C;return function(){var n=C;C=t;try{return e.apply(this,arguments)}finally{C=n}}}}(yn);var An,bn={};An=bn,"production"!==process.env.NODE_ENV&&function(){var e,t,n,r;if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;An.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();An.unstable_now=function(){return i.now()-a}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,s=null,c=function(){if(null!==l)try{var e=An.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(c,0),e}};e=function(t){null!==l?setTimeout(e,0,t):(l=t,setTimeout(c,0))},t=function(e,t){s=setTimeout(e,t)},n=function(){clearTimeout(s)},An.unstable_shouldYield=function(){return!1},r=An.unstable_forceFrameRate=function(){}}else{var u=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var p=window.requestAnimationFrame,f=window.cancelAnimationFrame;"function"!=typeof p&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof f&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var h=!1,g=null,m=-1,v=5,y=0;An.unstable_shouldYield=function(){return An.unstable_now()>=y},r=function(){},An.unstable_forceFrameRate=function(e){e<0||e>125?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=e>0?Math.floor(1e3/e):5};var A=new MessageChannel,b=A.port2;A.port1.onmessage=function(){if(null!==g){var e=An.unstable_now();y=e+v;try{g(!0,e)?b.postMessage(null):(h=!1,g=null)}catch(e){throw b.postMessage(null),e}}else h=!1},e=function(e){g=e,h||(h=!0,b.postMessage(null))},t=function(e,t){m=u((function(){e(An.unstable_now())}),t)},n=function(){d(m),m=-1}}function E(e,t){var n=e.length;e.push(t),function(e,t,n){for(var r=n;;){var o=r-1>>>1,i=e[o];if(!(void 0!==i&&x(i,t)>0))return;e[o]=t,e[r]=i,r=o}}(e,t,n)}function w(e){var t=e[0];return void 0===t?null:t}function k(e){var t=e[0];if(void 0!==t){var n=e.pop();return n!==t&&(e[0]=n,function(e,t,n){for(var r=n,o=e.length;rr)||e&&!An.unstable_shouldYield());){var o=S.callback;if("function"==typeof o){S.callback=null,C=S.priorityLevel;var i=o(S.expirationTime<=r);r=An.unstable_now(),"function"==typeof i?S.callback=i:S===w(B)&&k(B),D(r)}else k(B);S=w(B)}if(null!==S)return!0;var a=w(I);return null!==a&&t(T,a.startTime-r),!1}(e,r)}finally{S=null,C=o,M=!1}}var G=r;An.unstable_IdlePriority=5,An.unstable_ImmediatePriority=1,An.unstable_LowPriority=4,An.unstable_NormalPriority=3,An.unstable_Profiling=null,An.unstable_UserBlockingPriority=2,An.unstable_cancelCallback=function(e){e.callback=null},An.unstable_continueExecution=function(){N||M||(N=!0,e(F))},An.unstable_getCurrentPriorityLevel=function(){return C},An.unstable_getFirstCallbackNode=function(){return w(B)},An.unstable_next=function(e){var t;switch(C){case 1:case 2:case 3:t=3;break;default:t=C}var n=C;C=t;try{return e()}finally{C=n}},An.unstable_pauseExecution=function(){},An.unstable_requestPaint=G,An.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=C;C=e;try{return t()}finally{C=n}},An.unstable_scheduleCallback=function(r,o,i){var a,l,s=An.unstable_now();if("object"==typeof i&&null!==i){var c=i.delay;a="number"==typeof c&&c>0?s+c:s}else a=s;switch(r){case 1:l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}var u=a+l,d={id:R++,callback:o,priorityLevel:r,startTime:a,expirationTime:u,sortIndex:-1};return a>s?(d.sortIndex=a,E(I,d),null===w(B)&&d===w(I)&&(O?n():O=!0,t(T,a-s))):(d.sortIndex=u,E(B,d),N||M||(N=!0,e(F))),d},An.unstable_wrapCallback=function(e){var t=C;return function(){var n=C;C=t;try{return e.apply(this,arguments)}finally{C=n}}}}(),"production"===process.env.NODE_ENV?vn.exports=yn:vn.exports=bn;var En=o,wn=Ve,kn=vn.exports;function xn(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n